@zkp2p/sdk 0.8.0 → 0.9.0

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, h as CreateReferralCodeRequest, i as ApiAdapterOptions, j as CreateReferralCodeResponse, k as ReferralReadRequest, l as ReferralDashboardResponse, m as ReferralEarningsResponse, n as ReferralCodeLookupResponse, o as RedeemReferralCodeRequest, p as RedeemReferralCodeResponse, q as UpdateReferralCodeRequest, r as UpdateReferralCodeResponse, G as GoogleOAuthSellerCredentialPlatform, s as GoogleOAuthSellerCredentialUploadBodyByPlatform, Q as QuotesBestByPlatformRequest, t as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, u as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, v as PostDepositDetailsResponse, w as GetPayeeDetailsRequest, x as GetPayeeDetailsResponse, y as GetOwnerDepositsRequest, z as GetOwnerDepositsResponse, E as GetTakerTierRequest, F as GetTakerTierResponse, H as GetDepositBundleParams, J as GetDepositBundleResponse, K as GetOrderbookParams, L as GetOrderbookResponse, M as CurrencyType, T as TakerTierLevel, N as PaymentMethodCatalog, O as TxOverrides } from './vaultUtils-BGDsoxAv.mjs';
2
- export { a7 as ActionCallback, aC as ApiDeposit, aJ as ApiIntentStatus, bi as AttestationServiceSellerCredentialProbeResponse, a5 as AuthorizationTokenProvider, cY as BatchResult, ai as BestByPlatformResponseObject, bj as BuyerTeePaymentParams, bk as BuyerTeePaymentProofInput, bl as BuyerTeeSessionMaterial, a2 as CancelIntentMethodParams, ah as CancelIntentParams, b0 as CashAppCredentialUploadInput, aU as CashAppSessionMaterial, ab as CreateDepositConversionRate, aa as CreateDepositParams, bm as CuratorSellerCredentialStatusResponse, bn as CuratorSellerVerifyResponse, cr as Currency, cy as CurrencyData, cX as DelegationDepositTarget, cV as DelegationRoute, cW as DelegationState, cJ as Deposit, cL as DepositCurrency, bH as DepositIntentStatistics, aF as DepositStatus, aD as DepositVerifier, aE as DepositVerifierCurrency, bE as DepositVerifierData, cI as DepositView, ay as FiatResponse, bh as FulfillIntentAttestationResponse, a1 as FulfillIntentMethodParams, af as FulfillIntentParams, aj as GetBestByPlatformResponse, ak as GetBestByPlatformResponseObject, aG as GetDepositByIdRequest, aH as GetDepositByIdResponse, aO as GetIntentByHashRequest, aP as GetIntentByHashResponse, aM as GetIntentsByDepositRequest, aN as GetIntentsByDepositResponse, ao as GetNearbyQuote, ap as GetNearbySuggestions, aK as GetOwnerIntentsRequest, aL as GetOwnerIntentsResponse, al as GetPlatformQuote, aq as GetQuoteResponse, ar as GetQuoteResponseObject, as as GetQuoteSingleResponse, bs as GetSellerCredentialStatusParams, bx as IdentityAttestationActionType, by as IdentityAttestationOutput, bz as IdentityAttestationOutputFor, bA as IdentityAttestationParams, bP as IndexerClient, cl as IndexerDeploymentEnv, bV as IndexerDeposit, ca as IndexerDepositDailySnapshot, cc as IndexerDepositFilter, c9 as IndexerDepositFundActivity, cb as IndexerDepositFundActivityType, cf as IndexerDepositOrderDirection, ce as IndexerDepositOrderField, cd as IndexerDepositPagination, bY as IndexerDepositPaymentMethod, bR as IndexerDepositService, co as IndexerFulfillmentAndPaymentResponse, cm as IndexerFulfillmentRecord, bW as IndexerIntentFulfilled, bX as IndexerIntentFulfillmentAmounts, b_ as IndexerIntentStatus, c2 as IndexerManagerAggregateStats, c4 as IndexerManagerDailySnapshot, c3 as IndexerManagerStats, c7 as IndexerManualRateUpdate, bZ as IndexerMethodCurrency, c8 as IndexerOracleConfigUpdate, cn as IndexerPaymentVerifiedRecord, b$ as IndexerRateManager, c1 as IndexerRateManagerDelegation, ci as IndexerRateManagerDelegationPagination, c6 as IndexerRateManagerDetail, cg as IndexerRateManagerFilter, c5 as IndexerRateManagerListItem, ck as IndexerRateManagerOrderDirection, cj as IndexerRateManagerOrderField, ch as IndexerRateManagerPagination, c0 as IndexerRateManagerRate, bS as IndexerRateManagerService, aI as Intent, cN as IntentView, bB as MakerIdentityAttestationRequestBody, bC as MakerIdentityPlatform, aA as NearbyQuote, aB as NearbySuggestions, Z as OfframpClient, bD as OnchainCurrency, cO as OnchainIntent, bG as OrderStats, bO as OrderbookEntry, cp as PAYMENT_PLATFORMS, aZ as PayPalGoogleOAuthSellerCredentialUploadBody, cK as PaymentMethodData, cq as PaymentPlatformType, bM as PlatformLimit, am as PlatformQuote, bN as PlatformRiskLevel, bF as PreparedTransaction, ax as QuoteFeesResponse, aw as QuoteIntentResponse, an as QuoteRequest, at as QuoteResponse, au as QuoteResponseObject, av as QuoteSingleResponse, ac as Range, _ as RedeemReferralCodeSignatureOptions, W as ReferralBearerWriteOptions, cM as ReferralFee, X as ReferralReadOptions, a8 as ReferralRedemption, a9 as ReferralSignatureBody, Y as ReferralSignatureOptions, aQ as RegisterPayeeDetailsRequest, aR as RegisterPayeeDetailsResponse, bo as RegisteredSellerCredentialPlatform, bq as RegisteredUploadSellerCredentialParams, ag as ReleaseFundsToPayerParams, cD as RuntimeEnv, bf as SellerAttestationOutput, b3 as SellerCiphertextBundle, b8 as SellerCredentialBundleUpload, bg as SellerCredentialProbeResponse, ba as SellerCredentialStatus, b9 as SellerCredentialStatusValue, b2 as SellerCredentialUploadInputByPlatform, be as SellerPaymentTypedDataValue, aS as SellerPlatform, b7 as SellerProbeInput, b4 as SellerSignedCiphertextBundle, bc as SellerTypedDataField, bd as SellerTypedDataSpec, b6 as SellerVerifyInput, b5 as SellerVerifyIntentDetails, bb as SellerVerifyProxyBody, c_ as SendBatchFn, cZ as SendTransactionFn, a0 as SignalIntentMethodParams, ae as SignalIntentParams, $ as SignalIntentReferralFee, bI as TakerTier, bL as TakerTierSource, bK as TakerTierStats, bJ as TakerTierVolumeBreakdown, a6 as TimeoutConfig, az as TokenResponse, a3 as UpdateReferralCodeSignatureOptions, bv as UploadGoogleOAuthSellerCredentialParams, bt as UploadPayPalGoogleOAuthSellerCredentialParams, br as UploadSellerCredentialOptions, bp as UploadSellerCredentialParams, bu as UploadVenmoGoogleOAuthSellerCredentialParams, a$ as VenmoCredentialUploadInput, a_ as VenmoGoogleOAuthSellerCredentialUploadBody, aT as VenmoSessionMaterial, bw as VerifySellerPaymentParams, b1 as WiseCredentialUploadInput, aW as WiseProfileInfo, aY as WiseProfileNotFound, aX as WiseProfileSelectionRequired, aV as WiseSessionMaterial, ad as WithdrawDepositParams, cP as ZERO_RATE_MANAGER_ID, Z as Zkp2pClient, a4 as Zkp2pClientOptions, cU as classifyDelegationState, bT as compareEventCursorIdsByRecency, cs as currencyInfo, bQ as defaultIndexerEndpoint, cG as enrichPvDepositView, cH as enrichPvIntentView, bU as fetchIndexerFulfillmentAndPayment, cz as getContracts, cv as getCurrencyCodeFromHash, cu as getCurrencyInfoFromCountryCode, ct as getCurrencyInfoFromHash, cT as getDelegationRoute, cC as getGatingServiceAddress, cB as getPaymentMethodsCatalog, cA as getRateManagerContracts, cw as isSupportedCurrencyHash, cQ as isZeroRateManagerId, cx as mapConversionRatesToOnchainMinRate, cR as normalizeRateManagerId, cS as normalizeRegistry, cE as parseDepositView, cF as parseIntentView } from './vaultUtils-BGDsoxAv.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 CreateReferralCodeRequest, i as ApiAdapterOptions, j as CreateReferralCodeResponse, k as ReferralReadRequest, l as ReferralDashboardResponse, m as ReferralEarningsResponse, n as ReferralCodeLookupResponse, o as RedeemReferralCodeRequest, p as RedeemReferralCodeResponse, q as UpdateReferralCodeRequest, r as UpdateReferralCodeResponse, G as GoogleOAuthSellerCredentialPlatform, s as GoogleOAuthSellerCredentialUploadBodyByPlatform, Q as QuotesBestByPlatformRequest, t as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, u as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, v as PostDepositDetailsResponse, w as GetPayeeDetailsRequest, x as GetPayeeDetailsResponse, y as GetOwnerDepositsRequest, z as GetOwnerDepositsResponse, E as GetTakerTierRequest, F as GetTakerTierResponse, H as GetDepositBundleParams, J as GetDepositBundleResponse, K as GetOrderbookParams, L as GetOrderbookResponse, M as GetOrderbookTableResponse, N as CurrencyType, T as TakerTierLevel, O as PaymentMethodCatalog, W as TxOverrides } from './vaultUtils-aJdIIILM.mjs';
2
+ export { a8 as ActionCallback, aD as ApiDeposit, aK as ApiIntentStatus, bj as AttestationServiceSellerCredentialProbeResponse, a6 as AuthorizationTokenProvider, c_ as BatchResult, aj as BestByPlatformResponseObject, bk as BuyerTeePaymentParams, bl as BuyerTeePaymentProofInput, bm as BuyerTeeSessionMaterial, a3 as CancelIntentMethodParams, ai as CancelIntentParams, b1 as CashAppCredentialUploadInput, aV as CashAppSessionMaterial, ac as CreateDepositConversionRate, ab as CreateDepositParams, bn as CuratorSellerCredentialStatusResponse, bo as CuratorSellerVerifyResponse, ct as Currency, cA as CurrencyData, cZ as DelegationDepositTarget, cX as DelegationRoute, cY as DelegationState, cL as Deposit, cN as DepositCurrency, bI as DepositIntentStatistics, aG as DepositStatus, aE as DepositVerifier, aF as DepositVerifierCurrency, bF as DepositVerifierData, cK as DepositView, az as FiatResponse, bi as FulfillIntentAttestationResponse, a2 as FulfillIntentMethodParams, ag as FulfillIntentParams, ak as GetBestByPlatformResponse, al as GetBestByPlatformResponseObject, aH as GetDepositByIdRequest, aI as GetDepositByIdResponse, aP as GetIntentByHashRequest, aQ as GetIntentByHashResponse, aN as GetIntentsByDepositRequest, aO as GetIntentsByDepositResponse, ap as GetNearbyQuote, aq as GetNearbySuggestions, aL as GetOwnerIntentsRequest, aM as GetOwnerIntentsResponse, am as GetPlatformQuote, ar as GetQuoteResponse, as as GetQuoteResponseObject, at as GetQuoteSingleResponse, bt as GetSellerCredentialStatusParams, by as IdentityAttestationActionType, bz as IdentityAttestationOutput, bA as IdentityAttestationOutputFor, bB as IdentityAttestationParams, bR as IndexerClient, cn as IndexerDeploymentEnv, bX as IndexerDeposit, cc as IndexerDepositDailySnapshot, ce as IndexerDepositFilter, cb as IndexerDepositFundActivity, cd as IndexerDepositFundActivityType, ch as IndexerDepositOrderDirection, cg as IndexerDepositOrderField, cf as IndexerDepositPagination, b_ as IndexerDepositPaymentMethod, bT as IndexerDepositService, cq as IndexerFulfillmentAndPaymentResponse, co as IndexerFulfillmentRecord, bY as IndexerIntentFulfilled, bZ as IndexerIntentFulfillmentAmounts, c0 as IndexerIntentStatus, c4 as IndexerManagerAggregateStats, c6 as IndexerManagerDailySnapshot, c5 as IndexerManagerStats, c9 as IndexerManualRateUpdate, b$ as IndexerMethodCurrency, ca as IndexerOracleConfigUpdate, cp as IndexerPaymentVerifiedRecord, c1 as IndexerRateManager, c3 as IndexerRateManagerDelegation, ck as IndexerRateManagerDelegationPagination, c8 as IndexerRateManagerDetail, ci as IndexerRateManagerFilter, c7 as IndexerRateManagerListItem, cm as IndexerRateManagerOrderDirection, cl as IndexerRateManagerOrderField, cj as IndexerRateManagerPagination, c2 as IndexerRateManagerRate, bU as IndexerRateManagerService, aJ as Intent, cP as IntentView, bC as MakerIdentityAttestationRequestBody, bD as MakerIdentityPlatform, aB as NearbyQuote, aC as NearbySuggestions, Z as OfframpClient, bE as OnchainCurrency, cQ as OnchainIntent, bH as OrderStats, bP as OrderbookEntry, bQ as OrderbookTableRow, cr as PAYMENT_PLATFORMS, a_ as PayPalGoogleOAuthSellerCredentialUploadBody, cM as PaymentMethodData, cs as PaymentPlatformType, bN as PlatformLimit, an as PlatformQuote, bO as PlatformRiskLevel, bG as PreparedTransaction, ay as QuoteFeesResponse, ax as QuoteIntentResponse, ao as QuoteRequest, au as QuoteResponse, av as QuoteResponseObject, aw as QuoteSingleResponse, ad as Range, $ as RedeemReferralCodeSignatureOptions, X as ReferralBearerWriteOptions, cO as ReferralFee, Y as ReferralReadOptions, a9 as ReferralRedemption, aa as ReferralSignatureBody, _ as ReferralSignatureOptions, aR as RegisterPayeeDetailsRequest, aS as RegisterPayeeDetailsResponse, bp as RegisteredSellerCredentialPlatform, br as RegisteredUploadSellerCredentialParams, ah as ReleaseFundsToPayerParams, cF as RuntimeEnv, bg as SellerAttestationOutput, b4 as SellerCiphertextBundle, b9 as SellerCredentialBundleUpload, bh as SellerCredentialProbeResponse, bb as SellerCredentialStatus, ba as SellerCredentialStatusValue, b3 as SellerCredentialUploadInputByPlatform, bf as SellerPaymentTypedDataValue, aT as SellerPlatform, b8 as SellerProbeInput, b5 as SellerSignedCiphertextBundle, bd as SellerTypedDataField, be as SellerTypedDataSpec, b7 as SellerVerifyInput, b6 as SellerVerifyIntentDetails, bc as SellerVerifyProxyBody, d0 as SendBatchFn, c$ as SendTransactionFn, a1 as SignalIntentMethodParams, af as SignalIntentParams, a0 as SignalIntentReferralFee, bJ as TakerTier, bM as TakerTierSource, bL as TakerTierStats, bK as TakerTierVolumeBreakdown, a7 as TimeoutConfig, aA as TokenResponse, a4 as UpdateReferralCodeSignatureOptions, bw as UploadGoogleOAuthSellerCredentialParams, bu as UploadPayPalGoogleOAuthSellerCredentialParams, bs as UploadSellerCredentialOptions, bq as UploadSellerCredentialParams, bv as UploadVenmoGoogleOAuthSellerCredentialParams, b0 as VenmoCredentialUploadInput, a$ as VenmoGoogleOAuthSellerCredentialUploadBody, aU as VenmoSessionMaterial, bx as VerifySellerPaymentParams, b2 as WiseCredentialUploadInput, aX as WiseProfileInfo, aZ as WiseProfileNotFound, aY as WiseProfileSelectionRequired, aW as WiseSessionMaterial, ae as WithdrawDepositParams, cR as ZERO_RATE_MANAGER_ID, Z as Zkp2pClient, a5 as Zkp2pClientOptions, cW as classifyDelegationState, bV as compareEventCursorIdsByRecency, cu as currencyInfo, bS as defaultIndexerEndpoint, cI as enrichPvDepositView, cJ as enrichPvIntentView, bW as fetchIndexerFulfillmentAndPayment, cB as getContracts, cx as getCurrencyCodeFromHash, cw as getCurrencyInfoFromCountryCode, cv as getCurrencyInfoFromHash, cV as getDelegationRoute, cE as getGatingServiceAddress, cD as getPaymentMethodsCatalog, cC as getRateManagerContracts, cy as isSupportedCurrencyHash, cS as isZeroRateManagerId, cz as mapConversionRatesToOnchainMinRate, cT as normalizeRateManagerId, cU as normalizeRegistry, cG as parseDepositView, cH as parseIntentView } from './vaultUtils-aJdIIILM.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';
@@ -289,9 +289,12 @@ declare function apiRedeemReferralCode(req: RedeemReferralCodeRequest, opts: Api
289
289
  declare function apiUpdateReferralCode(req: UpdateReferralCodeRequest, opts: ApiAdapterOptions): Promise<UpdateReferralCodeResponse>;
290
290
  declare function apiUploadGoogleOAuthSellerCredential<P extends GoogleOAuthSellerCredentialPlatform>(processorName: P, payeeDetails: Hash, body: GoogleOAuthSellerCredentialUploadBodyByPlatform[P], baseApiUrl: string, opts?: {
291
291
  timeoutMs?: number;
292
+ authorizationToken?: string;
292
293
  }): Promise<CuratorSellerCredentialUploadResponse>;
293
294
  declare function apiGetOrderbook(params: GetOrderbookParams, opts: ApiAdapterOptions): Promise<GetOrderbookResponse>;
294
295
  declare function apiGetOrderbook(params: GetOrderbookParams, baseApiUrl: string, timeoutMs?: number): Promise<GetOrderbookResponse>;
296
+ declare function apiGetOrderbookTable(params: GetOrderbookParams, opts: ApiAdapterOptions): Promise<GetOrderbookTableResponse>;
297
+ declare function apiGetOrderbookTable(params: GetOrderbookParams, baseApiUrl: string, timeoutMs?: number): Promise<GetOrderbookTableResponse>;
295
298
  declare function apiGetDepositBundle(params: GetDepositBundleParams, opts: ApiAdapterOptions): Promise<GetDepositBundleResponse>;
296
299
  declare function apiGetDepositBundle(params: GetDepositBundleParams, baseApiUrl: string, timeoutMs?: number): Promise<GetDepositBundleResponse>;
297
300
 
@@ -582,10 +585,7 @@ type RuntimeEnv = 'production' | 'preproduction' | 'staging';
582
585
  * Resolves a payment method hash from a human-readable name.
583
586
  *
584
587
  * First attempts to look up the hash from contracts-v2 payment method maps.
585
- * Falls back to keccak256(name) when maps are unavailable.
586
- *
587
- * **Warning**: The fallback may not match on-chain mappings. Prefer using
588
- * `resolvePaymentMethodHashFromCatalog` with an explicit catalog.
588
+ * Rejects names that are not present in the active payment-method map.
589
589
  *
590
590
  * @param nameOrBytes - Payment method name ('wise') or existing bytes32 hash
591
591
  * @param opts.env - Runtime environment ('production' | 'staging')
@@ -847,4 +847,4 @@ declare class ContractError extends ZKP2PError {
847
847
  constructor(message: string, details?: unknown);
848
848
  }
849
849
 
850
- export { APIError, ApiAdapterOptions, AttestationServiceIdentityResponse, AttestationServiceSellerCredentialUploadResponse, AttestationServiceSellerVerifyResponse, BASE_BUILDER_CODE, BestByPlatformResponse, BuyerTeeSessionMaterialEncryptionInput, BuyerTeeVerifyPaymentBody, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ContractError, ContractRouter, type ContractRouterConfig, CreateReferralCodeRequest, CreateReferralCodeResponse, 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, REFERRAL_SIGNATURE_DOMAIN, REFERRAL_SIGNATURE_TYPES, RedeemReferralCodeRequest, RedeemReferralCodeResponse, ReferralCodeLookupResponse, ReferralDashboardResponse, ReferralEarningsResponse, ReferralReadRequest, 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, apiCreateReferralCode, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuotesBestByPlatform, apiGetReferralDashboard, apiGetReferralEarnings, apiGetTakerTier, apiLookupReferralCode, 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 };
850
+ export { APIError, ApiAdapterOptions, AttestationServiceIdentityResponse, AttestationServiceSellerCredentialUploadResponse, AttestationServiceSellerVerifyResponse, BASE_BUILDER_CODE, BestByPlatformResponse, BuyerTeeSessionMaterialEncryptionInput, BuyerTeeVerifyPaymentBody, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ContractError, ContractRouter, type ContractRouterConfig, CreateReferralCodeRequest, CreateReferralCodeResponse, CuratorSellerCredentialUploadResponse, CurrencyType, DEFAULT_ORACLE_MAX_STALENESS_SECONDS, ErrorCode, type EscrowContractContext, type EscrowDepositView, type EscrowIntentView, GetDepositBundleParams, GetDepositBundleResponse, GetOrderbookParams, GetOrderbookResponse, GetOrderbookTableResponse, 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, REFERRAL_SIGNATURE_DOMAIN, REFERRAL_SIGNATURE_TYPES, RedeemReferralCodeRequest, RedeemReferralCodeResponse, ReferralCodeLookupResponse, ReferralDashboardResponse, ReferralEarningsResponse, ReferralReadRequest, 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, apiCreateReferralCode, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOrderbookTable, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuotesBestByPlatform, apiGetReferralDashboard, apiGetReferralEarnings, apiGetTakerTier, apiLookupReferralCode, 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, h as CreateReferralCodeRequest, i as ApiAdapterOptions, j as CreateReferralCodeResponse, k as ReferralReadRequest, l as ReferralDashboardResponse, m as ReferralEarningsResponse, n as ReferralCodeLookupResponse, o as RedeemReferralCodeRequest, p as RedeemReferralCodeResponse, q as UpdateReferralCodeRequest, r as UpdateReferralCodeResponse, G as GoogleOAuthSellerCredentialPlatform, s as GoogleOAuthSellerCredentialUploadBodyByPlatform, Q as QuotesBestByPlatformRequest, t as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, u as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, v as PostDepositDetailsResponse, w as GetPayeeDetailsRequest, x as GetPayeeDetailsResponse, y as GetOwnerDepositsRequest, z as GetOwnerDepositsResponse, E as GetTakerTierRequest, F as GetTakerTierResponse, H as GetDepositBundleParams, J as GetDepositBundleResponse, K as GetOrderbookParams, L as GetOrderbookResponse, M as CurrencyType, T as TakerTierLevel, N as PaymentMethodCatalog, O as TxOverrides } from './vaultUtils-BGDsoxAv.js';
2
- export { a7 as ActionCallback, aC as ApiDeposit, aJ as ApiIntentStatus, bi as AttestationServiceSellerCredentialProbeResponse, a5 as AuthorizationTokenProvider, cY as BatchResult, ai as BestByPlatformResponseObject, bj as BuyerTeePaymentParams, bk as BuyerTeePaymentProofInput, bl as BuyerTeeSessionMaterial, a2 as CancelIntentMethodParams, ah as CancelIntentParams, b0 as CashAppCredentialUploadInput, aU as CashAppSessionMaterial, ab as CreateDepositConversionRate, aa as CreateDepositParams, bm as CuratorSellerCredentialStatusResponse, bn as CuratorSellerVerifyResponse, cr as Currency, cy as CurrencyData, cX as DelegationDepositTarget, cV as DelegationRoute, cW as DelegationState, cJ as Deposit, cL as DepositCurrency, bH as DepositIntentStatistics, aF as DepositStatus, aD as DepositVerifier, aE as DepositVerifierCurrency, bE as DepositVerifierData, cI as DepositView, ay as FiatResponse, bh as FulfillIntentAttestationResponse, a1 as FulfillIntentMethodParams, af as FulfillIntentParams, aj as GetBestByPlatformResponse, ak as GetBestByPlatformResponseObject, aG as GetDepositByIdRequest, aH as GetDepositByIdResponse, aO as GetIntentByHashRequest, aP as GetIntentByHashResponse, aM as GetIntentsByDepositRequest, aN as GetIntentsByDepositResponse, ao as GetNearbyQuote, ap as GetNearbySuggestions, aK as GetOwnerIntentsRequest, aL as GetOwnerIntentsResponse, al as GetPlatformQuote, aq as GetQuoteResponse, ar as GetQuoteResponseObject, as as GetQuoteSingleResponse, bs as GetSellerCredentialStatusParams, bx as IdentityAttestationActionType, by as IdentityAttestationOutput, bz as IdentityAttestationOutputFor, bA as IdentityAttestationParams, bP as IndexerClient, cl as IndexerDeploymentEnv, bV as IndexerDeposit, ca as IndexerDepositDailySnapshot, cc as IndexerDepositFilter, c9 as IndexerDepositFundActivity, cb as IndexerDepositFundActivityType, cf as IndexerDepositOrderDirection, ce as IndexerDepositOrderField, cd as IndexerDepositPagination, bY as IndexerDepositPaymentMethod, bR as IndexerDepositService, co as IndexerFulfillmentAndPaymentResponse, cm as IndexerFulfillmentRecord, bW as IndexerIntentFulfilled, bX as IndexerIntentFulfillmentAmounts, b_ as IndexerIntentStatus, c2 as IndexerManagerAggregateStats, c4 as IndexerManagerDailySnapshot, c3 as IndexerManagerStats, c7 as IndexerManualRateUpdate, bZ as IndexerMethodCurrency, c8 as IndexerOracleConfigUpdate, cn as IndexerPaymentVerifiedRecord, b$ as IndexerRateManager, c1 as IndexerRateManagerDelegation, ci as IndexerRateManagerDelegationPagination, c6 as IndexerRateManagerDetail, cg as IndexerRateManagerFilter, c5 as IndexerRateManagerListItem, ck as IndexerRateManagerOrderDirection, cj as IndexerRateManagerOrderField, ch as IndexerRateManagerPagination, c0 as IndexerRateManagerRate, bS as IndexerRateManagerService, aI as Intent, cN as IntentView, bB as MakerIdentityAttestationRequestBody, bC as MakerIdentityPlatform, aA as NearbyQuote, aB as NearbySuggestions, Z as OfframpClient, bD as OnchainCurrency, cO as OnchainIntent, bG as OrderStats, bO as OrderbookEntry, cp as PAYMENT_PLATFORMS, aZ as PayPalGoogleOAuthSellerCredentialUploadBody, cK as PaymentMethodData, cq as PaymentPlatformType, bM as PlatformLimit, am as PlatformQuote, bN as PlatformRiskLevel, bF as PreparedTransaction, ax as QuoteFeesResponse, aw as QuoteIntentResponse, an as QuoteRequest, at as QuoteResponse, au as QuoteResponseObject, av as QuoteSingleResponse, ac as Range, _ as RedeemReferralCodeSignatureOptions, W as ReferralBearerWriteOptions, cM as ReferralFee, X as ReferralReadOptions, a8 as ReferralRedemption, a9 as ReferralSignatureBody, Y as ReferralSignatureOptions, aQ as RegisterPayeeDetailsRequest, aR as RegisterPayeeDetailsResponse, bo as RegisteredSellerCredentialPlatform, bq as RegisteredUploadSellerCredentialParams, ag as ReleaseFundsToPayerParams, cD as RuntimeEnv, bf as SellerAttestationOutput, b3 as SellerCiphertextBundle, b8 as SellerCredentialBundleUpload, bg as SellerCredentialProbeResponse, ba as SellerCredentialStatus, b9 as SellerCredentialStatusValue, b2 as SellerCredentialUploadInputByPlatform, be as SellerPaymentTypedDataValue, aS as SellerPlatform, b7 as SellerProbeInput, b4 as SellerSignedCiphertextBundle, bc as SellerTypedDataField, bd as SellerTypedDataSpec, b6 as SellerVerifyInput, b5 as SellerVerifyIntentDetails, bb as SellerVerifyProxyBody, c_ as SendBatchFn, cZ as SendTransactionFn, a0 as SignalIntentMethodParams, ae as SignalIntentParams, $ as SignalIntentReferralFee, bI as TakerTier, bL as TakerTierSource, bK as TakerTierStats, bJ as TakerTierVolumeBreakdown, a6 as TimeoutConfig, az as TokenResponse, a3 as UpdateReferralCodeSignatureOptions, bv as UploadGoogleOAuthSellerCredentialParams, bt as UploadPayPalGoogleOAuthSellerCredentialParams, br as UploadSellerCredentialOptions, bp as UploadSellerCredentialParams, bu as UploadVenmoGoogleOAuthSellerCredentialParams, a$ as VenmoCredentialUploadInput, a_ as VenmoGoogleOAuthSellerCredentialUploadBody, aT as VenmoSessionMaterial, bw as VerifySellerPaymentParams, b1 as WiseCredentialUploadInput, aW as WiseProfileInfo, aY as WiseProfileNotFound, aX as WiseProfileSelectionRequired, aV as WiseSessionMaterial, ad as WithdrawDepositParams, cP as ZERO_RATE_MANAGER_ID, Z as Zkp2pClient, a4 as Zkp2pClientOptions, cU as classifyDelegationState, bT as compareEventCursorIdsByRecency, cs as currencyInfo, bQ as defaultIndexerEndpoint, cG as enrichPvDepositView, cH as enrichPvIntentView, bU as fetchIndexerFulfillmentAndPayment, cz as getContracts, cv as getCurrencyCodeFromHash, cu as getCurrencyInfoFromCountryCode, ct as getCurrencyInfoFromHash, cT as getDelegationRoute, cC as getGatingServiceAddress, cB as getPaymentMethodsCatalog, cA as getRateManagerContracts, cw as isSupportedCurrencyHash, cQ as isZeroRateManagerId, cx as mapConversionRatesToOnchainMinRate, cR as normalizeRateManagerId, cS as normalizeRegistry, cE as parseDepositView, cF as parseIntentView } from './vaultUtils-BGDsoxAv.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 CreateReferralCodeRequest, i as ApiAdapterOptions, j as CreateReferralCodeResponse, k as ReferralReadRequest, l as ReferralDashboardResponse, m as ReferralEarningsResponse, n as ReferralCodeLookupResponse, o as RedeemReferralCodeRequest, p as RedeemReferralCodeResponse, q as UpdateReferralCodeRequest, r as UpdateReferralCodeResponse, G as GoogleOAuthSellerCredentialPlatform, s as GoogleOAuthSellerCredentialUploadBodyByPlatform, Q as QuotesBestByPlatformRequest, t as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, u as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, v as PostDepositDetailsResponse, w as GetPayeeDetailsRequest, x as GetPayeeDetailsResponse, y as GetOwnerDepositsRequest, z as GetOwnerDepositsResponse, E as GetTakerTierRequest, F as GetTakerTierResponse, H as GetDepositBundleParams, J as GetDepositBundleResponse, K as GetOrderbookParams, L as GetOrderbookResponse, M as GetOrderbookTableResponse, N as CurrencyType, T as TakerTierLevel, O as PaymentMethodCatalog, W as TxOverrides } from './vaultUtils-aJdIIILM.js';
2
+ export { a8 as ActionCallback, aD as ApiDeposit, aK as ApiIntentStatus, bj as AttestationServiceSellerCredentialProbeResponse, a6 as AuthorizationTokenProvider, c_ as BatchResult, aj as BestByPlatformResponseObject, bk as BuyerTeePaymentParams, bl as BuyerTeePaymentProofInput, bm as BuyerTeeSessionMaterial, a3 as CancelIntentMethodParams, ai as CancelIntentParams, b1 as CashAppCredentialUploadInput, aV as CashAppSessionMaterial, ac as CreateDepositConversionRate, ab as CreateDepositParams, bn as CuratorSellerCredentialStatusResponse, bo as CuratorSellerVerifyResponse, ct as Currency, cA as CurrencyData, cZ as DelegationDepositTarget, cX as DelegationRoute, cY as DelegationState, cL as Deposit, cN as DepositCurrency, bI as DepositIntentStatistics, aG as DepositStatus, aE as DepositVerifier, aF as DepositVerifierCurrency, bF as DepositVerifierData, cK as DepositView, az as FiatResponse, bi as FulfillIntentAttestationResponse, a2 as FulfillIntentMethodParams, ag as FulfillIntentParams, ak as GetBestByPlatformResponse, al as GetBestByPlatformResponseObject, aH as GetDepositByIdRequest, aI as GetDepositByIdResponse, aP as GetIntentByHashRequest, aQ as GetIntentByHashResponse, aN as GetIntentsByDepositRequest, aO as GetIntentsByDepositResponse, ap as GetNearbyQuote, aq as GetNearbySuggestions, aL as GetOwnerIntentsRequest, aM as GetOwnerIntentsResponse, am as GetPlatformQuote, ar as GetQuoteResponse, as as GetQuoteResponseObject, at as GetQuoteSingleResponse, bt as GetSellerCredentialStatusParams, by as IdentityAttestationActionType, bz as IdentityAttestationOutput, bA as IdentityAttestationOutputFor, bB as IdentityAttestationParams, bR as IndexerClient, cn as IndexerDeploymentEnv, bX as IndexerDeposit, cc as IndexerDepositDailySnapshot, ce as IndexerDepositFilter, cb as IndexerDepositFundActivity, cd as IndexerDepositFundActivityType, ch as IndexerDepositOrderDirection, cg as IndexerDepositOrderField, cf as IndexerDepositPagination, b_ as IndexerDepositPaymentMethod, bT as IndexerDepositService, cq as IndexerFulfillmentAndPaymentResponse, co as IndexerFulfillmentRecord, bY as IndexerIntentFulfilled, bZ as IndexerIntentFulfillmentAmounts, c0 as IndexerIntentStatus, c4 as IndexerManagerAggregateStats, c6 as IndexerManagerDailySnapshot, c5 as IndexerManagerStats, c9 as IndexerManualRateUpdate, b$ as IndexerMethodCurrency, ca as IndexerOracleConfigUpdate, cp as IndexerPaymentVerifiedRecord, c1 as IndexerRateManager, c3 as IndexerRateManagerDelegation, ck as IndexerRateManagerDelegationPagination, c8 as IndexerRateManagerDetail, ci as IndexerRateManagerFilter, c7 as IndexerRateManagerListItem, cm as IndexerRateManagerOrderDirection, cl as IndexerRateManagerOrderField, cj as IndexerRateManagerPagination, c2 as IndexerRateManagerRate, bU as IndexerRateManagerService, aJ as Intent, cP as IntentView, bC as MakerIdentityAttestationRequestBody, bD as MakerIdentityPlatform, aB as NearbyQuote, aC as NearbySuggestions, Z as OfframpClient, bE as OnchainCurrency, cQ as OnchainIntent, bH as OrderStats, bP as OrderbookEntry, bQ as OrderbookTableRow, cr as PAYMENT_PLATFORMS, a_ as PayPalGoogleOAuthSellerCredentialUploadBody, cM as PaymentMethodData, cs as PaymentPlatformType, bN as PlatformLimit, an as PlatformQuote, bO as PlatformRiskLevel, bG as PreparedTransaction, ay as QuoteFeesResponse, ax as QuoteIntentResponse, ao as QuoteRequest, au as QuoteResponse, av as QuoteResponseObject, aw as QuoteSingleResponse, ad as Range, $ as RedeemReferralCodeSignatureOptions, X as ReferralBearerWriteOptions, cO as ReferralFee, Y as ReferralReadOptions, a9 as ReferralRedemption, aa as ReferralSignatureBody, _ as ReferralSignatureOptions, aR as RegisterPayeeDetailsRequest, aS as RegisterPayeeDetailsResponse, bp as RegisteredSellerCredentialPlatform, br as RegisteredUploadSellerCredentialParams, ah as ReleaseFundsToPayerParams, cF as RuntimeEnv, bg as SellerAttestationOutput, b4 as SellerCiphertextBundle, b9 as SellerCredentialBundleUpload, bh as SellerCredentialProbeResponse, bb as SellerCredentialStatus, ba as SellerCredentialStatusValue, b3 as SellerCredentialUploadInputByPlatform, bf as SellerPaymentTypedDataValue, aT as SellerPlatform, b8 as SellerProbeInput, b5 as SellerSignedCiphertextBundle, bd as SellerTypedDataField, be as SellerTypedDataSpec, b7 as SellerVerifyInput, b6 as SellerVerifyIntentDetails, bc as SellerVerifyProxyBody, d0 as SendBatchFn, c$ as SendTransactionFn, a1 as SignalIntentMethodParams, af as SignalIntentParams, a0 as SignalIntentReferralFee, bJ as TakerTier, bM as TakerTierSource, bL as TakerTierStats, bK as TakerTierVolumeBreakdown, a7 as TimeoutConfig, aA as TokenResponse, a4 as UpdateReferralCodeSignatureOptions, bw as UploadGoogleOAuthSellerCredentialParams, bu as UploadPayPalGoogleOAuthSellerCredentialParams, bs as UploadSellerCredentialOptions, bq as UploadSellerCredentialParams, bv as UploadVenmoGoogleOAuthSellerCredentialParams, b0 as VenmoCredentialUploadInput, a$ as VenmoGoogleOAuthSellerCredentialUploadBody, aU as VenmoSessionMaterial, bx as VerifySellerPaymentParams, b2 as WiseCredentialUploadInput, aX as WiseProfileInfo, aZ as WiseProfileNotFound, aY as WiseProfileSelectionRequired, aW as WiseSessionMaterial, ae as WithdrawDepositParams, cR as ZERO_RATE_MANAGER_ID, Z as Zkp2pClient, a5 as Zkp2pClientOptions, cW as classifyDelegationState, bV as compareEventCursorIdsByRecency, cu as currencyInfo, bS as defaultIndexerEndpoint, cI as enrichPvDepositView, cJ as enrichPvIntentView, bW as fetchIndexerFulfillmentAndPayment, cB as getContracts, cx as getCurrencyCodeFromHash, cw as getCurrencyInfoFromCountryCode, cv as getCurrencyInfoFromHash, cV as getDelegationRoute, cE as getGatingServiceAddress, cD as getPaymentMethodsCatalog, cC as getRateManagerContracts, cy as isSupportedCurrencyHash, cS as isZeroRateManagerId, cz as mapConversionRatesToOnchainMinRate, cT as normalizeRateManagerId, cU as normalizeRegistry, cG as parseDepositView, cH as parseIntentView } from './vaultUtils-aJdIIILM.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';
@@ -289,9 +289,12 @@ declare function apiRedeemReferralCode(req: RedeemReferralCodeRequest, opts: Api
289
289
  declare function apiUpdateReferralCode(req: UpdateReferralCodeRequest, opts: ApiAdapterOptions): Promise<UpdateReferralCodeResponse>;
290
290
  declare function apiUploadGoogleOAuthSellerCredential<P extends GoogleOAuthSellerCredentialPlatform>(processorName: P, payeeDetails: Hash, body: GoogleOAuthSellerCredentialUploadBodyByPlatform[P], baseApiUrl: string, opts?: {
291
291
  timeoutMs?: number;
292
+ authorizationToken?: string;
292
293
  }): Promise<CuratorSellerCredentialUploadResponse>;
293
294
  declare function apiGetOrderbook(params: GetOrderbookParams, opts: ApiAdapterOptions): Promise<GetOrderbookResponse>;
294
295
  declare function apiGetOrderbook(params: GetOrderbookParams, baseApiUrl: string, timeoutMs?: number): Promise<GetOrderbookResponse>;
296
+ declare function apiGetOrderbookTable(params: GetOrderbookParams, opts: ApiAdapterOptions): Promise<GetOrderbookTableResponse>;
297
+ declare function apiGetOrderbookTable(params: GetOrderbookParams, baseApiUrl: string, timeoutMs?: number): Promise<GetOrderbookTableResponse>;
295
298
  declare function apiGetDepositBundle(params: GetDepositBundleParams, opts: ApiAdapterOptions): Promise<GetDepositBundleResponse>;
296
299
  declare function apiGetDepositBundle(params: GetDepositBundleParams, baseApiUrl: string, timeoutMs?: number): Promise<GetDepositBundleResponse>;
297
300
 
@@ -582,10 +585,7 @@ type RuntimeEnv = 'production' | 'preproduction' | 'staging';
582
585
  * Resolves a payment method hash from a human-readable name.
583
586
  *
584
587
  * First attempts to look up the hash from contracts-v2 payment method maps.
585
- * Falls back to keccak256(name) when maps are unavailable.
586
- *
587
- * **Warning**: The fallback may not match on-chain mappings. Prefer using
588
- * `resolvePaymentMethodHashFromCatalog` with an explicit catalog.
588
+ * Rejects names that are not present in the active payment-method map.
589
589
  *
590
590
  * @param nameOrBytes - Payment method name ('wise') or existing bytes32 hash
591
591
  * @param opts.env - Runtime environment ('production' | 'staging')
@@ -847,4 +847,4 @@ declare class ContractError extends ZKP2PError {
847
847
  constructor(message: string, details?: unknown);
848
848
  }
849
849
 
850
- export { APIError, ApiAdapterOptions, AttestationServiceIdentityResponse, AttestationServiceSellerCredentialUploadResponse, AttestationServiceSellerVerifyResponse, BASE_BUILDER_CODE, BestByPlatformResponse, BuyerTeeSessionMaterialEncryptionInput, BuyerTeeVerifyPaymentBody, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ContractError, ContractRouter, type ContractRouterConfig, CreateReferralCodeRequest, CreateReferralCodeResponse, 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, REFERRAL_SIGNATURE_DOMAIN, REFERRAL_SIGNATURE_TYPES, RedeemReferralCodeRequest, RedeemReferralCodeResponse, ReferralCodeLookupResponse, ReferralDashboardResponse, ReferralEarningsResponse, ReferralReadRequest, 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, apiCreateReferralCode, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuotesBestByPlatform, apiGetReferralDashboard, apiGetReferralEarnings, apiGetTakerTier, apiLookupReferralCode, 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 };
850
+ export { APIError, ApiAdapterOptions, AttestationServiceIdentityResponse, AttestationServiceSellerCredentialUploadResponse, AttestationServiceSellerVerifyResponse, BASE_BUILDER_CODE, BestByPlatformResponse, BuyerTeeSessionMaterialEncryptionInput, BuyerTeeVerifyPaymentBody, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ContractError, ContractRouter, type ContractRouterConfig, CreateReferralCodeRequest, CreateReferralCodeResponse, CuratorSellerCredentialUploadResponse, CurrencyType, DEFAULT_ORACLE_MAX_STALENESS_SECONDS, ErrorCode, type EscrowContractContext, type EscrowDepositView, type EscrowIntentView, GetDepositBundleParams, GetDepositBundleResponse, GetOrderbookParams, GetOrderbookResponse, GetOrderbookTableResponse, 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, REFERRAL_SIGNATURE_DOMAIN, REFERRAL_SIGNATURE_TYPES, RedeemReferralCodeRequest, RedeemReferralCodeResponse, ReferralCodeLookupResponse, ReferralDashboardResponse, ReferralEarningsResponse, ReferralReadRequest, 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, apiCreateReferralCode, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOrderbookTable, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuotesBestByPlatform, apiGetReferralDashboard, apiGetReferralEarnings, apiGetTakerTier, apiLookupReferralCode, 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,8 +1,8 @@
1
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-EIOXBVXP.mjs';
2
2
  import { ValidationError, APIError, NetworkError } from './chunk-GHQK65J2.mjs';
3
3
  export { APIError, ContractError, ErrorCode, NetworkError, ValidationError, ZKP2PError } from './chunk-GHQK65J2.mjs';
4
- import { getContracts, getRateManagerContracts, getPaymentMethodsCatalog, resolvePaymentMethodHashFromCatalog, getGatingServiceAddress, parseBigIntLike, resolveFiatCurrencyBytes32, resolvePaymentMethodNameFromHash } from './chunk-ZM4ZP5GQ.mjs';
5
- export { asciiToBytes32, enrichPvDepositView, enrichPvIntentView, ensureBytes32, getContracts, getGatingServiceAddress, getPaymentMethodsCatalog, getRateManagerContracts, parseDepositView, parseIntentView, resolveFiatCurrencyBytes32, resolvePaymentMethodHash, resolvePaymentMethodHashFromCatalog, resolvePaymentMethodNameFromHash } from './chunk-ZM4ZP5GQ.mjs';
4
+ import { METHOD_NAME_TO_HASH, matchesQuotePaymentMethod, matchesPaymentMethodNameAndHash, getContracts, getRateManagerContracts, getPaymentMethodsCatalog, resolvePaymentMethodHashFromCatalog, getGatingServiceAddress, parseBigIntLike, SUPPORTED_PAYMENT_METHOD_HASHES, resolveFiatCurrencyBytes32, resolvePaymentMethodNameFromHash } from './chunk-FSIRPX4W.mjs';
5
+ export { PAYMENT_PLATFORMS, asciiToBytes32, enrichPvDepositView, enrichPvIntentView, ensureBytes32, getContracts, getGatingServiceAddress, getPaymentMethodsCatalog, getRateManagerContracts, parseDepositView, parseIntentView, resolveFiatCurrencyBytes32, resolvePaymentMethodHash, resolvePaymentMethodHashFromCatalog, resolvePaymentMethodNameFromHash } from './chunk-FSIRPX4W.mjs';
6
6
  import { Currency, currencyKeccak256 } from './chunk-ZFBH4HD7.mjs';
7
7
  export { Currency, currencyInfo, getCurrencyCodeFromHash, getCurrencyInfoFromCountryCode, getCurrencyInfoFromHash, isSupportedCurrencyHash, mapConversionRatesToOnchainMinRate } from './chunk-ZFBH4HD7.mjs';
8
8
  import './chunk-J5LGTIGS.mjs';
@@ -813,25 +813,10 @@ async function sendTransactionWithAttribution(walletClient, request, referrer, o
813
813
  });
814
814
  }
815
815
 
816
- // src/types/index.ts
817
- var PAYMENT_PLATFORMS = [
818
- "wise",
819
- "venmo",
820
- "revolut",
821
- "cashapp",
822
- "mercadopago",
823
- "zelle",
824
- "paypal",
825
- "monzo",
826
- "chime",
827
- "luxon",
828
- "n26"
829
- ];
830
-
831
816
  // src/utils/constants.ts
832
817
  var DEFAULT_BASE_API_URL = "https://api.zkp2p.xyz";
833
818
 
834
- // ../../node_modules/.pnpm/@zkp2p+contracts-v2@0.2.4_ethers@6.16.0_bufferutil@4.1.0_utf-8-validate@5.0.10__typescript@5.9.3_zod@4.2.1/node_modules/@zkp2p/contracts-v2/oracleFeeds/chainlink.json
819
+ // ../../node_modules/.pnpm/@zkp2p+contracts-v2@0.3.0_ethers@6.16.0_bufferutil@4.1.0_utf-8-validate@5.0.10__typescript@5.9.3_zod@4.2.1/node_modules/@zkp2p/contracts-v2/oracleFeeds/chainlink.json
835
820
  var chainlink_default = {
836
821
  feeds: [
837
822
  {
@@ -1983,7 +1968,7 @@ var ProtocolViewerReader = class {
1983
1968
  if (inputCount === null) {
1984
1969
  throw new Error("Configured ProtocolViewer ABI does not expose getDeposit");
1985
1970
  }
1986
- const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-GG6UQKLO.mjs');
1971
+ const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-ER62YZ5L.mjs');
1987
1972
  if (inputCount >= 3) {
1988
1973
  return tryContexts(
1989
1974
  protocolViewerContexts,
@@ -2062,7 +2047,7 @@ var ProtocolViewerReader = class {
2062
2047
  return Promise.all(ids.map((id) => this.config.host.getPvDepositById(id)));
2063
2048
  }
2064
2049
  const bn = ids.map((id) => typeof id === "bigint" ? id : parseRawDepositId(id));
2065
- const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-GG6UQKLO.mjs');
2050
+ const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-ER62YZ5L.mjs');
2066
2051
  if (inputCount >= 2) {
2067
2052
  const requests = ids.map((id, index) => ({
2068
2053
  index,
@@ -2167,7 +2152,7 @@ var ProtocolViewerReader = class {
2167
2152
  if (!protocolViewerAddress || !protocolViewerAbi || inputCount === null) {
2168
2153
  return this.config.host.getPvAccountDepositsFromIndexer(owner);
2169
2154
  }
2170
- const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-GG6UQKLO.mjs');
2155
+ const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-ER62YZ5L.mjs');
2171
2156
  const { address, abi } = this.config.host.requireProtocolViewer();
2172
2157
  if (inputCount >= 2) {
2173
2158
  const readAndFilter = async (raw2) => {
@@ -2238,7 +2223,7 @@ var ProtocolViewerReader = class {
2238
2223
  if (protocolViewerEntries.length === 0) {
2239
2224
  throw new Error("ProtocolViewer not available for this network");
2240
2225
  }
2241
- const { parseIntentView: parseIntentView2 } = await import('./protocolViewerParsers-GG6UQKLO.mjs');
2226
+ const { parseIntentView: parseIntentView2 } = await import('./protocolViewerParsers-ER62YZ5L.mjs');
2242
2227
  const intentsByHash = /* @__PURE__ */ new Map();
2243
2228
  let attemptedRead = false;
2244
2229
  let hadSuccessfulRead = false;
@@ -2346,7 +2331,7 @@ var ProtocolViewerReader = class {
2346
2331
  if (protocolViewerEntries.length === 0) {
2347
2332
  throw new Error("ProtocolViewer not available for this network");
2348
2333
  }
2349
- const { parseIntentView: parseIntentView2 } = await import('./protocolViewerParsers-GG6UQKLO.mjs');
2334
+ const { parseIntentView: parseIntentView2 } = await import('./protocolViewerParsers-ER62YZ5L.mjs');
2350
2335
  let lastError;
2351
2336
  for (const pvEntry of protocolViewerEntries) {
2352
2337
  const inputCount = this.pvEntryFunctionInputCount(pvEntry, "getIntent");
@@ -3558,7 +3543,7 @@ var MAKER_FUND_ACTIVITIES_QUERY = (
3558
3543
  `
3559
3544
  query GetMakerFundActivities($depositor: String!, $limit: Int) {
3560
3545
  DepositFundActivity(
3561
- where: { depositor: { _eq: $depositor } }
3546
+ where: { depositor: { _ilike: $depositor } }
3562
3547
  order_by: { timestamp: desc }
3563
3548
  limit: $limit
3564
3549
  ) {
@@ -4337,6 +4322,7 @@ function buildLegacyVerifierCurrencies(deposit) {
4337
4322
  const currenciesByMethod = /* @__PURE__ */ new Map();
4338
4323
  for (const currency of deposit.currencies ?? []) {
4339
4324
  const methodHash = currency.paymentMethodHash;
4325
+ if (!SUPPORTED_PAYMENT_METHOD_HASHES.has(methodHash.toLowerCase())) continue;
4340
4326
  const resolvedConversionRate = currency.conversionRate ?? currency.minConversionRate;
4341
4327
  if (resolvedConversionRate === null || resolvedConversionRate === void 0) {
4342
4328
  logger.warn(
@@ -4358,7 +4344,9 @@ function buildLegacyVerifierCurrencies(deposit) {
4358
4344
  }
4359
4345
  function convertIndexerDepositToLegacyApiDeposit(deposit) {
4360
4346
  const currenciesByMethod = buildLegacyVerifierCurrencies(deposit);
4361
- const verifiers = (deposit.paymentMethods ?? []).filter((paymentMethod) => paymentMethod.active !== false).map((paymentMethod) => ({
4347
+ const verifiers = (deposit.paymentMethods ?? []).filter(
4348
+ (paymentMethod) => paymentMethod.active !== false && SUPPORTED_PAYMENT_METHOD_HASHES.has(paymentMethod.paymentMethodHash.toLowerCase())
4349
+ ).map((paymentMethod) => ({
4362
4350
  depositId: Number(deposit.depositId),
4363
4351
  verifier: "",
4364
4352
  methodHash: paymentMethod.paymentMethodHash,
@@ -4460,13 +4448,28 @@ async function apiGetQuotesBestByPlatform(req, baseApiUrl, timeoutMs, apiKey) {
4460
4448
  Object.keys(requestBody).forEach(
4461
4449
  (key) => requestBody[key] === void 0 && delete requestBody[key]
4462
4450
  );
4463
- return apiFetch({
4451
+ const response = await apiFetch({
4464
4452
  url,
4465
4453
  method: "POST",
4466
4454
  body: requestBody,
4467
4455
  apiKey,
4468
4456
  timeoutMs
4469
4457
  });
4458
+ return {
4459
+ ...response,
4460
+ responseObject: {
4461
+ ...response.responseObject,
4462
+ platformQuotes: (response.responseObject?.platformQuotes ?? []).filter((platformQuote) => {
4463
+ const platform = platformQuote.platform.trim().toLowerCase();
4464
+ if (!METHOD_NAME_TO_HASH[platform]) return false;
4465
+ if (!platformQuote.bestQuote) return true;
4466
+ return platform === platformQuote.bestQuote.intent.processorName.trim().toLowerCase() && matchesQuotePaymentMethod(
4467
+ platformQuote.bestQuote.intent.processorName,
4468
+ platformQuote.bestQuote.paymentMethod
4469
+ );
4470
+ })
4471
+ }
4472
+ };
4470
4473
  }
4471
4474
  async function apiGetPayeeDetails(req, baseApiUrl, timeoutMs) {
4472
4475
  return apiFetch({
@@ -4643,7 +4646,8 @@ async function apiUploadGoogleOAuthSellerCredential(processorName, payeeDetails,
4643
4646
  url: `${withApiBase(baseApiUrl)}${endpoint}`,
4644
4647
  method: "POST",
4645
4648
  body,
4646
- timeoutMs: opts?.timeoutMs
4649
+ timeoutMs: opts?.timeoutMs,
4650
+ authorizationToken: opts?.authorizationToken
4647
4651
  });
4648
4652
  }
4649
4653
  async function apiGetSellerCredentialStatus(processorName, payeeDetails, baseApiUrl, timeoutMs) {
@@ -4686,7 +4690,35 @@ async function apiGetOrderbook(params, optsOrBaseApiUrl, timeoutMs) {
4686
4690
  method: "GET",
4687
4691
  timeoutMs: opts.timeoutMs
4688
4692
  });
4689
- return response.responseObject;
4693
+ return {
4694
+ ...response.responseObject,
4695
+ entries: response.responseObject.entries.filter(
4696
+ (entry) => matchesPaymentMethodNameAndHash(entry.paymentPlatform, entry.paymentMethodHash)
4697
+ )
4698
+ };
4699
+ }
4700
+ async function apiGetOrderbookTable(params, optsOrBaseApiUrl, timeoutMs) {
4701
+ const opts = typeof optsOrBaseApiUrl === "string" ? {
4702
+ baseApiUrl: optsOrBaseApiUrl,
4703
+ timeoutMs
4704
+ } : optsOrBaseApiUrl;
4705
+ const query = new URLSearchParams();
4706
+ Object.entries(params).forEach(([key, value]) => {
4707
+ if (value === void 0 || value === null) return;
4708
+ query.set(key, String(value));
4709
+ });
4710
+ const response = await apiFetch({
4711
+ url: `${withApiBase(opts.baseApiUrl)}/v2/orderbook/table?${query.toString()}`,
4712
+ method: "GET",
4713
+ timeoutMs: opts.timeoutMs
4714
+ });
4715
+ const responseObject = unwrapResponseObject(response);
4716
+ return {
4717
+ ...responseObject,
4718
+ rows: responseObject.rows.filter(
4719
+ (row) => matchesPaymentMethodNameAndHash(row.paymentPlatform, row.paymentMethodHash)
4720
+ )
4721
+ };
4690
4722
  }
4691
4723
  async function apiGetDepositBundle(params, optsOrBaseApiUrl, timeoutMs) {
4692
4724
  const opts = typeof optsOrBaseApiUrl === "string" ? {
@@ -6186,6 +6218,12 @@ function normalizeQuotePayeeData(maker) {
6186
6218
  metadata: isObjectRecord(maker?.metadata) ? maker.metadata : legacy?.metadata ?? null
6187
6219
  };
6188
6220
  }
6221
+ function isActiveQuotePaymentMethod(quote) {
6222
+ if (!quote?.intent || typeof quote.intent.processorName !== "string" || typeof quote.paymentMethod !== "string") {
6223
+ return false;
6224
+ }
6225
+ return matchesQuotePaymentMethod(quote.intent.processorName, quote.paymentMethod);
6226
+ }
6189
6227
  function normalizePayeeDataInputItem(raw) {
6190
6228
  if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
6191
6229
  return null;
@@ -6234,6 +6272,7 @@ function resolvePayeeDataInput(params, methodName) {
6234
6272
  return normalized;
6235
6273
  }
6236
6274
  function toPostDepositDetailsRequest(processorName, payeeData, index) {
6275
+ assertKnownProcessorName(processorName, `processorNames[${index}]`);
6237
6276
  if (!payeeData || typeof payeeData.offchainId !== "string" || payeeData.offchainId.length === 0) {
6238
6277
  throw new Error(`payeeData[${index}] must include a non-empty offchainId`);
6239
6278
  }
@@ -6244,6 +6283,26 @@ function toPostDepositDetailsRequest(processorName, payeeData, index) {
6244
6283
  metadata: getPayeeRegistrationMetadata(payeeData)
6245
6284
  };
6246
6285
  }
6286
+ function assertKnownProcessorName(processorName, field) {
6287
+ if (!METHOD_NAME_TO_HASH[processorName.toLowerCase()]) {
6288
+ throw new ValidationError(`Unknown processorName: ${processorName}`, field);
6289
+ }
6290
+ }
6291
+ function assertCatalogPaymentMethods(paymentMethods, chainId, runtimeEnv, field) {
6292
+ const catalogHashes = new Set(
6293
+ Object.values(getPaymentMethodsCatalog(chainId, runtimeEnv)).map(
6294
+ (entry) => entry.paymentMethodHash.toLowerCase()
6295
+ )
6296
+ );
6297
+ paymentMethods.forEach((paymentMethod, index) => {
6298
+ if (!catalogHashes.has(paymentMethod.toLowerCase())) {
6299
+ throw new ValidationError(
6300
+ `Unsupported payment method hash: ${paymentMethod}`,
6301
+ `${field}[${index}]`
6302
+ );
6303
+ }
6304
+ });
6305
+ }
6247
6306
  var Zkp2pClient = class {
6248
6307
  /**
6249
6308
  * Creates a new Zkp2pClient instance.
@@ -6596,6 +6655,12 @@ var Zkp2pClient = class {
6596
6655
  */
6597
6656
  this.addPaymentMethods = Object.assign(
6598
6657
  async (params) => {
6658
+ assertCatalogPaymentMethods(
6659
+ params.paymentMethods,
6660
+ this.chainId,
6661
+ this.runtimeEnv,
6662
+ "paymentMethods"
6663
+ );
6599
6664
  const escrowContext = await this.resolveEscrowContextForDepositWrite({
6600
6665
  escrowAddress: params.escrowAddress,
6601
6666
  depositId: params.depositId,
@@ -6620,6 +6685,12 @@ var Zkp2pClient = class {
6620
6685
  },
6621
6686
  {
6622
6687
  prepare: async (params) => {
6688
+ assertCatalogPaymentMethods(
6689
+ params.paymentMethods,
6690
+ this.chainId,
6691
+ this.runtimeEnv,
6692
+ "paymentMethods"
6693
+ );
6623
6694
  const escrowContext = await this.resolveEscrowContextForDepositWrite({
6624
6695
  escrowAddress: params.escrowAddress,
6625
6696
  depositId: params.depositId,
@@ -8251,6 +8322,9 @@ var Zkp2pClient = class {
8251
8322
  if (!Array.isArray(params.processorNames) || params.processorNames.length === 0) {
8252
8323
  throw new Error("processorNames must be a non-empty array");
8253
8324
  }
8325
+ params.processorNames.forEach(
8326
+ (processorName, index) => assertKnownProcessorName(processorName, `processorNames[${index}]`)
8327
+ );
8254
8328
  if (params.processorNames.length !== params.conversionRates.length) {
8255
8329
  throw new Error("processorNames and conversionRates length mismatch");
8256
8330
  }
@@ -8279,6 +8353,12 @@ var Zkp2pClient = class {
8279
8353
  "paymentMethodsOverride, paymentMethodDataOverride, and currenciesOverride length mismatch"
8280
8354
  );
8281
8355
  }
8356
+ assertCatalogPaymentMethods(
8357
+ params.paymentMethodsOverride,
8358
+ this.chainId,
8359
+ this.runtimeEnv,
8360
+ "paymentMethodsOverride"
8361
+ );
8282
8362
  paymentMethods = params.paymentMethodsOverride;
8283
8363
  paymentMethodData = params.paymentMethodDataOverride;
8284
8364
  currencies = params.currenciesOverride;
@@ -8467,6 +8547,9 @@ var Zkp2pClient = class {
8467
8547
  */
8468
8548
  async getQuote(req, opts) {
8469
8549
  const referrerFeeConfig = assertValidReferrerFeeConfig(req.referrerFeeConfig, "getQuote");
8550
+ req.paymentPlatforms.forEach(
8551
+ (processorName, index) => assertKnownProcessorName(processorName, `paymentPlatforms[${index}]`)
8552
+ );
8470
8553
  const baseApiUrl = (opts?.baseApiUrl ?? this.baseApiUrl ?? DEFAULT_BASE_API_URL).replace(
8471
8554
  /\/$/,
8472
8555
  ""
@@ -8480,7 +8563,18 @@ var Zkp2pClient = class {
8480
8563
  }
8481
8564
  }
8482
8565
  const quote = await apiGetQuote(reqWithEscrow, baseApiUrl, timeoutMs, this.apiKey);
8483
- const quotes = quote?.responseObject?.quotes ?? [];
8566
+ const quotes = (quote?.responseObject?.quotes ?? []).filter(isActiveQuotePaymentMethod);
8567
+ quote.responseObject.quotes = quotes;
8568
+ if (quote.responseObject.nearbySuggestions) {
8569
+ quote.responseObject.nearbySuggestions = {
8570
+ below: quote.responseObject.nearbySuggestions.below.filter(
8571
+ (suggestion) => isActiveQuotePaymentMethod(suggestion.quote)
8572
+ ),
8573
+ above: quote.responseObject.nearbySuggestions.above.filter(
8574
+ (suggestion) => isActiveQuotePaymentMethod(suggestion.quote)
8575
+ )
8576
+ };
8577
+ }
8484
8578
  for (const q of quotes) {
8485
8579
  const payeeData = normalizeQuotePayeeData(q.maker);
8486
8580
  if (payeeData) {
@@ -8526,7 +8620,11 @@ var Zkp2pClient = class {
8526
8620
  ...quote,
8527
8621
  responseObject: {
8528
8622
  ...quote.responseObject,
8529
- platformQuotes: (quote.responseObject?.platformQuotes ?? []).map((platformQuote) => {
8623
+ platformQuotes: (quote.responseObject?.platformQuotes ?? []).filter((platformQuote) => {
8624
+ const platform = platformQuote.platform.trim().toLowerCase();
8625
+ if (!METHOD_NAME_TO_HASH[platform]) return false;
8626
+ return !platformQuote.bestQuote || platform === platformQuote.bestQuote.intent.processorName.trim().toLowerCase() && isActiveQuotePaymentMethod(platformQuote.bestQuote);
8627
+ }).map((platformQuote) => {
8530
8628
  const bestQuote = platformQuote?.bestQuote;
8531
8629
  const payeeData = normalizeQuotePayeeData(bestQuote?.maker);
8532
8630
  if (!bestQuote || !payeeData) return platformQuote;
@@ -8704,6 +8802,18 @@ var Zkp2pClient = class {
8704
8802
  opts?.baseApiUrl ?? this.baseApiUrl ?? DEFAULT_BASE_API_URL
8705
8803
  );
8706
8804
  const timeoutMs = opts?.timeoutMs ?? this.apiTimeoutMs;
8805
+ const getUploadOptions = async () => {
8806
+ let authorizationToken;
8807
+ try {
8808
+ authorizationToken = await this.resolveAuthorizationToken();
8809
+ } catch {
8810
+ authorizationToken = void 0;
8811
+ }
8812
+ return {
8813
+ timeoutMs,
8814
+ ...authorizationToken ? { authorizationToken } : {}
8815
+ };
8816
+ };
8707
8817
  if (params.platform === "paypal") {
8708
8818
  return apiUploadGoogleOAuthSellerCredential(
8709
8819
  "paypal",
@@ -8714,9 +8824,7 @@ var Zkp2pClient = class {
8714
8824
  redirectUri: params.redirectUri
8715
8825
  },
8716
8826
  baseApiUrl,
8717
- {
8718
- timeoutMs
8719
- }
8827
+ await getUploadOptions()
8720
8828
  );
8721
8829
  }
8722
8830
  if (params.platform === "venmo") {
@@ -8729,9 +8837,7 @@ var Zkp2pClient = class {
8729
8837
  redirectUri: params.redirectUri
8730
8838
  },
8731
8839
  baseApiUrl,
8732
- {
8733
- timeoutMs
8734
- }
8840
+ await getUploadOptions()
8735
8841
  );
8736
8842
  }
8737
8843
  throw new ValidationError(
@@ -8961,6 +9067,6 @@ var createPeerExtensionSdk = (options = {}) => ({
8961
9067
  });
8962
9068
  var peerExtensionSdk = createPeerExtensionSdk();
8963
9069
 
8964
- 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, REFERRAL_SIGNATURE_DOMAIN, REFERRAL_SIGNATURE_TYPES, SPREAD_ORACLE_FEEDS, SUPPORTED_CHAIN_IDS, TOKEN_METADATA, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, Zkp2pClient, apiCreateReferralCode, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuotesBestByPlatform, apiGetReferralDashboard, apiGetReferralEarnings, apiGetTakerTier, apiLookupReferralCode, 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 };
9070
+ export { BASE_BUILDER_CODE, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ContractRouter, DEFAULT_ORACLE_MAX_STALENESS_SECONDS, IndexerClient, IndexerDepositService, IndexerRateManagerService, Zkp2pClient as OfframpClient, PEER_EXTENSION_CHROME_URL, PLATFORM_METADATA, PYTH_CONTRACT_BASE, PYTH_ORACLE_ADAPTER, PYTH_ORACLE_FEEDS, REFERRAL_SIGNATURE_DOMAIN, REFERRAL_SIGNATURE_TYPES, SPREAD_ORACLE_FEEDS, SUPPORTED_CHAIN_IDS, TOKEN_METADATA, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, Zkp2pClient, apiCreateReferralCode, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOrderbookTable, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuotesBestByPlatform, apiGetReferralDashboard, apiGetReferralEarnings, apiGetTakerTier, apiLookupReferralCode, 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 };
8965
9071
  //# sourceMappingURL=index.mjs.map
8966
9072
  //# sourceMappingURL=index.mjs.map