@zkp2p/sdk 0.5.8 → 0.6.2

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/react.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { Z as Zkp2pClient, P as PostDepositDetailsRequest, y as SignalIntentMethodParams, bn as PreparedTransaction, bq as TakerTier, n as GetTakerTierRequest, o as GetTakerTierResponse, F as FulfillIntentMethodParams, cF as SendTransactionFn, cG as SendBatchFn, cD as DelegationDepositTarget, cE as BatchResult } from './vaultUtils-DOOl9QUP.mjs';
2
- export { cB as DelegationRoute, cC as DelegationState, cH as VAULT_ZERO_ADDRESS, cv as ZERO_RATE_MANAGER_ID, cI as asErrorMessage, cJ as assertDelegationMethodSupport, cA as classifyDelegationState, cz as getDelegationRoute, cw as isZeroRateManagerId, cx as normalizeRateManagerId, cy as normalizeRegistry } from './vaultUtils-DOOl9QUP.mjs';
1
+ import { Z as Zkp2pClient, P as PostDepositDetailsRequest, E as SignalIntentMethodParams, bq as PreparedTransaction, bt as TakerTier, p as GetTakerTierRequest, q as GetTakerTierResponse, F as FulfillIntentMethodParams, cJ as SendTransactionFn, cK as SendBatchFn, cH as DelegationDepositTarget, cI as BatchResult } from './vaultUtils-BwY9Z0aR.mjs';
2
+ export { cF as DelegationRoute, cG as DelegationState, cL as VAULT_ZERO_ADDRESS, cz as ZERO_RATE_MANAGER_ID, cM as asErrorMessage, cN as assertDelegationMethodSupport, cE as classifyDelegationState, cD as getDelegationRoute, cA as isZeroRateManagerId, cB as normalizeRateManagerId, cC as normalizeRegistry } from './vaultUtils-BwY9Z0aR.mjs';
3
3
  import { Hash, Address, Hex } from 'viem';
4
4
  import '@zkp2p/indexer-schema';
5
5
  import 'abitype';
package/dist/react.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Z as Zkp2pClient, P as PostDepositDetailsRequest, y as SignalIntentMethodParams, bn as PreparedTransaction, bq as TakerTier, n as GetTakerTierRequest, o as GetTakerTierResponse, F as FulfillIntentMethodParams, cF as SendTransactionFn, cG as SendBatchFn, cD as DelegationDepositTarget, cE as BatchResult } from './vaultUtils-DOOl9QUP.js';
2
- export { cB as DelegationRoute, cC as DelegationState, cH as VAULT_ZERO_ADDRESS, cv as ZERO_RATE_MANAGER_ID, cI as asErrorMessage, cJ as assertDelegationMethodSupport, cA as classifyDelegationState, cz as getDelegationRoute, cw as isZeroRateManagerId, cx as normalizeRateManagerId, cy as normalizeRegistry } from './vaultUtils-DOOl9QUP.js';
1
+ import { Z as Zkp2pClient, P as PostDepositDetailsRequest, E as SignalIntentMethodParams, bq as PreparedTransaction, bt as TakerTier, p as GetTakerTierRequest, q as GetTakerTierResponse, F as FulfillIntentMethodParams, cJ as SendTransactionFn, cK as SendBatchFn, cH as DelegationDepositTarget, cI as BatchResult } from './vaultUtils-BwY9Z0aR.js';
2
+ export { cF as DelegationRoute, cG as DelegationState, cL as VAULT_ZERO_ADDRESS, cz as ZERO_RATE_MANAGER_ID, cM as asErrorMessage, cN as assertDelegationMethodSupport, cE as classifyDelegationState, cD as getDelegationRoute, cA as isZeroRateManagerId, cB as normalizeRateManagerId, cC as normalizeRegistry } from './vaultUtils-BwY9Z0aR.js';
3
3
  import { Hash, Address, Hex } from 'viem';
4
4
  import '@zkp2p/indexer-schema';
5
5
  import 'abitype';
package/dist/react.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { getNextTakerTier, TAKER_TIER_CAPS, asErrorMessage, ZERO_ADDRESS, getDelegationRoute, assertDelegationMethodSupport, prepareClearDelegationTx, normalizeRateManagerId, normalizeRegistry, isZeroRateManagerId, assertAtomicDelegationSwitchSupport, prepareSetDelegationTx } from './chunk-TGMRXUP2.mjs';
2
- export { ZERO_ADDRESS as VAULT_ZERO_ADDRESS, ZERO_RATE_MANAGER_ID, asErrorMessage, assertDelegationMethodSupport, classifyDelegationState, getDelegationRoute, isZeroRateManagerId, normalizeRateManagerId, normalizeRegistry } from './chunk-TGMRXUP2.mjs';
1
+ import { getNextTakerTier, TAKER_TIER_CAPS, asErrorMessage, ZERO_ADDRESS, getDelegationRoute, assertDelegationMethodSupport, prepareClearDelegationTx, normalizeRateManagerId, normalizeRegistry, isZeroRateManagerId, assertAtomicDelegationSwitchSupport, prepareSetDelegationTx } from './chunk-6WAMIVRB.mjs';
2
+ export { ZERO_ADDRESS as VAULT_ZERO_ADDRESS, ZERO_RATE_MANAGER_ID, asErrorMessage, assertDelegationMethodSupport, classifyDelegationState, getDelegationRoute, isZeroRateManagerId, normalizeRateManagerId, normalizeRegistry } from './chunk-6WAMIVRB.mjs';
3
3
  import './chunk-J5LGTIGS.mjs';
4
4
  import { useState, useCallback, useMemo, useEffect } from 'react';
5
5
  import { formatUnits } from 'viem';
