Represents a connection to the Solana network.
The configuration object for the Solana connection.
Readonly
accountReadonly
connectionsReadonly
defaultReadonly
solanaInitiates a bridge operation to transfer tokens from the source network to the destination network.
bridge
The source address from which to transfer the tokens.
The destination address to receive the transferred tokens.
The destination network to bridge the tokens to.
The symbol of the token to be bridged.
The amount of tokens to be bridged, represented as a bigint.
Initiates a bridge transaction to transfer tokens from the source network to the destination network.
bridgeTransaction
The source address from which to transfer the tokens.
The destination address to receive the transferred tokens.
The destination network to bridge the tokens to.
The symbol of the token to be bridged.
The amount of tokens to be bridged, represented as a bigint.
Retrieves the address associated with a specific key from the SolanaConfig accounts.
getAddress
The key for which to retrieve the address.
Retrieves the balance of a specific token for a given account.
getBalance
The account for which to retrieve the balance.
The symbol of the token for which to retrieve the balance.
Private
getRetrieves the connection for a specific token based on its symbol.
getConnection
The symbol of the token for which to retrieve the connection.
Retrieves the configuration for a token based on its symbol.
getToken
The symbol of the token for which to retrieve the configuration.
Checks if a specific address has opted in to a token.
isOptedIn
The symbol of the token to check.
The address to check for opt-in status.
Initiates the opt-in process for a specific token by creating and sending an opt-in transaction.
optin
The address of the account that will opt in to the token.
The symbol of the token for which to initiate the opt-in process.
Creates a transaction for opting in to a specific token.
optinTransaction
The address of the account that will opt in to the token.
The symbol of the token for which to create the opt-in transaction.
Private
sendSends a transaction to the Solana network using the provided connection and account.
sendTransaction
The Solana connection object to use for sending the transaction.
The transaction to be sent.
The Solana account to use for signing the transaction.
Waits for the balance of a specific token for a given address to change to an expected amount within a specified timeout.
waitForBalanceChange
The address for which to wait for the balance change.
The symbol of the token for which to wait for the balance change.
The expected amount to which the balance should change.
Optional
timeoutSeconds: number = 60The timeout duration in seconds (optional, defaults to 60 seconds).
Optional
threshold: number = 0.001The threshold for considering the balance change significant (optional, defaults to 0.001).
Optional
anybalance: boolean = falseSet to true to consider any balance change as valid (optional, defaults to false).
Optional
noBalance: boolean = falseSet to true to wait for the balance to reach zero (optional, defaults to false).
Generated using TypeDoc
Represents a connection to the Solana network.