/** * @name perps/adrena/adrena-builder-commodity * @description Commodity (synthetic perps) builders for the Adrena perps protocol. * * Contains builders for opening/closing long and short commodity positions * (XAU, XAG, WTI) using the commodities pool, plus internal shared builders * for pool-agnostic operations. * * @module perps/adrena/adrena-builder-commodity */ import { PublicKey, Connection } from '@solana/web3.js'; import { type UnsignedTransactionResult } from './adrena-builder-core.js'; /** * @name buildOpenCommodityLong * @description Build an unsigned transaction to open a long position on a commodity (XAU, XAG, WTI). * Uses the commodities pool. * * @param connection — Solana RPC connection. * @param owner — Position owner and fee payer. * @param principalToken — Commodity symbol (XAU, XAG, WTI). * @param collateralAmount — USDC collateral amount in human-readable units. * @param leverage — Leverage multiplier. * @param price — Price in USD (scaled by 10^10), or null for market order. * @returns Unsigned transaction result. */ export declare function buildOpenCommodityLong(connection: Connection, owner: PublicKey, principalToken: string, collateralAmount: number, leverage: number, price: bigint | null): Promise; /** * @name buildOpenCommodityShort * @description Build an unsigned transaction to open a short position on a commodity. * Uses the commodities pool. * * @param connection — Solana RPC connection. * @param owner — Position owner and fee payer. * @param principalToken — Commodity symbol (XAU, XAG, WTI). * @param collateralAmount — USDC collateral amount in human-readable units. * @param leverage — Leverage multiplier. * @param price — Price in USD (scaled by 10^10), or null for market order. * @returns Unsigned transaction result. */ export declare function buildOpenCommodityShort(connection: Connection, owner: PublicKey, principalToken: string, collateralAmount: number, leverage: number, price: bigint | null): Promise; /** * @name buildCloseCommodityLong * @description Build an unsigned transaction to close a long commodity position. * @param connection — Solana RPC connection. * @param owner — Position owner and fee payer. * @param principalToken — Commodity symbol. * @param price — Optional close price. * @param percentage — Percentage to close. * @returns Unsigned transaction result. */ export declare function buildCloseCommodityLong(connection: Connection, owner: PublicKey, principalToken: string, price: bigint | null, percentage?: bigint): Promise; /** * @name buildCloseCommodityShort * @description Build an unsigned transaction to close a short commodity position. * @param connection — Solana RPC connection. * @param owner — Position owner and fee payer. * @param principalToken — Commodity symbol. * @param price — Optional close price. * @param percentage — Percentage to close. * @returns Unsigned transaction result. */ export declare function buildCloseCommodityShort(connection: Connection, owner: PublicKey, principalToken: string, price: bigint | null, percentage?: bigint): Promise; //# sourceMappingURL=adrena-builder-commodity.d.ts.map