prepare_kamino_withdraw
Construct a Kamino withdrawal transaction to remove liquidity from an active deposit. Validates deposit presence and enforces health factor to avoid under-collateralization.
Instructions
Build a Kamino withdraw tx — pulls liquidity out of a previously-supplied reserve. Refuses with a clear error if the wallet has no deposit in the named reserve. Health-factor gated on-chain: withdraws that would leave the obligation under-collateralized for outstanding debt revert (caught by the simulation gate). DURABLE NONCE REQUIRED + same blind-sign treatment as prepare_kamino_supply.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet | Yes | Solana base58 wallet — must already have a Kamino deposit in the named reserve. | |
| mint | Yes | Base58 Solana mainnet address (ed25519 pubkey, 43 or 44 chars). | |
| amount | Yes | Human-readable amount to withdraw. The reserve must have an active deposit from this wallet — the builder refuses with a clear error otherwise. Health-factor gated on-chain: a withdraw that would leave the obligation under-collateralized for outstanding debt reverts. |