import { Hex, Address, TypedDataDomain } from 'viem'; interface AuctionStartLike { wager: bigint | string; predictedOutcomes: Hex[]; resolver: Address; taker: Address; } declare function buildMakerBidTypedData(args: { auction: AuctionStartLike; makerWager: bigint; makerDeadline: bigint | number; chainId: number; verifyingContract: Address; maker: Address; makerNonce: bigint; }): { domain: TypedDataDomain; types: { Approve: readonly [ { name: 'messageHash'; type: 'bytes32'; }, { name: 'owner'; type: 'address'; } ]; }; primaryType: 'Approve'; message: { messageHash: Hex; owner: Address; }; }; declare function signMakerBid(args: { privateKey: Hex; domain: TypedDataDomain; types: { Approve: readonly [ { name: 'messageHash'; type: 'bytes32'; }, { name: 'owner'; type: 'address'; } ]; }; primaryType: 'Approve'; message: { messageHash: Hex; owner: Address; }; }): Promise; interface AuctionStartSigningPayload { wager: string; predictedOutcomes: string[]; resolver: string; taker: string; takerNonce: number; chainId: number; } /** * Auction request payload sent to the relayer WebSocket server. * This matches the relayer's AuctionRequestPayload type. * The takerSignature and takerSignedAt fields are optional for price discovery, * but required when submitting a quote request that needs signature verification. */ interface AuctionRequestPayload { wager: string; predictedOutcomes: string[]; resolver: string; taker: string; takerNonce: number; chainId: number; takerSignature?: string; takerSignedAt?: string; } /** * Creates a SIWE-formatted message for auction request signing (EIP-191) * This follows EIP-4361 format and includes all auction parameters in the signature * @param payload - Auction parameters to sign * @param domain - The domain (e.g., 'api.sapience.xyz') * @param uri - The URI (e.g., 'https://api.sapience.xyz') * @param issuedAt - ISO timestamp when the signature was created * @returns The SIWE-formatted message string */ declare function createAuctionStartSiweMessage(payload: AuctionStartSigningPayload, domain: string, uri: string, issuedAt: string): string; /** * Extracts domain and URI from a WebSocket URL for SIWE signing * @param wsUrl - WebSocket URL (e.g., 'wss://relayer.sapience.xyz/auction') * @returns { domain, uri } for SIWE message */ declare function extractSiweDomainAndUri(wsUrl: string): { domain: string; uri: string; }; export { type AuctionRequestPayload, type AuctionStartLike, type AuctionStartSigningPayload, buildMakerBidTypedData, createAuctionStartSiweMessage, extractSiweDomainAndUri, signMakerBid };