@zkp2p/sdk 0.6.2 → 0.7.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 BuyerTeeVerifyPaymentBody, b as AttestationServiceSellerVerifyResponse, c as SellerCredentialUploadInput, d as SellerCredentialUploadPlatform, e as SellerCredentialAttestationRuntime, f as AttestationServiceSellerCredentialUploadResponse, g as BuyerTeeSessionMaterialEncryptionInput, U as UploadSellerCredentialBundleParams, C as CuratorSellerCredentialUploadResponse, G as GoogleOAuthSellerCredentialPlatform, h as GoogleOAuthSellerCredentialUploadBodyByPlatform, Q as QuotesBestByPlatformRequest, i as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, j as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, k as PostDepositDetailsResponse, l as GetPayeeDetailsRequest, m as GetPayeeDetailsResponse, n as GetOwnerDepositsRequest, o as GetOwnerDepositsResponse, p as GetTakerTierRequest, q as GetTakerTierResponse, r as GetDepositBundleParams, s as ApiAdapterOptions, t as GetDepositBundleResponse, u as GetOrderbookParams, v as GetOrderbookResponse, w as CurrencyType, T as TakerTierLevel, x as PaymentMethodCatalog, y as TxOverrides } from './vaultUtils-BwY9Z0aR.mjs';
2
- export { M as ActionCallback, al as ApiDeposit, as as ApiIntentStatus, b2 as AttestationServiceSellerCredentialProbeResponse, K as AuthorizationTokenProvider, cI as BatchResult, a1 as BestByPlatformResponseObject, b3 as BuyerTeePaymentParams, b4 as BuyerTeePaymentProofInput, b5 as BuyerTeeSessionMaterial, H as CancelIntentMethodParams, a0 as CancelIntentParams, aM as CashAppCredentialUploadInput, aD as CashAppSessionMaterial, O as CreateDepositConversionRate, N as CreateDepositParams, b6 as CuratorSellerCredentialStatusResponse, b7 as CuratorSellerVerifyResponse, cb as Currency, ci as CurrencyData, cH as DelegationDepositTarget, cF as DelegationRoute, cG as DelegationState, ct as Deposit, cv as DepositCurrency, bs as DepositIntentStatistics, ao as DepositStatus, am as DepositVerifier, an as DepositVerifierCurrency, bp as DepositVerifierData, cs as DepositView, ah as FiatResponse, b1 as FulfillIntentAttestationResponse, F as FulfillIntentMethodParams, _ as FulfillIntentParams, a2 as GetBestByPlatformResponse, a3 as GetBestByPlatformResponseObject, ap as GetDepositByIdRequest, aq as GetDepositByIdResponse, ax as GetIntentByHashRequest, ay as GetIntentByHashResponse, av as GetIntentsByDepositRequest, aw as GetIntentsByDepositResponse, a7 as GetNearbyQuote, a8 as GetNearbySuggestions, at as GetOwnerIntentsRequest, au as GetOwnerIntentsResponse, a4 as GetPlatformQuote, a9 as GetQuoteResponse, aa as GetQuoteResponseObject, ab as GetQuoteSingleResponse, bc as GetSellerCredentialStatusParams, bi as IdentityAttestationActionType, bj as IdentityAttestationOutput, bk as IdentityAttestationOutputFor, bl as IdentityAttestationParams, bz as IndexerClient, c5 as IndexerDeploymentEnv, bF as IndexerDeposit, bW as IndexerDepositDailySnapshot, bY as IndexerDepositFilter, bV as IndexerDepositFundActivity, bX as IndexerDepositFundActivityType, b$ as IndexerDepositOrderDirection, b_ as IndexerDepositOrderField, bZ as IndexerDepositPagination, bI as IndexerDepositPaymentMethod, bB as IndexerDepositService, c8 as IndexerFulfillmentAndPaymentResponse, c6 as IndexerFulfillmentRecord, bG as IndexerIntentFulfilled, bH as IndexerIntentFulfillmentAmounts, bK as IndexerIntentStatus, bO as IndexerManagerAggregateStats, bQ as IndexerManagerDailySnapshot, bP as IndexerManagerStats, bT as IndexerManualRateUpdate, bJ as IndexerMethodCurrency, bU as IndexerOracleConfigUpdate, c7 as IndexerPaymentVerifiedRecord, bL as IndexerRateManager, bN as IndexerRateManagerDelegation, c2 as IndexerRateManagerDelegationPagination, bS as IndexerRateManagerDetail, c0 as IndexerRateManagerFilter, bR as IndexerRateManagerListItem, c4 as IndexerRateManagerOrderDirection, c3 as IndexerRateManagerOrderField, c1 as IndexerRateManagerPagination, bM as IndexerRateManagerRate, bC as IndexerRateManagerService, ar as Intent, cx as IntentView, bm as MakerIdentityAttestationRequestBody, bn as MakerIdentityPlatform, aj as NearbyQuote, ak as NearbySuggestions, Z as OfframpClient, bo as OnchainCurrency, cy as OnchainIntent, br as OrderStats, by as OrderbookEntry, c9 as PAYMENT_PLATFORMS, aI as PayPalGoogleOAuthSellerCredentialUploadBody, cu as PaymentMethodData, ca as PaymentPlatformType, bw as PlatformLimit, a5 as PlatformQuote, bx as PlatformRiskLevel, bq as PreparedTransaction, ag as QuoteFeesResponse, af as QuoteIntentResponse, a6 as QuoteRequest, ac as QuoteResponse, ad as QuoteResponseObject, ae as QuoteSingleResponse, W as Range, cw as ReferralFee, az as RegisterPayeeDetailsRequest, aA as RegisterPayeeDetailsResponse, b8 as RegisteredSellerCredentialPlatform, ba as RegisteredUploadSellerCredentialParams, $ as ReleaseFundsToPayerParams, cn as RuntimeEnv, a$ as SellerAttestationOutput, aP as SellerCiphertextBundle, aU as SellerCredentialBundleUpload, b0 as SellerCredentialProbeResponse, aW as SellerCredentialStatus, aV as SellerCredentialStatusValue, aO as SellerCredentialUploadInputByPlatform, a_ as SellerPaymentTypedDataValue, aB as SellerPlatform, aT as SellerProbeInput, aQ as SellerSignedCiphertextBundle, aY as SellerTypedDataField, aZ as SellerTypedDataSpec, aS as SellerVerifyInput, aR as SellerVerifyIntentDetails, aX as SellerVerifyProxyBody, cK as SendBatchFn, cJ as SendTransactionFn, E as SignalIntentMethodParams, Y as SignalIntentParams, z as SignalIntentReferralFee, bt as TakerTier, bv as TakerTierSource, bu as TakerTierStats, L as TimeoutConfig, ai as TokenResponse, bg as UploadGoogleOAuthSellerCredentialParams, bd as UploadPayPalGoogleOAuthSellerCredentialParams, bb as UploadSellerCredentialOptions, b9 as UploadSellerCredentialParams, be as UploadVenmoGoogleOAuthSellerCredentialParams, bf as UploadZelleGoogleOAuthSellerCredentialParams, aL as VenmoCredentialUploadInput, aJ as VenmoGoogleOAuthSellerCredentialUploadBody, aC as VenmoSessionMaterial, bh as VerifySellerPaymentParams, aN as WiseCredentialUploadInput, aF as WiseProfileInfo, aH as WiseProfileNotFound, aG as WiseProfileSelectionRequired, aE as WiseSessionMaterial, X as WithdrawDepositParams, cz as ZERO_RATE_MANAGER_ID, aK as ZelleGoogleOAuthSellerCredentialUploadBody, Z as Zkp2pClient, J as Zkp2pClientOptions, cE as classifyDelegationState, bD as compareEventCursorIdsByRecency, cc as currencyInfo, bA as defaultIndexerEndpoint, cq as enrichPvDepositView, cr as enrichPvIntentView, bE as fetchIndexerFulfillmentAndPayment, cj as getContracts, cf as getCurrencyCodeFromHash, ce as getCurrencyInfoFromCountryCode, cd as getCurrencyInfoFromHash, cD as getDelegationRoute, cm as getGatingServiceAddress, cl as getPaymentMethodsCatalog, ck as getRateManagerContracts, cg as isSupportedCurrencyHash, cA as isZeroRateManagerId, ch as mapConversionRatesToOnchainMinRate, cB as normalizeRateManagerId, cC as normalizeRegistry, co as parseDepositView, cp as parseIntentView } from './vaultUtils-BwY9Z0aR.mjs';
1
+ import { R as ReferrerFeeConfig, S as SellerCredentialBundle, D as DepositWithRelations, I as IntentEntity, a as IdentityAttestationRequestBody, A as AttestationServiceIdentityResponse, B as BuyerTeeVerifyPaymentBody, b as AttestationServiceSellerVerifyResponse, c as SellerCredentialUploadInput, d as SellerCredentialUploadPlatform, e as SellerCredentialAttestationRuntime, f as AttestationServiceSellerCredentialUploadResponse, g as BuyerTeeSessionMaterialEncryptionInput, U as UploadSellerCredentialBundleParams, C as CuratorSellerCredentialUploadResponse, h as ApiAdapterOptions, i as ReferralDashboardResponse, j as ReferralEarningsResponse, k as RedeemReferralCodeRequest, l as RedeemReferralCodeResponse, m as UpdateReferralCodeRequest, n as UpdateReferralCodeResponse, G as GoogleOAuthSellerCredentialPlatform, o as GoogleOAuthSellerCredentialUploadBodyByPlatform, Q as QuotesBestByPlatformRequest, p as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, q as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, r as PostDepositDetailsResponse, s as GetPayeeDetailsRequest, t as GetPayeeDetailsResponse, u as GetOwnerDepositsRequest, v as GetOwnerDepositsResponse, w as GetTakerTierRequest, x as GetTakerTierResponse, y as GetDepositBundleParams, z as GetDepositBundleResponse, E as GetOrderbookParams, F as GetOrderbookResponse, H as CurrencyType, T as TakerTierLevel, J as PaymentMethodCatalog, K as TxOverrides } from './vaultUtils-DI-r1LAg.mjs';
2
+ export { _ as ActionCallback, ar as ApiDeposit, ay as ApiIntentStatus, b7 as AttestationServiceSellerCredentialProbeResponse, X as AuthorizationTokenProvider, cN as BatchResult, a7 as BestByPlatformResponseObject, b8 as BuyerTeePaymentParams, b9 as BuyerTeePaymentProofInput, ba as BuyerTeeSessionMaterial, O as CancelIntentMethodParams, a6 as CancelIntentParams, aR as CashAppCredentialUploadInput, aJ as CashAppSessionMaterial, a0 as CreateDepositConversionRate, $ as CreateDepositParams, bb as CuratorSellerCredentialStatusResponse, bc as CuratorSellerVerifyResponse, cg as Currency, cn as CurrencyData, cM as DelegationDepositTarget, cK as DelegationRoute, cL as DelegationState, cy as Deposit, cA as DepositCurrency, bw as DepositIntentStatistics, au as DepositStatus, as as DepositVerifier, at as DepositVerifierCurrency, bt as DepositVerifierData, cx as DepositView, an as FiatResponse, b6 as FulfillIntentAttestationResponse, N as FulfillIntentMethodParams, a4 as FulfillIntentParams, a8 as GetBestByPlatformResponse, a9 as GetBestByPlatformResponseObject, av as GetDepositByIdRequest, aw as GetDepositByIdResponse, aD as GetIntentByHashRequest, aE as GetIntentByHashResponse, aB as GetIntentsByDepositRequest, aC as GetIntentsByDepositResponse, ad as GetNearbyQuote, ae as GetNearbySuggestions, az as GetOwnerIntentsRequest, aA as GetOwnerIntentsResponse, aa as GetPlatformQuote, af as GetQuoteResponse, ag as GetQuoteResponseObject, ah as GetQuoteSingleResponse, bh as GetSellerCredentialStatusParams, bm as IdentityAttestationActionType, bn as IdentityAttestationOutput, bo as IdentityAttestationOutputFor, bp as IdentityAttestationParams, bE as IndexerClient, ca as IndexerDeploymentEnv, bK as IndexerDeposit, b$ as IndexerDepositDailySnapshot, c1 as IndexerDepositFilter, b_ as IndexerDepositFundActivity, c0 as IndexerDepositFundActivityType, c4 as IndexerDepositOrderDirection, c3 as IndexerDepositOrderField, c2 as IndexerDepositPagination, bN as IndexerDepositPaymentMethod, bG as IndexerDepositService, cd as IndexerFulfillmentAndPaymentResponse, cb as IndexerFulfillmentRecord, bL as IndexerIntentFulfilled, bM as IndexerIntentFulfillmentAmounts, bP as IndexerIntentStatus, bT as IndexerManagerAggregateStats, bV as IndexerManagerDailySnapshot, bU as IndexerManagerStats, bY as IndexerManualRateUpdate, bO as IndexerMethodCurrency, bZ as IndexerOracleConfigUpdate, cc as IndexerPaymentVerifiedRecord, bQ as IndexerRateManager, bS as IndexerRateManagerDelegation, c7 as IndexerRateManagerDelegationPagination, bX as IndexerRateManagerDetail, c5 as IndexerRateManagerFilter, bW as IndexerRateManagerListItem, c9 as IndexerRateManagerOrderDirection, c8 as IndexerRateManagerOrderField, c6 as IndexerRateManagerPagination, bR as IndexerRateManagerRate, bH as IndexerRateManagerService, ax as Intent, cC as IntentView, bq as MakerIdentityAttestationRequestBody, br as MakerIdentityPlatform, ap as NearbyQuote, aq as NearbySuggestions, Z as OfframpClient, bs as OnchainCurrency, cD as OnchainIntent, bv as OrderStats, bD as OrderbookEntry, ce as PAYMENT_PLATFORMS, aO as PayPalGoogleOAuthSellerCredentialUploadBody, cz as PaymentMethodData, cf as PaymentPlatformType, bB as PlatformLimit, ab as PlatformQuote, bC as PlatformRiskLevel, bu as PreparedTransaction, am as QuoteFeesResponse, al as QuoteIntentResponse, ac as QuoteRequest, ai as QuoteResponse, aj as QuoteResponseObject, ak as QuoteSingleResponse, a1 as Range, cB as ReferralFee, aF as RegisterPayeeDetailsRequest, aG as RegisterPayeeDetailsResponse, bd as RegisteredSellerCredentialPlatform, bf as RegisteredUploadSellerCredentialParams, a5 as ReleaseFundsToPayerParams, cs as RuntimeEnv, b4 as SellerAttestationOutput, aU as SellerCiphertextBundle, aZ as SellerCredentialBundleUpload, b5 as SellerCredentialProbeResponse, a$ as SellerCredentialStatus, a_ as SellerCredentialStatusValue, aT as SellerCredentialUploadInputByPlatform, b3 as SellerPaymentTypedDataValue, aH as SellerPlatform, aY as SellerProbeInput, aV as SellerSignedCiphertextBundle, b1 as SellerTypedDataField, b2 as SellerTypedDataSpec, aX as SellerVerifyInput, aW as SellerVerifyIntentDetails, b0 as SellerVerifyProxyBody, cP as SendBatchFn, cO as SendTransactionFn, M as SignalIntentMethodParams, a3 as SignalIntentParams, L as SignalIntentReferralFee, bx as TakerTier, bA as TakerTierSource, bz as TakerTierStats, by as TakerTierVolumeBreakdown, Y as TimeoutConfig, ao as TokenResponse, bk as UploadGoogleOAuthSellerCredentialParams, bi as UploadPayPalGoogleOAuthSellerCredentialParams, bg as UploadSellerCredentialOptions, be as UploadSellerCredentialParams, bj as UploadVenmoGoogleOAuthSellerCredentialParams, aQ as VenmoCredentialUploadInput, aP as VenmoGoogleOAuthSellerCredentialUploadBody, aI as VenmoSessionMaterial, bl as VerifySellerPaymentParams, aS as WiseCredentialUploadInput, aL as WiseProfileInfo, aN as WiseProfileNotFound, aM as WiseProfileSelectionRequired, aK as WiseSessionMaterial, a2 as WithdrawDepositParams, cE as ZERO_RATE_MANAGER_ID, Z as Zkp2pClient, W as Zkp2pClientOptions, cJ as classifyDelegationState, bI as compareEventCursorIdsByRecency, ch as currencyInfo, bF as defaultIndexerEndpoint, cv as enrichPvDepositView, cw as enrichPvIntentView, bJ as fetchIndexerFulfillmentAndPayment, co as getContracts, ck as getCurrencyCodeFromHash, cj as getCurrencyInfoFromCountryCode, ci as getCurrencyInfoFromHash, cI as getDelegationRoute, cr as getGatingServiceAddress, cq as getPaymentMethodsCatalog, cp as getRateManagerContracts, cl as isSupportedCurrencyHash, cF as isZeroRateManagerId, cm as mapConversionRatesToOnchainMinRate, cG as normalizeRateManagerId, cH as normalizeRegistry, ct as parseDepositView, cu as parseIntentView } from './vaultUtils-DI-r1LAg.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';
@@ -70,6 +70,9 @@ declare const assertValidReferrerFeeConfig: (config: ReferrerFeeConfig | undefin
70
70
  declare const parseReferrerFeeConfig: (recipient: string | null | undefined, feeBpsValue: string | number | null | undefined) => ReferrerFeeConfig | null;
71
71
  declare const referrerFeeConfigToPreciseUnits: (config: ReferrerFeeConfig) => bigint;
72
72
 
73
+ declare const normalizeReferralCode: (code: string) => string;
74
+ declare const isValidReferralCode: (code: string) => boolean;
75
+
73
76
  interface EscrowContractContext {
74
77
  address: Address;
75
78
  abi: Abi;
@@ -229,6 +232,10 @@ declare function apiGetOwnerDeposits(req: GetOwnerDepositsRequest, apiKey: strin
229
232
  * Get taker tier information for a specific address.
230
233
  */
231
234
  declare function apiGetTakerTier(req: GetTakerTierRequest, baseApiUrl: string, timeoutMs?: number): Promise<GetTakerTierResponse>;
235
+ declare function apiGetReferralDashboard(opts: ApiAdapterOptions): Promise<ReferralDashboardResponse>;
236
+ declare function apiGetReferralEarnings(opts: ApiAdapterOptions): Promise<ReferralEarningsResponse>;
237
+ declare function apiRedeemReferralCode(req: RedeemReferralCodeRequest, opts: ApiAdapterOptions): Promise<RedeemReferralCodeResponse>;
238
+ declare function apiUpdateReferralCode(req: UpdateReferralCodeRequest, opts: ApiAdapterOptions): Promise<UpdateReferralCodeResponse>;
232
239
  declare function apiUploadGoogleOAuthSellerCredential<P extends GoogleOAuthSellerCredentialPlatform>(processorName: P, payeeDetails: Hash, body: GoogleOAuthSellerCredentialUploadBodyByPlatform[P], baseApiUrl: string, opts?: {
233
240
  timeoutMs?: number;
234
241
  }): Promise<CuratorSellerCredentialUploadResponse>;
@@ -460,8 +467,10 @@ declare const TOKEN_METADATA: {
460
467
  * tier engine (curator `src/common/services/tier/tierConstants.ts`), which is
461
468
  * what the backend actually enforces.
462
469
  *
463
- * The signal is now **lifetime Peer-Pay-consumed maker volume**, not raw taker
464
- * fulfilled volume (curator PR #463 removed SAR weighting).
470
+ * The live qualification signal is Peer Pay volume. Historical maker tiers
471
+ * earned before July 1, 2026 UTC are preserved; after that cutoff, only Peer
472
+ * Pay volume moves the tier. Curator keeps the response field name
473
+ * `peerPayVolume` for compatibility.
465
474
  *
466
475
  * A user's *live* tier, cap, and progression always come from the taker-tier
467
476
  * API payload (`TakerTier.perIntentCapBaseUnits`, `minVolumeForTier`,
@@ -472,15 +481,10 @@ declare const TOKEN_METADATA: {
472
481
  * (the Fees & Tiers ladder) when no live payload is available; never gate or
473
482
  * compute a user's real cap from it.
474
483
  *
475
- * Volume bands track the live (pre-prod) tuned qualification thresholds, which
476
- * were re-anchored to the real maker distribution — PEER $1k, PLUS $10k,
477
- * PRO $50k, PLATINUM $100k (the earlier $2.5k/$20k/$75k/$300k placeholders left
478
- * PLATINUM literally unreachable; the top band sits in the $99k–$167k gap so the
479
- * same 3 whales qualify, on a round number). Caps ($100/$250/$1k/$2.5k/$5k) are
480
- * unchanged.
481
- * Production still runs the old placeholder bands until the tuned config is
482
- * promoted, so even this reference can disagree with a given environment — read
483
- * the live per-user values from the API.
484
+ * Volume bands track the live tuned qualification thresholds — PEER $1k,
485
+ * PLUS $10k, PRO $50k, PLATINUM $100k. Caps ($100/$250/$1k/$2.5k/$5k) are unchanged.
486
+ * Read the live per-user values from the API: curator can change qualification
487
+ * inputs behind the compatibility fields without changing this reference table.
484
488
  *
485
489
  * Ordered highest tier → lowest (PLATINUM first) to match UI display order.
486
490
  * PEER_PRESIDENT is invite-only and excluded from the volume ladder.
@@ -489,9 +493,9 @@ interface TakerTierScheduleEntry {
489
493
  tier: TakerTierLevel;
490
494
  /** Per-intent order cap in whole USD (base, before platform risk multipliers). */
491
495
  perIntentCapUsd: number;
492
- /** Inclusive lower bound of lifetime Peer-Pay volume (USD) that qualifies for this tier. */
496
+ /** Inclusive lower bound of Peer Pay volume (USD) that qualifies for this tier. */
493
497
  minVolumeUsd: number;
494
- /** Inclusive upper bound of lifetime Peer-Pay volume (USD); `Infinity` for the top tier. */
498
+ /** Inclusive upper bound of Peer Pay volume (USD); `Infinity` for the top tier. */
495
499
  maxVolumeUsd: number;
496
500
  }
497
501
  declare const TAKER_TIER_SCHEDULE: readonly TakerTierScheduleEntry[];
@@ -793,4 +797,4 @@ declare class ContractError extends ZKP2PError {
793
797
  constructor(message: string, details?: unknown);
794
798
  }
795
799
 
796
- export { APIError, ApiAdapterOptions, AttestationServiceIdentityResponse, AttestationServiceSellerCredentialUploadResponse, AttestationServiceSellerVerifyResponse, BASE_BUILDER_CODE, BestByPlatformResponse, BuyerTeeSessionMaterialEncryptionInput, BuyerTeeVerifyPaymentBody, 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, apiVerifyBuyerTeePayment, 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 };
800
+ export { APIError, ApiAdapterOptions, AttestationServiceIdentityResponse, AttestationServiceSellerCredentialUploadResponse, AttestationServiceSellerVerifyResponse, BASE_BUILDER_CODE, BestByPlatformResponse, BuyerTeeSessionMaterialEncryptionInput, BuyerTeeVerifyPaymentBody, 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, RedeemReferralCodeRequest, RedeemReferralCodeResponse, ReferralDashboardResponse, ReferralEarningsResponse, 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, UpdateReferralCodeRequest, UpdateReferralCodeResponse, UploadSellerCredentialBundleParams, ValidatePayeeDetailsRequest, ValidatePayeeDetailsResponse, ValidationError, ZKP2PError, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuotesBestByPlatform, apiGetReferralDashboard, apiGetReferralEarnings, apiGetTakerTier, apiPostDepositDetails, apiRedeemReferralCode, apiRequestIdentityAttestation, apiUpdateReferralCode, apiUploadGoogleOAuthSellerCredential, apiUploadSellerCredentialBundle, apiValidatePayeeDetails, apiVerifyBuyerTeePayment, appendAttributionToCalldata, asciiToBytes32, assertValidReferrerFeeConfig, convertDepositsForLiquidity, convertIndexerDepositToEscrowView, convertIndexerIntentsToEscrowViews, createCompositeDepositId, createEncryptedBuyerTeeSessionMaterial, createPeerExtensionSdk, encodePythAdapterConfig, encodeSpreadOracleAdapterConfig, encodeWithAttribution, ensureBytes32, getAttributionDataSuffix, getNextTakerTier, getPeerExtensionState, getSpreadOracleConfig, getTakerTierFeeDiscountBps, isPeerExtensionAvailable, isValidReferralCode, isValidReferrerFeeBps, isValidReferrerFeeRecipient, logger, normalizeReferralCode, 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 BuyerTeeVerifyPaymentBody, b as AttestationServiceSellerVerifyResponse, c as SellerCredentialUploadInput, d as SellerCredentialUploadPlatform, e as SellerCredentialAttestationRuntime, f as AttestationServiceSellerCredentialUploadResponse, g as BuyerTeeSessionMaterialEncryptionInput, U as UploadSellerCredentialBundleParams, C as CuratorSellerCredentialUploadResponse, G as GoogleOAuthSellerCredentialPlatform, h as GoogleOAuthSellerCredentialUploadBodyByPlatform, Q as QuotesBestByPlatformRequest, i as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, j as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, k as PostDepositDetailsResponse, l as GetPayeeDetailsRequest, m as GetPayeeDetailsResponse, n as GetOwnerDepositsRequest, o as GetOwnerDepositsResponse, p as GetTakerTierRequest, q as GetTakerTierResponse, r as GetDepositBundleParams, s as ApiAdapterOptions, t as GetDepositBundleResponse, u as GetOrderbookParams, v as GetOrderbookResponse, w as CurrencyType, T as TakerTierLevel, x as PaymentMethodCatalog, y as TxOverrides } from './vaultUtils-BwY9Z0aR.js';
2
- export { M as ActionCallback, al as ApiDeposit, as as ApiIntentStatus, b2 as AttestationServiceSellerCredentialProbeResponse, K as AuthorizationTokenProvider, cI as BatchResult, a1 as BestByPlatformResponseObject, b3 as BuyerTeePaymentParams, b4 as BuyerTeePaymentProofInput, b5 as BuyerTeeSessionMaterial, H as CancelIntentMethodParams, a0 as CancelIntentParams, aM as CashAppCredentialUploadInput, aD as CashAppSessionMaterial, O as CreateDepositConversionRate, N as CreateDepositParams, b6 as CuratorSellerCredentialStatusResponse, b7 as CuratorSellerVerifyResponse, cb as Currency, ci as CurrencyData, cH as DelegationDepositTarget, cF as DelegationRoute, cG as DelegationState, ct as Deposit, cv as DepositCurrency, bs as DepositIntentStatistics, ao as DepositStatus, am as DepositVerifier, an as DepositVerifierCurrency, bp as DepositVerifierData, cs as DepositView, ah as FiatResponse, b1 as FulfillIntentAttestationResponse, F as FulfillIntentMethodParams, _ as FulfillIntentParams, a2 as GetBestByPlatformResponse, a3 as GetBestByPlatformResponseObject, ap as GetDepositByIdRequest, aq as GetDepositByIdResponse, ax as GetIntentByHashRequest, ay as GetIntentByHashResponse, av as GetIntentsByDepositRequest, aw as GetIntentsByDepositResponse, a7 as GetNearbyQuote, a8 as GetNearbySuggestions, at as GetOwnerIntentsRequest, au as GetOwnerIntentsResponse, a4 as GetPlatformQuote, a9 as GetQuoteResponse, aa as GetQuoteResponseObject, ab as GetQuoteSingleResponse, bc as GetSellerCredentialStatusParams, bi as IdentityAttestationActionType, bj as IdentityAttestationOutput, bk as IdentityAttestationOutputFor, bl as IdentityAttestationParams, bz as IndexerClient, c5 as IndexerDeploymentEnv, bF as IndexerDeposit, bW as IndexerDepositDailySnapshot, bY as IndexerDepositFilter, bV as IndexerDepositFundActivity, bX as IndexerDepositFundActivityType, b$ as IndexerDepositOrderDirection, b_ as IndexerDepositOrderField, bZ as IndexerDepositPagination, bI as IndexerDepositPaymentMethod, bB as IndexerDepositService, c8 as IndexerFulfillmentAndPaymentResponse, c6 as IndexerFulfillmentRecord, bG as IndexerIntentFulfilled, bH as IndexerIntentFulfillmentAmounts, bK as IndexerIntentStatus, bO as IndexerManagerAggregateStats, bQ as IndexerManagerDailySnapshot, bP as IndexerManagerStats, bT as IndexerManualRateUpdate, bJ as IndexerMethodCurrency, bU as IndexerOracleConfigUpdate, c7 as IndexerPaymentVerifiedRecord, bL as IndexerRateManager, bN as IndexerRateManagerDelegation, c2 as IndexerRateManagerDelegationPagination, bS as IndexerRateManagerDetail, c0 as IndexerRateManagerFilter, bR as IndexerRateManagerListItem, c4 as IndexerRateManagerOrderDirection, c3 as IndexerRateManagerOrderField, c1 as IndexerRateManagerPagination, bM as IndexerRateManagerRate, bC as IndexerRateManagerService, ar as Intent, cx as IntentView, bm as MakerIdentityAttestationRequestBody, bn as MakerIdentityPlatform, aj as NearbyQuote, ak as NearbySuggestions, Z as OfframpClient, bo as OnchainCurrency, cy as OnchainIntent, br as OrderStats, by as OrderbookEntry, c9 as PAYMENT_PLATFORMS, aI as PayPalGoogleOAuthSellerCredentialUploadBody, cu as PaymentMethodData, ca as PaymentPlatformType, bw as PlatformLimit, a5 as PlatformQuote, bx as PlatformRiskLevel, bq as PreparedTransaction, ag as QuoteFeesResponse, af as QuoteIntentResponse, a6 as QuoteRequest, ac as QuoteResponse, ad as QuoteResponseObject, ae as QuoteSingleResponse, W as Range, cw as ReferralFee, az as RegisterPayeeDetailsRequest, aA as RegisterPayeeDetailsResponse, b8 as RegisteredSellerCredentialPlatform, ba as RegisteredUploadSellerCredentialParams, $ as ReleaseFundsToPayerParams, cn as RuntimeEnv, a$ as SellerAttestationOutput, aP as SellerCiphertextBundle, aU as SellerCredentialBundleUpload, b0 as SellerCredentialProbeResponse, aW as SellerCredentialStatus, aV as SellerCredentialStatusValue, aO as SellerCredentialUploadInputByPlatform, a_ as SellerPaymentTypedDataValue, aB as SellerPlatform, aT as SellerProbeInput, aQ as SellerSignedCiphertextBundle, aY as SellerTypedDataField, aZ as SellerTypedDataSpec, aS as SellerVerifyInput, aR as SellerVerifyIntentDetails, aX as SellerVerifyProxyBody, cK as SendBatchFn, cJ as SendTransactionFn, E as SignalIntentMethodParams, Y as SignalIntentParams, z as SignalIntentReferralFee, bt as TakerTier, bv as TakerTierSource, bu as TakerTierStats, L as TimeoutConfig, ai as TokenResponse, bg as UploadGoogleOAuthSellerCredentialParams, bd as UploadPayPalGoogleOAuthSellerCredentialParams, bb as UploadSellerCredentialOptions, b9 as UploadSellerCredentialParams, be as UploadVenmoGoogleOAuthSellerCredentialParams, bf as UploadZelleGoogleOAuthSellerCredentialParams, aL as VenmoCredentialUploadInput, aJ as VenmoGoogleOAuthSellerCredentialUploadBody, aC as VenmoSessionMaterial, bh as VerifySellerPaymentParams, aN as WiseCredentialUploadInput, aF as WiseProfileInfo, aH as WiseProfileNotFound, aG as WiseProfileSelectionRequired, aE as WiseSessionMaterial, X as WithdrawDepositParams, cz as ZERO_RATE_MANAGER_ID, aK as ZelleGoogleOAuthSellerCredentialUploadBody, Z as Zkp2pClient, J as Zkp2pClientOptions, cE as classifyDelegationState, bD as compareEventCursorIdsByRecency, cc as currencyInfo, bA as defaultIndexerEndpoint, cq as enrichPvDepositView, cr as enrichPvIntentView, bE as fetchIndexerFulfillmentAndPayment, cj as getContracts, cf as getCurrencyCodeFromHash, ce as getCurrencyInfoFromCountryCode, cd as getCurrencyInfoFromHash, cD as getDelegationRoute, cm as getGatingServiceAddress, cl as getPaymentMethodsCatalog, ck as getRateManagerContracts, cg as isSupportedCurrencyHash, cA as isZeroRateManagerId, ch as mapConversionRatesToOnchainMinRate, cB as normalizeRateManagerId, cC as normalizeRegistry, co as parseDepositView, cp as parseIntentView } from './vaultUtils-BwY9Z0aR.js';
1
+ import { R as ReferrerFeeConfig, S as SellerCredentialBundle, D as DepositWithRelations, I as IntentEntity, a as IdentityAttestationRequestBody, A as AttestationServiceIdentityResponse, B as BuyerTeeVerifyPaymentBody, b as AttestationServiceSellerVerifyResponse, c as SellerCredentialUploadInput, d as SellerCredentialUploadPlatform, e as SellerCredentialAttestationRuntime, f as AttestationServiceSellerCredentialUploadResponse, g as BuyerTeeSessionMaterialEncryptionInput, U as UploadSellerCredentialBundleParams, C as CuratorSellerCredentialUploadResponse, h as ApiAdapterOptions, i as ReferralDashboardResponse, j as ReferralEarningsResponse, k as RedeemReferralCodeRequest, l as RedeemReferralCodeResponse, m as UpdateReferralCodeRequest, n as UpdateReferralCodeResponse, G as GoogleOAuthSellerCredentialPlatform, o as GoogleOAuthSellerCredentialUploadBodyByPlatform, Q as QuotesBestByPlatformRequest, p as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, q as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, r as PostDepositDetailsResponse, s as GetPayeeDetailsRequest, t as GetPayeeDetailsResponse, u as GetOwnerDepositsRequest, v as GetOwnerDepositsResponse, w as GetTakerTierRequest, x as GetTakerTierResponse, y as GetDepositBundleParams, z as GetDepositBundleResponse, E as GetOrderbookParams, F as GetOrderbookResponse, H as CurrencyType, T as TakerTierLevel, J as PaymentMethodCatalog, K as TxOverrides } from './vaultUtils-DI-r1LAg.js';
2
+ export { _ as ActionCallback, ar as ApiDeposit, ay as ApiIntentStatus, b7 as AttestationServiceSellerCredentialProbeResponse, X as AuthorizationTokenProvider, cN as BatchResult, a7 as BestByPlatformResponseObject, b8 as BuyerTeePaymentParams, b9 as BuyerTeePaymentProofInput, ba as BuyerTeeSessionMaterial, O as CancelIntentMethodParams, a6 as CancelIntentParams, aR as CashAppCredentialUploadInput, aJ as CashAppSessionMaterial, a0 as CreateDepositConversionRate, $ as CreateDepositParams, bb as CuratorSellerCredentialStatusResponse, bc as CuratorSellerVerifyResponse, cg as Currency, cn as CurrencyData, cM as DelegationDepositTarget, cK as DelegationRoute, cL as DelegationState, cy as Deposit, cA as DepositCurrency, bw as DepositIntentStatistics, au as DepositStatus, as as DepositVerifier, at as DepositVerifierCurrency, bt as DepositVerifierData, cx as DepositView, an as FiatResponse, b6 as FulfillIntentAttestationResponse, N as FulfillIntentMethodParams, a4 as FulfillIntentParams, a8 as GetBestByPlatformResponse, a9 as GetBestByPlatformResponseObject, av as GetDepositByIdRequest, aw as GetDepositByIdResponse, aD as GetIntentByHashRequest, aE as GetIntentByHashResponse, aB as GetIntentsByDepositRequest, aC as GetIntentsByDepositResponse, ad as GetNearbyQuote, ae as GetNearbySuggestions, az as GetOwnerIntentsRequest, aA as GetOwnerIntentsResponse, aa as GetPlatformQuote, af as GetQuoteResponse, ag as GetQuoteResponseObject, ah as GetQuoteSingleResponse, bh as GetSellerCredentialStatusParams, bm as IdentityAttestationActionType, bn as IdentityAttestationOutput, bo as IdentityAttestationOutputFor, bp as IdentityAttestationParams, bE as IndexerClient, ca as IndexerDeploymentEnv, bK as IndexerDeposit, b$ as IndexerDepositDailySnapshot, c1 as IndexerDepositFilter, b_ as IndexerDepositFundActivity, c0 as IndexerDepositFundActivityType, c4 as IndexerDepositOrderDirection, c3 as IndexerDepositOrderField, c2 as IndexerDepositPagination, bN as IndexerDepositPaymentMethod, bG as IndexerDepositService, cd as IndexerFulfillmentAndPaymentResponse, cb as IndexerFulfillmentRecord, bL as IndexerIntentFulfilled, bM as IndexerIntentFulfillmentAmounts, bP as IndexerIntentStatus, bT as IndexerManagerAggregateStats, bV as IndexerManagerDailySnapshot, bU as IndexerManagerStats, bY as IndexerManualRateUpdate, bO as IndexerMethodCurrency, bZ as IndexerOracleConfigUpdate, cc as IndexerPaymentVerifiedRecord, bQ as IndexerRateManager, bS as IndexerRateManagerDelegation, c7 as IndexerRateManagerDelegationPagination, bX as IndexerRateManagerDetail, c5 as IndexerRateManagerFilter, bW as IndexerRateManagerListItem, c9 as IndexerRateManagerOrderDirection, c8 as IndexerRateManagerOrderField, c6 as IndexerRateManagerPagination, bR as IndexerRateManagerRate, bH as IndexerRateManagerService, ax as Intent, cC as IntentView, bq as MakerIdentityAttestationRequestBody, br as MakerIdentityPlatform, ap as NearbyQuote, aq as NearbySuggestions, Z as OfframpClient, bs as OnchainCurrency, cD as OnchainIntent, bv as OrderStats, bD as OrderbookEntry, ce as PAYMENT_PLATFORMS, aO as PayPalGoogleOAuthSellerCredentialUploadBody, cz as PaymentMethodData, cf as PaymentPlatformType, bB as PlatformLimit, ab as PlatformQuote, bC as PlatformRiskLevel, bu as PreparedTransaction, am as QuoteFeesResponse, al as QuoteIntentResponse, ac as QuoteRequest, ai as QuoteResponse, aj as QuoteResponseObject, ak as QuoteSingleResponse, a1 as Range, cB as ReferralFee, aF as RegisterPayeeDetailsRequest, aG as RegisterPayeeDetailsResponse, bd as RegisteredSellerCredentialPlatform, bf as RegisteredUploadSellerCredentialParams, a5 as ReleaseFundsToPayerParams, cs as RuntimeEnv, b4 as SellerAttestationOutput, aU as SellerCiphertextBundle, aZ as SellerCredentialBundleUpload, b5 as SellerCredentialProbeResponse, a$ as SellerCredentialStatus, a_ as SellerCredentialStatusValue, aT as SellerCredentialUploadInputByPlatform, b3 as SellerPaymentTypedDataValue, aH as SellerPlatform, aY as SellerProbeInput, aV as SellerSignedCiphertextBundle, b1 as SellerTypedDataField, b2 as SellerTypedDataSpec, aX as SellerVerifyInput, aW as SellerVerifyIntentDetails, b0 as SellerVerifyProxyBody, cP as SendBatchFn, cO as SendTransactionFn, M as SignalIntentMethodParams, a3 as SignalIntentParams, L as SignalIntentReferralFee, bx as TakerTier, bA as TakerTierSource, bz as TakerTierStats, by as TakerTierVolumeBreakdown, Y as TimeoutConfig, ao as TokenResponse, bk as UploadGoogleOAuthSellerCredentialParams, bi as UploadPayPalGoogleOAuthSellerCredentialParams, bg as UploadSellerCredentialOptions, be as UploadSellerCredentialParams, bj as UploadVenmoGoogleOAuthSellerCredentialParams, aQ as VenmoCredentialUploadInput, aP as VenmoGoogleOAuthSellerCredentialUploadBody, aI as VenmoSessionMaterial, bl as VerifySellerPaymentParams, aS as WiseCredentialUploadInput, aL as WiseProfileInfo, aN as WiseProfileNotFound, aM as WiseProfileSelectionRequired, aK as WiseSessionMaterial, a2 as WithdrawDepositParams, cE as ZERO_RATE_MANAGER_ID, Z as Zkp2pClient, W as Zkp2pClientOptions, cJ as classifyDelegationState, bI as compareEventCursorIdsByRecency, ch as currencyInfo, bF as defaultIndexerEndpoint, cv as enrichPvDepositView, cw as enrichPvIntentView, bJ as fetchIndexerFulfillmentAndPayment, co as getContracts, ck as getCurrencyCodeFromHash, cj as getCurrencyInfoFromCountryCode, ci as getCurrencyInfoFromHash, cI as getDelegationRoute, cr as getGatingServiceAddress, cq as getPaymentMethodsCatalog, cp as getRateManagerContracts, cl as isSupportedCurrencyHash, cF as isZeroRateManagerId, cm as mapConversionRatesToOnchainMinRate, cG as normalizeRateManagerId, cH as normalizeRegistry, ct as parseDepositView, cu as parseIntentView } from './vaultUtils-DI-r1LAg.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';
@@ -70,6 +70,9 @@ declare const assertValidReferrerFeeConfig: (config: ReferrerFeeConfig | undefin
70
70
  declare const parseReferrerFeeConfig: (recipient: string | null | undefined, feeBpsValue: string | number | null | undefined) => ReferrerFeeConfig | null;
71
71
  declare const referrerFeeConfigToPreciseUnits: (config: ReferrerFeeConfig) => bigint;
72
72
 
73
+ declare const normalizeReferralCode: (code: string) => string;
74
+ declare const isValidReferralCode: (code: string) => boolean;
75
+
73
76
  interface EscrowContractContext {
74
77
  address: Address;
75
78
  abi: Abi;
@@ -229,6 +232,10 @@ declare function apiGetOwnerDeposits(req: GetOwnerDepositsRequest, apiKey: strin
229
232
  * Get taker tier information for a specific address.
230
233
  */
231
234
  declare function apiGetTakerTier(req: GetTakerTierRequest, baseApiUrl: string, timeoutMs?: number): Promise<GetTakerTierResponse>;
235
+ declare function apiGetReferralDashboard(opts: ApiAdapterOptions): Promise<ReferralDashboardResponse>;
236
+ declare function apiGetReferralEarnings(opts: ApiAdapterOptions): Promise<ReferralEarningsResponse>;
237
+ declare function apiRedeemReferralCode(req: RedeemReferralCodeRequest, opts: ApiAdapterOptions): Promise<RedeemReferralCodeResponse>;
238
+ declare function apiUpdateReferralCode(req: UpdateReferralCodeRequest, opts: ApiAdapterOptions): Promise<UpdateReferralCodeResponse>;
232
239
  declare function apiUploadGoogleOAuthSellerCredential<P extends GoogleOAuthSellerCredentialPlatform>(processorName: P, payeeDetails: Hash, body: GoogleOAuthSellerCredentialUploadBodyByPlatform[P], baseApiUrl: string, opts?: {
233
240
  timeoutMs?: number;
234
241
  }): Promise<CuratorSellerCredentialUploadResponse>;
@@ -460,8 +467,10 @@ declare const TOKEN_METADATA: {
460
467
  * tier engine (curator `src/common/services/tier/tierConstants.ts`), which is
461
468
  * what the backend actually enforces.
462
469
  *
463
- * The signal is now **lifetime Peer-Pay-consumed maker volume**, not raw taker
464
- * fulfilled volume (curator PR #463 removed SAR weighting).
470
+ * The live qualification signal is Peer Pay volume. Historical maker tiers
471
+ * earned before July 1, 2026 UTC are preserved; after that cutoff, only Peer
472
+ * Pay volume moves the tier. Curator keeps the response field name
473
+ * `peerPayVolume` for compatibility.
465
474
  *
466
475
  * A user's *live* tier, cap, and progression always come from the taker-tier
467
476
  * API payload (`TakerTier.perIntentCapBaseUnits`, `minVolumeForTier`,
@@ -472,15 +481,10 @@ declare const TOKEN_METADATA: {
472
481
  * (the Fees & Tiers ladder) when no live payload is available; never gate or
473
482
  * compute a user's real cap from it.
474
483
  *
475
- * Volume bands track the live (pre-prod) tuned qualification thresholds, which
476
- * were re-anchored to the real maker distribution — PEER $1k, PLUS $10k,
477
- * PRO $50k, PLATINUM $100k (the earlier $2.5k/$20k/$75k/$300k placeholders left
478
- * PLATINUM literally unreachable; the top band sits in the $99k–$167k gap so the
479
- * same 3 whales qualify, on a round number). Caps ($100/$250/$1k/$2.5k/$5k) are
480
- * unchanged.
481
- * Production still runs the old placeholder bands until the tuned config is
482
- * promoted, so even this reference can disagree with a given environment — read
483
- * the live per-user values from the API.
484
+ * Volume bands track the live tuned qualification thresholds — PEER $1k,
485
+ * PLUS $10k, PRO $50k, PLATINUM $100k. Caps ($100/$250/$1k/$2.5k/$5k) are unchanged.
486
+ * Read the live per-user values from the API: curator can change qualification
487
+ * inputs behind the compatibility fields without changing this reference table.
484
488
  *
485
489
  * Ordered highest tier → lowest (PLATINUM first) to match UI display order.
486
490
  * PEER_PRESIDENT is invite-only and excluded from the volume ladder.
@@ -489,9 +493,9 @@ interface TakerTierScheduleEntry {
489
493
  tier: TakerTierLevel;
490
494
  /** Per-intent order cap in whole USD (base, before platform risk multipliers). */
491
495
  perIntentCapUsd: number;
492
- /** Inclusive lower bound of lifetime Peer-Pay volume (USD) that qualifies for this tier. */
496
+ /** Inclusive lower bound of Peer Pay volume (USD) that qualifies for this tier. */
493
497
  minVolumeUsd: number;
494
- /** Inclusive upper bound of lifetime Peer-Pay volume (USD); `Infinity` for the top tier. */
498
+ /** Inclusive upper bound of Peer Pay volume (USD); `Infinity` for the top tier. */
495
499
  maxVolumeUsd: number;
496
500
  }
497
501
  declare const TAKER_TIER_SCHEDULE: readonly TakerTierScheduleEntry[];
@@ -793,4 +797,4 @@ declare class ContractError extends ZKP2PError {
793
797
  constructor(message: string, details?: unknown);
794
798
  }
795
799
 
796
- export { APIError, ApiAdapterOptions, AttestationServiceIdentityResponse, AttestationServiceSellerCredentialUploadResponse, AttestationServiceSellerVerifyResponse, BASE_BUILDER_CODE, BestByPlatformResponse, BuyerTeeSessionMaterialEncryptionInput, BuyerTeeVerifyPaymentBody, 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, apiVerifyBuyerTeePayment, 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 };
800
+ export { APIError, ApiAdapterOptions, AttestationServiceIdentityResponse, AttestationServiceSellerCredentialUploadResponse, AttestationServiceSellerVerifyResponse, BASE_BUILDER_CODE, BestByPlatformResponse, BuyerTeeSessionMaterialEncryptionInput, BuyerTeeVerifyPaymentBody, 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, RedeemReferralCodeRequest, RedeemReferralCodeResponse, ReferralDashboardResponse, ReferralEarningsResponse, 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, UpdateReferralCodeRequest, UpdateReferralCodeResponse, UploadSellerCredentialBundleParams, ValidatePayeeDetailsRequest, ValidatePayeeDetailsResponse, ValidationError, ZKP2PError, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuotesBestByPlatform, apiGetReferralDashboard, apiGetReferralEarnings, apiGetTakerTier, apiPostDepositDetails, apiRedeemReferralCode, apiRequestIdentityAttestation, apiUpdateReferralCode, apiUploadGoogleOAuthSellerCredential, apiUploadSellerCredentialBundle, apiValidatePayeeDetails, apiVerifyBuyerTeePayment, appendAttributionToCalldata, asciiToBytes32, assertValidReferrerFeeConfig, convertDepositsForLiquidity, convertIndexerDepositToEscrowView, convertIndexerIntentsToEscrowViews, createCompositeDepositId, createEncryptedBuyerTeeSessionMaterial, createPeerExtensionSdk, encodePythAdapterConfig, encodeSpreadOracleAdapterConfig, encodeWithAttribution, ensureBytes32, getAttributionDataSuffix, getNextTakerTier, getPeerExtensionState, getSpreadOracleConfig, getTakerTierFeeDiscountBps, isPeerExtensionAvailable, isValidReferralCode, isValidReferrerFeeBps, isValidReferrerFeeRecipient, logger, normalizeReferralCode, openPeerExtensionInstallPage, parseReferrerFeeConfig, peerExtensionSdk, referrerFeeConfigToPreciseUnits, resolveFiatCurrencyBytes32, resolvePaymentMethodHash, resolvePaymentMethodHashFromCatalog, resolvePaymentMethodNameFromHash, sendTransactionWithAttribution, setLogLevel, validateOracleFeedsOnChain };
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
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
- import { APIError, NetworkError, ValidationError } from './chunk-GHQK65J2.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-BQINCOSO.mjs';
2
+ import { ValidationError, APIError, NetworkError } 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';
5
5
  export { asciiToBytes32, enrichPvDepositView, enrichPvIntentView, ensureBytes32, getContracts, getGatingServiceAddress, getPaymentMethodsCatalog, getRateManagerContracts, parseDepositView, parseIntentView, resolveFiatCurrencyBytes32, resolvePaymentMethodHash, resolvePaymentMethodHashFromCatalog, resolvePaymentMethodNameFromHash } from './chunk-NMIFJSZ3.mjs';
@@ -5192,10 +5192,17 @@ var logger = {
5192
5192
  }
5193
5193
  };
5194
5194
 
5195
+ // src/referral.ts
5196
+ var normalizeReferralCode = (code) => code.trim().toUpperCase();
5197
+ var isValidReferralCode = (code) => /^[A-Z0-9]{6}$/.test(normalizeReferralCode(code));
5198
+
5195
5199
  // src/adapters/api.ts
5196
- function createHeaders(apiKey) {
5200
+ function createHeaders(apiKey, authorizationToken) {
5197
5201
  const headers2 = { "Content-Type": "application/json" };
5198
5202
  if (apiKey) headers2["x-api-key"] = apiKey;
5203
+ if (authorizationToken) {
5204
+ headers2.Authorization = authorizationToken.startsWith("Bearer ") ? authorizationToken : `Bearer ${authorizationToken}`;
5205
+ }
5199
5206
  return headers2;
5200
5207
  }
5201
5208
  function withApiBase(baseApiUrl) {
@@ -5210,6 +5217,7 @@ async function apiFetch({
5210
5217
  method = "GET",
5211
5218
  body,
5212
5219
  apiKey,
5220
+ authorizationToken,
5213
5221
  timeoutMs,
5214
5222
  retryCount = 3,
5215
5223
  retryDelayMs = 1e3
@@ -5221,7 +5229,7 @@ async function apiFetch({
5221
5229
  try {
5222
5230
  const options = {
5223
5231
  method,
5224
- headers: createHeaders(apiKey)
5232
+ headers: createHeaders(apiKey, authorizationToken)
5225
5233
  };
5226
5234
  if (body && method !== "GET") {
5227
5235
  options.body = JSON.stringify(body);
@@ -5241,6 +5249,18 @@ async function apiFetch({
5241
5249
  timeoutMs
5242
5250
  );
5243
5251
  }
5252
+ function unwrapResponseObject(payload) {
5253
+ if (payload && typeof payload === "object" && "responseObject" in payload) {
5254
+ return payload.responseObject;
5255
+ }
5256
+ return payload;
5257
+ }
5258
+ function requireAuthorizationToken(authorizationToken, endpoint) {
5259
+ if (!authorizationToken) {
5260
+ throw new ValidationError(`authorizationToken is required for ${endpoint}`, "authorizationToken");
5261
+ }
5262
+ return authorizationToken;
5263
+ }
5244
5264
  function requireEscrowAddress(escrowAddress, endpoint) {
5245
5265
  if (!escrowAddress) {
5246
5266
  throw new ValidationError(`escrowAddress is required for ${endpoint}`, "escrowAddress");
@@ -5494,6 +5514,52 @@ async function apiGetTakerTier(req, baseApiUrl, timeoutMs) {
5494
5514
  timeoutMs
5495
5515
  });
5496
5516
  }
5517
+ async function apiGetReferralDashboard(opts) {
5518
+ const endpoint = "/v2/referral";
5519
+ const authorizationToken = requireAuthorizationToken(opts.authorizationToken, endpoint);
5520
+ const response = await apiFetch({
5521
+ url: `${withApiBase(opts.baseApiUrl)}${endpoint}`,
5522
+ method: "GET",
5523
+ authorizationToken,
5524
+ timeoutMs: opts.timeoutMs
5525
+ });
5526
+ return unwrapResponseObject(response);
5527
+ }
5528
+ async function apiGetReferralEarnings(opts) {
5529
+ const endpoint = "/v2/referral/earnings";
5530
+ const authorizationToken = requireAuthorizationToken(opts.authorizationToken, endpoint);
5531
+ const response = await apiFetch({
5532
+ url: `${withApiBase(opts.baseApiUrl)}${endpoint}`,
5533
+ method: "GET",
5534
+ authorizationToken,
5535
+ timeoutMs: opts.timeoutMs
5536
+ });
5537
+ return unwrapResponseObject(response);
5538
+ }
5539
+ async function apiRedeemReferralCode(req, opts) {
5540
+ const endpoint = "/v2/referral/redeem";
5541
+ const authorizationToken = requireAuthorizationToken(opts.authorizationToken, endpoint);
5542
+ const response = await apiFetch({
5543
+ url: `${withApiBase(opts.baseApiUrl)}${endpoint}`,
5544
+ method: "POST",
5545
+ body: { code: normalizeReferralCode(req.code) },
5546
+ authorizationToken,
5547
+ timeoutMs: opts.timeoutMs
5548
+ });
5549
+ return unwrapResponseObject(response);
5550
+ }
5551
+ async function apiUpdateReferralCode(req, opts) {
5552
+ const endpoint = "/v2/referral/code";
5553
+ const authorizationToken = requireAuthorizationToken(opts.authorizationToken, endpoint);
5554
+ const response = await apiFetch({
5555
+ url: `${withApiBase(opts.baseApiUrl)}${endpoint}`,
5556
+ method: "PATCH",
5557
+ body: { code: normalizeReferralCode(req.code) },
5558
+ authorizationToken,
5559
+ timeoutMs: opts.timeoutMs
5560
+ });
5561
+ return unwrapResponseObject(response);
5562
+ }
5497
5563
  async function apiUploadSellerCredential(processorName, payeeDetails, bundle, baseApiUrl, timeoutMs) {
5498
5564
  const endpoint = `/v2/makers/${encodeURIComponent(processorName)}/${encodeURIComponent(
5499
5565
  payeeDetails
@@ -6800,6 +6866,7 @@ var Zkp2pClient = class {
6800
6866
  this.baseApiUrl = opts.baseApiUrl;
6801
6867
  this.apiKey = opts.apiKey;
6802
6868
  this.authorizationToken = opts.authorizationToken;
6869
+ this.getAuthorizationToken = opts.getAuthorizationToken;
6803
6870
  this.apiTimeoutMs = opts.timeouts?.api ?? 15e3;
6804
6871
  this._pvReader = new ProtocolViewerReader({
6805
6872
  getPublicClient: () => this.publicClient,
@@ -6895,6 +6962,16 @@ var Zkp2pClient = class {
6895
6962
  `attestationServiceUrl is required when baseApiUrl is not a supported zkp2p API host: ${baseApiUrl}`
6896
6963
  );
6897
6964
  }
6965
+ async resolveAuthorizationToken(opts) {
6966
+ if (opts?.authorizationToken !== void 0) {
6967
+ return opts.authorizationToken;
6968
+ }
6969
+ const provider = opts?.getAuthorizationToken ?? this.getAuthorizationToken;
6970
+ if (provider) {
6971
+ return await provider() ?? void 0;
6972
+ }
6973
+ return this.authorizationToken;
6974
+ }
6898
6975
  normalizeOracleRateConfig(config) {
6899
6976
  return normalizeOracleRateConfig(config);
6900
6977
  }
@@ -8179,6 +8256,51 @@ var Zkp2pClient = class {
8179
8256
  const timeoutMs = opts?.timeoutMs ?? this.apiTimeoutMs;
8180
8257
  return apiGetTakerTier(req, baseApiUrl, timeoutMs);
8181
8258
  }
8259
+ /**
8260
+ * Fetch the authenticated user's referral dashboard, including their generated
8261
+ * code, reward rates, referee counts, and lifetime referral fees.
8262
+ */
8263
+ async getReferralDashboard(opts) {
8264
+ const baseApiUrl = this.stripTrailingSlash(
8265
+ opts?.baseApiUrl ?? this.baseApiUrl ?? DEFAULT_BASE_API_URL
8266
+ );
8267
+ const timeoutMs = opts?.timeoutMs ?? this.apiTimeoutMs;
8268
+ const authorizationToken = await this.resolveAuthorizationToken(opts);
8269
+ return apiGetReferralDashboard({ baseApiUrl, timeoutMs, authorizationToken });
8270
+ }
8271
+ /**
8272
+ * Fetch the authenticated user's referral earnings totals.
8273
+ */
8274
+ async getReferralEarnings(opts) {
8275
+ const baseApiUrl = this.stripTrailingSlash(
8276
+ opts?.baseApiUrl ?? this.baseApiUrl ?? DEFAULT_BASE_API_URL
8277
+ );
8278
+ const timeoutMs = opts?.timeoutMs ?? this.apiTimeoutMs;
8279
+ const authorizationToken = await this.resolveAuthorizationToken(opts);
8280
+ return apiGetReferralEarnings({ baseApiUrl, timeoutMs, authorizationToken });
8281
+ }
8282
+ /**
8283
+ * Apply another user's referral code to the authenticated account.
8284
+ */
8285
+ async redeemReferralCode(code, opts) {
8286
+ const baseApiUrl = this.stripTrailingSlash(
8287
+ opts?.baseApiUrl ?? this.baseApiUrl ?? DEFAULT_BASE_API_URL
8288
+ );
8289
+ const timeoutMs = opts?.timeoutMs ?? this.apiTimeoutMs;
8290
+ const authorizationToken = await this.resolveAuthorizationToken(opts);
8291
+ return apiRedeemReferralCode({ code }, { baseApiUrl, timeoutMs, authorizationToken });
8292
+ }
8293
+ /**
8294
+ * Customize the authenticated user's own referral code.
8295
+ */
8296
+ async updateReferralCode(code, opts) {
8297
+ const baseApiUrl = this.stripTrailingSlash(
8298
+ opts?.baseApiUrl ?? this.baseApiUrl ?? DEFAULT_BASE_API_URL
8299
+ );
8300
+ const timeoutMs = opts?.timeoutMs ?? this.apiTimeoutMs;
8301
+ const authorizationToken = await this.resolveAuthorizationToken(opts);
8302
+ return apiUpdateReferralCode({ code }, { baseApiUrl, timeoutMs, authorizationToken });
8303
+ }
8182
8304
  /**
8183
8305
  * The signed `credentialValidatedAt` field is an upload-time freshness witness minted by
8184
8306
  * attestation-service. `credentialExpiresAt` carries an upstream session expiry hint when one
@@ -8307,12 +8429,12 @@ var Zkp2pClient = class {
8307
8429
  }
8308
8430
  );
8309
8431
  }
8310
- if (params.platform === "zelle") {
8432
+ if (params.platform === "venmo") {
8311
8433
  return apiUploadGoogleOAuthSellerCredential(
8312
- "zelle",
8434
+ "venmo",
8313
8435
  params.payeeDetails,
8314
8436
  {
8315
- payeeId: params.payeeId,
8437
+ accountId: params.accountId,
8316
8438
  authorizationCode: params.authorizationCode,
8317
8439
  redirectUri: params.redirectUri
8318
8440
  },
@@ -8322,18 +8444,9 @@ var Zkp2pClient = class {
8322
8444
  }
8323
8445
  );
8324
8446
  }
8325
- return apiUploadGoogleOAuthSellerCredential(
8326
- "venmo",
8327
- params.payeeDetails,
8328
- {
8329
- accountId: params.accountId,
8330
- authorizationCode: params.authorizationCode,
8331
- redirectUri: params.redirectUri
8332
- },
8333
- baseApiUrl,
8334
- {
8335
- timeoutMs
8336
- }
8447
+ throw new ValidationError(
8448
+ `Unsupported Google OAuth seller credential platform: ${String(params.platform)}`,
8449
+ "platform"
8337
8450
  );
8338
8451
  }
8339
8452
  /**
@@ -8574,6 +8687,6 @@ var createPeerExtensionSdk = (options = {}) => ({
8574
8687
  });
8575
8688
  var peerExtensionSdk = createPeerExtensionSdk();
8576
8689
 
8577
- export { BASE_BUILDER_CODE, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ContractRouter, DEFAULT_ORACLE_MAX_STALENESS_SECONDS, IndexerClient, IndexerDepositService, IndexerRateManagerService, Zkp2pClient as OfframpClient, PAYMENT_PLATFORMS, PEER_EXTENSION_CHROME_URL, PLATFORM_METADATA, PYTH_CONTRACT_BASE, PYTH_ORACLE_ADAPTER, PYTH_ORACLE_FEEDS, SPREAD_ORACLE_FEEDS, SUPPORTED_CHAIN_IDS, TOKEN_METADATA, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, Zkp2pClient, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuotesBestByPlatform, apiGetTakerTier, apiPostDepositDetails, apiRequestIdentityAttestation, apiUploadGoogleOAuthSellerCredential, apiUploadSellerCredentialBundle, apiValidatePayeeDetails, apiVerifyBuyerTeePayment, appendAttributionToCalldata, assertValidReferrerFeeConfig, compareEventCursorIdsByRecency, convertDepositsForLiquidity, convertIndexerDepositToEscrowView, convertIndexerIntentsToEscrowViews, createCompositeDepositId, createEncryptedBuyerTeeSessionMaterial, createPeerExtensionSdk, defaultIndexerEndpoint, encodePythAdapterConfig, encodeSpreadOracleAdapterConfig, encodeWithAttribution, fetchFulfillmentAndPayment as fetchIndexerFulfillmentAndPayment, getAttributionDataSuffix, getPeerExtensionState, getSpreadOracleConfig, isPeerExtensionAvailable, isValidReferrerFeeBps, isValidReferrerFeeRecipient, logger, openPeerExtensionInstallPage, parseReferrerFeeConfig, peerExtensionSdk, referrerFeeConfigToPreciseUnits, sendTransactionWithAttribution, setLogLevel, validateOracleFeedsOnChain };
8690
+ export { BASE_BUILDER_CODE, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ContractRouter, DEFAULT_ORACLE_MAX_STALENESS_SECONDS, IndexerClient, IndexerDepositService, IndexerRateManagerService, Zkp2pClient as OfframpClient, PAYMENT_PLATFORMS, PEER_EXTENSION_CHROME_URL, PLATFORM_METADATA, PYTH_CONTRACT_BASE, PYTH_ORACLE_ADAPTER, PYTH_ORACLE_FEEDS, SPREAD_ORACLE_FEEDS, SUPPORTED_CHAIN_IDS, TOKEN_METADATA, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, Zkp2pClient, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuotesBestByPlatform, apiGetReferralDashboard, apiGetReferralEarnings, apiGetTakerTier, apiPostDepositDetails, apiRedeemReferralCode, apiRequestIdentityAttestation, apiUpdateReferralCode, apiUploadGoogleOAuthSellerCredential, apiUploadSellerCredentialBundle, apiValidatePayeeDetails, apiVerifyBuyerTeePayment, appendAttributionToCalldata, assertValidReferrerFeeConfig, compareEventCursorIdsByRecency, convertDepositsForLiquidity, convertIndexerDepositToEscrowView, convertIndexerIntentsToEscrowViews, createCompositeDepositId, createEncryptedBuyerTeeSessionMaterial, createPeerExtensionSdk, defaultIndexerEndpoint, encodePythAdapterConfig, encodeSpreadOracleAdapterConfig, encodeWithAttribution, fetchFulfillmentAndPayment as fetchIndexerFulfillmentAndPayment, getAttributionDataSuffix, getPeerExtensionState, getSpreadOracleConfig, isPeerExtensionAvailable, isValidReferralCode, isValidReferrerFeeBps, isValidReferrerFeeRecipient, logger, normalizeReferralCode, openPeerExtensionInstallPage, parseReferrerFeeConfig, peerExtensionSdk, referrerFeeConfigToPreciseUnits, sendTransactionWithAttribution, setLogLevel, validateOracleFeedsOnChain };
8578
8691
  //# sourceMappingURL=index.mjs.map
8579
8692
  //# sourceMappingURL=index.mjs.map