@zkp2p/sdk 0.4.1 → 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, Q as QuotesBestByPlatformRequest, c as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, d as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, e as PostDepositDetailsResponse, G as GetPayeeDetailsRequest, f as GetPayeeDetailsResponse, g as GetOwnerDepositsRequest, h as GetOwnerDepositsResponse, i as GetTakerTierRequest, j as GetTakerTierResponse, k as GetDepositBundleParams, l as ApiAdapterOptions, m as GetDepositBundleResponse, n as GetOrderbookParams, o as GetOrderbookResponse, p as CurrencyType, q as PaymentMethodCatalog, T as TxOverrides } from './vaultUtils-Dt7ZOITQ.mjs';
2
- export { x as ActionCallback, ac as ApiDeposit, aj as ApiIntentStatus, aU as AttestationServiceSellerCredentialProbeResponse, aT as AttestationServiceSellerVerifyResponse, v as AuthorizationTokenProvider, cq as BatchResult, M as BestByPlatformResponseObject, aV as BuyerTeePaymentParams, aW as BuyerTeePaymentProofInput, aX as BuyerTeeSessionMaterial, t as CancelIntentMethodParams, L as CancelIntentParams, aA as CashAppCredentialUploadInput, at as CashAppSessionMaterial, b3 as ConfirmPayPalForwardingRequest, z as CreateDepositConversionRate, y as CreateDepositParams, aZ as CuratorSellerCredentialStatusResponse, aY as CuratorSellerCredentialUploadResponse, a_ as CuratorSellerVerifyResponse, bV as Currency, c0 as CurrencyData, cp as DelegationDepositTarget, cn as DelegationRoute, co as DelegationState, cb as Deposit, cd as DepositCurrency, ba as DepositIntentStatistics, af as DepositStatus, ad as DepositVerifier, ae as DepositVerifierCurrency, b7 as DepositVerifierData, ca as DepositView, a8 as FiatResponse, F as FulfillIntentMethodParams, J as FulfillIntentParams, N as GetBestByPlatformResponse, O as GetBestByPlatformResponseObject, ag as GetDepositByIdRequest, ah as GetDepositByIdResponse, ao as GetIntentByHashRequest, ap as GetIntentByHashResponse, am as GetIntentsByDepositRequest, an as GetIntentsByDepositResponse, _ as GetNearbyQuote, $ as GetNearbySuggestions, ak as GetOwnerIntentsRequest, al as GetOwnerIntentsResponse, U as GetPlatformQuote, a0 as GetQuoteResponse, a1 as GetQuoteResponseObject, a2 as GetQuoteSingleResponse, b2 as GetSellerCredentialStatusParams, bh as IndexerClient, bP as IndexerDeploymentEnv, bn as IndexerDeposit, bE as IndexerDepositDailySnapshot, bG as IndexerDepositFilter, bD as IndexerDepositFundActivity, bF as IndexerDepositFundActivityType, bJ as IndexerDepositOrderDirection, bI as IndexerDepositOrderField, bH as IndexerDepositPagination, bq as IndexerDepositPaymentMethod, bj as IndexerDepositService, bS as IndexerFulfillmentAndPaymentResponse, bQ as IndexerFulfillmentRecord, bo as IndexerIntentFulfilled, bp as IndexerIntentFulfillmentAmounts, bs as IndexerIntentStatus, bw as IndexerManagerAggregateStats, by as IndexerManagerDailySnapshot, bx as IndexerManagerStats, bB as IndexerManualRateUpdate, br as IndexerMethodCurrency, bC as IndexerOracleConfigUpdate, bR as IndexerPaymentVerifiedRecord, bt as IndexerRateManager, bv as IndexerRateManagerDelegation, bM as IndexerRateManagerDelegationPagination, bA as IndexerRateManagerDetail, bK as IndexerRateManagerFilter, bz as IndexerRateManagerListItem, bO as IndexerRateManagerOrderDirection, bN as IndexerRateManagerOrderField, bL as IndexerRateManagerPagination, bu as IndexerRateManagerRate, bk as IndexerRateManagerService, ai as Intent, cf as IntentView, aa as NearbyQuote, ab as NearbySuggestions, Z as OfframpClient, b6 as OnchainCurrency, cg as OnchainIntent, b9 as OrderStats, bg as OrderbookEntry, bT as PAYMENT_PLATFORMS, aC as PayPalCredentialUploadInput, b4 as PayPalForwardingConfirmationErrorCode, ay as PayPalSessionMaterial, cc as PaymentMethodData, bU as PaymentPlatformType, be as PlatformLimit, X as PlatformQuote, bf as PlatformRiskLevel, b8 as PreparedTransaction, a7 as QuoteFeesResponse, a6 as QuoteIntentResponse, Y as QuoteRequest, a3 as QuoteResponse, a4 as QuoteResponseObject, a5 as QuoteSingleResponse, E as Range, ce as ReferralFee, aq as RegisterPayeeDetailsRequest, ar as RegisterPayeeDetailsResponse, b0 as RegisteredUploadSellerCredentialParams, K as ReleaseFundsToPayerParams, c5 as RuntimeEnv, aR as SellerAttestationOutput, aE as SellerCiphertextBundle, aJ as SellerCredentialBundle, aK as SellerCredentialBundleUpload, aS as SellerCredentialProbeResponse, aM as SellerCredentialStatus, aL as SellerCredentialStatusValue, aD as SellerCredentialUploadInputByPlatform, aQ as SellerPaymentTypedDataValue, aI as SellerProbeInput, aF as SellerSignedCiphertextBundle, aO as SellerTypedDataField, aP as SellerTypedDataSpec, aH as SellerVerifyInput, aG as SellerVerifyIntentDetails, aN as SellerVerifyProxyBody, cs as SendBatchFn, cr as SendTransactionFn, s as SignalIntentMethodParams, H as SignalIntentParams, r as SignalIntentReferralFee, bb as TakerTier, bd as TakerTierLevel, bc as TakerTierStats, w as TimeoutConfig, a9 as TokenResponse, b1 as UploadSellerCredentialOptions, a$ as UploadSellerCredentialParams, az as VenmoCredentialUploadInput, as as VenmoSessionMaterial, b5 as VerifySellerPaymentParams, aB as WiseCredentialUploadInput, av as WiseProfileInfo, ax as WiseProfileNotFound, aw as WiseProfileSelectionRequired, au as WiseSessionMaterial, W as WithdrawDepositParams, ch as ZERO_RATE_MANAGER_ID, Z as Zkp2pClient, u as Zkp2pClientOptions, cm as classifyDelegationState, bl as compareEventCursorIdsByRecency, bW as currencyInfo, bi as defaultIndexerEndpoint, c8 as enrichPvDepositView, c9 as enrichPvIntentView, bm as fetchIndexerFulfillmentAndPayment, c1 as getContracts, bZ as getCurrencyCodeFromHash, bY as getCurrencyInfoFromCountryCode, bX as getCurrencyInfoFromHash, cl as getDelegationRoute, c4 as getGatingServiceAddress, c3 as getPaymentMethodsCatalog, c2 as getRateManagerContracts, b_ as isSupportedCurrencyHash, ci as isZeroRateManagerId, b$ as mapConversionRatesToOnchainMinRate, cj as normalizeRateManagerId, ck as normalizeRegistry, c6 as parseDepositView, c7 as parseIntentView } from './vaultUtils-Dt7ZOITQ.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
 
