@zkp2p/sdk 0.4.2 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,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, S as SellerCredentialBundle, D as DepositWithRelations, I as IntentEntity, a as IdentityAttestationRequestBody, A as AttestationServiceIdentityResponse, b as SellerCredentialUploadInput, c as SellerPlatform, d as SellerCredentialAttestationRuntime, e as AttestationServiceSellerCredentialUploadResponse, B as BuyerTeeSessionMaterialEncryptionInput, U as UploadSellerCredentialBundleParams, C as CuratorSellerCredentialUploadResponse, f as ConfirmPayPalForwardingResponse, G as GoogleOAuthSellerCredentialPlatform, g as GoogleOAuthSellerCredentialUploadBodyByPlatform, Q as QuotesBestByPlatformRequest, h as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, i as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, j as PostDepositDetailsResponse, k as GetPayeeDetailsRequest, l as GetPayeeDetailsResponse, m as GetOwnerDepositsRequest, n as GetOwnerDepositsResponse, o as GetTakerTierRequest, p as GetTakerTierResponse, q as GetDepositBundleParams, r as ApiAdapterOptions, s as GetDepositBundleResponse, t as GetOrderbookParams, u as GetOrderbookResponse, v as CurrencyType, w as PaymentMethodCatalog, T as TxOverrides } from './vaultUtils-BL8tzsmH.mjs';
2
+ export { K as ActionCallback, aj as ApiDeposit, aq as ApiIntentStatus, b1 as AttestationServiceSellerCredentialProbeResponse, a$ as AttestationServiceSellerVerifyResponse, H as AuthorizationTokenProvider, cG as BatchResult, $ as BestByPlatformResponseObject, b2 as BuyerTeePaymentParams, b3 as BuyerTeePaymentProofInput, b4 as BuyerTeeSessionMaterial, z as CancelIntentMethodParams, _ as CancelIntentParams, aJ as CashAppCredentialUploadInput, aA as CashAppSessionMaterial, bc as ConfirmPayPalForwardingRequest, M as CreateDepositConversionRate, L as CreateDepositParams, b5 as CuratorSellerCredentialStatusResponse, b6 as CuratorSellerVerifyResponse, c9 as Currency, cg as CurrencyData, cF as DelegationDepositTarget, cD as DelegationRoute, cE as DelegationState, cr as Deposit, ct as DepositCurrency, bq as DepositIntentStatistics, am as DepositStatus, ak as DepositVerifier, al as DepositVerifierCurrency, bn as DepositVerifierData, cq as DepositView, af as FiatResponse, b0 as FulfillIntentAttestationResponse, F as FulfillIntentMethodParams, X as FulfillIntentParams, a0 as GetBestByPlatformResponse, a1 as GetBestByPlatformResponseObject, an as GetDepositByIdRequest, ao as GetDepositByIdResponse, av as GetIntentByHashRequest, aw as GetIntentByHashResponse, at as GetIntentsByDepositRequest, au as GetIntentsByDepositResponse, a5 as GetNearbyQuote, a6 as GetNearbySuggestions, ar as GetOwnerIntentsRequest, as as GetOwnerIntentsResponse, a2 as GetPlatformQuote, a7 as GetQuoteResponse, a8 as GetQuoteResponseObject, a9 as GetQuoteSingleResponse, bb as GetSellerCredentialStatusParams, bi as IdentityAttestationActionType, bj as IdentityAttestationParams, bx as IndexerClient, c3 as IndexerDeploymentEnv, bD as IndexerDeposit, bU as IndexerDepositDailySnapshot, bW as IndexerDepositFilter, bT as IndexerDepositFundActivity, bV as IndexerDepositFundActivityType, bZ as IndexerDepositOrderDirection, bY as IndexerDepositOrderField, bX as IndexerDepositPagination, bG as IndexerDepositPaymentMethod, bz as IndexerDepositService, c6 as IndexerFulfillmentAndPaymentResponse, c4 as IndexerFulfillmentRecord, bE as IndexerIntentFulfilled, bF as IndexerIntentFulfillmentAmounts, bI as IndexerIntentStatus, bM as IndexerManagerAggregateStats, bO as IndexerManagerDailySnapshot, bN as IndexerManagerStats, bR as IndexerManualRateUpdate, bH as IndexerMethodCurrency, bS as IndexerOracleConfigUpdate, c5 as IndexerPaymentVerifiedRecord, bJ as IndexerRateManager, bL as IndexerRateManagerDelegation, c0 as IndexerRateManagerDelegationPagination, bQ as IndexerRateManagerDetail, b_ as IndexerRateManagerFilter, bP as IndexerRateManagerListItem, c2 as IndexerRateManagerOrderDirection, c1 as IndexerRateManagerOrderField, b$ as IndexerRateManagerPagination, bK as IndexerRateManagerRate, bA as IndexerRateManagerService, ap as Intent, cv as IntentView, bk as MakerIdentityAttestationRequestBody, bl as MakerIdentityPlatform, ah as NearbyQuote, ai as NearbySuggestions, Z as OfframpClient, bm as OnchainCurrency, cw as OnchainIntent, bp as OrderStats, bw as OrderbookEntry, c7 as PAYMENT_PLATFORMS, aL as PayPalCredentialUploadInput, bd as PayPalForwardingConfirmationErrorCode, aG as PayPalGoogleOAuthSellerCredentialUploadBody, aF as PayPalSessionMaterial, cs as PaymentMethodData, c8 as PaymentPlatformType, bu as PlatformLimit, a3 as PlatformQuote, bv as PlatformRiskLevel, bo as PreparedTransaction, ae as QuoteFeesResponse, ad as QuoteIntentResponse, a4 as QuoteRequest, aa as QuoteResponse, ab as QuoteResponseObject, ac as QuoteSingleResponse, N as Range, cu as ReferralFee, ax as RegisterPayeeDetailsRequest, ay as RegisterPayeeDetailsResponse, b7 as RegisteredSellerCredentialPlatform, b9 as RegisteredUploadSellerCredentialParams, Y as ReleaseFundsToPayerParams, cl as RuntimeEnv, aZ as SellerAttestationOutput, aN as SellerCiphertextBundle, aS as SellerCredentialBundleUpload, a_ as SellerCredentialProbeResponse, aU as SellerCredentialStatus, aT as SellerCredentialStatusValue, aM as SellerCredentialUploadInputByPlatform, aY as SellerPaymentTypedDataValue, aR as SellerProbeInput, aO as SellerSignedCiphertextBundle, aW as SellerTypedDataField, aX as SellerTypedDataSpec, aQ as SellerVerifyInput, aP as SellerVerifyIntentDetails, aV as SellerVerifyProxyBody, cI as SendBatchFn, cH as SendTransactionFn, y as SignalIntentMethodParams, O as SignalIntentParams, x as SignalIntentReferralFee, br as TakerTier, bt as TakerTierLevel, bs as TakerTierStats, J as TimeoutConfig, ag as TokenResponse, bg as UploadGoogleOAuthSellerCredentialParams, be as UploadPayPalGoogleOAuthSellerCredentialParams, ba as UploadSellerCredentialOptions, b8 as UploadSellerCredentialParams, bf as UploadVenmoGoogleOAuthSellerCredentialParams, aI as VenmoCredentialUploadInput, aH as VenmoGoogleOAuthSellerCredentialUploadBody, az as VenmoSessionMaterial, bh as VerifySellerPaymentParams, aK as WiseCredentialUploadInput, aC as WiseProfileInfo, aE as WiseProfileNotFound, aD as WiseProfileSelectionRequired, aB as WiseSessionMaterial, W as WithdrawDepositParams, cx as ZERO_RATE_MANAGER_ID, Z as Zkp2pClient, E as Zkp2pClientOptions, cC as classifyDelegationState, bB as compareEventCursorIdsByRecency, ca as currencyInfo, by as defaultIndexerEndpoint, co as enrichPvDepositView, cp as enrichPvIntentView, bC as fetchIndexerFulfillmentAndPayment, ch as getContracts, cd as getCurrencyCodeFromHash, cc as getCurrencyInfoFromCountryCode, cb as getCurrencyInfoFromHash, cB as getDelegationRoute, ck as getGatingServiceAddress, cj as getPaymentMethodsCatalog, ci as getRateManagerContracts, ce as isSupportedCurrencyHash, cy as isZeroRateManagerId, cf as mapConversionRatesToOnchainMinRate, cz as normalizeRateManagerId, cA as normalizeRegistry, cm as parseDepositView, cn as parseIntentView } from './vaultUtils-BL8tzsmH.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 {
@@ -126,36 +127,52 @@ declare class ContractRouter {
126
127
  }
