Versions in this module Expand all Collapse all v3 v3.6.2 Feb 8, 2023 Changes in this version + var RPCCall = tokens.RPCCall + func PublicKeyToAddress(pubKeyHex string) (string, error) + func SupportChainID(chainID *big.Int) bool + type Bridge struct + func NewCrossChainBridge() *Bridge + func (b *Bridge) AirDrop(publicKey string, amount uint64) (string, error) + func (b *Bridge) BuildApplyMpcTransaction(routerContract, routerMPC, routerPDA, newMpcAddress string) (*types.Transaction, error) + func (b *Bridge) BuildChangeMpcTransaction(routerContract, routerMPC, routerPDA, newMpcAddress string) (*types.Transaction, error) + func (b *Bridge) BuildEnableSwapTransaction(routerContract, routerMPC, routerPDA string, enable bool) (*types.Transaction, error) + func (b *Bridge) BuildMintSPLTransaction(amount uint64, mintAddr, toAddr, minterAddr string) (*types.Transaction, error) + func (b *Bridge) BuildRawTransaction(args *tokens.BuildTxArgs) (rawTx interface{}, err error) + func (b *Bridge) BuildSendSPLTransaction(amount uint64, sourceAddr, destAddr, fromAddr string) (*types.Transaction, error) + func (b *Bridge) BuildSendSolanaTransaction(lamports uint64, fromAddress, toAddress string) (*types.Transaction, error) + func (b *Bridge) BuildSwapinMintTransaction(args *tokens.BuildTxArgs, tokenCfg *tokens.TokenConfig) (*types.Transaction, error) + func (b *Bridge) BuildSwapinNativeTransaction(args *tokens.BuildTxArgs, tokenCfg *tokens.TokenConfig) (*types.Transaction, error) + func (b *Bridge) BuildSwapinTransferTransaction(args *tokens.BuildTxArgs, tokenCfg *tokens.TokenConfig) (*types.Transaction, error) + func (b *Bridge) GetAccountInfo(account, encoding string) (result *types.GetAccountInfoResult, err error) + func (b *Bridge) GetBalance(publicKey string) (*big.Int, error) + func (b *Bridge) GetBlock(slot uint64, fullTx bool) (result *types.GetBlockResult, err error) + func (b *Bridge) GetBlockHeight() (uint64, error) + func (b *Bridge) GetBlocks(start, end uint64) (*[]uint64, error) + func (b *Bridge) GetEpochInfo() (*types.GetEpochInfoResult, error) + func (b *Bridge) GetFeeForMessage(blockhash, message string) (result uint64, err error) + func (b *Bridge) GetFees() (result *types.GetFeesResult, err error) + func (b *Bridge) GetLatestBlockNumber() (uint64, error) + func (b *Bridge) GetLatestBlockNumberOf(url string) (uint64, error) + func (b *Bridge) GetLatestBlockhash() (result *types.GetLatestBlockhashResult, err error) + func (b *Bridge) GetMPCAddress(programID string) (types.PublicKey, error) + func (b *Bridge) GetMinimumBalanceForRentExemption(datalength uint64) (uint64, error) + func (b *Bridge) GetNonceAccountInfo(account string) (result *types.GetNonceAccountInfoResult, err error) + func (b *Bridge) GetProgramAccounts(account, encoding string, filters []map[string]interface{}) (result types.GetProgramAccountsResult, err error) + func (b *Bridge) GetRecentBlockhash() (result *types.GetRecentBlockhashResult, err error) + func (b *Bridge) GetRouterAccount(programID string) (*RouterAccount, error) + func (b *Bridge) GetSignatureStatuses(sigs []string, searchTransactionHistory bool) (result *types.GetSignatureStatusesResult, err error) + func (b *Bridge) GetTokenBalance(tokenAccount string) (result *types.GetTokenAmountResult, err error) + func (b *Bridge) GetTokenDecimals(tokenMint string) (uint8, error) + func (b *Bridge) GetTokenSupply(tokenMint string) (result *types.GetTokenAmountResult, err error) + func (b *Bridge) GetTransaction(txHash string) (result interface{}, err error) + func (b *Bridge) GetTransactionStatus(txHash string) (*tokens.TxStatus, error) + func (b *Bridge) GetTxBlockInfo(txHash string) (blockHeight, blockTime uint64) + func (b *Bridge) InitRouterInfo(routerContract, routerVersion string) (err error) + func (b *Bridge) IsBlockhashValid(blockhash string) (bool, error) + func (b *Bridge) IsMinter(tokenMint, minterAddr string) (bool, error) + func (b *Bridge) IsNative(address string) bool + func (b *Bridge) IsValidAddress(address string) bool + func (b *Bridge) MPCSignTransaction(rawTx interface{}, args *tokens.BuildTxArgs) (signTx interface{}, txHash string, err error) + func (b *Bridge) PublicKeyToAddress(pubKeyHex string) (string, error) + func (b *Bridge) RegisterSwap(txHash string, args *tokens.RegisterArgs) ([]*tokens.SwapTxInfo, []error) + func (b *Bridge) SendSignedTransaction(tx *types.Transaction, opts *types.SendTransactionOptions) (txHash string, err error) + func (b *Bridge) SendTransaction(signedTx interface{}) (txHash string, err error) + func (b *Bridge) SetGatewayConfig(gatewayCfg *tokens.GatewayConfig) + func (b *Bridge) SetTokenConfig(tokenAddr string, tokenCfg *tokens.TokenConfig) + func (b *Bridge) SignTransactionWithPrivateKey(rawTx interface{}, privKey string) (signTx interface{}, txHash string, err error) + func (b *Bridge) SimulateTransaction(tx *types.Transaction) (result *types.SimulateTransactionResponse, err error) + func (b *Bridge) VerifyMPCPubKey(mpcAddress, mpcPubkey string) error + func (b *Bridge) VerifyMsgHash(rawTx interface{}, msgHashes []string) (err error) + func (b *Bridge) VerifyTransaction(txHash string, args *tokens.VerifyArgs) (*tokens.SwapTxInfo, error) + type RouterAccount struct + Bump uint8 + MPC types.PublicKey