@@ -210,6 +212,11 @@ declare function apiConfirmPayPalForwarding(payeeDetails: Hash, body: {
210
212
  authToken?: string;
211
213
  timeoutMs?: number;
212
214
  }): Promise<ConfirmPayPalForwardingResponse>;
215
+ declare function apiUploadGoogleOAuthSellerCredential<P extends GoogleOAuthSellerCredentialPlatform>(processorName: P, payeeDetails: Hash, body: GoogleOAuthSellerCredentialUploadBodyByPlatform[P], baseApiUrl: string, opts?: {
216
+ apiKey?: string;
217
+ authToken?: string;
218
+ timeoutMs?: number;
219
+ }): Promise<CuratorSellerCredentialUploadResponse>;
213
220
  declare function apiGetOrderbook(params: GetOrderbookParams, opts: ApiAdapterOptions): Promise<GetOrderbookResponse>;
214
221
  declare function apiGetOrderbook(params: GetOrderbookParams, baseApiUrl: string, timeoutMs?: number, apiKey?: string): Promise<GetOrderbookResponse>;
215
222
  declare function apiGetDepositBundle(params: GetDepositBundleParams, opts: ApiAdapterOptions): Promise<GetDepositBundleResponse>;
@@ -712,4 +719,4 @@ declare class ContractError extends ZKP2PError {
712
719
  constructor(message: string, details?: unknown);
713
720
  }
