import type { SignedOrder } from "../order-utils/index.ts"; import { SignatureType } from "../order-utils/index.ts"; import type { ClobSigner } from "../signer.ts"; import type { Chain, CreateOrderOptions, UserMarketOrder, UserOrder } from "../types.ts"; export declare class OrderBuilder { readonly signer: ClobSigner; readonly chainId: Chain; readonly signatureType: SignatureType; readonly funderAddress?: string; /** * Optional function to dynamically resolve the signer. * If provided, this function will be called to obtain a fresh signer instance * (e.g., for smart contract wallets or when the signer may change). * Should return an ethers-compatible signer or WalletClient, or a Promise resolving to one. * If not provided, the static `signer` property is used. */ private getSigner?; constructor(signer: ClobSigner, chainId: Chain, signatureType?: SignatureType, funderAddress?: string, getSigner?: () => Promise | ClobSigner); /** * Generate and sign an order */ buildOrder(userOrder: UserOrder, options: CreateOrderOptions): Promise; /** * Generate and sign a market order */ buildMarketOrder(userMarketOrder: UserMarketOrder, options: CreateOrderOptions): Promise; /** Unified getter: use fresh signer if available */ private resolveSigner; }