deepbook-margin-sdk-pool
Installation
SKILL.md
DeepBook Margin SDK: Margin Pool
The Margin Pool SDK provides functions for supplying assets to earn interest, managing supplier capabilities, tracking referrals, and withdrawing referral fees.
1. SDK API Reference (client.deepbook.marginPool)
Supplier Operations
mintSupplierCap()Mints a newSupplierCapobject that is used to supply and withdraw from pools.- Returns:
(tx: Transaction) => TransactionArgument
- Returns:
supplyToMarginPool(coinKey: string, supplierCap: TransactionObjectArgument, amountToDeposit: number, referralId?: string)Supplies liquidity into the margin pool. Users optionally associate deposits with areferralIdto reward the referrer.- Returns:
(tx: Transaction) => void
- Returns:
withdrawFromMarginPool(coinKey: string, supplierCap: TransactionObjectArgument, amountToWithdraw?: number)Redeems supply shares to withdraw liquidity. IfamountToWithdrawis omitted, it redeems all available shares.- Returns:
(tx: Transaction) => void
- Returns: