SOL
SDK functions on Solana protocol
Stake
On Solana, a wallet can create multiple stake accounts. This stake action creates a new stake account and delegates funds to the chosen validator vote account address. The stake account will earn rewards after an activation period of one epoch (~2.5 days).
You can retrieve the address of the created stake account by using getRewardsByWallets
after broadcasting your transaction.
The amount to stake is in SOL.
You can also pass an optional memo message that will be included in the transaction.
Deactivate stake
Craft a deactivate stake transaction. It takes one full epoch (~2 to 3 days) to deactivate a stake.
Withdraw stake
Craft a withdraw stake transaction. You can specify the amount to withdraw, if not specified, the whole stake balance will be withdrawn. Your stake must be deactivated before you can withdraw funds from it.
Split stake
Craft a split stake transaction. This allows you to split your stake in two stakes.
This is useful when you want to withdraw only a portion of your stake without deactivating it entirely. You would then split it into two stakes with the new stake containing the amount you wish to withdraw - a stake that you can then deactivate and withdraw.
The amount to transfer to the new stake is in SOL.
Merge stakes
Craft a merge stakes transaction. This allows you to merge two stakes into one on certain conditions. See https://docs.solana.com/staking/stake-accounts#merging-stake-accounts
Sign
Sign a transaction by specifying the integration and the crafted transaction.
Here is an example showing how to sign a transaction with a fireblocks vault.
Checkout the setup fireblocks documentation to setup your vault.
Broadcast
Broadcast a signed transaction.
Get transaction status
Get the transaction status of a broadcasted transaction by providing its transaction hash.
Decode transaction
Decode a serialized transaction previously crafted. You can use this to get more information about a transaction prior to broadcast it such as the gas fees used, the function parameters etc.
Get stakes
Get stakes real time data. You can get stakes by Kiln accounts, by stake accounts or by wallets.
Get rewards
Get historical rewards data by day. You can get rewards aggregated by Kiln accounts, by stake accounts or by wallets.
Get network stats
Get some network stats.
Last updated