import { RelayClient, type DepositWalletCall } from "@polymarket/builder-relayer-client"; import { type Hex } from "viem"; export type { DepositWalletCall }; /** * RelayClient bound to the REAL account address (the deposit-wallet owner), with * builder-HMAC auth from bootstrapped Builder API creds. Async because the first * call may create the builder key. The relayer is not geoblocked → direct. */ export declare function getRelayClient(): Promise; /** CREATE2-derived deposit wallet address for the local key (pre-deploy safe). */ export declare function deriveDepositWallet(): Promise; export declare function isDepositWalletDeployed(address: string): Promise; /** * Deploy the deposit wallet (idempotence guarded by the caller via * isDepositWalletDeployed). Waits for on-chain confirmation; throws with the * relayer transaction id on failure/timeout so the user can re-run setup. */ export declare function deployDepositWallet(): Promise<{ transactionHash?: string; }>; /** How long a signed batch stays executable by the relayer, in seconds. */ export declare const BATCH_DEADLINE_SECS = 300; /** Current relayer-side state of a submitted batch, or undefined if unreachable. */ export declare function getRelayerTransactionState(transactionID: string): Promise; /** * Execute a signed WALLET batch from the deposit wallet (approvals, redeem…). * The SDK fetches the nonce, EIP-712-signs the Batch with the local key, and * submits; we wait for confirmation. * * `wait()` returns undefined for BOTH an on-chain failure and a poll timeout * (100×2s < the 300s signature deadline), and those need OPPOSITE advice: a * failed batch is safe to retry, a timed-out one is NOT — its signature stays * executable until the deadline, so re-signing a money movement can * double-execute (the withdraw double-spend window from issue #72). On * undefined we ask the relayer which case it is and say so explicitly. * * opts.guidance replaces the generic "re-run setup" advice with per-operation * instructions. opts.trackPendingWithdraw persists the in-flight batch to the * state file so withdraw can refuse to sign a second transfer while the first * may still land (cleared on confirmation or terminal failure). */ export declare function sendWalletBatch(calls: DepositWalletCall[], depositWallet: string, description: string, opts?: { guidance?: string; trackPendingWithdraw?: boolean; }): Promise<{ transactionHash?: string; }>;