import {z} from 'zod' export type GetApi20250609WalletsWalletLocatorTransactionsTransactionIdArgs = {'X-API-KEY': string, walletLocator: string, transactionId: string}; export type GetApi20250609WalletsWalletLocatorTransactionsTransactionIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; export const walletsTransactionV2025ResponseDTOClass = z.union([z.object({chainType: z.enum(["evm", "solana", "aptos", "sui", "stellar"]), walletType: z.enum(["smart", "mpc"]), params: z.object({calls: z.array(z.union([z.object({address: z.string(), functionName: z.string(), abi: z.array(z.unknown()), args: z.array(z.unknown()), value: z.string().optional()}), z.object({to: z.string(), value: z.string(), data: z.unknown()}), z.object({transaction: z.unknown()})])), chain: z.unknown(), 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()})]).optional()}), onChain: z.object({userOperation: z.object({sender: z.string(), nonce: z.string(), callData: z.string(), callGasLimit: z.string(), verificationGasLimit: z.string(), preVerificationGas: z.string(), maxFeePerGas: z.string(), maxPriorityFeePerGas: z.string(), paymaster: z.string().optional(), paymasterVerificationGasLimit: z.string().optional(), paymasterData: z.string().optional(), paymasterPostOpGasLimit: z.string().optional(), signature: z.string(), factory: z.string().optional(), factoryData: z.string().optional()}), userOperationHash: z.string(), 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()}), z.object({chainType: z.enum(["evm", "solana", "aptos", "sui", "stellar"]), walletType: z.enum(["smart", "mpc"]), params: z.object({call: z.union([z.object({to: z.string(), data: z.unknown()}), z.object({address: z.string(), functionName: z.string(), abi: z.array(z.unknown()), args: z.array(z.unknown())})]), chain: z.enum(["arbitrum-sepolia", "arc-testnet", "avalanche-fuji", "curtis", "base-goerli", "base-sepolia", "bsc-testnet", "chiliz-spicy-testnet", "coti-testnet", "ethereum-goerli", "ethereum-sepolia", "hedera-testnet", "hypersonic-testnet", "lightlink-pegasus", "mantle-sepolia", "optimism-goerli", "optimism-sepolia", "polygon-amoy", "polygon-mumbai", "crossmint-private-testnet-ethereum", "crossmint-private-testnet-polygon", "rari-testnet", "scroll-sepolia", "sei-atlantic-2-testnet", "shape-sepolia", "skale-nebula-testnet", "soneium-minato-testnet", "space-testnet", "story-testnet", "verify-testnet", "viction-testnet", "xai-sepolia-testnet", "zkatana", "zkyoto", "zora-goerli", "zora-sepolia", "mode-sepolia", "u2u-nebulas", "zenchain-testnet", "abstract-testnet", "world-chain-sepolia", "plume-testnet", "flow-testnet", "tempo-testnet", "robinhood-chain-testnet", "ethereum", "polygon", "bsc", "optimism", "arbitrum", "base", "zora", "arbitrumnova", "astar-zkevm", "apechain", "hedera", "coti", "lightlink", "mantle", "skale-nebula", "sei-pacific-1", "chiliz", "avalanche", "xai", "shape", "rari", "scroll", "viction", "mode", "space", "soneium", "story", "u2u-solaris", "abstract", "world-chain", "plume", "flow", "tempo", "robinhood-chain"])}), onChain: z.object({call: z.object({to: z.string(), data: z.unknown()}), txId: 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()}), z.object({chainType: z.enum(["evm", "solana", "aptos", "sui", "stellar"]), walletType: z.enum(["smart", "mpc"]), params: z.object({transaction: z.string(), requiredSigners: z.array(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()})])).optional(), signer: z.union([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()})]), z.object({type: z.literal("quorum"), locator: z.string()})]).optional(), feeConfig: z.union([z.object({feePayer: z.string(), token: z.enum(["sol", "usdc", "usdt"]), amount: z.string()}), z.object({feePayer: z.literal("crossmint"), amount: z.string()})])}), 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()}), z.object({chainType: z.enum(["evm", "solana", "aptos", "sui", "stellar"]), walletType: z.enum(["smart", "mpc"]), params: z.object({transaction: z.string(), requiredSigners: z.array(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()})])).optional()}), 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()}), z.object({chainType: z.enum(["evm", "solana", "aptos", "sui", "stellar"]), walletType: z.enum(["smart", "mpc"]), params: z.object({transaction: z.union([z.object({type: z.literal("contract-call"), contractId: z.string(), method: z.string(), memo: z.union([z.object({type: z.literal("text"), value: z.string().max(28)}), z.object({type: z.literal("id"), value: z.string()}), z.object({type: z.literal("hash"), value: z.string()})]).optional(), args: z.record(z.string(), z.unknown())}), z.object({type: z.literal("upgrade-wallet")}), z.object({type: z.literal("migrate-wallet")})]), signer: z.string().optional()}), 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()})]); 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 }; /** * Get Transaction * * GET /2025-06-09/wallets/{walletLocator}/transactions/{transactionId} */ export const getApi20250609WalletsWalletLocatorTransactionsTransactionId = async (args: GetApi20250609WalletsWalletLocatorTransactionsTransactionIdArgs, options?: GetApi20250609WalletsWalletLocatorTransactionsTransactionIdOptions) => { const {baseUrl = "https://staging.crossmint.com/api", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "application/json") if (args['X-API-KEY'] != null) headers.set("X-API-KEY", String(args['X-API-KEY'])) const url = `${baseUrl.replace(/\/+$/, '')}/2025-06-09/wallets/${encodeURIComponent(String(args.walletLocator))}/transactions/${encodeURIComponent(String(args.transactionId))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return validateResponse(walletsTransactionV2025ResponseDTOClass, await res.json()) };