UNPKG

@drift-labs/sdk

Version:
21 lines (20 loc) 793 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.buildWithdrawInstruction = void 0; async function buildWithdrawInstruction(args) { return await args.program.instruction.withdraw(args.marketIndex, args.amount, args.reduceOnly, { accounts: { state: args.state, spotMarket: args.spotMarket, spotMarketVault: args.spotMarketVault, driftSigner: args.driftSigner, user: args.user, userStats: args.userStats, userTokenAccount: args.userTokenAccount, authority: args.authority, tokenProgram: args.tokenProgram, }, remainingAccounts: args.remainingAccounts, }); } exports.buildWithdrawInstruction = buildWithdrawInstruction;