@zkp2p/sdk 0.5.8 → 0.6.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.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as ReferrerFeeConfig, S as SellerCredentialBundle, D as DepositWithRelations, I as IntentEntity, a as IdentityAttestationRequestBody, A as AttestationServiceIdentityResponse, b as SellerCredentialUploadInput, c as SellerCredentialUploadPlatform, d as SellerCredentialAttestationRuntime, e as AttestationServiceSellerCredentialUploadResponse, B as BuyerTeeSessionMaterialEncryptionInput, U as UploadSellerCredentialBundleParams, C as CuratorSellerCredentialUploadResponse, G as GoogleOAuthSellerCredentialPlatform, f as GoogleOAuthSellerCredentialUploadBodyByPlatform, Q as QuotesBestByPlatformRequest, g as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, h as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, i as PostDepositDetailsResponse, j as GetPayeeDetailsRequest, k as GetPayeeDetailsResponse, l as GetOwnerDepositsRequest, m as GetOwnerDepositsResponse, n as GetTakerTierRequest, o as GetTakerTierResponse, p as GetDepositBundleParams, q as ApiAdapterOptions, r as GetDepositBundleResponse, s as GetOrderbookParams, t as GetOrderbookResponse, u as CurrencyType, T as TakerTierLevel, v as PaymentMethodCatalog, w as TxOverrides } from './vaultUtils-DOOl9QUP.mjs';
2
- export { K as ActionCallback, aj as ApiDeposit, aq as ApiIntentStatus, b0 as AttestationServiceSellerCredentialProbeResponse, a_ as AttestationServiceSellerVerifyResponse, H as AuthorizationTokenProvider, cE as BatchResult, $ as BestByPlatformResponseObject, b1 as BuyerTeePaymentParams, b2 as BuyerTeePaymentProofInput, b3 as BuyerTeeSessionMaterial, z as CancelIntentMethodParams, _ as CancelIntentParams, aJ as CashAppCredentialUploadInput, aB as CashAppSessionMaterial, M as CreateDepositConversionRate, L as CreateDepositParams, b4 as CuratorSellerCredentialStatusResponse, b5 as CuratorSellerVerifyResponse, c7 as Currency, ce as CurrencyData, cD as DelegationDepositTarget, cB as DelegationRoute, cC as DelegationState, cp as Deposit, cr as DepositCurrency, bp as DepositIntentStatistics, am as DepositStatus, ak as DepositVerifier, al as DepositVerifierCurrency, bm as DepositVerifierData, co as DepositView, af as FiatResponse, a$ as FulfillIntentAttestationResponse, F as FulfillIntentMethodParams, X as FulfillIntentParams, a0 as GetBestByPlatformResponse, a1 as GetBestByPlatformResponseObject, an as GetDepositByIdRequest, ao as GetDepositByIdResponse, av as GetIntentByHashRequest, aw as GetIntentByHashResponse, at as GetIntentsByDepositRequest, au as GetIntentsByDepositResponse, a5 as GetNearbyQuote, a6 as GetNearbySuggestions, ar as GetOwnerIntentsRequest, as as GetOwnerIntentsResponse, a2 as GetPlatformQuote, a7 as GetQuoteResponse, a8 as GetQuoteResponseObject, a9 as GetQuoteSingleResponse, ba as GetSellerCredentialStatusParams, bf as IdentityAttestationActionType, bg as IdentityAttestationOutput, bh as IdentityAttestationOutputFor, bi as IdentityAttestationParams, bv as IndexerClient, c1 as IndexerDeploymentEnv, bB as IndexerDeposit, bS as IndexerDepositDailySnapshot, bU as IndexerDepositFilter, bR as IndexerDepositFundActivity, bT as IndexerDepositFundActivityType, bX as IndexerDepositOrderDirection, bW as IndexerDepositOrderField, bV as IndexerDepositPagination, bE as IndexerDepositPaymentMethod, bx as IndexerDepositService, c4 as IndexerFulfillmentAndPaymentResponse, c2 as IndexerFulfillmentRecord, bC as IndexerIntentFulfilled, bD as IndexerIntentFulfillmentAmounts, bG as IndexerIntentStatus, bK as IndexerManagerAggregateStats, bM as IndexerManagerDailySnapshot, bL as IndexerManagerStats, bP as IndexerManualRateUpdate, bF as IndexerMethodCurrency, bQ as IndexerOracleConfigUpdate, c3 as IndexerPaymentVerifiedRecord, bH as IndexerRateManager, bJ as IndexerRateManagerDelegation, b_ as IndexerRateManagerDelegationPagination, bO as IndexerRateManagerDetail, bY as IndexerRateManagerFilter, bN as IndexerRateManagerListItem, c0 as IndexerRateManagerOrderDirection, b$ as IndexerRateManagerOrderField, bZ as IndexerRateManagerPagination, bI as IndexerRateManagerRate, by as IndexerRateManagerService, ap as Intent, ct as IntentView, bj as MakerIdentityAttestationRequestBody, bk as MakerIdentityPlatform, ah as NearbyQuote, ai as NearbySuggestions, Z as OfframpClient, bl as OnchainCurrency, cu as OnchainIntent, bo as OrderStats, bu as OrderbookEntry, c5 as PAYMENT_PLATFORMS, aG as PayPalGoogleOAuthSellerCredentialUploadBody, cq as PaymentMethodData, c6 as PaymentPlatformType, bs as PlatformLimit, a3 as PlatformQuote, bt as PlatformRiskLevel, bn as PreparedTransaction, ae as QuoteFeesResponse, ad as QuoteIntentResponse, a4 as QuoteRequest, aa as QuoteResponse, ab as QuoteResponseObject, ac as QuoteSingleResponse, N as Range, cs as ReferralFee, ax as RegisterPayeeDetailsRequest, ay as RegisterPayeeDetailsResponse, b6 as RegisteredSellerCredentialPlatform, b8 as RegisteredUploadSellerCredentialParams, Y as ReleaseFundsToPayerParams, cj as RuntimeEnv, aY as SellerAttestationOutput, aM as SellerCiphertextBundle, aR as SellerCredentialBundleUpload, aZ as SellerCredentialProbeResponse, aT as SellerCredentialStatus, aS as SellerCredentialStatusValue, aL as SellerCredentialUploadInputByPlatform, aX as SellerPaymentTypedDataValue, az as SellerPlatform, aQ as SellerProbeInput, aN as SellerSignedCiphertextBundle, aV as SellerTypedDataField, aW as SellerTypedDataSpec, aP as SellerVerifyInput, aO as SellerVerifyIntentDetails, aU as SellerVerifyProxyBody, cG as SendBatchFn, cF as SendTransactionFn, y as SignalIntentMethodParams, O as SignalIntentParams, x as SignalIntentReferralFee, bq as TakerTier, br as TakerTierStats, J as TimeoutConfig, ag as TokenResponse, bd as UploadGoogleOAuthSellerCredentialParams, bb as UploadPayPalGoogleOAuthSellerCredentialParams, b9 as UploadSellerCredentialOptions, b7 as UploadSellerCredentialParams, bc as UploadVenmoGoogleOAuthSellerCredentialParams, aI as VenmoCredentialUploadInput, aH as VenmoGoogleOAuthSellerCredentialUploadBody, aA as VenmoSessionMaterial, be as VerifySellerPaymentParams, aK as WiseCredentialUploadInput, aD as WiseProfileInfo, aF as WiseProfileNotFound, aE as WiseProfileSelectionRequired, aC as WiseSessionMaterial, W as WithdrawDepositParams, cv as ZERO_RATE_MANAGER_ID, Z as Zkp2pClient, E as Zkp2pClientOptions, cA as classifyDelegationState, bz as compareEventCursorIdsByRecency, c8 as currencyInfo, bw as defaultIndexerEndpoint, cm as enrichPvDepositView, cn as enrichPvIntentView, bA as fetchIndexerFulfillmentAndPayment, cf as getContracts, cb as getCurrencyCodeFromHash, ca as getCurrencyInfoFromCountryCode, c9 as getCurrencyInfoFromHash, cz as getDelegationRoute, ci as getGatingServiceAddress, ch as getPaymentMethodsCatalog, cg as getRateManagerContracts, cc as isSupportedCurrencyHash, cw as isZeroRateManagerId, cd as mapConversionRatesToOnchainMinRate, cx as normalizeRateManagerId, cy as normalizeRegistry, ck as parseDepositView, cl as parseIntentView } from './vaultUtils-DOOl9QUP.mjs';
1
+ import { R as ReferrerFeeConfig, S as SellerCredentialBundle, D as DepositWithRelations, I as IntentEntity, a as IdentityAttestationRequestBody, A as AttestationServiceIdentityResponse, b as SellerCredentialUploadInput, c as SellerCredentialUploadPlatform, d as SellerCredentialAttestationRuntime, e as AttestationServiceSellerCredentialUploadResponse, B as BuyerTeeSessionMaterialEncryptionInput, U as UploadSellerCredentialBundleParams, C as CuratorSellerCredentialUploadResponse, G as GoogleOAuthSellerCredentialPlatform, f as GoogleOAuthSellerCredentialUploadBodyByPlatform, Q as QuotesBestByPlatformRequest, g as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, h as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, i as PostDepositDetailsResponse, j as GetPayeeDetailsRequest, k as GetPayeeDetailsResponse, l as GetOwnerDepositsRequest, m as GetOwnerDepositsResponse, n as GetTakerTierRequest, o as GetTakerTierResponse, p as GetDepositBundleParams, q as ApiAdapterOptions, r as GetDepositBundleResponse, s as GetOrderbookParams, t as GetOrderbookResponse, u as CurrencyType, T as TakerTierLevel, v as PaymentMethodCatalog, w as TxOverrides } from './vaultUtils-VAfbA30W.mjs';
2
+ export { K as ActionCallback, aj as ApiDeposit, aq as ApiIntentStatus, b1 as AttestationServiceSellerCredentialProbeResponse, a$ as AttestationServiceSellerVerifyResponse, H as AuthorizationTokenProvider, cH as BatchResult, $ as BestByPlatformResponseObject, b2 as BuyerTeePaymentParams, b3 as BuyerTeePaymentProofInput, b4 as BuyerTeeSessionMaterial, z as CancelIntentMethodParams, _ as CancelIntentParams, aK as CashAppCredentialUploadInput, aB as CashAppSessionMaterial, M as CreateDepositConversionRate, L as CreateDepositParams, b5 as CuratorSellerCredentialStatusResponse, b6 as CuratorSellerVerifyResponse, ca as Currency, ch as CurrencyData, cG as DelegationDepositTarget, cE as DelegationRoute, cF as DelegationState, cs as Deposit, cu as DepositCurrency, br as DepositIntentStatistics, am as DepositStatus, ak as DepositVerifier, al as DepositVerifierCurrency, bo as DepositVerifierData, cr as DepositView, af as FiatResponse, b0 as FulfillIntentAttestationResponse, F as FulfillIntentMethodParams, X as FulfillIntentParams, a0 as GetBestByPlatformResponse, a1 as GetBestByPlatformResponseObject, an as GetDepositByIdRequest, ao as GetDepositByIdResponse, av as GetIntentByHashRequest, aw as GetIntentByHashResponse, at as GetIntentsByDepositRequest, au as GetIntentsByDepositResponse, a5 as GetNearbyQuote, a6 as GetNearbySuggestions, ar as GetOwnerIntentsRequest, as as GetOwnerIntentsResponse, a2 as GetPlatformQuote, a7 as GetQuoteResponse, a8 as GetQuoteResponseObject, a9 as GetQuoteSingleResponse, bb as GetSellerCredentialStatusParams, bh as IdentityAttestationActionType, bi as IdentityAttestationOutput, bj as IdentityAttestationOutputFor, bk as IdentityAttestationParams, by as IndexerClient, c4 as IndexerDeploymentEnv, bE as IndexerDeposit, bV as IndexerDepositDailySnapshot, bX as IndexerDepositFilter, bU as IndexerDepositFundActivity, bW as IndexerDepositFundActivityType, b_ as IndexerDepositOrderDirection, bZ as IndexerDepositOrderField, bY as IndexerDepositPagination, bH as IndexerDepositPaymentMethod, bA as IndexerDepositService, c7 as IndexerFulfillmentAndPaymentResponse, c5 as IndexerFulfillmentRecord, bF as IndexerIntentFulfilled, bG as IndexerIntentFulfillmentAmounts, bJ as IndexerIntentStatus, bN as IndexerManagerAggregateStats, bP as IndexerManagerDailySnapshot, bO as IndexerManagerStats, bS as IndexerManualRateUpdate, bI as IndexerMethodCurrency, bT as IndexerOracleConfigUpdate, c6 as IndexerPaymentVerifiedRecord, bK as IndexerRateManager, bM as IndexerRateManagerDelegation, c1 as IndexerRateManagerDelegationPagination, bR as IndexerRateManagerDetail, b$ as IndexerRateManagerFilter, bQ as IndexerRateManagerListItem, c3 as IndexerRateManagerOrderDirection, c2 as IndexerRateManagerOrderField, c0 as IndexerRateManagerPagination, bL as IndexerRateManagerRate, bB as IndexerRateManagerService, ap as Intent, cw as IntentView, bl as MakerIdentityAttestationRequestBody, bm as MakerIdentityPlatform, ah as NearbyQuote, ai as NearbySuggestions, Z as OfframpClient, bn as OnchainCurrency, cx as OnchainIntent, bq as OrderStats, bx as OrderbookEntry, c8 as PAYMENT_PLATFORMS, aG as PayPalGoogleOAuthSellerCredentialUploadBody, ct as PaymentMethodData, c9 as PaymentPlatformType, bv as PlatformLimit, a3 as PlatformQuote, bw as PlatformRiskLevel, bp as PreparedTransaction, ae as QuoteFeesResponse, ad as QuoteIntentResponse, a4 as QuoteRequest, aa as QuoteResponse, ab as QuoteResponseObject, ac as QuoteSingleResponse, N as Range, cv as ReferralFee, ax as RegisterPayeeDetailsRequest, ay as RegisterPayeeDetailsResponse, b7 as RegisteredSellerCredentialPlatform, b9 as RegisteredUploadSellerCredentialParams, Y as ReleaseFundsToPayerParams, cm as RuntimeEnv, aZ as SellerAttestationOutput, aN as SellerCiphertextBundle, aS as SellerCredentialBundleUpload, a_ as SellerCredentialProbeResponse, aU as SellerCredentialStatus, aT as SellerCredentialStatusValue, aM as SellerCredentialUploadInputByPlatform, aY as SellerPaymentTypedDataValue, az as SellerPlatform, aR as SellerProbeInput, aO as SellerSignedCiphertextBundle, aW as SellerTypedDataField, aX as SellerTypedDataSpec, aQ as SellerVerifyInput, aP as SellerVerifyIntentDetails, aV as SellerVerifyProxyBody, cJ as SendBatchFn, cI as SendTransactionFn, y as SignalIntentMethodParams, O as SignalIntentParams, x as SignalIntentReferralFee, bs as TakerTier, bu as TakerTierSource, bt as TakerTierStats, J as TimeoutConfig, ag as TokenResponse, bf as UploadGoogleOAuthSellerCredentialParams, bc as UploadPayPalGoogleOAuthSellerCredentialParams, ba as UploadSellerCredentialOptions, b8 as UploadSellerCredentialParams, bd as UploadVenmoGoogleOAuthSellerCredentialParams, be as UploadZelleGoogleOAuthSellerCredentialParams, aJ as VenmoCredentialUploadInput, aH as VenmoGoogleOAuthSellerCredentialUploadBody, aA as VenmoSessionMaterial, bg as VerifySellerPaymentParams, aL as WiseCredentialUploadInput, aD as WiseProfileInfo, aF as WiseProfileNotFound, aE as WiseProfileSelectionRequired, aC as WiseSessionMaterial, W as WithdrawDepositParams, cy as ZERO_RATE_MANAGER_ID, aI as ZelleGoogleOAuthSellerCredentialUploadBody, Z as Zkp2pClient, E as Zkp2pClientOptions, cD as classifyDelegationState, bC as compareEventCursorIdsByRecency, cb as currencyInfo, bz as defaultIndexerEndpoint, cp as enrichPvDepositView, cq as enrichPvIntentView, bD as fetchIndexerFulfillmentAndPayment, ci as getContracts, ce as getCurrencyCodeFromHash, cd as getCurrencyInfoFromCountryCode, cc as getCurrencyInfoFromHash, cC as getDelegationRoute, cl as getGatingServiceAddress, ck as getPaymentMethodsCatalog, cj as getRateManagerContracts, cf as isSupportedCurrencyHash, cz as isZeroRateManagerId, cg as mapConversionRatesToOnchainMinRate, cA as normalizeRateManagerId, cB as normalizeRegistry, cn as parseDepositView, co as parseIntentView } from './vaultUtils-VAfbA30W.mjs';
3
3
  import { Address, Hash, Hex, WalletClient } from 'viem';
