@zkp2p/cash 0.1.9 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { I as IntentStatus, C as CashPayoutInfo, a as IntentEntity, b as CashBuyerProfile, c as CashDepositInput, d as CreateDepositParamsArg, e as CashOrder, f as CashFill, g as CashCapabilities, h as CashoutResult, i as CashEstimate, j as CashFillStats, P as PrepareResult, k as CashPreparedStep, R as RelayExecutionResult, l as RelayQuote, m as RelayStatus, n as CashSourceCapabilities, T as TopUpResult, W as WithdrawResult } from './createCashClient-BhOytyHE.js';
2
- export { o as CASH_ATTRIBUTION_CODE, p as CashAsset, q as CashChain, r as CashClient, s as CashClientOptions, t as CashFillEta, u as CashLeg, v as CashNextAction, w as CashOrderState, x as CashPairFillStats, y as CashPayout, z as CashPayoutPricing, A as CashPlatformCapability, B as CashPreparedStepKind, D as CashoutInput, E as CashoutOptions, F as CuratorPayeeDataInput, G as EstimateInput, H as EstimateOptions, M as MIN_CASHOUT_AMOUNT, O as OrdersOptions, J as RECOMMENDED_MIN_CASHOUT_AMOUNT, K as RelayOptions, L as RelayQuoteInput, N as RelaySourceInput, Q as RelayTransaction, S as SignerOptions, U as WatchOptions, V as WithdrawOptions, X as buildCapabilities, Y as createCashClient } from './createCashClient-BhOytyHE.js';
1
+ import { I as IntentStatus, C as CashPayoutInfo, a as IntentEntity, b as CashBuyerProfile, c as CashDepositInput, d as CreateDepositParamsArg, e as CashOrder, f as CashFill, g as CashCapabilities, h as CashoutResult, i as CashEstimate, j as CashFillStats, P as PrepareResult, k as CashPreparedStep, R as RelayExecutionResult, l as RelayQuote, m as RelayStatus, n as CashSourceCapabilities, T as TopUpResult, W as WithdrawResult } from './createCashClient-Clg5Fa1H.js';
2
+ export { o as CASH_ATTRIBUTION_CODE, p as CashAsset, q as CashChain, r as CashClient, s as CashClientOptions, t as CashFillEta, u as CashLeg, v as CashMultiCurrencyLeg, w as CashNextAction, x as CashOrderState, y as CashPairFillStats, z as CashPayeeInput, A as CashPayout, B as CashPayoutPricing, D as CashPlatformCapability, E as CashPreparedStepKind, F as CashoutInput, G as CashoutOptions, H as CuratorPayeeDataInput, J as EstimateInput, K as EstimateOptions, M as MIN_CASHOUT_AMOUNT, O as OrdersOptions, L as PreparedCashoutReceipt, N as RECOMMENDED_MIN_CASHOUT_AMOUNT, Q as RelayOptions, S as RelayQuoteInput, U as RelaySourceInput, V as RelayTransaction, X as SignerOptions, Y as WatchOptions, Z as WithdrawOptions, _ as buildCapabilities, $ as createCashClient, a0 as normalizeCashPayee } from './createCashClient-Clg5Fa1H.js';
3
3
  import { PaymentMethodCatalog, CurrencyType, OracleAdapterOverrides, OnchainCurrency, Zkp2pClient, PreparedTransaction } from '@zkp2p/sdk';
4
4
  export { CurrencyType, PreparedTransaction, RuntimeEnv } from '@zkp2p/sdk';
5
5
  import { Log, Abi } from 'viem';
@@ -10,7 +10,7 @@ import '@relayprotocol/relay-sdk';
10
10
  * Typed errors - every failure carries a `code`, whether it is `retryable`,
11
11
  * and a `remediation` sentence so agents can self-drive recovery.
12
12
  */