714
721
 
715
- export { APIError, ApiAdapterOptions, AttestationServiceSellerCredentialUploadResponse, BASE_BUILDER_CODE, BestByPlatformResponse, BuyerTeeSessionMaterialEncryptionInput, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ConfirmPayPalForwardingResponse, ContractError, ContractRouter, type ContractRouterConfig, CurrencyType, DEFAULT_ORACLE_MAX_STALENESS_SECONDS, ErrorCode, type EscrowContractContext, type EscrowDepositView, type EscrowIntentView, GetDepositBundleParams, GetDepositBundleResponse, GetOrderbookParams, GetOrderbookResponse, GetOwnerDepositsRequest, GetOwnerDepositsResponse, GetPayeeDetailsRequest, GetPayeeDetailsResponse, GetTakerTierRequest, GetTakerTierResponse, 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, 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, Q as QuotesBestByPlatformRequest, c as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, d as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, e as PostDepositDetailsResponse, G as GetPayeeDetailsRequest, f as GetPayeeDetailsResponse, g as GetOwnerDepositsRequest, h as GetOwnerDepositsResponse, i as GetTakerTierRequest, j as GetTakerTierResponse, k as GetDepositBundleParams, l as ApiAdapterOptions, m as GetDepositBundleResponse, n as GetOrderbookParams, o as GetOrderbookResponse, p as CurrencyType, q as PaymentMethodCatalog, T as TxOverrides } from './vaultUtils-Dt7ZOITQ.js';
2
- export { x as ActionCallback, ac as ApiDeposit, aj as ApiIntentStatus, aU as AttestationServiceSellerCredentialProbeResponse, aT as AttestationServiceSellerVerifyResponse, v as AuthorizationTokenProvider, cq as BatchResult, M as BestByPlatformResponseObject, aV as BuyerTeePaymentParams, aW as BuyerTeePaymentProofInput, aX as BuyerTeeSessionMaterial, t as CancelIntentMethodParams, L as CancelIntentParams, aA as CashAppCredentialUploadInput, at as CashAppSessionMaterial, b3 as ConfirmPayPalForwardingRequest, z as CreateDepositConversionRate, y as CreateDepositParams, aZ as CuratorSellerCredentialStatusResponse, aY as CuratorSellerCredentialUploadResponse, a_ as CuratorSellerVerifyResponse, bV as Currency, c0 as CurrencyData, cp as DelegationDepositTarget, cn as DelegationRoute, co as DelegationState, cb as Deposit, cd as DepositCurrency, ba as DepositIntentStatistics, af as DepositStatus, ad as DepositVerifier, ae as DepositVerifierCurrency, b7 as DepositVerifierData, ca as DepositView, a8 as FiatResponse, F as FulfillIntentMethodParams, J as FulfillIntentParams, N as GetBestByPlatformResponse, O as GetBestByPlatformResponseObject, ag as GetDepositByIdRequest, ah as GetDepositByIdResponse, ao as GetIntentByHashRequest, ap as GetIntentByHashResponse, am as GetIntentsByDepositRequest, an as GetIntentsByDepositResponse, _ as GetNearbyQuote, $ as GetNearbySuggestions, ak as GetOwnerIntentsRequest, al as GetOwnerIntentsResponse, U as GetPlatformQuote, a0 as GetQuoteResponse, a1 as GetQuoteResponseObject, a2 as GetQuoteSingleResponse, b2 as GetSellerCredentialStatusParams, bh as IndexerClient, bP as IndexerDeploymentEnv, bn as IndexerDeposit, bE as IndexerDepositDailySnapshot, bG as IndexerDepositFilter, bD as IndexerDepositFundActivity, bF as IndexerDepositFundActivityType, bJ as IndexerDepositOrderDirection, bI as IndexerDepositOrderField, bH as IndexerDepositPagination, bq as IndexerDepositPaymentMethod, bj as IndexerDepositService, bS as IndexerFulfillmentAndPaymentResponse, bQ as IndexerFulfillmentRecord, bo as IndexerIntentFulfilled, bp as IndexerIntentFulfillmentAmounts, bs as IndexerIntentStatus, bw as IndexerManagerAggregateStats, by as IndexerManagerDailySnapshot, bx as IndexerManagerStats, bB as IndexerManualRateUpdate, br as IndexerMethodCurrency, bC as IndexerOracleConfigUpdate, bR as IndexerPaymentVerifiedRecord, bt as IndexerRateManager, bv as IndexerRateManagerDelegation, bM as IndexerRateManagerDelegationPagination, bA as IndexerRateManagerDetail, bK as IndexerRateManagerFilter, bz as IndexerRateManagerListItem, bO as IndexerRateManagerOrderDirection, bN as IndexerRateManagerOrderField, bL as IndexerRateManagerPagination, bu as IndexerRateManagerRate, bk as IndexerRateManagerService, ai as Intent, cf as IntentView, aa as NearbyQuote, ab as NearbySuggestions, Z as OfframpClient, b6 as OnchainCurrency, cg as OnchainIntent, b9 as OrderStats, bg as OrderbookEntry, bT as PAYMENT_PLATFORMS, aC as PayPalCredentialUploadInput, b4 as PayPalForwardingConfirmationErrorCode, ay as PayPalSessionMaterial, cc as PaymentMethodData, bU as PaymentPlatformType, be as PlatformLimit, X as PlatformQuote, bf as PlatformRiskLevel, b8 as PreparedTransaction, a7 as QuoteFeesResponse, a6 as QuoteIntentResponse, Y as QuoteRequest, a3 as QuoteResponse, a4 as QuoteResponseObject, a5 as QuoteSingleResponse, E as Range, ce as ReferralFee, aq as RegisterPayeeDetailsRequest, ar as RegisterPayeeDetailsResponse, b0 as RegisteredUploadSellerCredentialParams, K as ReleaseFundsToPayerParams, c5 as RuntimeEnv, aR as SellerAttestationOutput, aE as SellerCiphertextBundle, aJ as SellerCredentialBundle, aK as SellerCredentialBundleUpload, aS as SellerCredentialProbeResponse, aM as SellerCredentialStatus, aL as SellerCredentialStatusValue, aD as SellerCredentialUploadInputByPlatform, aQ as SellerPaymentTypedDataValue, aI as SellerProbeInput, aF as SellerSignedCiphertextBundle, aO as SellerTypedDataField, aP as SellerTypedDataSpec, aH as SellerVerifyInput, aG as SellerVerifyIntentDetails, aN as SellerVerifyProxyBody, cs as SendBatchFn, cr as SendTransactionFn, s as SignalIntentMethodParams, H as SignalIntentParams, r as SignalIntentReferralFee, bb as TakerTier, bd as TakerTierLevel, bc as TakerTierStats, w as TimeoutConfig, a9 as TokenResponse, b1 as UploadSellerCredentialOptions, a$ as UploadSellerCredentialParams, az as VenmoCredentialUploadInput, as as VenmoSessionMaterial, b5 as VerifySellerPaymentParams, aB as WiseCredentialUploadInput, av as WiseProfileInfo, ax as WiseProfileNotFound, aw as WiseProfileSelectionRequired, au as WiseSessionMaterial, W as WithdrawDepositParams, ch as ZERO_RATE_MANAGER_ID, Z as Zkp2pClient, u as Zkp2pClientOptions, cm as classifyDelegationState, bl as compareEventCursorIdsByRecency, bW as currencyInfo, bi as defaultIndexerEndpoint, c8 as enrichPvDepositView, c9 as enrichPvIntentView, bm as fetchIndexerFulfillmentAndPayment, c1 as getContracts, bZ as getCurrencyCodeFromHash, bY as getCurrencyInfoFromCountryCode, bX as getCurrencyInfoFromHash, cl as getDelegationRoute, c4 as getGatingServiceAddress, c3 as getPaymentMethodsCatalog, c2 as getRateManagerContracts, b_ as isSupportedCurrencyHash, ci as isZeroRateManagerId, b$ as mapConversionRatesToOnchainMinRate, cj as normalizeRateManagerId, ck as normalizeRegistry, c6 as parseDepositView, c7 as parseIntentView } from './vaultUtils-Dt7ZOITQ.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
 
