@zkp2p/sdk 0.4.1 → 0.4.2
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.cjs +68 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +8 -3
- package/dist/index.d.ts +8 -3
- package/dist/index.mjs +68 -4
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/{vaultUtils-Dt7ZOITQ.d.mts → vaultUtils-Bi2uldoa.d.mts} +42 -1
- package/dist/{vaultUtils-Dt7ZOITQ.d.ts → vaultUtils-Bi2uldoa.d.ts} +42 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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,
|
|
2
|
-
export {
|
|
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';
|
|
3
3
|
import { Address, Hash, Hex, WalletClient } from 'viem';
|
|
4
4
|
import { Abi } from 'abitype';
|
|
5
5
|
import '@zkp2p/indexer-schema';
|
|
@@ -210,6 +210,11 @@ declare function apiConfirmPayPalForwarding(payeeDetails: Hash, body: {
|
|
|
210
210
|
authToken?: string;
|
|
211
211
|
timeoutMs?: number;
|
|
212
212
|
}): Promise<ConfirmPayPalForwardingResponse>;
|
|
213
|
+
declare function apiUploadGoogleOAuthSellerCredential<P extends GoogleOAuthSellerCredentialPlatform>(processorName: P, payeeDetails: Hash, body: GoogleOAuthSellerCredentialUploadBodyByPlatform[P], baseApiUrl: string, opts?: {
|
|
214
|
+
apiKey?: string;
|
|
215
|
+
authToken?: string;
|
|
216
|
+
timeoutMs?: number;
|
|
217
|
+
}): Promise<CuratorSellerCredentialUploadResponse>;
|
|
213
218
|
declare function apiGetOrderbook(params: GetOrderbookParams, opts: ApiAdapterOptions): Promise<GetOrderbookResponse>;
|
|
214
219
|
declare function apiGetOrderbook(params: GetOrderbookParams, baseApiUrl: string, timeoutMs?: number, apiKey?: string): Promise<GetOrderbookResponse>;
|
|
215
220
|
declare function apiGetDepositBundle(params: GetDepositBundleParams, opts: ApiAdapterOptions): Promise<GetDepositBundleResponse>;
|
|
@@ -712,4 +717,4 @@ declare class ContractError extends ZKP2PError {
|
|
|
712
717
|
constructor(message: string, details?: unknown);
|
|
713
718
|
}
|
|
714
719
|
|
|
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 };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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,
|
|
2
|
-
export {
|
|
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';
|
|
3
3
|
import { Address, Hash, Hex, WalletClient } from 'viem';
|
|
4
4
|
import { Abi } from 'abitype';
|
|
5
5
|
import '@zkp2p/indexer-schema';
|
|
@@ -210,6 +210,11 @@ declare function apiConfirmPayPalForwarding(payeeDetails: Hash, body: {
|
|
|
210
210
|
authToken?: string;
|
|
211
211
|
timeoutMs?: number;
|
|
212
212
|
}): Promise<ConfirmPayPalForwardingResponse>;
|
|
213
|
+
declare function apiUploadGoogleOAuthSellerCredential<P extends GoogleOAuthSellerCredentialPlatform>(processorName: P, payeeDetails: Hash, body: GoogleOAuthSellerCredentialUploadBodyByPlatform[P], baseApiUrl: string, opts?: {
|
|
214
|
+
apiKey?: string;
|
|
215
|
+
authToken?: string;
|
|
216
|
+
timeoutMs?: number;
|
|
217
|
+
}): Promise<CuratorSellerCredentialUploadResponse>;
|
|
213
218
|
declare function apiGetOrderbook(params: GetOrderbookParams, opts: ApiAdapterOptions): Promise<GetOrderbookResponse>;
|
|
214
219
|
declare function apiGetOrderbook(params: GetOrderbookParams, baseApiUrl: string, timeoutMs?: number, apiKey?: string): Promise<GetOrderbookResponse>;
|
|
215
220
|
declare function apiGetDepositBundle(params: GetDepositBundleParams, opts: ApiAdapterOptions): Promise<GetDepositBundleResponse>;
|
|
@@ -712,4 +717,4 @@ declare class ContractError extends ZKP2PError {
|
|
|
712
717
|
constructor(message: string, details?: unknown);
|
|
713
718
|
}
|
|
714
719
|
|
|
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 };
|
|
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 };
|
package/dist/index.mjs
CHANGED
|
@@ -1333,8 +1333,8 @@ var IntentOperations = class {
|
|
|
1333
1333
|
intent
|
|
1334
1334
|
},
|
|
1335
1335
|
attestationServiceUrl,
|
|
1336
|
-
platformConfig.actionPlatform,
|
|
1337
|
-
platformConfig.actionType
|
|
1336
|
+
buyerTeeProof.actionPlatform ?? platformConfig.actionPlatform,
|
|
1337
|
+
buyerTeeProof.actionType ?? platformConfig.actionType
|
|
1338
1338
|
) : await apiCreatePaymentAttestation(
|
|
1339
1339
|
{
|
|
1340
1340
|
proofType: "reclaim",
|
|
@@ -1474,11 +1474,18 @@ function parseBuyerTeePaymentProofInput(proof) {
|
|
|
1474
1474
|
if (typeof proof.encryptedSessionMaterial !== "string" || !isBuyerTeeParams(proof.params)) {
|
|
1475
1475
|
throw new Error("Buyer TEE proof requires encryptedSessionMaterial and params.");
|
|
1476
1476
|
}
|
|
1477
|
-
|
|
1477
|
+
const parsed = {
|
|
1478
1478
|
proofType: "buyerTee",
|
|
1479
1479
|
encryptedSessionMaterial: proof.encryptedSessionMaterial,
|
|
1480
1480
|
params: proof.params
|
|
1481
1481
|
};
|
|
1482
|
+
if (typeof proof.actionType === "string") {
|
|
1483
|
+
parsed.actionType = proof.actionType;
|
|
1484
|
+
}
|
|
1485
|
+
if (typeof proof.actionPlatform === "string") {
|
|
1486
|
+
parsed.actionPlatform = proof.actionPlatform;
|
|
1487
|
+
}
|
|
1488
|
+
return parsed;
|
|
1482
1489
|
}
|
|
1483
1490
|
function normalizeSignalIntentReferralFees(params) {
|
|
1484
1491
|
if (params.referralFees) {
|
|
@@ -5263,6 +5270,19 @@ async function apiConfirmPayPalForwarding(payeeDetails, body, baseApiUrl, opts)
|
|
|
5263
5270
|
timeoutMs: opts?.timeoutMs
|
|
5264
5271
|
});
|
|
5265
5272
|
}
|
|
5273
|
+
async function apiUploadGoogleOAuthSellerCredential(processorName, payeeDetails, body, baseApiUrl, opts) {
|
|
5274
|
+
const endpoint = `/v2/makers/${encodeURIComponent(processorName)}/${encodeURIComponent(
|
|
5275
|
+
payeeDetails
|
|
5276
|
+
)}/seller-credential/google-oauth`;
|
|
5277
|
+
return apiFetch({
|
|
5278
|
+
url: `${withApiBase(baseApiUrl)}${endpoint}`,
|
|
5279
|
+
method: "POST",
|
|
5280
|
+
body,
|
|
5281
|
+
apiKey: opts?.apiKey,
|
|
5282
|
+
authToken: opts?.authToken,
|
|
5283
|
+
timeoutMs: opts?.timeoutMs
|
|
5284
|
+
});
|
|
5285
|
+
}
|
|
5266
5286
|
async function apiGetSellerCredentialStatus(processorName, payeeDetails, baseApiUrl, timeoutMs) {
|
|
5267
5287
|
const endpoint = `/v2/makers/${encodeURIComponent(processorName)}/${encodeURIComponent(
|
|
5268
5288
|
payeeDetails
|
|
@@ -7996,6 +8016,50 @@ var Zkp2pClient = class {
|
|
|
7996
8016
|
}
|
|
7997
8017
|
);
|
|
7998
8018
|
}
|
|
8019
|
+
/**
|
|
8020
|
+
* Upload a seller Gmail OAuth authorization code through curator.
|
|
8021
|
+
*
|
|
8022
|
+
* Curator owns the encryption hop to attestation-service for this flow, so
|
|
8023
|
+
* callers send the one-time Google code plus the stable seller identity.
|
|
8024
|
+
*/
|
|
8025
|
+
async uploadGoogleOAuthSellerCredential(params, opts) {
|
|
8026
|
+
const baseApiUrl = this.stripTrailingSlash(
|
|
8027
|
+
opts?.baseApiUrl ?? this.baseApiUrl ?? DEFAULT_BASE_API_URL
|
|
8028
|
+
);
|
|
8029
|
+
const timeoutMs = opts?.timeoutMs ?? this.apiTimeoutMs;
|
|
8030
|
+
if (params.platform === "paypal") {
|
|
8031
|
+
return apiUploadGoogleOAuthSellerCredential(
|
|
8032
|
+
"paypal",
|
|
8033
|
+
params.payeeDetails,
|
|
8034
|
+
{
|
|
8035
|
+
payeeEmail: params.payeeEmail,
|
|
8036
|
+
authorizationCode: params.authorizationCode,
|
|
8037
|
+
redirectUri: params.redirectUri
|
|
8038
|
+
},
|
|
8039
|
+
baseApiUrl,
|
|
8040
|
+
{
|
|
8041
|
+
apiKey: this.apiKey,
|
|
8042
|
+
authToken: this.authorizationToken,
|
|
8043
|
+
timeoutMs
|
|
8044
|
+
}
|
|
8045
|
+
);
|
|
8046
|
+
}
|
|
8047
|
+
return apiUploadGoogleOAuthSellerCredential(
|
|
8048
|
+
"venmo",
|
|
8049
|
+
params.payeeDetails,
|
|
8050
|
+
{
|
|
8051
|
+
accountId: params.accountId,
|
|
8052
|
+
authorizationCode: params.authorizationCode,
|
|
8053
|
+
redirectUri: params.redirectUri
|
|
8054
|
+
},
|
|
8055
|
+
baseApiUrl,
|
|
8056
|
+
{
|
|
8057
|
+
apiKey: this.apiKey,
|
|
8058
|
+
authToken: this.authorizationToken,
|
|
8059
|
+
timeoutMs
|
|
8060
|
+
}
|
|
8061
|
+
);
|
|
8062
|
+
}
|
|
7999
8063
|
/**
|
|
8000
8064
|
* Status is a coarse curator-owned signal (`active` / `inactive` / `missing`) and intentionally
|
|
8001
8065
|
* omits low-level diagnostics. Curator may still re-probe stale credentials during verify, so callers
|
|
@@ -8449,6 +8513,6 @@ var logger = {
|
|
|
8449
8513
|
}
|
|
8450
8514
|
};
|
|
8451
8515
|
|
|
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 };
|
|
8516
|
+
export { BASE_BUILDER_CODE, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ContractRouter, DEFAULT_ORACLE_MAX_STALENESS_SECONDS, IndexerClient, IndexerDepositService, IndexerRateManagerService, Zkp2pClient as OfframpClient, PAYMENT_PLATFORMS, PEER_EXTENSION_CHROME_URL, PLATFORM_METADATA, PYTH_CONTRACT_BASE, PYTH_ORACLE_ADAPTER, PYTH_ORACLE_FEEDS, SPREAD_ORACLE_FEEDS, SUPPORTED_CHAIN_IDS, TOKEN_METADATA, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, Zkp2pClient, apiConfirmPayPalForwarding, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuotesBestByPlatform, apiGetTakerTier, apiPostDepositDetails, apiUploadGoogleOAuthSellerCredential, apiValidatePayeeDetails, appendAttributionToCalldata, assertValidReferrerFeeConfig, compareEventCursorIdsByRecency, convertDepositsForLiquidity, convertIndexerDepositToEscrowView, convertIndexerIntentsToEscrowViews, createCompositeDepositId, createEncryptedBuyerTeeSessionMaterial, createPeerExtensionSdk, defaultIndexerEndpoint, encodePythAdapterConfig, encodeSpreadOracleAdapterConfig, encodeWithAttribution, fetchFulfillmentAndPayment as fetchIndexerFulfillmentAndPayment, getAttributionDataSuffix, getPeerExtensionState, getSpreadOracleConfig, isPeerExtensionAvailable, isValidReferrerFeeBps, isValidReferrerFeeRecipient, logger, openPeerExtensionInstallPage, parseReferrerFeeConfig, peerExtensionSdk, referrerFeeConfigToPreciseUnits, sendTransactionWithAttribution, setLogLevel, validateOracleFeedsOnChain };
|
|
8453
8517
|
//# sourceMappingURL=index.mjs.map
|
|
8454
8518
|
//# sourceMappingURL=index.mjs.map
|