4
4
  import { Abi } from 'abitype';
5
5
  export { IdentityActionType, IdentityActionTypeByPlatform, IdentityParamsByPlatform, IdentityPlatform, NitroAttestationClient, NitroAttestationClientOptions, NitroAttestationEnvironment, VerifiedAttestation, VerifiedAttestationPayload, createNitroAttestationClient } from '@zkp2p/zkp2p-attestation';
@@ -207,9 +207,12 @@ interface ConvertLiquidityOptions {
207
207
  declare function convertDepositsForLiquidity(deposits: DepositWithRelations[], chainId: number, escrowAddress: string, options?: ConvertLiquidityOptions): EscrowDepositView[];
208
208
  declare function convertIndexerIntentsToEscrowViews(intents: IntentEntity[], depositViewsById: Map<string, EscrowDepositView>): EscrowIntentView[];
209
209
 
210
- declare function apiRequestIdentityAttestation(payload: IdentityAttestationRequestBody, attestationServiceUrl: string, platform: string, actionType: string): Promise<AttestationServiceIdentityResponse>;
211
- declare function createEncryptedBuyerTeeSessionMaterial({ actionType, attestationRuntime, attestationServiceUrl, platform, sessionMaterial, timeoutMs, }: BuyerTeeSessionMaterialEncryptionInput): Promise<string>;
212
- declare function apiCreateSellerCredentialBundle(payload: SellerCredentialUploadInput, attestationServiceUrl: string, platform: SellerCredentialUploadPlatform, timeoutMs?: number, attestationRuntime?: SellerCredentialAttestationRuntime): Promise<AttestationServiceSellerCredentialUploadResponse>;
210
+ type AttestationRequestOptions = {
211
+ fallbackUrls?: readonly string[] | null;
212
+ };
213
+ declare function apiRequestIdentityAttestation(payload: IdentityAttestationRequestBody, attestationServiceUrl: string, platform: string, actionType: string, options?: AttestationRequestOptions): Promise<AttestationServiceIdentityResponse>;
214
+ declare function createEncryptedBuyerTeeSessionMaterial({ actionType, attestationServiceFallbackUrls, attestationRuntime, attestationServiceUrl, platform, sessionMaterial, timeoutMs, }: BuyerTeeSessionMaterialEncryptionInput): Promise<string>;
215
+ declare function apiCreateSellerCredentialBundle(payload: SellerCredentialUploadInput, attestationServiceUrl: string, platform: SellerCredentialUploadPlatform, timeoutMs?: number, attestationRuntime?: SellerCredentialAttestationRuntime, options?: AttestationRequestOptions): Promise<AttestationServiceSellerCredentialUploadResponse>;
213
216
 
214
217
  /**
215
218
  * Store an already-encrypted seller credential bundle with curator.
@@ -456,11 +459,27 @@ declare const TOKEN_METADATA: {
456
459
  * tier engine (curator `src/common/services/tier/tierConstants.ts`), which is
457
460
  * what the backend actually enforces.
458
461
  *
459
- * A user's *live* cap (after lock-score penalties and per-platform risk
460
- * multipliers) always comes from the taker-tier API payload
461
- * (`TakerTier.perIntentCapBaseUnits` / `nextTierMaxOrderSizeDisplay`). This
462
- * static schedule is for reference displays that must show every tier at once —
463
- * the Fees & Tiers ladder — and the forward-looking "next tier cap" hint.
462
+ * The signal is now **lifetime Peer-Pay-consumed maker volume**, not raw taker
463
+ * fulfilled volume (curator PR #463 removed SAR weighting).
464
+ *
465
+ * A user's *live* tier, cap, and progression always come from the taker-tier
466
+ * API payload (`TakerTier.perIntentCapBaseUnits`, `minVolumeForTier`,
467
+ * `volumeToNextTier`, `peerPayVolume`). Those values are DB-backed and
468
+ * server-authoritative — they vary per environment (e.g. preprod runs
469
+ * different thresholds than these). This static schedule is ONLY a
470
+ * documented-default reference for displays that must show every tier at once
471
+ * (the Fees & Tiers ladder) when no live payload is available; never gate or
472
+ * compute a user's real cap from it.
473
+ *
474
+ * Volume bands track the live (pre-prod) tuned qualification thresholds, which
475
+ * were re-anchored to the real maker distribution — PEER $1k, PLUS $10k,
476
+ * PRO $50k, PLATINUM $100k (the earlier $2.5k/$20k/$75k/$300k placeholders left
477
+ * PLATINUM literally unreachable; the top band sits in the $99k–$167k gap so the
478
+ * same 3 whales qualify, on a round number). Caps ($100/$250/$1k/$2.5k/$5k) are
479
+ * unchanged.
480
+ * Production still runs the old placeholder bands until the tuned config is
481
+ * promoted, so even this reference can disagree with a given environment — read
482
+ * the live per-user values from the API.
464
483
  *
465
484
  * Ordered highest tier → lowest (PLATINUM first) to match UI display order.
466
485
  * PEER_PRESIDENT is invite-only and excluded from the volume ladder.
@@ -469,9 +488,9 @@ interface TakerTierScheduleEntry {
469
488
  tier: TakerTierLevel;
470
489
  /** Per-intent order cap in whole USD (base, before platform risk multipliers). */
471
490
  perIntentCapUsd: number;
472
- /** Inclusive lower bound of lifetime volume (USD) that qualifies for this tier. */
491
+ /** Inclusive lower bound of lifetime Peer-Pay volume (USD) that qualifies for this tier. */
473
492
  minVolumeUsd: number;
474
- /** Inclusive upper bound of lifetime volume (USD); `Infinity` for the top tier. */
493
+ /** Inclusive upper bound of lifetime Peer-Pay volume (USD); `Infinity` for the top tier. */
475
494
  maxVolumeUsd: number;
476
495
  }