@@ -1015,6 +1015,11 @@ type FulfillIntentParams = {
1015
1015
  proof: BuyerTeePaymentProofInput;
1016
1016
  /** Optional attestation timestamp buffer override in milliseconds */
1017
1017
  timestampBufferMs?: number | string;
1018
+ /**
1019
+ * Alternate attestation-service origins, tried after network failures only.
1020
+ * Omit for the default Railway proxy; pass [] to disable fallback.
1021
+ */
1022
+ attestationServiceFallbackUrls?: string[];
1018
1023
  /** Override the attestation service base URL */
1019
1024
  attestationServiceUrl?: string;
1020
1025
  /** Optional hook payload passed to orchestrator */
@@ -1101,7 +1106,7 @@ type PostDepositDetailsResponse = {
1101
1106
  */
1102
1107
  type RegisterPayeeDetailsRequest = PostDepositDetailsRequest;
1103
1108
  type RegisterPayeeDetailsResponse = PostDepositDetailsResponse;
1104
- type SellerPlatform = 'venmo' | 'cashapp' | 'wise' | 'paypal';
1109
+ type SellerPlatform = 'venmo' | 'cashapp' | 'wise' | 'paypal' | 'zelle';
1105
1110
  type VenmoSessionMaterial = {
1106
1111
  recipientUsername: string;
1107
1112
  accountId: string;
@@ -1134,7 +1139,7 @@ type WiseProfileNotFound = {
1134
1139
  profileId: string;
1135
1140
  profiles: WiseProfileInfo[];
1136
1141
  };
1137
- type GoogleOAuthSellerCredentialPlatform = Extract<SellerPlatform, 'paypal' | 'venmo'>;
1142
+ type GoogleOAuthSellerCredentialPlatform = Extract<SellerPlatform, 'paypal' | 'venmo' | 'zelle'>;
1138
1143
  type PayPalGoogleOAuthSellerCredentialUploadBody = {
1139
1144
  payeeEmail: string;
1140
1145
  authorizationCode: string;
@@ -1145,9 +1150,15 @@ type VenmoGoogleOAuthSellerCredentialUploadBody = {
1145
1150
  authorizationCode: string;
1146
1151
  redirectUri: string;
1147
1152
  };
1153
+ type ZelleGoogleOAuthSellerCredentialUploadBody = {
1154
+ payeeId: string;
1155
+ authorizationCode: string;
1156
+ redirectUri: string;
1157
+ };
1148
1158
  type GoogleOAuthSellerCredentialUploadBodyByPlatform = {
1149
1159
  paypal: PayPalGoogleOAuthSellerCredentialUploadBody;
1150
1160
  venmo: VenmoGoogleOAuthSellerCredentialUploadBody;
1161
+ zelle: ZelleGoogleOAuthSellerCredentialUploadBody;
1151
1162
  };
1152
1163
  type VenmoCredentialUploadInput = {
1153
1164
  payeeId: string;
@@ -1228,12 +1239,23 @@ type BuyerTeePaymentProofInput = {
1228
1239
  type BuyerTeeSessionMaterial = Record<string, string>;
1229
1240
  type BuyerTeeSessionMaterialEncryptionInput = {
1230
1241
  actionType: string;
1242
+ /**
1243
+ * Alternate attestation-service origins, tried after network failures only.
1244
+ * Omit for the default Railway proxy; pass [] to disable fallback.
1245
+ */
1246
+ attestationServiceFallbackUrls?: string[];
1231
1247
  attestationRuntime?: SellerCredentialAttestationRuntime;
1232
1248
  attestationServiceUrl: string;
1233
1249
  platform: string;
1234
1250
  sessionMaterial: BuyerTeeSessionMaterial;
1235
1251
  timeoutMs?: number | null;
1236
1252
  };
1253
+ type BuyerTeeVerifyPaymentBody = {
1254
+ encryptedSessionMaterial: string;
1255
+ chainId: number;
1256
+ intent: SellerVerifyIntentDetails;
1257
+ params: BuyerTeePaymentParams;
1258
+ };
1237
1259
  type MakerIdentityPlatform = Extract<IdentityPlatform, 'paypal' | 'wise'>;
1238
1260
  type IdentityAttestationParams = IdentityParamsByPlatform[IdentityPlatform] | Record<string, string | number | boolean>;
1239
1261
  type IdentityAttestationRequestBody = {
@@ -1353,6 +1375,11 @@ type UploadSellerCredentialBundleParams = {
1353
1375
  }[RegisteredSellerCredentialPlatform];
1354
1376
  type UploadSellerCredentialOptions = {
1355
1377
  baseApiUrl?: string;
1378
+ /**
1379
+ * Alternate attestation-service origins, tried after network failures only.
1380
+ * Omit for the default Railway proxy; pass [] to disable fallback.
1381
+ */
1382
+ attestationServiceFallbackUrls?: string[];
1356
1383
  attestationServiceUrl?: string;
1357
1384
  timeoutMs?: number;
1358
1385
  attestationRuntime?: SellerCredentialAttestationRuntime;
@@ -1374,7 +1401,11 @@ type UploadVenmoGoogleOAuthSellerCredentialParams = GoogleOAuthSellerCredentialB
1374
1401
  platform: 'venmo';
1375
1402
  accountId: string;
1376
1403
  };
1377
- type UploadGoogleOAuthSellerCredentialParams = UploadPayPalGoogleOAuthSellerCredentialParams | UploadVenmoGoogleOAuthSellerCredentialParams;
1404
+ type UploadZelleGoogleOAuthSellerCredentialParams = GoogleOAuthSellerCredentialBaseParams & {
1405
+ platform: 'zelle';
1406
+ payeeId: string;
1407
+ };
1408
+ type UploadGoogleOAuthSellerCredentialParams = UploadPayPalGoogleOAuthSellerCredentialParams | UploadVenmoGoogleOAuthSellerCredentialParams | UploadZelleGoogleOAuthSellerCredentialParams;
1378
1409
  type VerifySellerPaymentParams = {
1379
1410
  platform: SellerPlatform;
1380
1411
  } & SellerVerifyProxyBody;
@@ -1840,7 +1871,16 @@ type PlatformLimit = {
1840
1871
  cooldownHours: number;
1841
1872
  isLocked: boolean;
1842
1873
  minTierRequired: TakerTierLevel | null;
1874
+ /**
1875
+ * Whether the rail is chargeback-reversible. Reversible rails backed by a
1876
+ * seller-automated-release (SAR) credential are takeable only through Peer
1877
+ * Pay, so the intent-sign path rejects them with "peer pay only". Optional:
1878
+ * older curator deployments (current prod) omit this field.
1879
+ */
1880
+ reversible?: boolean;
1843
1881
  };
1882
+ /** How the curator resolved the taker tier (see curator tier engine). */
1883
+ type TakerTierSource = 'computed' | 'fallback' | 'override' | 'blocklist' | 'peer_president';
1844
1884
  type TakerTier = {
1845
1885
  owner: string;
1846
1886
  chainId: number;
@@ -1848,7 +1888,7 @@ type TakerTier = {
1848
1888
  perIntentCapBaseUnits: string;
1849
1889
  perIntentCapDisplay: string;
1850
1890
  lastUpdated: string;
1851
- source: 'computed' | 'fallback';
1891
+ source: TakerTierSource;
1852
1892
  stats: TakerTierStats | null;
1853
1893
  cooldownHours: number;
1854
1894
  cooldownSeconds: number;
@@ -1856,6 +1896,30 @@ type TakerTier = {
1856
1896
  cooldownRemainingSeconds: number;
1857
1897
  nextIntentAvailableAt: string | null;
1858
1898
  platformLimits?: PlatformLimit[];
1899
+ /**
1900
+ * Server-authoritative tier fields (curator PR #461/#463 contract). All
1901
+ * optional because the current production deployment still serves the older
1902
+ * payload that omits them — read them when present and fall back gracefully.
1903
+ * Amounts are USDC base-unit strings (6 decimals).
1904
+ */
1905
+ /** Base per-intent cap before platform risk multipliers (alias of perIntentCapBaseUnits). */
1906
+ maxOrderSize?: string;
1907
+ maxOrderSizeDisplay?: string;
1908
+ /** Lifetime Peer-Pay maker volume floor that qualifies the current tier. */
1909
+ minVolumeForTier?: string;
1910
+ minVolumeForTierDisplay?: string;
1911
+ /** Next tier up the volume ladder, or null at the top / off-ladder tiers. */
1912
+ nextTier?: TakerTierLevel | null;
1913
+ /** Remaining Peer-Pay maker volume to reach `nextTier`. */
1914
+ volumeToNextTier?: string | null;
1915
+ volumeToNextTierDisplay?: string | null;
1916
+ nextTierMaxOrderSize?: string | null;
1917
+ nextTierMaxOrderSizeDisplay?: string | null;
1918
+ /**
1919
+ * Lifetime aggregate Peer-Pay maker volume driving tier qualification. Only
1920
+ * present on curator deployments with the PR #461/#463 contract (preprod).
1921
+ */
1922
+ peerPayVolume?: string;
1859
1923
  };
1860
1924
  type GetTakerTierRequest = {
1861
1925
  owner: string;
@@ -1872,8 +1936,10 @@ type GetDepositBundleResponse = DepositBundleResponse;
1872
1936
  type GetOrderbookParams = {
1873
1937
  currency: string;
1874
1938
  paymentPlatform?: string;
1939
+ publicOnly?: boolean;
1875
1940
  sortBy?: 'price' | 'available' | 'limits';
1876
1941
  sortDirection?: 'asc' | 'desc';
1942
+ sellerAutomatedRelease?: 'include' | 'exclude' | 'only';
1877
1943
  limit?: number;
1878
1944
  chainId?: number;
1879
1945
  token?: string;
@@ -1891,6 +1957,7 @@ type OrderbookEntry = {
1891
1957
  currency: string;
1892
1958
  paymentMethodHash: string;
1893
1959
  payeeDetailsHash: string;
1960
+ sellerAutomatedReleaseAvailable?: boolean;
1894
1961
  escrowAddress: string;
1895
1962
  chainId: number;
1896
1963
  offchainId?: string;
@@ -1903,6 +1970,7 @@ type GetOrderbookResponse = {
1903
1970
  paymentPlatform: string | null;
1904
1971
  sortBy: string;
1905
1972
  sortDirection: string;
1973
+ sellerAutomatedRelease?: 'include' | 'exclude' | 'only';
1906
1974
  internalDetailsIncluded: boolean;
1907
1975
  generatedAt: string;
1908
1976
  entries: OrderbookEntry[];
@@ -2028,6 +2096,11 @@ type FulfillIntentMethodParams = {
2028
2096
  proof: BuyerTeePaymentProofInput;
2029
2097
  /** Allowed timestamp variance in ms (default: 300000ms) */
2030
2098
  timestampBufferMs?: string;
2099
+ /**
2100
+ * Alternate attestation-service origins, tried after network failures only.
2101
+ * Omit for the default Railway proxy; pass [] to disable fallback.
2102
+ */
2103
+ attestationServiceFallbackUrls?: string[];
2031
2104
  /** Override attestation service URL */
2032
2105
  attestationServiceUrl?: string;
2033
2106
  /** Optional orchestrator override */
@@ -3650,4 +3723,4 @@ type SendBatchFn = (txs: Array<{
3650
3723
  value?: bigint;
3651
3724
  }>) => Promise<string>;
3652
3725
 
3653
- export { type BestByPlatformResponseObject as $, type AttestationServiceIdentityResponse as A, type BuyerTeeSessionMaterialEncryptionInput as B, type CuratorSellerCredentialUploadResponse as C, type DepositWithRelations as D, type Zkp2pNextOptions as E, type FulfillIntentMethodParams as F, type GoogleOAuthSellerCredentialPlatform as G, type AuthorizationTokenProvider as H, type IntentEntity$1 as I, type TimeoutConfig as J, type ActionCallback as K, type CreateDepositParams as L, type CreateDepositConversionRate as M, type Range as N, type SignalIntentParams as O, type PostDepositDetailsRequest as P, type QuotesBestByPlatformRequest as Q, type ReferrerFeeConfig as R, type SellerCredentialBundle as S, type TakerTierLevel as T, type UploadSellerCredentialBundleParams as U, type ValidatePayeeDetailsRequest as V, type WithdrawDepositParams as W, type FulfillIntentParams as X, type ReleaseFundsToPayerParams as Y, Zkp2pClient as Z, type CancelIntentParams as _, type IdentityAttestationRequestBody as a, type FulfillIntentAttestationResponse as a$, type GetBestByPlatformResponse as a0, type GetBestByPlatformResponseObject as a1, type GetPlatformQuote as a2, type PlatformQuote as a3, type QuoteRequest as a4, type GetNearbyQuote as a5, type GetNearbySuggestions as a6, type GetQuoteResponse as a7, type GetQuoteResponseObject as a8, type GetQuoteSingleResponse as a9, type VenmoSessionMaterial as aA, type CashAppSessionMaterial as aB, type WiseSessionMaterial as aC, type WiseProfileInfo as aD, type WiseProfileSelectionRequired as aE, type WiseProfileNotFound as aF, type PayPalGoogleOAuthSellerCredentialUploadBody as aG, type VenmoGoogleOAuthSellerCredentialUploadBody as aH, type VenmoCredentialUploadInput as aI, type CashAppCredentialUploadInput as aJ, type WiseCredentialUploadInput as aK, type SellerCredentialUploadInputByPlatform as aL, type SellerCiphertextBundle as aM, type SellerSignedCiphertextBundle as aN, type SellerVerifyIntentDetails as aO, type SellerVerifyInput as aP, type SellerProbeInput as aQ, type SellerCredentialBundleUpload as aR, type SellerCredentialStatusValue as aS, type SellerCredentialStatus as aT, type SellerVerifyProxyBody as aU, type SellerTypedDataField as aV, type SellerTypedDataSpec as aW, type SellerPaymentTypedDataValue as aX, type SellerAttestationOutput as aY, type SellerCredentialProbeResponse as aZ, type AttestationServiceSellerVerifyResponse as a_, type QuoteResponse as aa, type QuoteResponseObject as ab, type QuoteSingleResponse as ac, type QuoteIntentResponse as ad, type QuoteFeesResponse as ae, type FiatResponse as af, type TokenResponse as ag, type NearbyQuote as ah, type NearbySuggestions as ai, type ApiDeposit as aj, type DepositVerifier as ak, type DepositVerifierCurrency as al, type DepositStatus as am, type GetDepositByIdRequest as an, type GetDepositByIdResponse as ao, type Intent as ap, type ApiIntentStatus as aq, type GetOwnerIntentsRequest as ar, type GetOwnerIntentsResponse as as, type GetIntentsByDepositRequest as at, type GetIntentsByDepositResponse as au, type GetIntentByHashRequest as av, type GetIntentByHashResponse as aw, type RegisterPayeeDetailsRequest as ax, type RegisterPayeeDetailsResponse as ay, type SellerPlatform as az, type SellerCredentialUploadInput as b, type RateManagerOrderField as b$, type AttestationServiceSellerCredentialProbeResponse as b0, type BuyerTeePaymentParams as b1, type BuyerTeePaymentProofInput as b2, type BuyerTeeSessionMaterial as b3, type CuratorSellerCredentialStatusResponse as b4, type CuratorSellerVerifyResponse as b5, type RegisteredSellerCredentialPlatform as b6, type UploadSellerCredentialParams as b7, type RegisteredUploadSellerCredentialParams as b8, type UploadSellerCredentialOptions as b9, fetchFulfillmentAndPayment as bA, type DepositEntity$1 as bB, type IntentFulfilledEntity as bC, type IntentFulfillmentAmountsEntity as bD, type DepositPaymentMethodEntity$1 as bE, type MethodCurrencyEntity$1 as bF, type IntentStatus as bG, type RateManagerEntity as bH, type RateManagerRateEntity as bI, type RateManagerDelegationEntity as bJ, type ManagerAggregateStatsEntity as bK, type ManagerStatsEntity as bL, type ManagerDailySnapshotEntity as bM, type RateManagerListItem as bN, type RateManagerDetail as bO, type ManualRateUpdateEntity as bP, type OracleConfigUpdateEntity as bQ, type DepositFundActivityEntity$1 as bR, type DepositDailySnapshotEntity$1 as bS, type DepositFundActivityType$1 as bT, type DepositFilter as bU, type PaginationOptions as bV, type DepositOrderField as bW, type OrderDirection$1 as bX, type RateManagerFilter as bY, type RateManagerPaginationOptions as bZ, type RateManagerDelegationPaginationOptions as b_, type GetSellerCredentialStatusParams as ba, type UploadPayPalGoogleOAuthSellerCredentialParams as bb, type UploadVenmoGoogleOAuthSellerCredentialParams as bc, type UploadGoogleOAuthSellerCredentialParams as bd, type VerifySellerPaymentParams as be, type IdentityAttestationActionType as bf, type IdentityAttestationOutput as bg, type IdentityAttestationOutputFor as bh, type IdentityAttestationParams as bi, type MakerIdentityAttestationRequestBody as bj, type MakerIdentityPlatform as bk, type OnchainCurrency as bl, type DepositVerifierData as bm, type PreparedTransaction as bn, type OrderStats as bo, type DepositIntentStatistics as bp, type TakerTier as bq, type TakerTierStats as br, type PlatformLimit as bs, type PlatformRiskLevel as bt, type OrderbookEntry as bu, IndexerClient as bv, defaultIndexerEndpoint as bw, IndexerDepositService as bx, IndexerRateManagerService as by, compareEventCursorIdsByRecency as bz, type SellerCredentialUploadPlatform as c, type OrderDirection as c0, type DeploymentEnv as c1, type FulfillmentRecord as c2, type PaymentVerifiedRecord as c3, type FulfillmentAndPaymentResponse as c4, PAYMENT_PLATFORMS as c5, type PaymentPlatformType as c6, Currency as c7, currencyInfo as c8, getCurrencyInfoFromHash as c9, classifyDelegationState as cA, type DelegationRoute as cB, type DelegationState as cC, type DelegationDepositTarget as cD, type BatchResult as cE, type SendTransactionFn as cF, type SendBatchFn as cG, ZERO_ADDRESS as cH, asErrorMessage as cI, assertDelegationMethodSupport as cJ, getCurrencyInfoFromCountryCode as ca, getCurrencyCodeFromHash as cb, isSupportedCurrencyHash as cc, mapConversionRatesToOnchainMinRate as cd, type CurrencyData as ce, getContracts as cf, getRateManagerContracts as cg, getPaymentMethodsCatalog as ch, getGatingServiceAddress as ci, type RuntimeEnv as cj, parseDepositView as ck, parseIntentView as cl, enrichPvDepositView as cm, enrichPvIntentView as cn, type PV_DepositView as co, type PV_Deposit as cp, type PV_PaymentMethodData as cq, type PV_Currency as cr, type PV_ReferralFee as cs, type PV_IntentView as ct, type PV_Intent as cu, ZERO_RATE_MANAGER_ID as cv, isZeroRateManagerId as cw, normalizeRateManagerId as cx, normalizeRegistry as cy, getDelegationRoute as cz, type SellerCredentialAttestationRuntime as d, type AttestationServiceSellerCredentialUploadResponse as e, type GoogleOAuthSellerCredentialUploadBodyByPlatform as f, type BestByPlatformResponse as g, type ValidatePayeeDetailsResponse as h, type PostDepositDetailsResponse as i, type GetPayeeDetailsRequest as j, type GetPayeeDetailsResponse as k, type GetOwnerDepositsRequest as l, type GetOwnerDepositsResponse as m, type GetTakerTierRequest as n, type GetTakerTierResponse as o, type GetDepositBundleParams as p, type ApiAdapterOptions as q, type GetDepositBundleResponse as r, type GetOrderbookParams as s, type GetOrderbookResponse as t, type CurrencyType as u, type PaymentMethodCatalog as v, type TxOverrides as w, type SignalIntentReferralFee as x, type SignalIntentMethodParams as y, type CancelIntentMethodParams as z };
3726
+ export { type ReleaseFundsToPayerParams as $, type AttestationServiceIdentityResponse as A, type BuyerTeeVerifyPaymentBody as B, type CuratorSellerCredentialUploadResponse as C, type DepositWithRelations as D, type SignalIntentMethodParams as E, type FulfillIntentMethodParams as F, type GoogleOAuthSellerCredentialPlatform as G, type CancelIntentMethodParams as H, type IntentEntity$1 as I, type Zkp2pNextOptions as J, type AuthorizationTokenProvider as K, type TimeoutConfig as L, type ActionCallback as M, type CreateDepositParams as N, type CreateDepositConversionRate as O, type PostDepositDetailsRequest as P, type QuotesBestByPlatformRequest as Q, type ReferrerFeeConfig as R, type SellerCredentialBundle as S, type TakerTierLevel as T, type UploadSellerCredentialBundleParams as U, type ValidatePayeeDetailsRequest as V, type Range as W, type WithdrawDepositParams as X, type SignalIntentParams as Y, Zkp2pClient as Z, type FulfillIntentParams as _, type IdentityAttestationRequestBody as a, type SellerAttestationOutput as a$, type CancelIntentParams as a0, type BestByPlatformResponseObject as a1, type GetBestByPlatformResponse as a2, type GetBestByPlatformResponseObject as a3, type GetPlatformQuote as a4, type PlatformQuote as a5, type QuoteRequest as a6, type GetNearbyQuote as a7, type GetNearbySuggestions as a8, type GetQuoteResponse as a9, type RegisterPayeeDetailsResponse as aA, type SellerPlatform as aB, type VenmoSessionMaterial as aC, type CashAppSessionMaterial as aD, type WiseSessionMaterial as aE, type WiseProfileInfo as aF, type WiseProfileSelectionRequired as aG, type WiseProfileNotFound as aH, type PayPalGoogleOAuthSellerCredentialUploadBody as aI, type VenmoGoogleOAuthSellerCredentialUploadBody as aJ, type ZelleGoogleOAuthSellerCredentialUploadBody as aK, type VenmoCredentialUploadInput as aL, type CashAppCredentialUploadInput as aM, type WiseCredentialUploadInput as aN, type SellerCredentialUploadInputByPlatform as aO, type SellerCiphertextBundle as aP, type SellerSignedCiphertextBundle as aQ, type SellerVerifyIntentDetails as aR, type SellerVerifyInput as aS, type SellerProbeInput as aT, type SellerCredentialBundleUpload as aU, type SellerCredentialStatusValue as aV, type SellerCredentialStatus as aW, type SellerVerifyProxyBody as aX, type SellerTypedDataField as aY, type SellerTypedDataSpec as aZ, type SellerPaymentTypedDataValue as a_, type GetQuoteResponseObject as aa, type GetQuoteSingleResponse as ab, type QuoteResponse as ac, type QuoteResponseObject as ad, type QuoteSingleResponse as ae, type QuoteIntentResponse as af, type QuoteFeesResponse as ag, type FiatResponse as ah, type TokenResponse as ai, type NearbyQuote as aj, type NearbySuggestions as ak, type ApiDeposit as al, type DepositVerifier as am, type DepositVerifierCurrency as an, type DepositStatus as ao, type GetDepositByIdRequest as ap, type GetDepositByIdResponse as aq, type Intent as ar, type ApiIntentStatus as as, type GetOwnerIntentsRequest as at, type GetOwnerIntentsResponse as au, type GetIntentsByDepositRequest as av, type GetIntentsByDepositResponse as aw, type GetIntentByHashRequest as ax, type GetIntentByHashResponse as ay, type RegisterPayeeDetailsRequest as az, type AttestationServiceSellerVerifyResponse as b, type OrderDirection$1 as b$, type SellerCredentialProbeResponse as b0, type FulfillIntentAttestationResponse as b1, type AttestationServiceSellerCredentialProbeResponse as b2, type BuyerTeePaymentParams as b3, type BuyerTeePaymentProofInput as b4, type BuyerTeeSessionMaterial as b5, type CuratorSellerCredentialStatusResponse as b6, type CuratorSellerVerifyResponse as b7, type RegisteredSellerCredentialPlatform as b8, type UploadSellerCredentialParams as b9, defaultIndexerEndpoint as bA, IndexerDepositService as bB, IndexerRateManagerService as bC, compareEventCursorIdsByRecency as bD, fetchFulfillmentAndPayment as bE, type DepositEntity$1 as bF, type IntentFulfilledEntity as bG, type IntentFulfillmentAmountsEntity as bH, type DepositPaymentMethodEntity$1 as bI, type MethodCurrencyEntity$1 as bJ, type IntentStatus as bK, type RateManagerEntity as bL, type RateManagerRateEntity as bM, type RateManagerDelegationEntity as bN, type ManagerAggregateStatsEntity as bO, type ManagerStatsEntity as bP, type ManagerDailySnapshotEntity as bQ, type RateManagerListItem as bR, type RateManagerDetail as bS, type ManualRateUpdateEntity as bT, type OracleConfigUpdateEntity as bU, type DepositFundActivityEntity$1 as bV, type DepositDailySnapshotEntity$1 as bW, type DepositFundActivityType$1 as bX, type DepositFilter as bY, type PaginationOptions as bZ, type DepositOrderField as b_, type RegisteredUploadSellerCredentialParams as ba, type UploadSellerCredentialOptions as bb, type GetSellerCredentialStatusParams as bc, type UploadPayPalGoogleOAuthSellerCredentialParams as bd, type UploadVenmoGoogleOAuthSellerCredentialParams as be, type UploadZelleGoogleOAuthSellerCredentialParams as bf, type UploadGoogleOAuthSellerCredentialParams as bg, type VerifySellerPaymentParams as bh, type IdentityAttestationActionType as bi, type IdentityAttestationOutput as bj, type IdentityAttestationOutputFor as bk, type IdentityAttestationParams as bl, type MakerIdentityAttestationRequestBody as bm, type MakerIdentityPlatform as bn, type OnchainCurrency as bo, type DepositVerifierData as bp, type PreparedTransaction as bq, type OrderStats as br, type DepositIntentStatistics as bs, type TakerTier as bt, type TakerTierStats as bu, type TakerTierSource as bv, type PlatformLimit as bw, type PlatformRiskLevel as bx, type OrderbookEntry as by, IndexerClient as bz, type SellerCredentialUploadInput as c, type RateManagerFilter as c0, type RateManagerPaginationOptions as c1, type RateManagerDelegationPaginationOptions as c2, type RateManagerOrderField as c3, type OrderDirection as c4, type DeploymentEnv as c5, type FulfillmentRecord as c6, type PaymentVerifiedRecord as c7, type FulfillmentAndPaymentResponse as c8, PAYMENT_PLATFORMS as c9, isZeroRateManagerId as cA, normalizeRateManagerId as cB, normalizeRegistry as cC, getDelegationRoute as cD, classifyDelegationState as cE, type DelegationRoute as cF, type DelegationState as cG, type DelegationDepositTarget as cH, type BatchResult as cI, type SendTransactionFn as cJ, type SendBatchFn as cK, ZERO_ADDRESS as cL, asErrorMessage as cM, assertDelegationMethodSupport as cN, type PaymentPlatformType as ca, Currency as cb, currencyInfo as cc, getCurrencyInfoFromHash as cd, getCurrencyInfoFromCountryCode as ce, getCurrencyCodeFromHash as cf, isSupportedCurrencyHash as cg, mapConversionRatesToOnchainMinRate as ch, type CurrencyData as ci, getContracts as cj, getRateManagerContracts as ck, getPaymentMethodsCatalog as cl, getGatingServiceAddress as cm, type RuntimeEnv as cn, parseDepositView as co, parseIntentView as cp, enrichPvDepositView as cq, enrichPvIntentView as cr, type PV_DepositView as cs, type PV_Deposit as ct, type PV_PaymentMethodData as cu, type PV_Currency as cv, type PV_ReferralFee as cw, type PV_IntentView as cx, type PV_Intent as cy, ZERO_RATE_MANAGER_ID as cz, type SellerCredentialUploadPlatform as d, type SellerCredentialAttestationRuntime as e, type AttestationServiceSellerCredentialUploadResponse as f, type BuyerTeeSessionMaterialEncryptionInput as g, type GoogleOAuthSellerCredentialUploadBodyByPlatform as h, type BestByPlatformResponse as i, type ValidatePayeeDetailsResponse as j, type PostDepositDetailsResponse as k, type GetPayeeDetailsRequest as l, type GetPayeeDetailsResponse as m, type GetOwnerDepositsRequest as n, type GetOwnerDepositsResponse as o, type GetTakerTierRequest as p, type GetTakerTierResponse as q, type GetDepositBundleParams as r, type ApiAdapterOptions as s, type GetDepositBundleResponse as t, type GetOrderbookParams as u, type GetOrderbookResponse as v, type CurrencyType as w, type PaymentMethodCatalog as x, type TxOverrides as y, type SignalIntentReferralFee as z };
@@ -1015,6 +1015,11 @@ type FulfillIntentParams = {
1015
1015
  proof: BuyerTeePaymentProofInput;
1016
1016
  /** Optional attestation timestamp buffer override in milliseconds */
1017
1017
  timestampBufferMs?: number | string;
1018
+ /**
1019
+ * Alternate attestation-service origins, tried after network failures only.
1020
+ * Omit for the default Railway proxy; pass [] to disable fallback.
1021
+ */
1022
+ attestationServiceFallbackUrls?: string[];
1018
1023
  /** Override the attestation service base URL */
1019
1024
  attestationServiceUrl?: string;
1020
1025
  /** Optional hook payload passed to orchestrator */
@@ -1101,7 +1106,7 @@ type PostDepositDetailsResponse = {
1101
1106
  */
1102
1107
  type RegisterPayeeDetailsRequest = PostDepositDetailsRequest;
1103
1108
  type RegisterPayeeDetailsResponse = PostDepositDetailsResponse;
1104
- type SellerPlatform = 'venmo' | 'cashapp' | 'wise' | 'paypal';
1109
+ type SellerPlatform = 'venmo' | 'cashapp' | 'wise' | 'paypal' | 'zelle';
1105
1110
  type VenmoSessionMaterial = {
1106
1111
  recipientUsername: string;
1107
1112
  accountId: string;
@@ -1134,7 +1139,7 @@ type WiseProfileNotFound = {
1134
1139
  profileId: string;
1135
1140
  profiles: WiseProfileInfo[];
1136
1141
  };
1137
- type GoogleOAuthSellerCredentialPlatform = Extract<SellerPlatform, 'paypal' | 'venmo'>;
1142
+ type GoogleOAuthSellerCredentialPlatform = Extract<SellerPlatform, 'paypal' | 'venmo' | 'zelle'>;
1138
1143
  type PayPalGoogleOAuthSellerCredentialUploadBody = {
1139
1144
  payeeEmail: string;
1140
1145
  authorizationCode: string;
@@ -1145,9 +1150,15 @@ type VenmoGoogleOAuthSellerCredentialUploadBody = {
1145
1150
  authorizationCode: string;
1146
1151
  redirectUri: string;
1147
1152
  };
1153
+ type ZelleGoogleOAuthSellerCredentialUploadBody = {
1154
+ payeeId: string;
1155
+ authorizationCode: string;
1156
+ redirectUri: string;
1157
+ };
1148
1158
  type GoogleOAuthSellerCredentialUploadBodyByPlatform = {
1149
1159
  paypal: PayPalGoogleOAuthSellerCredentialUploadBody;
1150
1160
  venmo: VenmoGoogleOAuthSellerCredentialUploadBody;
1161
+ zelle: ZelleGoogleOAuthSellerCredentialUploadBody;
1151
1162
  };
1152
1163
  type VenmoCredentialUploadInput = {
1153
1164
  payeeId: string;
@@ -1228,12 +1239,23 @@ type BuyerTeePaymentProofInput = {
1228
1239
  type BuyerTeeSessionMaterial = Record<string, string>;
1229
1240
  type BuyerTeeSessionMaterialEncryptionInput = {
1230
1241
  actionType: string;
1242
+ /**
1243
+ * Alternate attestation-service origins, tried after network failures only.
1244
+ * Omit for the default Railway proxy; pass [] to disable fallback.
1245
+ */
1246
+ attestationServiceFallbackUrls?: string[];
1231
1247
  attestationRuntime?: SellerCredentialAttestationRuntime;
1232
1248
  attestationServiceUrl: string;
1233
1249
  platform: string;
1234
1250
  sessionMaterial: BuyerTeeSessionMaterial;
1235
1251
  timeoutMs?: number | null;
1236
1252
  };
1253
+ type BuyerTeeVerifyPaymentBody = {
1254
+ encryptedSessionMaterial: string;
1255
+ chainId: number;
1256
+ intent: SellerVerifyIntentDetails;
1257
+ params: BuyerTeePaymentParams;
1258
+ };
1237
1259
  type MakerIdentityPlatform = Extract<IdentityPlatform, 'paypal' | 'wise'>;
1238
1260
  type IdentityAttestationParams = IdentityParamsByPlatform[IdentityPlatform] | Record<string, string | number | boolean>;
1239
1261
  type IdentityAttestationRequestBody = {
@@ -1353,6 +1375,11 @@ type UploadSellerCredentialBundleParams = {
1353
1375
  }[RegisteredSellerCredentialPlatform];
1354
1376
  type UploadSellerCredentialOptions = {
1355
1377
  baseApiUrl?: string;
1378
+ /**
1379
+ * Alternate attestation-service origins, tried after network failures only.
1380
+ * Omit for the default Railway proxy; pass [] to disable fallback.
1381
+ */
1382
+ attestationServiceFallbackUrls?: string[];
1356
1383
  attestationServiceUrl?: string;
1357
1384
  timeoutMs?: number;
1358
1385
  attestationRuntime?: SellerCredentialAttestationRuntime;
@@ -1374,7 +1401,11 @@ type UploadVenmoGoogleOAuthSellerCredentialParams = GoogleOAuthSellerCredentialB
1374
1401
  platform: 'venmo';
1375
1402
  accountId: string;
1376
1403
  };
1377
- type UploadGoogleOAuthSellerCredentialParams = UploadPayPalGoogleOAuthSellerCredentialParams | UploadVenmoGoogleOAuthSellerCredentialParams;
1404
+ type UploadZelleGoogleOAuthSellerCredentialParams = GoogleOAuthSellerCredentialBaseParams & {
1405
+ platform: 'zelle';
1406
+ payeeId: string;
1407
+ };
1408
+ type UploadGoogleOAuthSellerCredentialParams = UploadPayPalGoogleOAuthSellerCredentialParams | UploadVenmoGoogleOAuthSellerCredentialParams | UploadZelleGoogleOAuthSellerCredentialParams;
1378
1409
  type VerifySellerPaymentParams = {
1379
1410
  platform: SellerPlatform;
1380
1411
  } & SellerVerifyProxyBody;
@@ -1840,7 +1871,16 @@ type PlatformLimit = {
1840
1871
  cooldownHours: number;
1841
1872
  isLocked: boolean;
1842
1873
  minTierRequired: TakerTierLevel | null;
1874
+ /**
1875
+ * Whether the rail is chargeback-reversible. Reversible rails backed by a
1876
+ * seller-automated-release (SAR) credential are takeable only through Peer
1877
+ * Pay, so the intent-sign path rejects them with "peer pay only". Optional:
1878
+ * older curator deployments (current prod) omit this field.
1879
+ */
1880
+ reversible?: boolean;
1843
1881
  };
1882
+ /** How the curator resolved the taker tier (see curator tier engine). */
1883
+ type TakerTierSource = 'computed' | 'fallback' | 'override' | 'blocklist' | 'peer_president';
1844
1884
  type TakerTier = {
1845
1885
  owner: string;
1846
1886
  chainId: number;
@@ -1848,7 +1888,7 @@ type TakerTier = {
1848
1888
  perIntentCapBaseUnits: string;
1849
1889
  perIntentCapDisplay: string;
1850
1890
  lastUpdated: string;
1851
- source: 'computed' | 'fallback';
1891
+ source: TakerTierSource;
1852
1892
  stats: TakerTierStats | null;
1853
1893
  cooldownHours: number;
1854
1894
  cooldownSeconds: number;
@@ -1856,6 +1896,30 @@ type TakerTier = {
1856
1896
  cooldownRemainingSeconds: number;
1857
1897
  nextIntentAvailableAt: string | null;
1858
1898
  platformLimits?: PlatformLimit[];
1899
+ /**
1900
+ * Server-authoritative tier fields (curator PR #461/#463 contract). All
1901
+ * optional because the current production deployment still serves the older
1902
+ * payload that omits them — read them when present and fall back gracefully.
1903
+ * Amounts are USDC base-unit strings (6 decimals).
1904
+ */
1905
+ /** Base per-intent cap before platform risk multipliers (alias of perIntentCapBaseUnits). */
1906
+ maxOrderSize?: string;
1907
+ maxOrderSizeDisplay?: string;
1908
+ /** Lifetime Peer-Pay maker volume floor that qualifies the current tier. */
1909
+ minVolumeForTier?: string;
1910
+ minVolumeForTierDisplay?: string;
1911
+ /** Next tier up the volume ladder, or null at the top / off-ladder tiers. */
1912
+ nextTier?: TakerTierLevel | null;
1913
+ /** Remaining Peer-Pay maker volume to reach `nextTier`. */
1914
+ volumeToNextTier?: string | null;
1915
+ volumeToNextTierDisplay?: string | null;
1916
+ nextTierMaxOrderSize?: string | null;
1917
+ nextTierMaxOrderSizeDisplay?: string | null;
1918
+ /**
1919
+ * Lifetime aggregate Peer-Pay maker volume driving tier qualification. Only
1920
+ * present on curator deployments with the PR #461/#463 contract (preprod).
1921
+ */
1922
+ peerPayVolume?: string;
1859
1923
  };
1860
1924
  type GetTakerTierRequest = {
1861
1925
  owner: string;
@@ -1872,8 +1936,10 @@ type GetDepositBundleResponse = DepositBundleResponse;
1872
1936
  type GetOrderbookParams = {
1873
1937
  currency: string;
1874
1938
  paymentPlatform?: string;
1939
+ publicOnly?: boolean;
1875
1940
  sortBy?: 'price' | 'available' | 'limits';
1876
1941
  sortDirection?: 'asc' | 'desc';
1942
+ sellerAutomatedRelease?: 'include' | 'exclude' | 'only';
1877
1943
  limit?: number;
1878
1944
  chainId?: number;
1879
1945
  token?: string;
@@ -1891,6 +1957,7 @@ type OrderbookEntry = {
1891
1957
  currency: string;
1892
1958
  paymentMethodHash: string;
1893
1959
  payeeDetailsHash: string;
1960
+ sellerAutomatedReleaseAvailable?: boolean;
1894
1961
  escrowAddress: string;
1895
1962
  chainId: number;
1896
1963
  offchainId?: string;
@@ -1903,6 +1970,7 @@ type GetOrderbookResponse = {
1903
1970
  paymentPlatform: string | null;
1904
1971
  sortBy: string;
1905
1972
  sortDirection: string;
1973
+ sellerAutomatedRelease?: 'include' | 'exclude' | 'only';
1906
1974
  internalDetailsIncluded: boolean;
1907
1975
  generatedAt: string;
1908
1976
  entries: OrderbookEntry[];
@@ -2028,6 +2096,11 @@ type FulfillIntentMethodParams = {
2028
2096
  proof: BuyerTeePaymentProofInput;
2029
2097
  /** Allowed timestamp variance in ms (default: 300000ms) */
2030
2098
  timestampBufferMs?: string;
2099
+ /**
2100
+ * Alternate attestation-service origins, tried after network failures only.
2101
+ * Omit for the default Railway proxy; pass [] to disable fallback.
2102
+ */
2103
+ attestationServiceFallbackUrls?: string[];
2031
2104
  /** Override attestation service URL */
2032
2105
  attestationServiceUrl?: string;
2033
2106
  /** Optional orchestrator override */
@@ -3650,4 +3723,4 @@ type SendBatchFn = (txs: Array<{
3650
3723
  value?: bigint;
3651
3724
  }>) => Promise<string>;
3652
3725
 
3653
- export { type BestByPlatformResponseObject as $, type AttestationServiceIdentityResponse as A, type BuyerTeeSessionMaterialEncryptionInput as B, type CuratorSellerCredentialUploadResponse as C, type DepositWithRelations as D, type Zkp2pNextOptions as E, type FulfillIntentMethodParams as F, type GoogleOAuthSellerCredentialPlatform as G, type AuthorizationTokenProvider as H, type IntentEntity$1 as I, type TimeoutConfig as J, type ActionCallback as K, type CreateDepositParams as L, type CreateDepositConversionRate as M, type Range as N, type SignalIntentParams as O, type PostDepositDetailsRequest as P, type QuotesBestByPlatformRequest as Q, type ReferrerFeeConfig as R, type SellerCredentialBundle as S, type TakerTierLevel as T, type UploadSellerCredentialBundleParams as U, type ValidatePayeeDetailsRequest as V, type WithdrawDepositParams as W, type FulfillIntentParams as X, type ReleaseFundsToPayerParams as Y, Zkp2pClient as Z, type CancelIntentParams as _, type IdentityAttestationRequestBody as a, type FulfillIntentAttestationResponse as a$, type GetBestByPlatformResponse as a0, type GetBestByPlatformResponseObject as a1, type GetPlatformQuote as a2, type PlatformQuote as a3, type QuoteRequest as a4, type GetNearbyQuote as a5, type GetNearbySuggestions as a6, type GetQuoteResponse as a7, type GetQuoteResponseObject as a8, type GetQuoteSingleResponse as a9, type VenmoSessionMaterial as aA, type CashAppSessionMaterial as aB, type WiseSessionMaterial as aC, type WiseProfileInfo as aD, type WiseProfileSelectionRequired as aE, type WiseProfileNotFound as aF, type PayPalGoogleOAuthSellerCredentialUploadBody as aG, type VenmoGoogleOAuthSellerCredentialUploadBody as aH, type VenmoCredentialUploadInput as aI, type CashAppCredentialUploadInput as aJ, type WiseCredentialUploadInput as aK, type SellerCredentialUploadInputByPlatform as aL, type SellerCiphertextBundle as aM, type SellerSignedCiphertextBundle as aN, type SellerVerifyIntentDetails as aO, type SellerVerifyInput as aP, type SellerProbeInput as aQ, type SellerCredentialBundleUpload as aR, type SellerCredentialStatusValue as aS, type SellerCredentialStatus as aT, type SellerVerifyProxyBody as aU, type SellerTypedDataField as aV, type SellerTypedDataSpec as aW, type SellerPaymentTypedDataValue as aX, type SellerAttestationOutput as aY, type SellerCredentialProbeResponse as aZ, type AttestationServiceSellerVerifyResponse as a_, type QuoteResponse as aa, type QuoteResponseObject as ab, type QuoteSingleResponse as ac, type QuoteIntentResponse as ad, type QuoteFeesResponse as ae, type FiatResponse as af, type TokenResponse as ag, type NearbyQuote as ah, type NearbySuggestions as ai, type ApiDeposit as aj, type DepositVerifier as ak, type DepositVerifierCurrency as al, type DepositStatus as am, type GetDepositByIdRequest as an, type GetDepositByIdResponse as ao, type Intent as ap, type ApiIntentStatus as aq, type GetOwnerIntentsRequest as ar, type GetOwnerIntentsResponse as as, type GetIntentsByDepositRequest as at, type GetIntentsByDepositResponse as au, type GetIntentByHashRequest as av, type GetIntentByHashResponse as aw, type RegisterPayeeDetailsRequest as ax, type RegisterPayeeDetailsResponse as ay, type SellerPlatform as az, type SellerCredentialUploadInput as b, type RateManagerOrderField as b$, type AttestationServiceSellerCredentialProbeResponse as b0, type BuyerTeePaymentParams as b1, type BuyerTeePaymentProofInput as b2, type BuyerTeeSessionMaterial as b3, type CuratorSellerCredentialStatusResponse as b4, type CuratorSellerVerifyResponse as b5, type RegisteredSellerCredentialPlatform as b6, type UploadSellerCredentialParams as b7, type RegisteredUploadSellerCredentialParams as b8, type UploadSellerCredentialOptions as b9, fetchFulfillmentAndPayment as bA, type DepositEntity$1 as bB, type IntentFulfilledEntity as bC, type IntentFulfillmentAmountsEntity as bD, type DepositPaymentMethodEntity$1 as bE, type MethodCurrencyEntity$1 as bF, type IntentStatus as bG, type RateManagerEntity as bH, type RateManagerRateEntity as bI, type RateManagerDelegationEntity as bJ, type ManagerAggregateStatsEntity as bK, type ManagerStatsEntity as bL, type ManagerDailySnapshotEntity as bM, type RateManagerListItem as bN, type RateManagerDetail as bO, type ManualRateUpdateEntity as bP, type OracleConfigUpdateEntity as bQ, type DepositFundActivityEntity$1 as bR, type DepositDailySnapshotEntity$1 as bS, type DepositFundActivityType$1 as bT, type DepositFilter as bU, type PaginationOptions as bV, type DepositOrderField as bW, type OrderDirection$1 as bX, type RateManagerFilter as bY, type RateManagerPaginationOptions as bZ, type RateManagerDelegationPaginationOptions as b_, type GetSellerCredentialStatusParams as ba, type UploadPayPalGoogleOAuthSellerCredentialParams as bb, type UploadVenmoGoogleOAuthSellerCredentialParams as bc, type UploadGoogleOAuthSellerCredentialParams as bd, type VerifySellerPaymentParams as be, type IdentityAttestationActionType as bf, type IdentityAttestationOutput as bg, type IdentityAttestationOutputFor as bh, type IdentityAttestationParams as bi, type MakerIdentityAttestationRequestBody as bj, type MakerIdentityPlatform as bk, type OnchainCurrency as bl, type DepositVerifierData as bm, type PreparedTransaction as bn, type OrderStats as bo, type DepositIntentStatistics as bp, type TakerTier as bq, type TakerTierStats as br, type PlatformLimit as bs, type PlatformRiskLevel as bt, type OrderbookEntry as bu, IndexerClient as bv, defaultIndexerEndpoint as bw, IndexerDepositService as bx, IndexerRateManagerService as by, compareEventCursorIdsByRecency as bz, type SellerCredentialUploadPlatform as c, type OrderDirection as c0, type DeploymentEnv as c1, type FulfillmentRecord as c2, type PaymentVerifiedRecord as c3, type FulfillmentAndPaymentResponse as c4, PAYMENT_PLATFORMS as c5, type PaymentPlatformType as c6, Currency as c7, currencyInfo as c8, getCurrencyInfoFromHash as c9, classifyDelegationState as cA, type DelegationRoute as cB, type DelegationState as cC, type DelegationDepositTarget as cD, type BatchResult as cE, type SendTransactionFn as cF, type SendBatchFn as cG, ZERO_ADDRESS as cH, asErrorMessage as cI, assertDelegationMethodSupport as cJ, getCurrencyInfoFromCountryCode as ca, getCurrencyCodeFromHash as cb, isSupportedCurrencyHash as cc, mapConversionRatesToOnchainMinRate as cd, type CurrencyData as ce, getContracts as cf, getRateManagerContracts as cg, getPaymentMethodsCatalog as ch, getGatingServiceAddress as ci, type RuntimeEnv as cj, parseDepositView as ck, parseIntentView as cl, enrichPvDepositView as cm, enrichPvIntentView as cn, type PV_DepositView as co, type PV_Deposit as cp, type PV_PaymentMethodData as cq, type PV_Currency as cr, type PV_ReferralFee as cs, type PV_IntentView as ct, type PV_Intent as cu, ZERO_RATE_MANAGER_ID as cv, isZeroRateManagerId as cw, normalizeRateManagerId as cx, normalizeRegistry as cy, getDelegationRoute as cz, type SellerCredentialAttestationRuntime as d, type AttestationServiceSellerCredentialUploadResponse as e, type GoogleOAuthSellerCredentialUploadBodyByPlatform as f, type BestByPlatformResponse as g, type ValidatePayeeDetailsResponse as h, type PostDepositDetailsResponse as i, type GetPayeeDetailsRequest as j, type GetPayeeDetailsResponse as k, type GetOwnerDepositsRequest as l, type GetOwnerDepositsResponse as m, type GetTakerTierRequest as n, type GetTakerTierResponse as o, type GetDepositBundleParams as p, type ApiAdapterOptions as q, type GetDepositBundleResponse as r, type GetOrderbookParams as s, type GetOrderbookResponse as t, type CurrencyType as u, type PaymentMethodCatalog as v, type TxOverrides as w, type SignalIntentReferralFee as x, type SignalIntentMethodParams as y, type CancelIntentMethodParams as z };
3726
+ export { type ReleaseFundsToPayerParams as $, type AttestationServiceIdentityResponse as A, type BuyerTeeVerifyPaymentBody as B, type CuratorSellerCredentialUploadResponse as C, type DepositWithRelations as D, type SignalIntentMethodParams as E, type FulfillIntentMethodParams as F, type GoogleOAuthSellerCredentialPlatform as G, type CancelIntentMethodParams as H, type IntentEntity$1 as I, type Zkp2pNextOptions as J, type AuthorizationTokenProvider as K, type TimeoutConfig as L, type ActionCallback as M, type CreateDepositParams as N, type CreateDepositConversionRate as O, type PostDepositDetailsRequest as P, type QuotesBestByPlatformRequest as Q, type ReferrerFeeConfig as R, type SellerCredentialBundle as S, type TakerTierLevel as T, type UploadSellerCredentialBundleParams as U, type ValidatePayeeDetailsRequest as V, type Range as W, type WithdrawDepositParams as X, type SignalIntentParams as Y, Zkp2pClient as Z, type FulfillIntentParams as _, type IdentityAttestationRequestBody as a, type SellerAttestationOutput as a$, type CancelIntentParams as a0, type BestByPlatformResponseObject as a1, type GetBestByPlatformResponse as a2, type GetBestByPlatformResponseObject as a3, type GetPlatformQuote as a4, type PlatformQuote as a5, type QuoteRequest as a6, type GetNearbyQuote as a7, type GetNearbySuggestions as a8, type GetQuoteResponse as a9, type RegisterPayeeDetailsResponse as aA, type SellerPlatform as aB, type VenmoSessionMaterial as aC, type CashAppSessionMaterial as aD, type WiseSessionMaterial as aE, type WiseProfileInfo as aF, type WiseProfileSelectionRequired as aG, type WiseProfileNotFound as aH, type PayPalGoogleOAuthSellerCredentialUploadBody as aI, type VenmoGoogleOAuthSellerCredentialUploadBody as aJ, type ZelleGoogleOAuthSellerCredentialUploadBody as aK, type VenmoCredentialUploadInput as aL, type CashAppCredentialUploadInput as aM, type WiseCredentialUploadInput as aN, type SellerCredentialUploadInputByPlatform as aO, type SellerCiphertextBundle as aP, type SellerSignedCiphertextBundle as aQ, type SellerVerifyIntentDetails as aR, type SellerVerifyInput as aS, type SellerProbeInput as aT, type SellerCredentialBundleUpload as aU, type SellerCredentialStatusValue as aV, type SellerCredentialStatus as aW, type SellerVerifyProxyBody as aX, type SellerTypedDataField as aY, type SellerTypedDataSpec as aZ, type SellerPaymentTypedDataValue as a_, type GetQuoteResponseObject as aa, type GetQuoteSingleResponse as ab, type QuoteResponse as ac, type QuoteResponseObject as ad, type QuoteSingleResponse as ae, type QuoteIntentResponse as af, type QuoteFeesResponse as ag, type FiatResponse as ah, type TokenResponse as ai, type NearbyQuote as aj, type NearbySuggestions as ak, type ApiDeposit as al, type DepositVerifier as am, type DepositVerifierCurrency as an, type DepositStatus as ao, type GetDepositByIdRequest as ap, type GetDepositByIdResponse as aq, type Intent as ar, type ApiIntentStatus as as, type GetOwnerIntentsRequest as at, type GetOwnerIntentsResponse as au, type GetIntentsByDepositRequest as av, type GetIntentsByDepositResponse as aw, type GetIntentByHashRequest as ax, type GetIntentByHashResponse as ay, type RegisterPayeeDetailsRequest as az, type AttestationServiceSellerVerifyResponse as b, type OrderDirection$1 as b$, type SellerCredentialProbeResponse as b0, type FulfillIntentAttestationResponse as b1, type AttestationServiceSellerCredentialProbeResponse as b2, type BuyerTeePaymentParams as b3, type BuyerTeePaymentProofInput as b4, type BuyerTeeSessionMaterial as b5, type CuratorSellerCredentialStatusResponse as b6, type CuratorSellerVerifyResponse as b7, type RegisteredSellerCredentialPlatform as b8, type UploadSellerCredentialParams as b9, defaultIndexerEndpoint as bA, IndexerDepositService as bB, IndexerRateManagerService as bC, compareEventCursorIdsByRecency as bD, fetchFulfillmentAndPayment as bE, type DepositEntity$1 as bF, type IntentFulfilledEntity as bG, type IntentFulfillmentAmountsEntity as bH, type DepositPaymentMethodEntity$1 as bI, type MethodCurrencyEntity$1 as bJ, type IntentStatus as bK, type RateManagerEntity as bL, type RateManagerRateEntity as bM, type RateManagerDelegationEntity as bN, type ManagerAggregateStatsEntity as bO, type ManagerStatsEntity as bP, type ManagerDailySnapshotEntity as bQ, type RateManagerListItem as bR, type RateManagerDetail as bS, type ManualRateUpdateEntity as bT, type OracleConfigUpdateEntity as bU, type DepositFundActivityEntity$1 as bV, type DepositDailySnapshotEntity$1 as bW, type DepositFundActivityType$1 as bX, type DepositFilter as bY, type PaginationOptions as bZ, type DepositOrderField as b_, type RegisteredUploadSellerCredentialParams as ba, type UploadSellerCredentialOptions as bb, type GetSellerCredentialStatusParams as bc, type UploadPayPalGoogleOAuthSellerCredentialParams as bd, type UploadVenmoGoogleOAuthSellerCredentialParams as be, type UploadZelleGoogleOAuthSellerCredentialParams as bf, type UploadGoogleOAuthSellerCredentialParams as bg, type VerifySellerPaymentParams as bh, type IdentityAttestationActionType as bi, type IdentityAttestationOutput as bj, type IdentityAttestationOutputFor as bk, type IdentityAttestationParams as bl, type MakerIdentityAttestationRequestBody as bm, type MakerIdentityPlatform as bn, type OnchainCurrency as bo, type DepositVerifierData as bp, type PreparedTransaction as bq, type OrderStats as br, type DepositIntentStatistics as bs, type TakerTier as bt, type TakerTierStats as bu, type TakerTierSource as bv, type PlatformLimit as bw, type PlatformRiskLevel as bx, type OrderbookEntry as by, IndexerClient as bz, type SellerCredentialUploadInput as c, type RateManagerFilter as c0, type RateManagerPaginationOptions as c1, type RateManagerDelegationPaginationOptions as c2, type RateManagerOrderField as c3, type OrderDirection as c4, type DeploymentEnv as c5, type FulfillmentRecord as c6, type PaymentVerifiedRecord as c7, type FulfillmentAndPaymentResponse as c8, PAYMENT_PLATFORMS as c9, isZeroRateManagerId as cA, normalizeRateManagerId as cB, normalizeRegistry as cC, getDelegationRoute as cD, classifyDelegationState as cE, type DelegationRoute as cF, type DelegationState as cG, type DelegationDepositTarget as cH, type BatchResult as cI, type SendTransactionFn as cJ, type SendBatchFn as cK, ZERO_ADDRESS as cL, asErrorMessage as cM, assertDelegationMethodSupport as cN, type PaymentPlatformType as ca, Currency as cb, currencyInfo as cc, getCurrencyInfoFromHash as cd, getCurrencyInfoFromCountryCode as ce, getCurrencyCodeFromHash as cf, isSupportedCurrencyHash as cg, mapConversionRatesToOnchainMinRate as ch, type CurrencyData as ci, getContracts as cj, getRateManagerContracts as ck, getPaymentMethodsCatalog as cl, getGatingServiceAddress as cm, type RuntimeEnv as cn, parseDepositView as co, parseIntentView as cp, enrichPvDepositView as cq, enrichPvIntentView as cr, type PV_DepositView as cs, type PV_Deposit as ct, type PV_PaymentMethodData as cu, type PV_Currency as cv, type PV_ReferralFee as cw, type PV_IntentView as cx, type PV_Intent as cy, ZERO_RATE_MANAGER_ID as cz, type SellerCredentialUploadPlatform as d, type SellerCredentialAttestationRuntime as e, type AttestationServiceSellerCredentialUploadResponse as f, type BuyerTeeSessionMaterialEncryptionInput as g, type GoogleOAuthSellerCredentialUploadBodyByPlatform as h, type BestByPlatformResponse as i, type ValidatePayeeDetailsResponse as j, type PostDepositDetailsResponse as k, type GetPayeeDetailsRequest as l, type GetPayeeDetailsResponse as m, type GetOwnerDepositsRequest as n, type GetOwnerDepositsResponse as o, type GetTakerTierRequest as p, type GetTakerTierResponse as q, type GetDepositBundleParams as r, type ApiAdapterOptions as s, type GetDepositBundleResponse as t, type GetOrderbookParams as u, type GetOrderbookResponse as v, type CurrencyType as w, type PaymentMethodCatalog as x, type TxOverrides as y, type SignalIntentReferralFee as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zkp2p/sdk",
3
- "version": "0.5.8",
3
+ "version": "0.6.2",
4
4
  "description": "ZKP2P Client SDK - TypeScript SDK for deposit management, liquidity provision, and onramping",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.cjs",
@@ -87,7 +87,7 @@
87
87
  "node": ">=22"
88
88
  },
89
89
  "dependencies": {
90
- "@zkp2p/indexer-schema": "0.2.3",
90
+ "@zkp2p/indexer-schema": "0.5.0",
91
91
  "@zkp2p/contracts-v2": "0.2.4",
92
92
  "@zkp2p/zkp2p-attestation": "1.6.3",
93
93
  "ethers": "^6.0.0",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/takerTiers.ts","../src/react/hooks/vaultUtils.ts"],"names":[],"mappings":"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","file":"chunk-TGMRXUP2.mjs","sourcesContent":["import type { TakerTierLevel } from './types';\n\n/**\n * Canonical taker tier schedule — the single client-side source of truth for\n * per-intent caps and volume thresholds. Mirrors the curator's authoritative\n * tier engine (curator `src/common/services/tier/tierConstants.ts`), which is\n * what the backend actually enforces.\n *\n * A user's *live* cap (after lock-score penalties and per-platform risk\n * multipliers) always comes from the taker-tier API payload\n * (`TakerTier.perIntentCapBaseUnits` / `nextTierMaxOrderSizeDisplay`). This\n * static schedule is for reference displays that must show every tier at once —\n * the Fees & Tiers ladder — and the forward-looking \"next tier cap\" hint.\n *\n * Ordered highest tier → lowest (PLATINUM first) to match UI display order.\n * PEER_PRESIDENT is invite-only and excluded from the volume ladder.\n */\nexport interface TakerTierScheduleEntry {\n tier: TakerTierLevel;\n /** Per-intent order cap in whole USD (base, before platform risk multipliers). */\n perIntentCapUsd: number;\n /** Inclusive lower bound of lifetime volume (USD) that qualifies for this tier. */\n minVolumeUsd: number;\n /** Inclusive upper bound of lifetime volume (USD); `Infinity` for the top tier. */\n maxVolumeUsd: number;\n}\n\nexport const TAKER_TIER_SCHEDULE: readonly TakerTierScheduleEntry[] = [\n { tier: 'PLATINUM', perIntentCapUsd: 5000, minVolumeUsd: 25000, maxVolumeUsd: Infinity },\n { tier: 'PRO', perIntentCapUsd: 2500, minVolumeUsd: 10000, maxVolumeUsd: 24999 },\n { tier: 'PLUS', perIntentCapUsd: 1000, minVolumeUsd: 2000, maxVolumeUsd: 9999 },\n { tier: 'PEER', perIntentCapUsd: 250, minVolumeUsd: 500, maxVolumeUsd: 1999 },\n { tier: 'PEASANT', perIntentCapUsd: 100, minVolumeUsd: 0, maxVolumeUsd: 499 },\n];\n\n/** Volume-based tier order, lowest → highest, for next-tier progression. */\nexport const TAKER_TIER_ORDER: readonly TakerTierLevel[] = [\n 'PEASANT',\n 'PEER',\n 'PLUS',\n 'PRO',\n 'PLATINUM',\n];\n\n/** Per-intent caps (whole USD) keyed by tier, derived from the schedule. */\nexport const TAKER_TIER_CAPS: Readonly<Record<string, number>> = Object.fromEntries(\n TAKER_TIER_SCHEDULE.map((entry) => [entry.tier, entry.perIntentCapUsd]),\n);\n\n/** The next tier up from `currentTier`, or `null` at the top / for unknown tiers. */\nexport function getNextTakerTier(currentTier: string | undefined): TakerTierLevel | null {\n if (!currentTier) return null;\n const index = TAKER_TIER_ORDER.indexOf(currentTier as TakerTierLevel);\n if (index === -1 || index >= TAKER_TIER_ORDER.length - 1) return null;\n return TAKER_TIER_ORDER[index + 1];\n}\n","import type { Address, Hex } from 'viem';\nimport type { PreparedTransaction } from '../../types/prepared';\n\n// ---------------------------------------------------------------------------\n// Constants\n// ---------------------------------------------------------------------------\n\nexport const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000' as const;\nexport const ZERO_RATE_MANAGER_ID =\n '0x0000000000000000000000000000000000000000000000000000000000000000' as const;\n\n// ---------------------------------------------------------------------------\n// Normalizers\n// ---------------------------------------------------------------------------\n\nexport const normalizeRateManagerId = (value?: string | null): string =>\n (value ?? ZERO_RATE_MANAGER_ID).toLowerCase();\n\nexport const normalizeRegistry = (value?: string | null): string =>\n (value ?? ZERO_ADDRESS).toLowerCase();\n\nexport const isZeroRateManagerId = (value?: string | null): boolean => {\n if (!value) return true;\n const normalized = value.toLowerCase();\n return normalized === ZERO_ADDRESS || normalized === ZERO_RATE_MANAGER_ID;\n};\n\n// ---------------------------------------------------------------------------\n// Error helper\n// ---------------------------------------------------------------------------\n\nexport const asErrorMessage = (error: unknown): string => {\n if (!error) return 'Unknown error';\n if (error instanceof Error) return error.message;\n if (typeof error === 'string') return error;\n\n const anyErr = error as Record<string, unknown>;\n if (typeof anyErr.shortMessage === 'string') return anyErr.shortMessage;\n if (typeof anyErr.details === 'string') return anyErr.details;\n if (typeof anyErr.message === 'string') return anyErr.message;\n\n try {\n return JSON.stringify(error);\n } catch {\n return String(error);\n }\n};\n\n// ---------------------------------------------------------------------------\n// Delegation state classification\n// ---------------------------------------------------------------------------\n\nexport type DelegationState = 'delegated_here' | 'delegated_elsewhere' | 'not_delegated';\n\n/**\n * Classify whether a deposit is delegated to the target vault, delegated\n * elsewhere, or not delegated at all.\n *\n * @param currentRateManagerId The deposit's current rateManagerId (from indexer)\n * @param currentRegistry The deposit's current rateManagerAddress / registry (from indexer)\n * @param targetRateManagerId The vault's rateManagerId we're comparing against\n * @param targetRegistry The vault's registry address we're comparing against\n */\nexport const classifyDelegationState = (\n currentRateManagerId: string | null | undefined,\n currentRegistry: string | null | undefined,\n targetRateManagerId: string,\n targetRegistry: string | null | undefined,\n): DelegationState => {\n if (isZeroRateManagerId(currentRateManagerId)) {\n return 'not_delegated';\n }\n\n const normalizedCurrent = normalizeRateManagerId(currentRateManagerId);\n const normalizedTarget = targetRateManagerId.toLowerCase();\n const normalizedCurrentRegistry = normalizeRegistry(currentRegistry);\n const normalizedTargetRegistry = targetRegistry ? targetRegistry.toLowerCase() : '';\n\n const idsMatch = normalizedCurrent === normalizedTarget;\n const registryMatches = normalizedTargetRegistry\n ? normalizedCurrentRegistry === normalizedTargetRegistry\n : true;\n\n if (idsMatch && registryMatches) {\n return 'delegated_here';\n }\n\n return 'delegated_elsewhere';\n};\n\nexport const assertAtomicDelegationSwitchSupport = (\n requiresSwitch: boolean,\n canBatch: boolean,\n): void => {\n if (!requiresSwitch || canBatch) return;\n throw new Error(\n 'Switching delegation targets requires smart-account batching. Clear the existing delegation first.',\n );\n};\n\n// ---------------------------------------------------------------------------\n// Contract routing\n// ---------------------------------------------------------------------------\n\nexport type DelegationRoute = 'v2';\n\nexport const getDelegationRoute = (_client: unknown, _escrow: Address): DelegationRoute => 'v2';\n\ntype DelegationMethodSupportClient = Partial<\n Record<'setRateManager' | 'clearRateManager', { prepare?: unknown }>\n>;\n\nexport const assertDelegationMethodSupport = (\n client: DelegationMethodSupportClient,\n _route: DelegationRoute,\n action: 'set' | 'clear',\n): void => {\n const method = action === 'set' ? 'setRateManager' : 'clearRateManager';\n if (client?.[method]?.prepare) return;\n throw new Error(`Delegation requires SDK ${method} support`);\n};\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\nexport interface DelegationDepositTarget {\n compositeDepositId: string;\n escrow: Address;\n depositId: bigint;\n currentRateManagerId?: string | null;\n currentRateManagerRegistry?: string | null;\n}\n\nexport interface BatchResult {\n hashes: string[];\n failed: Array<{ compositeDepositId: string; error: string }>;\n}\n\n/**\n * Callback the consumer provides for sending a single prepared transaction.\n * Returns the transaction hash.\n */\nexport type SendTransactionFn = (tx: { to: Address; data: Hex; value?: bigint }) => Promise<string>;\n\n/**\n * Optional callback for batching multiple calls in a single user operation\n * (e.g. via a smart account). If not provided, transactions are sent\n * sequentially via sendTransaction.\n */\nexport type SendBatchFn = (\n txs: Array<{ to: Address; data: Hex; value?: bigint }>,\n) => Promise<string>;\n\n// ---------------------------------------------------------------------------\n// Prepare helpers (used internally by hooks)\n// ---------------------------------------------------------------------------\n\nexport const prepareClearDelegationTx = async (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n client: any,\n params: { escrow: Address; depositId: bigint },\n referrer?: string | string[],\n): Promise<PreparedTransaction> => {\n const route = getDelegationRoute(client, params.escrow);\n assertDelegationMethodSupport(client, route, 'clear');\n return client.clearRateManager.prepare({\n escrowAddress: params.escrow,\n depositId: params.depositId,\n ...(referrer ? { txOverrides: { referrer } } : {}),\n });\n};\n\nexport const prepareSetDelegationTx = async (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n client: any,\n params: {\n escrow: Address;\n depositId: bigint;\n registry: Address;\n rateManagerId: Hex;\n },\n referrer?: string | string[],\n): Promise<PreparedTransaction> => {\n const route = getDelegationRoute(client, params.escrow);\n assertDelegationMethodSupport(client, route, 'set');\n return client.setRateManager.prepare({\n escrowAddress: params.escrow,\n depositId: params.depositId,\n rateManagerAddress: params.registry,\n rateManagerId: params.rateManagerId,\n ...(referrer ? { txOverrides: { referrer } } : {}),\n });\n};\n"]}