Deposit to Earn Vault
Deposit assets to start earning yield.Import Dependencies
Import the required packages for Solana RPC communication, Kamino SDK operations, and Kit transaction building.Load Signer and Initialize Vault
Load your keypair from a file and initialize RPC connections and the vault instance.Replace
/path/to/your/keypair.json with the actual path to your keypair file. The rpcSubscriptions enables real-time transaction confirmation.Build Deposit Instructions
Generate deposit instructions for the vault.The
depositIxs method returns deposit instructions to add your assets to the vault and mint vault shares.Build and Sign Transaction
Use Kit’s functional pipe pattern to build and sign the transaction with a fresh blockhash.Send and Confirm Transaction
Send the deposit transaction and wait for confirmation.Once the deposit transaction is confirmed, your assets are deposited into the vault and you start earning yield. Vault shares are minted to represent your position.