@zkp2p/sdk 0.13.0 → 0.14.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/README.md +1 -1
- package/dist/build-metadata.json +3 -3
- package/dist/{chunk-MQYPXD7D.mjs → chunk-4KACMRKF.mjs} +102 -90
- package/dist/chunk-4KACMRKF.mjs.map +1 -0
- package/dist/chunk-5MBWIMIB.mjs +12 -0
- package/dist/chunk-5MBWIMIB.mjs.map +1 -0
- package/dist/{currency-5W2J2RG5.mjs → currency-KDDCBZU2.mjs} +3 -3
- package/dist/{currency-5W2J2RG5.mjs.map → currency-KDDCBZU2.mjs.map} +1 -1
- package/dist/index.cjs +274 -234
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +98 -70
- package/dist/index.mjs.map +1 -1
- package/dist/protocolViewerParsers-S6VTWVVJ.mjs +5 -0
- package/dist/{protocolViewerParsers-DBVBXRYN.mjs.map → protocolViewerParsers-S6VTWVVJ.mjs.map} +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.mjs +1 -1
- package/dist/{timeout-WA3MYQQ5.mjs → timeout-7H5K6BBB.mjs} +3 -3
- package/dist/{timeout-WA3MYQQ5.mjs.map → timeout-7H5K6BBB.mjs.map} +1 -1
- package/dist/{vaultUtils-D9um2feo.d.mts → vaultUtils-Llr7Gh2R.d.mts} +11 -8
- package/dist/{vaultUtils-D9um2feo.d.ts → vaultUtils-Llr7Gh2R.d.ts} +11 -8
- package/package.json +2 -2
- package/dist/chunk-EHLMW7OM.mjs +0 -12
- package/dist/chunk-EHLMW7OM.mjs.map +0 -1
- package/dist/chunk-MQYPXD7D.mjs.map +0 -1
- package/dist/protocolViewerParsers-DBVBXRYN.mjs +0 -5
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 GetDepositBundleParams, F as GetDepositBundleResponse, H as GetOrderbookParams, J as GetOrderbookResponse, K as GetOrderbookTableResponse, L as QuoteRequest, M as QuoteResponse, N as CuratorMetadata, O as CurrencyType, T as PaymentMethodCatalog, W as TxOverrides } from './vaultUtils-
|
|
2
|
-
export {
|
|
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 GetDepositBundleParams, F as GetDepositBundleResponse, H as GetOrderbookParams, J as GetOrderbookResponse, K as GetOrderbookTableResponse, L as QuoteRequest, M as QuoteResponse, N as CuratorMetadata, O as CurrencyType, T as PaymentMethodCatalog, W as TxOverrides } from './vaultUtils-Llr7Gh2R.mjs';
|
|
2
|
+
export { dE as AccessPolicyOperations, dF as AccessPolicyUnsupportedError, am as ActionCallback, aR as ApiDeposit, aY as ApiIntentStatus, bw as AttestationServiceSellerCredentialProbeResponse, ak as AuthorizationTokenProvider, dB as BatchResult, ax as BestByPlatformResponseObject, bx as BuyerTeePaymentParams, by as BuyerTeePaymentProofInput, bz as BuyerTeeSessionMaterial, a3 as CancelIntentMethodParams, aw as CancelIntentParams, be as CashAppCredentialUploadInput, b7 as CashAppSessionMaterial, aq as CreateDepositConversionRate, ap as CreateDepositParams, bA as CuratorSellerCredentialStatusResponse, bB as CuratorSellerVerifyResponse, cV as Currency, d0 as CurrencyData, db as DISPUTE_PROTECTION_POLICY_ABI, dA as DelegationDepositTarget, dy as DelegationRoute, dz as DelegationState, dl as Deposit, dn as DepositCurrency, bU as DepositIntentStatistics, aU as DepositStatus, aS as DepositVerifier, aT as DepositVerifierCurrency, bR as DepositVerifierData, dk as DepositView, aa as DisputeAttestationConfig, cp as DisputeProtectionIntentPage, cq as DisputeProtectionIntentPageParams, ab as DisputeProtectionReadinessOptions, ac as DisputeProtectionReadinessResult, aN as FiatResponse, bv as FulfillIntentAttestationResponse, a2 as FulfillIntentMethodParams, au as FulfillIntentParams, ay as GetBestByPlatformResponse, az as GetBestByPlatformResponseObject, aV as GetDepositByIdRequest, aW as GetDepositByIdResponse, b1 as GetIntentByHashRequest, b2 as GetIntentByHashResponse, a$ as GetIntentsByDepositRequest, b0 as GetIntentsByDepositResponse, aD as GetNearbyQuote, aE as GetNearbySuggestions, aZ as GetOwnerIntentsRequest, a_ as GetOwnerIntentsResponse, aA as GetPlatformQuote, aF as GetQuoteResponse, aG as GetQuoteResponseObject, aH as GetQuoteSingleResponse, bG as GetSellerCredentialStatusParams, bK as IdentityAttestationActionType, bL as IdentityAttestationOutput, bM as IdentityAttestationOutputFor, bN as IdentityAttestationParams, cr as IndexedDisputeProtectionIntent, cs as IndexedPage, ct as IndexedPageAsOf, cu as IndexedRiskWindow, cv as IndexedStakeActivity, cw as IndexedStakeLock, cx as IndexedStakingRowFreshness, cy as IndexedStakingState, cz as IndexedStakingStateParams, cA as IndexedTakerAuthorization, cB as IndexedTakerStakeAuthorization, b_ as IndexerClient, cP as IndexerDeploymentEnv, c6 as IndexerDeposit, cn as IndexerDepositDailySnapshot, cG as IndexerDepositFilter, cm as IndexerDepositFundActivity, co as IndexerDepositFundActivityType, cJ as IndexerDepositOrderDirection, cI as IndexerDepositOrderField, cH as IndexerDepositPagination, c9 as IndexerDepositPaymentMethod, c0 as IndexerDepositService, cS as IndexerFulfillmentAndPaymentResponse, cQ as IndexerFulfillmentRecord, c7 as IndexerIntentFulfilled, c8 as IndexerIntentFulfillmentAmounts, cb as IndexerIntentStatus, cf as IndexerManagerAggregateStats, ch as IndexerManagerDailySnapshot, cg as IndexerManagerStats, ck as IndexerManualRateUpdate, ca as IndexerMethodCurrency, cl as IndexerOracleConfigUpdate, cR as IndexerPaymentVerifiedRecord, cc as IndexerRateManager, ce as IndexerRateManagerDelegation, cM as IndexerRateManagerDelegationPagination, cj as IndexerRateManagerDetail, cK as IndexerRateManagerFilter, ci as IndexerRateManagerListItem, cO as IndexerRateManagerOrderDirection, cN as IndexerRateManagerOrderField, cL as IndexerRateManagerPagination, cd as IndexerRateManagerRate, c1 as IndexerRateManagerService, c4 as IndexerStakingService, aX as Intent, ai as IntentGuardianErrorCode, ae as IntentGuardianPolicy, af as IntentGuardianQuote, ag as IntentGuardianWriteFunction, ah as IntentGuardianWriteParams, dq as IntentView, bO as MakerIdentityAttestationRequestBody, bP as MakerIdentityPlatform, aP as NearbyQuote, aQ as NearbySuggestions, da as ORCHESTRATOR_V3_ABI, Z as OfframpClient, bQ as OnchainCurrency, dr as OnchainIntent, bT as OrderStats, bY as OrderbookEntry, bZ as OrderbookTableRow, cT as PAYMENT_PLATFORMS, bc as PayPalGoogleOAuthSellerCredentialUploadBody, dm as PaymentMethodData, cU as PaymentPlatformType, aB as PlatformQuote, bS as PreparedTransaction, aM as QuoteFeesResponse, aL as QuoteIntentResponse, aJ as QuoteMakerIdentity, aC as QuotePreference, aI as QuoteResponseObject, aK as QuoteSingleResponse, ar as Range, ad as ReadDisputeAttestationConfigParams, $ as RedeemReferralCodeSignatureOptions, X as ReferralBearerWriteOptions, dp as ReferralFee, Y as ReferralReadOptions, an as ReferralRedemption, ao as ReferralSignatureBody, _ as ReferralSignatureOptions, b3 as RegisterPayeeDetailsRequest, b4 as RegisterPayeeDetailsResponse, bC as RegisteredSellerCredentialPlatform, bE as RegisteredUploadSellerCredentialParams, av as ReleaseFundsToPayerParams, dd as RuntimeEnv, dc as STAKE_VAULT_ABI, bt as SellerAttestationOutput, bh as SellerCiphertextBundle, bm as SellerCredentialBundleUpload, bu as SellerCredentialProbeResponse, bo as SellerCredentialStatus, bn as SellerCredentialStatusValue, bg as SellerCredentialUploadInputByPlatform, bs as SellerPaymentTypedDataValue, b5 as SellerPlatform, bl as SellerProbeInput, bi as SellerSignedCiphertextBundle, bq as SellerTypedDataField, br as SellerTypedDataSpec, bk as SellerVerifyInput, bj as SellerVerifyIntentDetails, bp as SellerVerifyProxyBody, dD as SendBatchFn, dC as SendTransactionFn, a1 as SignalIntentMethodParams, at as SignalIntentParams, a0 as SignalIntentReferralFee, cC as StakeActivityPageParams, bW as StakeEnvironment, cD as StakeLockPageParams, a6 as StakeVaultState, a7 as StakeVaultWriteFunction, a8 as StakeVaultWriteParams, cE as StakingEntityIds, cF as TakerStakeAuthorizationPageParams, bX as TakerStakeBalances, al as TimeoutConfig, aO as TokenResponse, a4 as UpdateReferralCodeSignatureOptions, bI as UploadGoogleOAuthSellerCredentialParams, bH as UploadPayPalGoogleOAuthSellerCredentialParams, bF as UploadSellerCredentialOptions, bD as UploadSellerCredentialParams, bV as UsdcAmount, df as V2ContractAbis, de as V2ContractAddresses, bd as VenmoCredentialUploadInput, b6 as VenmoSessionMaterial, bJ as VerifySellerPaymentParams, bf as WiseCredentialUploadInput, b9 as WiseProfileInfo, bb as WiseProfileNotFound, ba as WiseProfileSelectionRequired, b8 as WiseSessionMaterial, as as WithdrawDepositParams, ds as ZERO_RATE_MANAGER_ID, Z as Zkp2pClient, a5 as Zkp2pClientOptions, c3 as buildStakingEntityIds, dx as classifyDelegationState, aj as classifyIntentGuardianError, c2 as compareEventCursorIdsByRecency, cW as currencyInfo, b$ as defaultIndexerEndpoint, di as enrichPvDepositView, dj as enrichPvIntentView, c5 as fetchIndexerFulfillmentAndPayment, d1 as getContracts, cZ as getCurrencyCodeFromHash, cY as getCurrencyInfoFromCountryCode, cX as getCurrencyInfoFromHash, dw as getDelegationRoute, d7 as getDisputeProtectionPolicyContract, d9 as getGatingServiceAddress, d2 as getIntentGuardianContract, d6 as getOrchestratorV3Contract, d8 as getPaymentMethodsCatalog, d4 as getRateManagerContracts, d5 as getStakeVaultContract, d3 as hasIntentGuardian, c_ as isSupportedCurrencyHash, dt as isZeroRateManagerId, c$ as mapConversionRatesToOnchainMinRate, du as normalizeRateManagerId, dv as normalizeRegistry, dg as parseDepositView, dh as parseIntentView, a9 as readDisputeAttestationConfig } from './vaultUtils-Llr7Gh2R.mjs';
|
|
3
3
|
import { Address, Hash, Hex, WalletClient } from 'viem';
|
|
4
4
|
import { Abi } from 'abitype';
|
|
5
5
|
export { DisputeActionTypeByPlatform, DisputeAttestationOutput, DisputeAttestationOutputFor, DisputeDetails, DisputePlatform, IdentityActionType, IdentityActionTypeByPlatform, IdentityParamsByPlatform, IdentityPlatform, NitroAttestationClient, NitroAttestationClientOptions, NitroAttestationEnvironment, VerifiedAttestation, VerifiedAttestationPayload, createNitroAttestationClient, verifyDisputeAttestation } from '@zkp2p/zkp2p-attestation';
|
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 GetDepositBundleParams, F as GetDepositBundleResponse, H as GetOrderbookParams, J as GetOrderbookResponse, K as GetOrderbookTableResponse, L as QuoteRequest, M as QuoteResponse, N as CuratorMetadata, O as CurrencyType, T as PaymentMethodCatalog, W as TxOverrides } from './vaultUtils-
|
|
2
|
-
export {
|
|
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 GetDepositBundleParams, F as GetDepositBundleResponse, H as GetOrderbookParams, J as GetOrderbookResponse, K as GetOrderbookTableResponse, L as QuoteRequest, M as QuoteResponse, N as CuratorMetadata, O as CurrencyType, T as PaymentMethodCatalog, W as TxOverrides } from './vaultUtils-Llr7Gh2R.js';
|
|
2
|
+
export { dE as AccessPolicyOperations, dF as AccessPolicyUnsupportedError, am as ActionCallback, aR as ApiDeposit, aY as ApiIntentStatus, bw as AttestationServiceSellerCredentialProbeResponse, ak as AuthorizationTokenProvider, dB as BatchResult, ax as BestByPlatformResponseObject, bx as BuyerTeePaymentParams, by as BuyerTeePaymentProofInput, bz as BuyerTeeSessionMaterial, a3 as CancelIntentMethodParams, aw as CancelIntentParams, be as CashAppCredentialUploadInput, b7 as CashAppSessionMaterial, aq as CreateDepositConversionRate, ap as CreateDepositParams, bA as CuratorSellerCredentialStatusResponse, bB as CuratorSellerVerifyResponse, cV as Currency, d0 as CurrencyData, db as DISPUTE_PROTECTION_POLICY_ABI, dA as DelegationDepositTarget, dy as DelegationRoute, dz as DelegationState, dl as Deposit, dn as DepositCurrency, bU as DepositIntentStatistics, aU as DepositStatus, aS as DepositVerifier, aT as DepositVerifierCurrency, bR as DepositVerifierData, dk as DepositView, aa as DisputeAttestationConfig, cp as DisputeProtectionIntentPage, cq as DisputeProtectionIntentPageParams, ab as DisputeProtectionReadinessOptions, ac as DisputeProtectionReadinessResult, aN as FiatResponse, bv as FulfillIntentAttestationResponse, a2 as FulfillIntentMethodParams, au as FulfillIntentParams, ay as GetBestByPlatformResponse, az as GetBestByPlatformResponseObject, aV as GetDepositByIdRequest, aW as GetDepositByIdResponse, b1 as GetIntentByHashRequest, b2 as GetIntentByHashResponse, a$ as GetIntentsByDepositRequest, b0 as GetIntentsByDepositResponse, aD as GetNearbyQuote, aE as GetNearbySuggestions, aZ as GetOwnerIntentsRequest, a_ as GetOwnerIntentsResponse, aA as GetPlatformQuote, aF as GetQuoteResponse, aG as GetQuoteResponseObject, aH as GetQuoteSingleResponse, bG as GetSellerCredentialStatusParams, bK as IdentityAttestationActionType, bL as IdentityAttestationOutput, bM as IdentityAttestationOutputFor, bN as IdentityAttestationParams, cr as IndexedDisputeProtectionIntent, cs as IndexedPage, ct as IndexedPageAsOf, cu as IndexedRiskWindow, cv as IndexedStakeActivity, cw as IndexedStakeLock, cx as IndexedStakingRowFreshness, cy as IndexedStakingState, cz as IndexedStakingStateParams, cA as IndexedTakerAuthorization, cB as IndexedTakerStakeAuthorization, b_ as IndexerClient, cP as IndexerDeploymentEnv, c6 as IndexerDeposit, cn as IndexerDepositDailySnapshot, cG as IndexerDepositFilter, cm as IndexerDepositFundActivity, co as IndexerDepositFundActivityType, cJ as IndexerDepositOrderDirection, cI as IndexerDepositOrderField, cH as IndexerDepositPagination, c9 as IndexerDepositPaymentMethod, c0 as IndexerDepositService, cS as IndexerFulfillmentAndPaymentResponse, cQ as IndexerFulfillmentRecord, c7 as IndexerIntentFulfilled, c8 as IndexerIntentFulfillmentAmounts, cb as IndexerIntentStatus, cf as IndexerManagerAggregateStats, ch as IndexerManagerDailySnapshot, cg as IndexerManagerStats, ck as IndexerManualRateUpdate, ca as IndexerMethodCurrency, cl as IndexerOracleConfigUpdate, cR as IndexerPaymentVerifiedRecord, cc as IndexerRateManager, ce as IndexerRateManagerDelegation, cM as IndexerRateManagerDelegationPagination, cj as IndexerRateManagerDetail, cK as IndexerRateManagerFilter, ci as IndexerRateManagerListItem, cO as IndexerRateManagerOrderDirection, cN as IndexerRateManagerOrderField, cL as IndexerRateManagerPagination, cd as IndexerRateManagerRate, c1 as IndexerRateManagerService, c4 as IndexerStakingService, aX as Intent, ai as IntentGuardianErrorCode, ae as IntentGuardianPolicy, af as IntentGuardianQuote, ag as IntentGuardianWriteFunction, ah as IntentGuardianWriteParams, dq as IntentView, bO as MakerIdentityAttestationRequestBody, bP as MakerIdentityPlatform, aP as NearbyQuote, aQ as NearbySuggestions, da as ORCHESTRATOR_V3_ABI, Z as OfframpClient, bQ as OnchainCurrency, dr as OnchainIntent, bT as OrderStats, bY as OrderbookEntry, bZ as OrderbookTableRow, cT as PAYMENT_PLATFORMS, bc as PayPalGoogleOAuthSellerCredentialUploadBody, dm as PaymentMethodData, cU as PaymentPlatformType, aB as PlatformQuote, bS as PreparedTransaction, aM as QuoteFeesResponse, aL as QuoteIntentResponse, aJ as QuoteMakerIdentity, aC as QuotePreference, aI as QuoteResponseObject, aK as QuoteSingleResponse, ar as Range, ad as ReadDisputeAttestationConfigParams, $ as RedeemReferralCodeSignatureOptions, X as ReferralBearerWriteOptions, dp as ReferralFee, Y as ReferralReadOptions, an as ReferralRedemption, ao as ReferralSignatureBody, _ as ReferralSignatureOptions, b3 as RegisterPayeeDetailsRequest, b4 as RegisterPayeeDetailsResponse, bC as RegisteredSellerCredentialPlatform, bE as RegisteredUploadSellerCredentialParams, av as ReleaseFundsToPayerParams, dd as RuntimeEnv, dc as STAKE_VAULT_ABI, bt as SellerAttestationOutput, bh as SellerCiphertextBundle, bm as SellerCredentialBundleUpload, bu as SellerCredentialProbeResponse, bo as SellerCredentialStatus, bn as SellerCredentialStatusValue, bg as SellerCredentialUploadInputByPlatform, bs as SellerPaymentTypedDataValue, b5 as SellerPlatform, bl as SellerProbeInput, bi as SellerSignedCiphertextBundle, bq as SellerTypedDataField, br as SellerTypedDataSpec, bk as SellerVerifyInput, bj as SellerVerifyIntentDetails, bp as SellerVerifyProxyBody, dD as SendBatchFn, dC as SendTransactionFn, a1 as SignalIntentMethodParams, at as SignalIntentParams, a0 as SignalIntentReferralFee, cC as StakeActivityPageParams, bW as StakeEnvironment, cD as StakeLockPageParams, a6 as StakeVaultState, a7 as StakeVaultWriteFunction, a8 as StakeVaultWriteParams, cE as StakingEntityIds, cF as TakerStakeAuthorizationPageParams, bX as TakerStakeBalances, al as TimeoutConfig, aO as TokenResponse, a4 as UpdateReferralCodeSignatureOptions, bI as UploadGoogleOAuthSellerCredentialParams, bH as UploadPayPalGoogleOAuthSellerCredentialParams, bF as UploadSellerCredentialOptions, bD as UploadSellerCredentialParams, bV as UsdcAmount, df as V2ContractAbis, de as V2ContractAddresses, bd as VenmoCredentialUploadInput, b6 as VenmoSessionMaterial, bJ as VerifySellerPaymentParams, bf as WiseCredentialUploadInput, b9 as WiseProfileInfo, bb as WiseProfileNotFound, ba as WiseProfileSelectionRequired, b8 as WiseSessionMaterial, as as WithdrawDepositParams, ds as ZERO_RATE_MANAGER_ID, Z as Zkp2pClient, a5 as Zkp2pClientOptions, c3 as buildStakingEntityIds, dx as classifyDelegationState, aj as classifyIntentGuardianError, c2 as compareEventCursorIdsByRecency, cW as currencyInfo, b$ as defaultIndexerEndpoint, di as enrichPvDepositView, dj as enrichPvIntentView, c5 as fetchIndexerFulfillmentAndPayment, d1 as getContracts, cZ as getCurrencyCodeFromHash, cY as getCurrencyInfoFromCountryCode, cX as getCurrencyInfoFromHash, dw as getDelegationRoute, d7 as getDisputeProtectionPolicyContract, d9 as getGatingServiceAddress, d2 as getIntentGuardianContract, d6 as getOrchestratorV3Contract, d8 as getPaymentMethodsCatalog, d4 as getRateManagerContracts, d5 as getStakeVaultContract, d3 as hasIntentGuardian, c_ as isSupportedCurrencyHash, dt as isZeroRateManagerId, c$ as mapConversionRatesToOnchainMinRate, du as normalizeRateManagerId, dv as normalizeRegistry, dg as parseDepositView, dh as parseIntentView, a9 as readDisputeAttestationConfig } from './vaultUtils-Llr7Gh2R.js';
|
|
3
3
|
import { Address, Hash, Hex, WalletClient } from 'viem';
|
|
4
4
|
import { Abi } from 'abitype';
|
|
5
5
|
export { DisputeActionTypeByPlatform, DisputeAttestationOutput, DisputeAttestationOutputFor, DisputeDetails, DisputePlatform, IdentityActionType, IdentityActionTypeByPlatform, IdentityParamsByPlatform, IdentityPlatform, NitroAttestationClient, NitroAttestationClientOptions, NitroAttestationEnvironment, VerifiedAttestation, VerifiedAttestationPayload, createNitroAttestationClient, verifyDisputeAttestation } from '@zkp2p/zkp2p-attestation';
|
package/dist/index.mjs
CHANGED
|
@@ -2,11 +2,11 @@ import { IntentGuardianOperations } from './chunk-YA67SM3A.mjs';
|
|
|
2
2
|
export { ZERO_RATE_MANAGER_ID, classifyDelegationState, classifyIntentGuardianError, getDelegationRoute, isZeroRateManagerId, normalizeRateManagerId, normalizeRegistry } from './chunk-YA67SM3A.mjs';
|
|
3
3
|
import { NetworkError, ValidationError, APIError } from './chunk-3J4FPMPW.mjs';
|
|
4
4
|
export { APIError, ContractError, ErrorCode, NetworkError, ValidationError, ZKP2PError } from './chunk-3J4FPMPW.mjs';
|
|
5
|
-
import { OrchestratorRegistry_default, DISPUTE_PROTECTION_POLICY_ABI, DisputeProtectionPolicy_default, METHOD_NAME_TO_HASH, matchesQuotePaymentMethod, matchesPaymentMethodNameAndHash, MultiAttestationVerifier_default, getContracts, getRateManagerContracts, getPaymentMethodsCatalog, resolvePaymentMethodHashFromCatalog, getGatingServiceAddress, parseBigIntLike, SUPPORTED_PAYMENT_METHOD_HASHES, resolveFiatCurrencyBytes32, resolvePaymentMethodNameFromHash, OrchestratorV3_default, DisputeNullifierRegistry_default, DisputeVerifier_default, WhitelistPolicy_default, StakeVault_default, IntentLifecycleHookV1_default } from './chunk-
|
|
6
|
-
export { DISPUTE_PROTECTION_POLICY_ABI2 as DISPUTE_PROTECTION_POLICY_ABI, ORCHESTRATOR_V3_ABI, PAYMENT_PLATFORMS, STAKE_VAULT_ABI, asciiToBytes32, enrichPvDepositView, enrichPvIntentView, ensureBytes32, getContracts, getDisputeProtectionPolicyContract, getGatingServiceAddress, getIntentGuardianContract, getOrchestratorV3Contract, getPaymentMethodsCatalog, getRateManagerContracts, getStakeVaultContract, hasIntentGuardian, parseDepositView, parseIntentView, resolveFiatCurrencyBytes32, resolvePaymentMethodHash, resolvePaymentMethodHashFromCatalog, resolvePaymentMethodNameFromHash } from './chunk-
|
|
5
|
+
import { OrchestratorRegistry_default, DISPUTE_PROTECTION_POLICY_ABI, DisputeProtectionPolicy_default, METHOD_NAME_TO_HASH, matchesQuotePaymentMethod, matchesPaymentMethodNameAndHash, MultiAttestationVerifier_default, getContracts, getRateManagerContracts, getPaymentMethodsCatalog, resolvePaymentMethodHashFromCatalog, getGatingServiceAddress, parseBigIntLike, SUPPORTED_PAYMENT_METHOD_HASHES, resolveFiatCurrencyBytes32, resolvePaymentMethodNameFromHash, OrchestratorV3_default, DisputeNullifierRegistry_default, DisputeVerifier_default, WhitelistPolicy_default, StakeVault_default, IntentLifecycleHookV1_default } from './chunk-4KACMRKF.mjs';
|
|
6
|
+
export { DISPUTE_PROTECTION_POLICY_ABI2 as DISPUTE_PROTECTION_POLICY_ABI, ORCHESTRATOR_V3_ABI, PAYMENT_PLATFORMS, STAKE_VAULT_ABI, asciiToBytes32, enrichPvDepositView, enrichPvIntentView, ensureBytes32, getContracts, getDisputeProtectionPolicyContract, getGatingServiceAddress, getIntentGuardianContract, getOrchestratorV3Contract, getPaymentMethodsCatalog, getRateManagerContracts, getStakeVaultContract, hasIntentGuardian, parseDepositView, parseIntentView, resolveFiatCurrencyBytes32, resolvePaymentMethodHash, resolvePaymentMethodHashFromCatalog, resolvePaymentMethodNameFromHash } from './chunk-4KACMRKF.mjs';
|
|
7
7
|
import { Currency, currencyKeccak256 } from './chunk-ZB22BZLZ.mjs';
|
|
8
8
|
export { Currency, currencyInfo, getCurrencyCodeFromHash, getCurrencyInfoFromCountryCode, getCurrencyInfoFromHash, isSupportedCurrencyHash, mapConversionRatesToOnchainMinRate } from './chunk-ZB22BZLZ.mjs';
|
|
9
|
-
import { define_ZKP2P_SDK_BUILD_METADATA_default } from './chunk-
|
|
9
|
+
import { define_ZKP2P_SDK_BUILD_METADATA_default } from './chunk-5MBWIMIB.mjs';
|
|
10
10
|
import { keccak256, concatHex, encodeFunctionData, encodeAbiParameters, createPublicClient, http, isAddress, zeroAddress, formatUnits } from 'viem';
|
|
11
11
|
import { hardhat, base } from 'viem/chains';
|
|
12
12
|
import { createEncryptedBuyerTeeSessionMaterial as createEncryptedBuyerTeeSessionMaterial$1, createEncryptedSellerCredentialUpload } from '@zkp2p/zkp2p-attestation';
|
|
@@ -357,7 +357,7 @@ async function withRetry(fn, maxRetries = 3, delayMs = 1e3, timeoutMs, shouldRet
|
|
|
357
357
|
for (let i = 0; i < maxRetries; i++) {
|
|
358
358
|
try {
|
|
359
359
|
if (timeoutMs) {
|
|
360
|
-
const { withTimeout } = await import('./timeout-
|
|
360
|
+
const { withTimeout } = await import('./timeout-7H5K6BBB.mjs');
|
|
361
361
|
return await withTimeout(fn(), timeoutMs, `Operation timed out after ${timeoutMs}ms`);
|
|
362
362
|
}
|
|
363
363
|
return await fn();
|
|
@@ -863,7 +863,7 @@ async function sendTransactionWithAttribution(walletClient, request, referrer, o
|
|
|
863
863
|
// src/utils/constants.ts
|
|
864
864
|
var DEFAULT_BASE_API_URL = "https://api.zkp2p.xyz";
|
|
865
865
|
|
|
866
|
-
// ../../node_modules/.pnpm/@zkp2p+contracts-v2@0.4.
|
|
866
|
+
// ../../node_modules/.pnpm/@zkp2p+contracts-v2@0.4.1_ethers@6.16.0_bufferutil@4.1.0_utf-8-validate@5.0.10__typescript@5.9.3_zod@4.5.4/node_modules/@zkp2p/contracts-v2/oracleFeeds/chainlink.json
|
|
867
867
|
var chainlink_default = {
|
|
868
868
|
feeds: [
|
|
869
869
|
{
|
|
@@ -1909,7 +1909,7 @@ var ProtocolViewerReader = class {
|
|
|
1909
1909
|
if (inputCount === null) {
|
|
1910
1910
|
throw new Error("Configured ProtocolViewer ABI does not expose getDeposit");
|
|
1911
1911
|
}
|
|
1912
|
-
const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-
|
|
1912
|
+
const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-S6VTWVVJ.mjs');
|
|
1913
1913
|
if (inputCount >= 3) {
|
|
1914
1914
|
return tryContexts(
|
|
1915
1915
|
protocolViewerContexts,
|
|
@@ -1995,7 +1995,7 @@ var ProtocolViewerReader = class {
|
|
|
1995
1995
|
return Promise.all(ids.map((id) => this.config.host.getPvDepositById(id)));
|
|
1996
1996
|
}
|
|
1997
1997
|
const bn = ids.map((id) => typeof id === "bigint" ? id : parseRawDepositId(id));
|
|
1998
|
-
const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-
|
|
1998
|
+
const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-S6VTWVVJ.mjs');
|
|
1999
1999
|
if (inputCount >= 2) {
|
|
2000
2000
|
const requests = ids.map((id, index) => ({
|
|
2001
2001
|
index,
|
|
@@ -2100,7 +2100,7 @@ var ProtocolViewerReader = class {
|
|
|
2100
2100
|
if (!protocolViewerAddress || !protocolViewerAbi || inputCount === null) {
|
|
2101
2101
|
return this.config.host.getPvAccountDepositsFromIndexer(owner);
|
|
2102
2102
|
}
|
|
2103
|
-
const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-
|
|
2103
|
+
const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-S6VTWVVJ.mjs');
|
|
2104
2104
|
const { address, abi } = this.config.host.requireProtocolViewer();
|
|
2105
2105
|
if (inputCount >= 2) {
|
|
2106
2106
|
const readAndFilter = async (raw2) => {
|
|
@@ -2171,7 +2171,7 @@ var ProtocolViewerReader = class {
|
|
|
2171
2171
|
if (protocolViewerEntries.length === 0) {
|
|
2172
2172
|
throw new Error("ProtocolViewer not available for this network");
|
|
2173
2173
|
}
|
|
2174
|
-
const { parseIntentView: parseIntentView2 } = await import('./protocolViewerParsers-
|
|
2174
|
+
const { parseIntentView: parseIntentView2 } = await import('./protocolViewerParsers-S6VTWVVJ.mjs');
|
|
2175
2175
|
const intentsByHash = /* @__PURE__ */ new Map();
|
|
2176
2176
|
let attemptedRead = false;
|
|
2177
2177
|
let hadSuccessfulRead = false;
|
|
@@ -2279,7 +2279,7 @@ var ProtocolViewerReader = class {
|
|
|
2279
2279
|
if (protocolViewerEntries.length === 0) {
|
|
2280
2280
|
throw new Error("ProtocolViewer not available for this network");
|
|
2281
2281
|
}
|
|
2282
|
-
const { parseIntentView: parseIntentView2 } = await import('./protocolViewerParsers-
|
|
2282
|
+
const { parseIntentView: parseIntentView2 } = await import('./protocolViewerParsers-S6VTWVVJ.mjs');
|
|
2283
2283
|
let lastError;
|
|
2284
2284
|
for (const pvEntry of protocolViewerEntries) {
|
|
2285
2285
|
const inputCount = this.pvEntryFunctionInputCount(pvEntry, "getIntent");
|
|
@@ -4723,6 +4723,10 @@ var zelleBankOfAmericaSendConfig = {
|
|
|
4723
4723
|
}
|
|
4724
4724
|
],
|
|
4725
4725
|
sendPaymentDonts: () => [
|
|
4726
|
+
{
|
|
4727
|
+
text: "Do not send unless you can sign in to Bank of America's website. Signing in is required to verify your payment and complete this order.",
|
|
4728
|
+
emphasize: ["Do not send", "sign in", "Bank of America's website"]
|
|
4729
|
+
},
|
|
4726
4730
|
{ text: "Do not use any other bank", emphasize: ["Do not"] }
|
|
4727
4731
|
]
|
|
4728
4732
|
};
|
|
@@ -4795,6 +4799,10 @@ var zelleChaseSendConfig = {
|
|
|
4795
4799
|
}
|
|
4796
4800
|
],
|
|
4797
4801
|
sendPaymentDonts: () => [
|
|
4802
|
+
{
|
|
4803
|
+
text: "Do not send unless you can sign in to Chase's website. Signing in is required to verify your payment and complete this order.",
|
|
4804
|
+
emphasize: ["Do not send", "sign in", "Chase's website"]
|
|
4805
|
+
},
|
|
4798
4806
|
{ text: "Do not send using any other bank", emphasize: ["Do not"] }
|
|
4799
4807
|
]
|
|
4800
4808
|
};
|
|
@@ -4870,6 +4878,10 @@ var zelleCitiSendConfig = {
|
|
|
4870
4878
|
}
|
|
4871
4879
|
],
|
|
4872
4880
|
sendPaymentDonts: () => [
|
|
4881
|
+
{
|
|
4882
|
+
text: "Do not send unless you can sign in to Citi's website. Signing in is required to verify your payment and complete this order.",
|
|
4883
|
+
emphasize: ["Do not send", "sign in", "Citi's website"]
|
|
4884
|
+
},
|
|
4873
4885
|
{ text: "Do not send using any other bank", emphasize: ["Do not"] }
|
|
4874
4886
|
]
|
|
4875
4887
|
};
|
|
@@ -7654,10 +7666,10 @@ var IndexerStakingService = class {
|
|
|
7654
7666
|
}
|
|
7655
7667
|
};
|
|
7656
7668
|
|
|
7657
|
-
// ../../node_modules/.pnpm/@zkp2p+contracts-v2@0.4.
|
|
7658
|
-
var version = "0.4.1
|
|
7669
|
+
// ../../node_modules/.pnpm/@zkp2p+contracts-v2@0.4.1_ethers@6.16.0_bufferutil@4.1.0_utf-8-validate@5.0.10__typescript@5.9.3_zod@4.5.4/node_modules/@zkp2p/contracts-v2/_esm/index.js
|
|
7670
|
+
var version = "0.4.1";
|
|
7659
7671
|
|
|
7660
|
-
// ../../node_modules/.pnpm/@zkp2p+contracts-v2@0.4.
|
|
7672
|
+
// ../../node_modules/.pnpm/@zkp2p+contracts-v2@0.4.1_ethers@6.16.0_bufferutil@4.1.0_utf-8-validate@5.0.10__typescript@5.9.3_zod@4.5.4/node_modules/@zkp2p/contracts-v2/_esm/disputeStack/base.js
|
|
7661
7673
|
var data = {
|
|
7662
7674
|
"schemaVersion": 2,
|
|
7663
7675
|
"network": "base",
|
|
@@ -7796,7 +7808,7 @@ var data = {
|
|
|
7796
7808
|
]
|
|
7797
7809
|
},
|
|
7798
7810
|
"riskWindowSecondsByPaymentMethod": {
|
|
7799
|
-
"0x10940ee67cfb3c6c064569ec92c0ee934cd7afa18dd2ca2d6a2254fcb009c17d": "
|
|
7811
|
+
"0x10940ee67cfb3c6c064569ec92c0ee934cd7afa18dd2ca2d6a2254fcb009c17d": "0",
|
|
7800
7812
|
"0x3ccc3d4d5e769b1f82dc4988485551dc0cd3c7a3926d7d8a4dde91507199490f": "1209600",
|
|
7801
7813
|
"0x554a007c2217df766b977723b276671aee5ebb4adaea0edb6433c88b3e61dac5": "0",
|
|
7802
7814
|
"0x5908bb0c9b87763ac6171d4104847667e7f02b4c47b574fe890c1f439ed128bb": "0",
|
|
@@ -7827,7 +7839,7 @@ var data = {
|
|
|
7827
7839
|
};
|
|
7828
7840
|
var base_default = data;
|
|
7829
7841
|
|
|
7830
|
-
// ../../node_modules/.pnpm/@zkp2p+contracts-v2@0.4.
|
|
7842
|
+
// ../../node_modules/.pnpm/@zkp2p+contracts-v2@0.4.1_ethers@6.16.0_bufferutil@4.1.0_utf-8-validate@5.0.10__typescript@5.9.3_zod@4.5.4/node_modules/@zkp2p/contracts-v2/_esm/disputeStack/baseStaging.js
|
|
7831
7843
|
var data2 = {
|
|
7832
7844
|
"schemaVersion": 2,
|
|
7833
7845
|
"network": "base_staging",
|
|
@@ -7966,7 +7978,7 @@ var data2 = {
|
|
|
7966
7978
|
]
|
|
7967
7979
|
},
|
|
7968
7980
|
"riskWindowSecondsByPaymentMethod": {
|
|
7969
|
-
"0x10940ee67cfb3c6c064569ec92c0ee934cd7afa18dd2ca2d6a2254fcb009c17d": "
|
|
7981
|
+
"0x10940ee67cfb3c6c064569ec92c0ee934cd7afa18dd2ca2d6a2254fcb009c17d": "0",
|
|
7970
7982
|
"0x1d966dbd6aeb8674d7c05174bd0ded7b56a798672bfb862ef20bbe8c2bbfce18": "0",
|
|
7971
7983
|
"0x3ccc3d4d5e769b1f82dc4988485551dc0cd3c7a3926d7d8a4dde91507199490f": "1209600",
|
|
7972
7984
|
"0x554a007c2217df766b977723b276671aee5ebb4adaea0edb6433c88b3e61dac5": "0",
|
|
@@ -8842,7 +8854,12 @@ var applyReferrerFeeDisplayFieldsToQuote = (quote, referrerFeeConfig, decimals)
|
|
|
8842
8854
|
{ signalIntentAmount }
|
|
8843
8855
|
);
|
|
8844
8856
|
if (!adjusted) {
|
|
8845
|
-
return
|
|
8857
|
+
return {
|
|
8858
|
+
...quote,
|
|
8859
|
+
referrerFeeAmount: quote.referrerFeeAmount ?? void 0,
|
|
8860
|
+
referrerFeeAmountFormatted: quote.referrerFeeAmountFormatted ?? void 0,
|
|
8861
|
+
referrerFeeBps: quote.referrerFeeBps ?? void 0
|
|
8862
|
+
};
|
|
8846
8863
|
}
|
|
8847
8864
|
return {
|
|
8848
8865
|
...quote,
|
|
@@ -8951,12 +8968,7 @@ function isObjectRecord(value) {
|
|
|
8951
8968
|
}
|
|
8952
8969
|
return true;
|
|
8953
8970
|
}
|
|
8954
|
-
function
|
|
8955
|
-
if (typeof value !== "string") return null;
|
|
8956
|
-
const normalized = value.trim();
|
|
8957
|
-
return normalized.length > 0 ? normalized : null;
|
|
8958
|
-
}
|
|
8959
|
-
function extractLegacyQuotePayeeData(depositData) {
|
|
8971
|
+
function extractLegacyPayeeDataInput(depositData) {
|
|
8960
8972
|
if (!depositData || typeof depositData !== "object" || Array.isArray(depositData)) {
|
|
8961
8973
|
return void 0;
|
|
8962
8974
|
}
|
|
@@ -8975,17 +8987,26 @@ function extractLegacyQuotePayeeData(depositData) {
|
|
|
8975
8987
|
metadata: metadataEntries.length > 0 ? Object.fromEntries(metadataEntries) : null
|
|
8976
8988
|
};
|
|
8977
8989
|
}
|
|
8978
|
-
function
|
|
8979
|
-
|
|
8980
|
-
const offchainId = typeof maker?.offchainId === "string" && maker.offchainId.trim().length > 0 ? maker.offchainId : legacy?.offchainId;
|
|
8981
|
-
if (!offchainId) {
|
|
8990
|
+
function readQuoteMakerIdentity(quote) {
|
|
8991
|
+
if (typeof quote.maker?.offchainId !== "string") {
|
|
8982
8992
|
return void 0;
|
|
8983
8993
|
}
|
|
8984
|
-
|
|
8985
|
-
|
|
8986
|
-
|
|
8987
|
-
|
|
8988
|
-
}
|
|
8994
|
+
const offchainId = quote.maker.offchainId.trim();
|
|
8995
|
+
return offchainId.length > 0 ? { offchainId } : void 0;
|
|
8996
|
+
}
|
|
8997
|
+
function warnDroppedQuoteWithoutMakerIdentity(method, quote) {
|
|
8998
|
+
console.warn(`[zkp2p/sdk] ${method}: dropping quote without maker.offchainId`, {
|
|
8999
|
+
depositId: quote.intent?.depositId,
|
|
9000
|
+
processorName: quote.intent?.processorName
|
|
9001
|
+
});
|
|
9002
|
+
}
|
|
9003
|
+
function withQuotePayeeData(method, quote) {
|
|
9004
|
+
const payeeData = readQuoteMakerIdentity(quote);
|
|
9005
|
+
if (!payeeData) {
|
|
9006
|
+
warnDroppedQuoteWithoutMakerIdentity(method, quote);
|
|
9007
|
+
return void 0;
|
|
9008
|
+
}
|
|
9009
|
+
return { ...quote, maker: payeeData, payeeData };
|
|
8989
9010
|
}
|
|
8990
9011
|
function isActiveQuotePaymentMethod(quote) {
|
|
8991
9012
|
if (!quote?.intent || typeof quote.intent.processorName !== "string" || typeof quote.paymentMethod !== "string") {
|
|
@@ -8993,6 +9014,19 @@ function isActiveQuotePaymentMethod(quote) {
|
|
|
8993
9014
|
}
|
|
8994
9015
|
return matchesQuotePaymentMethod(quote.intent.processorName, quote.paymentMethod);
|
|
8995
9016
|
}
|
|
9017
|
+
function enrichActiveQuotes(quotes) {
|
|
9018
|
+
return quotes.map((quote) => {
|
|
9019
|
+
if (!isActiveQuotePaymentMethod(quote)) return void 0;
|
|
9020
|
+
return withQuotePayeeData("getQuote", quote);
|
|
9021
|
+
}).filter((quote) => quote !== void 0);
|
|
9022
|
+
}
|
|
9023
|
+
function enrichNearbySuggestions(suggestions) {
|
|
9024
|
+
return suggestions.map((suggestion) => {
|
|
9025
|
+
if (!isActiveQuotePaymentMethod(suggestion.quote)) return void 0;
|
|
9026
|
+
const quote = withQuotePayeeData("getQuote", suggestion.quote);
|
|
9027
|
+
return quote ? { ...suggestion, quote } : void 0;
|
|
9028
|
+
}).filter((suggestion) => suggestion !== void 0);
|
|
9029
|
+
}
|
|
8996
9030
|
function normalizePayeeDataInputItem(raw) {
|
|
8997
9031
|
if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
|
|
8998
9032
|
return null;
|
|
@@ -9001,7 +9035,7 @@ function normalizePayeeDataInputItem(raw) {
|
|
|
9001
9035
|
if (typeof candidate.offchainId === "string" && candidate.offchainId.trim().length > 0) {
|
|
9002
9036
|
return candidate;
|
|
9003
9037
|
}
|
|
9004
|
-
const legacy =
|
|
9038
|
+
const legacy = extractLegacyPayeeDataInput(raw);
|
|
9005
9039
|
if (!legacy) {
|
|
9006
9040
|
return null;
|
|
9007
9041
|
}
|
|
@@ -11447,7 +11481,7 @@ var Zkp2pClient = class {
|
|
|
11447
11481
|
}
|
|
11448
11482
|
}
|
|
11449
11483
|
});
|
|
11450
|
-
const { mapConversionRatesToOnchainMinRate: mapConversionRatesToOnchainMinRate2 } = await import('./currency-
|
|
11484
|
+
const { mapConversionRatesToOnchainMinRate: mapConversionRatesToOnchainMinRate2 } = await import('./currency-KDDCBZU2.mjs');
|
|
11451
11485
|
currencies = mapConversionRatesToOnchainMinRate2(
|
|
11452
11486
|
params.conversionRates,
|
|
11453
11487
|
paymentMethods.length
|
|
@@ -11590,7 +11624,8 @@ var Zkp2pClient = class {
|
|
|
11590
11624
|
* > use it to see how their deposits appear to takers.
|
|
11591
11625
|
*
|
|
11592
11626
|
* Returns available quotes from liquidity providers matching the request
|
|
11593
|
-
* criteria.
|
|
11627
|
+
* criteria. Quotes carry `payeeData.offchainId` derived from the curator v3
|
|
11628
|
+
* `maker` identity; quotes without it are dropped.
|
|
11594
11629
|
*
|
|
11595
11630
|
* @param req - Quote request parameters
|
|
11596
11631
|
* @param req.paymentPlatforms - Payment platforms to search (e.g., ['wise', 'revolut'])
|
|
@@ -11645,31 +11680,26 @@ var Zkp2pClient = class {
|
|
|
11645
11680
|
timeoutMs,
|
|
11646
11681
|
headers: this.apiHeaders
|
|
11647
11682
|
});
|
|
11648
|
-
const quotes = (quote
|
|
11649
|
-
|
|
11650
|
-
|
|
11651
|
-
|
|
11652
|
-
|
|
11653
|
-
|
|
11654
|
-
|
|
11655
|
-
|
|
11656
|
-
|
|
11657
|
-
|
|
11658
|
-
};
|
|
11659
|
-
}
|
|
11660
|
-
for (const q of quotes) {
|
|
11661
|
-
const payeeData = normalizeQuotePayeeData(q.maker);
|
|
11662
|
-
if (payeeData) {
|
|
11663
|
-
q.payeeData = payeeData;
|
|
11683
|
+
const quotes = enrichActiveQuotes(quote.responseObject.quotes);
|
|
11684
|
+
const enrichedQuote = {
|
|
11685
|
+
...quote,
|
|
11686
|
+
responseObject: {
|
|
11687
|
+
...quote.responseObject,
|
|
11688
|
+
quotes,
|
|
11689
|
+
nearbySuggestions: quote.responseObject.nearbySuggestions ? {
|
|
11690
|
+
below: enrichNearbySuggestions(quote.responseObject.nearbySuggestions.below),
|
|
11691
|
+
above: enrichNearbySuggestions(quote.responseObject.nearbySuggestions.above)
|
|
11692
|
+
} : void 0
|
|
11664
11693
|
}
|
|
11665
|
-
}
|
|
11666
|
-
return appendReferrerFeeDisplayFields(
|
|
11694
|
+
};
|
|
11695
|
+
return appendReferrerFeeDisplayFields(enrichedQuote, referrerFeeConfig);
|
|
11667
11696
|
}
|
|
11668
11697
|
/**
|
|
11669
11698
|
* **Supporting Method** - Fetches the best available quote per supported payment platform.
|
|
11670
11699
|
*
|
|
11671
|
-
* Returns one quote per platform when available.
|
|
11672
|
-
*
|
|
11700
|
+
* Returns one quote per platform when available. Best quotes carry
|
|
11701
|
+
* `payeeData.offchainId` derived from the curator v3 `maker` identity; best
|
|
11702
|
+
* quotes without it are dropped.
|
|
11673
11703
|
*
|
|
11674
11704
|
* @param req - Best-by-platform quote request parameters
|
|
11675
11705
|
* @param opts - Optional overrides for API URL and timeout
|
|
@@ -11697,25 +11727,23 @@ var Zkp2pClient = class {
|
|
|
11697
11727
|
timeoutMs,
|
|
11698
11728
|
headers: this.apiHeaders
|
|
11699
11729
|
});
|
|
11700
|
-
const
|
|
11730
|
+
const platformQuotes = quote.responseObject.platformQuotes.filter((platformQuote) => {
|
|
11731
|
+
const platform = platformQuote.platform.trim().toLowerCase();
|
|
11732
|
+
if (!METHOD_NAME_TO_HASH[platform]) return false;
|
|
11733
|
+
return !platformQuote.bestQuote || platform === platformQuote.bestQuote.intent.processorName.trim().toLowerCase() && isActiveQuotePaymentMethod(platformQuote.bestQuote);
|
|
11734
|
+
}).flatMap((platformQuote) => {
|
|
11735
|
+
const bestQuote = platformQuote.bestQuote;
|
|
11736
|
+
if (!bestQuote) return [{ ...platformQuote, bestQuote: void 0 }];
|
|
11737
|
+
const enrichedBestQuote = withQuotePayeeData("getQuotesBestByPlatform", bestQuote);
|
|
11738
|
+
return enrichedBestQuote ? [{ ...platformQuote, bestQuote: enrichedBestQuote }] : [];
|
|
11739
|
+
});
|
|
11740
|
+
const enrichedQuote = {
|
|
11701
11741
|
...quote,
|
|
11702
11742
|
responseObject: {
|
|
11703
11743
|
...quote.responseObject,
|
|
11704
|
-
platformQuotes
|
|
11705
|
-
const platform = platformQuote.platform.trim().toLowerCase();
|
|
11706
|
-
if (!METHOD_NAME_TO_HASH[platform]) return false;
|
|
11707
|
-
return !platformQuote.bestQuote || platform === platformQuote.bestQuote.intent.processorName.trim().toLowerCase() && isActiveQuotePaymentMethod(platformQuote.bestQuote);
|
|
11708
|
-
}).map((platformQuote) => {
|
|
11709
|
-
const bestQuote = platformQuote?.bestQuote;
|
|
11710
|
-
const payeeData = normalizeQuotePayeeData(bestQuote?.maker);
|
|
11711
|
-
if (!bestQuote || !payeeData) return platformQuote;
|
|
11712
|
-
return {
|
|
11713
|
-
...platformQuote,
|
|
11714
|
-
bestQuote: { ...bestQuote, payeeData }
|
|
11715
|
-
};
|
|
11716
|
-
})
|
|
11744
|
+
platformQuotes
|
|
11717
11745
|
}
|
|
11718
|
-
}
|
|
11746
|
+
};
|
|
11719
11747
|
return appendReferrerFeeDisplayFieldsToBestByPlatform(enrichedQuote, referrerFeeConfig);
|
|
11720
11748
|
}
|
|
11721
11749
|
/**
|