@zkp2p/sdk 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,7 +1,8 @@
1
- import { R as ReferrerFeeConfig, D as DepositWithRelations, I as IntentEntity, S as SellerCredentialUploadInput, a as SellerPlatform, b as SellerCredentialAttestationRuntime, A as AttestationServiceSellerCredentialUploadResponse, B as BuyerTeeSessionMaterialEncryptionInput, C as ConfirmPayPalForwardingResponse, G as GoogleOAuthSellerCredentialPlatform, c as GoogleOAuthSellerCredentialUploadBodyByPlatform, d as CuratorSellerCredentialUploadResponse, Q as QuotesBestByPlatformRequest, e as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, f as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, g as PostDepositDetailsResponse, h as GetPayeeDetailsRequest, i as GetPayeeDetailsResponse, j as GetOwnerDepositsRequest, k as GetOwnerDepositsResponse, l as GetTakerTierRequest, m as GetTakerTierResponse, n as GetDepositBundleParams, o as ApiAdapterOptions, p as GetDepositBundleResponse, q as GetOrderbookParams, r as GetOrderbookResponse, s as CurrencyType, t as PaymentMethodCatalog, T as TxOverrides } from './vaultUtils-Bi2uldoa.mjs';
2
- export { E as ActionCallback, af as ApiDeposit, am as ApiIntentStatus, aZ as AttestationServiceSellerCredentialProbeResponse, aY as AttestationServiceSellerVerifyResponse, y as AuthorizationTokenProvider, cx as BatchResult, U as BestByPlatformResponseObject, a_ as BuyerTeePaymentParams, a$ as BuyerTeePaymentProofInput, b0 as BuyerTeeSessionMaterial, w as CancelIntentMethodParams, O as CancelIntentParams, aF as CashAppCredentialUploadInput, aw as CashAppSessionMaterial, b7 as ConfirmPayPalForwardingRequest, J as CreateDepositConversionRate, H as CreateDepositParams, b1 as CuratorSellerCredentialStatusResponse, b2 as CuratorSellerVerifyResponse, c0 as Currency, c7 as CurrencyData, cw as DelegationDepositTarget, cu as DelegationRoute, cv as DelegationState, ci as Deposit, ck as DepositCurrency, bh as DepositIntentStatistics, ai as DepositStatus, ag as DepositVerifier, ah as DepositVerifierCurrency, be as DepositVerifierData, ch as DepositView, ab as FiatResponse, F as FulfillIntentMethodParams, M as FulfillIntentParams, X as GetBestByPlatformResponse, Y as GetBestByPlatformResponseObject, aj as GetDepositByIdRequest, ak as GetDepositByIdResponse, ar as GetIntentByHashRequest, as as GetIntentByHashResponse, ap as GetIntentsByDepositRequest, aq as GetIntentsByDepositResponse, a1 as GetNearbyQuote, a2 as GetNearbySuggestions, an as GetOwnerIntentsRequest, ao as GetOwnerIntentsResponse, _ as GetPlatformQuote, a3 as GetQuoteResponse, a4 as GetQuoteResponseObject, a5 as GetQuoteSingleResponse, b6 as GetSellerCredentialStatusParams, bo as IndexerClient, bW as IndexerDeploymentEnv, bu as IndexerDeposit, bL as IndexerDepositDailySnapshot, bN as IndexerDepositFilter, bK as IndexerDepositFundActivity, bM as IndexerDepositFundActivityType, bQ as IndexerDepositOrderDirection, bP as IndexerDepositOrderField, bO as IndexerDepositPagination, bx as IndexerDepositPaymentMethod, bq as IndexerDepositService, bZ as IndexerFulfillmentAndPaymentResponse, bX as IndexerFulfillmentRecord, bv as IndexerIntentFulfilled, bw as IndexerIntentFulfillmentAmounts, bz as IndexerIntentStatus, bD as IndexerManagerAggregateStats, bF as IndexerManagerDailySnapshot, bE as IndexerManagerStats, bI as IndexerManualRateUpdate, by as IndexerMethodCurrency, bJ as IndexerOracleConfigUpdate, bY as IndexerPaymentVerifiedRecord, bA as IndexerRateManager, bC as IndexerRateManagerDelegation, bT as IndexerRateManagerDelegationPagination, bH as IndexerRateManagerDetail, bR as IndexerRateManagerFilter, bG as IndexerRateManagerListItem, bV as IndexerRateManagerOrderDirection, bU as IndexerRateManagerOrderField, bS as IndexerRateManagerPagination, bB as IndexerRateManagerRate, br as IndexerRateManagerService, al as Intent, cm as IntentView, ad as NearbyQuote, ae as NearbySuggestions, Z as OfframpClient, bd as OnchainCurrency, cn as OnchainIntent, bg as OrderStats, bn as OrderbookEntry, b_ as PAYMENT_PLATFORMS, aH as PayPalCredentialUploadInput, b8 as PayPalForwardingConfirmationErrorCode, aC as PayPalGoogleOAuthSellerCredentialUploadBody, aB as PayPalSessionMaterial, cj as PaymentMethodData, b$ as PaymentPlatformType, bl as PlatformLimit, $ as PlatformQuote, bm as PlatformRiskLevel, bf as PreparedTransaction, aa as QuoteFeesResponse, a9 as QuoteIntentResponse, a0 as QuoteRequest, a6 as QuoteResponse, a7 as QuoteResponseObject, a8 as QuoteSingleResponse, K as Range, cl as ReferralFee, at as RegisterPayeeDetailsRequest, au as RegisterPayeeDetailsResponse, b4 as RegisteredUploadSellerCredentialParams, N as ReleaseFundsToPayerParams, cc as RuntimeEnv, aW as SellerAttestationOutput, aJ as SellerCiphertextBundle, aO as SellerCredentialBundle, aP as SellerCredentialBundleUpload, aX as SellerCredentialProbeResponse, aR as SellerCredentialStatus, aQ as SellerCredentialStatusValue, aI as SellerCredentialUploadInputByPlatform, aV as SellerPaymentTypedDataValue, aN as SellerProbeInput, aK as SellerSignedCiphertextBundle, aT as SellerTypedDataField, aU as SellerTypedDataSpec, aM as SellerVerifyInput, aL as SellerVerifyIntentDetails, aS as SellerVerifyProxyBody, cz as SendBatchFn, cy as SendTransactionFn, v as SignalIntentMethodParams, L as SignalIntentParams, u as SignalIntentReferralFee, bi as TakerTier, bk as TakerTierLevel, bj as TakerTierStats, z as TimeoutConfig, ac as TokenResponse, bb as UploadGoogleOAuthSellerCredentialParams, b9 as UploadPayPalGoogleOAuthSellerCredentialParams, b5 as UploadSellerCredentialOptions, b3 as UploadSellerCredentialParams, ba as UploadVenmoGoogleOAuthSellerCredentialParams, aE as VenmoCredentialUploadInput, aD as VenmoGoogleOAuthSellerCredentialUploadBody, av as VenmoSessionMaterial, bc as VerifySellerPaymentParams, aG as WiseCredentialUploadInput, ay as WiseProfileInfo, aA as WiseProfileNotFound, az as WiseProfileSelectionRequired, ax as WiseSessionMaterial, W as WithdrawDepositParams, co as ZERO_RATE_MANAGER_ID, Z as Zkp2pClient, x as Zkp2pClientOptions, ct as classifyDelegationState, bs as compareEventCursorIdsByRecency, c1 as currencyInfo, bp as defaultIndexerEndpoint, cf as enrichPvDepositView, cg as enrichPvIntentView, bt as fetchIndexerFulfillmentAndPayment, c8 as getContracts, c4 as getCurrencyCodeFromHash, c3 as getCurrencyInfoFromCountryCode, c2 as getCurrencyInfoFromHash, cs as getDelegationRoute, cb as getGatingServiceAddress, ca as getPaymentMethodsCatalog, c9 as getRateManagerContracts, c5 as isSupportedCurrencyHash, cp as isZeroRateManagerId, c6 as mapConversionRatesToOnchainMinRate, cq as normalizeRateManagerId, cr as normalizeRegistry, cd as parseDepositView, ce as parseIntentView } from './vaultUtils-Bi2uldoa.mjs';
1
+ import { R as ReferrerFeeConfig, D as DepositWithRelations, I as IntentEntity, a as IdentityAttestationRequestBody, A as AttestationServiceIdentityResponse, S as SellerCredentialUploadInput, b as SellerPlatform, c as SellerCredentialAttestationRuntime, d as AttestationServiceSellerCredentialUploadResponse, B as BuyerTeeSessionMaterialEncryptionInput, C as ConfirmPayPalForwardingResponse, G as GoogleOAuthSellerCredentialPlatform, e as GoogleOAuthSellerCredentialUploadBodyByPlatform, f as CuratorSellerCredentialUploadResponse, Q as QuotesBestByPlatformRequest, g as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, h as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, i as PostDepositDetailsResponse, j as GetPayeeDetailsRequest, k as GetPayeeDetailsResponse, l as GetOwnerDepositsRequest, m as GetOwnerDepositsResponse, n as GetTakerTierRequest, o as GetTakerTierResponse, p as GetDepositBundleParams, q as ApiAdapterOptions, r as GetDepositBundleResponse, s as GetOrderbookParams, t as GetOrderbookResponse, u as CurrencyType, v as PaymentMethodCatalog, T as TxOverrides } from './vaultUtils-BZU2bc0T.mjs';
2
+ export { J as ActionCallback, ah as ApiDeposit, ao as ApiIntentStatus, a$ as AttestationServiceSellerCredentialProbeResponse, a_ as AttestationServiceSellerVerifyResponse, E as AuthorizationTokenProvider, cD as BatchResult, Y as BestByPlatformResponseObject, b0 as BuyerTeePaymentParams, b1 as BuyerTeePaymentProofInput, b2 as BuyerTeeSessionMaterial, y as CancelIntentMethodParams, X as CancelIntentParams, aH as CashAppCredentialUploadInput, ay as CashAppSessionMaterial, b9 as ConfirmPayPalForwardingRequest, L as CreateDepositConversionRate, K as CreateDepositParams, b3 as CuratorSellerCredentialStatusResponse, b4 as CuratorSellerVerifyResponse, c6 as Currency, cd as CurrencyData, cC as DelegationDepositTarget, cA as DelegationRoute, cB as DelegationState, co as Deposit, cq as DepositCurrency, bn as DepositIntentStatistics, ak as DepositStatus, ai as DepositVerifier, aj as DepositVerifierCurrency, bk as DepositVerifierData, cn as DepositView, ad as FiatResponse, F as FulfillIntentMethodParams, O as FulfillIntentParams, _ as GetBestByPlatformResponse, $ as GetBestByPlatformResponseObject, al as GetDepositByIdRequest, am as GetDepositByIdResponse, at as GetIntentByHashRequest, au as GetIntentByHashResponse, ar as GetIntentsByDepositRequest, as as GetIntentsByDepositResponse, a3 as GetNearbyQuote, a4 as GetNearbySuggestions, ap as GetOwnerIntentsRequest, aq as GetOwnerIntentsResponse, a0 as GetPlatformQuote, a5 as GetQuoteResponse, a6 as GetQuoteResponseObject, a7 as GetQuoteSingleResponse, b8 as GetSellerCredentialStatusParams, bf as IdentityAttestationActionType, bg as IdentityAttestationParams, bu as IndexerClient, c0 as IndexerDeploymentEnv, bA as IndexerDeposit, bR as IndexerDepositDailySnapshot, bT as IndexerDepositFilter, bQ as IndexerDepositFundActivity, bS as IndexerDepositFundActivityType, bW as IndexerDepositOrderDirection, bV as IndexerDepositOrderField, bU as IndexerDepositPagination, bD as IndexerDepositPaymentMethod, bw as IndexerDepositService, c3 as IndexerFulfillmentAndPaymentResponse, c1 as IndexerFulfillmentRecord, bB as IndexerIntentFulfilled, bC as IndexerIntentFulfillmentAmounts, bF as IndexerIntentStatus, bJ as IndexerManagerAggregateStats, bL as IndexerManagerDailySnapshot, bK as IndexerManagerStats, bO as IndexerManualRateUpdate, bE as IndexerMethodCurrency, bP as IndexerOracleConfigUpdate, c2 as IndexerPaymentVerifiedRecord, bG as IndexerRateManager, bI as IndexerRateManagerDelegation, bZ as IndexerRateManagerDelegationPagination, bN as IndexerRateManagerDetail, bX as IndexerRateManagerFilter, bM as IndexerRateManagerListItem, b$ as IndexerRateManagerOrderDirection, b_ as IndexerRateManagerOrderField, bY as IndexerRateManagerPagination, bH as IndexerRateManagerRate, bx as IndexerRateManagerService, an as Intent, cs as IntentView, bh as MakerIdentityAttestationRequestBody, bi as MakerIdentityPlatform, af as NearbyQuote, ag as NearbySuggestions, Z as OfframpClient, bj as OnchainCurrency, ct as OnchainIntent, bm as OrderStats, bt as OrderbookEntry, c4 as PAYMENT_PLATFORMS, aJ as PayPalCredentialUploadInput, ba as PayPalForwardingConfirmationErrorCode, aE as PayPalGoogleOAuthSellerCredentialUploadBody, aD as PayPalSessionMaterial, cp as PaymentMethodData, c5 as PaymentPlatformType, br as PlatformLimit, a1 as PlatformQuote, bs as PlatformRiskLevel, bl as PreparedTransaction, ac as QuoteFeesResponse, ab as QuoteIntentResponse, a2 as QuoteRequest, a8 as QuoteResponse, a9 as QuoteResponseObject, aa as QuoteSingleResponse, M as Range, cr as ReferralFee, av as RegisterPayeeDetailsRequest, aw as RegisterPayeeDetailsResponse, b6 as RegisteredUploadSellerCredentialParams, U as ReleaseFundsToPayerParams, ci as RuntimeEnv, aY as SellerAttestationOutput, aL as SellerCiphertextBundle, aQ as SellerCredentialBundle, aR as SellerCredentialBundleUpload, aZ as SellerCredentialProbeResponse, aT as SellerCredentialStatus, aS as SellerCredentialStatusValue, aK as SellerCredentialUploadInputByPlatform, aX as SellerPaymentTypedDataValue, aP as SellerProbeInput, aM as SellerSignedCiphertextBundle, aV as SellerTypedDataField, aW as SellerTypedDataSpec, aO as SellerVerifyInput, aN as SellerVerifyIntentDetails, aU as SellerVerifyProxyBody, cF as SendBatchFn, cE as SendTransactionFn, x as SignalIntentMethodParams, N as SignalIntentParams, w as SignalIntentReferralFee, bo as TakerTier, bq as TakerTierLevel, bp as TakerTierStats, H as TimeoutConfig, ae as TokenResponse, bd as UploadGoogleOAuthSellerCredentialParams, bb as UploadPayPalGoogleOAuthSellerCredentialParams, b7 as UploadSellerCredentialOptions, b5 as UploadSellerCredentialParams, bc as UploadVenmoGoogleOAuthSellerCredentialParams, aG as VenmoCredentialUploadInput, aF as VenmoGoogleOAuthSellerCredentialUploadBody, ax as VenmoSessionMaterial, be as VerifySellerPaymentParams, aI as WiseCredentialUploadInput, aA as WiseProfileInfo, aC as WiseProfileNotFound, aB as WiseProfileSelectionRequired, az as WiseSessionMaterial, W as WithdrawDepositParams, cu as ZERO_RATE_MANAGER_ID, Z as Zkp2pClient, z as Zkp2pClientOptions, cz as classifyDelegationState, by as compareEventCursorIdsByRecency, c7 as currencyInfo, bv as defaultIndexerEndpoint, cl as enrichPvDepositView, cm as enrichPvIntentView, bz as fetchIndexerFulfillmentAndPayment, ce as getContracts, ca as getCurrencyCodeFromHash, c9 as getCurrencyInfoFromCountryCode, c8 as getCurrencyInfoFromHash, cy as getDelegationRoute, ch as getGatingServiceAddress, cg as getPaymentMethodsCatalog, cf as getRateManagerContracts, cb as isSupportedCurrencyHash, cv as isZeroRateManagerId, cc as mapConversionRatesToOnchainMinRate, cw as normalizeRateManagerId, cx as normalizeRegistry, cj as parseDepositView, ck as parseIntentView } from './vaultUtils-BZU2bc0T.mjs';
3
3
  import { Address, Hash, Hex, WalletClient } from 'viem';
