@zkp2p/sdk 0.14.8-rc.0 → 0.14.9
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 +9 -8
- package/dist/build-metadata.json +2 -2
- package/dist/{chunk-7MZINJ6Z.mjs → chunk-4GCGSZA2.mjs} +3 -3
- package/dist/{chunk-7MZINJ6Z.mjs.map → chunk-4GCGSZA2.mjs.map} +1 -1
- package/dist/chunk-ERJIIFAV.mjs +12 -0
- package/dist/chunk-ERJIIFAV.mjs.map +1 -0
- package/dist/{currency-45EYG6OA.mjs → currency-AGVR2YDU.mjs} +3 -3
- package/dist/{currency-45EYG6OA.mjs.map → currency-AGVR2YDU.mjs.map} +1 -1
- package/dist/index.cjs +99 -60
- 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 +110 -70
- package/dist/index.mjs.map +1 -1
- package/dist/protocolViewerParsers-O5WTGTUK.mjs +5 -0
- package/dist/{protocolViewerParsers-SVYPQCPC.mjs.map → protocolViewerParsers-O5WTGTUK.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-XMYRXVUQ.mjs → timeout-RXDD3LQG.mjs} +3 -3
- package/dist/{timeout-XMYRXVUQ.mjs.map → timeout-RXDD3LQG.mjs.map} +1 -1
- package/dist/{vaultUtils-BStoKLo3.d.mts → vaultUtils-PRhZBjwX.d.mts} +18 -33
- package/dist/{vaultUtils-BStoKLo3.d.ts → vaultUtils-PRhZBjwX.d.ts} +18 -33
- package/package.json +2 -2
- package/dist/chunk-KQT4XYPO.mjs +0 -12
- package/dist/chunk-KQT4XYPO.mjs.map +0 -1
- package/dist/protocolViewerParsers-SVYPQCPC.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, M as MicrosoftOAuthSellerCredentialUploadBodyByPlatform, t as SellerPlatform, u as CuratorSellerCredentialStatusResponse, Q as QuotesBestByPlatformRequest, v as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, w as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, x as PostDepositDetailsResponse, y as GetPayeeDetailsRequest, z as GetPayeeDetailsResponse, E as GetOwnerDepositsRequest, F as GetOwnerDepositsResponse, H as GetDepositBundleParams, J as GetDepositBundleResponse, K as GetOrderbookParams, L as GetOrderbookResponse, N as GetOrderbookTableResponse, O as QuoteRequest, T as QuoteResponse, W as CuratorMetadata, X as CurrencyType, Y as PaymentMethodCatalog, Z 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, M as MicrosoftOAuthSellerCredentialUploadBodyByPlatform, t as SellerPlatform, u as CuratorSellerCredentialStatusResponse, Q as QuotesBestByPlatformRequest, v as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, w as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, x as PostDepositDetailsResponse, y as GetPayeeDetailsRequest, z as GetPayeeDetailsResponse, E as GetOwnerDepositsRequest, F as GetOwnerDepositsResponse, H as GetDepositBundleParams, J as GetDepositBundleResponse, K as GetOrderbookParams, L as GetOrderbookResponse, N as GetOrderbookTableResponse, O as QuoteRequest, T as QuoteResponse, W as CuratorMetadata, X as CurrencyType, Y as PaymentMethodCatalog, Z as TxOverrides } from './vaultUtils-PRhZBjwX.mjs';
|
|
2
|
+
export { dN as AccessPolicyOperations, dO as AccessPolicyUnsupportedError, ap as ActionCallback, b8 as AmazonPayCredentialUploadInput, b9 as AmazonPayIdentityAttestationOutput, aU as ApiDeposit, a$ as ApiIntentStatus, bC as AttestationServiceSellerCredentialProbeResponse, an as AuthorizationTokenProvider, dK as BatchResult, aA as BestByPlatformResponseObject, bD as BuyerTeePaymentParams, bE as BuyerTeePaymentProofInput, bF as BuyerTeeSessionMaterial, a6 as CancelIntentMethodParams, az as CancelIntentParams, bk as CashAppCredentialUploadInput, bb as CashAppSessionMaterial, at as CreateDepositConversionRate, as as CreateDepositParams, bG as CuratorSellerVerifyResponse, d2 as Currency, d9 as CurrencyData, dk as DISPUTE_PROTECTION_POLICY_ABI, dJ as DelegationDepositTarget, dH as DelegationRoute, dI as DelegationState, dv as Deposit, dx as DepositCurrency, c0 as DepositIntentStatistics, aX as DepositStatus, aV as DepositVerifier, aW as DepositVerifierCurrency, bZ as DepositVerifierData, du as DepositView, ad as DisputeAttestationConfig, cx as DisputeProtectionIntentPage, cy as DisputeProtectionIntentPageParams, ae as DisputeProtectionReadinessOptions, af as DisputeProtectionReadinessResult, aQ as FiatResponse, bB as FulfillIntentAttestationResponse, a5 as FulfillIntentMethodParams, ax as FulfillIntentParams, aB as GetBestByPlatformResponse, aC as GetBestByPlatformResponseObject, aY as GetDepositByIdRequest, aZ as GetDepositByIdResponse, b4 as GetIntentByHashRequest, b5 as GetIntentByHashResponse, b2 as GetIntentsByDepositRequest, b3 as GetIntentsByDepositResponse, aG as GetNearbyQuote, aH as GetNearbySuggestions, b0 as GetOwnerIntentsRequest, b1 as GetOwnerIntentsResponse, aD as GetPlatformQuote, aI as GetQuoteResponse, aJ as GetQuoteResponseObject, aK as GetQuoteSingleResponse, bL as GetSellerCredentialStatusParams, dP as ICloudMailCredentialError, dR as ICloudMailCredentialErrorReason, dS as ICloudMailSellerPlatform, bS as IdentityAttestationActionType, bT as IdentityAttestationOutput, bU as IdentityAttestationOutputFor, bV as IdentityAttestationParams, cz as IndexedDisputeProtectionIntent, cA as IndexedPage, cB as IndexedPageAsOf, cC as IndexedRiskWindow, cD as IndexedStakeActivity, cF as IndexedStakeLock, cE as IndexedStakeTotals, cG as IndexedStakingRowFreshness, cH as IndexedStakingState, cI as IndexedStakingStateParams, cJ as IndexedTakerAuthorization, cK as IndexedTakerStakeAuthorization, c6 as IndexerClient, cY as IndexerDeploymentEnv, ce as IndexerDeposit, cv as IndexerDepositDailySnapshot, cP as IndexerDepositFilter, cu as IndexerDepositFundActivity, cw as IndexerDepositFundActivityType, cS as IndexerDepositOrderDirection, cR as IndexerDepositOrderField, cQ as IndexerDepositPagination, ch as IndexerDepositPaymentMethod, c8 as IndexerDepositService, c$ as IndexerFulfillmentAndPaymentResponse, cZ as IndexerFulfillmentRecord, cf as IndexerIntentFulfilled, cg as IndexerIntentFulfillmentAmounts, cj as IndexerIntentStatus, cn as IndexerManagerAggregateStats, cp as IndexerManagerDailySnapshot, co as IndexerManagerStats, cs as IndexerManualRateUpdate, ci as IndexerMethodCurrency, ct as IndexerOracleConfigUpdate, c_ as IndexerPaymentVerifiedRecord, ck as IndexerRateManager, cm as IndexerRateManagerDelegation, cV as IndexerRateManagerDelegationPagination, cr as IndexerRateManagerDetail, cT as IndexerRateManagerFilter, cq as IndexerRateManagerListItem, cX as IndexerRateManagerOrderDirection, cW as IndexerRateManagerOrderField, cU as IndexerRateManagerPagination, cl as IndexerRateManagerRate, c9 as IndexerRateManagerService, cc as IndexerStakingService, a_ as Intent, al as IntentGuardianErrorCode, ah as IntentGuardianPolicy, ai as IntentGuardianQuote, aj as IntentGuardianWriteFunction, ak as IntentGuardianWriteParams, dz as IntentView, bW as MakerIdentityAttestationRequestBody, bX as MakerIdentityPlatform, aS as NearbyQuote, aT as NearbySuggestions, dj as ORCHESTRATOR_V3_ABI, _ as OfframpClient, bY as OnchainCurrency, dA as OnchainIntent, b$ as OrderStats, c4 as OrderbookEntry, c5 as OrderbookTableRow, d0 as PAYMENT_PLATFORMS, bg as PayPalGoogleOAuthSellerCredentialUploadBody, dw as PaymentMethodData, d1 as PaymentPlatformType, aE as PlatformQuote, b_ as PreparedTransaction, aP as QuoteFeesResponse, aO as QuoteIntentResponse, aM as QuoteMakerIdentity, aF as QuotePreference, aL as QuoteResponseObject, aN as QuoteSingleResponse, au as Range, ag as ReadDisputeAttestationConfigParams, a2 as RedeemReferralCodeSignatureOptions, $ as ReferralBearerWriteOptions, dy as ReferralFee, a0 as ReferralReadOptions, aq as ReferralRedemption, ar as ReferralSignatureBody, a1 as ReferralSignatureOptions, b6 as RegisterPayeeDetailsRequest, b7 as RegisterPayeeDetailsResponse, bH as RegisteredSellerCredentialPlatform, bJ as RegisteredUploadSellerCredentialParams, ay as ReleaseFundsToPayerParams, dm as RuntimeEnv, dl as STAKE_VAULT_ABI, bz as SellerAttestationOutput, bn as SellerCiphertextBundle, bs as SellerCredentialBundleUpload, bA as SellerCredentialProbeResponse, bu as SellerCredentialStatus, bt as SellerCredentialStatusValue, bm as SellerCredentialUploadInputByPlatform, by as SellerPaymentTypedDataValue, br as SellerProbeInput, bo as SellerSignedCiphertextBundle, bw as SellerTypedDataField, bx as SellerTypedDataSpec, bq as SellerVerifyInput, bp as SellerVerifyIntentDetails, bv as SellerVerifyProxyBody, dM as SendBatchFn, dL as SendTransactionFn, a4 as SignalIntentMethodParams, aw as SignalIntentParams, a3 as SignalIntentReferralFee, cL as StakeActivityPageParams, c2 as StakeEnvironment, cM as StakeLockPageParams, a9 as StakeVaultState, aa as StakeVaultWriteFunction, ab as StakeVaultWriteParams, cN as StakingEntityIds, cO as TakerStakeAuthorizationPageParams, c3 as TakerStakeBalances, ao as TimeoutConfig, aR as TokenResponse, a7 as UpdateReferralCodeSignatureOptions, bP as UploadGoogleOAuthSellerCredentialParams, dT as UploadICloudMailSellerCredentialOptions, dU as UploadICloudMailSellerCredentialParams, bQ as UploadMicrosoftOAuthSellerCredentialParams, bM as UploadPayPalGoogleOAuthSellerCredentialParams, bK as UploadSellerCredentialOptions, bI as UploadSellerCredentialParams, bN as UploadVenmoGoogleOAuthSellerCredentialParams, bO as UploadXMoneyGoogleOAuthSellerCredentialParams, c1 as UsdcAmount, dp as V2ContractAbis, dn as V2ContractAddresses, bj as VenmoCredentialUploadInput, bh as VenmoGoogleOAuthSellerCredentialUploadBody, ba as VenmoSessionMaterial, bR as VerifySellerPaymentParams, bl as WiseCredentialUploadInput, bd as WiseProfileInfo, bf as WiseProfileNotFound, be as WiseProfileSelectionRequired, bc as WiseSessionMaterial, av as WithdrawDepositParams, bi as XMoneyGoogleOAuthSellerCredentialUploadBody, dB as ZERO_RATE_MANAGER_ID, _ as Zkp2pClient, a8 as Zkp2pClientOptions, cb as buildStakingEntityIds, dG as classifyDelegationState, am as classifyIntentGuardianError, ca as compareEventCursorIdsByRecency, d3 as currencyInfo, c7 as defaultIndexerEndpoint, ds as enrichPvDepositView, dt as enrichPvIntentView, cd as fetchIndexerFulfillmentAndPayment, da as getContracts, d6 as getCurrencyCodeFromHash, d5 as getCurrencyInfoFromCountryCode, d4 as getCurrencyInfoFromHash, dF as getDelegationRoute, dg as getDisputeProtectionPolicyContract, di as getGatingServiceAddress, db as getIntentGuardianContract, df as getOrchestratorV3Contract, dh as getPaymentMethodsCatalog, dd as getRateManagerContracts, de as getStakeVaultContract, dc as hasIntentGuardian, dQ as isMailboxSellerCredentialType, d7 as isSupportedCurrencyHash, dC as isZeroRateManagerId, d8 as mapConversionRatesToOnchainMinRate, dD as normalizeRateManagerId, dE as normalizeRegistry, dq as parseDepositView, dr as parseIntentView, ac as readDisputeAttestationConfig } from './vaultUtils-PRhZBjwX.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, M as MicrosoftOAuthSellerCredentialUploadBodyByPlatform, t as SellerPlatform, u as CuratorSellerCredentialStatusResponse, Q as QuotesBestByPlatformRequest, v as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, w as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, x as PostDepositDetailsResponse, y as GetPayeeDetailsRequest, z as GetPayeeDetailsResponse, E as GetOwnerDepositsRequest, F as GetOwnerDepositsResponse, H as GetDepositBundleParams, J as GetDepositBundleResponse, K as GetOrderbookParams, L as GetOrderbookResponse, N as GetOrderbookTableResponse, O as QuoteRequest, T as QuoteResponse, W as CuratorMetadata, X as CurrencyType, Y as PaymentMethodCatalog, Z 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, M as MicrosoftOAuthSellerCredentialUploadBodyByPlatform, t as SellerPlatform, u as CuratorSellerCredentialStatusResponse, Q as QuotesBestByPlatformRequest, v as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, w as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, x as PostDepositDetailsResponse, y as GetPayeeDetailsRequest, z as GetPayeeDetailsResponse, E as GetOwnerDepositsRequest, F as GetOwnerDepositsResponse, H as GetDepositBundleParams, J as GetDepositBundleResponse, K as GetOrderbookParams, L as GetOrderbookResponse, N as GetOrderbookTableResponse, O as QuoteRequest, T as QuoteResponse, W as CuratorMetadata, X as CurrencyType, Y as PaymentMethodCatalog, Z as TxOverrides } from './vaultUtils-PRhZBjwX.js';
|
|
2
|
+
export { dN as AccessPolicyOperations, dO as AccessPolicyUnsupportedError, ap as ActionCallback, b8 as AmazonPayCredentialUploadInput, b9 as AmazonPayIdentityAttestationOutput, aU as ApiDeposit, a$ as ApiIntentStatus, bC as AttestationServiceSellerCredentialProbeResponse, an as AuthorizationTokenProvider, dK as BatchResult, aA as BestByPlatformResponseObject, bD as BuyerTeePaymentParams, bE as BuyerTeePaymentProofInput, bF as BuyerTeeSessionMaterial, a6 as CancelIntentMethodParams, az as CancelIntentParams, bk as CashAppCredentialUploadInput, bb as CashAppSessionMaterial, at as CreateDepositConversionRate, as as CreateDepositParams, bG as CuratorSellerVerifyResponse, d2 as Currency, d9 as CurrencyData, dk as DISPUTE_PROTECTION_POLICY_ABI, dJ as DelegationDepositTarget, dH as DelegationRoute, dI as DelegationState, dv as Deposit, dx as DepositCurrency, c0 as DepositIntentStatistics, aX as DepositStatus, aV as DepositVerifier, aW as DepositVerifierCurrency, bZ as DepositVerifierData, du as DepositView, ad as DisputeAttestationConfig, cx as DisputeProtectionIntentPage, cy as DisputeProtectionIntentPageParams, ae as DisputeProtectionReadinessOptions, af as DisputeProtectionReadinessResult, aQ as FiatResponse, bB as FulfillIntentAttestationResponse, a5 as FulfillIntentMethodParams, ax as FulfillIntentParams, aB as GetBestByPlatformResponse, aC as GetBestByPlatformResponseObject, aY as GetDepositByIdRequest, aZ as GetDepositByIdResponse, b4 as GetIntentByHashRequest, b5 as GetIntentByHashResponse, b2 as GetIntentsByDepositRequest, b3 as GetIntentsByDepositResponse, aG as GetNearbyQuote, aH as GetNearbySuggestions, b0 as GetOwnerIntentsRequest, b1 as GetOwnerIntentsResponse, aD as GetPlatformQuote, aI as GetQuoteResponse, aJ as GetQuoteResponseObject, aK as GetQuoteSingleResponse, bL as GetSellerCredentialStatusParams, dP as ICloudMailCredentialError, dR as ICloudMailCredentialErrorReason, dS as ICloudMailSellerPlatform, bS as IdentityAttestationActionType, bT as IdentityAttestationOutput, bU as IdentityAttestationOutputFor, bV as IdentityAttestationParams, cz as IndexedDisputeProtectionIntent, cA as IndexedPage, cB as IndexedPageAsOf, cC as IndexedRiskWindow, cD as IndexedStakeActivity, cF as IndexedStakeLock, cE as IndexedStakeTotals, cG as IndexedStakingRowFreshness, cH as IndexedStakingState, cI as IndexedStakingStateParams, cJ as IndexedTakerAuthorization, cK as IndexedTakerStakeAuthorization, c6 as IndexerClient, cY as IndexerDeploymentEnv, ce as IndexerDeposit, cv as IndexerDepositDailySnapshot, cP as IndexerDepositFilter, cu as IndexerDepositFundActivity, cw as IndexerDepositFundActivityType, cS as IndexerDepositOrderDirection, cR as IndexerDepositOrderField, cQ as IndexerDepositPagination, ch as IndexerDepositPaymentMethod, c8 as IndexerDepositService, c$ as IndexerFulfillmentAndPaymentResponse, cZ as IndexerFulfillmentRecord, cf as IndexerIntentFulfilled, cg as IndexerIntentFulfillmentAmounts, cj as IndexerIntentStatus, cn as IndexerManagerAggregateStats, cp as IndexerManagerDailySnapshot, co as IndexerManagerStats, cs as IndexerManualRateUpdate, ci as IndexerMethodCurrency, ct as IndexerOracleConfigUpdate, c_ as IndexerPaymentVerifiedRecord, ck as IndexerRateManager, cm as IndexerRateManagerDelegation, cV as IndexerRateManagerDelegationPagination, cr as IndexerRateManagerDetail, cT as IndexerRateManagerFilter, cq as IndexerRateManagerListItem, cX as IndexerRateManagerOrderDirection, cW as IndexerRateManagerOrderField, cU as IndexerRateManagerPagination, cl as IndexerRateManagerRate, c9 as IndexerRateManagerService, cc as IndexerStakingService, a_ as Intent, al as IntentGuardianErrorCode, ah as IntentGuardianPolicy, ai as IntentGuardianQuote, aj as IntentGuardianWriteFunction, ak as IntentGuardianWriteParams, dz as IntentView, bW as MakerIdentityAttestationRequestBody, bX as MakerIdentityPlatform, aS as NearbyQuote, aT as NearbySuggestions, dj as ORCHESTRATOR_V3_ABI, _ as OfframpClient, bY as OnchainCurrency, dA as OnchainIntent, b$ as OrderStats, c4 as OrderbookEntry, c5 as OrderbookTableRow, d0 as PAYMENT_PLATFORMS, bg as PayPalGoogleOAuthSellerCredentialUploadBody, dw as PaymentMethodData, d1 as PaymentPlatformType, aE as PlatformQuote, b_ as PreparedTransaction, aP as QuoteFeesResponse, aO as QuoteIntentResponse, aM as QuoteMakerIdentity, aF as QuotePreference, aL as QuoteResponseObject, aN as QuoteSingleResponse, au as Range, ag as ReadDisputeAttestationConfigParams, a2 as RedeemReferralCodeSignatureOptions, $ as ReferralBearerWriteOptions, dy as ReferralFee, a0 as ReferralReadOptions, aq as ReferralRedemption, ar as ReferralSignatureBody, a1 as ReferralSignatureOptions, b6 as RegisterPayeeDetailsRequest, b7 as RegisterPayeeDetailsResponse, bH as RegisteredSellerCredentialPlatform, bJ as RegisteredUploadSellerCredentialParams, ay as ReleaseFundsToPayerParams, dm as RuntimeEnv, dl as STAKE_VAULT_ABI, bz as SellerAttestationOutput, bn as SellerCiphertextBundle, bs as SellerCredentialBundleUpload, bA as SellerCredentialProbeResponse, bu as SellerCredentialStatus, bt as SellerCredentialStatusValue, bm as SellerCredentialUploadInputByPlatform, by as SellerPaymentTypedDataValue, br as SellerProbeInput, bo as SellerSignedCiphertextBundle, bw as SellerTypedDataField, bx as SellerTypedDataSpec, bq as SellerVerifyInput, bp as SellerVerifyIntentDetails, bv as SellerVerifyProxyBody, dM as SendBatchFn, dL as SendTransactionFn, a4 as SignalIntentMethodParams, aw as SignalIntentParams, a3 as SignalIntentReferralFee, cL as StakeActivityPageParams, c2 as StakeEnvironment, cM as StakeLockPageParams, a9 as StakeVaultState, aa as StakeVaultWriteFunction, ab as StakeVaultWriteParams, cN as StakingEntityIds, cO as TakerStakeAuthorizationPageParams, c3 as TakerStakeBalances, ao as TimeoutConfig, aR as TokenResponse, a7 as UpdateReferralCodeSignatureOptions, bP as UploadGoogleOAuthSellerCredentialParams, dT as UploadICloudMailSellerCredentialOptions, dU as UploadICloudMailSellerCredentialParams, bQ as UploadMicrosoftOAuthSellerCredentialParams, bM as UploadPayPalGoogleOAuthSellerCredentialParams, bK as UploadSellerCredentialOptions, bI as UploadSellerCredentialParams, bN as UploadVenmoGoogleOAuthSellerCredentialParams, bO as UploadXMoneyGoogleOAuthSellerCredentialParams, c1 as UsdcAmount, dp as V2ContractAbis, dn as V2ContractAddresses, bj as VenmoCredentialUploadInput, bh as VenmoGoogleOAuthSellerCredentialUploadBody, ba as VenmoSessionMaterial, bR as VerifySellerPaymentParams, bl as WiseCredentialUploadInput, bd as WiseProfileInfo, bf as WiseProfileNotFound, be as WiseProfileSelectionRequired, bc as WiseSessionMaterial, av as WithdrawDepositParams, bi as XMoneyGoogleOAuthSellerCredentialUploadBody, dB as ZERO_RATE_MANAGER_ID, _ as Zkp2pClient, a8 as Zkp2pClientOptions, cb as buildStakingEntityIds, dG as classifyDelegationState, am as classifyIntentGuardianError, ca as compareEventCursorIdsByRecency, d3 as currencyInfo, c7 as defaultIndexerEndpoint, ds as enrichPvDepositView, dt as enrichPvIntentView, cd as fetchIndexerFulfillmentAndPayment, da as getContracts, d6 as getCurrencyCodeFromHash, d5 as getCurrencyInfoFromCountryCode, d4 as getCurrencyInfoFromHash, dF as getDelegationRoute, dg as getDisputeProtectionPolicyContract, di as getGatingServiceAddress, db as getIntentGuardianContract, df as getOrchestratorV3Contract, dh as getPaymentMethodsCatalog, dd as getRateManagerContracts, de as getStakeVaultContract, dc as hasIntentGuardian, dQ as isMailboxSellerCredentialType, d7 as isSupportedCurrencyHash, dC as isZeroRateManagerId, d8 as mapConversionRatesToOnchainMinRate, dD as normalizeRateManagerId, dE as normalizeRegistry, dq as parseDepositView, dr as parseIntentView, ac as readDisputeAttestationConfig } from './vaultUtils-PRhZBjwX.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,12 +2,12 @@ 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, ContractError, 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-4GCGSZA2.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-4GCGSZA2.mjs';
|
|
7
7
|
import { Currency, currencyKeccak256 } from './chunk-WDEEWFEU.mjs';
|
|
8
8
|
export { Currency, currencyInfo, getCurrencyCodeFromHash, getCurrencyInfoFromCountryCode, getCurrencyInfoFromHash, isSupportedCurrencyHash, mapConversionRatesToOnchainMinRate } from './chunk-WDEEWFEU.mjs';
|
|
9
|
-
import { define_ZKP2P_SDK_BUILD_METADATA_default } from './chunk-
|
|
10
|
-
import { keccak256, concatHex, encodeFunctionData, encodeAbiParameters, createPublicClient, http, parseEventLogs, isAddressEqual, isAddress, zeroAddress, formatUnits } from 'viem';
|
|
9
|
+
import { define_ZKP2P_SDK_BUILD_METADATA_default } from './chunk-ERJIIFAV.mjs';
|
|
10
|
+
import { keccak256, parseUnits, concatHex, encodeFunctionData, encodeAbiParameters, createPublicClient, http, parseEventLogs, isAddressEqual, isAddress, zeroAddress, formatUnits } from 'viem';
|
|
11
11
|
import { hardhat, base } from 'viem/chains';
|
|
12
12
|
import { hashUtf8, createNitroAttestationClient, verifySellerCredentialBundle, NitroAttestationError, createEncryptedBuyerTeeSessionMaterial as createEncryptedBuyerTeeSessionMaterial$1, createEncryptedSellerCredentialUpload } from '@zkp2p/zkp2p-attestation';
|
|
13
13
|
export { createNitroAttestationClient, verifyDisputeAttestation } from '@zkp2p/zkp2p-attestation';
|
|
@@ -605,6 +605,55 @@ var zelleCitiVerifyConfig = {
|
|
|
605
605
|
return `Transfer of $${Number(metadata.amount)} to ${metadata.recipient}`;
|
|
606
606
|
}
|
|
607
607
|
};
|
|
608
|
+
var CAPITAL_ONE_ZELLE_APP_LINK = "https://links.capitalone.com/bank/zelle/getting-started/";
|
|
609
|
+
var zelleCapitalOneSendConfig = {
|
|
610
|
+
paymentMethodName: "Capital One",
|
|
611
|
+
defaultPaymentMode: "QR_CODE",
|
|
612
|
+
useCustomQRCode: true,
|
|
613
|
+
getFormattedSendLink: () => CAPITAL_ONE_ZELLE_APP_LINK,
|
|
614
|
+
troubleScanningQRCodeLink: () => CAPITAL_ONE_ZELLE_APP_LINK,
|
|
615
|
+
deepLinkEmbedsRecipient: false,
|
|
616
|
+
supportsSendingPaymentOnWeb: true,
|
|
617
|
+
showTroubleScanningQRCodeLink: true,
|
|
618
|
+
sendPaymentWarning: (currency, amount) => `Send exactly ${amount} ${currencyInfo2[currency].currencyCode} in a single payment through Capital One's Zelle.`,
|
|
619
|
+
sendPaymentInfo: () => "Only use Capital One. Keep the \u201CYou sent money with Zelle\u201D email to verify this payment.",
|
|
620
|
+
sendPaymentDos: (currency, amount) => [
|
|
621
|
+
{ text: "Use Capital One for this payment", emphasize: ["Capital One"] },
|
|
622
|
+
{
|
|
623
|
+
text: `Send exactly ${amount} ${currencyInfo2[currency].currencyCode} in a single payment`,
|
|
624
|
+
emphasize: [
|
|
625
|
+
"exactly",
|
|
626
|
+
amount,
|
|
627
|
+
currencyInfo2[currency].currencyCode,
|
|
628
|
+
"single"
|
|
629
|
+
]
|
|
630
|
+
}
|
|
631
|
+
],
|
|
632
|
+
sendPaymentDonts: () => [
|
|
633
|
+
{
|
|
634
|
+
text: "Do not send unless you can open the Capital One payment email. The email is required to verify your payment and complete this order.",
|
|
635
|
+
emphasize: ["Do not send", "payment email"]
|
|
636
|
+
},
|
|
637
|
+
{ text: "Do not send using any other bank", emphasize: ["Do not"] }
|
|
638
|
+
]
|
|
639
|
+
};
|
|
640
|
+
var zelleCapitalOneVerifyConfig = {
|
|
641
|
+
authLink: "https://myaccounts.capitalone.com/",
|
|
642
|
+
actionType: "transfer_zelle_capitalone",
|
|
643
|
+
actionPlatform: PaymentPlatform.ZELLE,
|
|
644
|
+
numPaymentsFetched: 20,
|
|
645
|
+
minExtensionVersion: "0.0.0",
|
|
646
|
+
supportsAppclip: false,
|
|
647
|
+
totalProofs: 1,
|
|
648
|
+
verifiesByEmail: true,
|
|
649
|
+
// PeerAuth never captures payment metadata for an email-verified bank.
|
|
650
|
+
parseMetadata: () => {
|
|
651
|
+
throw new Error("Capital One payments have no PeerAuth metadata");
|
|
652
|
+
},
|
|
653
|
+
getSubjectText: () => {
|
|
654
|
+
throw new Error("Capital One payments have no PeerAuth metadata");
|
|
655
|
+
}
|
|
656
|
+
};
|
|
608
657
|
var genericZelleBankRoutes = [
|
|
609
658
|
{
|
|
610
659
|
bankId: "chase",
|
|
@@ -620,12 +669,24 @@ var genericZelleBankRoutes = [
|
|
|
620
669
|
bankId: "citi",
|
|
621
670
|
sendConfig: zelleCitiSendConfig,
|
|
622
671
|
verifyConfig: zelleCitiVerifyConfig
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
bankId: "capitalone",
|
|
675
|
+
sendConfig: zelleCapitalOneSendConfig,
|
|
676
|
+
verifyConfig: zelleCapitalOneVerifyConfig
|
|
623
677
|
}
|
|
624
678
|
];
|
|
625
679
|
genericZelleBankRoutes.map(({ sendConfig, verifyConfig }) => ({
|
|
626
680
|
sendConfig,
|
|
627
681
|
verifyConfig
|
|
628
682
|
}));
|
|
683
|
+
var usdcUnits = (amount) => {
|
|
684
|
+
return parseUnits(amount.toString(), 6);
|
|
685
|
+
};
|
|
686
|
+
({
|
|
687
|
+
orderCapDeposit: {
|
|
688
|
+
minOrder: usdcUnits(5),
|
|
689
|
+
maxOrder: usdcUnits(500)}});
|
|
629
690
|
var DISPUTE_PROTECTION_STAKE_PLATFORMS = [
|
|
630
691
|
PaymentPlatform.VENMO,
|
|
631
692
|
PaymentPlatform.PAYPAL
|
|
@@ -978,7 +1039,7 @@ async function withRetry(fn, maxRetries = 3, delayMs = 1e3, timeoutMs, shouldRet
|
|
|
978
1039
|
for (let i = 0; i < maxRetries; i++) {
|
|
979
1040
|
try {
|
|
980
1041
|
if (timeoutMs) {
|
|
981
|
-
const { withTimeout } = await import('./timeout-
|
|
1042
|
+
const { withTimeout } = await import('./timeout-RXDD3LQG.mjs');
|
|
982
1043
|
return await withTimeout(fn(), timeoutMs, `Operation timed out after ${timeoutMs}ms`);
|
|
983
1044
|
}
|
|
984
1045
|
return await fn();
|
|
@@ -1853,6 +1914,7 @@ function resolvePlatformAttestationConfig(platformName) {
|
|
|
1853
1914
|
// src/client/IntentOperations.ts
|
|
1854
1915
|
var GENERIC_ZELLE_ATTESTATION_ACTION_TYPES = /* @__PURE__ */ new Set([
|
|
1855
1916
|
"transfer_zelle_bofa",
|
|
1917
|
+
"transfer_zelle_capitalone",
|
|
1856
1918
|
"transfer_zelle_chase",
|
|
1857
1919
|
"transfer_zelle_citi"
|
|
1858
1920
|
]);
|
|
@@ -2597,7 +2659,7 @@ var ProtocolViewerReader = class {
|
|
|
2597
2659
|
if (inputCount === null) {
|
|
2598
2660
|
throw new Error("Configured ProtocolViewer ABI does not expose getDeposit");
|
|
2599
2661
|
}
|
|
2600
|
-
const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-
|
|
2662
|
+
const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-O5WTGTUK.mjs');
|
|
2601
2663
|
if (inputCount >= 3) {
|
|
2602
2664
|
return tryContexts(
|
|
2603
2665
|
protocolViewerContexts,
|
|
@@ -2683,7 +2745,7 @@ var ProtocolViewerReader = class {
|
|
|
2683
2745
|
return Promise.all(ids.map((id) => this.config.host.getPvDepositById(id)));
|
|
2684
2746
|
}
|
|
2685
2747
|
const bn = ids.map((id) => typeof id === "bigint" ? id : parseRawDepositId(id));
|
|
2686
|
-
const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-
|
|
2748
|
+
const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-O5WTGTUK.mjs');
|
|
2687
2749
|
if (inputCount >= 2) {
|
|
2688
2750
|
const requests = ids.map((id, index) => ({
|
|
2689
2751
|
index,
|
|
@@ -2788,7 +2850,7 @@ var ProtocolViewerReader = class {
|
|
|
2788
2850
|
if (!protocolViewerAddress || !protocolViewerAbi || inputCount === null) {
|
|
2789
2851
|
return this.config.host.getPvAccountDepositsFromIndexer(owner);
|
|
2790
2852
|
}
|
|
2791
|
-
const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-
|
|
2853
|
+
const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-O5WTGTUK.mjs');
|
|
2792
2854
|
const { address, abi } = this.config.host.requireProtocolViewer();
|
|
2793
2855
|
if (inputCount >= 2) {
|
|
2794
2856
|
const readAndFilter = async (raw2) => {
|
|
@@ -2859,7 +2921,7 @@ var ProtocolViewerReader = class {
|
|
|
2859
2921
|
if (protocolViewerEntries.length === 0) {
|
|
2860
2922
|
throw new Error("ProtocolViewer not available for this network");
|
|
2861
2923
|
}
|
|
2862
|
-
const { parseIntentView: parseIntentView2 } = await import('./protocolViewerParsers-
|
|
2924
|
+
const { parseIntentView: parseIntentView2 } = await import('./protocolViewerParsers-O5WTGTUK.mjs');
|
|
2863
2925
|
const intentsByHash = /* @__PURE__ */ new Map();
|
|
2864
2926
|
let attemptedRead = false;
|
|
2865
2927
|
let hadSuccessfulRead = false;
|
|
@@ -2967,7 +3029,7 @@ var ProtocolViewerReader = class {
|
|
|
2967
3029
|
if (protocolViewerEntries.length === 0) {
|
|
2968
3030
|
throw new Error("ProtocolViewer not available for this network");
|
|
2969
3031
|
}
|
|
2970
|
-
const { parseIntentView: parseIntentView2 } = await import('./protocolViewerParsers-
|
|
3032
|
+
const { parseIntentView: parseIntentView2 } = await import('./protocolViewerParsers-O5WTGTUK.mjs');
|
|
2971
3033
|
let lastError;
|
|
2972
3034
|
for (const pvEntry of protocolViewerEntries) {
|
|
2973
3035
|
const inputCount = this.pvEntryFunctionInputCount(pvEntry, "getIntent");
|
|
@@ -5532,7 +5594,7 @@ async function apiUploadMicrosoftOAuthSellerCredential(processorName, payeeDetai
|
|
|
5532
5594
|
}
|
|
5533
5595
|
async function apiUploadEmailOAuthSellerCredential(provider, processorName, payeeDetails, body, baseApiUrl, opts) {
|
|
5534
5596
|
const providerName = provider === "google" ? "Google" : "Microsoft";
|
|
5535
|
-
if (processorName !== "paypal" && processorName !== "venmo") {
|
|
5597
|
+
if (processorName !== "paypal" && processorName !== "venmo" && processorName !== "xmoney") {
|
|
5536
5598
|
throw new ValidationError(
|
|
5537
5599
|
`Unsupported ${providerName} OAuth seller credential platform: ${String(processorName)}`,
|
|
5538
5600
|
"processorName"
|
|
@@ -9036,7 +9098,7 @@ function toAttestorError(error, platform, mailboxEmail) {
|
|
|
9036
9098
|
const status = error.details?.status;
|
|
9037
9099
|
const responseObject = asRecord(error.details?.responseObject);
|
|
9038
9100
|
if (status === 429) return rateLimited(mailboxEmail, responseObject, error);
|
|
9039
|
-
if (status === 400 && responseObject?.code === `${platform.toUpperCase()}_ICLOUD_RECEIPT_NOT_FOUND`) {
|
|
9101
|
+
if (status === 400 && responseObject?.code === (platform === "xmoney" ? "XMONEY_EMAIL_RECEIPT_NOT_FOUND" : `${platform.toUpperCase()}_ICLOUD_RECEIPT_NOT_FOUND`)) {
|
|
9040
9102
|
return new ICloudMailCredentialError("receipt_not_found", error.message, {
|
|
9041
9103
|
cause: error
|
|
9042
9104
|
});
|
|
@@ -9122,7 +9184,7 @@ function resolveAttestorEnvironment(attestationServiceUrl) {
|
|
|
9122
9184
|
}
|
|
9123
9185
|
return environment;
|
|
9124
9186
|
}
|
|
9125
|
-
async function
|
|
9187
|
+
async function uploadICloudMailSellerCredential(params, context) {
|
|
9126
9188
|
const { appSpecificPassword, platform } = params;
|
|
9127
9189
|
const mailboxEmail = params.mailboxEmail.trim().toLowerCase();
|
|
9128
9190
|
if (!mailboxEmail) throw new ValidationError("mailboxEmail is required", "mailboxEmail");
|
|
@@ -9130,11 +9192,11 @@ async function attestICloudMailSellerCredential(params, context) {
|
|
|
9130
9192
|
throw new ValidationError("appSpecificPassword is required", "appSpecificPassword");
|
|
9131
9193
|
}
|
|
9132
9194
|
const payeeDetails = params.payeeDetails.toLowerCase();
|
|
9133
|
-
const
|
|
9134
|
-
if (
|
|
9195
|
+
const suppliedPayeeId = params.platform === "paypal" ? params.payeeEmail.trim().toLowerCase() : params.platform === "xmoney" ? params.payeeUsername.trim().replace(/^@/u, "").toLowerCase() : null;
|
|
9196
|
+
if (suppliedPayeeId !== null && hashUtf8(suppliedPayeeId) !== payeeDetails) {
|
|
9135
9197
|
throw new ICloudMailCredentialError(
|
|
9136
9198
|
"payee_mismatch",
|
|
9137
|
-
"The PayPal email does not match the registered maker"
|
|
9199
|
+
params.platform === "paypal" ? "The PayPal email does not match the registered maker" : "The X username does not match the registered maker"
|
|
9138
9200
|
);
|
|
9139
9201
|
}
|
|
9140
9202
|
const retryAt = mailboxRetryAt.get(mailboxEmail);
|
|
@@ -9149,7 +9211,7 @@ async function attestICloudMailSellerCredential(params, context) {
|
|
|
9149
9211
|
const environment = resolveAttestorEnvironment(context.attestationServiceUrl);
|
|
9150
9212
|
mailboxesInFlight.add(mailboxEmail);
|
|
9151
9213
|
try {
|
|
9152
|
-
const payeeId =
|
|
9214
|
+
const payeeId = suppliedPayeeId ?? await resolveVenmoPayeeId(payeeDetails, mailboxEmail, context);
|
|
9153
9215
|
let bundle;
|
|
9154
9216
|
try {
|
|
9155
9217
|
const nitro = createNitroAttestationClient({
|
|
@@ -9185,39 +9247,33 @@ async function attestICloudMailSellerCredential(params, context) {
|
|
|
9185
9247
|
`Attestor returned credential type ${bundle.credentialType}`
|
|
9186
9248
|
);
|
|
9187
9249
|
}
|
|
9188
|
-
|
|
9250
|
+
let stored;
|
|
9251
|
+
try {
|
|
9252
|
+
const response = await apiUploadSellerCredential(
|
|
9253
|
+
platform,
|
|
9254
|
+
payeeDetails,
|
|
9255
|
+
bundle,
|
|
9256
|
+
context.baseApiUrl,
|
|
9257
|
+
context.timeoutMs,
|
|
9258
|
+
context.authorizationToken,
|
|
9259
|
+
// Send once: a 429 or lost response returns to the user, who retries.
|
|
9260
|
+
1
|
|
9261
|
+
);
|
|
9262
|
+
stored = response.success ? response.responseObject : null;
|
|
9263
|
+
} catch (error) {
|
|
9264
|
+
throw toCuratorError(error, mailboxEmail);
|
|
9265
|
+
}
|
|
9266
|
+
if (stored?.status !== "active" || stored.credentialType !== "icloud_mail" || stored.platform !== platform || stored.payeeIdHash.toLowerCase() !== payeeDetails) {
|
|
9267
|
+
throw new ICloudMailCredentialError(
|
|
9268
|
+
"store_failed",
|
|
9269
|
+
"Curator did not store an active iCloud credential"
|
|
9270
|
+
);
|
|
9271
|
+
}
|
|
9272
|
+
return stored;
|
|
9189
9273
|
} finally {
|
|
9190
9274
|
mailboxesInFlight.delete(mailboxEmail);
|
|
9191
9275
|
}
|
|
9192
9276
|
}
|
|
9193
|
-
async function uploadICloudMailSellerCredential(params, context) {
|
|
9194
|
-
const bundle = await attestICloudMailSellerCredential(params, context);
|
|
9195
|
-
const { platform } = params;
|
|
9196
|
-
const payeeDetails = params.payeeDetails.toLowerCase();
|
|
9197
|
-
let stored;
|
|
9198
|
-
try {
|
|
9199
|
-
const response = await apiUploadSellerCredential(
|
|
9200
|
-
platform,
|
|
9201
|
-
payeeDetails,
|
|
9202
|
-
bundle,
|
|
9203
|
-
context.baseApiUrl,
|
|
9204
|
-
context.timeoutMs,
|
|
9205
|
-
context.authorizationToken,
|
|
9206
|
-
// Send once: a 429 or lost response returns to the user, who retries.
|
|
9207
|
-
1
|
|
9208
|
-
);
|
|
9209
|
-
stored = response.success ? response.responseObject : null;
|
|
9210
|
-
} catch (error) {
|
|
9211
|
-
throw toCuratorError(error, params.mailboxEmail.trim().toLowerCase());
|
|
9212
|
-
}
|
|
9213
|
-
if (stored?.status !== "active" || stored.credentialType !== "icloud_mail" || stored.platform !== platform || stored.payeeIdHash.toLowerCase() !== payeeDetails) {
|
|
9214
|
-
throw new ICloudMailCredentialError(
|
|
9215
|
-
"store_failed",
|
|
9216
|
-
"Curator did not store an active iCloud credential"
|
|
9217
|
-
);
|
|
9218
|
-
}
|
|
9219
|
-
return stored;
|
|
9220
|
-
}
|
|
9221
9277
|
|
|
9222
9278
|
// src/sellerCredentials.ts
|
|
9223
9279
|
function normalizeBaseApiUrl(value) {
|
|
@@ -12030,7 +12086,7 @@ var Zkp2pClient = class {
|
|
|
12030
12086
|
}
|
|
12031
12087
|
}
|
|
12032
12088
|
});
|
|
12033
|
-
const { mapConversionRatesToOnchainMinRate: mapConversionRatesToOnchainMinRate2 } = await import('./currency-
|
|
12089
|
+
const { mapConversionRatesToOnchainMinRate: mapConversionRatesToOnchainMinRate2 } = await import('./currency-AGVR2YDU.mjs');
|
|
12034
12090
|
currencies = mapConversionRatesToOnchainMinRate2(
|
|
12035
12091
|
params.conversionRates,
|
|
12036
12092
|
paymentMethods.length
|
|
@@ -12464,7 +12520,7 @@ var Zkp2pClient = class {
|
|
|
12464
12520
|
const providerName = params.provider === "google" ? "Google" : "Microsoft";
|
|
12465
12521
|
if (opts?.signal?.aborted) throw new Error(`${providerName} OAuth upload cancelled.`);
|
|
12466
12522
|
const platform = params.platform;
|
|
12467
|
-
if (platform !== "paypal" && platform !== "venmo") {
|
|
12523
|
+
if (platform !== "paypal" && platform !== "venmo" && platform !== "xmoney") {
|
|
12468
12524
|
throw new ValidationError(
|
|
12469
12525
|
`Unsupported ${providerName} OAuth seller credential platform: ${String(platform)}`,
|
|
12470
12526
|
"platform"
|
|
@@ -12500,7 +12556,7 @@ var Zkp2pClient = class {
|
|
|
12500
12556
|
);
|
|
12501
12557
|
}
|
|
12502
12558
|
/**
|
|
12503
|
-
* Connect an iCloud Mail receipt inbox for PayPal or
|
|
12559
|
+
* Connect an iCloud Mail receipt inbox for PayPal, Venmo or X Money seller automated
|
|
12504
12560
|
* release. The app-specific password is encrypted to the attested enclave and
|
|
12505
12561
|
* posted directly to the attestor (no proxy, no retry). The returned bundle is
|
|
12506
12562
|
* verified against the pinned enclave signer, platform and registered maker,
|
|
@@ -12512,34 +12568,18 @@ var Zkp2pClient = class {
|
|
|
12512
12568
|
* delay. The attestor defaults to the one paired with `baseApiUrl`.
|
|
12513
12569
|
*/
|
|
12514
12570
|
async uploadICloudMailSellerCredential(params, opts) {
|
|
12515
|
-
return uploadICloudMailSellerCredential(params, {
|
|
12516
|
-
...this.iCloudMailAttestContext(opts),
|
|
12517
|
-
authorizationToken: await this.resolveAuthorizationToken()
|
|
12518
|
-
});
|
|
12519
|
-
}
|
|
12520
|
-
/**
|
|
12521
|
-
* Run the checks, enclave upload and bundle verification of
|
|
12522
|
-
* `uploadICloudMailSellerCredential` and return the verified bundle without
|
|
12523
|
-
* storing it, for callers that store it through another Curator route. Needs
|
|
12524
|
-
* no Curator session; Venmo still fetches the maker's account ID from
|
|
12525
|
-
* `baseApiUrl`. Rejects with the same `ICloudMailCredentialError` reasons,
|
|
12526
|
-
* mailbox lock and rate-limit delay.
|
|
12527
|
-
*/
|
|
12528
|
-
async attestICloudMailSellerCredential(params, opts) {
|
|
12529
|
-
return attestICloudMailSellerCredential(params, this.iCloudMailAttestContext(opts));
|
|
12530
|
-
}
|
|
12531
|
-
iCloudMailAttestContext(opts) {
|
|
12532
12571
|
const baseApiUrl = this.stripTrailingSlash(
|
|
12533
12572
|
opts?.baseApiUrl ?? this.baseApiUrl ?? DEFAULT_BASE_API_URL
|
|
12534
12573
|
);
|
|
12535
|
-
return {
|
|
12574
|
+
return uploadICloudMailSellerCredential(params, {
|
|
12536
12575
|
attestationServiceUrl: this.stripTrailingSlash(
|
|
12537
12576
|
opts?.attestationServiceUrl ?? this.defaultAttestationServiceForBaseApiUrl(baseApiUrl)
|
|
12538
12577
|
),
|
|
12539
12578
|
attestationRuntime: opts?.attestationRuntime,
|
|
12540
12579
|
baseApiUrl,
|
|
12541
|
-
timeoutMs: this.apiTimeoutMs
|
|
12542
|
-
|
|
12580
|
+
timeoutMs: this.apiTimeoutMs,
|
|
12581
|
+
authorizationToken: await this.resolveAuthorizationToken()
|
|
12582
|
+
});
|
|
12543
12583
|
}
|
|
12544
12584
|
/**
|
|
12545
12585
|
* Status is a coarse curator-owned signal (`active` / `inactive` / `missing`) and intentionally
|
|
@@ -12968,6 +13008,6 @@ function openVenmoGmailConnect(options) {
|
|
|
12968
13008
|
});
|
|
12969
13009
|
}
|
|
12970
13010
|
|
|
12971
|
-
export { AccessPolicyOperations, AccessPolicyUnsupportedError, BASE_BUILDER_CODE, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ContractRouter, DEFAULT_ORACLE_MAX_STALENESS_SECONDS, ICloudMailCredentialError, IndexerClient, IndexerDepositService, IndexerRateManagerService, IndexerStakingService, Zkp2pClient as OfframpClient, PEER_EXTENSION_CHROME_URL, PLATFORM_METADATA, PYTH_CONTRACT_BASE, PYTH_ORACLE_ADAPTER, PYTH_ORACLE_FEEDS, REFERRAL_SIGNATURE_DOMAIN, REFERRAL_SIGNATURE_TYPES, RISK_BPS_DENOMINATOR, SDK_BUILD_METADATA, SPREAD_ORACLE_FEEDS, SUPPORTED_CHAIN_IDS, TOKEN_METADATA, VenmoGmailConnectError, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, Zkp2pClient, apiCreateReferralCode, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOrderbookTable, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuote, apiGetQuotesBestByPlatform, apiGetReferralDashboard, apiGetReferralEarnings, apiGetSellerCredentialStatus, apiLookupReferralCode, apiPostDepositDetails, apiRedeemReferralCode, apiRequestIdentityAttestation, apiSignIntentV3, apiSignIntentV3Raw, apiUpdateReferralCode, apiUploadGoogleOAuthSellerCredential, apiUploadMicrosoftOAuthSellerCredential, apiUploadSellerCredentialBundle, apiValidatePayeeDetails, apiVerifyBuyerTeePayment, appendAttributionToCalldata, assertValidReferrerFeeConfig,
|
|
13011
|
+
export { AccessPolicyOperations, AccessPolicyUnsupportedError, BASE_BUILDER_CODE, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ContractRouter, DEFAULT_ORACLE_MAX_STALENESS_SECONDS, ICloudMailCredentialError, IndexerClient, IndexerDepositService, IndexerRateManagerService, IndexerStakingService, Zkp2pClient as OfframpClient, PEER_EXTENSION_CHROME_URL, PLATFORM_METADATA, PYTH_CONTRACT_BASE, PYTH_ORACLE_ADAPTER, PYTH_ORACLE_FEEDS, REFERRAL_SIGNATURE_DOMAIN, REFERRAL_SIGNATURE_TYPES, RISK_BPS_DENOMINATOR, SDK_BUILD_METADATA, SPREAD_ORACLE_FEEDS, SUPPORTED_CHAIN_IDS, TOKEN_METADATA, VenmoGmailConnectError, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, Zkp2pClient, apiCreateReferralCode, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOrderbookTable, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuote, apiGetQuotesBestByPlatform, apiGetReferralDashboard, apiGetReferralEarnings, apiGetSellerCredentialStatus, apiLookupReferralCode, apiPostDepositDetails, apiRedeemReferralCode, apiRequestIdentityAttestation, apiSignIntentV3, apiSignIntentV3Raw, apiUpdateReferralCode, apiUploadGoogleOAuthSellerCredential, apiUploadMicrosoftOAuthSellerCredential, apiUploadSellerCredentialBundle, apiValidatePayeeDetails, apiVerifyBuyerTeePayment, appendAttributionToCalldata, assertValidReferrerFeeConfig, buildStakingEntityIds, calculateRequiredCoverage, calculateStakeBackedCapacity, compareEventCursorIdsByRecency, convertDepositsForLiquidity, convertIndexerDepositToEscrowView, convertIndexerIntentsToEscrowViews, createCompositeDepositId, createEncryptedBuyerTeeSessionMaterial, createPeerExtensionSdk, defaultIndexerEndpoint, encodePythAdapterConfig, encodeSpreadOracleAdapterConfig, encodeWithAttribution, fetchFulfillmentAndPayment as fetchIndexerFulfillmentAndPayment, getAmazonPaySellerIdentity, getAttributionDataSuffix, getPeerExtensionState, getSpreadOracleConfig, getVenmoGmailConnectUrl, isMailboxSellerCredentialType, isPeerExtensionAvailable, isValidReferralCode, isValidReferrerFeeBps, isValidReferrerFeeRecipient, logger, normalizeReferralCode, openPeerExtensionInstallPage, openVenmoGmailConnect, parseReferrerFeeConfig, parseVenmoGmailAppearance, peerExtensionSdk, readDisputeAttestationConfig, referrerFeeConfigToPreciseUnits, selectRiskMode, sendTransactionWithAttribution, setLogLevel, validateOracleFeedsOnChain };
|
|
12972
13012
|
//# sourceMappingURL=index.mjs.map
|
|
12973
13013
|
//# sourceMappingURL=index.mjs.map
|