127
128
 
128
129
  type PeerConnectionStatus = 'connected' | 'disconnected' | 'pending';
129
- type PeerOnrampPreparedTransactionResult = {
130
- intentHash: `0x${string}`;
131
- status: 'calldata_ready';
132
- transaction: {
133
- to: `0x${string}`;
134
- data: `0x${string}`;
135
- value: string;
136
- chainId: number;
137
- };
130
+ type PeerMetadataCaptureMode = 'buyerTee' | 'sellerCredential';
131
+ type PeerMetadataProviderConfig = Record<string, unknown>;
132
+ type PeerAuthenticateParams = {
133
+ actionType: string;
134
+ attestationActionType?: string | null;
135
+ attestationServiceUrl?: string | null;
136
+ captureMode?: PeerMetadataCaptureMode;
137
+ platform: string;
138
+ providerConfig?: PeerMetadataProviderConfig;
139
+ };
140
+ type PeerBuyerTeePaymentParams = Record<string, string | number | boolean>;
141
+ type PeerBuyerTeePaymentCapture = {
142
+ encryptedSessionMaterial: string;
143
+ params?: PeerBuyerTeePaymentParams[];
144
+ };
145
+ type PeerSarCredentialCapture = {
146
+ credentialBundle: SellerCredentialBundle;
147
+ offchainId: string;
148
+ };
149
+ type PeerMetadataRow = {
150
+ amount?: string;
151
+ currency?: string;
152
+ date?: string;
153
+ hidden: boolean;
154
+ originalIndex: number;
155
+ params?: PeerBuyerTeePaymentParams;
156
+ paymentId?: string;
157
+ recipient?: string;
158
+ [key: string]: unknown;
159
+ };
160
+ type PeerMetadataMessage = {
161
+ buyerTeeCapture?: PeerBuyerTeePaymentCapture | null;
162
+ errorMessage?: string;
163
+ expiresAt: number;
164
+ metadata: PeerMetadataRow[];
165
+ platform: string;
166
+ requestId: string;
167
+ sarCredentialCapture?: PeerSarCredentialCapture | null;
138
168
  };
139
- type PeerOnrampPreparedTransactionCallback = (result: PeerOnrampPreparedTransactionResult) => void;
169
+ type PeerMetadataMessageCallback = (message: PeerMetadataMessage) => void;
140
170
  type PeerExtensionApi = {
141
171
  requestConnection(): Promise<boolean>;
142
172
  checkConnectionStatus(): Promise<PeerConnectionStatus>;
143
- openSidebar(route: string): void;
144
- onramp(queryString: string, callback: PeerOnrampPreparedTransactionCallback): void;
145
- getOnrampTransaction(intentHash: string): Promise<PeerOnrampPreparedTransactionResult | null>;
146
173
  getVersion(): Promise<string>;
147
- };
148
- type PeerExtensionOnrampParams = {
149
- intentHash: string;
150
- referrer?: string;
151
- referrerLogo?: string;
152
- inputCurrency?: string;
153
- inputAmount?: string | number;
154
- paymentPlatform?: string;
155
- depositId?: string | number | bigint;
156
- toToken?: string;
157
- amountUsdc?: string | number | bigint;
158
- recipientAddress?: string;
174
+ authenticate(params: PeerAuthenticateParams): void;
175
+ onMetadataMessage(callback: PeerMetadataMessageCallback): () => void;
159
176
  };
160
177
  type PeerExtensionWindow = Window & {
161
178
  peer?: PeerExtensionApi;
@@ -166,10 +183,9 @@ type PeerExtensionSdkOptions = {
166
183
  type PeerExtensionSdk = {
167
184
  requestConnection(): Promise<boolean>;
168
185
  checkConnectionStatus(): Promise<PeerConnectionStatus>;
169
- openSidebar(route: string): void;
170
- onramp(params: PeerExtensionOnrampParams, callback: PeerOnrampPreparedTransactionCallback): void;
171
- getOnrampTransaction(intentHash: string): Promise<PeerOnrampPreparedTransactionResult | null>;
172
186
  getVersion(): Promise<string>;
187
+ authenticate(params: PeerAuthenticateParams): void;
188
+ onMetadataMessage(callback: PeerMetadataMessageCallback): () => void;
173
189
  isAvailable(): boolean;
174
190
  openInstallPage(): void;
175
191
  getState(): Promise<PeerExtensionState>;
@@ -190,9 +206,15 @@ interface ConvertLiquidityOptions {
190
206
  declare function convertDepositsForLiquidity(deposits: DepositWithRelations[], chainId: number, escrowAddress: string, options?: ConvertLiquidityOptions): EscrowDepositView[];
191
207
  declare function convertIndexerIntentsToEscrowViews(intents: IntentEntity[], depositViewsById: Map<string, EscrowDepositView>): EscrowIntentView[];
192
208
 
209
+ declare function apiRequestIdentityAttestation(payload: IdentityAttestationRequestBody, attestationServiceUrl: string, platform: string, actionType: string): Promise<AttestationServiceIdentityResponse>;
193
210
  declare function createEncryptedBuyerTeeSessionMaterial({ actionType, attestationRuntime, attestationServiceUrl, platform, sessionMaterial, timeoutMs, }: BuyerTeeSessionMaterialEncryptionInput): Promise<string>;
194
211
  declare function apiCreateSellerCredentialBundle(payload: SellerCredentialUploadInput, attestationServiceUrl: string, platform: SellerPlatform, timeoutMs?: number, attestationRuntime?: SellerCredentialAttestationRuntime): Promise<AttestationServiceSellerCredentialUploadResponse>;
195
212
 
213
+ /**
214
+ * Store an already-encrypted seller credential bundle with curator.
215
+ */
216
+ declare function apiUploadSellerCredentialBundle(params: UploadSellerCredentialBundleParams, baseApiUrl?: string | null, timeoutMs?: number): Promise<CuratorSellerCredentialUploadResponse>;
217
+
196
218
  declare function apiPostDepositDetails(req: PostDepositDetailsRequest, baseApiUrl: string, timeoutMs?: number, _apiKey?: string, _authToken?: string): Promise<PostDepositDetailsResponse>;
197
219
  declare function apiGetQuotesBestByPlatform(req: QuotesBestByPlatformRequest, baseApiUrl: string, timeoutMs?: number, apiKey?: string, authToken?: string): Promise<BestByPlatformResponse>;
198
220
  declare function apiGetPayeeDetails(req: GetPayeeDetailsRequest, apiKey: string | undefined, baseApiUrl: string, authToken?: string, timeoutMs?: number): Promise<GetPayeeDetailsResponse>;
@@ -717,4 +739,4 @@ declare class ContractError extends ZKP2PError {
717
739
  constructor(message: string, details?: unknown);
718
740
  }
719
741
 
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 };
742
+ 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 PeerAuthenticateParams, type PeerBuyerTeePaymentCapture, type PeerBuyerTeePaymentParams, type PeerConnectionStatus, type PeerExtensionApi, type PeerExtensionSdk, type PeerExtensionSdkOptions, type PeerExtensionState, type PeerExtensionWindow, type PeerMetadataCaptureMode, type PeerMetadataMessage, type PeerMetadataMessageCallback, type PeerMetadataProviderConfig, type PeerMetadataRow, type PeerSarCredentialCapture, PostDepositDetailsRequest, PostDepositDetailsResponse, type PythFeedConfig, QuotesBestByPlatformRequest, ReferrerFeeConfig, SPREAD_ORACLE_FEEDS, SUPPORTED_CHAIN_IDS, SellerCredentialAttestationRuntime, SellerCredentialBundle, SellerCredentialUploadInput, SellerPlatform, type SpreadOracleConfig, type SpreadOracleFeedConfig, type SupportedChainId, TOKEN_METADATA, TxOverrides, UploadSellerCredentialBundleParams, ValidatePayeeDetailsRequest, ValidatePayeeDetailsResponse, ValidationError, ZKP2PError, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, apiConfirmPayPalForwarding, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuotesBestByPlatform, apiGetTakerTier, apiPostDepositDetails, apiRequestIdentityAttestation, apiUploadGoogleOAuthSellerCredential, apiUploadSellerCredentialBundle, 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, S as SellerCredentialBundle, D as DepositWithRelations, I as IntentEntity, a as IdentityAttestationRequestBody, A as AttestationServiceIdentityResponse, b as SellerCredentialUploadInput, c as SellerPlatform, d as SellerCredentialAttestationRuntime, e as AttestationServiceSellerCredentialUploadResponse, B as BuyerTeeSessionMaterialEncryptionInput, U as UploadSellerCredentialBundleParams, C as CuratorSellerCredentialUploadResponse, f as ConfirmPayPalForwardingResponse, G as GoogleOAuthSellerCredentialPlatform, g as GoogleOAuthSellerCredentialUploadBodyByPlatform, Q as QuotesBestByPlatformRequest, h as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, i as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, j as PostDepositDetailsResponse, k as GetPayeeDetailsRequest, l as GetPayeeDetailsResponse, m as GetOwnerDepositsRequest, n as GetOwnerDepositsResponse, o as GetTakerTierRequest, p as GetTakerTierResponse, q as GetDepositBundleParams, r as ApiAdapterOptions, s as GetDepositBundleResponse, t as GetOrderbookParams, u as GetOrderbookResponse, v as CurrencyType, w as PaymentMethodCatalog, T as TxOverrides } from './vaultUtils-BL8tzsmH.js';
2
+ export { K as ActionCallback, aj as ApiDeposit, aq as ApiIntentStatus, b1 as AttestationServiceSellerCredentialProbeResponse, a$ as AttestationServiceSellerVerifyResponse, H as AuthorizationTokenProvider, cG as BatchResult, $ as BestByPlatformResponseObject, b2 as BuyerTeePaymentParams, b3 as BuyerTeePaymentProofInput, b4 as BuyerTeeSessionMaterial, z as CancelIntentMethodParams, _ as CancelIntentParams, aJ as CashAppCredentialUploadInput, aA as CashAppSessionMaterial, bc as ConfirmPayPalForwardingRequest, M as CreateDepositConversionRate, L as CreateDepositParams, b5 as CuratorSellerCredentialStatusResponse, b6 as CuratorSellerVerifyResponse, c9 as Currency, cg as CurrencyData, cF as DelegationDepositTarget, cD as DelegationRoute, cE as DelegationState, cr as Deposit, ct as DepositCurrency, bq as DepositIntentStatistics, am as DepositStatus, ak as DepositVerifier, al as DepositVerifierCurrency, bn as DepositVerifierData, cq as DepositView, af as FiatResponse, b0 as FulfillIntentAttestationResponse, F as FulfillIntentMethodParams, X as FulfillIntentParams, a0 as GetBestByPlatformResponse, a1 as GetBestByPlatformResponseObject, an as GetDepositByIdRequest, ao as GetDepositByIdResponse, av as GetIntentByHashRequest, aw as GetIntentByHashResponse, at as GetIntentsByDepositRequest, au as GetIntentsByDepositResponse, a5 as GetNearbyQuote, a6 as GetNearbySuggestions, ar as GetOwnerIntentsRequest, as as GetOwnerIntentsResponse, a2 as GetPlatformQuote, a7 as GetQuoteResponse, a8 as GetQuoteResponseObject, a9 as GetQuoteSingleResponse, bb as GetSellerCredentialStatusParams, bi as IdentityAttestationActionType, bj as IdentityAttestationParams, bx as IndexerClient, c3 as IndexerDeploymentEnv, bD as IndexerDeposit, bU as IndexerDepositDailySnapshot, bW as IndexerDepositFilter, bT as IndexerDepositFundActivity, bV as IndexerDepositFundActivityType, bZ as IndexerDepositOrderDirection, bY as IndexerDepositOrderField, bX as IndexerDepositPagination, bG as IndexerDepositPaymentMethod, bz as IndexerDepositService, c6 as IndexerFulfillmentAndPaymentResponse, c4 as IndexerFulfillmentRecord, bE as IndexerIntentFulfilled, bF as IndexerIntentFulfillmentAmounts, bI as IndexerIntentStatus, bM as IndexerManagerAggregateStats, bO as IndexerManagerDailySnapshot, bN as IndexerManagerStats, bR as IndexerManualRateUpdate, bH as IndexerMethodCurrency, bS as IndexerOracleConfigUpdate, c5 as IndexerPaymentVerifiedRecord, bJ as IndexerRateManager, bL as IndexerRateManagerDelegation, c0 as IndexerRateManagerDelegationPagination, bQ as IndexerRateManagerDetail, b_ as IndexerRateManagerFilter, bP as IndexerRateManagerListItem, c2 as IndexerRateManagerOrderDirection, c1 as IndexerRateManagerOrderField, b$ as IndexerRateManagerPagination, bK as IndexerRateManagerRate, bA as IndexerRateManagerService, ap as Intent, cv as IntentView, bk as MakerIdentityAttestationRequestBody, bl as MakerIdentityPlatform, ah as NearbyQuote, ai as NearbySuggestions, Z as OfframpClient, bm as OnchainCurrency, cw as OnchainIntent, bp as OrderStats, bw as OrderbookEntry, c7 as PAYMENT_PLATFORMS, aL as PayPalCredentialUploadInput, bd as PayPalForwardingConfirmationErrorCode, aG as PayPalGoogleOAuthSellerCredentialUploadBody, aF as PayPalSessionMaterial, cs as PaymentMethodData, c8 as PaymentPlatformType, bu as PlatformLimit, a3 as PlatformQuote, bv as PlatformRiskLevel, bo as PreparedTransaction, ae as QuoteFeesResponse, ad as QuoteIntentResponse, a4 as QuoteRequest, aa as QuoteResponse, ab as QuoteResponseObject, ac as QuoteSingleResponse, N as Range, cu as ReferralFee, ax as RegisterPayeeDetailsRequest, ay as RegisterPayeeDetailsResponse, b7 as RegisteredSellerCredentialPlatform, b9 as RegisteredUploadSellerCredentialParams, Y as ReleaseFundsToPayerParams, cl as RuntimeEnv, aZ as SellerAttestationOutput, aN as SellerCiphertextBundle, aS as SellerCredentialBundleUpload, a_ as SellerCredentialProbeResponse, aU as SellerCredentialStatus, aT as SellerCredentialStatusValue, aM as SellerCredentialUploadInputByPlatform, aY as SellerPaymentTypedDataValue, aR as SellerProbeInput, aO as SellerSignedCiphertextBundle, aW as SellerTypedDataField, aX as SellerTypedDataSpec, aQ as SellerVerifyInput, aP as SellerVerifyIntentDetails, aV as SellerVerifyProxyBody, cI as SendBatchFn, cH as SendTransactionFn, y as SignalIntentMethodParams, O as SignalIntentParams, x as SignalIntentReferralFee, br as TakerTier, bt as TakerTierLevel, bs as TakerTierStats, J as TimeoutConfig, ag as TokenResponse, bg as UploadGoogleOAuthSellerCredentialParams, be as UploadPayPalGoogleOAuthSellerCredentialParams, ba as UploadSellerCredentialOptions, b8 as UploadSellerCredentialParams, bf as UploadVenmoGoogleOAuthSellerCredentialParams, aI as VenmoCredentialUploadInput, aH as VenmoGoogleOAuthSellerCredentialUploadBody, az as VenmoSessionMaterial, bh as VerifySellerPaymentParams, aK as WiseCredentialUploadInput, aC as WiseProfileInfo, aE as WiseProfileNotFound, aD as WiseProfileSelectionRequired, aB as WiseSessionMaterial, W as WithdrawDepositParams, cx as ZERO_RATE_MANAGER_ID, Z as Zkp2pClient, E as Zkp2pClientOptions, cC as classifyDelegationState, bB as compareEventCursorIdsByRecency, ca as currencyInfo, by as defaultIndexerEndpoint, co as enrichPvDepositView, cp as enrichPvIntentView, bC as fetchIndexerFulfillmentAndPayment, ch as getContracts, cd as getCurrencyCodeFromHash, cc as getCurrencyInfoFromCountryCode, cb as getCurrencyInfoFromHash, cB as getDelegationRoute, ck as getGatingServiceAddress, cj as getPaymentMethodsCatalog, ci as getRateManagerContracts, ce as isSupportedCurrencyHash, cy as isZeroRateManagerId, cf as mapConversionRatesToOnchainMinRate, cz as normalizeRateManagerId, cA as normalizeRegistry, cm as parseDepositView, cn as parseIntentView } from './vaultUtils-BL8tzsmH.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 {
@@ -126,36 +127,52 @@ declare class ContractRouter {
126
127
  }
127
128
 
128
129
  type PeerConnectionStatus = 'connected' | 'disconnected' | 'pending';
129
- type PeerOnrampPreparedTransactionResult = {
130
- intentHash: `0x${string}`;
131
- status: 'calldata_ready';
132
- transaction: {
133
- to: `0x${string}`;
134
- data: `0x${string}`;
135
- value: string;
136
- chainId: number;
137
- };
130
+ type PeerMetadataCaptureMode = 'buyerTee' | 'sellerCredential';
131
+ type PeerMetadataProviderConfig = Record<string, unknown>;
132
+ type PeerAuthenticateParams = {
133
+ actionType: string;
134
+ attestationActionType?: string | null;
135
+ attestationServiceUrl?: string | null;
136
+ captureMode?: PeerMetadataCaptureMode;
137
+ platform: string;
138
+ providerConfig?: PeerMetadataProviderConfig;
139
+ };
140
+ type PeerBuyerTeePaymentParams = Record<string, string | number | boolean>;
141
+ type PeerBuyerTeePaymentCapture = {
142
+ encryptedSessionMaterial: string;
143
+ params?: PeerBuyerTeePaymentParams[];
144
+ };
145
+ type PeerSarCredentialCapture = {
146
+ credentialBundle: SellerCredentialBundle;
147
+ offchainId: string;
148
+ };
149
+ type PeerMetadataRow = {
150
+ amount?: string;
151
+ currency?: string;
152
+ date?: string;
153
+ hidden: boolean;
154
+ originalIndex: number;
155
+ params?: PeerBuyerTeePaymentParams;
156
+ paymentId?: string;
157
+ recipient?: string;
158
+ [key: string]: unknown;
159
+ };
160
+ type PeerMetadataMessage = {
161
+ buyerTeeCapture?: PeerBuyerTeePaymentCapture | null;
162
+ errorMessage?: string;
163
+ expiresAt: number;
164
+ metadata: PeerMetadataRow[];
165
+ platform: string;
166
+ requestId: string;
167
+ sarCredentialCapture?: PeerSarCredentialCapture | null;
138
168
  };
139
- type PeerOnrampPreparedTransactionCallback = (result: PeerOnrampPreparedTransactionResult) => void;
169
+ type PeerMetadataMessageCallback = (message: PeerMetadataMessage) => void;
140
170
  type PeerExtensionApi = {
141
171
  requestConnection(): Promise<boolean>;
142
172
  checkConnectionStatus(): Promise<PeerConnectionStatus>;
143
- openSidebar(route: string): void;
144
- onramp(queryString: string, callback: PeerOnrampPreparedTransactionCallback): void;
145
- getOnrampTransaction(intentHash: string): Promise<PeerOnrampPreparedTransactionResult | null>;
146
173
  getVersion(): Promise<string>;
147
- };
148
- type PeerExtensionOnrampParams = {
149
- intentHash: string;
150
- referrer?: string;
151
- referrerLogo?: string;
152
- inputCurrency?: string;
153
- inputAmount?: string | number;
154
- paymentPlatform?: string;
155
- depositId?: string | number | bigint;
156
- toToken?: string;
157
- amountUsdc?: string | number | bigint;
158
- recipientAddress?: string;
174
+ authenticate(params: PeerAuthenticateParams): void;
175
+ onMetadataMessage(callback: PeerMetadataMessageCallback): () => void;
159
176
  };
160
177
  type PeerExtensionWindow = Window & {
161
178
  peer?: PeerExtensionApi;
@@ -166,10 +183,9 @@ type PeerExtensionSdkOptions = {
166
183
  type PeerExtensionSdk = {
167
184
  requestConnection(): Promise<boolean>;
168
185
  checkConnectionStatus(): Promise<PeerConnectionStatus>;
169
- openSidebar(route: string): void;
170
- onramp(params: PeerExtensionOnrampParams, callback: PeerOnrampPreparedTransactionCallback): void;
171
- getOnrampTransaction(intentHash: string): Promise<PeerOnrampPreparedTransactionResult | null>;
172
186
  getVersion(): Promise<string>;
187
+ authenticate(params: PeerAuthenticateParams): void;
188
+ onMetadataMessage(callback: PeerMetadataMessageCallback): () => void;
173
189
  isAvailable(): boolean;
174
190
  openInstallPage(): void;
175
191
  getState(): Promise<PeerExtensionState>;
@@ -190,9 +206,15 @@ interface ConvertLiquidityOptions {
190
206
  declare function convertDepositsForLiquidity(deposits: DepositWithRelations[], chainId: number, escrowAddress: string, options?: ConvertLiquidityOptions): EscrowDepositView[];
191
207
  declare function convertIndexerIntentsToEscrowViews(intents: IntentEntity[], depositViewsById: Map<string, EscrowDepositView>): EscrowIntentView[];
192
208
 
209
+ declare function apiRequestIdentityAttestation(payload: IdentityAttestationRequestBody, attestationServiceUrl: string, platform: string, actionType: string): Promise<AttestationServiceIdentityResponse>;
193
210
  declare function createEncryptedBuyerTeeSessionMaterial({ actionType, attestationRuntime, attestationServiceUrl, platform, sessionMaterial, timeoutMs, }: BuyerTeeSessionMaterialEncryptionInput): Promise<string>;
194
211
  declare function apiCreateSellerCredentialBundle(payload: SellerCredentialUploadInput, attestationServiceUrl: string, platform: SellerPlatform, timeoutMs?: number, attestationRuntime?: SellerCredentialAttestationRuntime): Promise<AttestationServiceSellerCredentialUploadResponse>;
195
212
 
213
+ /**
214
+ * Store an already-encrypted seller credential bundle with curator.
215
+ */
216
+ declare function apiUploadSellerCredentialBundle(params: UploadSellerCredentialBundleParams, baseApiUrl?: string | null, timeoutMs?: number): Promise<CuratorSellerCredentialUploadResponse>;
217
+
196
218
  declare function apiPostDepositDetails(req: PostDepositDetailsRequest, baseApiUrl: string, timeoutMs?: number, _apiKey?: string, _authToken?: string): Promise<PostDepositDetailsResponse>;
197
219
  declare function apiGetQuotesBestByPlatform(req: QuotesBestByPlatformRequest, baseApiUrl: string, timeoutMs?: number, apiKey?: string, authToken?: string): Promise<BestByPlatformResponse>;
198
220
  declare function apiGetPayeeDetails(req: GetPayeeDetailsRequest, apiKey: string | undefined, baseApiUrl: string, authToken?: string, timeoutMs?: number): Promise<GetPayeeDetailsResponse>;
@@ -717,4 +739,4 @@ declare class ContractError extends ZKP2PError {
717
739
  constructor(message: string, details?: unknown);
718
740
  }
719
741
 
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 };
742
+ 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 PeerAuthenticateParams, type PeerBuyerTeePaymentCapture, type PeerBuyerTeePaymentParams, type PeerConnectionStatus, type PeerExtensionApi, type PeerExtensionSdk, type PeerExtensionSdkOptions, type PeerExtensionState, type PeerExtensionWindow, type PeerMetadataCaptureMode, type PeerMetadataMessage, type PeerMetadataMessageCallback, type PeerMetadataProviderConfig, type PeerMetadataRow, type PeerSarCredentialCapture, PostDepositDetailsRequest, PostDepositDetailsResponse, type PythFeedConfig, QuotesBestByPlatformRequest, ReferrerFeeConfig, SPREAD_ORACLE_FEEDS, SUPPORTED_CHAIN_IDS, SellerCredentialAttestationRuntime, SellerCredentialBundle, SellerCredentialUploadInput, SellerPlatform, type SpreadOracleConfig, type SpreadOracleFeedConfig, type SupportedChainId, TOKEN_METADATA, TxOverrides, UploadSellerCredentialBundleParams, ValidatePayeeDetailsRequest, ValidatePayeeDetailsResponse, ValidationError, ZKP2PError, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, apiConfirmPayPalForwarding, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuotesBestByPlatform, apiGetTakerTier, apiPostDepositDetails, apiRequestIdentityAttestation, apiUploadGoogleOAuthSellerCredential, apiUploadSellerCredentialBundle, 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 };