import {z} from 'zod' export type CreateWalletV2025DTOClass = {chainType: 'evm', type?: 'smart' | undefined, config: {adminSigner?: ({type: 'external-wallet', address: string} | {type: 'server', address: string} | {type: 'api-key'} | {type: 'passkey', id: string, name: string, publicKey: {x: string, y: string}} | {type: 'email', email: string} | {type: 'phone', phone: string} | {type: 'quorum', threshold?: number | undefined, signers: Array<{type: 'passkey', id: string, name: string, publicKey: {x: string, y: string}} | {type: 'external-wallet', address: string} | {type: 'server', address: string} | {type: 'email', email: string} | {type: 'phone', phone: string}>}) | undefined, recovery?: ({type: 'external-wallet', address: string} | {type: 'server', address: string} | {type: 'api-key'} | {type: 'passkey', id: string, name: string, publicKey: {x: string, y: string}} | {type: 'email', email: string} | {type: 'phone', phone: string} | {type: 'quorum', threshold?: number | undefined, signers: Array<{type: 'passkey', id: string, name: string, publicKey: {x: string, y: string}} | {type: 'external-wallet', address: string} | {type: 'server', address: string} | {type: 'email', email: string} | {type: 'phone', phone: string}>}) | undefined, delegatedSigners?: (Array<{signer: {type: 'passkey', id: string, name: string, publicKey: {x: string, y: string}} | {type: 'api-key'} | {type: 'external-wallet', address: string} | {type: 'server', address: string} | {type: 'email', email: string} | {type: 'phone', phone: string} | {type: 'device', publicKey: {x: string, y: string}, name?: string | undefined} | string, scopes?: (Array<{type: 'transfer', tokenLocator: string, recipients?: Array | undefined, spendingLimit?: ({amount: string, interval?: number | undefined}) | undefined}>) | undefined, expiresAt?: string | undefined, deployImmediately?: boolean | undefined}>) | undefined, creationSeed?: string | undefined}, owner?: string | undefined, alias?: string | undefined} | {chainType: 'evm', type: 'mpc', config: unknown, owner?: string | undefined} | {chainType: 'solana', type?: 'smart' | undefined, config: {adminSigner?: ({type: 'external-wallet', address: string} | {type: 'server', address: string} | {type: 'api-key'} | {type: 'email', email: string} | {type: 'phone', phone: string} | {type: 'quorum', threshold?: number | undefined, signers: Array<{type: 'passkey', id: string, name: string, publicKey: {x: string, y: string}} | {type: 'external-wallet', address: string} | {type: 'server', address: string} | {type: 'email', email: string} | {type: 'phone', phone: string}>}) | undefined, recovery?: ({type: 'external-wallet', address: string} | {type: 'server', address: string} | {type: 'api-key'} | {type: 'email', email: string} | {type: 'phone', phone: string} | {type: 'quorum', threshold?: number | undefined, signers: Array<{type: 'passkey', id: string, name: string, publicKey: {x: string, y: string}} | {type: 'external-wallet', address: string} | {type: 'server', address: string} | {type: 'email', email: string} | {type: 'phone', phone: string}>}) | undefined, delegatedSigners?: (Array<{signer: {type: 'passkey', id: string, name: string, publicKey: {x: string, y: string}} | {type: 'api-key'} | {type: 'external-wallet', address: string} | {type: 'server', address: string} | {type: 'email', email: string} | {type: 'phone', phone: string} | {type: 'device', publicKey: {x: string, y: string}, name?: string | undefined} | string, scopes?: (Array<{type: 'transfer', tokenLocator: string, recipients?: Array | undefined, spendingLimit?: ({amount: string, interval?: number | undefined}) | undefined}>) | undefined, expiresAt?: string | undefined}>) | undefined}, owner?: string | undefined, alias?: string | undefined} | {chainType: 'solana', type: 'mpc', config: unknown, owner?: string | undefined} | {chainType: 'aptos', type?: 'mpc' | undefined, config: unknown, owner?: string | undefined} | {chainType: 'sui', type?: 'mpc' | undefined, config: unknown, owner?: string | undefined} | {chainType: 'stellar', type?: 'smart' | undefined, config: {adminSigner?: ({type: 'external-wallet', address: string} | {type: 'server', address: string} | {type: 'email', email: string} | {type: 'phone', phone: string} | {type: 'api-key'} | {type: 'quorum', threshold?: number | undefined, signers: Array<{type: 'passkey', id: string, name: string, publicKey: {x: string, y: string}} | {type: 'external-wallet', address: string} | {type: 'server', address: string} | {type: 'email', email: string} | {type: 'phone', phone: string}>}) | undefined, recovery?: ({type: 'external-wallet', address: string} | {type: 'server', address: string} | {type: 'email', email: string} | {type: 'phone', phone: string} | {type: 'api-key'} | {type: 'quorum', threshold?: number | undefined, signers: Array<{type: 'passkey', id: string, name: string, publicKey: {x: string, y: string}} | {type: 'external-wallet', address: string} | {type: 'server', address: string} | {type: 'email', email: string} | {type: 'phone', phone: string}>}) | undefined, delegatedSigners?: (Array<{signer: {type: 'passkey', id: string, name: string, publicKey: {x: string, y: string}} | {type: 'api-key'} | {type: 'external-wallet', address: string} | {type: 'server', address: string} | {type: 'email', email: string} | {type: 'phone', phone: string} | {type: 'device', publicKey: {x: string, y: string}, name?: string | undefined} | string, scopes?: (Array<{type: 'transfer', tokenLocator: string, recipients?: Array | undefined, spendingLimit?: ({amount: string, interval?: number | undefined}) | undefined}>) | undefined, expiresAt?: string | undefined}>) | undefined, plugins?: Array | undefined}, owner?: string | undefined, alias?: string | undefined}; export type CreateApi20250609WalletsArgs = {'X-API-KEY': string, 'x-idempotency-key'?: string | undefined, body: CreateWalletV2025DTOClass}; export type CreateApi20250609WalletsOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; export const walletV2025ResponseDTOClass = z.union([z.object({chainType: z.literal("evm"), type: z.enum(["smart", "mpc"]), config: z.object({adminSigner: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.union([z.string(), z.string(), z.string()]), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), name: z.string(), publicKey: z.object({x: z.string(), y: z.string()}), validatorContractVersion: z.string(), locator: z.string()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string(), address: z.union([z.string(), z.string()])}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string(), address: z.union([z.string(), z.string()])})]), delegatedSigners: z.array(z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string(), scopes: z.array(z.unknown()).optional(), expiresAt: z.string().optional(), chains: z.record(z.string(), z.unknown()).optional()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string(), scopes: z.array(z.unknown()).optional(), expiresAt: z.string().optional(), chains: z.record(z.string(), z.unknown()).optional()}), z.object({type: z.literal("api-key"), address: z.union([z.string(), z.string(), z.string()]), locator: z.string(), scopes: z.array(z.unknown()).optional(), expiresAt: z.string().optional(), chains: z.record(z.string(), z.unknown()).optional()}), z.object({type: z.literal("passkey"), id: z.string(), name: z.string(), publicKey: z.object({x: z.string(), y: z.string()}), validatorContractVersion: z.string(), locator: z.string(), scopes: z.array(z.unknown()).optional(), expiresAt: z.string().optional(), chains: z.record(z.string(), z.unknown()).optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string(), address: z.union([z.string(), z.string()]), scopes: z.array(z.unknown()).optional(), expiresAt: z.string().optional(), chains: z.record(z.string(), z.unknown()).optional()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string(), address: z.union([z.string(), z.string()]), scopes: z.array(z.unknown()).optional(), expiresAt: z.string().optional(), chains: z.record(z.string(), z.unknown()).optional()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional(), scopes: z.array(z.unknown()).optional(), expiresAt: z.string().optional(), chains: z.record(z.string(), z.unknown()).optional()})])).optional()}).optional(), address: z.string(), owner: z.string().optional(), createdAt: z.union([z.number(), z.string()]).optional(), alias: z.string().optional()}), z.object({chainType: z.literal("solana"), type: z.enum(["smart", "mpc"]), config: z.object({adminSigner: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.union([z.string(), z.string(), z.string()]), locator: z.string()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string(), address: z.union([z.string(), z.string()])}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string(), address: z.union([z.string(), z.string()])}), z.object({type: z.literal("quorum"), threshold: z.number().int().gte(1).lte(9007199254740991), locator: z.string(), signers: z.array(z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string(), address: z.union([z.string(), z.string()])}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string(), address: z.union([z.string(), z.string()])})]))})]), delegatedSigners: z.array(z.union([z.object({type: z.literal("passkey"), id: z.string(), name: z.string(), publicKey: z.object({x: z.string(), y: z.string()}), validatorContractVersion: z.string(), locator: z.string(), scopes: z.array(z.object({type: z.literal("transfer"), tokenLocator: z.string(), recipients: z.array(z.string()).optional(), spendingLimit: z.object({amount: z.string(), interval: z.number().int().gte(1).lte(9007199254740991).optional()}).optional()})).optional(), expiresAt: z.union([z.number(), z.string()]).optional(), transaction: z.object({chainType: z.literal("solana"), onChain: z.object({transaction: z.string(), lastValidBlockHeight: z.number().optional(), txId: z.string().optional(), proxiedTxId: z.string().optional(), explorerLink: z.string().optional()}), id: z.string(), status: z.enum(["awaiting-approval", "pending", "failed", "success"]), approvals: z.object({pending: z.array(z.union([z.object({signer: z.object({type: z.literal("quorum"), locator: z.string()}), quorumApprovals: z.object({threshold: z.number(), remaining: z.number(), pending: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})), submitted: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), signature: z.string(), submittedAt: z.union([z.number(), z.string()])}))})}), z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})])), submitted: z.array(z.union([z.object({signer: z.object({type: z.literal("quorum"), locator: z.string()}), quorumApprovals: z.object({threshold: z.number(), remaining: z.number(), pending: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})), submitted: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), signature: z.string(), submittedAt: z.union([z.number(), z.string()])}))})}), z.object({signature: z.string(), submittedAt: z.union([z.number(), z.string()]), signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), metadata: z.object({deviceInfo: z.string().optional(), ipAddress: z.string().optional(), userAgent: z.string().optional()}).optional()})])), required: z.number().optional()}).optional(), createdAt: z.union([z.number(), z.string()]), completedAt: z.union([z.number(), z.string()]).optional(), error: z.union([z.object({reason: z.union([z.literal("build_failed"), z.literal("failed_to_land_on_chain"), z.literal("unknown"), z.literal("sanctioned_wallet_address")]), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional()}), z.object({reason: z.literal("program_error"), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional(), logs: z.unknown()}), z.object({reason: z.literal("execution_reverted"), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional(), revert: z.object({type: z.union([z.literal("contract_call"), z.literal("wallet_authorization"), z.literal("wallet_deployment")]), reason: z.string(), reasonData: z.union([z.string(), z.record(z.string(), z.unknown())]).optional(), explorerLink: z.string().optional(), simulationLink: z.string().optional()}).optional()})]).optional(), sendParams: z.object({token: z.string(), params: z.object({amount: z.string().optional(), recipient: z.string(), recipientAddress: z.string()})}).optional(), fees: z.object({mode: z.enum(["user-native", "user-fungible", "project"]), estimate: z.unknown(), actual: z.unknown(), billed: z.object({usd: z.number()}).optional(), billing: z.object({status: z.enum(["pending", "settled", "failed"])}).optional()}).optional(), walletType: z.literal("smart")}).optional()}), z.object({type: z.literal("api-key"), address: z.union([z.string(), z.string(), z.string()]), locator: z.string(), scopes: z.array(z.object({type: z.literal("transfer"), tokenLocator: z.string(), recipients: z.array(z.string()).optional(), spendingLimit: z.object({amount: z.string(), interval: z.number().int().gte(1).lte(9007199254740991).optional()}).optional()})).optional(), expiresAt: z.union([z.number(), z.string()]).optional(), transaction: z.object({chainType: z.literal("solana"), onChain: z.object({transaction: z.string(), lastValidBlockHeight: z.number().optional(), txId: z.string().optional(), proxiedTxId: z.string().optional(), explorerLink: z.string().optional()}), id: z.string(), status: z.enum(["awaiting-approval", "pending", "failed", "success"]), approvals: z.object({pending: z.array(z.union([z.object({signer: z.object({type: z.literal("quorum"), locator: z.string()}), quorumApprovals: z.object({threshold: z.number(), remaining: z.number(), pending: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})), submitted: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), signature: z.string(), submittedAt: z.union([z.number(), z.string()])}))})}), z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})])), submitted: z.array(z.union([z.object({signer: z.object({type: z.literal("quorum"), locator: z.string()}), quorumApprovals: z.object({threshold: z.number(), remaining: z.number(), pending: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})), submitted: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), signature: z.string(), submittedAt: z.union([z.number(), z.string()])}))})}), z.object({signature: z.string(), submittedAt: z.union([z.number(), z.string()]), signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), metadata: z.object({deviceInfo: z.string().optional(), ipAddress: z.string().optional(), userAgent: z.string().optional()}).optional()})])), required: z.number().optional()}).optional(), createdAt: z.union([z.number(), z.string()]), completedAt: z.union([z.number(), z.string()]).optional(), error: z.union([z.object({reason: z.union([z.literal("build_failed"), z.literal("failed_to_land_on_chain"), z.literal("unknown"), z.literal("sanctioned_wallet_address")]), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional()}), z.object({reason: z.literal("program_error"), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional(), logs: z.unknown()}), z.object({reason: z.literal("execution_reverted"), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional(), revert: z.object({type: z.union([z.literal("contract_call"), z.literal("wallet_authorization"), z.literal("wallet_deployment")]), reason: z.string(), reasonData: z.union([z.string(), z.record(z.string(), z.unknown())]).optional(), explorerLink: z.string().optional(), simulationLink: z.string().optional()}).optional()})]).optional(), sendParams: z.object({token: z.string(), params: z.object({amount: z.string().optional(), recipient: z.string(), recipientAddress: z.string()})}).optional(), fees: z.object({mode: z.enum(["user-native", "user-fungible", "project"]), estimate: z.unknown(), actual: z.unknown(), billed: z.object({usd: z.number()}).optional(), billing: z.object({status: z.enum(["pending", "settled", "failed"])}).optional()}).optional(), walletType: z.literal("smart")}).optional()}), z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string(), scopes: z.array(z.object({type: z.literal("transfer"), tokenLocator: z.string(), recipients: z.array(z.string()).optional(), spendingLimit: z.object({amount: z.string(), interval: z.number().int().gte(1).lte(9007199254740991).optional()}).optional()})).optional(), expiresAt: z.union([z.number(), z.string()]).optional(), transaction: z.object({chainType: z.literal("solana"), onChain: z.object({transaction: z.string(), lastValidBlockHeight: z.number().optional(), txId: z.string().optional(), proxiedTxId: z.string().optional(), explorerLink: z.string().optional()}), id: z.string(), status: z.enum(["awaiting-approval", "pending", "failed", "success"]), approvals: z.object({pending: z.array(z.union([z.object({signer: z.object({type: z.literal("quorum"), locator: z.string()}), quorumApprovals: z.object({threshold: z.number(), remaining: z.number(), pending: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})), submitted: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), signature: z.string(), submittedAt: z.union([z.number(), z.string()])}))})}), z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})])), submitted: z.array(z.union([z.object({signer: z.object({type: z.literal("quorum"), locator: z.string()}), quorumApprovals: z.object({threshold: z.number(), remaining: z.number(), pending: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})), submitted: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), signature: z.string(), submittedAt: z.union([z.number(), z.string()])}))})}), z.object({signature: z.string(), submittedAt: z.union([z.number(), z.string()]), signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), metadata: z.object({deviceInfo: z.string().optional(), ipAddress: z.string().optional(), userAgent: z.string().optional()}).optional()})])), required: z.number().optional()}).optional(), createdAt: z.union([z.number(), z.string()]), completedAt: z.union([z.number(), z.string()]).optional(), error: z.union([z.object({reason: z.union([z.literal("build_failed"), z.literal("failed_to_land_on_chain"), z.literal("unknown"), z.literal("sanctioned_wallet_address")]), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional()}), z.object({reason: z.literal("program_error"), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional(), logs: z.unknown()}), z.object({reason: z.literal("execution_reverted"), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional(), revert: z.object({type: z.union([z.literal("contract_call"), z.literal("wallet_authorization"), z.literal("wallet_deployment")]), reason: z.string(), reasonData: z.union([z.string(), z.record(z.string(), z.unknown())]).optional(), explorerLink: z.string().optional(), simulationLink: z.string().optional()}).optional()})]).optional(), sendParams: z.object({token: z.string(), params: z.object({amount: z.string().optional(), recipient: z.string(), recipientAddress: z.string()})}).optional(), fees: z.object({mode: z.enum(["user-native", "user-fungible", "project"]), estimate: z.unknown(), actual: z.unknown(), billed: z.object({usd: z.number()}).optional(), billing: z.object({status: z.enum(["pending", "settled", "failed"])}).optional()}).optional(), walletType: z.literal("smart")}).optional()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string(), scopes: z.array(z.object({type: z.literal("transfer"), tokenLocator: z.string(), recipients: z.array(z.string()).optional(), spendingLimit: z.object({amount: z.string(), interval: z.number().int().gte(1).lte(9007199254740991).optional()}).optional()})).optional(), expiresAt: z.union([z.number(), z.string()]).optional(), transaction: z.object({chainType: z.literal("solana"), onChain: z.object({transaction: z.string(), lastValidBlockHeight: z.number().optional(), txId: z.string().optional(), proxiedTxId: z.string().optional(), explorerLink: z.string().optional()}), id: z.string(), status: z.enum(["awaiting-approval", "pending", "failed", "success"]), approvals: z.object({pending: z.array(z.union([z.object({signer: z.object({type: z.literal("quorum"), locator: z.string()}), quorumApprovals: z.object({threshold: z.number(), remaining: z.number(), pending: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})), submitted: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), signature: z.string(), submittedAt: z.union([z.number(), z.string()])}))})}), z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})])), submitted: z.array(z.union([z.object({signer: z.object({type: z.literal("quorum"), locator: z.string()}), quorumApprovals: z.object({threshold: z.number(), remaining: z.number(), pending: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})), submitted: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), signature: z.string(), submittedAt: z.union([z.number(), z.string()])}))})}), z.object({signature: z.string(), submittedAt: z.union([z.number(), z.string()]), signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), metadata: z.object({deviceInfo: z.string().optional(), ipAddress: z.string().optional(), userAgent: z.string().optional()}).optional()})])), required: z.number().optional()}).optional(), createdAt: z.union([z.number(), z.string()]), completedAt: z.union([z.number(), z.string()]).optional(), error: z.union([z.object({reason: z.union([z.literal("build_failed"), z.literal("failed_to_land_on_chain"), z.literal("unknown"), z.literal("sanctioned_wallet_address")]), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional()}), z.object({reason: z.literal("program_error"), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional(), logs: z.unknown()}), z.object({reason: z.literal("execution_reverted"), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional(), revert: z.object({type: z.union([z.literal("contract_call"), z.literal("wallet_authorization"), z.literal("wallet_deployment")]), reason: z.string(), reasonData: z.union([z.string(), z.record(z.string(), z.unknown())]).optional(), explorerLink: z.string().optional(), simulationLink: z.string().optional()}).optional()})]).optional(), sendParams: z.object({token: z.string(), params: z.object({amount: z.string().optional(), recipient: z.string(), recipientAddress: z.string()})}).optional(), fees: z.object({mode: z.enum(["user-native", "user-fungible", "project"]), estimate: z.unknown(), actual: z.unknown(), billed: z.object({usd: z.number()}).optional(), billing: z.object({status: z.enum(["pending", "settled", "failed"])}).optional()}).optional(), walletType: z.literal("smart")}).optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string(), address: z.union([z.string(), z.string()]), scopes: z.array(z.object({type: z.literal("transfer"), tokenLocator: z.string(), recipients: z.array(z.string()).optional(), spendingLimit: z.object({amount: z.string(), interval: z.number().int().gte(1).lte(9007199254740991).optional()}).optional()})).optional(), expiresAt: z.union([z.number(), z.string()]).optional(), transaction: z.object({chainType: z.literal("solana"), onChain: z.object({transaction: z.string(), lastValidBlockHeight: z.number().optional(), txId: z.string().optional(), proxiedTxId: z.string().optional(), explorerLink: z.string().optional()}), id: z.string(), status: z.enum(["awaiting-approval", "pending", "failed", "success"]), approvals: z.object({pending: z.array(z.union([z.object({signer: z.object({type: z.literal("quorum"), locator: z.string()}), quorumApprovals: z.object({threshold: z.number(), remaining: z.number(), pending: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})), submitted: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), signature: z.string(), submittedAt: z.union([z.number(), z.string()])}))})}), z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})])), submitted: z.array(z.union([z.object({signer: z.object({type: z.literal("quorum"), locator: z.string()}), quorumApprovals: z.object({threshold: z.number(), remaining: z.number(), pending: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})), submitted: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), signature: z.string(), submittedAt: z.union([z.number(), z.string()])}))})}), z.object({signature: z.string(), submittedAt: z.union([z.number(), z.string()]), signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), metadata: z.object({deviceInfo: z.string().optional(), ipAddress: z.string().optional(), userAgent: z.string().optional()}).optional()})])), required: z.number().optional()}).optional(), createdAt: z.union([z.number(), z.string()]), completedAt: z.union([z.number(), z.string()]).optional(), error: z.union([z.object({reason: z.union([z.literal("build_failed"), z.literal("failed_to_land_on_chain"), z.literal("unknown"), z.literal("sanctioned_wallet_address")]), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional()}), z.object({reason: z.literal("program_error"), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional(), logs: z.unknown()}), z.object({reason: z.literal("execution_reverted"), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional(), revert: z.object({type: z.union([z.literal("contract_call"), z.literal("wallet_authorization"), z.literal("wallet_deployment")]), reason: z.string(), reasonData: z.union([z.string(), z.record(z.string(), z.unknown())]).optional(), explorerLink: z.string().optional(), simulationLink: z.string().optional()}).optional()})]).optional(), sendParams: z.object({token: z.string(), params: z.object({amount: z.string().optional(), recipient: z.string(), recipientAddress: z.string()})}).optional(), fees: z.object({mode: z.enum(["user-native", "user-fungible", "project"]), estimate: z.unknown(), actual: z.unknown(), billed: z.object({usd: z.number()}).optional(), billing: z.object({status: z.enum(["pending", "settled", "failed"])}).optional()}).optional(), walletType: z.literal("smart")}).optional()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string(), address: z.union([z.string(), z.string()]), scopes: z.array(z.object({type: z.literal("transfer"), tokenLocator: z.string(), recipients: z.array(z.string()).optional(), spendingLimit: z.object({amount: z.string(), interval: z.number().int().gte(1).lte(9007199254740991).optional()}).optional()})).optional(), expiresAt: z.union([z.number(), z.string()]).optional(), transaction: z.object({chainType: z.literal("solana"), onChain: z.object({transaction: z.string(), lastValidBlockHeight: z.number().optional(), txId: z.string().optional(), proxiedTxId: z.string().optional(), explorerLink: z.string().optional()}), id: z.string(), status: z.enum(["awaiting-approval", "pending", "failed", "success"]), approvals: z.object({pending: z.array(z.union([z.object({signer: z.object({type: z.literal("quorum"), locator: z.string()}), quorumApprovals: z.object({threshold: z.number(), remaining: z.number(), pending: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})), submitted: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), signature: z.string(), submittedAt: z.union([z.number(), z.string()])}))})}), z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})])), submitted: z.array(z.union([z.object({signer: z.object({type: z.literal("quorum"), locator: z.string()}), quorumApprovals: z.object({threshold: z.number(), remaining: z.number(), pending: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})), submitted: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), signature: z.string(), submittedAt: z.union([z.number(), z.string()])}))})}), z.object({signature: z.string(), submittedAt: z.union([z.number(), z.string()]), signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), metadata: z.object({deviceInfo: z.string().optional(), ipAddress: z.string().optional(), userAgent: z.string().optional()}).optional()})])), required: z.number().optional()}).optional(), createdAt: z.union([z.number(), z.string()]), completedAt: z.union([z.number(), z.string()]).optional(), error: z.union([z.object({reason: z.union([z.literal("build_failed"), z.literal("failed_to_land_on_chain"), z.literal("unknown"), z.literal("sanctioned_wallet_address")]), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional()}), z.object({reason: z.literal("program_error"), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional(), logs: z.unknown()}), z.object({reason: z.literal("execution_reverted"), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional(), revert: z.object({type: z.union([z.literal("contract_call"), z.literal("wallet_authorization"), z.literal("wallet_deployment")]), reason: z.string(), reasonData: z.union([z.string(), z.record(z.string(), z.unknown())]).optional(), explorerLink: z.string().optional(), simulationLink: z.string().optional()}).optional()})]).optional(), sendParams: z.object({token: z.string(), params: z.object({amount: z.string().optional(), recipient: z.string(), recipientAddress: z.string()})}).optional(), fees: z.object({mode: z.enum(["user-native", "user-fungible", "project"]), estimate: z.unknown(), actual: z.unknown(), billed: z.object({usd: z.number()}).optional(), billing: z.object({status: z.enum(["pending", "settled", "failed"])}).optional()}).optional(), walletType: z.literal("smart")}).optional()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional(), scopes: z.array(z.object({type: z.literal("transfer"), tokenLocator: z.string(), recipients: z.array(z.string()).optional(), spendingLimit: z.object({amount: z.string(), interval: z.number().int().gte(1).lte(9007199254740991).optional()}).optional()})).optional(), expiresAt: z.union([z.number(), z.string()]).optional(), transaction: z.object({chainType: z.literal("solana"), onChain: z.object({transaction: z.string(), lastValidBlockHeight: z.number().optional(), txId: z.string().optional(), proxiedTxId: z.string().optional(), explorerLink: z.string().optional()}), id: z.string(), status: z.enum(["awaiting-approval", "pending", "failed", "success"]), approvals: z.object({pending: z.array(z.union([z.object({signer: z.object({type: z.literal("quorum"), locator: z.string()}), quorumApprovals: z.object({threshold: z.number(), remaining: z.number(), pending: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})), submitted: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), signature: z.string(), submittedAt: z.union([z.number(), z.string()])}))})}), z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})])), submitted: z.array(z.union([z.object({signer: z.object({type: z.literal("quorum"), locator: z.string()}), quorumApprovals: z.object({threshold: z.number(), remaining: z.number(), pending: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})), submitted: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), signature: z.string(), submittedAt: z.union([z.number(), z.string()])}))})}), z.object({signature: z.string(), submittedAt: z.union([z.number(), z.string()]), signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), metadata: z.object({deviceInfo: z.string().optional(), ipAddress: z.string().optional(), userAgent: z.string().optional()}).optional()})])), required: z.number().optional()}).optional(), createdAt: z.union([z.number(), z.string()]), completedAt: z.union([z.number(), z.string()]).optional(), error: z.union([z.object({reason: z.union([z.literal("build_failed"), z.literal("failed_to_land_on_chain"), z.literal("unknown"), z.literal("sanctioned_wallet_address")]), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional()}), z.object({reason: z.literal("program_error"), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional(), logs: z.unknown()}), z.object({reason: z.literal("execution_reverted"), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional(), revert: z.object({type: z.union([z.literal("contract_call"), z.literal("wallet_authorization"), z.literal("wallet_deployment")]), reason: z.string(), reasonData: z.union([z.string(), z.record(z.string(), z.unknown())]).optional(), explorerLink: z.string().optional(), simulationLink: z.string().optional()}).optional()})]).optional(), sendParams: z.object({token: z.string(), params: z.object({amount: z.string().optional(), recipient: z.string(), recipientAddress: z.string()})}).optional(), fees: z.object({mode: z.enum(["user-native", "user-fungible", "project"]), estimate: z.unknown(), actual: z.unknown(), billed: z.object({usd: z.number()}).optional(), billing: z.object({status: z.enum(["pending", "settled", "failed"])}).optional()}).optional(), walletType: z.literal("smart")}).optional()})])).optional()}).optional(), address: z.string(), owner: z.string().optional(), createdAt: z.union([z.number(), z.string()]).optional(), alias: z.string().optional()}), z.object({chainType: z.literal("aptos"), type: z.enum(["smart", "mpc"]), config: z.unknown(), address: z.string(), owner: z.string().optional(), createdAt: z.union([z.number(), z.string()]).optional(), alias: z.string().optional()}), z.object({chainType: z.literal("sui"), type: z.enum(["smart", "mpc"]), config: z.unknown(), address: z.string(), owner: z.string().optional(), createdAt: z.union([z.number(), z.string()]).optional(), alias: z.string().optional()}), z.object({chainType: z.literal("stellar"), type: z.enum(["smart", "mpc"]), config: z.object({adminSigner: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string(), address: z.union([z.string(), z.string()])}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string(), address: z.union([z.string(), z.string()])}), z.object({type: z.literal("api-key"), address: z.union([z.string(), z.string(), z.string()]), locator: z.string()}), z.object({type: z.literal("quorum"), threshold: z.number().int().gte(1).lte(9007199254740991), locator: z.string(), signers: z.array(z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string(), address: z.union([z.string(), z.string()])}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string(), address: z.union([z.string(), z.string()])})]))})]), delegatedSigners: z.array(z.union([z.object({type: z.literal("passkey"), id: z.string(), name: z.string(), publicKey: z.object({x: z.string(), y: z.string()}), validatorContractVersion: z.string(), locator: z.string(), scopes: z.array(z.object({type: z.literal("transfer"), tokenLocator: z.string(), recipients: z.array(z.string()).optional(), spendingLimit: z.object({amount: z.string(), interval: z.number().int().gte(1).lte(9007199254740991).optional()}).optional()})).optional(), expiresAt: z.union([z.number(), z.string()]).optional(), transaction: z.object({chainType: z.literal("stellar"), onChain: z.object({transaction: z.object({method: z.string(), tx: z.string()}), txId: z.string().optional(), ledger: z.number().optional(), expiration: z.number(), result: z.unknown(), explorerLink: z.string().optional()}), id: z.string(), status: z.enum(["awaiting-approval", "pending", "failed", "success"]), approvals: z.object({pending: z.array(z.union([z.object({signer: z.object({type: z.literal("quorum"), locator: z.string()}), quorumApprovals: z.object({threshold: z.number(), remaining: z.number(), pending: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})), submitted: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), signature: z.string(), submittedAt: z.union([z.number(), z.string()])}))})}), z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})])), submitted: z.array(z.union([z.object({signer: z.object({type: z.literal("quorum"), locator: z.string()}), quorumApprovals: z.object({threshold: z.number(), remaining: z.number(), pending: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})), submitted: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), signature: z.string(), submittedAt: z.union([z.number(), z.string()])}))})}), z.object({signature: z.string(), submittedAt: z.union([z.number(), z.string()]), signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), metadata: z.object({deviceInfo: z.string().optional(), ipAddress: z.string().optional(), userAgent: z.string().optional()}).optional()})])), required: z.number().optional()}).optional(), createdAt: z.union([z.number(), z.string()]), completedAt: z.union([z.number(), z.string()]).optional(), error: z.union([z.object({reason: z.union([z.literal("build_failed"), z.literal("failed_to_land_on_chain"), z.literal("unknown"), z.literal("sanctioned_wallet_address")]), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional()}), z.object({reason: z.literal("program_error"), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional(), logs: z.unknown()}), z.object({reason: z.literal("execution_reverted"), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional(), revert: z.object({type: z.union([z.literal("contract_call"), z.literal("wallet_authorization"), z.literal("wallet_deployment")]), reason: z.string(), reasonData: z.union([z.string(), z.record(z.string(), z.unknown())]).optional(), explorerLink: z.string().optional(), simulationLink: z.string().optional()}).optional()})]).optional(), sendParams: z.object({token: z.string(), params: z.object({amount: z.string().optional(), recipient: z.string(), recipientAddress: z.string()})}).optional(), fees: z.object({mode: z.enum(["user-native", "user-fungible", "project"]), estimate: z.unknown(), actual: z.unknown(), billed: z.object({usd: z.number()}).optional(), billing: z.object({status: z.enum(["pending", "settled", "failed"])}).optional()}).optional(), walletType: z.literal("smart")}).optional()}), z.object({type: z.literal("api-key"), address: z.union([z.string(), z.string(), z.string()]), locator: z.string(), scopes: z.array(z.object({type: z.literal("transfer"), tokenLocator: z.string(), recipients: z.array(z.string()).optional(), spendingLimit: z.object({amount: z.string(), interval: z.number().int().gte(1).lte(9007199254740991).optional()}).optional()})).optional(), expiresAt: z.union([z.number(), z.string()]).optional(), transaction: z.object({chainType: z.literal("stellar"), onChain: z.object({transaction: z.object({method: z.string(), tx: z.string()}), txId: z.string().optional(), ledger: z.number().optional(), expiration: z.number(), result: z.unknown(), explorerLink: z.string().optional()}), id: z.string(), status: z.enum(["awaiting-approval", "pending", "failed", "success"]), approvals: z.object({pending: z.array(z.union([z.object({signer: z.object({type: z.literal("quorum"), locator: z.string()}), quorumApprovals: z.object({threshold: z.number(), remaining: z.number(), pending: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})), submitted: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), signature: z.string(), submittedAt: z.union([z.number(), z.string()])}))})}), z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})])), submitted: z.array(z.union([z.object({signer: z.object({type: z.literal("quorum"), locator: z.string()}), quorumApprovals: z.object({threshold: z.number(), remaining: z.number(), pending: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})), submitted: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), signature: z.string(), submittedAt: z.union([z.number(), z.string()])}))})}), z.object({signature: z.string(), submittedAt: z.union([z.number(), z.string()]), signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), metadata: z.object({deviceInfo: z.string().optional(), ipAddress: z.string().optional(), userAgent: z.string().optional()}).optional()})])), required: z.number().optional()}).optional(), createdAt: z.union([z.number(), z.string()]), completedAt: z.union([z.number(), z.string()]).optional(), error: z.union([z.object({reason: z.union([z.literal("build_failed"), z.literal("failed_to_land_on_chain"), z.literal("unknown"), z.literal("sanctioned_wallet_address")]), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional()}), z.object({reason: z.literal("program_error"), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional(), logs: z.unknown()}), z.object({reason: z.literal("execution_reverted"), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional(), revert: z.object({type: z.union([z.literal("contract_call"), z.literal("wallet_authorization"), z.literal("wallet_deployment")]), reason: z.string(), reasonData: z.union([z.string(), z.record(z.string(), z.unknown())]).optional(), explorerLink: z.string().optional(), simulationLink: z.string().optional()}).optional()})]).optional(), sendParams: z.object({token: z.string(), params: z.object({amount: z.string().optional(), recipient: z.string(), recipientAddress: z.string()})}).optional(), fees: z.object({mode: z.enum(["user-native", "user-fungible", "project"]), estimate: z.unknown(), actual: z.unknown(), billed: z.object({usd: z.number()}).optional(), billing: z.object({status: z.enum(["pending", "settled", "failed"])}).optional()}).optional(), walletType: z.literal("smart")}).optional()}), z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string(), scopes: z.array(z.object({type: z.literal("transfer"), tokenLocator: z.string(), recipients: z.array(z.string()).optional(), spendingLimit: z.object({amount: z.string(), interval: z.number().int().gte(1).lte(9007199254740991).optional()}).optional()})).optional(), expiresAt: z.union([z.number(), z.string()]).optional(), transaction: z.object({chainType: z.literal("stellar"), onChain: z.object({transaction: z.object({method: z.string(), tx: z.string()}), txId: z.string().optional(), ledger: z.number().optional(), expiration: z.number(), result: z.unknown(), explorerLink: z.string().optional()}), id: z.string(), status: z.enum(["awaiting-approval", "pending", "failed", "success"]), approvals: z.object({pending: z.array(z.union([z.object({signer: z.object({type: z.literal("quorum"), locator: z.string()}), quorumApprovals: z.object({threshold: z.number(), remaining: z.number(), pending: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})), submitted: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), signature: z.string(), submittedAt: z.union([z.number(), z.string()])}))})}), z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})])), submitted: z.array(z.union([z.object({signer: z.object({type: z.literal("quorum"), locator: z.string()}), quorumApprovals: z.object({threshold: z.number(), remaining: z.number(), pending: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})), submitted: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), signature: z.string(), submittedAt: z.union([z.number(), z.string()])}))})}), z.object({signature: z.string(), submittedAt: z.union([z.number(), z.string()]), signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), metadata: z.object({deviceInfo: z.string().optional(), ipAddress: z.string().optional(), userAgent: z.string().optional()}).optional()})])), required: z.number().optional()}).optional(), createdAt: z.union([z.number(), z.string()]), completedAt: z.union([z.number(), z.string()]).optional(), error: z.union([z.object({reason: z.union([z.literal("build_failed"), z.literal("failed_to_land_on_chain"), z.literal("unknown"), z.literal("sanctioned_wallet_address")]), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional()}), z.object({reason: z.literal("program_error"), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional(), logs: z.unknown()}), z.object({reason: z.literal("execution_reverted"), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional(), revert: z.object({type: z.union([z.literal("contract_call"), z.literal("wallet_authorization"), z.literal("wallet_deployment")]), reason: z.string(), reasonData: z.union([z.string(), z.record(z.string(), z.unknown())]).optional(), explorerLink: z.string().optional(), simulationLink: z.string().optional()}).optional()})]).optional(), sendParams: z.object({token: z.string(), params: z.object({amount: z.string().optional(), recipient: z.string(), recipientAddress: z.string()})}).optional(), fees: z.object({mode: z.enum(["user-native", "user-fungible", "project"]), estimate: z.unknown(), actual: z.unknown(), billed: z.object({usd: z.number()}).optional(), billing: z.object({status: z.enum(["pending", "settled", "failed"])}).optional()}).optional(), walletType: z.literal("smart")}).optional()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string(), scopes: z.array(z.object({type: z.literal("transfer"), tokenLocator: z.string(), recipients: z.array(z.string()).optional(), spendingLimit: z.object({amount: z.string(), interval: z.number().int().gte(1).lte(9007199254740991).optional()}).optional()})).optional(), expiresAt: z.union([z.number(), z.string()]).optional(), transaction: z.object({chainType: z.literal("stellar"), onChain: z.object({transaction: z.object({method: z.string(), tx: z.string()}), txId: z.string().optional(), ledger: z.number().optional(), expiration: z.number(), result: z.unknown(), explorerLink: z.string().optional()}), id: z.string(), status: z.enum(["awaiting-approval", "pending", "failed", "success"]), approvals: z.object({pending: z.array(z.union([z.object({signer: z.object({type: z.literal("quorum"), locator: z.string()}), quorumApprovals: z.object({threshold: z.number(), remaining: z.number(), pending: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})), submitted: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), signature: z.string(), submittedAt: z.union([z.number(), z.string()])}))})}), z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})])), submitted: z.array(z.union([z.object({signer: z.object({type: z.literal("quorum"), locator: z.string()}), quorumApprovals: z.object({threshold: z.number(), remaining: z.number(), pending: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})), submitted: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), signature: z.string(), submittedAt: z.union([z.number(), z.string()])}))})}), z.object({signature: z.string(), submittedAt: z.union([z.number(), z.string()]), signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), metadata: z.object({deviceInfo: z.string().optional(), ipAddress: z.string().optional(), userAgent: z.string().optional()}).optional()})])), required: z.number().optional()}).optional(), createdAt: z.union([z.number(), z.string()]), completedAt: z.union([z.number(), z.string()]).optional(), error: z.union([z.object({reason: z.union([z.literal("build_failed"), z.literal("failed_to_land_on_chain"), z.literal("unknown"), z.literal("sanctioned_wallet_address")]), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional()}), z.object({reason: z.literal("program_error"), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional(), logs: z.unknown()}), z.object({reason: z.literal("execution_reverted"), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional(), revert: z.object({type: z.union([z.literal("contract_call"), z.literal("wallet_authorization"), z.literal("wallet_deployment")]), reason: z.string(), reasonData: z.union([z.string(), z.record(z.string(), z.unknown())]).optional(), explorerLink: z.string().optional(), simulationLink: z.string().optional()}).optional()})]).optional(), sendParams: z.object({token: z.string(), params: z.object({amount: z.string().optional(), recipient: z.string(), recipientAddress: z.string()})}).optional(), fees: z.object({mode: z.enum(["user-native", "user-fungible", "project"]), estimate: z.unknown(), actual: z.unknown(), billed: z.object({usd: z.number()}).optional(), billing: z.object({status: z.enum(["pending", "settled", "failed"])}).optional()}).optional(), walletType: z.literal("smart")}).optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string(), address: z.union([z.string(), z.string()]), scopes: z.array(z.object({type: z.literal("transfer"), tokenLocator: z.string(), recipients: z.array(z.string()).optional(), spendingLimit: z.object({amount: z.string(), interval: z.number().int().gte(1).lte(9007199254740991).optional()}).optional()})).optional(), expiresAt: z.union([z.number(), z.string()]).optional(), transaction: z.object({chainType: z.literal("stellar"), onChain: z.object({transaction: z.object({method: z.string(), tx: z.string()}), txId: z.string().optional(), ledger: z.number().optional(), expiration: z.number(), result: z.unknown(), explorerLink: z.string().optional()}), id: z.string(), status: z.enum(["awaiting-approval", "pending", "failed", "success"]), approvals: z.object({pending: z.array(z.union([z.object({signer: z.object({type: z.literal("quorum"), locator: z.string()}), quorumApprovals: z.object({threshold: z.number(), remaining: z.number(), pending: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})), submitted: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), signature: z.string(), submittedAt: z.union([z.number(), z.string()])}))})}), z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})])), submitted: z.array(z.union([z.object({signer: z.object({type: z.literal("quorum"), locator: z.string()}), quorumApprovals: z.object({threshold: z.number(), remaining: z.number(), pending: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})), submitted: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), signature: z.string(), submittedAt: z.union([z.number(), z.string()])}))})}), z.object({signature: z.string(), submittedAt: z.union([z.number(), z.string()]), signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), metadata: z.object({deviceInfo: z.string().optional(), ipAddress: z.string().optional(), userAgent: z.string().optional()}).optional()})])), required: z.number().optional()}).optional(), createdAt: z.union([z.number(), z.string()]), completedAt: z.union([z.number(), z.string()]).optional(), error: z.union([z.object({reason: z.union([z.literal("build_failed"), z.literal("failed_to_land_on_chain"), z.literal("unknown"), z.literal("sanctioned_wallet_address")]), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional()}), z.object({reason: z.literal("program_error"), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional(), logs: z.unknown()}), z.object({reason: z.literal("execution_reverted"), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional(), revert: z.object({type: z.union([z.literal("contract_call"), z.literal("wallet_authorization"), z.literal("wallet_deployment")]), reason: z.string(), reasonData: z.union([z.string(), z.record(z.string(), z.unknown())]).optional(), explorerLink: z.string().optional(), simulationLink: z.string().optional()}).optional()})]).optional(), sendParams: z.object({token: z.string(), params: z.object({amount: z.string().optional(), recipient: z.string(), recipientAddress: z.string()})}).optional(), fees: z.object({mode: z.enum(["user-native", "user-fungible", "project"]), estimate: z.unknown(), actual: z.unknown(), billed: z.object({usd: z.number()}).optional(), billing: z.object({status: z.enum(["pending", "settled", "failed"])}).optional()}).optional(), walletType: z.literal("smart")}).optional()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string(), address: z.union([z.string(), z.string()]), scopes: z.array(z.object({type: z.literal("transfer"), tokenLocator: z.string(), recipients: z.array(z.string()).optional(), spendingLimit: z.object({amount: z.string(), interval: z.number().int().gte(1).lte(9007199254740991).optional()}).optional()})).optional(), expiresAt: z.union([z.number(), z.string()]).optional(), transaction: z.object({chainType: z.literal("stellar"), onChain: z.object({transaction: z.object({method: z.string(), tx: z.string()}), txId: z.string().optional(), ledger: z.number().optional(), expiration: z.number(), result: z.unknown(), explorerLink: z.string().optional()}), id: z.string(), status: z.enum(["awaiting-approval", "pending", "failed", "success"]), approvals: z.object({pending: z.array(z.union([z.object({signer: z.object({type: z.literal("quorum"), locator: z.string()}), quorumApprovals: z.object({threshold: z.number(), remaining: z.number(), pending: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})), submitted: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), signature: z.string(), submittedAt: z.union([z.number(), z.string()])}))})}), z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})])), submitted: z.array(z.union([z.object({signer: z.object({type: z.literal("quorum"), locator: z.string()}), quorumApprovals: z.object({threshold: z.number(), remaining: z.number(), pending: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})), submitted: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), signature: z.string(), submittedAt: z.union([z.number(), z.string()])}))})}), z.object({signature: z.string(), submittedAt: z.union([z.number(), z.string()]), signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), metadata: z.object({deviceInfo: z.string().optional(), ipAddress: z.string().optional(), userAgent: z.string().optional()}).optional()})])), required: z.number().optional()}).optional(), createdAt: z.union([z.number(), z.string()]), completedAt: z.union([z.number(), z.string()]).optional(), error: z.union([z.object({reason: z.union([z.literal("build_failed"), z.literal("failed_to_land_on_chain"), z.literal("unknown"), z.literal("sanctioned_wallet_address")]), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional()}), z.object({reason: z.literal("program_error"), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional(), logs: z.unknown()}), z.object({reason: z.literal("execution_reverted"), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional(), revert: z.object({type: z.union([z.literal("contract_call"), z.literal("wallet_authorization"), z.literal("wallet_deployment")]), reason: z.string(), reasonData: z.union([z.string(), z.record(z.string(), z.unknown())]).optional(), explorerLink: z.string().optional(), simulationLink: z.string().optional()}).optional()})]).optional(), sendParams: z.object({token: z.string(), params: z.object({amount: z.string().optional(), recipient: z.string(), recipientAddress: z.string()})}).optional(), fees: z.object({mode: z.enum(["user-native", "user-fungible", "project"]), estimate: z.unknown(), actual: z.unknown(), billed: z.object({usd: z.number()}).optional(), billing: z.object({status: z.enum(["pending", "settled", "failed"])}).optional()}).optional(), walletType: z.literal("smart")}).optional()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional(), scopes: z.array(z.object({type: z.literal("transfer"), tokenLocator: z.string(), recipients: z.array(z.string()).optional(), spendingLimit: z.object({amount: z.string(), interval: z.number().int().gte(1).lte(9007199254740991).optional()}).optional()})).optional(), expiresAt: z.union([z.number(), z.string()]).optional(), transaction: z.object({chainType: z.literal("stellar"), onChain: z.object({transaction: z.object({method: z.string(), tx: z.string()}), txId: z.string().optional(), ledger: z.number().optional(), expiration: z.number(), result: z.unknown(), explorerLink: z.string().optional()}), id: z.string(), status: z.enum(["awaiting-approval", "pending", "failed", "success"]), approvals: z.object({pending: z.array(z.union([z.object({signer: z.object({type: z.literal("quorum"), locator: z.string()}), quorumApprovals: z.object({threshold: z.number(), remaining: z.number(), pending: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})), submitted: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), signature: z.string(), submittedAt: z.union([z.number(), z.string()])}))})}), z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})])), submitted: z.array(z.union([z.object({signer: z.object({type: z.literal("quorum"), locator: z.string()}), quorumApprovals: z.object({threshold: z.number(), remaining: z.number(), pending: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string()})), submitted: z.array(z.object({signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), signature: z.string(), submittedAt: z.union([z.number(), z.string()])}))})}), z.object({signature: z.string(), submittedAt: z.union([z.number(), z.string()]), signer: z.union([z.object({type: z.literal("external-wallet"), address: z.string(), locator: z.string()}), z.object({type: z.literal("passkey"), id: z.string(), locator: z.string()}), z.object({type: z.literal("api-key"), address: z.string(), locator: z.string()}), z.object({type: z.literal("device"), publicKey: z.object({x: z.string(), y: z.string()}), locator: z.string(), name: z.string().optional()}), z.object({type: z.literal("email"), email: z.string(), locator: z.string()}), z.object({type: z.literal("phone"), phone: z.string(), locator: z.string()}), z.object({type: z.literal("server"), address: z.string(), locator: z.string()})]), message: z.string(), metadata: z.object({deviceInfo: z.string().optional(), ipAddress: z.string().optional(), userAgent: z.string().optional()}).optional()})])), required: z.number().optional()}).optional(), createdAt: z.union([z.number(), z.string()]), completedAt: z.union([z.number(), z.string()]).optional(), error: z.union([z.object({reason: z.union([z.literal("build_failed"), z.literal("failed_to_land_on_chain"), z.literal("unknown"), z.literal("sanctioned_wallet_address")]), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional()}), z.object({reason: z.literal("program_error"), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional(), logs: z.unknown()}), z.object({reason: z.literal("execution_reverted"), message: z.string(), revertData: z.record(z.string(), z.unknown()).optional(), revert: z.object({type: z.union([z.literal("contract_call"), z.literal("wallet_authorization"), z.literal("wallet_deployment")]), reason: z.string(), reasonData: z.union([z.string(), z.record(z.string(), z.unknown())]).optional(), explorerLink: z.string().optional(), simulationLink: z.string().optional()}).optional()})]).optional(), sendParams: z.object({token: z.string(), params: z.object({amount: z.string().optional(), recipient: z.string(), recipientAddress: z.string()})}).optional(), fees: z.object({mode: z.enum(["user-native", "user-fungible", "project"]), estimate: z.unknown(), actual: z.unknown(), billed: z.object({usd: z.number()}).optional(), billing: z.object({status: z.enum(["pending", "settled", "failed"])}).optional()}).optional(), walletType: z.literal("smart")}).optional()})])).optional(), plugins: z.array(z.string()).optional()}).optional(), address: z.string(), owner: z.string().optional(), createdAt: z.union([z.number(), z.string()]).optional(), alias: z.string().optional()})]); export const validateResponse = async ( schema: { readonly '~standard': { readonly validate: (value: unknown) => ({ readonly value: Output; readonly issues?: undefined } | { readonly issues: ReadonlyArray<{ readonly message: string; readonly path?: ReadonlyArray | undefined }> }) | Promise<{ readonly value: Output; readonly issues?: undefined } | { readonly issues: ReadonlyArray<{ readonly message: string; readonly path?: ReadonlyArray | undefined }> }> } }, value: unknown ): Promise => { const result = await schema['~standard'].validate(value) if (result.issues !== undefined) { const detail = result.issues .map(({ message, path }) => path?.length ? `${path.map((segment) => String(typeof segment === 'object' ? segment.key : segment)).join('.')}: ${message}` : message ) .join('; ') throw new Error(`Response does not match the schema: ${detail}`, { cause: { issues: result.issues } }) } return result.value }; /** * Create Wallet * * POST /2025-06-09/wallets */ export const createApi20250609Wallets = async (args: CreateApi20250609WalletsArgs, options?: CreateApi20250609WalletsOptions) => { const {baseUrl = "https://staging.crossmint.com/api", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "application/json") if (args['X-API-KEY'] != null) headers.set("X-API-KEY", String(args['X-API-KEY'])) if (args['x-idempotency-key'] != null) headers.set("x-idempotency-key", String(args['x-idempotency-key'])) const url = `${baseUrl.replace(/\/+$/, '')}/2025-06-09/wallets${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return validateResponse(walletV2025ResponseDTOClass, await res.json()) };