Prerequisites
Create Position and Deposit Collateral
2
Configure Privy and Initialise Client
Set up your Privy credentials, Solana connection, and borrow parameters.AUTH_KEY_ID identifies the authorization key (from dashboard/API), AUTH_KEY_PRIVATE is the P-256 private key used for signing. See the Privy authorization keys docs for setup.4
Build Create Position + Deposit Instructions
PasspositionId: 0 to create a new position and deposit collateral in a single transaction. The SDK returns nftId for future operations.nftId for subsequent operations (borrow, repay, withdraw). With positionId: 0, the SDK batches position creation and collateral deposit into one transaction.5
Borrow Against Collateral
Once you have a position with deposited collateral, borrow assets against it.1
2
Build, Sign, and Send
positionId.Operate Parameters
getOperateIx accepts the following parameters:
Related
Earn with Privy
Deposit and withdraw with Privy wallets
Deposit Collateral
Standard collateral deposit with keypair signing