4
4
  import { Abi } from 'abitype';
5
+ export { IdentityActionType, IdentityActionTypeByPlatform, IdentityAttestationOutput, IdentityAttestationOutputFor, IdentityParamsByPlatform, IdentityPlatform } from '@zkp2p/zkp2p-attestation';
5
6
  import '@zkp2p/indexer-schema';
6
7
 
7
8
  interface EscrowRange {
@@ -190,6 +191,7 @@ interface ConvertLiquidityOptions {
190
191
  declare function convertDepositsForLiquidity(deposits: DepositWithRelations[], chainId: number, escrowAddress: string, options?: ConvertLiquidityOptions): EscrowDepositView[];
191
192
  declare function convertIndexerIntentsToEscrowViews(intents: IntentEntity[], depositViewsById: Map<string, EscrowDepositView>): EscrowIntentView[];
192
193
 
194
+ declare function apiRequestIdentityAttestation(payload: IdentityAttestationRequestBody, attestationServiceUrl: string, platform: string, actionType: string): Promise<AttestationServiceIdentityResponse>;
193
195
  declare function createEncryptedBuyerTeeSessionMaterial({ actionType, attestationRuntime, attestationServiceUrl, platform, sessionMaterial, timeoutMs, }: BuyerTeeSessionMaterialEncryptionInput): Promise<string>;
194
196
  declare function apiCreateSellerCredentialBundle(payload: SellerCredentialUploadInput, attestationServiceUrl: string, platform: SellerPlatform, timeoutMs?: number, attestationRuntime?: SellerCredentialAttestationRuntime): Promise<AttestationServiceSellerCredentialUploadResponse>;
195
197
 
@@ -717,4 +719,4 @@ declare class ContractError extends ZKP2PError {
717
719
  constructor(message: string, details?: unknown);
718
720
  }
719
721
 
720
- export { APIError, ApiAdapterOptions, AttestationServiceSellerCredentialUploadResponse, BASE_BUILDER_CODE, BestByPlatformResponse, BuyerTeeSessionMaterialEncryptionInput, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ConfirmPayPalForwardingResponse, ContractError, ContractRouter, type ContractRouterConfig, CuratorSellerCredentialUploadResponse, CurrencyType, DEFAULT_ORACLE_MAX_STALENESS_SECONDS, ErrorCode, type EscrowContractContext, type EscrowDepositView, type EscrowIntentView, GetDepositBundleParams, GetDepositBundleResponse, GetOrderbookParams, GetOrderbookResponse, GetOwnerDepositsRequest, GetOwnerDepositsResponse, GetPayeeDetailsRequest, GetPayeeDetailsResponse, GetTakerTierRequest, GetTakerTierResponse, GoogleOAuthSellerCredentialPlatform, GoogleOAuthSellerCredentialUploadBodyByPlatform, DepositWithRelations as IndexerDepositWithRelations, IntentEntity as IndexerIntent, type LogLevel, type MulticallClient, NetworkError, type OracleAdapterOverrides, type OracleKind, type OrchestratorContractContext, PEER_EXTENSION_CHROME_URL, PLATFORM_METADATA, PYTH_CONTRACT_BASE, PYTH_ORACLE_ADAPTER, PYTH_ORACLE_FEEDS, PaymentMethodCatalog, type PeerConnectionStatus, type PeerExtensionApi, type PeerExtensionOnrampParams, type PeerExtensionSdk, type PeerExtensionSdkOptions, type PeerExtensionState, type PeerExtensionWindow, type PeerOnrampPreparedTransactionCallback, type PeerOnrampPreparedTransactionResult, PostDepositDetailsRequest, PostDepositDetailsResponse, type PythFeedConfig, QuotesBestByPlatformRequest, ReferrerFeeConfig, SPREAD_ORACLE_FEEDS, SUPPORTED_CHAIN_IDS, SellerCredentialAttestationRuntime, SellerCredentialUploadInput, SellerPlatform, type SpreadOracleConfig, type SpreadOracleFeedConfig, type SupportedChainId, TOKEN_METADATA, TxOverrides, ValidatePayeeDetailsRequest, ValidatePayeeDetailsResponse, ValidationError, ZKP2PError, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, apiConfirmPayPalForwarding, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuotesBestByPlatform, apiGetTakerTier, apiPostDepositDetails, apiUploadGoogleOAuthSellerCredential, apiValidatePayeeDetails, appendAttributionToCalldata, asciiToBytes32, assertValidReferrerFeeConfig, convertDepositsForLiquidity, convertIndexerDepositToEscrowView, convertIndexerIntentsToEscrowViews, createCompositeDepositId, createEncryptedBuyerTeeSessionMaterial, createPeerExtensionSdk, encodePythAdapterConfig, encodeSpreadOracleAdapterConfig, encodeWithAttribution, ensureBytes32, getAttributionDataSuffix, getPeerExtensionState, getSpreadOracleConfig, isPeerExtensionAvailable, isValidReferrerFeeBps, isValidReferrerFeeRecipient, logger, openPeerExtensionInstallPage, parseReferrerFeeConfig, peerExtensionSdk, referrerFeeConfigToPreciseUnits, resolveFiatCurrencyBytes32, resolvePaymentMethodHash, resolvePaymentMethodHashFromCatalog, resolvePaymentMethodNameFromHash, sendTransactionWithAttribution, setLogLevel, validateOracleFeedsOnChain };
722
+ export { APIError, ApiAdapterOptions, AttestationServiceIdentityResponse, AttestationServiceSellerCredentialUploadResponse, BASE_BUILDER_CODE, BestByPlatformResponse, BuyerTeeSessionMaterialEncryptionInput, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ConfirmPayPalForwardingResponse, ContractError, ContractRouter, type ContractRouterConfig, CuratorSellerCredentialUploadResponse, CurrencyType, DEFAULT_ORACLE_MAX_STALENESS_SECONDS, ErrorCode, type EscrowContractContext, type EscrowDepositView, type EscrowIntentView, GetDepositBundleParams, GetDepositBundleResponse, GetOrderbookParams, GetOrderbookResponse, GetOwnerDepositsRequest, GetOwnerDepositsResponse, GetPayeeDetailsRequest, GetPayeeDetailsResponse, GetTakerTierRequest, GetTakerTierResponse, GoogleOAuthSellerCredentialPlatform, GoogleOAuthSellerCredentialUploadBodyByPlatform, IdentityAttestationRequestBody, DepositWithRelations as IndexerDepositWithRelations, IntentEntity as IndexerIntent, type LogLevel, type MulticallClient, NetworkError, type OracleAdapterOverrides, type OracleKind, type OrchestratorContractContext, PEER_EXTENSION_CHROME_URL, PLATFORM_METADATA, PYTH_CONTRACT_BASE, PYTH_ORACLE_ADAPTER, PYTH_ORACLE_FEEDS, PaymentMethodCatalog, type PeerConnectionStatus, type PeerExtensionApi, type PeerExtensionOnrampParams, type PeerExtensionSdk, type PeerExtensionSdkOptions, type PeerExtensionState, type PeerExtensionWindow, type PeerOnrampPreparedTransactionCallback, type PeerOnrampPreparedTransactionResult, PostDepositDetailsRequest, PostDepositDetailsResponse, type PythFeedConfig, QuotesBestByPlatformRequest, ReferrerFeeConfig, SPREAD_ORACLE_FEEDS, SUPPORTED_CHAIN_IDS, SellerCredentialAttestationRuntime, SellerCredentialUploadInput, SellerPlatform, type SpreadOracleConfig, type SpreadOracleFeedConfig, type SupportedChainId, TOKEN_METADATA, TxOverrides, ValidatePayeeDetailsRequest, ValidatePayeeDetailsResponse, ValidationError, ZKP2PError, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, apiConfirmPayPalForwarding, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuotesBestByPlatform, apiGetTakerTier, apiPostDepositDetails, apiRequestIdentityAttestation, apiUploadGoogleOAuthSellerCredential, apiValidatePayeeDetails, appendAttributionToCalldata, asciiToBytes32, assertValidReferrerFeeConfig, convertDepositsForLiquidity, convertIndexerDepositToEscrowView, convertIndexerIntentsToEscrowViews, createCompositeDepositId, createEncryptedBuyerTeeSessionMaterial, createPeerExtensionSdk, encodePythAdapterConfig, encodeSpreadOracleAdapterConfig, encodeWithAttribution, ensureBytes32, getAttributionDataSuffix, getPeerExtensionState, getSpreadOracleConfig, isPeerExtensionAvailable, isValidReferrerFeeBps, isValidReferrerFeeRecipient, logger, openPeerExtensionInstallPage, parseReferrerFeeConfig, peerExtensionSdk, referrerFeeConfigToPreciseUnits, resolveFiatCurrencyBytes32, resolvePaymentMethodHash, resolvePaymentMethodHashFromCatalog, resolvePaymentMethodNameFromHash, sendTransactionWithAttribution, setLogLevel, validateOracleFeedsOnChain };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
- import { R as ReferrerFeeConfig, D as DepositWithRelations, I as IntentEntity, S as SellerCredentialUploadInput, a as SellerPlatform, b as SellerCredentialAttestationRuntime, A as AttestationServiceSellerCredentialUploadResponse, B as BuyerTeeSessionMaterialEncryptionInput, C as ConfirmPayPalForwardingResponse, G as GoogleOAuthSellerCredentialPlatform, c as GoogleOAuthSellerCredentialUploadBodyByPlatform, d as CuratorSellerCredentialUploadResponse, Q as QuotesBestByPlatformRequest, e as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, f as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, g as PostDepositDetailsResponse, h as GetPayeeDetailsRequest, i as GetPayeeDetailsResponse, j as GetOwnerDepositsRequest, k as GetOwnerDepositsResponse, l as GetTakerTierRequest, m as GetTakerTierResponse, n as GetDepositBundleParams, o as ApiAdapterOptions, p as GetDepositBundleResponse, q as GetOrderbookParams, r as GetOrderbookResponse, s as CurrencyType, t as PaymentMethodCatalog, T as TxOverrides } from './vaultUtils-Bi2uldoa.js';
2
- export { E as ActionCallback, af as ApiDeposit, am as ApiIntentStatus, aZ as AttestationServiceSellerCredentialProbeResponse, aY as AttestationServiceSellerVerifyResponse, y as AuthorizationTokenProvider, cx as BatchResult, U as BestByPlatformResponseObject, a_ as BuyerTeePaymentParams, a$ as BuyerTeePaymentProofInput, b0 as BuyerTeeSessionMaterial, w as CancelIntentMethodParams, O as CancelIntentParams, aF as CashAppCredentialUploadInput, aw as CashAppSessionMaterial, b7 as ConfirmPayPalForwardingRequest, J as CreateDepositConversionRate, H as CreateDepositParams, b1 as CuratorSellerCredentialStatusResponse, b2 as CuratorSellerVerifyResponse, c0 as Currency, c7 as CurrencyData, cw as DelegationDepositTarget, cu as DelegationRoute, cv as DelegationState, ci as Deposit, ck as DepositCurrency, bh as DepositIntentStatistics, ai as DepositStatus, ag as DepositVerifier, ah as DepositVerifierCurrency, be as DepositVerifierData, ch as DepositView, ab as FiatResponse, F as FulfillIntentMethodParams, M as FulfillIntentParams, X as GetBestByPlatformResponse, Y as GetBestByPlatformResponseObject, aj as GetDepositByIdRequest, ak as GetDepositByIdResponse, ar as GetIntentByHashRequest, as as GetIntentByHashResponse, ap as GetIntentsByDepositRequest, aq as GetIntentsByDepositResponse, a1 as GetNearbyQuote, a2 as GetNearbySuggestions, an as GetOwnerIntentsRequest, ao as GetOwnerIntentsResponse, _ as GetPlatformQuote, a3 as GetQuoteResponse, a4 as GetQuoteResponseObject, a5 as GetQuoteSingleResponse, b6 as GetSellerCredentialStatusParams, bo as IndexerClient, bW as IndexerDeploymentEnv, bu as IndexerDeposit, bL as IndexerDepositDailySnapshot, bN as IndexerDepositFilter, bK as IndexerDepositFundActivity, bM as IndexerDepositFundActivityType, bQ as IndexerDepositOrderDirection, bP as IndexerDepositOrderField, bO as IndexerDepositPagination, bx as IndexerDepositPaymentMethod, bq as IndexerDepositService, bZ as IndexerFulfillmentAndPaymentResponse, bX as IndexerFulfillmentRecord, bv as IndexerIntentFulfilled, bw as IndexerIntentFulfillmentAmounts, bz as IndexerIntentStatus, bD as IndexerManagerAggregateStats, bF as IndexerManagerDailySnapshot, bE as IndexerManagerStats, bI as IndexerManualRateUpdate, by as IndexerMethodCurrency, bJ as IndexerOracleConfigUpdate, bY as IndexerPaymentVerifiedRecord, bA as IndexerRateManager, bC as IndexerRateManagerDelegation, bT as IndexerRateManagerDelegationPagination, bH as IndexerRateManagerDetail, bR as IndexerRateManagerFilter, bG as IndexerRateManagerListItem, bV as IndexerRateManagerOrderDirection, bU as IndexerRateManagerOrderField, bS as IndexerRateManagerPagination, bB as IndexerRateManagerRate, br as IndexerRateManagerService, al as Intent, cm as IntentView, ad as NearbyQuote, ae as NearbySuggestions, Z as OfframpClient, bd as OnchainCurrency, cn as OnchainIntent, bg as OrderStats, bn as OrderbookEntry, b_ as PAYMENT_PLATFORMS, aH as PayPalCredentialUploadInput, b8 as PayPalForwardingConfirmationErrorCode, aC as PayPalGoogleOAuthSellerCredentialUploadBody, aB as PayPalSessionMaterial, cj as PaymentMethodData, b$ as PaymentPlatformType, bl as PlatformLimit, $ as PlatformQuote, bm as PlatformRiskLevel, bf as PreparedTransaction, aa as QuoteFeesResponse, a9 as QuoteIntentResponse, a0 as QuoteRequest, a6 as QuoteResponse, a7 as QuoteResponseObject, a8 as QuoteSingleResponse, K as Range, cl as ReferralFee, at as RegisterPayeeDetailsRequest, au as RegisterPayeeDetailsResponse, b4 as RegisteredUploadSellerCredentialParams, N as ReleaseFundsToPayerParams, cc as RuntimeEnv, aW as SellerAttestationOutput, aJ as SellerCiphertextBundle, aO as SellerCredentialBundle, aP as SellerCredentialBundleUpload, aX as SellerCredentialProbeResponse, aR as SellerCredentialStatus, aQ as SellerCredentialStatusValue, aI as SellerCredentialUploadInputByPlatform, aV as SellerPaymentTypedDataValue, aN as SellerProbeInput, aK as SellerSignedCiphertextBundle, aT as SellerTypedDataField, aU as SellerTypedDataSpec, aM as SellerVerifyInput, aL as SellerVerifyIntentDetails, aS as SellerVerifyProxyBody, cz as SendBatchFn, cy as SendTransactionFn, v as SignalIntentMethodParams, L as SignalIntentParams, u as SignalIntentReferralFee, bi as TakerTier, bk as TakerTierLevel, bj as TakerTierStats, z as TimeoutConfig, ac as TokenResponse, bb as UploadGoogleOAuthSellerCredentialParams, b9 as UploadPayPalGoogleOAuthSellerCredentialParams, b5 as UploadSellerCredentialOptions, b3 as UploadSellerCredentialParams, ba as UploadVenmoGoogleOAuthSellerCredentialParams, aE as VenmoCredentialUploadInput, aD as VenmoGoogleOAuthSellerCredentialUploadBody, av as VenmoSessionMaterial, bc as VerifySellerPaymentParams, aG as WiseCredentialUploadInput, ay as WiseProfileInfo, aA as WiseProfileNotFound, az as WiseProfileSelectionRequired, ax as WiseSessionMaterial, W as WithdrawDepositParams, co as ZERO_RATE_MANAGER_ID, Z as Zkp2pClient, x as Zkp2pClientOptions, ct as classifyDelegationState, bs as compareEventCursorIdsByRecency, c1 as currencyInfo, bp as defaultIndexerEndpoint, cf as enrichPvDepositView, cg as enrichPvIntentView, bt as fetchIndexerFulfillmentAndPayment, c8 as getContracts, c4 as getCurrencyCodeFromHash, c3 as getCurrencyInfoFromCountryCode, c2 as getCurrencyInfoFromHash, cs as getDelegationRoute, cb as getGatingServiceAddress, ca as getPaymentMethodsCatalog, c9 as getRateManagerContracts, c5 as isSupportedCurrencyHash, cp as isZeroRateManagerId, c6 as mapConversionRatesToOnchainMinRate, cq as normalizeRateManagerId, cr as normalizeRegistry, cd as parseDepositView, ce as parseIntentView } from './vaultUtils-Bi2uldoa.js';
1
+ import { R as ReferrerFeeConfig, D as DepositWithRelations, I as IntentEntity, a as IdentityAttestationRequestBody, A as AttestationServiceIdentityResponse, S as SellerCredentialUploadInput, b as SellerPlatform, c as SellerCredentialAttestationRuntime, d as AttestationServiceSellerCredentialUploadResponse, B as BuyerTeeSessionMaterialEncryptionInput, C as ConfirmPayPalForwardingResponse, G as GoogleOAuthSellerCredentialPlatform, e as GoogleOAuthSellerCredentialUploadBodyByPlatform, f as CuratorSellerCredentialUploadResponse, Q as QuotesBestByPlatformRequest, g as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, h as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, i as PostDepositDetailsResponse, j as GetPayeeDetailsRequest, k as GetPayeeDetailsResponse, l as GetOwnerDepositsRequest, m as GetOwnerDepositsResponse, n as GetTakerTierRequest, o as GetTakerTierResponse, p as GetDepositBundleParams, q as ApiAdapterOptions, r as GetDepositBundleResponse, s as GetOrderbookParams, t as GetOrderbookResponse, u as CurrencyType, v as PaymentMethodCatalog, T as TxOverrides } from './vaultUtils-BZU2bc0T.js';
2
+ export { J as ActionCallback, ah as ApiDeposit, ao as ApiIntentStatus, a$ as AttestationServiceSellerCredentialProbeResponse, a_ as AttestationServiceSellerVerifyResponse, E as AuthorizationTokenProvider, cD as BatchResult, Y as BestByPlatformResponseObject, b0 as BuyerTeePaymentParams, b1 as BuyerTeePaymentProofInput, b2 as BuyerTeeSessionMaterial, y as CancelIntentMethodParams, X as CancelIntentParams, aH as CashAppCredentialUploadInput, ay as CashAppSessionMaterial, b9 as ConfirmPayPalForwardingRequest, L as CreateDepositConversionRate, K as CreateDepositParams, b3 as CuratorSellerCredentialStatusResponse, b4 as CuratorSellerVerifyResponse, c6 as Currency, cd as CurrencyData, cC as DelegationDepositTarget, cA as DelegationRoute, cB as DelegationState, co as Deposit, cq as DepositCurrency, bn as DepositIntentStatistics, ak as DepositStatus, ai as DepositVerifier, aj as DepositVerifierCurrency, bk as DepositVerifierData, cn as DepositView, ad as FiatResponse, F as FulfillIntentMethodParams, O as FulfillIntentParams, _ as GetBestByPlatformResponse, $ as GetBestByPlatformResponseObject, al as GetDepositByIdRequest, am as GetDepositByIdResponse, at as GetIntentByHashRequest, au as GetIntentByHashResponse, ar as GetIntentsByDepositRequest, as as GetIntentsByDepositResponse, a3 as GetNearbyQuote, a4 as GetNearbySuggestions, ap as GetOwnerIntentsRequest, aq as GetOwnerIntentsResponse, a0 as GetPlatformQuote, a5 as GetQuoteResponse, a6 as GetQuoteResponseObject, a7 as GetQuoteSingleResponse, b8 as GetSellerCredentialStatusParams, bf as IdentityAttestationActionType, bg as IdentityAttestationParams, bu as IndexerClient, c0 as IndexerDeploymentEnv, bA as IndexerDeposit, bR as IndexerDepositDailySnapshot, bT as IndexerDepositFilter, bQ as IndexerDepositFundActivity, bS as IndexerDepositFundActivityType, bW as IndexerDepositOrderDirection, bV as IndexerDepositOrderField, bU as IndexerDepositPagination, bD as IndexerDepositPaymentMethod, bw as IndexerDepositService, c3 as IndexerFulfillmentAndPaymentResponse, c1 as IndexerFulfillmentRecord, bB as IndexerIntentFulfilled, bC as IndexerIntentFulfillmentAmounts, bF as IndexerIntentStatus, bJ as IndexerManagerAggregateStats, bL as IndexerManagerDailySnapshot, bK as IndexerManagerStats, bO as IndexerManualRateUpdate, bE as IndexerMethodCurrency, bP as IndexerOracleConfigUpdate, c2 as IndexerPaymentVerifiedRecord, bG as IndexerRateManager, bI as IndexerRateManagerDelegation, bZ as IndexerRateManagerDelegationPagination, bN as IndexerRateManagerDetail, bX as IndexerRateManagerFilter, bM as IndexerRateManagerListItem, b$ as IndexerRateManagerOrderDirection, b_ as IndexerRateManagerOrderField, bY as IndexerRateManagerPagination, bH as IndexerRateManagerRate, bx as IndexerRateManagerService, an as Intent, cs as IntentView, bh as MakerIdentityAttestationRequestBody, bi as MakerIdentityPlatform, af as NearbyQuote, ag as NearbySuggestions, Z as OfframpClient, bj as OnchainCurrency, ct as OnchainIntent, bm as OrderStats, bt as OrderbookEntry, c4 as PAYMENT_PLATFORMS, aJ as PayPalCredentialUploadInput, ba as PayPalForwardingConfirmationErrorCode, aE as PayPalGoogleOAuthSellerCredentialUploadBody, aD as PayPalSessionMaterial, cp as PaymentMethodData, c5 as PaymentPlatformType, br as PlatformLimit, a1 as PlatformQuote, bs as PlatformRiskLevel, bl as PreparedTransaction, ac as QuoteFeesResponse, ab as QuoteIntentResponse, a2 as QuoteRequest, a8 as QuoteResponse, a9 as QuoteResponseObject, aa as QuoteSingleResponse, M as Range, cr as ReferralFee, av as RegisterPayeeDetailsRequest, aw as RegisterPayeeDetailsResponse, b6 as RegisteredUploadSellerCredentialParams, U as ReleaseFundsToPayerParams, ci as RuntimeEnv, aY as SellerAttestationOutput, aL as SellerCiphertextBundle, aQ as SellerCredentialBundle, aR as SellerCredentialBundleUpload, aZ as SellerCredentialProbeResponse, aT as SellerCredentialStatus, aS as SellerCredentialStatusValue, aK as SellerCredentialUploadInputByPlatform, aX as SellerPaymentTypedDataValue, aP as SellerProbeInput, aM as SellerSignedCiphertextBundle, aV as SellerTypedDataField, aW as SellerTypedDataSpec, aO as SellerVerifyInput, aN as SellerVerifyIntentDetails, aU as SellerVerifyProxyBody, cF as SendBatchFn, cE as SendTransactionFn, x as SignalIntentMethodParams, N as SignalIntentParams, w as SignalIntentReferralFee, bo as TakerTier, bq as TakerTierLevel, bp as TakerTierStats, H as TimeoutConfig, ae as TokenResponse, bd as UploadGoogleOAuthSellerCredentialParams, bb as UploadPayPalGoogleOAuthSellerCredentialParams, b7 as UploadSellerCredentialOptions, b5 as UploadSellerCredentialParams, bc as UploadVenmoGoogleOAuthSellerCredentialParams, aG as VenmoCredentialUploadInput, aF as VenmoGoogleOAuthSellerCredentialUploadBody, ax as VenmoSessionMaterial, be as VerifySellerPaymentParams, aI as WiseCredentialUploadInput, aA as WiseProfileInfo, aC as WiseProfileNotFound, aB as WiseProfileSelectionRequired, az as WiseSessionMaterial, W as WithdrawDepositParams, cu as ZERO_RATE_MANAGER_ID, Z as Zkp2pClient, z as Zkp2pClientOptions, cz as classifyDelegationState, by as compareEventCursorIdsByRecency, c7 as currencyInfo, bv as defaultIndexerEndpoint, cl as enrichPvDepositView, cm as enrichPvIntentView, bz as fetchIndexerFulfillmentAndPayment, ce as getContracts, ca as getCurrencyCodeFromHash, c9 as getCurrencyInfoFromCountryCode, c8 as getCurrencyInfoFromHash, cy as getDelegationRoute, ch as getGatingServiceAddress, cg as getPaymentMethodsCatalog, cf as getRateManagerContracts, cb as isSupportedCurrencyHash, cv as isZeroRateManagerId, cc as mapConversionRatesToOnchainMinRate, cw as normalizeRateManagerId, cx as normalizeRegistry, cj as parseDepositView, ck as parseIntentView } from './vaultUtils-BZU2bc0T.js';
3
3
  import { Address, Hash, Hex, WalletClient } from 'viem';
4
4
  import { Abi } from 'abitype';
5
+ export { IdentityActionType, IdentityActionTypeByPlatform, IdentityAttestationOutput, IdentityAttestationOutputFor, IdentityParamsByPlatform, IdentityPlatform } from '@zkp2p/zkp2p-attestation';
5
6
  import '@zkp2p/indexer-schema';
6
7
 
7
8
  interface EscrowRange {
@@ -190,6 +191,7 @@ interface ConvertLiquidityOptions {
190
191
  declare function convertDepositsForLiquidity(deposits: DepositWithRelations[], chainId: number, escrowAddress: string, options?: ConvertLiquidityOptions): EscrowDepositView[];
191
192
  declare function convertIndexerIntentsToEscrowViews(intents: IntentEntity[], depositViewsById: Map<string, EscrowDepositView>): EscrowIntentView[];
192
193
 
194
+ declare function apiRequestIdentityAttestation(payload: IdentityAttestationRequestBody, attestationServiceUrl: string, platform: string, actionType: string): Promise<AttestationServiceIdentityResponse>;
193
195
  declare function createEncryptedBuyerTeeSessionMaterial({ actionType, attestationRuntime, attestationServiceUrl, platform, sessionMaterial, timeoutMs, }: BuyerTeeSessionMaterialEncryptionInput): Promise<string>;
194
196
  declare function apiCreateSellerCredentialBundle(payload: SellerCredentialUploadInput, attestationServiceUrl: string, platform: SellerPlatform, timeoutMs?: number, attestationRuntime?: SellerCredentialAttestationRuntime): Promise<AttestationServiceSellerCredentialUploadResponse>;
195
197
 
@@ -717,4 +719,4 @@ declare class ContractError extends ZKP2PError {
717
719
  constructor(message: string, details?: unknown);
718
720
  }
719
721
 
720
- export { APIError, ApiAdapterOptions, AttestationServiceSellerCredentialUploadResponse, BASE_BUILDER_CODE, BestByPlatformResponse, BuyerTeeSessionMaterialEncryptionInput, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ConfirmPayPalForwardingResponse, ContractError, ContractRouter, type ContractRouterConfig, CuratorSellerCredentialUploadResponse, CurrencyType, DEFAULT_ORACLE_MAX_STALENESS_SECONDS, ErrorCode, type EscrowContractContext, type EscrowDepositView, type EscrowIntentView, GetDepositBundleParams, GetDepositBundleResponse, GetOrderbookParams, GetOrderbookResponse, GetOwnerDepositsRequest, GetOwnerDepositsResponse, GetPayeeDetailsRequest, GetPayeeDetailsResponse, GetTakerTierRequest, GetTakerTierResponse, GoogleOAuthSellerCredentialPlatform, GoogleOAuthSellerCredentialUploadBodyByPlatform, DepositWithRelations as IndexerDepositWithRelations, IntentEntity as IndexerIntent, type LogLevel, type MulticallClient, NetworkError, type OracleAdapterOverrides, type OracleKind, type OrchestratorContractContext, PEER_EXTENSION_CHROME_URL, PLATFORM_METADATA, PYTH_CONTRACT_BASE, PYTH_ORACLE_ADAPTER, PYTH_ORACLE_FEEDS, PaymentMethodCatalog, type PeerConnectionStatus, type PeerExtensionApi, type PeerExtensionOnrampParams, type PeerExtensionSdk, type PeerExtensionSdkOptions, type PeerExtensionState, type PeerExtensionWindow, type PeerOnrampPreparedTransactionCallback, type PeerOnrampPreparedTransactionResult, PostDepositDetailsRequest, PostDepositDetailsResponse, type PythFeedConfig, QuotesBestByPlatformRequest, ReferrerFeeConfig, SPREAD_ORACLE_FEEDS, SUPPORTED_CHAIN_IDS, SellerCredentialAttestationRuntime, SellerCredentialUploadInput, SellerPlatform, type SpreadOracleConfig, type SpreadOracleFeedConfig, type SupportedChainId, TOKEN_METADATA, TxOverrides, ValidatePayeeDetailsRequest, ValidatePayeeDetailsResponse, ValidationError, ZKP2PError, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, apiConfirmPayPalForwarding, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuotesBestByPlatform, apiGetTakerTier, apiPostDepositDetails, apiUploadGoogleOAuthSellerCredential, apiValidatePayeeDetails, appendAttributionToCalldata, asciiToBytes32, assertValidReferrerFeeConfig, convertDepositsForLiquidity, convertIndexerDepositToEscrowView, convertIndexerIntentsToEscrowViews, createCompositeDepositId, createEncryptedBuyerTeeSessionMaterial, createPeerExtensionSdk, encodePythAdapterConfig, encodeSpreadOracleAdapterConfig, encodeWithAttribution, ensureBytes32, getAttributionDataSuffix, getPeerExtensionState, getSpreadOracleConfig, isPeerExtensionAvailable, isValidReferrerFeeBps, isValidReferrerFeeRecipient, logger, openPeerExtensionInstallPage, parseReferrerFeeConfig, peerExtensionSdk, referrerFeeConfigToPreciseUnits, resolveFiatCurrencyBytes32, resolvePaymentMethodHash, resolvePaymentMethodHashFromCatalog, resolvePaymentMethodNameFromHash, sendTransactionWithAttribution, setLogLevel, validateOracleFeedsOnChain };
722
+ export { APIError, ApiAdapterOptions, AttestationServiceIdentityResponse, AttestationServiceSellerCredentialUploadResponse, BASE_BUILDER_CODE, BestByPlatformResponse, BuyerTeeSessionMaterialEncryptionInput, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ConfirmPayPalForwardingResponse, ContractError, ContractRouter, type ContractRouterConfig, CuratorSellerCredentialUploadResponse, CurrencyType, DEFAULT_ORACLE_MAX_STALENESS_SECONDS, ErrorCode, type EscrowContractContext, type EscrowDepositView, type EscrowIntentView, GetDepositBundleParams, GetDepositBundleResponse, GetOrderbookParams, GetOrderbookResponse, GetOwnerDepositsRequest, GetOwnerDepositsResponse, GetPayeeDetailsRequest, GetPayeeDetailsResponse, GetTakerTierRequest, GetTakerTierResponse, GoogleOAuthSellerCredentialPlatform, GoogleOAuthSellerCredentialUploadBodyByPlatform, IdentityAttestationRequestBody, DepositWithRelations as IndexerDepositWithRelations, IntentEntity as IndexerIntent, type LogLevel, type MulticallClient, NetworkError, type OracleAdapterOverrides, type OracleKind, type OrchestratorContractContext, PEER_EXTENSION_CHROME_URL, PLATFORM_METADATA, PYTH_CONTRACT_BASE, PYTH_ORACLE_ADAPTER, PYTH_ORACLE_FEEDS, PaymentMethodCatalog, type PeerConnectionStatus, type PeerExtensionApi, type PeerExtensionOnrampParams, type PeerExtensionSdk, type PeerExtensionSdkOptions, type PeerExtensionState, type PeerExtensionWindow, type PeerOnrampPreparedTransactionCallback, type PeerOnrampPreparedTransactionResult, PostDepositDetailsRequest, PostDepositDetailsResponse, type PythFeedConfig, QuotesBestByPlatformRequest, ReferrerFeeConfig, SPREAD_ORACLE_FEEDS, SUPPORTED_CHAIN_IDS, SellerCredentialAttestationRuntime, SellerCredentialUploadInput, SellerPlatform, type SpreadOracleConfig, type SpreadOracleFeedConfig, type SupportedChainId, TOKEN_METADATA, TxOverrides, ValidatePayeeDetailsRequest, ValidatePayeeDetailsResponse, ValidationError, ZKP2PError, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, apiConfirmPayPalForwarding, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuotesBestByPlatform, apiGetTakerTier, apiPostDepositDetails, apiRequestIdentityAttestation, apiUploadGoogleOAuthSellerCredential, apiValidatePayeeDetails, appendAttributionToCalldata, asciiToBytes32, assertValidReferrerFeeConfig, convertDepositsForLiquidity, convertIndexerDepositToEscrowView, convertIndexerIntentsToEscrowViews, createCompositeDepositId, createEncryptedBuyerTeeSessionMaterial, createPeerExtensionSdk, encodePythAdapterConfig, encodeSpreadOracleAdapterConfig, encodeWithAttribution, ensureBytes32, getAttributionDataSuffix, getPeerExtensionState, getSpreadOracleConfig, isPeerExtensionAvailable, isValidReferrerFeeBps, isValidReferrerFeeRecipient, logger, openPeerExtensionInstallPage, parseReferrerFeeConfig, peerExtensionSdk, referrerFeeConfigToPreciseUnits, resolveFiatCurrencyBytes32, resolvePaymentMethodHash, resolvePaymentMethodHashFromCatalog, resolvePaymentMethodNameFromHash, sendTransactionWithAttribution, setLogLevel, validateOracleFeedsOnChain };
package/dist/index.mjs CHANGED
@@ -423,7 +423,7 @@ function normalizeOptionalString(value) {
423
423
  function normalizeBaseUrl(value, label) {
424
424
  const normalized = normalizeOptionalString(value)?.replace(/\/+$/u, "");
425
425
  if (!normalized) {
426
- throw new Error(`${label} is required for buyer TEE session encryption.`);
426
+ throw new Error(`${label} is required.`);
427
427
  }
428
428
  return normalized;
429
429
  }
@@ -516,6 +516,35 @@ async function apiVerifyBuyerTeePayment(payload, attestationServiceUrl, platform
516
516
  return res.json();
517
517
  });
518
518
  }
519
+ async function apiRequestIdentityAttestation(payload, attestationServiceUrl, platform, actionType) {
520
+ return withRetry(async () => {
521
+ let res;
522
+ try {
523
+ const endpoint = "/identity";
524
+ const baseUrl = normalizeBaseUrl(attestationServiceUrl, "Attestation Service URL");
525
+ res = await fetch(`${baseUrl}${endpoint}`, {
526
+ method: "POST",
527
+ headers: headers(),
528
+ body: JSON.stringify({
529
+ platform,
530
+ actionType,
531
+ encryptedSessionMaterial: payload.encryptedSessionMaterial,
532
+ params: payload.params
533
+ })
534
+ });
535
+ } catch (error) {
536
+ throw new NetworkError("Failed to connect to Attestation Service", {
537
+ endpoint: "/identity",
538
+ error
539
+ });
540
+ }
541
+ if (!res.ok) {
542
+ const errorText = await res.text();
543
+ throw parseAPIError(res, errorText);
544
+ }
545
+ return res.json();
546
+ });
547
+ }
519
548
  async function createEncryptedBuyerTeeSessionMaterial({
520
549
  actionType,
521
550
  attestationRuntime,
@@ -5496,11 +5525,11 @@ var ERC20_ABI = [
5496
5525
  ];
5497
5526
 
5498
5527
  // src/client/Zkp2pClient.ts
5499
- function isStringRecord(value) {
5528
+ function isObjectRecord(value) {
5500
5529
  if (!value || typeof value !== "object" || Array.isArray(value)) {
5501
5530
  return false;
5502
5531
  }
5503
- return Object.values(value).every((entry) => typeof entry === "string");
5532
+ return true;
5504
5533
  }
5505
5534
  function normalizeTelegramUsername(value) {
5506
5535
  if (typeof value !== "string") {
@@ -5537,7 +5566,7 @@ function normalizeQuotePayeeData(maker) {
5537
5566
  return {
5538
5567
  offchainId,
5539
5568
  telegramUsername: normalizeTelegramUsername(maker?.telegramUsername) ?? legacy?.telegramUsername ?? null,
5540
- metadata: isStringRecord(maker?.metadata) ? maker.metadata : legacy?.metadata ?? null
5569
+ metadata: isObjectRecord(maker?.metadata) ? maker.metadata : legacy?.metadata ?? null
5541
5570
  };
5542
5571
  }
5543
5572
  function normalizePayeeDataInputItem(raw) {
@@ -8513,6 +8542,6 @@ var logger = {
8513
8542
  }
8514
8543
  };
8515
8544
 
8516
- export { BASE_BUILDER_CODE, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ContractRouter, DEFAULT_ORACLE_MAX_STALENESS_SECONDS, IndexerClient, IndexerDepositService, IndexerRateManagerService, Zkp2pClient as OfframpClient, PAYMENT_PLATFORMS, PEER_EXTENSION_CHROME_URL, PLATFORM_METADATA, PYTH_CONTRACT_BASE, PYTH_ORACLE_ADAPTER, PYTH_ORACLE_FEEDS, SPREAD_ORACLE_FEEDS, SUPPORTED_CHAIN_IDS, TOKEN_METADATA, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, Zkp2pClient, apiConfirmPayPalForwarding, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuotesBestByPlatform, apiGetTakerTier, apiPostDepositDetails, apiUploadGoogleOAuthSellerCredential, apiValidatePayeeDetails, appendAttributionToCalldata, assertValidReferrerFeeConfig, compareEventCursorIdsByRecency, convertDepositsForLiquidity, convertIndexerDepositToEscrowView, convertIndexerIntentsToEscrowViews, createCompositeDepositId, createEncryptedBuyerTeeSessionMaterial, createPeerExtensionSdk, defaultIndexerEndpoint, encodePythAdapterConfig, encodeSpreadOracleAdapterConfig, encodeWithAttribution, fetchFulfillmentAndPayment as fetchIndexerFulfillmentAndPayment, getAttributionDataSuffix, getPeerExtensionState, getSpreadOracleConfig, isPeerExtensionAvailable, isValidReferrerFeeBps, isValidReferrerFeeRecipient, logger, openPeerExtensionInstallPage, parseReferrerFeeConfig, peerExtensionSdk, referrerFeeConfigToPreciseUnits, sendTransactionWithAttribution, setLogLevel, validateOracleFeedsOnChain };
8545
+ export { BASE_BUILDER_CODE, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ContractRouter, DEFAULT_ORACLE_MAX_STALENESS_SECONDS, IndexerClient, IndexerDepositService, IndexerRateManagerService, Zkp2pClient as OfframpClient, PAYMENT_PLATFORMS, PEER_EXTENSION_CHROME_URL, PLATFORM_METADATA, PYTH_CONTRACT_BASE, PYTH_ORACLE_ADAPTER, PYTH_ORACLE_FEEDS, SPREAD_ORACLE_FEEDS, SUPPORTED_CHAIN_IDS, TOKEN_METADATA, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, Zkp2pClient, apiConfirmPayPalForwarding, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuotesBestByPlatform, apiGetTakerTier, apiPostDepositDetails, apiRequestIdentityAttestation, apiUploadGoogleOAuthSellerCredential, apiValidatePayeeDetails, appendAttributionToCalldata, assertValidReferrerFeeConfig, compareEventCursorIdsByRecency, convertDepositsForLiquidity, convertIndexerDepositToEscrowView, convertIndexerIntentsToEscrowViews, createCompositeDepositId, createEncryptedBuyerTeeSessionMaterial, createPeerExtensionSdk, defaultIndexerEndpoint, encodePythAdapterConfig, encodeSpreadOracleAdapterConfig, encodeWithAttribution, fetchFulfillmentAndPayment as fetchIndexerFulfillmentAndPayment, getAttributionDataSuffix, getPeerExtensionState, getSpreadOracleConfig, isPeerExtensionAvailable, isValidReferrerFeeBps, isValidReferrerFeeRecipient, logger, openPeerExtensionInstallPage, parseReferrerFeeConfig, peerExtensionSdk, referrerFeeConfigToPreciseUnits, sendTransactionWithAttribution, setLogLevel, validateOracleFeedsOnChain };
8517
8546
  //# sourceMappingURL=index.mjs.map
8518
8547
  //# sourceMappingURL=index.mjs.map