477
496
  declare const TAKER_TIER_SCHEDULE: readonly TakerTierScheduleEntry[];
@@ -479,6 +498,17 @@ declare const TAKER_TIER_SCHEDULE: readonly TakerTierScheduleEntry[];
479
498
  declare const TAKER_TIER_ORDER: readonly TakerTierLevel[];
480
499
  /** Per-intent caps (whole USD) keyed by tier, derived from the schedule. */
481
500
  declare const TAKER_TIER_CAPS: Readonly<Record<string, number>>;
501
+ /**
502
+ * Default take-fee discount (in basis points) applied per tier, mirroring
503
+ * curator `TIER_FEE_DISCOUNT_BPS`. The discount is subtracted from the base
504
+ * service fee server-side at quote and sign time — it is NOT returned by the
505
+ * tier endpoint. These are documented defaults for reference fee displays only;
506
+ * the curator DB control-plane can override them, so prefer the fee shown on a
507
+ * live quote when one is available.
508
+ */
509
+ declare const TAKER_TIER_FEE_DISCOUNT_BPS: Readonly<Record<TakerTierLevel, number>>;
510
+ /** The default fee-discount (bps) for a tier, or 0 for unknown tiers. */
511
+ declare function getTakerTierFeeDiscountBps(tier: string | undefined): number;
482
512
  /** The next tier up from `currentTier`, or `null` at the top / for unknown tiers. */
483
513
  declare function getNextTakerTier(currentTier: string | undefined): TakerTierLevel | null;
484
514
 
@@ -762,4 +792,4 @@ declare class ContractError extends ZKP2PError {
762
792
  constructor(message: string, details?: unknown);
763
793
  }
764
794
 