@@ -210,6 +212,11 @@ declare function apiConfirmPayPalForwarding(payeeDetails: Hash, body: {
210
212
  authToken?: string;
211
213
  timeoutMs?: number;
212
214
  }): Promise<ConfirmPayPalForwardingResponse>;
215
+ declare function apiUploadGoogleOAuthSellerCredential<P extends GoogleOAuthSellerCredentialPlatform>(processorName: P, payeeDetails: Hash, body: GoogleOAuthSellerCredentialUploadBodyByPlatform[P], baseApiUrl: string, opts?: {
216
+ apiKey?: string;
217
+ authToken?: string;
218
+ timeoutMs?: number;
219
+ }): Promise<CuratorSellerCredentialUploadResponse>;
213
220
  declare function apiGetOrderbook(params: GetOrderbookParams, opts: ApiAdapterOptions): Promise<GetOrderbookResponse>;
214
221
  declare function apiGetOrderbook(params: GetOrderbookParams, baseApiUrl: string, timeoutMs?: number, apiKey?: string): Promise<GetOrderbookResponse>;
215
222
  declare function apiGetDepositBundle(params: GetDepositBundleParams, opts: ApiAdapterOptions): Promise<GetDepositBundleResponse>;
@@ -712,4 +719,4 @@ declare class ContractError extends ZKP2PError {
712
719
  constructor(message: string, details?: unknown);
713
720
  }
