The cluster, for eg. mainnet-beta, to connect to
Accepts either a Connection
or a rpcEndpoint
string
Signs, sends and confirms the transactions required to deposit SOL into the Socean stake pool. Creates the scnSOL associated token account for the wallet if it doesnt exist.
SOL wallet to deposit SOL from
amount to deposit in lamports
PublicKey of a scnSOL token account of the referrer for this deposit
transaction confirm options for each transaction
the transaction signatures of the transactions sent and confirmed
Creates a TransactionSequence
that deposits SOL into Socean stake pool
Each inner TransactionWithSigners
array must be executed and confirmed
before going to the next one.
Creates the scnSOL associated token account for the wallet if it doesnt exist.
This is a lower-level API for compatibility, recommend using depositSol()
instead if possible.
SOL wallet to deposit SOL from
amount to deposit in lamports
PublicKey of a scnSOL token account of the referrer for this deposit
the deposit transaction sequence
Signs, sends and confirms the transactions required to deposit a stake account into the Socean stake pool Creates the scnSOL associated token account for the wallet if it doesnt exist.
SOL wallet to deposit SOL from
The stake account to deposit. Must be active and delegated to a validator in the stake pool.
The amount of stake to split from stakeAccount
to deposit.
If not provided, 0, or greater than the staked balance, the entire stake account is deposited.
Otherwise, a stake account containing amountLamports
is first split from stakeAccount
and then deposited.
Must be greater than STAKE_ACCOUNT_RENT_EXEMPT_LAMPORTS
and leave more than STAKE_ACCOUNT_RENT_EXEMPT_LAMPORTS
remaining in the stake account it is split from.
PublicKey of a scnSOL token account of the referrer for this deposit
transaction confirm options for each transaction
the transaction signatures of the transactions sent and confirmed
Creates a TransactionSequence
that deposits an active stake account currently staked
with one of the Socean stake pool's validators into Socean stake pool
Each inner TransactionWithSigners
array must be executed and confirmed
before going to the next one.
Creates the scnSOL associated token account for the wallet if it doesnt exist.
This is a lower-level API for compatibility, recommend using depositStake()
instead if possible.
SOL wallet to deposit SOL from
The stake account to deposit. Must be active and delegated to a validator in the stake pool.
The amount of stake to split from stakeAccount
to deposit.
If not provided, 0, or greater than the staked balance, the entire stake account is deposited.
Otherwise, a stake account containing amountLamports
is first split from stakeAccount
and then deposited.
Must be greater than STAKE_ACCOUNT_RENT_EXEMPT_LAMPORTS
and leave more than STAKE_ACCOUNT_RENT_EXEMPT_LAMPORTS
remaining in the stake account it is split from.
PublicKey of a scnSOL token account of the referrer for this deposit
the deposit transaction sequence
Retrieves and deserializes a StakePool account
The deserialized StakePoolAccount
Returns both the validator stake account and transient stake account given the validator's vote account
Retrieves and deserializes a ValidatorList account
The deserialized ValidatorListAccount
Register an onAccountChange websocket listener for the stake pool account and returns the websocket clientSubscriptionId To remove, call this.config.connection.removeAccountChangeListener(clientSubscriptionId)
clientSubscriptionId
Register an onAccountChange websocket listener for the validator list account and returns the websocket clientSubscriptionId To remove, call this.config.connection.removeAccountChangeListener(clientSubscriptionId)
clientSubscriptionId
Returns the transient stake account given the validator's vote account
Creates the TransactionSequence
required to perform the full update
Creates the list of transactions to completely update the validator list
Returns the validator stake account given the validator's vote account
Signs, sends and confirms the transactions required to withdraw stake from the Socean stake pool
the SOL wallet to withdraw stake to. scnSOL is deducted from this wallet's associated token account.
amount of scnSOL to withdraw in droplets (1 scnSOL = 10^9 droplets)
transaction confirm options for each transaction
the transaction signatures of the transactions sent and confirmed and the newly created stake accounts to receive the withdrawn stake
Creates a set of transactions and signer keypairs for withdrawing stake from the Socean stake pool,
and the new stake accounts to receive the withdrawn stake
Each inner TransactionWithSigners
array of transactionSequence
must be executed and confirmed
before going to the next one.
This is a lower-level API for compatibility, recommend using withdrawStake()
instead if possible.
the SOL wallet to withdraw stake to. scnSOL is deducted from this wallet's associated token account.
amount of scnSOL to withdraw in droplets (1 scnSOL = 10^9 droplets)
{transactionSequence, stakeAccounts}
, where
transactionSequence
is the TransactionSequence
that needs to be sent in order, and
stakeAccounts
is the array of Keypair
s for the newly created stake accounts to receive the withdrawn stake
Generated using TypeDoc
Instantiates a Socean client