765
- export { APIError, ApiAdapterOptions, AttestationServiceIdentityResponse, AttestationServiceSellerCredentialUploadResponse, BASE_BUILDER_CODE, BestByPlatformResponse, BuyerTeeSessionMaterialEncryptionInput, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ContractError, ContractRouter, type ContractRouterConfig, CuratorSellerCredentialUploadResponse, CurrencyType, DEFAULT_ORACLE_MAX_STALENESS_SECONDS, ErrorCode, type EscrowContractContext, type EscrowDepositView, type EscrowIntentView, GetDepositBundleParams, GetDepositBundleResponse, GetOrderbookParams, GetOrderbookResponse, GetOwnerDepositsRequest, GetOwnerDepositsResponse, GetPayeeDetailsRequest, GetPayeeDetailsResponse, GetTakerTierRequest, GetTakerTierResponse, GoogleOAuthSellerCredentialPlatform, GoogleOAuthSellerCredentialUploadBodyByPlatform, IdentityAttestationRequestBody, DepositWithRelations as IndexerDepositWithRelations, IntentEntity as IndexerIntent, type LogLevel, type MulticallClient, NetworkError, type OracleAdapterOverrides, type OracleKind, type OrchestratorContractContext, PEER_EXTENSION_CHROME_URL, PLATFORM_METADATA, PYTH_CONTRACT_BASE, PYTH_ORACLE_ADAPTER, PYTH_ORACLE_FEEDS, PaymentMethodCatalog, type PeerAuthenticateParams, type PeerBuyerTeePaymentCapture, type PeerBuyerTeePaymentParams, type PeerConnectionStatus, type PeerExtensionApi, type PeerExtensionSdk, type PeerExtensionSdkOptions, type PeerExtensionState, type PeerExtensionWindow, type PeerMetadataCaptureMode, type PeerMetadataMessage, type PeerMetadataMessageCallback, type PeerMetadataProviderConfig, type PeerMetadataRow, type PeerSarCredentialCapture, PostDepositDetailsRequest, PostDepositDetailsResponse, type PythFeedConfig, QuotesBestByPlatformRequest, ReferrerFeeConfig, SPREAD_ORACLE_FEEDS, SUPPORTED_CHAIN_IDS, SellerCredentialAttestationRuntime, SellerCredentialBundle, SellerCredentialUploadInput, SellerCredentialUploadPlatform, type SpreadOracleConfig, type SpreadOracleFeedConfig, type SupportedChainId, TAKER_TIER_CAPS, TAKER_TIER_ORDER, TAKER_TIER_SCHEDULE, TOKEN_METADATA, TakerTierLevel, type TakerTierScheduleEntry, TxOverrides, UploadSellerCredentialBundleParams, ValidatePayeeDetailsRequest, ValidatePayeeDetailsResponse, ValidationError, ZKP2PError, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuotesBestByPlatform, apiGetTakerTier, apiPostDepositDetails, apiRequestIdentityAttestation, apiUploadGoogleOAuthSellerCredential, apiUploadSellerCredentialBundle, apiValidatePayeeDetails, appendAttributionToCalldata, asciiToBytes32, assertValidReferrerFeeConfig, convertDepositsForLiquidity, convertIndexerDepositToEscrowView, convertIndexerIntentsToEscrowViews, createCompositeDepositId, createEncryptedBuyerTeeSessionMaterial, createPeerExtensionSdk, encodePythAdapterConfig, encodeSpreadOracleAdapterConfig, encodeWithAttribution, ensureBytes32, getAttributionDataSuffix, getNextTakerTier, getPeerExtensionState, getSpreadOracleConfig, isPeerExtensionAvailable, isValidReferrerFeeBps, isValidReferrerFeeRecipient, logger, openPeerExtensionInstallPage, parseReferrerFeeConfig, peerExtensionSdk, referrerFeeConfigToPreciseUnits, resolveFiatCurrencyBytes32, resolvePaymentMethodHash, resolvePaymentMethodHashFromCatalog, resolvePaymentMethodNameFromHash, sendTransactionWithAttribution, setLogLevel, validateOracleFeedsOnChain };
795
+ export { APIError, ApiAdapterOptions, AttestationServiceIdentityResponse, AttestationServiceSellerCredentialUploadResponse, BASE_BUILDER_CODE, BestByPlatformResponse, BuyerTeeSessionMaterialEncryptionInput, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ContractError, ContractRouter, type ContractRouterConfig, CuratorSellerCredentialUploadResponse, CurrencyType, DEFAULT_ORACLE_MAX_STALENESS_SECONDS, ErrorCode, type EscrowContractContext, type EscrowDepositView, type EscrowIntentView, GetDepositBundleParams, GetDepositBundleResponse, GetOrderbookParams, GetOrderbookResponse, GetOwnerDepositsRequest, GetOwnerDepositsResponse, GetPayeeDetailsRequest, GetPayeeDetailsResponse, GetTakerTierRequest, GetTakerTierResponse, GoogleOAuthSellerCredentialPlatform, GoogleOAuthSellerCredentialUploadBodyByPlatform, IdentityAttestationRequestBody, DepositWithRelations as IndexerDepositWithRelations, IntentEntity as IndexerIntent, type LogLevel, type MulticallClient, NetworkError, type OracleAdapterOverrides, type OracleKind, type OrchestratorContractContext, PEER_EXTENSION_CHROME_URL, PLATFORM_METADATA, PYTH_CONTRACT_BASE, PYTH_ORACLE_ADAPTER, PYTH_ORACLE_FEEDS, PaymentMethodCatalog, type PeerAuthenticateParams, type PeerBuyerTeePaymentCapture, type PeerBuyerTeePaymentParams, type PeerConnectionStatus, type PeerExtensionApi, type PeerExtensionSdk, type PeerExtensionSdkOptions, type PeerExtensionState, type PeerExtensionWindow, type PeerMetadataCaptureMode, type PeerMetadataMessage, type PeerMetadataMessageCallback, type PeerMetadataProviderConfig, type PeerMetadataRow, type PeerSarCredentialCapture, PostDepositDetailsRequest, PostDepositDetailsResponse, type PythFeedConfig, QuotesBestByPlatformRequest, ReferrerFeeConfig, SPREAD_ORACLE_FEEDS, SUPPORTED_CHAIN_IDS, SellerCredentialAttestationRuntime, SellerCredentialBundle, SellerCredentialUploadInput, SellerCredentialUploadPlatform, type SpreadOracleConfig, type SpreadOracleFeedConfig, type SupportedChainId, TAKER_TIER_CAPS, TAKER_TIER_FEE_DISCOUNT_BPS, TAKER_TIER_ORDER, TAKER_TIER_SCHEDULE, TOKEN_METADATA, TakerTierLevel, type TakerTierScheduleEntry, TxOverrides, UploadSellerCredentialBundleParams, ValidatePayeeDetailsRequest, ValidatePayeeDetailsResponse, ValidationError, ZKP2PError, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuotesBestByPlatform, apiGetTakerTier, apiPostDepositDetails, apiRequestIdentityAttestation, apiUploadGoogleOAuthSellerCredential, apiUploadSellerCredentialBundle, apiValidatePayeeDetails, appendAttributionToCalldata, asciiToBytes32, assertValidReferrerFeeConfig, convertDepositsForLiquidity, convertIndexerDepositToEscrowView, convertIndexerIntentsToEscrowViews, createCompositeDepositId, createEncryptedBuyerTeeSessionMaterial, createPeerExtensionSdk, encodePythAdapterConfig, encodeSpreadOracleAdapterConfig, encodeWithAttribution, ensureBytes32, getAttributionDataSuffix, getNextTakerTier, getPeerExtensionState, getSpreadOracleConfig, getTakerTierFeeDiscountBps, isPeerExtensionAvailable, isValidReferrerFeeBps, isValidReferrerFeeRecipient, logger, openPeerExtensionInstallPage, parseReferrerFeeConfig, peerExtensionSdk, referrerFeeConfigToPreciseUnits, resolveFiatCurrencyBytes32, resolvePaymentMethodHash, resolvePaymentMethodHashFromCatalog, resolvePaymentMethodNameFromHash, sendTransactionWithAttribution, setLogLevel, validateOracleFeedsOnChain };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as ReferrerFeeConfig, S as SellerCredentialBundle, D as DepositWithRelations, I as IntentEntity, a as IdentityAttestationRequestBody, A as AttestationServiceIdentityResponse, b as SellerCredentialUploadInput, c as SellerCredentialUploadPlatform, d as SellerCredentialAttestationRuntime, e as AttestationServiceSellerCredentialUploadResponse, B as BuyerTeeSessionMaterialEncryptionInput, U as UploadSellerCredentialBundleParams, C as CuratorSellerCredentialUploadResponse, G as GoogleOAuthSellerCredentialPlatform, f as GoogleOAuthSellerCredentialUploadBodyByPlatform, Q as QuotesBestByPlatformRequest, g as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, h as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, i as PostDepositDetailsResponse, j as GetPayeeDetailsRequest, k as GetPayeeDetailsResponse, l as GetOwnerDepositsRequest, m as GetOwnerDepositsResponse, n as GetTakerTierRequest, o as GetTakerTierResponse, p as GetDepositBundleParams, q as ApiAdapterOptions, r as GetDepositBundleResponse, s as GetOrderbookParams, t as GetOrderbookResponse, u as CurrencyType, T as TakerTierLevel, v as PaymentMethodCatalog, w as TxOverrides } from './vaultUtils-DOOl9QUP.js';
2
- export { K as ActionCallback, aj as ApiDeposit, aq as ApiIntentStatus, b0 as AttestationServiceSellerCredentialProbeResponse, a_ as AttestationServiceSellerVerifyResponse, H as AuthorizationTokenProvider, cE as BatchResult, $ as BestByPlatformResponseObject, b1 as BuyerTeePaymentParams, b2 as BuyerTeePaymentProofInput, b3 as BuyerTeeSessionMaterial, z as CancelIntentMethodParams, _ as CancelIntentParams, aJ as CashAppCredentialUploadInput, aB as CashAppSessionMaterial, M as CreateDepositConversionRate, L as CreateDepositParams, b4 as CuratorSellerCredentialStatusResponse, b5 as CuratorSellerVerifyResponse, c7 as Currency, ce as CurrencyData, cD as DelegationDepositTarget, cB as DelegationRoute, cC as DelegationState, cp as Deposit, cr as DepositCurrency, bp as DepositIntentStatistics, am as DepositStatus, ak as DepositVerifier, al as DepositVerifierCurrency, bm as DepositVerifierData, co as DepositView, af as FiatResponse, a$ as FulfillIntentAttestationResponse, F as FulfillIntentMethodParams, X as FulfillIntentParams, a0 as GetBestByPlatformResponse, a1 as GetBestByPlatformResponseObject, an as GetDepositByIdRequest, ao as GetDepositByIdResponse, av as GetIntentByHashRequest, aw as GetIntentByHashResponse, at as GetIntentsByDepositRequest, au as GetIntentsByDepositResponse, a5 as GetNearbyQuote, a6 as GetNearbySuggestions, ar as GetOwnerIntentsRequest, as as GetOwnerIntentsResponse, a2 as GetPlatformQuote, a7 as GetQuoteResponse, a8 as GetQuoteResponseObject, a9 as GetQuoteSingleResponse, ba as GetSellerCredentialStatusParams, bf as IdentityAttestationActionType, bg as IdentityAttestationOutput, bh as IdentityAttestationOutputFor, bi as IdentityAttestationParams, bv as IndexerClient, c1 as IndexerDeploymentEnv, bB as IndexerDeposit, bS as IndexerDepositDailySnapshot, bU as IndexerDepositFilter, bR as IndexerDepositFundActivity, bT as IndexerDepositFundActivityType, bX as IndexerDepositOrderDirection, bW as IndexerDepositOrderField, bV as IndexerDepositPagination, bE as IndexerDepositPaymentMethod, bx as IndexerDepositService, c4 as IndexerFulfillmentAndPaymentResponse, c2 as IndexerFulfillmentRecord, bC as IndexerIntentFulfilled, bD as IndexerIntentFulfillmentAmounts, bG as IndexerIntentStatus, bK as IndexerManagerAggregateStats, bM as IndexerManagerDailySnapshot, bL as IndexerManagerStats, bP as IndexerManualRateUpdate, bF as IndexerMethodCurrency, bQ as IndexerOracleConfigUpdate, c3 as IndexerPaymentVerifiedRecord, bH as IndexerRateManager, bJ as IndexerRateManagerDelegation, b_ as IndexerRateManagerDelegationPagination, bO as IndexerRateManagerDetail, bY as IndexerRateManagerFilter, bN as IndexerRateManagerListItem, c0 as IndexerRateManagerOrderDirection, b$ as IndexerRateManagerOrderField, bZ as IndexerRateManagerPagination, bI as IndexerRateManagerRate, by as IndexerRateManagerService, ap as Intent, ct as IntentView, bj as MakerIdentityAttestationRequestBody, bk as MakerIdentityPlatform, ah as NearbyQuote, ai as NearbySuggestions, Z as OfframpClient, bl as OnchainCurrency, cu as OnchainIntent, bo as OrderStats, bu as OrderbookEntry, c5 as PAYMENT_PLATFORMS, aG as PayPalGoogleOAuthSellerCredentialUploadBody, cq as PaymentMethodData, c6 as PaymentPlatformType, bs as PlatformLimit, a3 as PlatformQuote, bt as PlatformRiskLevel, bn as PreparedTransaction, ae as QuoteFeesResponse, ad as QuoteIntentResponse, a4 as QuoteRequest, aa as QuoteResponse, ab as QuoteResponseObject, ac as QuoteSingleResponse, N as Range, cs as ReferralFee, ax as RegisterPayeeDetailsRequest, ay as RegisterPayeeDetailsResponse, b6 as RegisteredSellerCredentialPlatform, b8 as RegisteredUploadSellerCredentialParams, Y as ReleaseFundsToPayerParams, cj as RuntimeEnv, aY as SellerAttestationOutput, aM as SellerCiphertextBundle, aR as SellerCredentialBundleUpload, aZ as SellerCredentialProbeResponse, aT as SellerCredentialStatus, aS as SellerCredentialStatusValue, aL as SellerCredentialUploadInputByPlatform, aX as SellerPaymentTypedDataValue, az as SellerPlatform, aQ as SellerProbeInput, aN as SellerSignedCiphertextBundle, aV as SellerTypedDataField, aW as SellerTypedDataSpec, aP as SellerVerifyInput, aO as SellerVerifyIntentDetails, aU as SellerVerifyProxyBody, cG as SendBatchFn, cF as SendTransactionFn, y as SignalIntentMethodParams, O as SignalIntentParams, x as SignalIntentReferralFee, bq as TakerTier, br as TakerTierStats, J as TimeoutConfig, ag as TokenResponse, bd as UploadGoogleOAuthSellerCredentialParams, bb as UploadPayPalGoogleOAuthSellerCredentialParams, b9 as UploadSellerCredentialOptions, b7 as UploadSellerCredentialParams, bc as UploadVenmoGoogleOAuthSellerCredentialParams, aI as VenmoCredentialUploadInput, aH as VenmoGoogleOAuthSellerCredentialUploadBody, aA as VenmoSessionMaterial, be as VerifySellerPaymentParams, aK as WiseCredentialUploadInput, aD as WiseProfileInfo, aF as WiseProfileNotFound, aE as WiseProfileSelectionRequired, aC as WiseSessionMaterial, W as WithdrawDepositParams, cv as ZERO_RATE_MANAGER_ID, Z as Zkp2pClient, E as Zkp2pClientOptions, cA as classifyDelegationState, bz as compareEventCursorIdsByRecency, c8 as currencyInfo, bw as defaultIndexerEndpoint, cm as enrichPvDepositView, cn as enrichPvIntentView, bA as fetchIndexerFulfillmentAndPayment, cf as getContracts, cb as getCurrencyCodeFromHash, ca as getCurrencyInfoFromCountryCode, c9 as getCurrencyInfoFromHash, cz as getDelegationRoute, ci as getGatingServiceAddress, ch as getPaymentMethodsCatalog, cg as getRateManagerContracts, cc as isSupportedCurrencyHash, cw as isZeroRateManagerId, cd as mapConversionRatesToOnchainMinRate, cx as normalizeRateManagerId, cy as normalizeRegistry, ck as parseDepositView, cl as parseIntentView } from './vaultUtils-DOOl9QUP.js';
1
+ import { R as ReferrerFeeConfig, S as SellerCredentialBundle, D as DepositWithRelations, I as IntentEntity, a as IdentityAttestationRequestBody, A as AttestationServiceIdentityResponse, b as SellerCredentialUploadInput, c as SellerCredentialUploadPlatform, d as SellerCredentialAttestationRuntime, e as AttestationServiceSellerCredentialUploadResponse, B as BuyerTeeSessionMaterialEncryptionInput, U as UploadSellerCredentialBundleParams, C as CuratorSellerCredentialUploadResponse, G as GoogleOAuthSellerCredentialPlatform, f as GoogleOAuthSellerCredentialUploadBodyByPlatform, Q as QuotesBestByPlatformRequest, g as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, h as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, i as PostDepositDetailsResponse, j as GetPayeeDetailsRequest, k as GetPayeeDetailsResponse, l as GetOwnerDepositsRequest, m as GetOwnerDepositsResponse, n as GetTakerTierRequest, o as GetTakerTierResponse, p as GetDepositBundleParams, q as ApiAdapterOptions, r as GetDepositBundleResponse, s as GetOrderbookParams, t as GetOrderbookResponse, u as CurrencyType, T as TakerTierLevel, v as PaymentMethodCatalog, w as TxOverrides } from './vaultUtils-VAfbA30W.js';
2
+ export { K as ActionCallback, aj as ApiDeposit, aq as ApiIntentStatus, b1 as AttestationServiceSellerCredentialProbeResponse, a$ as AttestationServiceSellerVerifyResponse, H as AuthorizationTokenProvider, cH as BatchResult, $ as BestByPlatformResponseObject, b2 as BuyerTeePaymentParams, b3 as BuyerTeePaymentProofInput, b4 as BuyerTeeSessionMaterial, z as CancelIntentMethodParams, _ as CancelIntentParams, aK as CashAppCredentialUploadInput, aB as CashAppSessionMaterial, M as CreateDepositConversionRate, L as CreateDepositParams, b5 as CuratorSellerCredentialStatusResponse, b6 as CuratorSellerVerifyResponse, ca as Currency, ch as CurrencyData, cG as DelegationDepositTarget, cE as DelegationRoute, cF as DelegationState, cs as Deposit, cu as DepositCurrency, br as DepositIntentStatistics, am as DepositStatus, ak as DepositVerifier, al as DepositVerifierCurrency, bo as DepositVerifierData, cr as DepositView, af as FiatResponse, b0 as FulfillIntentAttestationResponse, F as FulfillIntentMethodParams, X as FulfillIntentParams, a0 as GetBestByPlatformResponse, a1 as GetBestByPlatformResponseObject, an as GetDepositByIdRequest, ao as GetDepositByIdResponse, av as GetIntentByHashRequest, aw as GetIntentByHashResponse, at as GetIntentsByDepositRequest, au as GetIntentsByDepositResponse, a5 as GetNearbyQuote, a6 as GetNearbySuggestions, ar as GetOwnerIntentsRequest, as as GetOwnerIntentsResponse, a2 as GetPlatformQuote, a7 as GetQuoteResponse, a8 as GetQuoteResponseObject, a9 as GetQuoteSingleResponse, bb as GetSellerCredentialStatusParams, bh as IdentityAttestationActionType, bi as IdentityAttestationOutput, bj as IdentityAttestationOutputFor, bk as IdentityAttestationParams, by as IndexerClient, c4 as IndexerDeploymentEnv, bE as IndexerDeposit, bV as IndexerDepositDailySnapshot, bX as IndexerDepositFilter, bU as IndexerDepositFundActivity, bW as IndexerDepositFundActivityType, b_ as IndexerDepositOrderDirection, bZ as IndexerDepositOrderField, bY as IndexerDepositPagination, bH as IndexerDepositPaymentMethod, bA as IndexerDepositService, c7 as IndexerFulfillmentAndPaymentResponse, c5 as IndexerFulfillmentRecord, bF as IndexerIntentFulfilled, bG as IndexerIntentFulfillmentAmounts, bJ as IndexerIntentStatus, bN as IndexerManagerAggregateStats, bP as IndexerManagerDailySnapshot, bO as IndexerManagerStats, bS as IndexerManualRateUpdate, bI as IndexerMethodCurrency, bT as IndexerOracleConfigUpdate, c6 as IndexerPaymentVerifiedRecord, bK as IndexerRateManager, bM as IndexerRateManagerDelegation, c1 as IndexerRateManagerDelegationPagination, bR as IndexerRateManagerDetail, b$ as IndexerRateManagerFilter, bQ as IndexerRateManagerListItem, c3 as IndexerRateManagerOrderDirection, c2 as IndexerRateManagerOrderField, c0 as IndexerRateManagerPagination, bL as IndexerRateManagerRate, bB as IndexerRateManagerService, ap as Intent, cw as IntentView, bl as MakerIdentityAttestationRequestBody, bm as MakerIdentityPlatform, ah as NearbyQuote, ai as NearbySuggestions, Z as OfframpClient, bn as OnchainCurrency, cx as OnchainIntent, bq as OrderStats, bx as OrderbookEntry, c8 as PAYMENT_PLATFORMS, aG as PayPalGoogleOAuthSellerCredentialUploadBody, ct as PaymentMethodData, c9 as PaymentPlatformType, bv as PlatformLimit, a3 as PlatformQuote, bw as PlatformRiskLevel, bp as PreparedTransaction, ae as QuoteFeesResponse, ad as QuoteIntentResponse, a4 as QuoteRequest, aa as QuoteResponse, ab as QuoteResponseObject, ac as QuoteSingleResponse, N as Range, cv as ReferralFee, ax as RegisterPayeeDetailsRequest, ay as RegisterPayeeDetailsResponse, b7 as RegisteredSellerCredentialPlatform, b9 as RegisteredUploadSellerCredentialParams, Y as ReleaseFundsToPayerParams, cm as RuntimeEnv, aZ as SellerAttestationOutput, aN as SellerCiphertextBundle, aS as SellerCredentialBundleUpload, a_ as SellerCredentialProbeResponse, aU as SellerCredentialStatus, aT as SellerCredentialStatusValue, aM as SellerCredentialUploadInputByPlatform, aY as SellerPaymentTypedDataValue, az as SellerPlatform, aR as SellerProbeInput, aO as SellerSignedCiphertextBundle, aW as SellerTypedDataField, aX as SellerTypedDataSpec, aQ as SellerVerifyInput, aP as SellerVerifyIntentDetails, aV as SellerVerifyProxyBody, cJ as SendBatchFn, cI as SendTransactionFn, y as SignalIntentMethodParams, O as SignalIntentParams, x as SignalIntentReferralFee, bs as TakerTier, bu as TakerTierSource, bt as TakerTierStats, J as TimeoutConfig, ag as TokenResponse, bf as UploadGoogleOAuthSellerCredentialParams, bc as UploadPayPalGoogleOAuthSellerCredentialParams, ba as UploadSellerCredentialOptions, b8 as UploadSellerCredentialParams, bd as UploadVenmoGoogleOAuthSellerCredentialParams, be as UploadZelleGoogleOAuthSellerCredentialParams, aJ as VenmoCredentialUploadInput, aH as VenmoGoogleOAuthSellerCredentialUploadBody, aA as VenmoSessionMaterial, bg as VerifySellerPaymentParams, aL as WiseCredentialUploadInput, aD as WiseProfileInfo, aF as WiseProfileNotFound, aE as WiseProfileSelectionRequired, aC as WiseSessionMaterial, W as WithdrawDepositParams, cy as ZERO_RATE_MANAGER_ID, aI as ZelleGoogleOAuthSellerCredentialUploadBody, Z as Zkp2pClient, E as Zkp2pClientOptions, cD as classifyDelegationState, bC as compareEventCursorIdsByRecency, cb as currencyInfo, bz as defaultIndexerEndpoint, cp as enrichPvDepositView, cq as enrichPvIntentView, bD as fetchIndexerFulfillmentAndPayment, ci as getContracts, ce as getCurrencyCodeFromHash, cd as getCurrencyInfoFromCountryCode, cc as getCurrencyInfoFromHash, cC as getDelegationRoute, cl as getGatingServiceAddress, ck as getPaymentMethodsCatalog, cj as getRateManagerContracts, cf as isSupportedCurrencyHash, cz as isZeroRateManagerId, cg as mapConversionRatesToOnchainMinRate, cA as normalizeRateManagerId, cB as normalizeRegistry, cn as parseDepositView, co as parseIntentView } from './vaultUtils-VAfbA30W.js';
3
3
  import { Address, Hash, Hex, WalletClient } from 'viem';
