diff --git a/.changeset/silent-countries-run.md b/.changeset/silent-countries-run.md new file mode 100644 index 000000000..674780a38 --- /dev/null +++ b/.changeset/silent-countries-run.md @@ -0,0 +1,6 @@ +--- +"@crossmint/client-sdk-react-ui": patch +"@crossmint/client-sdk-base": patch +--- + +embed: add Order type diff --git a/packages/client/base/src/index.ts b/packages/client/base/src/index.ts index 15382f847..041ddffaf 100644 --- a/packages/client/base/src/index.ts +++ b/packages/client/base/src/index.ts @@ -1,3 +1,5 @@ +export * from "./lib"; + export * from "./utils"; export * from "./types"; export * from "./services"; diff --git a/packages/client/base/src/lib/hosted-checkout/Order.ts b/packages/client/base/src/lib/hosted-checkout/Order.ts new file mode 100644 index 000000000..8436b58f4 --- /dev/null +++ b/packages/client/base/src/lib/hosted-checkout/Order.ts @@ -0,0 +1,4493 @@ +import type z from "zod"; + +// Keep in sync with @crossmint/products-payments-headless-checkout/dist/schemas/order/Order.d.ts +declare const orderSchema: z.ZodObject< + { + orderId: z.ZodString; + phase: z.ZodEnum<["quote", "payment", "delivery", "completed"]>; + locale: z.ZodNativeEnum<{ + readonly EN_US: "en-US"; + readonly ES_ES: "es-ES"; + readonly FR_FR: "fr-FR"; + readonly IT_IT: "it-IT"; + readonly KO_KR: "ko-KR"; + readonly PT_PT: "pt-PT"; + readonly JA_JP: "ja-JP"; + readonly ZH_CN: "zh-CN"; + readonly ZH_TW: "zh-TW"; + readonly DE_DE: "de-DE"; + readonly RU_RU: "ru-RU"; + readonly TR_TR: "tr-TR"; + readonly UK_UA: "uk-UA"; + readonly TH_TH: "th-TH"; + readonly VI_VN: "vi-VN"; + readonly KLINGON: "Klingon"; + }>; + lineItems: z.ZodArray< + z.ZodObject< + { + chain: z.ZodNativeEnum<{ + readonly ETHEREUM: "ethereum"; + readonly POLYGON: "polygon"; + readonly BSC: "bsc"; + readonly OPTIMISM: "optimism"; + readonly ARBITRUM: "arbitrum"; + readonly BASE: "base"; + readonly ZORA: "zora"; + readonly ARBITRUM_NOVA: "arbitrumnova"; + readonly ASTAR_ZKEVM: "astar-zkevm"; + readonly APEX: "apex"; + readonly BOSS: "boss"; + readonly LIGHTLINK: "lightlink"; + readonly SKALE_NEBULA: "skale-nebula"; + readonly SEI_PACIFIC_1: "sei-pacific-1"; + readonly CHILIZ: "chiliz"; + readonly AVALANCHE: "avalanche"; + readonly XAI: "xai"; + readonly SHAPE: "shape"; + readonly ARBITRUM_SEPOLIA: "arbitrum-sepolia"; + readonly BASE_SEPOLIA: "base-sepolia"; + readonly BSC_TESTNET: "bsc-testnet"; + readonly ETHEREUM_SEPOLIA: "ethereum-sepolia"; + readonly POLYGON_AMOY: "polygon-amoy"; + readonly OPTIMISM_SEPOLIA: "optimism-sepolia"; + readonly ZORA_SEPOLIA: "zora-sepolia"; + readonly HYPERSONIC_TESTNET: "hypersonic-testnet"; + readonly ZKATANA: "zkatana"; + readonly ZKYOTO: "zkyoto"; + readonly LIGHTLINK_PEGASUS: "lightlink-pegasus"; + readonly PRIVATE_TESTNET_POLYGON: "crossmint-private-testnet-polygon"; + readonly PRIVATE_TESTNET_ETHEREUM: "crossmint-private-testnet-ethereum"; + readonly ZORA_GOERLI: "zora-goerli"; + readonly BASE_GOERLI: "base-goerli"; + readonly OPTIMISM_GOERLI: "optimism-goerli"; + readonly ETHEREUM_GOERLI: "ethereum-goerli"; + readonly POLYGON_MUMBAI: "polygon-mumbai"; + readonly SKALE_NEBULA_TESTNET: "skale-nebula-testnet"; + readonly BARRET_TESTNET: "barret-testnet"; + readonly SEI_ATLANTIC_2_TESTNET: "sei-atlantic-2-testnet"; + readonly CHILIZ_SPICY_TESTNET: "chiliz-spicy-testnet"; + readonly AVALANCHE_FUJI: "avalanche-fuji"; + readonly VERIFY_TESTNET: "verify-testnet"; + readonly XAI_SEPOLIA_TESTNET: "xai-sepolia-testnet"; + readonly SONEIUM_MINATO_TESTNET: "soneium-minato-testnet"; + readonly SPACE_TESTNET: "space-testnet"; + readonly SHAPE_SEPOLIA: "shape-sepolia"; + readonly SOLANA: "solana"; + readonly CARDANO: "cardano"; + readonly SUI: "sui"; + readonly APTOS: "aptos"; + }>; + quantity: z.ZodNumber; + callData: z.ZodOptional>; + metadata: z.ZodObject< + { + name: z.ZodString; + description: z.ZodString; + imageUrl: z.ZodString; + collection: z.ZodOptional< + z.ZodObject< + { + name: z.ZodString; + description: z.ZodString; + imageUrl: z.ZodString; + }, + "strip", + z.ZodTypeAny, + { + name: string; + description: string; + imageUrl: string; + }, + { + name: string; + description: string; + imageUrl: string; + } + > + >; + }, + "strip", + z.ZodTypeAny, + { + name: string; + description: string; + imageUrl: string; + collection?: + | { + name: string; + description: string; + imageUrl: string; + } + | undefined; + }, + { + name: string; + description: string; + imageUrl: string; + collection?: + | { + name: string; + description: string; + imageUrl: string; + } + | undefined; + } + >; + quote: z.ZodObject< + { + status: z.ZodEnum<["item-unavailable", "valid", "expired", "requires-recipient"]>; + unavailabilityReason: z.ZodOptional< + z.ZodObject< + { + code: z.ZodEnum<["to", "do"]>; + message: z.ZodString; + }, + "strip", + z.ZodTypeAny, + { + code: "to" | "do"; + message: string; + }, + { + code: "to" | "do"; + message: string; + } + > + >; + charges: z.ZodOptional< + z.ZodObject< + { + unit: z.ZodObject< + { + amount: z.ZodString; + currency: z.ZodUnion< + [ + z.ZodNativeEnum<{ + readonly ETH: "eth"; + readonly SOL: "sol"; + readonly MATIC: "matic"; + readonly USDC: "usdc"; + readonly DEGEN: "degen"; + readonly BRETT: "brett"; + readonly TOSHI: "toshi"; + readonly BONK: "bonk"; + readonly WIF: "wif"; + readonly MOTHER: "mother"; + readonly EURC: "eurc"; + }>, + z.ZodNativeEnum<{ + readonly USD: "usd"; + readonly EUR: "eur"; + readonly AUD: "aud"; + readonly GBP: "gbp"; + readonly JPY: "jpy"; + readonly SGD: "sgd"; + readonly HKD: "hkd"; + readonly KRW: "krw"; + readonly INR: "inr"; + readonly VND: "vnd"; + }>, + ] + >; + }, + "strip", + z.ZodTypeAny, + { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + }, + { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + >; + gas: z.ZodOptional< + z.ZodObject< + { + amount: z.ZodString; + currency: z.ZodUnion< + [ + z.ZodNativeEnum<{ + readonly ETH: "eth"; + readonly SOL: "sol"; + readonly MATIC: "matic"; + readonly USDC: "usdc"; + readonly DEGEN: "degen"; + readonly BRETT: "brett"; + readonly TOSHI: "toshi"; + readonly BONK: "bonk"; + readonly WIF: "wif"; + readonly MOTHER: "mother"; + readonly EURC: "eurc"; + }>, + z.ZodNativeEnum<{ + readonly USD: "usd"; + readonly EUR: "eur"; + readonly AUD: "aud"; + readonly GBP: "gbp"; + readonly JPY: "jpy"; + readonly SGD: "sgd"; + readonly HKD: "hkd"; + readonly KRW: "krw"; + readonly INR: "inr"; + readonly VND: "vnd"; + }>, + ] + >; + }, + "strip", + z.ZodTypeAny, + { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + }, + { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + > + >; + }, + "strip", + z.ZodTypeAny, + { + unit: { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + }; + gas?: + | { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + | undefined; + }, + { + unit: { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + }; + gas?: + | { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + | undefined; + } + > + >; + totalPrice: z.ZodOptional< + z.ZodObject< + { + amount: z.ZodString; + currency: z.ZodUnion< + [ + z.ZodNativeEnum<{ + readonly ETH: "eth"; + readonly SOL: "sol"; + readonly MATIC: "matic"; + readonly USDC: "usdc"; + readonly DEGEN: "degen"; + readonly BRETT: "brett"; + readonly TOSHI: "toshi"; + readonly BONK: "bonk"; + readonly WIF: "wif"; + readonly MOTHER: "mother"; + readonly EURC: "eurc"; + }>, + z.ZodNativeEnum<{ + readonly USD: "usd"; + readonly EUR: "eur"; + readonly AUD: "aud"; + readonly GBP: "gbp"; + readonly JPY: "jpy"; + readonly SGD: "sgd"; + readonly HKD: "hkd"; + readonly KRW: "krw"; + readonly INR: "inr"; + readonly VND: "vnd"; + }>, + ] + >; + }, + "strip", + z.ZodTypeAny, + { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + }, + { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + > + >; + }, + "strip", + z.ZodTypeAny, + { + status: "valid" | "item-unavailable" | "expired" | "requires-recipient"; + unavailabilityReason?: + | { + code: "to" | "do"; + message: string; + } + | undefined; + charges?: + | { + unit: { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + }; + gas?: + | { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + | undefined; + } + | undefined; + totalPrice?: + | { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + | undefined; + }, + { + status: "valid" | "item-unavailable" | "expired" | "requires-recipient"; + unavailabilityReason?: + | { + code: "to" | "do"; + message: string; + } + | undefined; + charges?: + | { + unit: { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + }; + gas?: + | { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + | undefined; + } + | undefined; + totalPrice?: + | { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + | undefined; + } + >; + delivery: z.ZodUnion< + [ + z.ZodObject< + { + status: z.ZodEnum<["awaiting-payment", "in-progress", "failed"]>; + recipient: z.ZodOptional< + z.ZodUnion< + [ + z.ZodObject< + { + walletAddress: z.ZodString; + locator: z.ZodString; + }, + "strip", + z.ZodTypeAny, + { + walletAddress: string; + locator: string; + }, + { + walletAddress: string; + locator: string; + } + >, + z.ZodObject< + { + walletAddress: z.ZodString; + locator: z.ZodString; + email: z.ZodString; + }, + "strip", + z.ZodTypeAny, + { + email: string; + walletAddress: string; + locator: string; + }, + { + email: string; + walletAddress: string; + locator: string; + } + >, + ] + > + >; + }, + "strip", + z.ZodTypeAny, + { + status: "awaiting-payment" | "in-progress" | "failed"; + recipient?: + | { + walletAddress: string; + locator: string; + } + | { + email: string; + walletAddress: string; + locator: string; + } + | undefined; + }, + { + status: "awaiting-payment" | "in-progress" | "failed"; + recipient?: + | { + walletAddress: string; + locator: string; + } + | { + email: string; + walletAddress: string; + locator: string; + } + | undefined; + } + >, + z.ZodObject< + { + status: z.ZodLiteral<"completed">; + recipient: z.ZodOptional< + z.ZodUnion< + [ + z.ZodObject< + { + walletAddress: z.ZodString; + locator: z.ZodString; + }, + "strip", + z.ZodTypeAny, + { + walletAddress: string; + locator: string; + }, + { + walletAddress: string; + locator: string; + } + >, + z.ZodObject< + { + walletAddress: z.ZodString; + locator: z.ZodString; + email: z.ZodString; + }, + "strip", + z.ZodTypeAny, + { + email: string; + walletAddress: string; + locator: string; + }, + { + email: string; + walletAddress: string; + locator: string; + } + >, + ] + > + >; + txId: z.ZodString; + tokens: z.ZodArray< + z.ZodUnion< + [ + z.ZodObject< + { + contractAddress: z.ZodString; + tokenId: z.ZodString; + locator: z.ZodString; + }, + "strip", + z.ZodTypeAny, + { + locator: string; + contractAddress: string; + tokenId: string; + }, + { + locator: string; + contractAddress: string; + tokenId: string; + } + >, + z.ZodObject< + { + mintHash: z.ZodString; + locator: z.ZodString; + }, + "strip", + z.ZodTypeAny, + { + locator: string; + mintHash: string; + }, + { + locator: string; + mintHash: string; + } + >, + ] + >, + "many" + >; + }, + "strip", + z.ZodTypeAny, + { + status: "completed"; + txId: string; + tokens: ( + | { + locator: string; + contractAddress: string; + tokenId: string; + } + | { + locator: string; + mintHash: string; + } + )[]; + recipient?: + | { + walletAddress: string; + locator: string; + } + | { + email: string; + walletAddress: string; + locator: string; + } + | undefined; + }, + { + status: "completed"; + txId: string; + tokens: ( + | { + locator: string; + contractAddress: string; + tokenId: string; + } + | { + locator: string; + mintHash: string; + } + )[]; + recipient?: + | { + walletAddress: string; + locator: string; + } + | { + email: string; + walletAddress: string; + locator: string; + } + | undefined; + } + >, + ] + >; + }, + "strip", + z.ZodTypeAny, + { + chain: + | "ethereum" + | "polygon" + | "bsc" + | "optimism" + | "arbitrum" + | "base" + | "zora" + | "arbitrumnova" + | "astar-zkevm" + | "apex" + | "boss" + | "lightlink" + | "skale-nebula" + | "sei-pacific-1" + | "chiliz" + | "avalanche" + | "xai" + | "shape" + | "arbitrum-sepolia" + | "base-sepolia" + | "bsc-testnet" + | "ethereum-sepolia" + | "polygon-amoy" + | "optimism-sepolia" + | "zora-sepolia" + | "hypersonic-testnet" + | "zkatana" + | "zkyoto" + | "lightlink-pegasus" + | "crossmint-private-testnet-polygon" + | "crossmint-private-testnet-ethereum" + | "zora-goerli" + | "base-goerli" + | "optimism-goerli" + | "ethereum-goerli" + | "polygon-mumbai" + | "skale-nebula-testnet" + | "barret-testnet" + | "sei-atlantic-2-testnet" + | "chiliz-spicy-testnet" + | "avalanche-fuji" + | "verify-testnet" + | "xai-sepolia-testnet" + | "soneium-minato-testnet" + | "space-testnet" + | "shape-sepolia" + | "solana" + | "cardano" + | "sui" + | "aptos"; + quantity: number; + metadata: { + name: string; + description: string; + imageUrl: string; + collection?: + | { + name: string; + description: string; + imageUrl: string; + } + | undefined; + }; + quote: { + status: "valid" | "item-unavailable" | "expired" | "requires-recipient"; + unavailabilityReason?: + | { + code: "to" | "do"; + message: string; + } + | undefined; + charges?: + | { + unit: { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + }; + gas?: + | { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + | undefined; + } + | undefined; + totalPrice?: + | { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + | undefined; + }; + delivery: + | { + status: "completed"; + txId: string; + tokens: ( + | { + locator: string; + contractAddress: string; + tokenId: string; + } + | { + locator: string; + mintHash: string; + } + )[]; + recipient?: + | { + walletAddress: string; + locator: string; + } + | { + email: string; + walletAddress: string; + locator: string; + } + | undefined; + } + | { + status: "awaiting-payment" | "in-progress" | "failed"; + recipient?: + | { + walletAddress: string; + locator: string; + } + | { + email: string; + walletAddress: string; + locator: string; + } + | undefined; + }; + callData?: Record | undefined; + }, + { + chain: + | "ethereum" + | "polygon" + | "bsc" + | "optimism" + | "arbitrum" + | "base" + | "zora" + | "arbitrumnova" + | "astar-zkevm" + | "apex" + | "boss" + | "lightlink" + | "skale-nebula" + | "sei-pacific-1" + | "chiliz" + | "avalanche" + | "xai" + | "shape" + | "arbitrum-sepolia" + | "base-sepolia" + | "bsc-testnet" + | "ethereum-sepolia" + | "polygon-amoy" + | "optimism-sepolia" + | "zora-sepolia" + | "hypersonic-testnet" + | "zkatana" + | "zkyoto" + | "lightlink-pegasus" + | "crossmint-private-testnet-polygon" + | "crossmint-private-testnet-ethereum" + | "zora-goerli" + | "base-goerli" + | "optimism-goerli" + | "ethereum-goerli" + | "polygon-mumbai" + | "skale-nebula-testnet" + | "barret-testnet" + | "sei-atlantic-2-testnet" + | "chiliz-spicy-testnet" + | "avalanche-fuji" + | "verify-testnet" + | "xai-sepolia-testnet" + | "soneium-minato-testnet" + | "space-testnet" + | "shape-sepolia" + | "solana" + | "cardano" + | "sui" + | "aptos"; + quantity: number; + metadata: { + name: string; + description: string; + imageUrl: string; + collection?: + | { + name: string; + description: string; + imageUrl: string; + } + | undefined; + }; + quote: { + status: "valid" | "item-unavailable" | "expired" | "requires-recipient"; + unavailabilityReason?: + | { + code: "to" | "do"; + message: string; + } + | undefined; + charges?: + | { + unit: { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + }; + gas?: + | { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + | undefined; + } + | undefined; + totalPrice?: + | { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + | undefined; + }; + delivery: + | { + status: "completed"; + txId: string; + tokens: ( + | { + locator: string; + contractAddress: string; + tokenId: string; + } + | { + locator: string; + mintHash: string; + } + )[]; + recipient?: + | { + walletAddress: string; + locator: string; + } + | { + email: string; + walletAddress: string; + locator: string; + } + | undefined; + } + | { + status: "awaiting-payment" | "in-progress" | "failed"; + recipient?: + | { + walletAddress: string; + locator: string; + } + | { + email: string; + walletAddress: string; + locator: string; + } + | undefined; + }; + callData?: Record | undefined; + } + >, + "many" + >; + quote: z.ZodObject< + { + status: z.ZodEnum<["requires-recipient", "all-line-items-unavailable", "valid", "expired"]>; + quotedAt: z.ZodOptional; + expiresAt: z.ZodOptional; + totalPrice: z.ZodOptional< + z.ZodObject< + { + amount: z.ZodString; + currency: z.ZodUnion< + [ + z.ZodNativeEnum<{ + readonly ETH: "eth"; + readonly SOL: "sol"; + readonly MATIC: "matic"; + readonly USDC: "usdc"; + readonly DEGEN: "degen"; + readonly BRETT: "brett"; + readonly TOSHI: "toshi"; + readonly BONK: "bonk"; + readonly WIF: "wif"; + readonly MOTHER: "mother"; + readonly EURC: "eurc"; + }>, + z.ZodNativeEnum<{ + readonly USD: "usd"; + readonly EUR: "eur"; + readonly AUD: "aud"; + readonly GBP: "gbp"; + readonly JPY: "jpy"; + readonly SGD: "sgd"; + readonly HKD: "hkd"; + readonly KRW: "krw"; + readonly INR: "inr"; + readonly VND: "vnd"; + }>, + ] + >; + }, + "strip", + z.ZodTypeAny, + { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + }, + { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + > + >; + }, + "strip", + z.ZodTypeAny, + { + status: "valid" | "expired" | "requires-recipient" | "all-line-items-unavailable"; + quotedAt?: string | undefined; + expiresAt?: string | undefined; + totalPrice?: + | { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + | undefined; + }, + { + status: "valid" | "expired" | "requires-recipient" | "all-line-items-unavailable"; + quotedAt?: string | undefined; + expiresAt?: string | undefined; + totalPrice?: + | { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + | undefined; + } + >; + payment: z.ZodObject< + { + status: z.ZodEnum< + [ + "requires-quote", + "requires-crypto-payer-address", + "requires-email", + "crypto-payer-insufficient-funds", + "awaiting-payment", + "in-progress", + "completed", + ] + >; + failureReason: z.ZodOptional< + z.ZodUnion< + [ + z.ZodObject< + { + code: z.ZodString; + message: z.ZodOptional; + }, + "strip", + z.ZodTypeAny, + { + code: string; + message?: string | undefined; + }, + { + code: string; + message?: string | undefined; + } + >, + z.ZodObject< + { + code: z.ZodNativeEnum<{ + readonly UNKNOWN: "unknown"; + readonly TX_ID_NOT_FOUND: "tx-id-not-found"; + readonly INSUFFICIENT_FUNDS: "insufficient-funds"; + }>; + message: z.ZodOptional; + }, + "strip", + z.ZodTypeAny, + { + code: "unknown" | "tx-id-not-found" | "insufficient-funds"; + message?: string | undefined; + }, + { + code: "unknown" | "tx-id-not-found" | "insufficient-funds"; + message?: string | undefined; + } + >, + ] + > + >; + method: z.ZodNativeEnum<{ + readonly ETHEREUM: "ethereum"; + readonly POLYGON: "polygon"; + readonly BSC: "bsc"; + readonly OPTIMISM: "optimism"; + readonly ARBITRUM: "arbitrum"; + readonly BASE: "base"; + readonly ZORA: "zora"; + readonly ARBITRUM_NOVA: "arbitrumnova"; + readonly ASTAR_ZKEVM: "astar-zkevm"; + readonly APEX: "apex"; + readonly BOSS: "boss"; + readonly LIGHTLINK: "lightlink"; + readonly SKALE_NEBULA: "skale-nebula"; + readonly SEI_PACIFIC_1: "sei-pacific-1"; + readonly CHILIZ: "chiliz"; + readonly AVALANCHE: "avalanche"; + readonly XAI: "xai"; + readonly SHAPE: "shape"; + readonly ARBITRUM_SEPOLIA: "arbitrum-sepolia"; + readonly BASE_SEPOLIA: "base-sepolia"; + readonly BSC_TESTNET: "bsc-testnet"; + readonly ETHEREUM_SEPOLIA: "ethereum-sepolia"; + readonly POLYGON_AMOY: "polygon-amoy"; + readonly OPTIMISM_SEPOLIA: "optimism-sepolia"; + readonly ZORA_SEPOLIA: "zora-sepolia"; + readonly HYPERSONIC_TESTNET: "hypersonic-testnet"; + readonly ZKATANA: "zkatana"; + readonly ZKYOTO: "zkyoto"; + readonly LIGHTLINK_PEGASUS: "lightlink-pegasus"; + readonly PRIVATE_TESTNET_POLYGON: "crossmint-private-testnet-polygon"; + readonly PRIVATE_TESTNET_ETHEREUM: "crossmint-private-testnet-ethereum"; + readonly ZORA_GOERLI: "zora-goerli"; + readonly BASE_GOERLI: "base-goerli"; + readonly OPTIMISM_GOERLI: "optimism-goerli"; + readonly ETHEREUM_GOERLI: "ethereum-goerli"; + readonly POLYGON_MUMBAI: "polygon-mumbai"; + readonly SKALE_NEBULA_TESTNET: "skale-nebula-testnet"; + readonly BARRET_TESTNET: "barret-testnet"; + readonly SEI_ATLANTIC_2_TESTNET: "sei-atlantic-2-testnet"; + readonly CHILIZ_SPICY_TESTNET: "chiliz-spicy-testnet"; + readonly AVALANCHE_FUJI: "avalanche-fuji"; + readonly VERIFY_TESTNET: "verify-testnet"; + readonly XAI_SEPOLIA_TESTNET: "xai-sepolia-testnet"; + readonly SONEIUM_MINATO_TESTNET: "soneium-minato-testnet"; + readonly SPACE_TESTNET: "space-testnet"; + readonly SHAPE_SEPOLIA: "shape-sepolia"; + readonly SOLANA: "solana"; + readonly "stripe-payment-element": "stripe-payment-element"; + }>; + currency: z.ZodUnion< + [ + z.ZodNativeEnum<{ + readonly ETH: "eth"; + readonly SOL: "sol"; + readonly MATIC: "matic"; + readonly USDC: "usdc"; + readonly DEGEN: "degen"; + readonly BRETT: "brett"; + readonly TOSHI: "toshi"; + readonly BONK: "bonk"; + readonly WIF: "wif"; + readonly MOTHER: "mother"; + readonly EURC: "eurc"; + }>, + z.ZodNativeEnum<{ + readonly USD: "usd"; + readonly EUR: "eur"; + readonly AUD: "aud"; + readonly GBP: "gbp"; + readonly JPY: "jpy"; + readonly SGD: "sgd"; + readonly HKD: "hkd"; + readonly KRW: "krw"; + readonly INR: "inr"; + readonly VND: "vnd"; + }>, + ] + >; + preparation: z.ZodOptional< + z.ZodUnion< + [ + z.ZodObject< + { + chain: z.ZodOptional< + z.ZodNativeEnum<{ + readonly ETHEREUM: "ethereum"; + readonly POLYGON: "polygon"; + readonly BSC: "bsc"; + readonly OPTIMISM: "optimism"; + readonly ARBITRUM: "arbitrum"; + readonly BASE: "base"; + readonly ZORA: "zora"; + readonly ARBITRUM_NOVA: "arbitrumnova"; + readonly ASTAR_ZKEVM: "astar-zkevm"; + readonly APEX: "apex"; + readonly BOSS: "boss"; + readonly LIGHTLINK: "lightlink"; + readonly SKALE_NEBULA: "skale-nebula"; + readonly SEI_PACIFIC_1: "sei-pacific-1"; + readonly CHILIZ: "chiliz"; + readonly AVALANCHE: "avalanche"; + readonly XAI: "xai"; + readonly SHAPE: "shape"; + readonly ARBITRUM_SEPOLIA: "arbitrum-sepolia"; + readonly BASE_SEPOLIA: "base-sepolia"; + readonly BSC_TESTNET: "bsc-testnet"; + readonly ETHEREUM_SEPOLIA: "ethereum-sepolia"; + readonly POLYGON_AMOY: "polygon-amoy"; + readonly OPTIMISM_SEPOLIA: "optimism-sepolia"; + readonly ZORA_SEPOLIA: "zora-sepolia"; + readonly HYPERSONIC_TESTNET: "hypersonic-testnet"; + readonly ZKATANA: "zkatana"; + readonly ZKYOTO: "zkyoto"; + readonly LIGHTLINK_PEGASUS: "lightlink-pegasus"; + readonly PRIVATE_TESTNET_POLYGON: "crossmint-private-testnet-polygon"; + readonly PRIVATE_TESTNET_ETHEREUM: "crossmint-private-testnet-ethereum"; + readonly ZORA_GOERLI: "zora-goerli"; + readonly BASE_GOERLI: "base-goerli"; + readonly OPTIMISM_GOERLI: "optimism-goerli"; + readonly ETHEREUM_GOERLI: "ethereum-goerli"; + readonly POLYGON_MUMBAI: "polygon-mumbai"; + readonly SKALE_NEBULA_TESTNET: "skale-nebula-testnet"; + readonly BARRET_TESTNET: "barret-testnet"; + readonly SEI_ATLANTIC_2_TESTNET: "sei-atlantic-2-testnet"; + readonly CHILIZ_SPICY_TESTNET: "chiliz-spicy-testnet"; + readonly AVALANCHE_FUJI: "avalanche-fuji"; + readonly VERIFY_TESTNET: "verify-testnet"; + readonly XAI_SEPOLIA_TESTNET: "xai-sepolia-testnet"; + readonly SONEIUM_MINATO_TESTNET: "soneium-minato-testnet"; + readonly SPACE_TESTNET: "space-testnet"; + readonly SHAPE_SEPOLIA: "shape-sepolia"; + readonly SOLANA: "solana"; + readonly CARDANO: "cardano"; + readonly SUI: "sui"; + readonly APTOS: "aptos"; + }> + >; + payerAddress: z.ZodOptional; + serializedTransaction: z.ZodOptional; + }, + "strip", + z.ZodTypeAny, + { + chain?: + | "ethereum" + | "polygon" + | "bsc" + | "optimism" + | "arbitrum" + | "base" + | "zora" + | "arbitrumnova" + | "astar-zkevm" + | "apex" + | "boss" + | "lightlink" + | "skale-nebula" + | "sei-pacific-1" + | "chiliz" + | "avalanche" + | "xai" + | "shape" + | "arbitrum-sepolia" + | "base-sepolia" + | "bsc-testnet" + | "ethereum-sepolia" + | "polygon-amoy" + | "optimism-sepolia" + | "zora-sepolia" + | "hypersonic-testnet" + | "zkatana" + | "zkyoto" + | "lightlink-pegasus" + | "crossmint-private-testnet-polygon" + | "crossmint-private-testnet-ethereum" + | "zora-goerli" + | "base-goerli" + | "optimism-goerli" + | "ethereum-goerli" + | "polygon-mumbai" + | "skale-nebula-testnet" + | "barret-testnet" + | "sei-atlantic-2-testnet" + | "chiliz-spicy-testnet" + | "avalanche-fuji" + | "verify-testnet" + | "xai-sepolia-testnet" + | "soneium-minato-testnet" + | "space-testnet" + | "shape-sepolia" + | "solana" + | "cardano" + | "sui" + | "aptos" + | undefined; + payerAddress?: string | undefined; + serializedTransaction?: string | undefined; + }, + { + chain?: + | "ethereum" + | "polygon" + | "bsc" + | "optimism" + | "arbitrum" + | "base" + | "zora" + | "arbitrumnova" + | "astar-zkevm" + | "apex" + | "boss" + | "lightlink" + | "skale-nebula" + | "sei-pacific-1" + | "chiliz" + | "avalanche" + | "xai" + | "shape" + | "arbitrum-sepolia" + | "base-sepolia" + | "bsc-testnet" + | "ethereum-sepolia" + | "polygon-amoy" + | "optimism-sepolia" + | "zora-sepolia" + | "hypersonic-testnet" + | "zkatana" + | "zkyoto" + | "lightlink-pegasus" + | "crossmint-private-testnet-polygon" + | "crossmint-private-testnet-ethereum" + | "zora-goerli" + | "base-goerli" + | "optimism-goerli" + | "ethereum-goerli" + | "polygon-mumbai" + | "skale-nebula-testnet" + | "barret-testnet" + | "sei-atlantic-2-testnet" + | "chiliz-spicy-testnet" + | "avalanche-fuji" + | "verify-testnet" + | "xai-sepolia-testnet" + | "soneium-minato-testnet" + | "space-testnet" + | "shape-sepolia" + | "solana" + | "cardano" + | "sui" + | "aptos" + | undefined; + payerAddress?: string | undefined; + serializedTransaction?: string | undefined; + } + >, + z.ZodObject< + { + stripeClientSecret: z.ZodOptional; + stripePublishableKey: z.ZodString; + stripeEphemeralKeySecret: z.ZodOptional; + stripeSubscriptionId: z.ZodOptional; + }, + "strip", + z.ZodTypeAny, + { + stripePublishableKey: string; + stripeClientSecret?: string | undefined; + stripeEphemeralKeySecret?: string | undefined; + stripeSubscriptionId?: string | undefined; + }, + { + stripePublishableKey: string; + stripeClientSecret?: string | undefined; + stripeEphemeralKeySecret?: string | undefined; + stripeSubscriptionId?: string | undefined; + } + >, + ] + > + >; + received: z.ZodOptional< + z.ZodUnion< + [ + z.ZodObject< + { + currency: z.ZodUnion< + [ + z.ZodNativeEnum<{ + readonly ETH: "eth"; + readonly SOL: "sol"; + readonly MATIC: "matic"; + readonly USDC: "usdc"; + readonly DEGEN: "degen"; + readonly BRETT: "brett"; + readonly TOSHI: "toshi"; + readonly BONK: "bonk"; + readonly WIF: "wif"; + readonly MOTHER: "mother"; + readonly EURC: "eurc"; + }>, + z.ZodNativeEnum<{ + readonly USD: "usd"; + readonly EUR: "eur"; + readonly AUD: "aud"; + readonly GBP: "gbp"; + readonly JPY: "jpy"; + readonly SGD: "sgd"; + readonly HKD: "hkd"; + readonly KRW: "krw"; + readonly INR: "inr"; + readonly VND: "vnd"; + }>, + ] + >; + amount: z.ZodString; + txId: z.ZodString; + chain: z.ZodNativeEnum<{ + readonly ETHEREUM: "ethereum"; + readonly POLYGON: "polygon"; + readonly BSC: "bsc"; + readonly OPTIMISM: "optimism"; + readonly ARBITRUM: "arbitrum"; + readonly BASE: "base"; + readonly ZORA: "zora"; + readonly ARBITRUM_NOVA: "arbitrumnova"; + readonly ASTAR_ZKEVM: "astar-zkevm"; + readonly APEX: "apex"; + readonly BOSS: "boss"; + readonly LIGHTLINK: "lightlink"; + readonly SKALE_NEBULA: "skale-nebula"; + readonly SEI_PACIFIC_1: "sei-pacific-1"; + readonly CHILIZ: "chiliz"; + readonly AVALANCHE: "avalanche"; + readonly XAI: "xai"; + readonly SHAPE: "shape"; + readonly ARBITRUM_SEPOLIA: "arbitrum-sepolia"; + readonly BASE_SEPOLIA: "base-sepolia"; + readonly BSC_TESTNET: "bsc-testnet"; + readonly ETHEREUM_SEPOLIA: "ethereum-sepolia"; + readonly POLYGON_AMOY: "polygon-amoy"; + readonly OPTIMISM_SEPOLIA: "optimism-sepolia"; + readonly ZORA_SEPOLIA: "zora-sepolia"; + readonly HYPERSONIC_TESTNET: "hypersonic-testnet"; + readonly ZKATANA: "zkatana"; + readonly ZKYOTO: "zkyoto"; + readonly LIGHTLINK_PEGASUS: "lightlink-pegasus"; + readonly PRIVATE_TESTNET_POLYGON: "crossmint-private-testnet-polygon"; + readonly PRIVATE_TESTNET_ETHEREUM: "crossmint-private-testnet-ethereum"; + readonly ZORA_GOERLI: "zora-goerli"; + readonly BASE_GOERLI: "base-goerli"; + readonly OPTIMISM_GOERLI: "optimism-goerli"; + readonly ETHEREUM_GOERLI: "ethereum-goerli"; + readonly POLYGON_MUMBAI: "polygon-mumbai"; + readonly SKALE_NEBULA_TESTNET: "skale-nebula-testnet"; + readonly BARRET_TESTNET: "barret-testnet"; + readonly SEI_ATLANTIC_2_TESTNET: "sei-atlantic-2-testnet"; + readonly CHILIZ_SPICY_TESTNET: "chiliz-spicy-testnet"; + readonly AVALANCHE_FUJI: "avalanche-fuji"; + readonly VERIFY_TESTNET: "verify-testnet"; + readonly XAI_SEPOLIA_TESTNET: "xai-sepolia-testnet"; + readonly SONEIUM_MINATO_TESTNET: "soneium-minato-testnet"; + readonly SPACE_TESTNET: "space-testnet"; + readonly SHAPE_SEPOLIA: "shape-sepolia"; + readonly SOLANA: "solana"; + readonly CARDANO: "cardano"; + readonly SUI: "sui"; + readonly APTOS: "aptos"; + }>; + }, + "strip", + z.ZodTypeAny, + { + chain: + | "ethereum" + | "polygon" + | "bsc" + | "optimism" + | "arbitrum" + | "base" + | "zora" + | "arbitrumnova" + | "astar-zkevm" + | "apex" + | "boss" + | "lightlink" + | "skale-nebula" + | "sei-pacific-1" + | "chiliz" + | "avalanche" + | "xai" + | "shape" + | "arbitrum-sepolia" + | "base-sepolia" + | "bsc-testnet" + | "ethereum-sepolia" + | "polygon-amoy" + | "optimism-sepolia" + | "zora-sepolia" + | "hypersonic-testnet" + | "zkatana" + | "zkyoto" + | "lightlink-pegasus" + | "crossmint-private-testnet-polygon" + | "crossmint-private-testnet-ethereum" + | "zora-goerli" + | "base-goerli" + | "optimism-goerli" + | "ethereum-goerli" + | "polygon-mumbai" + | "skale-nebula-testnet" + | "barret-testnet" + | "sei-atlantic-2-testnet" + | "chiliz-spicy-testnet" + | "avalanche-fuji" + | "verify-testnet" + | "xai-sepolia-testnet" + | "soneium-minato-testnet" + | "space-testnet" + | "shape-sepolia" + | "solana" + | "cardano" + | "sui" + | "aptos"; + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + txId: string; + }, + { + chain: + | "ethereum" + | "polygon" + | "bsc" + | "optimism" + | "arbitrum" + | "base" + | "zora" + | "arbitrumnova" + | "astar-zkevm" + | "apex" + | "boss" + | "lightlink" + | "skale-nebula" + | "sei-pacific-1" + | "chiliz" + | "avalanche" + | "xai" + | "shape" + | "arbitrum-sepolia" + | "base-sepolia" + | "bsc-testnet" + | "ethereum-sepolia" + | "polygon-amoy" + | "optimism-sepolia" + | "zora-sepolia" + | "hypersonic-testnet" + | "zkatana" + | "zkyoto" + | "lightlink-pegasus" + | "crossmint-private-testnet-polygon" + | "crossmint-private-testnet-ethereum" + | "zora-goerli" + | "base-goerli" + | "optimism-goerli" + | "ethereum-goerli" + | "polygon-mumbai" + | "skale-nebula-testnet" + | "barret-testnet" + | "sei-atlantic-2-testnet" + | "chiliz-spicy-testnet" + | "avalanche-fuji" + | "verify-testnet" + | "xai-sepolia-testnet" + | "soneium-minato-testnet" + | "space-testnet" + | "shape-sepolia" + | "solana" + | "cardano" + | "sui" + | "aptos"; + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + txId: string; + } + >, + z.ZodObject< + { + amount: z.ZodString; + currency: z.ZodUnion< + [ + z.ZodNativeEnum<{ + readonly ETH: "eth"; + readonly SOL: "sol"; + readonly MATIC: "matic"; + readonly USDC: "usdc"; + readonly DEGEN: "degen"; + readonly BRETT: "brett"; + readonly TOSHI: "toshi"; + readonly BONK: "bonk"; + readonly WIF: "wif"; + readonly MOTHER: "mother"; + readonly EURC: "eurc"; + }>, + z.ZodNativeEnum<{ + readonly USD: "usd"; + readonly EUR: "eur"; + readonly AUD: "aud"; + readonly GBP: "gbp"; + readonly JPY: "jpy"; + readonly SGD: "sgd"; + readonly HKD: "hkd"; + readonly KRW: "krw"; + readonly INR: "inr"; + readonly VND: "vnd"; + }>, + ] + >; + }, + "strip", + z.ZodTypeAny, + { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + }, + { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + >, + ] + > + >; + refunded: z.ZodOptional< + z.ZodUnion< + [ + z.ZodObject< + { + currency: z.ZodUnion< + [ + z.ZodNativeEnum<{ + readonly ETH: "eth"; + readonly SOL: "sol"; + readonly MATIC: "matic"; + readonly USDC: "usdc"; + readonly DEGEN: "degen"; + readonly BRETT: "brett"; + readonly TOSHI: "toshi"; + readonly BONK: "bonk"; + readonly WIF: "wif"; + readonly MOTHER: "mother"; + readonly EURC: "eurc"; + }>, + z.ZodNativeEnum<{ + readonly USD: "usd"; + readonly EUR: "eur"; + readonly AUD: "aud"; + readonly GBP: "gbp"; + readonly JPY: "jpy"; + readonly SGD: "sgd"; + readonly HKD: "hkd"; + readonly KRW: "krw"; + readonly INR: "inr"; + readonly VND: "vnd"; + }>, + ] + >; + amount: z.ZodString; + txId: z.ZodString; + chain: z.ZodNativeEnum<{ + readonly ETHEREUM: "ethereum"; + readonly POLYGON: "polygon"; + readonly BSC: "bsc"; + readonly OPTIMISM: "optimism"; + readonly ARBITRUM: "arbitrum"; + readonly BASE: "base"; + readonly ZORA: "zora"; + readonly ARBITRUM_NOVA: "arbitrumnova"; + readonly ASTAR_ZKEVM: "astar-zkevm"; + readonly APEX: "apex"; + readonly BOSS: "boss"; + readonly LIGHTLINK: "lightlink"; + readonly SKALE_NEBULA: "skale-nebula"; + readonly SEI_PACIFIC_1: "sei-pacific-1"; + readonly CHILIZ: "chiliz"; + readonly AVALANCHE: "avalanche"; + readonly XAI: "xai"; + readonly SHAPE: "shape"; + readonly ARBITRUM_SEPOLIA: "arbitrum-sepolia"; + readonly BASE_SEPOLIA: "base-sepolia"; + readonly BSC_TESTNET: "bsc-testnet"; + readonly ETHEREUM_SEPOLIA: "ethereum-sepolia"; + readonly POLYGON_AMOY: "polygon-amoy"; + readonly OPTIMISM_SEPOLIA: "optimism-sepolia"; + readonly ZORA_SEPOLIA: "zora-sepolia"; + readonly HYPERSONIC_TESTNET: "hypersonic-testnet"; + readonly ZKATANA: "zkatana"; + readonly ZKYOTO: "zkyoto"; + readonly LIGHTLINK_PEGASUS: "lightlink-pegasus"; + readonly PRIVATE_TESTNET_POLYGON: "crossmint-private-testnet-polygon"; + readonly PRIVATE_TESTNET_ETHEREUM: "crossmint-private-testnet-ethereum"; + readonly ZORA_GOERLI: "zora-goerli"; + readonly BASE_GOERLI: "base-goerli"; + readonly OPTIMISM_GOERLI: "optimism-goerli"; + readonly ETHEREUM_GOERLI: "ethereum-goerli"; + readonly POLYGON_MUMBAI: "polygon-mumbai"; + readonly SKALE_NEBULA_TESTNET: "skale-nebula-testnet"; + readonly BARRET_TESTNET: "barret-testnet"; + readonly SEI_ATLANTIC_2_TESTNET: "sei-atlantic-2-testnet"; + readonly CHILIZ_SPICY_TESTNET: "chiliz-spicy-testnet"; + readonly AVALANCHE_FUJI: "avalanche-fuji"; + readonly VERIFY_TESTNET: "verify-testnet"; + readonly XAI_SEPOLIA_TESTNET: "xai-sepolia-testnet"; + readonly SONEIUM_MINATO_TESTNET: "soneium-minato-testnet"; + readonly SPACE_TESTNET: "space-testnet"; + readonly SHAPE_SEPOLIA: "shape-sepolia"; + readonly SOLANA: "solana"; + readonly CARDANO: "cardano"; + readonly SUI: "sui"; + readonly APTOS: "aptos"; + }>; + }, + "strip", + z.ZodTypeAny, + { + chain: + | "ethereum" + | "polygon" + | "bsc" + | "optimism" + | "arbitrum" + | "base" + | "zora" + | "arbitrumnova" + | "astar-zkevm" + | "apex" + | "boss" + | "lightlink" + | "skale-nebula" + | "sei-pacific-1" + | "chiliz" + | "avalanche" + | "xai" + | "shape" + | "arbitrum-sepolia" + | "base-sepolia" + | "bsc-testnet" + | "ethereum-sepolia" + | "polygon-amoy" + | "optimism-sepolia" + | "zora-sepolia" + | "hypersonic-testnet" + | "zkatana" + | "zkyoto" + | "lightlink-pegasus" + | "crossmint-private-testnet-polygon" + | "crossmint-private-testnet-ethereum" + | "zora-goerli" + | "base-goerli" + | "optimism-goerli" + | "ethereum-goerli" + | "polygon-mumbai" + | "skale-nebula-testnet" + | "barret-testnet" + | "sei-atlantic-2-testnet" + | "chiliz-spicy-testnet" + | "avalanche-fuji" + | "verify-testnet" + | "xai-sepolia-testnet" + | "soneium-minato-testnet" + | "space-testnet" + | "shape-sepolia" + | "solana" + | "cardano" + | "sui" + | "aptos"; + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + txId: string; + }, + { + chain: + | "ethereum" + | "polygon" + | "bsc" + | "optimism" + | "arbitrum" + | "base" + | "zora" + | "arbitrumnova" + | "astar-zkevm" + | "apex" + | "boss" + | "lightlink" + | "skale-nebula" + | "sei-pacific-1" + | "chiliz" + | "avalanche" + | "xai" + | "shape" + | "arbitrum-sepolia" + | "base-sepolia" + | "bsc-testnet" + | "ethereum-sepolia" + | "polygon-amoy" + | "optimism-sepolia" + | "zora-sepolia" + | "hypersonic-testnet" + | "zkatana" + | "zkyoto" + | "lightlink-pegasus" + | "crossmint-private-testnet-polygon" + | "crossmint-private-testnet-ethereum" + | "zora-goerli" + | "base-goerli" + | "optimism-goerli" + | "ethereum-goerli" + | "polygon-mumbai" + | "skale-nebula-testnet" + | "barret-testnet" + | "sei-atlantic-2-testnet" + | "chiliz-spicy-testnet" + | "avalanche-fuji" + | "verify-testnet" + | "xai-sepolia-testnet" + | "soneium-minato-testnet" + | "space-testnet" + | "shape-sepolia" + | "solana" + | "cardano" + | "sui" + | "aptos"; + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + txId: string; + } + >, + z.ZodObject< + { + amount: z.ZodString; + currency: z.ZodUnion< + [ + z.ZodNativeEnum<{ + readonly ETH: "eth"; + readonly SOL: "sol"; + readonly MATIC: "matic"; + readonly USDC: "usdc"; + readonly DEGEN: "degen"; + readonly BRETT: "brett"; + readonly TOSHI: "toshi"; + readonly BONK: "bonk"; + readonly WIF: "wif"; + readonly MOTHER: "mother"; + readonly EURC: "eurc"; + }>, + z.ZodNativeEnum<{ + readonly USD: "usd"; + readonly EUR: "eur"; + readonly AUD: "aud"; + readonly GBP: "gbp"; + readonly JPY: "jpy"; + readonly SGD: "sgd"; + readonly HKD: "hkd"; + readonly KRW: "krw"; + readonly INR: "inr"; + readonly VND: "vnd"; + }>, + ] + >; + }, + "strip", + z.ZodTypeAny, + { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + }, + { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + >, + ] + > + >; + receiptEmail: z.ZodOptional; + }, + "strip", + z.ZodTypeAny, + { + status: + | "completed" + | "awaiting-payment" + | "in-progress" + | "requires-quote" + | "requires-crypto-payer-address" + | "requires-email" + | "crypto-payer-insufficient-funds"; + method: + | "ethereum" + | "polygon" + | "bsc" + | "optimism" + | "arbitrum" + | "base" + | "zora" + | "arbitrumnova" + | "astar-zkevm" + | "apex" + | "boss" + | "lightlink" + | "skale-nebula" + | "sei-pacific-1" + | "chiliz" + | "avalanche" + | "xai" + | "shape" + | "arbitrum-sepolia" + | "base-sepolia" + | "bsc-testnet" + | "ethereum-sepolia" + | "polygon-amoy" + | "optimism-sepolia" + | "zora-sepolia" + | "hypersonic-testnet" + | "zkatana" + | "zkyoto" + | "lightlink-pegasus" + | "crossmint-private-testnet-polygon" + | "crossmint-private-testnet-ethereum" + | "zora-goerli" + | "base-goerli" + | "optimism-goerli" + | "ethereum-goerli" + | "polygon-mumbai" + | "skale-nebula-testnet" + | "barret-testnet" + | "sei-atlantic-2-testnet" + | "chiliz-spicy-testnet" + | "avalanche-fuji" + | "verify-testnet" + | "xai-sepolia-testnet" + | "soneium-minato-testnet" + | "space-testnet" + | "shape-sepolia" + | "solana" + | "stripe-payment-element"; + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + failureReason?: + | { + code: string; + message?: string | undefined; + } + | { + code: "unknown" | "tx-id-not-found" | "insufficient-funds"; + message?: string | undefined; + } + | undefined; + preparation?: + | { + chain?: + | "ethereum" + | "polygon" + | "bsc" + | "optimism" + | "arbitrum" + | "base" + | "zora" + | "arbitrumnova" + | "astar-zkevm" + | "apex" + | "boss" + | "lightlink" + | "skale-nebula" + | "sei-pacific-1" + | "chiliz" + | "avalanche" + | "xai" + | "shape" + | "arbitrum-sepolia" + | "base-sepolia" + | "bsc-testnet" + | "ethereum-sepolia" + | "polygon-amoy" + | "optimism-sepolia" + | "zora-sepolia" + | "hypersonic-testnet" + | "zkatana" + | "zkyoto" + | "lightlink-pegasus" + | "crossmint-private-testnet-polygon" + | "crossmint-private-testnet-ethereum" + | "zora-goerli" + | "base-goerli" + | "optimism-goerli" + | "ethereum-goerli" + | "polygon-mumbai" + | "skale-nebula-testnet" + | "barret-testnet" + | "sei-atlantic-2-testnet" + | "chiliz-spicy-testnet" + | "avalanche-fuji" + | "verify-testnet" + | "xai-sepolia-testnet" + | "soneium-minato-testnet" + | "space-testnet" + | "shape-sepolia" + | "solana" + | "cardano" + | "sui" + | "aptos" + | undefined; + payerAddress?: string | undefined; + serializedTransaction?: string | undefined; + } + | { + stripePublishableKey: string; + stripeClientSecret?: string | undefined; + stripeEphemeralKeySecret?: string | undefined; + stripeSubscriptionId?: string | undefined; + } + | undefined; + received?: + | { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + | { + chain: + | "ethereum" + | "polygon" + | "bsc" + | "optimism" + | "arbitrum" + | "base" + | "zora" + | "arbitrumnova" + | "astar-zkevm" + | "apex" + | "boss" + | "lightlink" + | "skale-nebula" + | "sei-pacific-1" + | "chiliz" + | "avalanche" + | "xai" + | "shape" + | "arbitrum-sepolia" + | "base-sepolia" + | "bsc-testnet" + | "ethereum-sepolia" + | "polygon-amoy" + | "optimism-sepolia" + | "zora-sepolia" + | "hypersonic-testnet" + | "zkatana" + | "zkyoto" + | "lightlink-pegasus" + | "crossmint-private-testnet-polygon" + | "crossmint-private-testnet-ethereum" + | "zora-goerli" + | "base-goerli" + | "optimism-goerli" + | "ethereum-goerli" + | "polygon-mumbai" + | "skale-nebula-testnet" + | "barret-testnet" + | "sei-atlantic-2-testnet" + | "chiliz-spicy-testnet" + | "avalanche-fuji" + | "verify-testnet" + | "xai-sepolia-testnet" + | "soneium-minato-testnet" + | "space-testnet" + | "shape-sepolia" + | "solana" + | "cardano" + | "sui" + | "aptos"; + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + txId: string; + } + | undefined; + refunded?: + | { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + | { + chain: + | "ethereum" + | "polygon" + | "bsc" + | "optimism" + | "arbitrum" + | "base" + | "zora" + | "arbitrumnova" + | "astar-zkevm" + | "apex" + | "boss" + | "lightlink" + | "skale-nebula" + | "sei-pacific-1" + | "chiliz" + | "avalanche" + | "xai" + | "shape" + | "arbitrum-sepolia" + | "base-sepolia" + | "bsc-testnet" + | "ethereum-sepolia" + | "polygon-amoy" + | "optimism-sepolia" + | "zora-sepolia" + | "hypersonic-testnet" + | "zkatana" + | "zkyoto" + | "lightlink-pegasus" + | "crossmint-private-testnet-polygon" + | "crossmint-private-testnet-ethereum" + | "zora-goerli" + | "base-goerli" + | "optimism-goerli" + | "ethereum-goerli" + | "polygon-mumbai" + | "skale-nebula-testnet" + | "barret-testnet" + | "sei-atlantic-2-testnet" + | "chiliz-spicy-testnet" + | "avalanche-fuji" + | "verify-testnet" + | "xai-sepolia-testnet" + | "soneium-minato-testnet" + | "space-testnet" + | "shape-sepolia" + | "solana" + | "cardano" + | "sui" + | "aptos"; + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + txId: string; + } + | undefined; + receiptEmail?: string | undefined; + }, + { + status: + | "completed" + | "awaiting-payment" + | "in-progress" + | "requires-quote" + | "requires-crypto-payer-address" + | "requires-email" + | "crypto-payer-insufficient-funds"; + method: + | "ethereum" + | "polygon" + | "bsc" + | "optimism" + | "arbitrum" + | "base" + | "zora" + | "arbitrumnova" + | "astar-zkevm" + | "apex" + | "boss" + | "lightlink" + | "skale-nebula" + | "sei-pacific-1" + | "chiliz" + | "avalanche" + | "xai" + | "shape" + | "arbitrum-sepolia" + | "base-sepolia" + | "bsc-testnet" + | "ethereum-sepolia" + | "polygon-amoy" + | "optimism-sepolia" + | "zora-sepolia" + | "hypersonic-testnet" + | "zkatana" + | "zkyoto" + | "lightlink-pegasus" + | "crossmint-private-testnet-polygon" + | "crossmint-private-testnet-ethereum" + | "zora-goerli" + | "base-goerli" + | "optimism-goerli" + | "ethereum-goerli" + | "polygon-mumbai" + | "skale-nebula-testnet" + | "barret-testnet" + | "sei-atlantic-2-testnet" + | "chiliz-spicy-testnet" + | "avalanche-fuji" + | "verify-testnet" + | "xai-sepolia-testnet" + | "soneium-minato-testnet" + | "space-testnet" + | "shape-sepolia" + | "solana" + | "stripe-payment-element"; + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + failureReason?: + | { + code: string; + message?: string | undefined; + } + | { + code: "unknown" | "tx-id-not-found" | "insufficient-funds"; + message?: string | undefined; + } + | undefined; + preparation?: + | { + chain?: + | "ethereum" + | "polygon" + | "bsc" + | "optimism" + | "arbitrum" + | "base" + | "zora" + | "arbitrumnova" + | "astar-zkevm" + | "apex" + | "boss" + | "lightlink" + | "skale-nebula" + | "sei-pacific-1" + | "chiliz" + | "avalanche" + | "xai" + | "shape" + | "arbitrum-sepolia" + | "base-sepolia" + | "bsc-testnet" + | "ethereum-sepolia" + | "polygon-amoy" + | "optimism-sepolia" + | "zora-sepolia" + | "hypersonic-testnet" + | "zkatana" + | "zkyoto" + | "lightlink-pegasus" + | "crossmint-private-testnet-polygon" + | "crossmint-private-testnet-ethereum" + | "zora-goerli" + | "base-goerli" + | "optimism-goerli" + | "ethereum-goerli" + | "polygon-mumbai" + | "skale-nebula-testnet" + | "barret-testnet" + | "sei-atlantic-2-testnet" + | "chiliz-spicy-testnet" + | "avalanche-fuji" + | "verify-testnet" + | "xai-sepolia-testnet" + | "soneium-minato-testnet" + | "space-testnet" + | "shape-sepolia" + | "solana" + | "cardano" + | "sui" + | "aptos" + | undefined; + payerAddress?: string | undefined; + serializedTransaction?: string | undefined; + } + | { + stripePublishableKey: string; + stripeClientSecret?: string | undefined; + stripeEphemeralKeySecret?: string | undefined; + stripeSubscriptionId?: string | undefined; + } + | undefined; + received?: + | { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + | { + chain: + | "ethereum" + | "polygon" + | "bsc" + | "optimism" + | "arbitrum" + | "base" + | "zora" + | "arbitrumnova" + | "astar-zkevm" + | "apex" + | "boss" + | "lightlink" + | "skale-nebula" + | "sei-pacific-1" + | "chiliz" + | "avalanche" + | "xai" + | "shape" + | "arbitrum-sepolia" + | "base-sepolia" + | "bsc-testnet" + | "ethereum-sepolia" + | "polygon-amoy" + | "optimism-sepolia" + | "zora-sepolia" + | "hypersonic-testnet" + | "zkatana" + | "zkyoto" + | "lightlink-pegasus" + | "crossmint-private-testnet-polygon" + | "crossmint-private-testnet-ethereum" + | "zora-goerli" + | "base-goerli" + | "optimism-goerli" + | "ethereum-goerli" + | "polygon-mumbai" + | "skale-nebula-testnet" + | "barret-testnet" + | "sei-atlantic-2-testnet" + | "chiliz-spicy-testnet" + | "avalanche-fuji" + | "verify-testnet" + | "xai-sepolia-testnet" + | "soneium-minato-testnet" + | "space-testnet" + | "shape-sepolia" + | "solana" + | "cardano" + | "sui" + | "aptos"; + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + txId: string; + } + | undefined; + refunded?: + | { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + | { + chain: + | "ethereum" + | "polygon" + | "bsc" + | "optimism" + | "arbitrum" + | "base" + | "zora" + | "arbitrumnova" + | "astar-zkevm" + | "apex" + | "boss" + | "lightlink" + | "skale-nebula" + | "sei-pacific-1" + | "chiliz" + | "avalanche" + | "xai" + | "shape" + | "arbitrum-sepolia" + | "base-sepolia" + | "bsc-testnet" + | "ethereum-sepolia" + | "polygon-amoy" + | "optimism-sepolia" + | "zora-sepolia" + | "hypersonic-testnet" + | "zkatana" + | "zkyoto" + | "lightlink-pegasus" + | "crossmint-private-testnet-polygon" + | "crossmint-private-testnet-ethereum" + | "zora-goerli" + | "base-goerli" + | "optimism-goerli" + | "ethereum-goerli" + | "polygon-mumbai" + | "skale-nebula-testnet" + | "barret-testnet" + | "sei-atlantic-2-testnet" + | "chiliz-spicy-testnet" + | "avalanche-fuji" + | "verify-testnet" + | "xai-sepolia-testnet" + | "soneium-minato-testnet" + | "space-testnet" + | "shape-sepolia" + | "solana" + | "cardano" + | "sui" + | "aptos"; + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + txId: string; + } + | undefined; + receiptEmail?: string | undefined; + } + >; + }, + "strip", + z.ZodTypeAny, + { + quote: { + status: "valid" | "expired" | "requires-recipient" | "all-line-items-unavailable"; + quotedAt?: string | undefined; + expiresAt?: string | undefined; + totalPrice?: + | { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + | undefined; + }; + payment: { + status: + | "completed" + | "awaiting-payment" + | "in-progress" + | "requires-quote" + | "requires-crypto-payer-address" + | "requires-email" + | "crypto-payer-insufficient-funds"; + method: + | "ethereum" + | "polygon" + | "bsc" + | "optimism" + | "arbitrum" + | "base" + | "zora" + | "arbitrumnova" + | "astar-zkevm" + | "apex" + | "boss" + | "lightlink" + | "skale-nebula" + | "sei-pacific-1" + | "chiliz" + | "avalanche" + | "xai" + | "shape" + | "arbitrum-sepolia" + | "base-sepolia" + | "bsc-testnet" + | "ethereum-sepolia" + | "polygon-amoy" + | "optimism-sepolia" + | "zora-sepolia" + | "hypersonic-testnet" + | "zkatana" + | "zkyoto" + | "lightlink-pegasus" + | "crossmint-private-testnet-polygon" + | "crossmint-private-testnet-ethereum" + | "zora-goerli" + | "base-goerli" + | "optimism-goerli" + | "ethereum-goerli" + | "polygon-mumbai" + | "skale-nebula-testnet" + | "barret-testnet" + | "sei-atlantic-2-testnet" + | "chiliz-spicy-testnet" + | "avalanche-fuji" + | "verify-testnet" + | "xai-sepolia-testnet" + | "soneium-minato-testnet" + | "space-testnet" + | "shape-sepolia" + | "solana" + | "stripe-payment-element"; + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + failureReason?: + | { + code: string; + message?: string | undefined; + } + | { + code: "unknown" | "tx-id-not-found" | "insufficient-funds"; + message?: string | undefined; + } + | undefined; + preparation?: + | { + chain?: + | "ethereum" + | "polygon" + | "bsc" + | "optimism" + | "arbitrum" + | "base" + | "zora" + | "arbitrumnova" + | "astar-zkevm" + | "apex" + | "boss" + | "lightlink" + | "skale-nebula" + | "sei-pacific-1" + | "chiliz" + | "avalanche" + | "xai" + | "shape" + | "arbitrum-sepolia" + | "base-sepolia" + | "bsc-testnet" + | "ethereum-sepolia" + | "polygon-amoy" + | "optimism-sepolia" + | "zora-sepolia" + | "hypersonic-testnet" + | "zkatana" + | "zkyoto" + | "lightlink-pegasus" + | "crossmint-private-testnet-polygon" + | "crossmint-private-testnet-ethereum" + | "zora-goerli" + | "base-goerli" + | "optimism-goerli" + | "ethereum-goerli" + | "polygon-mumbai" + | "skale-nebula-testnet" + | "barret-testnet" + | "sei-atlantic-2-testnet" + | "chiliz-spicy-testnet" + | "avalanche-fuji" + | "verify-testnet" + | "xai-sepolia-testnet" + | "soneium-minato-testnet" + | "space-testnet" + | "shape-sepolia" + | "solana" + | "cardano" + | "sui" + | "aptos" + | undefined; + payerAddress?: string | undefined; + serializedTransaction?: string | undefined; + } + | { + stripePublishableKey: string; + stripeClientSecret?: string | undefined; + stripeEphemeralKeySecret?: string | undefined; + stripeSubscriptionId?: string | undefined; + } + | undefined; + received?: + | { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + | { + chain: + | "ethereum" + | "polygon" + | "bsc" + | "optimism" + | "arbitrum" + | "base" + | "zora" + | "arbitrumnova" + | "astar-zkevm" + | "apex" + | "boss" + | "lightlink" + | "skale-nebula" + | "sei-pacific-1" + | "chiliz" + | "avalanche" + | "xai" + | "shape" + | "arbitrum-sepolia" + | "base-sepolia" + | "bsc-testnet" + | "ethereum-sepolia" + | "polygon-amoy" + | "optimism-sepolia" + | "zora-sepolia" + | "hypersonic-testnet" + | "zkatana" + | "zkyoto" + | "lightlink-pegasus" + | "crossmint-private-testnet-polygon" + | "crossmint-private-testnet-ethereum" + | "zora-goerli" + | "base-goerli" + | "optimism-goerli" + | "ethereum-goerli" + | "polygon-mumbai" + | "skale-nebula-testnet" + | "barret-testnet" + | "sei-atlantic-2-testnet" + | "chiliz-spicy-testnet" + | "avalanche-fuji" + | "verify-testnet" + | "xai-sepolia-testnet" + | "soneium-minato-testnet" + | "space-testnet" + | "shape-sepolia" + | "solana" + | "cardano" + | "sui" + | "aptos"; + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + txId: string; + } + | undefined; + refunded?: + | { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + | { + chain: + | "ethereum" + | "polygon" + | "bsc" + | "optimism" + | "arbitrum" + | "base" + | "zora" + | "arbitrumnova" + | "astar-zkevm" + | "apex" + | "boss" + | "lightlink" + | "skale-nebula" + | "sei-pacific-1" + | "chiliz" + | "avalanche" + | "xai" + | "shape" + | "arbitrum-sepolia" + | "base-sepolia" + | "bsc-testnet" + | "ethereum-sepolia" + | "polygon-amoy" + | "optimism-sepolia" + | "zora-sepolia" + | "hypersonic-testnet" + | "zkatana" + | "zkyoto" + | "lightlink-pegasus" + | "crossmint-private-testnet-polygon" + | "crossmint-private-testnet-ethereum" + | "zora-goerli" + | "base-goerli" + | "optimism-goerli" + | "ethereum-goerli" + | "polygon-mumbai" + | "skale-nebula-testnet" + | "barret-testnet" + | "sei-atlantic-2-testnet" + | "chiliz-spicy-testnet" + | "avalanche-fuji" + | "verify-testnet" + | "xai-sepolia-testnet" + | "soneium-minato-testnet" + | "space-testnet" + | "shape-sepolia" + | "solana" + | "cardano" + | "sui" + | "aptos"; + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + txId: string; + } + | undefined; + receiptEmail?: string | undefined; + }; + orderId: string; + phase: "completed" | "quote" | "delivery" | "payment"; + locale: + | "en-US" + | "es-ES" + | "fr-FR" + | "it-IT" + | "ko-KR" + | "pt-PT" + | "ja-JP" + | "zh-CN" + | "zh-TW" + | "de-DE" + | "ru-RU" + | "tr-TR" + | "uk-UA" + | "th-TH" + | "vi-VN" + | "Klingon"; + lineItems: { + chain: + | "ethereum" + | "polygon" + | "bsc" + | "optimism" + | "arbitrum" + | "base" + | "zora" + | "arbitrumnova" + | "astar-zkevm" + | "apex" + | "boss" + | "lightlink" + | "skale-nebula" + | "sei-pacific-1" + | "chiliz" + | "avalanche" + | "xai" + | "shape" + | "arbitrum-sepolia" + | "base-sepolia" + | "bsc-testnet" + | "ethereum-sepolia" + | "polygon-amoy" + | "optimism-sepolia" + | "zora-sepolia" + | "hypersonic-testnet" + | "zkatana" + | "zkyoto" + | "lightlink-pegasus" + | "crossmint-private-testnet-polygon" + | "crossmint-private-testnet-ethereum" + | "zora-goerli" + | "base-goerli" + | "optimism-goerli" + | "ethereum-goerli" + | "polygon-mumbai" + | "skale-nebula-testnet" + | "barret-testnet" + | "sei-atlantic-2-testnet" + | "chiliz-spicy-testnet" + | "avalanche-fuji" + | "verify-testnet" + | "xai-sepolia-testnet" + | "soneium-minato-testnet" + | "space-testnet" + | "shape-sepolia" + | "solana" + | "cardano" + | "sui" + | "aptos"; + quantity: number; + metadata: { + name: string; + description: string; + imageUrl: string; + collection?: + | { + name: string; + description: string; + imageUrl: string; + } + | undefined; + }; + quote: { + status: "valid" | "item-unavailable" | "expired" | "requires-recipient"; + unavailabilityReason?: + | { + code: "to" | "do"; + message: string; + } + | undefined; + charges?: + | { + unit: { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + }; + gas?: + | { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + | undefined; + } + | undefined; + totalPrice?: + | { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + | undefined; + }; + delivery: + | { + status: "completed"; + txId: string; + tokens: ( + | { + locator: string; + contractAddress: string; + tokenId: string; + } + | { + locator: string; + mintHash: string; + } + )[]; + recipient?: + | { + walletAddress: string; + locator: string; + } + | { + email: string; + walletAddress: string; + locator: string; + } + | undefined; + } + | { + status: "awaiting-payment" | "in-progress" | "failed"; + recipient?: + | { + walletAddress: string; + locator: string; + } + | { + email: string; + walletAddress: string; + locator: string; + } + | undefined; + }; + callData?: Record | undefined; + }[]; + }, + { + quote: { + status: "valid" | "expired" | "requires-recipient" | "all-line-items-unavailable"; + quotedAt?: string | undefined; + expiresAt?: string | undefined; + totalPrice?: + | { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + | undefined; + }; + payment: { + status: + | "completed" + | "awaiting-payment" + | "in-progress" + | "requires-quote" + | "requires-crypto-payer-address" + | "requires-email" + | "crypto-payer-insufficient-funds"; + method: + | "ethereum" + | "polygon" + | "bsc" + | "optimism" + | "arbitrum" + | "base" + | "zora" + | "arbitrumnova" + | "astar-zkevm" + | "apex" + | "boss" + | "lightlink" + | "skale-nebula" + | "sei-pacific-1" + | "chiliz" + | "avalanche" + | "xai" + | "shape" + | "arbitrum-sepolia" + | "base-sepolia" + | "bsc-testnet" + | "ethereum-sepolia" + | "polygon-amoy" + | "optimism-sepolia" + | "zora-sepolia" + | "hypersonic-testnet" + | "zkatana" + | "zkyoto" + | "lightlink-pegasus" + | "crossmint-private-testnet-polygon" + | "crossmint-private-testnet-ethereum" + | "zora-goerli" + | "base-goerli" + | "optimism-goerli" + | "ethereum-goerli" + | "polygon-mumbai" + | "skale-nebula-testnet" + | "barret-testnet" + | "sei-atlantic-2-testnet" + | "chiliz-spicy-testnet" + | "avalanche-fuji" + | "verify-testnet" + | "xai-sepolia-testnet" + | "soneium-minato-testnet" + | "space-testnet" + | "shape-sepolia" + | "solana" + | "stripe-payment-element"; + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + failureReason?: + | { + code: string; + message?: string | undefined; + } + | { + code: "unknown" | "tx-id-not-found" | "insufficient-funds"; + message?: string | undefined; + } + | undefined; + preparation?: + | { + chain?: + | "ethereum" + | "polygon" + | "bsc" + | "optimism" + | "arbitrum" + | "base" + | "zora" + | "arbitrumnova" + | "astar-zkevm" + | "apex" + | "boss" + | "lightlink" + | "skale-nebula" + | "sei-pacific-1" + | "chiliz" + | "avalanche" + | "xai" + | "shape" + | "arbitrum-sepolia" + | "base-sepolia" + | "bsc-testnet" + | "ethereum-sepolia" + | "polygon-amoy" + | "optimism-sepolia" + | "zora-sepolia" + | "hypersonic-testnet" + | "zkatana" + | "zkyoto" + | "lightlink-pegasus" + | "crossmint-private-testnet-polygon" + | "crossmint-private-testnet-ethereum" + | "zora-goerli" + | "base-goerli" + | "optimism-goerli" + | "ethereum-goerli" + | "polygon-mumbai" + | "skale-nebula-testnet" + | "barret-testnet" + | "sei-atlantic-2-testnet" + | "chiliz-spicy-testnet" + | "avalanche-fuji" + | "verify-testnet" + | "xai-sepolia-testnet" + | "soneium-minato-testnet" + | "space-testnet" + | "shape-sepolia" + | "solana" + | "cardano" + | "sui" + | "aptos" + | undefined; + payerAddress?: string | undefined; + serializedTransaction?: string | undefined; + } + | { + stripePublishableKey: string; + stripeClientSecret?: string | undefined; + stripeEphemeralKeySecret?: string | undefined; + stripeSubscriptionId?: string | undefined; + } + | undefined; + received?: + | { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + | { + chain: + | "ethereum" + | "polygon" + | "bsc" + | "optimism" + | "arbitrum" + | "base" + | "zora" + | "arbitrumnova" + | "astar-zkevm" + | "apex" + | "boss" + | "lightlink" + | "skale-nebula" + | "sei-pacific-1" + | "chiliz" + | "avalanche" + | "xai" + | "shape" + | "arbitrum-sepolia" + | "base-sepolia" + | "bsc-testnet" + | "ethereum-sepolia" + | "polygon-amoy" + | "optimism-sepolia" + | "zora-sepolia" + | "hypersonic-testnet" + | "zkatana" + | "zkyoto" + | "lightlink-pegasus" + | "crossmint-private-testnet-polygon" + | "crossmint-private-testnet-ethereum" + | "zora-goerli" + | "base-goerli" + | "optimism-goerli" + | "ethereum-goerli" + | "polygon-mumbai" + | "skale-nebula-testnet" + | "barret-testnet" + | "sei-atlantic-2-testnet" + | "chiliz-spicy-testnet" + | "avalanche-fuji" + | "verify-testnet" + | "xai-sepolia-testnet" + | "soneium-minato-testnet" + | "space-testnet" + | "shape-sepolia" + | "solana" + | "cardano" + | "sui" + | "aptos"; + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + txId: string; + } + | undefined; + refunded?: + | { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + | { + chain: + | "ethereum" + | "polygon" + | "bsc" + | "optimism" + | "arbitrum" + | "base" + | "zora" + | "arbitrumnova" + | "astar-zkevm" + | "apex" + | "boss" + | "lightlink" + | "skale-nebula" + | "sei-pacific-1" + | "chiliz" + | "avalanche" + | "xai" + | "shape" + | "arbitrum-sepolia" + | "base-sepolia" + | "bsc-testnet" + | "ethereum-sepolia" + | "polygon-amoy" + | "optimism-sepolia" + | "zora-sepolia" + | "hypersonic-testnet" + | "zkatana" + | "zkyoto" + | "lightlink-pegasus" + | "crossmint-private-testnet-polygon" + | "crossmint-private-testnet-ethereum" + | "zora-goerli" + | "base-goerli" + | "optimism-goerli" + | "ethereum-goerli" + | "polygon-mumbai" + | "skale-nebula-testnet" + | "barret-testnet" + | "sei-atlantic-2-testnet" + | "chiliz-spicy-testnet" + | "avalanche-fuji" + | "verify-testnet" + | "xai-sepolia-testnet" + | "soneium-minato-testnet" + | "space-testnet" + | "shape-sepolia" + | "solana" + | "cardano" + | "sui" + | "aptos"; + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + txId: string; + } + | undefined; + receiptEmail?: string | undefined; + }; + orderId: string; + phase: "completed" | "quote" | "delivery" | "payment"; + locale: + | "en-US" + | "es-ES" + | "fr-FR" + | "it-IT" + | "ko-KR" + | "pt-PT" + | "ja-JP" + | "zh-CN" + | "zh-TW" + | "de-DE" + | "ru-RU" + | "tr-TR" + | "uk-UA" + | "th-TH" + | "vi-VN" + | "Klingon"; + lineItems: { + chain: + | "ethereum" + | "polygon" + | "bsc" + | "optimism" + | "arbitrum" + | "base" + | "zora" + | "arbitrumnova" + | "astar-zkevm" + | "apex" + | "boss" + | "lightlink" + | "skale-nebula" + | "sei-pacific-1" + | "chiliz" + | "avalanche" + | "xai" + | "shape" + | "arbitrum-sepolia" + | "base-sepolia" + | "bsc-testnet" + | "ethereum-sepolia" + | "polygon-amoy" + | "optimism-sepolia" + | "zora-sepolia" + | "hypersonic-testnet" + | "zkatana" + | "zkyoto" + | "lightlink-pegasus" + | "crossmint-private-testnet-polygon" + | "crossmint-private-testnet-ethereum" + | "zora-goerli" + | "base-goerli" + | "optimism-goerli" + | "ethereum-goerli" + | "polygon-mumbai" + | "skale-nebula-testnet" + | "barret-testnet" + | "sei-atlantic-2-testnet" + | "chiliz-spicy-testnet" + | "avalanche-fuji" + | "verify-testnet" + | "xai-sepolia-testnet" + | "soneium-minato-testnet" + | "space-testnet" + | "shape-sepolia" + | "solana" + | "cardano" + | "sui" + | "aptos"; + quantity: number; + metadata: { + name: string; + description: string; + imageUrl: string; + collection?: + | { + name: string; + description: string; + imageUrl: string; + } + | undefined; + }; + quote: { + status: "valid" | "item-unavailable" | "expired" | "requires-recipient"; + unavailabilityReason?: + | { + code: "to" | "do"; + message: string; + } + | undefined; + charges?: + | { + unit: { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + }; + gas?: + | { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + | undefined; + } + | undefined; + totalPrice?: + | { + currency: + | "usdc" + | "degen" + | "brett" + | "toshi" + | "eurc" + | "eth" + | "matic" + | "bonk" + | "wif" + | "mother" + | "sol" + | "usd" + | "eur" + | "aud" + | "gbp" + | "jpy" + | "sgd" + | "hkd" + | "krw" + | "inr" + | "vnd"; + amount: string; + } + | undefined; + }; + delivery: + | { + status: "completed"; + txId: string; + tokens: ( + | { + locator: string; + contractAddress: string; + tokenId: string; + } + | { + locator: string; + mintHash: string; + } + )[]; + recipient?: + | { + walletAddress: string; + locator: string; + } + | { + email: string; + walletAddress: string; + locator: string; + } + | undefined; + } + | { + status: "awaiting-payment" | "in-progress" | "failed"; + recipient?: + | { + walletAddress: string; + locator: string; + } + | { + email: string; + walletAddress: string; + locator: string; + } + | undefined; + }; + callData?: Record | undefined; + }[]; + } +>; +type Order = z.infer; + +export { type Order, orderSchema }; diff --git a/packages/client/base/src/lib/hosted-checkout/index.ts b/packages/client/base/src/lib/hosted-checkout/index.ts new file mode 100644 index 000000000..77442b309 --- /dev/null +++ b/packages/client/base/src/lib/hosted-checkout/index.ts @@ -0,0 +1 @@ +export * from "./Order"; diff --git a/packages/client/base/src/lib/index.ts b/packages/client/base/src/lib/index.ts new file mode 100644 index 000000000..ff04ace07 --- /dev/null +++ b/packages/client/base/src/lib/index.ts @@ -0,0 +1 @@ +export * from "./hosted-checkout"; diff --git a/packages/client/ui/react-ui/package.json b/packages/client/ui/react-ui/package.json index 9e54c90cd..0dad10493 100644 --- a/packages/client/ui/react-ui/package.json +++ b/packages/client/ui/react-ui/package.json @@ -15,8 +15,8 @@ "types": "./dist/index.d.ts", "files": ["dist", "src", "LICENSE"], "scripts": { - "build": "NODE_OPTIONS='--max-old-space-size=8192' tsup", - "dev": "NODE_OPTIONS='--max-old-space-size=8192' tsup --watch", + "build": "cross-env NODE_OPTIONS='--max-old-space-size=8192' tsup", + "dev": "cross-env NODE_OPTIONS='--max-old-space-size=8192' tsup --watch", "test": "vitest run" }, "dependencies": { diff --git a/packages/client/ui/react-ui/src/hooks/useCrossmintCheckout.tsx b/packages/client/ui/react-ui/src/hooks/useCrossmintCheckout.tsx index 432fd7235..334f5d92a 100644 --- a/packages/client/ui/react-ui/src/hooks/useCrossmintCheckout.tsx +++ b/packages/client/ui/react-ui/src/hooks/useCrossmintCheckout.tsx @@ -1,19 +1,19 @@ import { createContext, type ReactNode, useContext, useEffect, useState } from "react"; -import type { embeddedCheckoutV3IncomingEvents } from "@crossmint/client-sdk-base"; +import type { embeddedCheckoutV3IncomingEvents, Order } from "@crossmint/client-sdk-base"; import type { z } from "zod"; import { useCrossmint } from "./useCrossmint"; import { createCrossmintApiClient } from "@/utils/createCrossmintApiClient"; export interface CrossmintCheckoutContext { - order?: any; + order?: Order; orderClientSecret?: string; } const CrossmintCheckoutContext = createContext(undefined); export function CrossmintCheckoutProvider({ children }: { children: ReactNode }) { - const [order, setOrder] = useState(); - const [orderClientSecret, setOrderClientSecret] = useState(); + const [order, setOrder] = useState(undefined); + const [orderClientSecret, setOrderClientSecret] = useState(undefined); const { crossmint } = useCrossmint(); const apiClient = createCrossmintApiClient(crossmint);