/** * Networks supported in Agent Passport. * @deprecated "botchain" is deprecated. Use "robinhood" instead. */ export type AgentPassportNetwork = "polygon" | "avalanche" | "arbitrum" | "bnb" | "base" | "unichain" | "optimism" | "botchain" | "xrplevm" | "solana" | "near" | "aptos" | "casper"; export type AgentPassportChainFamily = "evm" | "solana" | "near" | "aptos" | "casper"; export type AgentPassportStatus = "active" | "suspended" | "revoked"; export type AgentPassportWalletStatus = "active" | "revoked" | "blocked"; export interface AgentPassportWalletBinding { network: AgentPassportNetwork; chain_family: AgentPassportChainFamily; chain_ref: string | null; address: string; public_key: string | null; is_primary: boolean; status: AgentPassportWalletStatus; verified_at: number; } export interface AgentPassportIssuerProof { key_id: string; public_key: string; signature: string; } export interface AgentPassportIdentity { schema: "aifp3.passport.vnext" | string; agent_id: string; agent_number: number; agent_number_display: string; username: string | null; display_name: string | null; status: AgentPassportStatus; verification_level: "self_verified" | "organization_verified" | "enhanced_verified"; holder_public_key: string; issuer: AgentPassportIssuerProof; protected_payload_hash: string; integrity_state: "ok" | "failed"; version: number; created_at: number; updated_at: number; wallets: AgentPassportWalletBinding[]; } export interface AgentPassportHolderKeypair { public_key_b64: string; private_key_b64: string; } export interface AgentPassportWalletChallenge { challenge_id: string; agent_id: string; network: AgentPassportNetwork; chain_family: AgentPassportChainFamily; chain_ref: string | null; address: string; nonce: string; message: string; expires_at: number; required_signatures: ["holder_signature", "wallet_signature"] | string[]; } export declare class AgentPassportError extends Error { readonly code: string; constructor(message: string, code?: string); } export declare function normalizeAgentPassportIdentifier(identifier: string): string; /** Resolve by immutable agent_id, permanent AIFP number or @username. */ export declare function resolveAgentPassport(identifier: string, baseUrl?: string, fetchImpl?: typeof fetch): Promise; /** Generate the holder key locally. The private key is never sent to AiFinPay. */ export declare function generateAgentPassportHolderKeypair(): AgentPassportHolderKeypair; export declare function signAgentPassportHolderMessage(privateKeyB64: string, message: string): string; export declare function issueAgentPassport(input: { holder_public_key: string; username?: string; display_name?: string; }, baseUrl?: string): Promise; export declare function createAgentPassport(input?: { username?: string; display_name?: string; }, baseUrl?: string): Promise<{ passport: AgentPassportIdentity; holder: AgentPassportHolderKeypair; }>; export declare function requestAgentPassportWalletBinding(identifier: string, input: { network: AgentPassportNetwork; address: string; wallet_public_key?: string; }, baseUrl?: string): Promise; export declare function confirmAgentPassportWalletBinding(identifier: string, input: { challenge_id: string; holder_signature: string; wallet_signature: string; wallet_signature_encoding?: "base64" | "base58" | "hex"; wallet_public_key?: string; }, baseUrl?: string): Promise; /** * Verify both the issuer signature and the protected payload hash against an * independently pinned AiFinPay issuer public key. Never trust only the key * returned inside the same passport response. */ export declare function verifyAgentPassportIssuerSignature(passport: AgentPassportIdentity, trustedIssuerPublicKeyB64: string): boolean; export declare function agentPassportWallet(passport: AgentPassportIdentity, network: AgentPassportNetwork): AgentPassportWalletBinding; //# sourceMappingURL=agentPassport.d.ts.map