4
4
  import { Abi } from 'abitype';
5
5
  export { IdentityActionType, IdentityActionTypeByPlatform, IdentityParamsByPlatform, IdentityPlatform, NitroAttestationClient, NitroAttestationClientOptions, NitroAttestationEnvironment, VerifiedAttestation, VerifiedAttestationPayload, createNitroAttestationClient } from '@zkp2p/zkp2p-attestation';
@@ -207,9 +207,12 @@ interface ConvertLiquidityOptions {
207
207
  declare function convertDepositsForLiquidity(deposits: DepositWithRelations[], chainId: number, escrowAddress: string, options?: ConvertLiquidityOptions): EscrowDepositView[];
208
208
  declare function convertIndexerIntentsToEscrowViews(intents: IntentEntity[], depositViewsById: Map<string, EscrowDepositView>): EscrowIntentView[];
209
209
 
210
- declare function apiRequestIdentityAttestation(payload: IdentityAttestationRequestBody, attestationServiceUrl: string, platform: string, actionType: string): Promise<AttestationServiceIdentityResponse>;
211
- declare function createEncryptedBuyerTeeSessionMaterial({ actionType, attestationRuntime, attestationServiceUrl, platform, sessionMaterial, timeoutMs, }: BuyerTeeSessionMaterialEncryptionInput): Promise<string>;
212
- declare function apiCreateSellerCredentialBundle(payload: SellerCredentialUploadInput, attestationServiceUrl: string, platform: SellerCredentialUploadPlatform, timeoutMs?: number, attestationRuntime?: SellerCredentialAttestationRuntime): Promise<AttestationServiceSellerCredentialUploadResponse>;
210
+ type AttestationRequestOptions = {
211
+ fallbackUrls?: readonly string[] | null;
212
+ };
213
+ declare function apiRequestIdentityAttestation(payload: IdentityAttestationRequestBody, attestationServiceUrl: string, platform: string, actionType: string, options?: AttestationRequestOptions): Promise<AttestationServiceIdentityResponse>;
214
+ declare function createEncryptedBuyerTeeSessionMaterial({ actionType, attestationServiceFallbackUrls, attestationRuntime, attestationServiceUrl, platform, sessionMaterial, timeoutMs, }: BuyerTeeSessionMaterialEncryptionInput): Promise<string>;
215
+ declare function apiCreateSellerCredentialBundle(payload: SellerCredentialUploadInput, attestationServiceUrl: string, platform: SellerCredentialUploadPlatform, timeoutMs?: number, attestationRuntime?: SellerCredentialAttestationRuntime, options?: AttestationRequestOptions): Promise<AttestationServiceSellerCredentialUploadResponse>;
213
216
 
214
217
  /**
215
218
  * Store an already-encrypted seller credential bundle with curator.
@@ -456,11 +459,27 @@ declare const TOKEN_METADATA: {
456
459
  * tier engine (curator `src/common/services/tier/tierConstants.ts`), which is
457
460
  * what the backend actually enforces.
458
461
  *
459
- * A user's *live* cap (after lock-score penalties and per-platform risk
460
- * multipliers) always comes from the taker-tier API payload
461
- * (`TakerTier.perIntentCapBaseUnits` / `nextTierMaxOrderSizeDisplay`). This
462
- * static schedule is for reference displays that must show every tier at once —
463
- * the Fees & Tiers ladder — and the forward-looking "next tier cap" hint.
462
+ * The signal is now **lifetime Peer-Pay-consumed maker volume**, not raw taker
463
+ * fulfilled volume (curator PR #463 removed SAR weighting).
464
+ *
465
+ * A user's *live* tier, cap, and progression always come from the taker-tier
466
+ * API payload (`TakerTier.perIntentCapBaseUnits`, `minVolumeForTier`,
467
+ * `volumeToNextTier`, `peerPayVolume`). Those values are DB-backed and
468
+ * server-authoritative — they vary per environment (e.g. preprod runs
469
+ * different thresholds than these). This static schedule is ONLY a
470
+ * documented-default reference for displays that must show every tier at once
471
+ * (the Fees & Tiers ladder) when no live payload is available; never gate or
472
+ * compute a user's real cap from it.
473
+ *
474
+ * Volume bands track the live (pre-prod) tuned qualification thresholds, which
475
+ * were re-anchored to the real maker distribution — PEER $1k, PLUS $10k,
476
+ * PRO $50k, PLATINUM $100k (the earlier $2.5k/$20k/$75k/$300k placeholders left
477
+ * PLATINUM literally unreachable; the top band sits in the $99k–$167k gap so the
478
+ * same 3 whales qualify, on a round number). Caps ($100/$250/$1k/$2.5k/$5k) are
479
+ * unchanged.
480
+ * Production still runs the old placeholder bands until the tuned config is
481
+ * promoted, so even this reference can disagree with a given environment — read
482
+ * the live per-user values from the API.
464
483
  *
465
484
  * Ordered highest tier → lowest (PLATINUM first) to match UI display order.
466
485
  * PEER_PRESIDENT is invite-only and excluded from the volume ladder.
@@ -469,9 +488,9 @@ interface TakerTierScheduleEntry {
469
488
  tier: TakerTierLevel;
470
489
  /** Per-intent order cap in whole USD (base, before platform risk multipliers). */
471
490
  perIntentCapUsd: number;
472
- /** Inclusive lower bound of lifetime volume (USD) that qualifies for this tier. */
491
+ /** Inclusive lower bound of lifetime Peer-Pay volume (USD) that qualifies for this tier. */
473
492
  minVolumeUsd: number;
474
- /** Inclusive upper bound of lifetime volume (USD); `Infinity` for the top tier. */
493
+ /** Inclusive upper bound of lifetime Peer-Pay volume (USD); `Infinity` for the top tier. */
475
494
  maxVolumeUsd: number;
476
495
  }
