import type { OperationResponse } from "@opensea/api-types"; import type { AuthSigner } from "./types"; export type ChainArch = "EVM" | "SVM" | "BITCOIN"; export type AccountType = "Ethereum" | "Solana" | "Bitcoin"; export interface CreateSiwxMessageOptions { address: string; chainId: number; nonce: string; domain?: string; uri?: string; version?: "1"; statement?: string; issuedAt?: Date; expirationTime?: Date; notBefore?: Date; requestId?: string; resources?: string[]; scheme?: string; chainArch?: ChainArch; accountType?: AccountType; } export interface ParseSiwxMessageResult { domain: string; address: string; statement: string; uri: string; version: string; chainId: string; nonce: string; issuedAt: string; expirationTime?: string; notBefore?: string; requestId?: string; resources?: string[]; accountType?: AccountType; } export interface LinkWalletWithSiwxOptions extends Omit { /** @deprecated Nonces now come from apiBaseUrl. */ authBaseUrl?: string; apiBaseUrl?: string; apiKey?: string; authToken: string; chainArch: ChainArch; chainId: number; } /** * Translate a chain architecture to the SIWX account type prefix. */ export declare function chainArchToAccountType(chainArch: ChainArch): AccountType | undefined; /** * Build an EIP-4361/SIWX message for OpenSea wallet linking. */ export declare function createSiwxMessage(options: CreateSiwxMessageOptions): string; /** * Parse a SIWX message into the JSON body expected by the wallet-link API. */ export declare function parseSiwxMessage(message: string): ParseSiwxMessageResult; /** * Request a single-use nonce from the OpenSea API. */ export declare function requestSiwxNonce(apiBaseUrl?: string): Promise; /** * Fetch, sign, and submit a wallet-link request. */ export declare function linkWalletWithSiwx(signer: AuthSigner, options: LinkWalletWithSiwxOptions): Promise>;