/** * Position management — split, merge, and convert positions on Polymarket. * All operations are gasless via Polymarket's relayer (Safe wallets only). * * Split: USDC → YES + NO tokens for a market condition * Merge: YES + NO tokens → USDC * Convert: NO positions on selected outcomes → USDC + YES on complementary outcomes (neg-risk only) */ import type { NormalizedSigner } from './signer.js'; import type { BuilderCredentials } from './types.js'; export interface RelayConfig { builderSignerUrl: string; polynodeKey: string; builderCredentials?: BuilderCredentials; rpcUrl?: string; } /** * Split USDC into YES + NO outcome tokens. * Routes to NegRiskAdapter for neg-risk markets, CTF for standard markets. */ export declare function splitPosition(signer: NormalizedSigner, config: RelayConfig, conditionId: string, amount: number, negRisk: boolean): Promise<{ success: boolean; txHash?: string; error?: string; }>; /** * Merge YES + NO outcome tokens back into USDC. * Routes to NegRiskAdapter for neg-risk markets, CTF for standard markets. */ export declare function mergePositions(signer: NormalizedSigner, config: RelayConfig, conditionId: string, amount: number, negRisk: boolean): Promise<{ success: boolean; txHash?: string; error?: string; }>; /** * Convert NO positions on selected outcomes into USDC + YES on complementary outcomes. * Only works on neg-risk multi-outcome markets. * * @param outcomeIndices - which outcome indices to convert (e.g. [0, 1] for the first two) */ export declare function convertPositions(signer: NormalizedSigner, config: RelayConfig, marketId: string, outcomeIndices: number[], amount: number): Promise<{ success: boolean; txHash?: string; error?: string; }>; /** * Split pUSD into YES + NO outcome tokens via V2 Collateral Adapters. * CtfCollateralAdapter for standard markets, NegRiskCtfCollateralAdapter for neg-risk. * Both adapters use the full 5-param IConditionalTokens interface externally. * Adapters internally unwrap pUSD → USDC.e, delegate to V1 CTF/NegRiskAdapter. */ export declare function splitPositionV2(signer: NormalizedSigner, config: RelayConfig, conditionId: string, amount: number, negRisk: boolean): Promise<{ success: boolean; txHash?: string; error?: string; }>; /** * Merge YES + NO outcome tokens back into pUSD via V2 Collateral Adapters. * Both adapters use the full 5-param IConditionalTokens interface externally. */ export declare function mergePositionsV2(signer: NormalizedSigner, config: RelayConfig, conditionId: string, amount: number, negRisk: boolean): Promise<{ success: boolean; txHash?: string; error?: string; }>; //# sourceMappingURL=position-management.d.ts.map