477
496
  declare const TAKER_TIER_SCHEDULE: readonly TakerTierScheduleEntry[];
@@ -479,6 +498,17 @@ declare const TAKER_TIER_SCHEDULE: readonly TakerTierScheduleEntry[];
479
498
  declare const TAKER_TIER_ORDER: readonly TakerTierLevel[];
480
499
  /** Per-intent caps (whole USD) keyed by tier, derived from the schedule. */
481
500
  declare const TAKER_TIER_CAPS: Readonly<Record<string, number>>;
501
+ /**
502
+ * Default take-fee discount (in basis points) applied per tier, mirroring
503
+ * curator `TIER_FEE_DISCOUNT_BPS`. The discount is subtracted from the base
504
+ * service fee server-side at quote and sign time — it is NOT returned by the
505
+ * tier endpoint. These are documented defaults for reference fee displays only;
506
+ * the curator DB control-plane can override them, so prefer the fee shown on a
507
+ * live quote when one is available.
508
+ */
509
+ declare const TAKER_TIER_FEE_DISCOUNT_BPS: Readonly<Record<TakerTierLevel, number>>;
510
+ /** The default fee-discount (bps) for a tier, or 0 for unknown tiers. */
511
+ declare function getTakerTierFeeDiscountBps(tier: string | undefined): number;
482
512
  /** The next tier up from `currentTier`, or `null` at the top / for unknown tiers. */
483
513
  declare function getNextTakerTier(currentTier: string | undefined): TakerTierLevel | null;
484
514
 
@@ -762,4 +792,4 @@ declare class ContractError extends ZKP2PError {
762
792
  constructor(message: string, details?: unknown);
763
793
  }
764
794
 
765
- export { APIError, ApiAdapterOptions, AttestationServiceIdentityResponse, AttestationServiceSellerCredentialUploadResponse, BASE_BUILDER_CODE, BestByPlatformResponse, BuyerTeeSessionMaterialEncryptionInput, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ContractError, ContractRouter, type ContractRouterConfig, CuratorSellerCredentialUploadResponse, CurrencyType, DEFAULT_ORACLE_MAX_STALENESS_SECONDS, ErrorCode, type EscrowContractContext, type EscrowDepositView, type EscrowIntentView, GetDepositBundleParams, GetDepositBundleResponse, GetOrderbookParams, GetOrderbookResponse, GetOwnerDepositsRequest, GetOwnerDepositsResponse, GetPayeeDetailsRequest, GetPayeeDetailsResponse, GetTakerTierRequest, GetTakerTierResponse, GoogleOAuthSellerCredentialPlatform, GoogleOAuthSellerCredentialUploadBodyByPlatform, IdentityAttestationRequestBody, DepositWithRelations as IndexerDepositWithRelations, IntentEntity as IndexerIntent, type LogLevel, type MulticallClient, NetworkError, type OracleAdapterOverrides, type OracleKind, type OrchestratorContractContext, PEER_EXTENSION_CHROME_URL, PLATFORM_METADATA, PYTH_CONTRACT_BASE, PYTH_ORACLE_ADAPTER, PYTH_ORACLE_FEEDS, PaymentMethodCatalog, type PeerAuthenticateParams, type PeerBuyerTeePaymentCapture, type PeerBuyerTeePaymentParams, type PeerConnectionStatus, type PeerExtensionApi, type PeerExtensionSdk, type PeerExtensionSdkOptions, type PeerExtensionState, type PeerExtensionWindow, type PeerMetadataCaptureMode, type PeerMetadataMessage, type PeerMetadataMessageCallback, type PeerMetadataProviderConfig, type PeerMetadataRow, type PeerSarCredentialCapture, PostDepositDetailsRequest, PostDepositDetailsResponse, type PythFeedConfig, QuotesBestByPlatformRequest, ReferrerFeeConfig, SPREAD_ORACLE_FEEDS, SUPPORTED_CHAIN_IDS, SellerCredentialAttestationRuntime, SellerCredentialBundle, SellerCredentialUploadInput, SellerCredentialUploadPlatform, type SpreadOracleConfig, type SpreadOracleFeedConfig, type SupportedChainId, TAKER_TIER_CAPS, TAKER_TIER_ORDER, TAKER_TIER_SCHEDULE, TOKEN_METADATA, TakerTierLevel, type TakerTierScheduleEntry, TxOverrides, UploadSellerCredentialBundleParams, ValidatePayeeDetailsRequest, ValidatePayeeDetailsResponse, ValidationError, ZKP2PError, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuotesBestByPlatform, apiGetTakerTier, apiPostDepositDetails, apiRequestIdentityAttestation, apiUploadGoogleOAuthSellerCredential, apiUploadSellerCredentialBundle, apiValidatePayeeDetails, appendAttributionToCalldata, asciiToBytes32, assertValidReferrerFeeConfig, convertDepositsForLiquidity, convertIndexerDepositToEscrowView, convertIndexerIntentsToEscrowViews, createCompositeDepositId, createEncryptedBuyerTeeSessionMaterial, createPeerExtensionSdk, encodePythAdapterConfig, encodeSpreadOracleAdapterConfig, encodeWithAttribution, ensureBytes32, getAttributionDataSuffix, getNextTakerTier, getPeerExtensionState, getSpreadOracleConfig, isPeerExtensionAvailable, isValidReferrerFeeBps, isValidReferrerFeeRecipient, logger, openPeerExtensionInstallPage, parseReferrerFeeConfig, peerExtensionSdk, referrerFeeConfigToPreciseUnits, resolveFiatCurrencyBytes32, resolvePaymentMethodHash, resolvePaymentMethodHashFromCatalog, resolvePaymentMethodNameFromHash, sendTransactionWithAttribution, setLogLevel, validateOracleFeedsOnChain };
795
+ export { APIError, ApiAdapterOptions, AttestationServiceIdentityResponse, AttestationServiceSellerCredentialUploadResponse, BASE_BUILDER_CODE, BestByPlatformResponse, BuyerTeeSessionMaterialEncryptionInput, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ContractError, ContractRouter, type ContractRouterConfig, CuratorSellerCredentialUploadResponse, CurrencyType, DEFAULT_ORACLE_MAX_STALENESS_SECONDS, ErrorCode, type EscrowContractContext, type EscrowDepositView, type EscrowIntentView, GetDepositBundleParams, GetDepositBundleResponse, GetOrderbookParams, GetOrderbookResponse, GetOwnerDepositsRequest, GetOwnerDepositsResponse, GetPayeeDetailsRequest, GetPayeeDetailsResponse, GetTakerTierRequest, GetTakerTierResponse, GoogleOAuthSellerCredentialPlatform, GoogleOAuthSellerCredentialUploadBodyByPlatform, IdentityAttestationRequestBody, DepositWithRelations as IndexerDepositWithRelations, IntentEntity as IndexerIntent, type LogLevel, type MulticallClient, NetworkError, type OracleAdapterOverrides, type OracleKind, type OrchestratorContractContext, PEER_EXTENSION_CHROME_URL, PLATFORM_METADATA, PYTH_CONTRACT_BASE, PYTH_ORACLE_ADAPTER, PYTH_ORACLE_FEEDS, PaymentMethodCatalog, type PeerAuthenticateParams, type PeerBuyerTeePaymentCapture, type PeerBuyerTeePaymentParams, type PeerConnectionStatus, type PeerExtensionApi, type PeerExtensionSdk, type PeerExtensionSdkOptions, type PeerExtensionState, type PeerExtensionWindow, type PeerMetadataCaptureMode, type PeerMetadataMessage, type PeerMetadataMessageCallback, type PeerMetadataProviderConfig, type PeerMetadataRow, type PeerSarCredentialCapture, PostDepositDetailsRequest, PostDepositDetailsResponse, type PythFeedConfig, QuotesBestByPlatformRequest, ReferrerFeeConfig, SPREAD_ORACLE_FEEDS, SUPPORTED_CHAIN_IDS, SellerCredentialAttestationRuntime, SellerCredentialBundle, SellerCredentialUploadInput, SellerCredentialUploadPlatform, type SpreadOracleConfig, type SpreadOracleFeedConfig, type SupportedChainId, TAKER_TIER_CAPS, TAKER_TIER_FEE_DISCOUNT_BPS, TAKER_TIER_ORDER, TAKER_TIER_SCHEDULE, TOKEN_METADATA, TakerTierLevel, type TakerTierScheduleEntry, TxOverrides, UploadSellerCredentialBundleParams, ValidatePayeeDetailsRequest, ValidatePayeeDetailsResponse, ValidationError, ZKP2PError, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuotesBestByPlatform, apiGetTakerTier, apiPostDepositDetails, apiRequestIdentityAttestation, apiUploadGoogleOAuthSellerCredential, apiUploadSellerCredentialBundle, apiValidatePayeeDetails, appendAttributionToCalldata, asciiToBytes32, assertValidReferrerFeeConfig, convertDepositsForLiquidity, convertIndexerDepositToEscrowView, convertIndexerIntentsToEscrowViews, createCompositeDepositId, createEncryptedBuyerTeeSessionMaterial, createPeerExtensionSdk, encodePythAdapterConfig, encodeSpreadOracleAdapterConfig, encodeWithAttribution, ensureBytes32, getAttributionDataSuffix, getNextTakerTier, getPeerExtensionState, getSpreadOracleConfig, getTakerTierFeeDiscountBps, isPeerExtensionAvailable, isValidReferrerFeeBps, isValidReferrerFeeRecipient, logger, openPeerExtensionInstallPage, parseReferrerFeeConfig, peerExtensionSdk, referrerFeeConfigToPreciseUnits, resolveFiatCurrencyBytes32, resolvePaymentMethodHash, resolvePaymentMethodHashFromCatalog, resolvePaymentMethodNameFromHash, sendTransactionWithAttribution, setLogLevel, validateOracleFeedsOnChain };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { TAKER_TIER_CAPS, TAKER_TIER_ORDER, TAKER_TIER_SCHEDULE, ZERO_RATE_MANAGER_ID, classifyDelegationState, getDelegationRoute, getNextTakerTier, isZeroRateManagerId, normalizeRateManagerId, normalizeRegistry } from './chunk-TGMRXUP2.mjs';
1
+ export { TAKER_TIER_CAPS, TAKER_TIER_FEE_DISCOUNT_BPS, TAKER_TIER_ORDER, TAKER_TIER_SCHEDULE, ZERO_RATE_MANAGER_ID, classifyDelegationState, getDelegationRoute, getNextTakerTier, getTakerTierFeeDiscountBps, isZeroRateManagerId, normalizeRateManagerId, normalizeRegistry } from './chunk-6WAMIVRB.mjs';
2
2
  import { APIError, NetworkError, ValidationError } from './chunk-GHQK65J2.mjs';