714
721
 
715
- export { APIError, ApiAdapterOptions, AttestationServiceSellerCredentialUploadResponse, BASE_BUILDER_CODE, BestByPlatformResponse, BuyerTeeSessionMaterialEncryptionInput, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ConfirmPayPalForwardingResponse, ContractError, ContractRouter, type ContractRouterConfig, CurrencyType, DEFAULT_ORACLE_MAX_STALENESS_SECONDS, ErrorCode, type EscrowContractContext, type EscrowDepositView, type EscrowIntentView, GetDepositBundleParams, GetDepositBundleResponse, GetOrderbookParams, GetOrderbookResponse, GetOwnerDepositsRequest, GetOwnerDepositsResponse, GetPayeeDetailsRequest, GetPayeeDetailsResponse, GetTakerTierRequest, GetTakerTierResponse, 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, 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,
@@ -1333,8 +1362,8 @@ var IntentOperations = class {
1333
1362
  intent
1334
1363
  },
1335
1364
  attestationServiceUrl,
1336
- platformConfig.actionPlatform,
1337
- platformConfig.actionType
1365
+ buyerTeeProof.actionPlatform ?? platformConfig.actionPlatform,
1366
+ buyerTeeProof.actionType ?? platformConfig.actionType
1338
1367
  ) : await apiCreatePaymentAttestation(
1339
1368
  {
1340
1369
  proofType: "reclaim",
@@ -1474,11 +1503,18 @@ function parseBuyerTeePaymentProofInput(proof) {
1474
1503
  if (typeof proof.encryptedSessionMaterial !== "string" || !isBuyerTeeParams(proof.params)) {
1475
1504
  throw new Error("Buyer TEE proof requires encryptedSessionMaterial and params.");
1476
1505
  }
1477
- return {
1506
+ const parsed = {
1478
1507
  proofType: "buyerTee",
1479
1508
  encryptedSessionMaterial: proof.encryptedSessionMaterial,
1480
1509
  params: proof.params
1481
1510
  };
1511
+ if (typeof proof.actionType === "string") {
1512
+ parsed.actionType = proof.actionType;
1513
+ }
1514
+ if (typeof proof.actionPlatform === "string") {
1515
+ parsed.actionPlatform = proof.actionPlatform;
1516
+ }
1517
+ return parsed;
1482
1518
  }
1483
1519
  function normalizeSignalIntentReferralFees(params) {
1484
1520
  if (params.referralFees) {
@@ -5263,6 +5299,19 @@ async function apiConfirmPayPalForwarding(payeeDetails, body, baseApiUrl, opts)
5263
5299
  timeoutMs: opts?.timeoutMs
5264
5300
  });
5265
5301
  }
5302
+ async function apiUploadGoogleOAuthSellerCredential(processorName, payeeDetails, body, baseApiUrl, opts) {
5303
+ const endpoint = `/v2/makers/${encodeURIComponent(processorName)}/${encodeURIComponent(
5304
+ payeeDetails
5305
+ )}/seller-credential/google-oauth`;
5306
+ return apiFetch({
5307
+ url: `${withApiBase(baseApiUrl)}${endpoint}`,
5308
+ method: "POST",
5309
+ body,
5310
+ apiKey: opts?.apiKey,
5311
+ authToken: opts?.authToken,
5312
+ timeoutMs: opts?.timeoutMs
5313
+ });
5314
+ }
5266
5315
  async function apiGetSellerCredentialStatus(processorName, payeeDetails, baseApiUrl, timeoutMs) {
5267
5316
  const endpoint = `/v2/makers/${encodeURIComponent(processorName)}/${encodeURIComponent(
5268
5317
  payeeDetails
@@ -5476,11 +5525,11 @@ var ERC20_ABI = [
5476
5525
  ];
5477
5526
 
5478
5527
  // src/client/Zkp2pClient.ts
5479
- function isStringRecord(value) {
5528
+ function isObjectRecord(value) {
5480
5529
  if (!value || typeof value !== "object" || Array.isArray(value)) {
5481
5530
  return false;
5482
5531
  }
5483
- return Object.values(value).every((entry) => typeof entry === "string");
5532
+ return true;
5484
5533
  }
5485
5534
  function normalizeTelegramUsername(value) {
5486
5535
  if (typeof value !== "string") {
@@ -5517,7 +5566,7 @@ function normalizeQuotePayeeData(maker) {
5517
5566
  return {
5518
5567
  offchainId,
5519
5568
  telegramUsername: normalizeTelegramUsername(maker?.telegramUsername) ?? legacy?.telegramUsername ?? null,
5520
- metadata: isStringRecord(maker?.metadata) ? maker.metadata : legacy?.metadata ?? null
5569
+ metadata: isObjectRecord(maker?.metadata) ? maker.metadata : legacy?.metadata ?? null
5521
5570
  };
5522
5571
  }
5523
5572
  function normalizePayeeDataInputItem(raw) {
@@ -7996,6 +8045,50 @@ var Zkp2pClient = class {
7996
8045
  }
7997
8046
  );
7998
8047
  }
8048
+ /**
8049
+ * Upload a seller Gmail OAuth authorization code through curator.
8050
+ *
8051
+ * Curator owns the encryption hop to attestation-service for this flow, so
8052
+ * callers send the one-time Google code plus the stable seller identity.
8053
+ */
8054
+ async uploadGoogleOAuthSellerCredential(params, opts) {
8055
+ const baseApiUrl = this.stripTrailingSlash(
8056
+ opts?.baseApiUrl ?? this.baseApiUrl ?? DEFAULT_BASE_API_URL
8057
+ );
8058
+ const timeoutMs = opts?.timeoutMs ?? this.apiTimeoutMs;
8059
+ if (params.platform === "paypal") {
8060
+ return apiUploadGoogleOAuthSellerCredential(
8061
+ "paypal",
8062
+ params.payeeDetails,
8063
+ {
8064
+ payeeEmail: params.payeeEmail,
8065
+ authorizationCode: params.authorizationCode,
8066
+ redirectUri: params.redirectUri
8067
+ },
8068
+ baseApiUrl,
8069
+ {
8070
+ apiKey: this.apiKey,
8071
+ authToken: this.authorizationToken,
8072
+ timeoutMs
8073
+ }
8074
+ );
8075
+ }
8076
+ return apiUploadGoogleOAuthSellerCredential(
8077
+ "venmo",
8078
+ params.payeeDetails,
8079
+ {
8080
+ accountId: params.accountId,
8081
+ authorizationCode: params.authorizationCode,
8082
+ redirectUri: params.redirectUri
8083
+ },
8084
+ baseApiUrl,
8085
+ {
8086
+ apiKey: this.apiKey,
8087
+ authToken: this.authorizationToken,
8088
+ timeoutMs
8089
+ }
8090
+ );
8091
+ }
7999
8092
  /**
8000
8093
  * Status is a coarse curator-owned signal (`active` / `inactive` / `missing`) and intentionally
8001
8094
  * omits low-level diagnostics. Curator may still re-probe stale credentials during verify, so callers
@@ -8449,6 +8542,6 @@ var logger = {
8449
8542
  }
8450
8543
  };
8451
8544
 
8452
- 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, 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 };
8453
8546
  //# sourceMappingURL=index.mjs.map
8454
8547
  //# sourceMappingURL=index.mjs.map