/** * @name perps/phoenix/phoenix-builder-collateral * @description Collateral builders for Phoenix perps: deposit, withdraw, register trader. * * All builders produce unsigned serialized transactions — NO signing happens server-side. * * @module perps/phoenix/phoenix-builder-collateral */ import { PublicKey, type Connection } from '@solana/web3.js'; import { type UnsignedTransactionResult } from './phoenix-builder-core.js'; /** * Build an unsigned deposit transaction for USDC collateral into a Phoenix trader account. * * @param connection — Solana RPC connection. * @param authority — Trader authority public key. * @param feePayer — Fee payer public key. * @param amountUsdc — Amount in human-readable USDC (e.g. 100 = 100 USDC). * @param traderPdaIndex — Trader PDA index (default 0). * @param traderSubaccountIndex — Trader subaccount index (default 0). * @returns UnsignedTransactionResult with the deposit instructions. */ export declare function buildDeposit(connection: Connection, authority: PublicKey, feePayer: PublicKey, amountUsdc: bigint, traderPdaIndex?: number, traderSubaccountIndex?: number): Promise; /** * Build an unsigned withdraw transaction for USDC collateral from a Phoenix trader account. * * @param connection — Solana RPC connection. * @param authority — Trader authority public key. * @param feePayer — Fee payer public key. * @param amountUsdc — Amount in human-readable USDC. * @param traderPdaIndex — Trader PDA index (default 0). * @param traderSubaccountIndex — Trader subaccount index (default 0). * @returns UnsignedTransactionResult with the withdraw instructions. */ export declare function buildWithdraw(connection: Connection, authority: PublicKey, feePayer: PublicKey, amountUsdc: bigint, traderPdaIndex?: number, traderSubaccountIndex?: number): Promise; /** * Build an unsigned register trader transaction for Phoenix onboarding. * * @param connection — Solana RPC connection. * @param authority — Trader authority public key. * @param feePayer — Fee payer public key. * @param maxPositions — Maximum positions (default 8). * @returns UnsignedTransactionResult with the register trader instruction. */ export declare function buildRegisterTrader(connection: Connection, authority: PublicKey, feePayer: PublicKey, maxPositions?: number): Promise; //# sourceMappingURL=phoenix-builder-collateral.d.ts.map