3
3
  export { APIError, ContractError, ErrorCode, NetworkError, ValidationError, ZKP2PError } from './chunk-GHQK65J2.mjs';
4
4
  import { getContracts, getRateManagerContracts, getPaymentMethodsCatalog, resolvePaymentMethodHashFromCatalog, getGatingServiceAddress, parseBigIntLike, resolveFiatCurrencyBytes32, resolvePaymentMethodNameFromHash } from './chunk-NMIFJSZ3.mjs';
@@ -406,9 +406,9 @@ async function apiSignIntentV3(request, opts) {
406
406
  referralFees
407
407
  };
408
408
  }
409
- function headers() {
410
- return { "Content-Type": "application/json" };
411
- }
409
+
410
+ // src/adapters/attestationTransport.ts
411
+ var DEFAULT_ATTESTATION_PROXY_URL = "https://attestation-service-proxy.up.railway.app";
412
412
  function normalizeOptionalString(value) {
413
413
  if (typeof value !== "string") {
414
414
  return null;
@@ -416,13 +416,92 @@ function normalizeOptionalString(value) {
416
416
  const normalized = value.trim();
417
417
  return normalized.length > 0 ? normalized : null;
418
418
  }
419
- function normalizeBaseUrl(value, label) {
419
+ function normalizeAttestationBaseUrl(value, label) {
420
420
  const normalized = normalizeOptionalString(value)?.replace(/\/+$/u, "");
421
421
  if (!normalized) {
422
422
  throw new Error(`${label} is required.`);
423
423
  }
424
424
  return normalized;
425
425
  }
426
+ function resolveFallbackUrls(primaryBaseUrl, fallbackUrls) {
427
+ const rawFallbackUrls = fallbackUrls == null ? [DEFAULT_ATTESTATION_PROXY_URL] : fallbackUrls;
428
+ const normalized = rawFallbackUrls.map((url) => normalizeOptionalString(url)?.replace(/\/+$/u, "") ?? null).filter((url) => Boolean(url));
429
+ return Array.from(new Set(normalized)).filter((url) => url !== primaryBaseUrl);
430
+ }
431
+ function resolveFetch(requestFetch) {
432
+ if (requestFetch) {
433
+ return requestFetch;
434
+ }
435
+ if (typeof globalThis.fetch !== "function") {
436
+ throw new Error("fetch is not available in this runtime.");
437
+ }
438
+ return globalThis.fetch.bind(globalThis);
439
+ }
440
+ function inputUrl(input) {
441
+ try {
442
+ if (typeof input === "string" || input instanceof URL) {
443
+ return new URL(input);
444
+ }
445
+ if (typeof Request !== "undefined" && input instanceof Request) {
446
+ return new URL(input.url);
447
+ }
448
+ } catch {
449
+ return null;
450
+ }
451
+ return null;
452
+ }
453
+ function rewriteInputBaseUrl(input, primaryBaseUrl, targetBaseUrl) {
454
+ const url = inputUrl(input);
455
+ if (!url) {
456
+ return input;
457
+ }
458
+ const primaryUrl = new URL(primaryBaseUrl);
459
+ const targetUrl = new URL(targetBaseUrl);
460
+ if (url.origin === primaryUrl.origin) {
461
+ url.protocol = targetUrl.protocol;
462
+ url.host = targetUrl.host;
463
+ }
464
+ if (typeof Request !== "undefined" && input instanceof Request) {
465
+ return new Request(url.toString(), input.clone());
466
+ }
467
+ return url.toString();
468
+ }
469
+ function createAttestationTransport(primaryBaseUrl, options = {}) {
470
+ const requestFetch = resolveFetch(options.fetch);
471
+ const fallbackUrls = resolveFallbackUrls(primaryBaseUrl, options.fallbackUrls);
472
+ let activeBaseUrl = primaryBaseUrl;
473
+ const transportFetch = async (input, init) => {
474
+ const attemptInput = activeBaseUrl === primaryBaseUrl ? input : rewriteInputBaseUrl(input, primaryBaseUrl, activeBaseUrl);
475
+ try {
476
+ return await requestFetch(attemptInput, init);
477
+ } catch (primaryError) {
478
+ if (activeBaseUrl !== primaryBaseUrl || fallbackUrls.length === 0) {
479
+ throw primaryError;
480
+ }
481
+ let fallbackError = primaryError;
482
+ for (const fallbackUrl of fallbackUrls) {
483
+ try {
484
+ const fallbackInput = rewriteInputBaseUrl(input, primaryBaseUrl, fallbackUrl);
485
+ const response = await requestFetch(fallbackInput, init);
486
+ activeBaseUrl = fallbackUrl;
487
+ return response;
488
+ } catch (error) {
489
+ fallbackError = error;
490
+ }
491
+ }
492
+ throw fallbackError;
493
+ }
494
+ };
495
+ return {
496
+ fetch: transportFetch,
497
+ getActiveBaseUrl: () => activeBaseUrl
498
+ };
499
+ }
500
+
501
+ // src/adapters/attestation.ts
502
+ function headers() {
503
+ return { "Content-Type": "application/json" };
504
+ }
426
505
  function isPayeeBoundSellerCredentialUploadInput(payload) {
427
506
  return typeof payload.payeeId === "string";
428
507
  }
@@ -431,7 +510,8 @@ function isWiseCredentialUploadInput(payload) {
431
510
  }
432
511
  async function createEncryptedSellerCredentialUploadForPlatform({
433
512
  attestationServiceUrl,
434
- attestationRuntime,
513
+ attestationTransport,
514
+ cryptoRuntime,
435
515
  payload,
436
516
  platform,
437
517
  timeoutMs
@@ -445,9 +525,9 @@ async function createEncryptedSellerCredentialUploadForPlatform({
445
525
  platform: "wise",
446
526
  sessionMaterial: payload.sessionMaterial,
447
527
  ...typeof timeoutMs === "number" ? { timeoutMs } : {},
448
- ...attestationRuntime?.fetch ? { fetch: attestationRuntime.fetch } : {},
449
- ...attestationRuntime?.subtle ? { subtle: attestationRuntime.subtle } : {},
450
- ...attestationRuntime?.getRandomValues ? { getRandomValues: attestationRuntime.getRandomValues } : {}
528
+ fetch: attestationTransport.fetch,
529
+ ...cryptoRuntime?.subtle ? { subtle: cryptoRuntime.subtle } : {},
530
+ ...cryptoRuntime?.getRandomValues ? { getRandomValues: cryptoRuntime.getRandomValues } : {}
451
531
  });
452
532
  }
453
533
  if (!isPayeeBoundSellerCredentialUploadInput(payload)) {
@@ -459,19 +539,23 @@ async function createEncryptedSellerCredentialUploadForPlatform({
459
539
  payeeId: payload.payeeId,
460
540
  sessionMaterial: payload.sessionMaterial,
461
541
  ...typeof timeoutMs === "number" ? { timeoutMs } : {},
462
- ...attestationRuntime?.fetch ? { fetch: attestationRuntime.fetch } : {},
463
- ...attestationRuntime?.subtle ? { subtle: attestationRuntime.subtle } : {},
464
- ...attestationRuntime?.getRandomValues ? { getRandomValues: attestationRuntime.getRandomValues } : {}
542
+ fetch: attestationTransport.fetch,
543
+ ...cryptoRuntime?.subtle ? { subtle: cryptoRuntime.subtle } : {},
544
+ ...cryptoRuntime?.getRandomValues ? { getRandomValues: cryptoRuntime.getRandomValues } : {}
465
545
  });
466
546
  }
467
- async function apiVerifyBuyerTeePayment(payload, attestationServiceUrl, platform, actionType) {
547
+ async function apiVerifyBuyerTeePayment(payload, attestationServiceUrl, platform, actionType, options = {}) {
468
548
  return withRetry(async () => {
469
549
  let res;
470
550
  try {
471
551
  const endpoint = `/buyer/verify/${encodeURIComponent(platform)}/${encodeURIComponent(
472
552
  actionType
473
553
  )}`;
474
- res = await fetch(`${attestationServiceUrl}${endpoint}`, {
554
+ const baseUrl = normalizeAttestationBaseUrl(attestationServiceUrl, "Attestation Service URL");
555
+ const attestationTransport = createAttestationTransport(baseUrl, {
556
+ fallbackUrls: options.fallbackUrls
557
+ });
558
+ res = await attestationTransport.fetch(`${baseUrl}${endpoint}`, {
475
559
  method: "POST",
476
560
  headers: headers(),
477
561
  body: JSON.stringify(payload)
@@ -489,13 +573,16 @@ async function apiVerifyBuyerTeePayment(payload, attestationServiceUrl, platform
489
573
  return res.json();
490
574
  });
491
575
  }
492
- async function apiRequestIdentityAttestation(payload, attestationServiceUrl, platform, actionType) {
576
+ async function apiRequestIdentityAttestation(payload, attestationServiceUrl, platform, actionType, options = {}) {
493
577
  return withRetry(async () => {
494
578
  let res;
495
579
  try {
496
580
  const endpoint = "/identity";
497
- const baseUrl = normalizeBaseUrl(attestationServiceUrl, "Attestation Service URL");
498
- res = await fetch(`${baseUrl}${endpoint}`, {
581
+ const baseUrl = normalizeAttestationBaseUrl(attestationServiceUrl, "Attestation Service URL");
582
+ const attestationTransport = createAttestationTransport(baseUrl, {
583
+ fallbackUrls: options.fallbackUrls
584
+ });
585
+ res = await attestationTransport.fetch(`${baseUrl}${endpoint}`, {
499
586
  method: "POST",
500
587
  headers: headers(),
501
588
  body: JSON.stringify({
@@ -521,31 +608,51 @@ async function apiRequestIdentityAttestation(payload, attestationServiceUrl, pla
521
608
  }
522
609
  async function createEncryptedBuyerTeeSessionMaterial({
523
610
  actionType,
611
+ attestationServiceFallbackUrls,
524
612
  attestationRuntime,
525
613
  attestationServiceUrl,
526
614
  platform,
527
615
  sessionMaterial,
528
616
  timeoutMs
529
617
  }) {
618
+ const normalizedAttestationServiceUrl = normalizeAttestationBaseUrl(
619
+ attestationServiceUrl,
620
+ "Attestation Service URL"
621
+ );
622
+ const attestationTransport = createAttestationTransport(normalizedAttestationServiceUrl, {
623
+ fallbackUrls: attestationServiceFallbackUrls,
624
+ ...attestationRuntime?.fetch ? { fetch: attestationRuntime.fetch } : {}
625
+ });
530
626
  const params = {
531
627
  actionType,
532
- attestationServiceUrl: normalizeBaseUrl(attestationServiceUrl, "Attestation Service URL"),
628
+ attestationServiceUrl: normalizedAttestationServiceUrl,
533
629
  platform,
534
630
  sessionMaterial,
535
631
  ...timeoutMs == null ? {} : { timeoutMs },
536
- ...attestationRuntime?.fetch ? { fetch: attestationRuntime.fetch } : {},
632
+ fetch: attestationTransport.fetch,
537
633
  ...attestationRuntime?.subtle ? { subtle: attestationRuntime.subtle } : {},
538
634
  ...attestationRuntime?.getRandomValues ? { getRandomValues: attestationRuntime.getRandomValues } : {}
539
635
  };
540
636
  return createEncryptedBuyerTeeSessionMaterial$1(params);
541
637
  }
542
- async function apiCreateSellerCredentialBundle(payload, attestationServiceUrl, platform, timeoutMs, attestationRuntime) {
638
+ async function apiCreateSellerCredentialBundle(payload, attestationServiceUrl, platform, timeoutMs, attestationRuntime, options = {}) {
543
639
  return withRetry(
544
640
  async () => {
545
- const requestFetch = attestationRuntime?.fetch ?? fetch;
546
- const encryptedUpload = await createEncryptedSellerCredentialUploadForPlatform({
641
+ const normalizedAttestationServiceUrl = normalizeAttestationBaseUrl(
547
642
  attestationServiceUrl,
548
- attestationRuntime,
643
+ "Attestation Service URL"
644
+ );
645
+ const attestationTransport = createAttestationTransport(normalizedAttestationServiceUrl, {
646
+ fallbackUrls: options.fallbackUrls,
647
+ ...attestationRuntime?.fetch ? { fetch: attestationRuntime.fetch } : {}
648
+ });
649
+ const encryptedUpload = await createEncryptedSellerCredentialUploadForPlatform({
650
+ attestationServiceUrl: normalizedAttestationServiceUrl,
651
+ attestationTransport,
652
+ cryptoRuntime: {
653
+ subtle: attestationRuntime?.subtle,
654
+ getRandomValues: attestationRuntime?.getRandomValues
655
+ },
549
656
  payload,
550
657
  platform,
551
658
  timeoutMs
@@ -553,7 +660,8 @@ async function apiCreateSellerCredentialBundle(payload, attestationServiceUrl, p
553
660
  let res;
554
661
  try {
555
662
  const endpoint = `/seller/credentials/${encodeURIComponent(platform)}`;
556
- res = await requestFetch(`${attestationServiceUrl}${endpoint}`, {
663
+ const activeBaseUrl = attestationTransport.getActiveBaseUrl();
664
+ res = await attestationTransport.fetch(`${activeBaseUrl}${endpoint}`, {
557
665
  method: "POST",
558
666
  headers: headers(),
559
667
  body: JSON.stringify({ encryptedUpload })
@@ -1377,7 +1485,8 @@ var IntentOperations = class {
1377
1485
  },
1378
1486
  attestationServiceUrl,
1379
1487
  attestationRoute.actionPlatform,
1380
- attestationRoute.actionType
1488
+ attestationRoute.actionType,
1489
+ { fallbackUrls: params.attestationServiceFallbackUrls }
1381
1490
  );
1382
1491
  assertReleaseAmountMeetsMinimum(attestation, inputs.minimumReleaseAmount);
1383
1492
  paymentProof = encodePaymentAttestation(attestation);
@@ -8090,18 +8199,44 @@ var Zkp2pClient = class {
8090
8199
  const attestationServiceUrl = this.stripTrailingSlash(
8091
8200
  opts?.attestationServiceUrl ?? this.defaultAttestationServiceForBaseApiUrl(baseApiUrl)
8092
8201
  );
8093
- const createBundle = (uploadPayload) => opts?.attestationRuntime ? apiCreateSellerCredentialBundle(
8094
- uploadPayload,
8095
- attestationServiceUrl,
8096
- params.platform,
8097
- timeoutMs,
8098
- opts.attestationRuntime
8099
- ) : apiCreateSellerCredentialBundle(
8100
- uploadPayload,
8101
- attestationServiceUrl,
8102
- params.platform,
8103
- timeoutMs
8104
- );
8202
+ const createBundle = (uploadPayload) => {
8203
+ const requestOptions = opts?.attestationServiceFallbackUrls ? { fallbackUrls: opts.attestationServiceFallbackUrls } : void 0;
8204
+ if (opts?.attestationRuntime && requestOptions) {
8205
+ return apiCreateSellerCredentialBundle(
8206
+ uploadPayload,
8207
+ attestationServiceUrl,
8208
+ params.platform,
8209
+ timeoutMs,
8210
+ opts.attestationRuntime,
8211
+ requestOptions
8212
+ );
8213
+ }
8214
+ if (opts?.attestationRuntime) {
8215
+ return apiCreateSellerCredentialBundle(
8216
+ uploadPayload,
8217
+ attestationServiceUrl,
8218
+ params.platform,
8219
+ timeoutMs,
8220
+ opts.attestationRuntime
8221
+ );
8222
+ }
8223
+ if (requestOptions) {
8224
+ return apiCreateSellerCredentialBundle(
8225
+ uploadPayload,
8226
+ attestationServiceUrl,
8227
+ params.platform,
8228
+ timeoutMs,
8229
+ void 0,
8230
+ requestOptions
8231
+ );
8232
+ }
8233
+ return apiCreateSellerCredentialBundle(
8234
+ uploadPayload,
8235
+ attestationServiceUrl,
8236
+ params.platform,
8237
+ timeoutMs
8238
+ );
8239
+ };
8105
8240
  if (params.platform === "wise") {
8106
8241
  const bundleResponse2 = await createBundle({
8107
8242
  sessionMaterial: params.sessionMaterial
@@ -8172,6 +8307,21 @@ var Zkp2pClient = class {
8172
8307
  }
8173
8308
  );
8174
8309
  }
8310
+ if (params.platform === "zelle") {
8311
+ return apiUploadGoogleOAuthSellerCredential(
8312
+ "zelle",
8313
+ params.payeeDetails,
8314
+ {
8315
+ payeeId: params.payeeId,
8316
+ authorizationCode: params.authorizationCode,
8317
+ redirectUri: params.redirectUri
8318
+ },
8319
+ baseApiUrl,
8320
+ {
8321
+ timeoutMs
8322
+ }
8323
+ );
8324
+ }
8175
8325
  return apiUploadGoogleOAuthSellerCredential(
8176
8326
  "venmo",
8177
8327
  params.payeeDetails,