13
- type CashErrorCode = 'ORACLE_UNSUPPORTED_CURRENCY' | 'ORACLE_READ_FAILED' | 'UNSUPPORTED_PLATFORM' | 'UNSUPPORTED_PLATFORM_CURRENCY' | 'AMOUNT_BELOW_MINIMUM' | 'INVALID_INTENT_AMOUNT_RANGE' | 'ACTIVE_INTENT_BLOCKS_WITHDRAWAL' | 'NOTHING_TO_WITHDRAW' | 'INSUFFICIENT_AVAILABLE_FUNDS' | 'INSUFFICIENT_TOKEN_BALANCE' | 'ORDER_NOT_ACTIVE' | 'INVALID_DEPOSIT_ID' | 'ESCROW_PAUSED' | 'INDEXER_LAG' | 'INDEXER_UNAVAILABLE' | 'ORDER_NOT_FOUND' | 'PAYEE_REGISTRATION_FAILED' | 'PAYEE_VERIFICATION_REQUIRED' | 'SOURCE_ROUTE_UNSUPPORTED_IN_PREPARE' | 'SOURCE_RECIPIENT_MISMATCH' | 'SOURCE_CAPABILITIES_FAILED' | 'SOURCE_QUOTE_FAILED' | 'SOURCE_NONCE_MANAGER_REQUIRED' | 'SOURCE_EXECUTION_FAILED' | 'SOURCE_STATUS_FAILED' | 'SOURCE_ROUTE_COMPLETED_CASHOUT_FAILED' | 'SOURCE_CASHOUT_SUBMISSION_UNKNOWN' | 'SOURCE_CASHOUT_STATUS_UNKNOWN' | 'DEPOSIT_RESOLUTION_FAILED' | 'ALLOWANCE_NOT_VISIBLE' | 'SIGNER_REQUIRED' | 'SIGNER_CHAIN_MISMATCH' | 'SIGNER_CHAIN_UNAVAILABLE' | 'WATCH_TIMEOUT' | 'TRANSACTION_FAILED' | 'TRANSACTION_SUBMISSION_UNKNOWN' | 'TRANSACTION_STATUS_UNKNOWN';
13
+ type CashErrorCode = 'ORACLE_UNSUPPORTED_CURRENCY' | 'ORACLE_READ_FAILED' | 'UNSUPPORTED_PLATFORM' | 'UNSUPPORTED_PLATFORM_CURRENCY' | 'AMOUNT_BELOW_MINIMUM' | 'INVALID_INTENT_AMOUNT_RANGE' | 'INVALID_PAYOUT_CURRENCIES' | 'ACTIVE_INTENT_BLOCKS_WITHDRAWAL' | 'NOTHING_TO_WITHDRAW' | 'INSUFFICIENT_AVAILABLE_FUNDS' | 'INSUFFICIENT_TOKEN_BALANCE' | 'ORDER_NOT_ACTIVE' | 'INVALID_DEPOSIT_ID' | 'ESCROW_PAUSED' | 'INDEXER_LAG' | 'INDEXER_UNAVAILABLE' | 'ORDER_NOT_FOUND' | 'PAYEE_REGISTRATION_FAILED' | 'PAYEE_VERIFICATION_REQUIRED' | 'SOURCE_ROUTE_UNSUPPORTED_IN_PREPARE' | 'SOURCE_RECIPIENT_MISMATCH' | 'SOURCE_CAPABILITIES_FAILED' | 'SOURCE_QUOTE_FAILED' | 'SOURCE_NONCE_MANAGER_REQUIRED' | 'SOURCE_EXECUTION_FAILED' | 'SOURCE_STATUS_FAILED' | 'SOURCE_ROUTE_COMPLETED_CASHOUT_FAILED' | 'SOURCE_CASHOUT_SUBMISSION_UNKNOWN' | 'SOURCE_CASHOUT_STATUS_UNKNOWN' | 'DEPOSIT_RESOLUTION_FAILED' | 'ALLOWANCE_NOT_VISIBLE' | 'SIGNER_REQUIRED' | 'SIGNER_CHAIN_MISMATCH' | 'SIGNER_CHAIN_UNAVAILABLE' | 'WATCH_TIMEOUT' | 'TRANSACTION_REJECTED' | 'TRANSACTION_FAILED' | 'TRANSACTION_SUBMISSION_UNKNOWN' | 'TRANSACTION_STATUS_UNKNOWN';
14
14
  interface CashErrorShape {
15
15
  code: CashErrorCode;
16
16
  message: string;
@@ -77,6 +77,7 @@ declare const errors: {
77
77
  unsupportedPlatformCurrency: (platform: string, currency: string) => CashError;
78
78
  amountBelowMinimum: (amount: bigint, min: bigint) => CashError;
79
79
  invalidIntentAmountRange: (amount: bigint, min: bigint, max: bigint) => CashError;
80
+ invalidPayoutCurrencies: (platform: string, reason: string) => CashError;
80
81
  activeIntentBlocksWithdrawal: (depositId: string) => CashError;
81
82
  insufficientAvailableFunds: (depositId: string, requested: bigint, available: bigint) => CashError;
82
83
  insufficientTokenBalance: (requiredAmount?: bigint) => CashError;
@@ -124,12 +125,15 @@ declare const errors: {
124
125
  signerChainUnavailable: (verb: string, expectedChainId: number, cause?: unknown) => CashError;
125
126
  watchTimeout: (depositId: string, timeoutMs: number) => CashError;
126
127
  transactionFailed: (txHash: string, cause?: unknown) => CashError;
128
+ transactionRejected: (verb: string, cause?: unknown) => CashError;
127
129
  transactionSubmissionUnknown: (operation: string, cause?: unknown, recovery?: CashErrorRecovery) => CashError;
128
130
  transactionStatusUnknown: (txHash: string, cause?: unknown, operation?: string) => CashError;
129
131
  escrowPaused: () => CashError;
130
132
  /** Generic fallback for an on-chain call that failed for an unrecognized reason. */
131
133
  chainCallFailed: (verb: string, cause?: unknown) => CashError;
132
134
  };
135
+ /** Detect EIP-1193 and viem wallet cancellations, including nested provider causes. */
136
+ declare function isUserRejectedError(value: unknown): boolean;
133
137
 
134
138
  /**
135
139
  * Convert a human USDC amount to base units (6 decimals).
@@ -219,7 +223,9 @@ interface MethodCurrencyLike {
219
223
  /**
220
224
  * Decode a deposit's payment methods + currency tuples into payout legs.
221
225
  * Pure - the environment arrives via the catalog. One leg per
222
- * (method, currency) pair; cash orders create exactly one in v1.
226
+ * (method, currency) pair; cash orders create exactly one in v1. If any
227
+ * method is absent from the active catalog, reject the whole set instead of
228
+ * partially reclassifying a mixed historical deposit.
223
229
  */
224
230
  declare function derivePayouts(paymentMethods: ReadonlyArray<PaymentMethodLike>, currencies: ReadonlyArray<MethodCurrencyLike>, catalog: PaymentMethodCatalog): CashPayoutInfo[];
225
231
 
@@ -323,10 +329,14 @@ interface ResolvedCashDeposit {
323
329
  onchainDepositId: bigint;
324
330
  escrowAddress: string;
325
331
  compositeId: string;
332
+ /** Base-unit amount emitted by the canonical DepositReceived event. */
333
+ amount?: bigint;
326
334
  }
327
335
  declare function resolveCashDepositId(params: {
328
- logs: Log[];
336
+ logs: readonly Log[];
329
337
  abi: Abi;
338
+ expectedEscrowAddress?: string;
339
+ expectedToken?: string;
330
340
  }): ResolvedCashDeposit | null;
331
341
  /** Split a composite deposit id (`escrow_onchainId`) back into its parts. */
332
342
  declare function parseCompositeDepositId(compositeId: string): {
@@ -725,7 +735,7 @@ declare const cashPayoutPricingJsonSchema: z.ZodObject<{
725
735
  oracleRate?: number | undefined;
726
736
  }>;
727
737
  declare const cashPayoutInfoJsonSchema: z.ZodObject<{
728
- platform: z.ZodOptional<z.ZodString>;
738
+ platform: z.ZodString;
729
739
  platformHash: z.ZodString;
730
740
  currency: z.ZodOptional<z.ZodString>;
731
741
  currencyHash: z.ZodOptional<z.ZodString>;
@@ -754,6 +764,7 @@ declare const cashPayoutInfoJsonSchema: z.ZodObject<{
754
764
  oracleRate?: number | undefined;
755
765
  }>;
756
766
  }, "strip", z.ZodTypeAny, {
767
+ platform: string;
757
768
  pricing: {
758
769
  marketRate: boolean;
759
770
  spreadBps?: number | undefined;
@@ -767,8 +778,8 @@ declare const cashPayoutInfoJsonSchema: z.ZodObject<{
767
778
  active: boolean;
768
779
  currency?: string | undefined;
769
780
  currencyHash?: string | undefined;
770
- platform?: string | undefined;
771
781
  }, {
782
+ platform: string;
772
783
  pricing: {
773
784
  marketRate: boolean;
774
785
  spreadBps?: number | undefined;
@@ -782,7 +793,6 @@ declare const cashPayoutInfoJsonSchema: z.ZodObject<{
782
793
  active: boolean;
783
794
  currency?: string | undefined;
784
795
  currencyHash?: string | undefined;
785
- platform?: string | undefined;
786
796
  }>;
787
797
  declare const cashBuyerProfileJsonSchema: z.ZodObject<{
788
798
  address: z.ZodString;
@@ -890,7 +900,7 @@ declare const cashOrderJsonSchema: z.ZodObject<{
890
900
  updatedAt: z.ZodOptional<z.ZodNumber>;
891
901
  intentCount: z.ZodOptional<z.ZodNumber>;
892
902
  payouts: z.ZodOptional<z.ZodArray<z.ZodObject<{
893
- platform: z.ZodOptional<z.ZodString>;
903
+ platform: z.ZodString;
894
904
  platformHash: z.ZodString;
895
905
  currency: z.ZodOptional<z.ZodString>;
896
906
  currencyHash: z.ZodOptional<z.ZodString>;
@@ -919,6 +929,7 @@ declare const cashOrderJsonSchema: z.ZodObject<{
919
929
  oracleRate?: number | undefined;
920
930
  }>;
921
931
  }, "strip", z.ZodTypeAny, {
932
+ platform: string;
922
933
  pricing: {
923
934
  marketRate: boolean;
924
935
  spreadBps?: number | undefined;
@@ -932,8 +943,8 @@ declare const cashOrderJsonSchema: z.ZodObject<{
932
943
  active: boolean;
933
944
  currency?: string | undefined;
934
945
  currencyHash?: string | undefined;
935
- platform?: string | undefined;
936
946
  }, {
947
+ platform: string;
937
948
  pricing: {
938
949
  marketRate: boolean;
939
950
  spreadBps?: number | undefined;
@@ -947,7 +958,6 @@ declare const cashOrderJsonSchema: z.ZodObject<{
947
958
  active: boolean;
948
959
  currency?: string | undefined;
949
960
  currencyHash?: string | undefined;
950
- platform?: string | undefined;
951
961
  }>, "many">>;
952
962
  successRateBps: z.ZodOptional<z.ZodNumber>;
953
963
  isInFlight: z.ZodBoolean;
@@ -986,6 +996,7 @@ declare const cashOrderJsonSchema: z.ZodObject<{
986
996
  updatedAt?: number | undefined;
987
997
  successRateBps?: number | undefined;
988
998
  payouts?: {
999
+ platform: string;
989
1000
  pricing: {
990
1001
  marketRate: boolean;
991
1002
  spreadBps?: number | undefined;
@@ -999,7 +1010,6 @@ declare const cashOrderJsonSchema: z.ZodObject<{
999
1010
  active: boolean;
1000
1011
  currency?: string | undefined;
1001
1012
  currencyHash?: string | undefined;
1002
- platform?: string | undefined;
1003
1013
  }[] | undefined;
1004
1014
  primaryIntentHash?: string | undefined;
1005
1015
  matchedAt?: number | undefined;
@@ -1040,6 +1050,7 @@ declare const cashOrderJsonSchema: z.ZodObject<{
1040
1050
  updatedAt?: number | undefined;
1041
1051
  successRateBps?: number | undefined;
1042
1052
  payouts?: {
1053
+ platform: string;
1043
1054
  pricing: {
1044
1055
  marketRate: boolean;
1045
1056
  spreadBps?: number | undefined;
@@ -1053,7 +1064,6 @@ declare const cashOrderJsonSchema: z.ZodObject<{
1053
1064
  active: boolean;
1054
1065
  currency?: string | undefined;
1055
1066
  currencyHash?: string | undefined;
1056
- platform?: string | undefined;
1057
1067
  }[] | undefined;
1058
1068
  primaryIntentHash?: string | undefined;
1059
1069
  matchedAt?: number | undefined;
@@ -1811,7 +1821,7 @@ declare const cashoutResultJsonSchema: z.ZodObject<{
1811
1821
  updatedAt: z.ZodOptional<z.ZodNumber>;
1812
1822
  intentCount: z.ZodOptional<z.ZodNumber>;
1813
1823
  payouts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1814
- platform: z.ZodOptional<z.ZodString>;
1824
+ platform: z.ZodString;
1815
1825
  platformHash: z.ZodString;
1816
1826
  currency: z.ZodOptional<z.ZodString>;
1817
1827
  currencyHash: z.ZodOptional<z.ZodString>;
@@ -1840,6 +1850,7 @@ declare const cashoutResultJsonSchema: z.ZodObject<{
1840
1850
  oracleRate?: number | undefined;
1841
1851
  }>;
1842
1852
  }, "strip", z.ZodTypeAny, {
1853
+ platform: string;
1843
1854
  pricing: {
1844
1855
  marketRate: boolean;
1845
1856
  spreadBps?: number | undefined;
@@ -1853,8 +1864,8 @@ declare const cashoutResultJsonSchema: z.ZodObject<{
1853
1864
  active: boolean;
1854
1865
  currency?: string | undefined;
1855
1866
  currencyHash?: string | undefined;
1856
- platform?: string | undefined;
1857
1867
  }, {
1868
+ platform: string;
1858
1869
  pricing: {
1859
1870
  marketRate: boolean;
1860
1871
  spreadBps?: number | undefined;
@@ -1868,7 +1879,6 @@ declare const cashoutResultJsonSchema: z.ZodObject<{
1868
1879
  active: boolean;
1869
1880
  currency?: string | undefined;
1870
1881
  currencyHash?: string | undefined;
1871
- platform?: string | undefined;
1872
1882
  }>, "many">>;
1873
1883
  successRateBps: z.ZodOptional<z.ZodNumber>;
1874
1884
  isInFlight: z.ZodBoolean;
@@ -1907,6 +1917,7 @@ declare const cashoutResultJsonSchema: z.ZodObject<{
1907
1917
  updatedAt?: number | undefined;
1908
1918
  successRateBps?: number | undefined;
1909
1919
  payouts?: {
1920
+ platform: string;
1910
1921
  pricing: {
1911
1922
  marketRate: boolean;
1912
1923
  spreadBps?: number | undefined;
@@ -1920,7 +1931,6 @@ declare const cashoutResultJsonSchema: z.ZodObject<{
1920
1931
  active: boolean;
1921
1932
  currency?: string | undefined;
1922
1933
  currencyHash?: string | undefined;
1923
- platform?: string | undefined;
1924
1934
  }[] | undefined;
1925
1935
  primaryIntentHash?: string | undefined;
1926
1936
  matchedAt?: number | undefined;
@@ -1961,6 +1971,7 @@ declare const cashoutResultJsonSchema: z.ZodObject<{
1961
1971
  updatedAt?: number | undefined;
1962
1972
  successRateBps?: number | undefined;
1963
1973
  payouts?: {
1974
+ platform: string;
1964
1975
  pricing: {
1965
1976
  marketRate: boolean;
1966
1977
  spreadBps?: number | undefined;
@@ -1974,7 +1985,6 @@ declare const cashoutResultJsonSchema: z.ZodObject<{
1974
1985
  active: boolean;
1975
1986
  currency?: string | undefined;
1976
1987
  currencyHash?: string | undefined;
1977
- platform?: string | undefined;
1978
1988
  }[] | undefined;
1979
1989
  primaryIntentHash?: string | undefined;
1980
1990
  matchedAt?: number | undefined;
@@ -2108,6 +2118,7 @@ declare const cashoutResultJsonSchema: z.ZodObject<{
2108
2118
  updatedAt?: number | undefined;
2109
2119
  successRateBps?: number | undefined;
2110
2120
  payouts?: {
2121
+ platform: string;
2111
2122
  pricing: {
2112
2123
  marketRate: boolean;
2113
2124
  spreadBps?: number | undefined;
@@ -2121,7 +2132,6 @@ declare const cashoutResultJsonSchema: z.ZodObject<{
2121
2132
  active: boolean;
2122
2133
  currency?: string | undefined;
2123
2134
  currencyHash?: string | undefined;
2124
- platform?: string | undefined;
2125
2135
  }[] | undefined;
2126
2136
  primaryIntentHash?: string | undefined;
2127
2137
  matchedAt?: number | undefined;
@@ -2185,6 +2195,7 @@ declare const cashoutResultJsonSchema: z.ZodObject<{
2185
2195
  updatedAt?: number | undefined;
2186
2196
  successRateBps?: number | undefined;
2187
2197
  payouts?: {
2198
+ platform: string;
2188
2199
  pricing: {
2189
2200
  marketRate: boolean;
2190
2201
  spreadBps?: number | undefined;
@@ -2198,7 +2209,6 @@ declare const cashoutResultJsonSchema: z.ZodObject<{
2198
2209
  active: boolean;
2199
2210
  currency?: string | undefined;
2200
2211
  currencyHash?: string | undefined;
2201
- platform?: string | undefined;
2202
2212
  }[] | undefined;
2203
2213
  primaryIntentHash?: string | undefined;
2204
2214
  matchedAt?: number | undefined;
@@ -2708,8 +2718,8 @@ declare const cashCapabilitiesJsonSchema: z.ZodObject<{
2708
2718
  decimals: number;
2709
2719
  };
2710
2720
  };
2711
- currencies: string[];
2712
2721
  environment: "production" | "preproduction" | "staging";
2722
+ currencies: string[];
2713
2723
  platforms: {
2714
2724
  platform: string;
2715
2725
  currencies: string[];
@@ -2779,8 +2789,8 @@ declare const cashCapabilitiesJsonSchema: z.ZodObject<{
2779
2789
  decimals: number;
2780
2790
  };
2781
2791
  };
2782
- currencies: string[];
2783
2792
  environment: "production" | "preproduction" | "staging";
2793
+ currencies: string[];
2784
2794
  platforms: {
2785
2795
  platform: string;
2786
2796
  currencies: string[];
@@ -3174,7 +3184,7 @@ declare const cashErrorRecoveryJsonSchema: z.ZodDiscriminatedUnion<"kind", [z.Zo
3174
3184
  operation: string;
3175
3185
  }>]>;
3176
3186
  declare const cashErrorJsonSchema: z.ZodObject<{
3177
- code: z.ZodEnum<["ORACLE_UNSUPPORTED_CURRENCY", "ORACLE_READ_FAILED", "UNSUPPORTED_PLATFORM", "UNSUPPORTED_PLATFORM_CURRENCY", "AMOUNT_BELOW_MINIMUM", "INVALID_INTENT_AMOUNT_RANGE", "ACTIVE_INTENT_BLOCKS_WITHDRAWAL", "NOTHING_TO_WITHDRAW", "INSUFFICIENT_AVAILABLE_FUNDS", "INSUFFICIENT_TOKEN_BALANCE", "ORDER_NOT_ACTIVE", "INVALID_DEPOSIT_ID", "ESCROW_PAUSED", "INDEXER_LAG", "INDEXER_UNAVAILABLE", "ORDER_NOT_FOUND", "PAYEE_REGISTRATION_FAILED", "PAYEE_VERIFICATION_REQUIRED", "SOURCE_ROUTE_UNSUPPORTED_IN_PREPARE", "SOURCE_RECIPIENT_MISMATCH", "SOURCE_CAPABILITIES_FAILED", "SOURCE_QUOTE_FAILED", "SOURCE_NONCE_MANAGER_REQUIRED", "SOURCE_EXECUTION_FAILED", "SOURCE_STATUS_FAILED", "SOURCE_ROUTE_COMPLETED_CASHOUT_FAILED", "SOURCE_CASHOUT_SUBMISSION_UNKNOWN", "SOURCE_CASHOUT_STATUS_UNKNOWN", "DEPOSIT_RESOLUTION_FAILED", "ALLOWANCE_NOT_VISIBLE", "SIGNER_REQUIRED", "SIGNER_CHAIN_MISMATCH", "SIGNER_CHAIN_UNAVAILABLE", "WATCH_TIMEOUT", "TRANSACTION_FAILED", "TRANSACTION_SUBMISSION_UNKNOWN", "TRANSACTION_STATUS_UNKNOWN"]>;
3187
+ code: z.ZodEnum<["ORACLE_UNSUPPORTED_CURRENCY", "ORACLE_READ_FAILED", "UNSUPPORTED_PLATFORM", "UNSUPPORTED_PLATFORM_CURRENCY", "AMOUNT_BELOW_MINIMUM", "INVALID_INTENT_AMOUNT_RANGE", "INVALID_PAYOUT_CURRENCIES", "ACTIVE_INTENT_BLOCKS_WITHDRAWAL", "NOTHING_TO_WITHDRAW", "INSUFFICIENT_AVAILABLE_FUNDS", "INSUFFICIENT_TOKEN_BALANCE", "ORDER_NOT_ACTIVE", "INVALID_DEPOSIT_ID", "ESCROW_PAUSED", "INDEXER_LAG", "INDEXER_UNAVAILABLE", "ORDER_NOT_FOUND", "PAYEE_REGISTRATION_FAILED", "PAYEE_VERIFICATION_REQUIRED", "SOURCE_ROUTE_UNSUPPORTED_IN_PREPARE", "SOURCE_RECIPIENT_MISMATCH", "SOURCE_CAPABILITIES_FAILED", "SOURCE_QUOTE_FAILED", "SOURCE_NONCE_MANAGER_REQUIRED", "SOURCE_EXECUTION_FAILED", "SOURCE_STATUS_FAILED", "SOURCE_ROUTE_COMPLETED_CASHOUT_FAILED", "SOURCE_CASHOUT_SUBMISSION_UNKNOWN", "SOURCE_CASHOUT_STATUS_UNKNOWN", "DEPOSIT_RESOLUTION_FAILED", "ALLOWANCE_NOT_VISIBLE", "SIGNER_REQUIRED", "SIGNER_CHAIN_MISMATCH", "SIGNER_CHAIN_UNAVAILABLE", "WATCH_TIMEOUT", "TRANSACTION_REJECTED", "TRANSACTION_FAILED", "TRANSACTION_SUBMISSION_UNKNOWN", "TRANSACTION_STATUS_UNKNOWN"]>;
3178
3188
  message: z.ZodString;
3179
3189
  retryable: z.ZodBoolean;
3180
3190
  remediation: z.ZodString;
@@ -3561,7 +3571,7 @@ declare const cashErrorJsonSchema: z.ZodObject<{
3561
3571
  }>]>>;
3562
3572
  }, "strict", z.ZodTypeAny, {
3563
3573
  message: string;
3564
- code: "ORACLE_UNSUPPORTED_CURRENCY" | "ORACLE_READ_FAILED" | "UNSUPPORTED_PLATFORM" | "UNSUPPORTED_PLATFORM_CURRENCY" | "AMOUNT_BELOW_MINIMUM" | "INVALID_INTENT_AMOUNT_RANGE" | "ACTIVE_INTENT_BLOCKS_WITHDRAWAL" | "NOTHING_TO_WITHDRAW" | "INSUFFICIENT_AVAILABLE_FUNDS" | "INSUFFICIENT_TOKEN_BALANCE" | "ORDER_NOT_ACTIVE" | "INVALID_DEPOSIT_ID" | "ESCROW_PAUSED" | "INDEXER_LAG" | "INDEXER_UNAVAILABLE" | "ORDER_NOT_FOUND" | "PAYEE_REGISTRATION_FAILED" | "PAYEE_VERIFICATION_REQUIRED" | "SOURCE_ROUTE_UNSUPPORTED_IN_PREPARE" | "SOURCE_RECIPIENT_MISMATCH" | "SOURCE_CAPABILITIES_FAILED" | "SOURCE_QUOTE_FAILED" | "SOURCE_NONCE_MANAGER_REQUIRED" | "SOURCE_EXECUTION_FAILED" | "SOURCE_STATUS_FAILED" | "SOURCE_ROUTE_COMPLETED_CASHOUT_FAILED" | "SOURCE_CASHOUT_SUBMISSION_UNKNOWN" | "SOURCE_CASHOUT_STATUS_UNKNOWN" | "DEPOSIT_RESOLUTION_FAILED" | "ALLOWANCE_NOT_VISIBLE" | "SIGNER_REQUIRED" | "SIGNER_CHAIN_MISMATCH" | "SIGNER_CHAIN_UNAVAILABLE" | "WATCH_TIMEOUT" | "TRANSACTION_FAILED" | "TRANSACTION_SUBMISSION_UNKNOWN" | "TRANSACTION_STATUS_UNKNOWN";
3574
+ code: "ORACLE_UNSUPPORTED_CURRENCY" | "ORACLE_READ_FAILED" | "UNSUPPORTED_PLATFORM" | "UNSUPPORTED_PLATFORM_CURRENCY" | "AMOUNT_BELOW_MINIMUM" | "INVALID_INTENT_AMOUNT_RANGE" | "INVALID_PAYOUT_CURRENCIES" | "ACTIVE_INTENT_BLOCKS_WITHDRAWAL" | "NOTHING_TO_WITHDRAW" | "INSUFFICIENT_AVAILABLE_FUNDS" | "INSUFFICIENT_TOKEN_BALANCE" | "ORDER_NOT_ACTIVE" | "INVALID_DEPOSIT_ID" | "ESCROW_PAUSED" | "INDEXER_LAG" | "INDEXER_UNAVAILABLE" | "ORDER_NOT_FOUND" | "PAYEE_REGISTRATION_FAILED" | "PAYEE_VERIFICATION_REQUIRED" | "SOURCE_ROUTE_UNSUPPORTED_IN_PREPARE" | "SOURCE_RECIPIENT_MISMATCH" | "SOURCE_CAPABILITIES_FAILED" | "SOURCE_QUOTE_FAILED" | "SOURCE_NONCE_MANAGER_REQUIRED" | "SOURCE_EXECUTION_FAILED" | "SOURCE_STATUS_FAILED" | "SOURCE_ROUTE_COMPLETED_CASHOUT_FAILED" | "SOURCE_CASHOUT_SUBMISSION_UNKNOWN" | "SOURCE_CASHOUT_STATUS_UNKNOWN" | "DEPOSIT_RESOLUTION_FAILED" | "ALLOWANCE_NOT_VISIBLE" | "SIGNER_REQUIRED" | "SIGNER_CHAIN_MISMATCH" | "SIGNER_CHAIN_UNAVAILABLE" | "WATCH_TIMEOUT" | "TRANSACTION_REJECTED" | "TRANSACTION_FAILED" | "TRANSACTION_SUBMISSION_UNKNOWN" | "TRANSACTION_STATUS_UNKNOWN";
3565
3575
  retryable: boolean;
3566
3576
  remediation: string;
3567
3577
  recovery?: {
@@ -3643,7 +3653,7 @@ declare const cashErrorJsonSchema: z.ZodObject<{
3643
3653
  } | undefined;
3644
3654
  }, {
3645
3655
  message: string;
3646
- code: "ORACLE_UNSUPPORTED_CURRENCY" | "ORACLE_READ_FAILED" | "UNSUPPORTED_PLATFORM" | "UNSUPPORTED_PLATFORM_CURRENCY" | "AMOUNT_BELOW_MINIMUM" | "INVALID_INTENT_AMOUNT_RANGE" | "ACTIVE_INTENT_BLOCKS_WITHDRAWAL" | "NOTHING_TO_WITHDRAW" | "INSUFFICIENT_AVAILABLE_FUNDS" | "INSUFFICIENT_TOKEN_BALANCE" | "ORDER_NOT_ACTIVE" | "INVALID_DEPOSIT_ID" | "ESCROW_PAUSED" | "INDEXER_LAG" | "INDEXER_UNAVAILABLE" | "ORDER_NOT_FOUND" | "PAYEE_REGISTRATION_FAILED" | "PAYEE_VERIFICATION_REQUIRED" | "SOURCE_ROUTE_UNSUPPORTED_IN_PREPARE" | "SOURCE_RECIPIENT_MISMATCH" | "SOURCE_CAPABILITIES_FAILED" | "SOURCE_QUOTE_FAILED" | "SOURCE_NONCE_MANAGER_REQUIRED" | "SOURCE_EXECUTION_FAILED" | "SOURCE_STATUS_FAILED" | "SOURCE_ROUTE_COMPLETED_CASHOUT_FAILED" | "SOURCE_CASHOUT_SUBMISSION_UNKNOWN" | "SOURCE_CASHOUT_STATUS_UNKNOWN" | "DEPOSIT_RESOLUTION_FAILED" | "ALLOWANCE_NOT_VISIBLE" | "SIGNER_REQUIRED" | "SIGNER_CHAIN_MISMATCH" | "SIGNER_CHAIN_UNAVAILABLE" | "WATCH_TIMEOUT" | "TRANSACTION_FAILED" | "TRANSACTION_SUBMISSION_UNKNOWN" | "TRANSACTION_STATUS_UNKNOWN";
3656
+ code: "ORACLE_UNSUPPORTED_CURRENCY" | "ORACLE_READ_FAILED" | "UNSUPPORTED_PLATFORM" | "UNSUPPORTED_PLATFORM_CURRENCY" | "AMOUNT_BELOW_MINIMUM" | "INVALID_INTENT_AMOUNT_RANGE" | "INVALID_PAYOUT_CURRENCIES" | "ACTIVE_INTENT_BLOCKS_WITHDRAWAL" | "NOTHING_TO_WITHDRAW" | "INSUFFICIENT_AVAILABLE_FUNDS" | "INSUFFICIENT_TOKEN_BALANCE" | "ORDER_NOT_ACTIVE" | "INVALID_DEPOSIT_ID" | "ESCROW_PAUSED" | "INDEXER_LAG" | "INDEXER_UNAVAILABLE" | "ORDER_NOT_FOUND" | "PAYEE_REGISTRATION_FAILED" | "PAYEE_VERIFICATION_REQUIRED" | "SOURCE_ROUTE_UNSUPPORTED_IN_PREPARE" | "SOURCE_RECIPIENT_MISMATCH" | "SOURCE_CAPABILITIES_FAILED" | "SOURCE_QUOTE_FAILED" | "SOURCE_NONCE_MANAGER_REQUIRED" | "SOURCE_EXECUTION_FAILED" | "SOURCE_STATUS_FAILED" | "SOURCE_ROUTE_COMPLETED_CASHOUT_FAILED" | "SOURCE_CASHOUT_SUBMISSION_UNKNOWN" | "SOURCE_CASHOUT_STATUS_UNKNOWN" | "DEPOSIT_RESOLUTION_FAILED" | "ALLOWANCE_NOT_VISIBLE" | "SIGNER_REQUIRED" | "SIGNER_CHAIN_MISMATCH" | "SIGNER_CHAIN_UNAVAILABLE" | "WATCH_TIMEOUT" | "TRANSACTION_REJECTED" | "TRANSACTION_FAILED" | "TRANSACTION_SUBMISSION_UNKNOWN" | "TRANSACTION_STATUS_UNKNOWN";
3647
3657
  retryable: boolean;
3648
3658
  remediation: string;
3649
3659
  recovery?: {
@@ -3789,4 +3799,4 @@ declare function capabilitiesFromJson(json: unknown): CashCapabilities;
3789
3799
  declare function cashErrorToJson(error: CashErrorShape): CashErrorJson;
3790
3800
  declare function cashErrorFromJson(json: unknown): CashError;
3791
3801
 
3792
- export { BASE_CHAIN_ID, BASE_USDC_ADDRESS, CASH_ORDER_POLL_INTERVAL_MS, CASH_ORDER_STATUSES, CASH_RETAIN_ON_EMPTY, type CashAssetJson, CashBuyerProfile, type CashBuyerProfileJson, CashCapabilities, type CashCapabilitiesJson, type CashChainJson, CashDepositInput, CashError, type CashErrorCode, type CashErrorJson, type CashErrorRecovery, type CashErrorRecoveryJson, type CashErrorShape, CashEstimate, type CashEstimateJson, CashFill, type CashFillJson, CashFillStats, type CashFillStatsJson, CashOrder, type CashOrderData, type CashOrderJson, CashPayoutInfo, type CashPayoutInfoJson, CashPreparedStep, type CashPreparedStepJson, CashSourceCapabilities, type CashSourceCapabilitiesJson, CashoutResult, type CashoutResultJson, type DeriveCashOrderOptions, MARKET_SPREAD_BPS, type MethodCurrencyLike, ORACLE_MIN_CONVERSION_RATE_SENTINEL, type PaymentMethodLike, PrepareResult, type PrepareResultJson, type PreparedTransactionJson, RATE_PRECISION, RelayExecutionResult, type RelayExecutionResultJson, RelayQuote, type RelayQuoteJson, RelayStatus, type RelayStatusJson, type RelayTransactionJson, type RelayTransactionsJson, type ResolvedCashDeposit, TopUpResult, type TopUpResultJson, USDC_DECIMALS, WithdrawResult, type WithdrawResultJson, bigintString, buildIntentAmountRange, buildMarketRateCurrencyOverride, buyerProfileFromJson, buyerProfileToJson, capabilitiesFromJson, capabilitiesToJson, cashAssetJsonSchema, cashBuyerProfileJsonSchema, cashCapabilitiesJsonSchema, cashChainJsonSchema, cashErrorFromJson, cashErrorJsonSchema, cashErrorRecoveryJsonSchema, cashErrorToJson, cashEstimateJsonSchema, cashFillJsonSchema, cashFillStatsJsonSchema, cashNextActionSchema, cashOrderJsonSchema, cashOrderStateSchema, cashPairFillStatsJsonSchema, cashPayoutInfoJsonSchema, cashPayoutPricingJsonSchema, cashPreparedStepJsonSchema, cashSourceCapabilitiesJsonSchema, cashoutResultFromJson, cashoutResultJsonSchema, cashoutResultToJson, centsToNumber, deriveBuyerProfile, deriveCashOrder, derivePayouts, errors, estimateFromJson, estimateToJson, explainOrder, fiatFromUsdc, fiatToNumber, fillFromJson, fillStatsFromJson, fillStatsToJson, fillToJson, formatUsdc, intentStatusSchema, isCashError, isFillLive, isMarketRateSupported, nonNegativeBigintString, orderFromJson, orderToJson, parseCompositeDepositId, prepareCashDepositParams, prepareResultFromJson, prepareResultJsonSchema, prepareResultToJson, preparedStepFromJson, preparedStepToJson, preparedTransactionJsonSchema, preparedTxFromJson, preparedTxToJson, rateToNumber, relayExecutionResultFromJson, relayExecutionResultJsonSchema, relayExecutionResultToJson, relayQuoteFromJson, relayQuoteJsonSchema, relayQuoteToJson, relayStatusFromJson, relayStatusJsonSchema, relayStatusToJson, relayTransactionJsonSchema, relayTransactionsJsonSchema, resolveCashDepositId, sourceCapabilitiesFromJson, sourceCapabilitiesToJson, topUpResultFromJson, topUpResultJsonSchema, topUpResultToJson, usdc, withExplain, withdrawResultFromJson, withdrawResultJsonSchema, withdrawResultToJson };
3802
+ export { BASE_CHAIN_ID, BASE_USDC_ADDRESS, CASH_ORDER_POLL_INTERVAL_MS, CASH_ORDER_STATUSES, CASH_RETAIN_ON_EMPTY, type CashAssetJson, CashBuyerProfile, type CashBuyerProfileJson, CashCapabilities, type CashCapabilitiesJson, type CashChainJson, CashDepositInput, CashError, type CashErrorCode, type CashErrorJson, type CashErrorRecovery, type CashErrorRecoveryJson, type CashErrorShape, CashEstimate, type CashEstimateJson, CashFill, type CashFillJson, CashFillStats, type CashFillStatsJson, CashOrder, type CashOrderData, type CashOrderJson, CashPayoutInfo, type CashPayoutInfoJson, CashPreparedStep, type CashPreparedStepJson, CashSourceCapabilities, type CashSourceCapabilitiesJson, CashoutResult, type CashoutResultJson, type DeriveCashOrderOptions, MARKET_SPREAD_BPS, type MethodCurrencyLike, ORACLE_MIN_CONVERSION_RATE_SENTINEL, type PaymentMethodLike, PrepareResult, type PrepareResultJson, type PreparedTransactionJson, RATE_PRECISION, RelayExecutionResult, type RelayExecutionResultJson, RelayQuote, type RelayQuoteJson, RelayStatus, type RelayStatusJson, type RelayTransactionJson, type RelayTransactionsJson, type ResolvedCashDeposit, TopUpResult, type TopUpResultJson, USDC_DECIMALS, WithdrawResult, type WithdrawResultJson, bigintString, buildIntentAmountRange, buildMarketRateCurrencyOverride, buyerProfileFromJson, buyerProfileToJson, capabilitiesFromJson, capabilitiesToJson, cashAssetJsonSchema, cashBuyerProfileJsonSchema, cashCapabilitiesJsonSchema, cashChainJsonSchema, cashErrorFromJson, cashErrorJsonSchema, cashErrorRecoveryJsonSchema, cashErrorToJson, cashEstimateJsonSchema, cashFillJsonSchema, cashFillStatsJsonSchema, cashNextActionSchema, cashOrderJsonSchema, cashOrderStateSchema, cashPairFillStatsJsonSchema, cashPayoutInfoJsonSchema, cashPayoutPricingJsonSchema, cashPreparedStepJsonSchema, cashSourceCapabilitiesJsonSchema, cashoutResultFromJson, cashoutResultJsonSchema, cashoutResultToJson, centsToNumber, deriveBuyerProfile, deriveCashOrder, derivePayouts, errors, estimateFromJson, estimateToJson, explainOrder, fiatFromUsdc, fiatToNumber, fillFromJson, fillStatsFromJson, fillStatsToJson, fillToJson, formatUsdc, intentStatusSchema, isCashError, isFillLive, isMarketRateSupported, isUserRejectedError, nonNegativeBigintString, orderFromJson, orderToJson, parseCompositeDepositId, prepareCashDepositParams, prepareResultFromJson, prepareResultJsonSchema, prepareResultToJson, preparedStepFromJson, preparedStepToJson, preparedTransactionJsonSchema, preparedTxFromJson, preparedTxToJson, rateToNumber, relayExecutionResultFromJson, relayExecutionResultJsonSchema, relayExecutionResultToJson, relayQuoteFromJson, relayQuoteJsonSchema, relayQuoteToJson, relayStatusFromJson, relayStatusJsonSchema, relayStatusToJson, relayTransactionJsonSchema, relayTransactionsJsonSchema, resolveCashDepositId, sourceCapabilitiesFromJson, sourceCapabilitiesToJson, topUpResultFromJson, topUpResultJsonSchema, topUpResultToJson, usdc, withExplain, withdrawResultFromJson, withdrawResultJsonSchema, withdrawResultToJson };