@zkp2p/sdk 0.7.2 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -3
- package/dist/{chunk-BQINCOSO.mjs → chunk-EIOXBVXP.mjs} +3 -4
- package/dist/chunk-EIOXBVXP.mjs.map +1 -0
- package/dist/index.cjs +56 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.mjs +56 -17
- package/dist/index.mjs.map +1 -1
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.mjs +2 -2
- package/dist/{vaultUtils-CdYaZr3f.d.mts → vaultUtils-BGDsoxAv.d.mts} +13 -3
- package/dist/{vaultUtils-CdYaZr3f.d.ts → vaultUtils-BGDsoxAv.d.ts} +13 -3
- package/package.json +1 -1
- package/dist/chunk-BQINCOSO.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as ReferrerFeeConfig, S as SellerCredentialBundle, D as DepositWithRelations, I as IntentEntity, a as IdentityAttestationRequestBody, A as AttestationServiceIdentityResponse, B as BuyerTeeVerifyPaymentBody, b as AttestationServiceSellerVerifyResponse, c as SellerCredentialUploadInput, d as SellerCredentialUploadPlatform, e as SellerCredentialAttestationRuntime, f as AttestationServiceSellerCredentialUploadResponse, g as BuyerTeeSessionMaterialEncryptionInput, U as UploadSellerCredentialBundleParams, C as CuratorSellerCredentialUploadResponse, h as CreateReferralCodeRequest, i as ApiAdapterOptions, j as CreateReferralCodeResponse, k as ReferralReadRequest, l as ReferralDashboardResponse, m as ReferralEarningsResponse, n as ReferralCodeLookupResponse, o as RedeemReferralCodeRequest, p as RedeemReferralCodeResponse, q as UpdateReferralCodeRequest, r as UpdateReferralCodeResponse, G as GoogleOAuthSellerCredentialPlatform, s as GoogleOAuthSellerCredentialUploadBodyByPlatform, Q as QuotesBestByPlatformRequest, t as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, u as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, v as PostDepositDetailsResponse, w as GetPayeeDetailsRequest, x as GetPayeeDetailsResponse, y as GetOwnerDepositsRequest, z as GetOwnerDepositsResponse, E as GetTakerTierRequest, F as GetTakerTierResponse, H as GetDepositBundleParams, J as GetDepositBundleResponse, K as GetOrderbookParams, L as GetOrderbookResponse, M as CurrencyType, T as TakerTierLevel, N as PaymentMethodCatalog, O as TxOverrides } from './vaultUtils-
|
|
2
|
-
export { a7 as ActionCallback, aC as ApiDeposit, aJ as ApiIntentStatus, bi as AttestationServiceSellerCredentialProbeResponse, a5 as AuthorizationTokenProvider, cY as BatchResult, ai as BestByPlatformResponseObject, bj as BuyerTeePaymentParams, bk as BuyerTeePaymentProofInput, bl as BuyerTeeSessionMaterial, a2 as CancelIntentMethodParams, ah as CancelIntentParams, b0 as CashAppCredentialUploadInput, aU as CashAppSessionMaterial, ab as CreateDepositConversionRate, aa as CreateDepositParams, bm as CuratorSellerCredentialStatusResponse, bn as CuratorSellerVerifyResponse, cr as Currency, cy as CurrencyData, cX as DelegationDepositTarget, cV as DelegationRoute, cW as DelegationState, cJ as Deposit, cL as DepositCurrency, bH as DepositIntentStatistics, aF as DepositStatus, aD as DepositVerifier, aE as DepositVerifierCurrency, bE as DepositVerifierData, cI as DepositView, ay as FiatResponse, bh as FulfillIntentAttestationResponse, a1 as FulfillIntentMethodParams, af as FulfillIntentParams, aj as GetBestByPlatformResponse, ak as GetBestByPlatformResponseObject, aG as GetDepositByIdRequest, aH as GetDepositByIdResponse, aO as GetIntentByHashRequest, aP as GetIntentByHashResponse, aM as GetIntentsByDepositRequest, aN as GetIntentsByDepositResponse, ao as GetNearbyQuote, ap as GetNearbySuggestions, aK as GetOwnerIntentsRequest, aL as GetOwnerIntentsResponse, al as GetPlatformQuote, aq as GetQuoteResponse, ar as GetQuoteResponseObject, as as GetQuoteSingleResponse, bs as GetSellerCredentialStatusParams, bx as IdentityAttestationActionType, by as IdentityAttestationOutput, bz as IdentityAttestationOutputFor, bA as IdentityAttestationParams, bP as IndexerClient, cl as IndexerDeploymentEnv, bV as IndexerDeposit, ca as IndexerDepositDailySnapshot, cc as IndexerDepositFilter, c9 as IndexerDepositFundActivity, cb as IndexerDepositFundActivityType, cf as IndexerDepositOrderDirection, ce as IndexerDepositOrderField, cd as IndexerDepositPagination, bY as IndexerDepositPaymentMethod, bR as IndexerDepositService, co as IndexerFulfillmentAndPaymentResponse, cm as IndexerFulfillmentRecord, bW as IndexerIntentFulfilled, bX as IndexerIntentFulfillmentAmounts, b_ as IndexerIntentStatus, c2 as IndexerManagerAggregateStats, c4 as IndexerManagerDailySnapshot, c3 as IndexerManagerStats, c7 as IndexerManualRateUpdate, bZ as IndexerMethodCurrency, c8 as IndexerOracleConfigUpdate, cn as IndexerPaymentVerifiedRecord, b$ as IndexerRateManager, c1 as IndexerRateManagerDelegation, ci as IndexerRateManagerDelegationPagination, c6 as IndexerRateManagerDetail, cg as IndexerRateManagerFilter, c5 as IndexerRateManagerListItem, ck as IndexerRateManagerOrderDirection, cj as IndexerRateManagerOrderField, ch as IndexerRateManagerPagination, c0 as IndexerRateManagerRate, bS as IndexerRateManagerService, aI as Intent, cN as IntentView, bB as MakerIdentityAttestationRequestBody, bC as MakerIdentityPlatform, aA as NearbyQuote, aB as NearbySuggestions, Z as OfframpClient, bD as OnchainCurrency, cO as OnchainIntent, bG as OrderStats, bO as OrderbookEntry, cp as PAYMENT_PLATFORMS, aZ as PayPalGoogleOAuthSellerCredentialUploadBody, cK as PaymentMethodData, cq as PaymentPlatformType, bM as PlatformLimit, am as PlatformQuote, bN as PlatformRiskLevel, bF as PreparedTransaction, ax as QuoteFeesResponse, aw as QuoteIntentResponse, an as QuoteRequest, at as QuoteResponse, au as QuoteResponseObject, av as QuoteSingleResponse, ac as Range, _ as RedeemReferralCodeSignatureOptions, W as ReferralBearerWriteOptions, cM as ReferralFee, X as ReferralReadOptions, a8 as ReferralRedemption, a9 as ReferralSignatureBody, Y as ReferralSignatureOptions, aQ as RegisterPayeeDetailsRequest, aR as RegisterPayeeDetailsResponse, bo as RegisteredSellerCredentialPlatform, bq as RegisteredUploadSellerCredentialParams, ag as ReleaseFundsToPayerParams, cD as RuntimeEnv, bf as SellerAttestationOutput, b3 as SellerCiphertextBundle, b8 as SellerCredentialBundleUpload, bg as SellerCredentialProbeResponse, ba as SellerCredentialStatus, b9 as SellerCredentialStatusValue, b2 as SellerCredentialUploadInputByPlatform, be as SellerPaymentTypedDataValue, aS as SellerPlatform, b7 as SellerProbeInput, b4 as SellerSignedCiphertextBundle, bc as SellerTypedDataField, bd as SellerTypedDataSpec, b6 as SellerVerifyInput, b5 as SellerVerifyIntentDetails, bb as SellerVerifyProxyBody, c_ as SendBatchFn, cZ as SendTransactionFn, a0 as SignalIntentMethodParams, ae as SignalIntentParams, $ as SignalIntentReferralFee, bI as TakerTier, bL as TakerTierSource, bK as TakerTierStats, bJ as TakerTierVolumeBreakdown, a6 as TimeoutConfig, az as TokenResponse, a3 as UpdateReferralCodeSignatureOptions, bv as UploadGoogleOAuthSellerCredentialParams, bt as UploadPayPalGoogleOAuthSellerCredentialParams, br as UploadSellerCredentialOptions, bp as UploadSellerCredentialParams, bu as UploadVenmoGoogleOAuthSellerCredentialParams, a$ as VenmoCredentialUploadInput, a_ as VenmoGoogleOAuthSellerCredentialUploadBody, aT as VenmoSessionMaterial, bw as VerifySellerPaymentParams, b1 as WiseCredentialUploadInput, aW as WiseProfileInfo, aY as WiseProfileNotFound, aX as WiseProfileSelectionRequired, aV as WiseSessionMaterial, ad as WithdrawDepositParams, cP as ZERO_RATE_MANAGER_ID, Z as Zkp2pClient, a4 as Zkp2pClientOptions, cU as classifyDelegationState, bT as compareEventCursorIdsByRecency, cs as currencyInfo, bQ as defaultIndexerEndpoint, cG as enrichPvDepositView, cH as enrichPvIntentView, bU as fetchIndexerFulfillmentAndPayment, cz as getContracts, cv as getCurrencyCodeFromHash, cu as getCurrencyInfoFromCountryCode, ct as getCurrencyInfoFromHash, cT as getDelegationRoute, cC as getGatingServiceAddress, cB as getPaymentMethodsCatalog, cA as getRateManagerContracts, cw as isSupportedCurrencyHash, cQ as isZeroRateManagerId, cx as mapConversionRatesToOnchainMinRate, cR as normalizeRateManagerId, cS as normalizeRegistry, cE as parseDepositView, cF as parseIntentView } from './vaultUtils-
|
|
1
|
+
import { R as ReferrerFeeConfig, S as SellerCredentialBundle, D as DepositWithRelations, I as IntentEntity, a as IdentityAttestationRequestBody, A as AttestationServiceIdentityResponse, B as BuyerTeeVerifyPaymentBody, b as AttestationServiceSellerVerifyResponse, c as SellerCredentialUploadInput, d as SellerCredentialUploadPlatform, e as SellerCredentialAttestationRuntime, f as AttestationServiceSellerCredentialUploadResponse, g as BuyerTeeSessionMaterialEncryptionInput, U as UploadSellerCredentialBundleParams, C as CuratorSellerCredentialUploadResponse, h as CreateReferralCodeRequest, i as ApiAdapterOptions, j as CreateReferralCodeResponse, k as ReferralReadRequest, l as ReferralDashboardResponse, m as ReferralEarningsResponse, n as ReferralCodeLookupResponse, o as RedeemReferralCodeRequest, p as RedeemReferralCodeResponse, q as UpdateReferralCodeRequest, r as UpdateReferralCodeResponse, G as GoogleOAuthSellerCredentialPlatform, s as GoogleOAuthSellerCredentialUploadBodyByPlatform, Q as QuotesBestByPlatformRequest, t as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, u as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, v as PostDepositDetailsResponse, w as GetPayeeDetailsRequest, x as GetPayeeDetailsResponse, y as GetOwnerDepositsRequest, z as GetOwnerDepositsResponse, E as GetTakerTierRequest, F as GetTakerTierResponse, H as GetDepositBundleParams, J as GetDepositBundleResponse, K as GetOrderbookParams, L as GetOrderbookResponse, M as CurrencyType, T as TakerTierLevel, N as PaymentMethodCatalog, O as TxOverrides } from './vaultUtils-BGDsoxAv.mjs';
|
|
2
|
+
export { a7 as ActionCallback, aC as ApiDeposit, aJ as ApiIntentStatus, bi as AttestationServiceSellerCredentialProbeResponse, a5 as AuthorizationTokenProvider, cY as BatchResult, ai as BestByPlatformResponseObject, bj as BuyerTeePaymentParams, bk as BuyerTeePaymentProofInput, bl as BuyerTeeSessionMaterial, a2 as CancelIntentMethodParams, ah as CancelIntentParams, b0 as CashAppCredentialUploadInput, aU as CashAppSessionMaterial, ab as CreateDepositConversionRate, aa as CreateDepositParams, bm as CuratorSellerCredentialStatusResponse, bn as CuratorSellerVerifyResponse, cr as Currency, cy as CurrencyData, cX as DelegationDepositTarget, cV as DelegationRoute, cW as DelegationState, cJ as Deposit, cL as DepositCurrency, bH as DepositIntentStatistics, aF as DepositStatus, aD as DepositVerifier, aE as DepositVerifierCurrency, bE as DepositVerifierData, cI as DepositView, ay as FiatResponse, bh as FulfillIntentAttestationResponse, a1 as FulfillIntentMethodParams, af as FulfillIntentParams, aj as GetBestByPlatformResponse, ak as GetBestByPlatformResponseObject, aG as GetDepositByIdRequest, aH as GetDepositByIdResponse, aO as GetIntentByHashRequest, aP as GetIntentByHashResponse, aM as GetIntentsByDepositRequest, aN as GetIntentsByDepositResponse, ao as GetNearbyQuote, ap as GetNearbySuggestions, aK as GetOwnerIntentsRequest, aL as GetOwnerIntentsResponse, al as GetPlatformQuote, aq as GetQuoteResponse, ar as GetQuoteResponseObject, as as GetQuoteSingleResponse, bs as GetSellerCredentialStatusParams, bx as IdentityAttestationActionType, by as IdentityAttestationOutput, bz as IdentityAttestationOutputFor, bA as IdentityAttestationParams, bP as IndexerClient, cl as IndexerDeploymentEnv, bV as IndexerDeposit, ca as IndexerDepositDailySnapshot, cc as IndexerDepositFilter, c9 as IndexerDepositFundActivity, cb as IndexerDepositFundActivityType, cf as IndexerDepositOrderDirection, ce as IndexerDepositOrderField, cd as IndexerDepositPagination, bY as IndexerDepositPaymentMethod, bR as IndexerDepositService, co as IndexerFulfillmentAndPaymentResponse, cm as IndexerFulfillmentRecord, bW as IndexerIntentFulfilled, bX as IndexerIntentFulfillmentAmounts, b_ as IndexerIntentStatus, c2 as IndexerManagerAggregateStats, c4 as IndexerManagerDailySnapshot, c3 as IndexerManagerStats, c7 as IndexerManualRateUpdate, bZ as IndexerMethodCurrency, c8 as IndexerOracleConfigUpdate, cn as IndexerPaymentVerifiedRecord, b$ as IndexerRateManager, c1 as IndexerRateManagerDelegation, ci as IndexerRateManagerDelegationPagination, c6 as IndexerRateManagerDetail, cg as IndexerRateManagerFilter, c5 as IndexerRateManagerListItem, ck as IndexerRateManagerOrderDirection, cj as IndexerRateManagerOrderField, ch as IndexerRateManagerPagination, c0 as IndexerRateManagerRate, bS as IndexerRateManagerService, aI as Intent, cN as IntentView, bB as MakerIdentityAttestationRequestBody, bC as MakerIdentityPlatform, aA as NearbyQuote, aB as NearbySuggestions, Z as OfframpClient, bD as OnchainCurrency, cO as OnchainIntent, bG as OrderStats, bO as OrderbookEntry, cp as PAYMENT_PLATFORMS, aZ as PayPalGoogleOAuthSellerCredentialUploadBody, cK as PaymentMethodData, cq as PaymentPlatformType, bM as PlatformLimit, am as PlatformQuote, bN as PlatformRiskLevel, bF as PreparedTransaction, ax as QuoteFeesResponse, aw as QuoteIntentResponse, an as QuoteRequest, at as QuoteResponse, au as QuoteResponseObject, av as QuoteSingleResponse, ac as Range, _ as RedeemReferralCodeSignatureOptions, W as ReferralBearerWriteOptions, cM as ReferralFee, X as ReferralReadOptions, a8 as ReferralRedemption, a9 as ReferralSignatureBody, Y as ReferralSignatureOptions, aQ as RegisterPayeeDetailsRequest, aR as RegisterPayeeDetailsResponse, bo as RegisteredSellerCredentialPlatform, bq as RegisteredUploadSellerCredentialParams, ag as ReleaseFundsToPayerParams, cD as RuntimeEnv, bf as SellerAttestationOutput, b3 as SellerCiphertextBundle, b8 as SellerCredentialBundleUpload, bg as SellerCredentialProbeResponse, ba as SellerCredentialStatus, b9 as SellerCredentialStatusValue, b2 as SellerCredentialUploadInputByPlatform, be as SellerPaymentTypedDataValue, aS as SellerPlatform, b7 as SellerProbeInput, b4 as SellerSignedCiphertextBundle, bc as SellerTypedDataField, bd as SellerTypedDataSpec, b6 as SellerVerifyInput, b5 as SellerVerifyIntentDetails, bb as SellerVerifyProxyBody, c_ as SendBatchFn, cZ as SendTransactionFn, a0 as SignalIntentMethodParams, ae as SignalIntentParams, $ as SignalIntentReferralFee, bI as TakerTier, bL as TakerTierSource, bK as TakerTierStats, bJ as TakerTierVolumeBreakdown, a6 as TimeoutConfig, az as TokenResponse, a3 as UpdateReferralCodeSignatureOptions, bv as UploadGoogleOAuthSellerCredentialParams, bt as UploadPayPalGoogleOAuthSellerCredentialParams, br as UploadSellerCredentialOptions, bp as UploadSellerCredentialParams, bu as UploadVenmoGoogleOAuthSellerCredentialParams, a$ as VenmoCredentialUploadInput, a_ as VenmoGoogleOAuthSellerCredentialUploadBody, aT as VenmoSessionMaterial, bw as VerifySellerPaymentParams, b1 as WiseCredentialUploadInput, aW as WiseProfileInfo, aY as WiseProfileNotFound, aX as WiseProfileSelectionRequired, aV as WiseSessionMaterial, ad as WithdrawDepositParams, cP as ZERO_RATE_MANAGER_ID, Z as Zkp2pClient, a4 as Zkp2pClientOptions, cU as classifyDelegationState, bT as compareEventCursorIdsByRecency, cs as currencyInfo, bQ as defaultIndexerEndpoint, cG as enrichPvDepositView, cH as enrichPvIntentView, bU as fetchIndexerFulfillmentAndPayment, cz as getContracts, cv as getCurrencyCodeFromHash, cu as getCurrencyInfoFromCountryCode, ct as getCurrencyInfoFromHash, cT as getDelegationRoute, cC as getGatingServiceAddress, cB as getPaymentMethodsCatalog, cA as getRateManagerContracts, cw as isSupportedCurrencyHash, cQ as isZeroRateManagerId, cx as mapConversionRatesToOnchainMinRate, cR as normalizeRateManagerId, cS as normalizeRegistry, cE as parseDepositView, cF as parseIntentView } from './vaultUtils-BGDsoxAv.mjs';
|
|
3
3
|
import { Address, Hash, Hex, WalletClient } from 'viem';
|
|
4
4
|
import { Abi } from 'abitype';
|
|
5
5
|
export { IdentityActionType, IdentityActionTypeByPlatform, IdentityParamsByPlatform, IdentityPlatform, NitroAttestationClient, NitroAttestationClientOptions, NitroAttestationEnvironment, VerifiedAttestation, VerifiedAttestationPayload, createNitroAttestationClient } from '@zkp2p/zkp2p-attestation';
|
|
@@ -185,6 +185,7 @@ type PeerAuthenticateParams = {
|
|
|
185
185
|
attestationActionType?: string | null;
|
|
186
186
|
attestationPlatform?: string | null;
|
|
187
187
|
attestationServiceUrl?: string | null;
|
|
188
|
+
callerAddress?: string | null;
|
|
188
189
|
captureMode?: PeerMetadataCaptureMode;
|
|
189
190
|
platform: string;
|
|
190
191
|
providerConfig?: PeerMetadataProviderConfig;
|
|
@@ -269,7 +270,7 @@ declare function apiCreateSellerCredentialBundle(payload: SellerCredentialUpload
|
|
|
269
270
|
/**
|
|
270
271
|
* Store an already-encrypted seller credential bundle with curator.
|
|
271
272
|
*/
|
|
272
|
-
declare function apiUploadSellerCredentialBundle(params: UploadSellerCredentialBundleParams, baseApiUrl?: string | null, timeoutMs?: number): Promise<CuratorSellerCredentialUploadResponse>;
|
|
273
|
+
declare function apiUploadSellerCredentialBundle(params: UploadSellerCredentialBundleParams, baseApiUrl?: string | null, timeoutMs?: number, authorizationToken?: string): Promise<CuratorSellerCredentialUploadResponse>;
|
|
273
274
|
|
|
274
275
|
declare function apiPostDepositDetails(req: PostDepositDetailsRequest, baseApiUrl: string, timeoutMs?: number): Promise<PostDepositDetailsResponse>;
|
|
275
276
|
declare function apiGetQuotesBestByPlatform(req: QuotesBestByPlatformRequest, baseApiUrl: string, timeoutMs?: number, apiKey?: string): Promise<BestByPlatformResponse>;
|
|
@@ -288,6 +289,7 @@ declare function apiRedeemReferralCode(req: RedeemReferralCodeRequest, opts: Api
|
|
|
288
289
|
declare function apiUpdateReferralCode(req: UpdateReferralCodeRequest, opts: ApiAdapterOptions): Promise<UpdateReferralCodeResponse>;
|
|
289
290
|
declare function apiUploadGoogleOAuthSellerCredential<P extends GoogleOAuthSellerCredentialPlatform>(processorName: P, payeeDetails: Hash, body: GoogleOAuthSellerCredentialUploadBodyByPlatform[P], baseApiUrl: string, opts?: {
|
|
290
291
|
timeoutMs?: number;
|
|
292
|
+
authorizationToken?: string;
|
|
291
293
|
}): Promise<CuratorSellerCredentialUploadResponse>;
|
|
292
294
|
declare function apiGetOrderbook(params: GetOrderbookParams, opts: ApiAdapterOptions): Promise<GetOrderbookResponse>;
|
|
293
295
|
declare function apiGetOrderbook(params: GetOrderbookParams, baseApiUrl: string, timeoutMs?: number): Promise<GetOrderbookResponse>;
|
|
@@ -537,7 +539,6 @@ declare const TOKEN_METADATA: {
|
|
|
537
539
|
* inputs behind the compatibility fields without changing this reference table.
|
|
538
540
|
*
|
|
539
541
|
* Ordered highest tier → lowest (PLATINUM first) to match UI display order.
|
|
540
|
-
* PEER_PRESIDENT is invite-only and excluded from the volume ladder.
|
|
541
542
|
*/
|
|
542
543
|
interface TakerTierScheduleEntry {
|
|
543
544
|
tier: TakerTierLevel;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as ReferrerFeeConfig, S as SellerCredentialBundle, D as DepositWithRelations, I as IntentEntity, a as IdentityAttestationRequestBody, A as AttestationServiceIdentityResponse, B as BuyerTeeVerifyPaymentBody, b as AttestationServiceSellerVerifyResponse, c as SellerCredentialUploadInput, d as SellerCredentialUploadPlatform, e as SellerCredentialAttestationRuntime, f as AttestationServiceSellerCredentialUploadResponse, g as BuyerTeeSessionMaterialEncryptionInput, U as UploadSellerCredentialBundleParams, C as CuratorSellerCredentialUploadResponse, h as CreateReferralCodeRequest, i as ApiAdapterOptions, j as CreateReferralCodeResponse, k as ReferralReadRequest, l as ReferralDashboardResponse, m as ReferralEarningsResponse, n as ReferralCodeLookupResponse, o as RedeemReferralCodeRequest, p as RedeemReferralCodeResponse, q as UpdateReferralCodeRequest, r as UpdateReferralCodeResponse, G as GoogleOAuthSellerCredentialPlatform, s as GoogleOAuthSellerCredentialUploadBodyByPlatform, Q as QuotesBestByPlatformRequest, t as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, u as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, v as PostDepositDetailsResponse, w as GetPayeeDetailsRequest, x as GetPayeeDetailsResponse, y as GetOwnerDepositsRequest, z as GetOwnerDepositsResponse, E as GetTakerTierRequest, F as GetTakerTierResponse, H as GetDepositBundleParams, J as GetDepositBundleResponse, K as GetOrderbookParams, L as GetOrderbookResponse, M as CurrencyType, T as TakerTierLevel, N as PaymentMethodCatalog, O as TxOverrides } from './vaultUtils-
|
|
2
|
-
export { a7 as ActionCallback, aC as ApiDeposit, aJ as ApiIntentStatus, bi as AttestationServiceSellerCredentialProbeResponse, a5 as AuthorizationTokenProvider, cY as BatchResult, ai as BestByPlatformResponseObject, bj as BuyerTeePaymentParams, bk as BuyerTeePaymentProofInput, bl as BuyerTeeSessionMaterial, a2 as CancelIntentMethodParams, ah as CancelIntentParams, b0 as CashAppCredentialUploadInput, aU as CashAppSessionMaterial, ab as CreateDepositConversionRate, aa as CreateDepositParams, bm as CuratorSellerCredentialStatusResponse, bn as CuratorSellerVerifyResponse, cr as Currency, cy as CurrencyData, cX as DelegationDepositTarget, cV as DelegationRoute, cW as DelegationState, cJ as Deposit, cL as DepositCurrency, bH as DepositIntentStatistics, aF as DepositStatus, aD as DepositVerifier, aE as DepositVerifierCurrency, bE as DepositVerifierData, cI as DepositView, ay as FiatResponse, bh as FulfillIntentAttestationResponse, a1 as FulfillIntentMethodParams, af as FulfillIntentParams, aj as GetBestByPlatformResponse, ak as GetBestByPlatformResponseObject, aG as GetDepositByIdRequest, aH as GetDepositByIdResponse, aO as GetIntentByHashRequest, aP as GetIntentByHashResponse, aM as GetIntentsByDepositRequest, aN as GetIntentsByDepositResponse, ao as GetNearbyQuote, ap as GetNearbySuggestions, aK as GetOwnerIntentsRequest, aL as GetOwnerIntentsResponse, al as GetPlatformQuote, aq as GetQuoteResponse, ar as GetQuoteResponseObject, as as GetQuoteSingleResponse, bs as GetSellerCredentialStatusParams, bx as IdentityAttestationActionType, by as IdentityAttestationOutput, bz as IdentityAttestationOutputFor, bA as IdentityAttestationParams, bP as IndexerClient, cl as IndexerDeploymentEnv, bV as IndexerDeposit, ca as IndexerDepositDailySnapshot, cc as IndexerDepositFilter, c9 as IndexerDepositFundActivity, cb as IndexerDepositFundActivityType, cf as IndexerDepositOrderDirection, ce as IndexerDepositOrderField, cd as IndexerDepositPagination, bY as IndexerDepositPaymentMethod, bR as IndexerDepositService, co as IndexerFulfillmentAndPaymentResponse, cm as IndexerFulfillmentRecord, bW as IndexerIntentFulfilled, bX as IndexerIntentFulfillmentAmounts, b_ as IndexerIntentStatus, c2 as IndexerManagerAggregateStats, c4 as IndexerManagerDailySnapshot, c3 as IndexerManagerStats, c7 as IndexerManualRateUpdate, bZ as IndexerMethodCurrency, c8 as IndexerOracleConfigUpdate, cn as IndexerPaymentVerifiedRecord, b$ as IndexerRateManager, c1 as IndexerRateManagerDelegation, ci as IndexerRateManagerDelegationPagination, c6 as IndexerRateManagerDetail, cg as IndexerRateManagerFilter, c5 as IndexerRateManagerListItem, ck as IndexerRateManagerOrderDirection, cj as IndexerRateManagerOrderField, ch as IndexerRateManagerPagination, c0 as IndexerRateManagerRate, bS as IndexerRateManagerService, aI as Intent, cN as IntentView, bB as MakerIdentityAttestationRequestBody, bC as MakerIdentityPlatform, aA as NearbyQuote, aB as NearbySuggestions, Z as OfframpClient, bD as OnchainCurrency, cO as OnchainIntent, bG as OrderStats, bO as OrderbookEntry, cp as PAYMENT_PLATFORMS, aZ as PayPalGoogleOAuthSellerCredentialUploadBody, cK as PaymentMethodData, cq as PaymentPlatformType, bM as PlatformLimit, am as PlatformQuote, bN as PlatformRiskLevel, bF as PreparedTransaction, ax as QuoteFeesResponse, aw as QuoteIntentResponse, an as QuoteRequest, at as QuoteResponse, au as QuoteResponseObject, av as QuoteSingleResponse, ac as Range, _ as RedeemReferralCodeSignatureOptions, W as ReferralBearerWriteOptions, cM as ReferralFee, X as ReferralReadOptions, a8 as ReferralRedemption, a9 as ReferralSignatureBody, Y as ReferralSignatureOptions, aQ as RegisterPayeeDetailsRequest, aR as RegisterPayeeDetailsResponse, bo as RegisteredSellerCredentialPlatform, bq as RegisteredUploadSellerCredentialParams, ag as ReleaseFundsToPayerParams, cD as RuntimeEnv, bf as SellerAttestationOutput, b3 as SellerCiphertextBundle, b8 as SellerCredentialBundleUpload, bg as SellerCredentialProbeResponse, ba as SellerCredentialStatus, b9 as SellerCredentialStatusValue, b2 as SellerCredentialUploadInputByPlatform, be as SellerPaymentTypedDataValue, aS as SellerPlatform, b7 as SellerProbeInput, b4 as SellerSignedCiphertextBundle, bc as SellerTypedDataField, bd as SellerTypedDataSpec, b6 as SellerVerifyInput, b5 as SellerVerifyIntentDetails, bb as SellerVerifyProxyBody, c_ as SendBatchFn, cZ as SendTransactionFn, a0 as SignalIntentMethodParams, ae as SignalIntentParams, $ as SignalIntentReferralFee, bI as TakerTier, bL as TakerTierSource, bK as TakerTierStats, bJ as TakerTierVolumeBreakdown, a6 as TimeoutConfig, az as TokenResponse, a3 as UpdateReferralCodeSignatureOptions, bv as UploadGoogleOAuthSellerCredentialParams, bt as UploadPayPalGoogleOAuthSellerCredentialParams, br as UploadSellerCredentialOptions, bp as UploadSellerCredentialParams, bu as UploadVenmoGoogleOAuthSellerCredentialParams, a$ as VenmoCredentialUploadInput, a_ as VenmoGoogleOAuthSellerCredentialUploadBody, aT as VenmoSessionMaterial, bw as VerifySellerPaymentParams, b1 as WiseCredentialUploadInput, aW as WiseProfileInfo, aY as WiseProfileNotFound, aX as WiseProfileSelectionRequired, aV as WiseSessionMaterial, ad as WithdrawDepositParams, cP as ZERO_RATE_MANAGER_ID, Z as Zkp2pClient, a4 as Zkp2pClientOptions, cU as classifyDelegationState, bT as compareEventCursorIdsByRecency, cs as currencyInfo, bQ as defaultIndexerEndpoint, cG as enrichPvDepositView, cH as enrichPvIntentView, bU as fetchIndexerFulfillmentAndPayment, cz as getContracts, cv as getCurrencyCodeFromHash, cu as getCurrencyInfoFromCountryCode, ct as getCurrencyInfoFromHash, cT as getDelegationRoute, cC as getGatingServiceAddress, cB as getPaymentMethodsCatalog, cA as getRateManagerContracts, cw as isSupportedCurrencyHash, cQ as isZeroRateManagerId, cx as mapConversionRatesToOnchainMinRate, cR as normalizeRateManagerId, cS as normalizeRegistry, cE as parseDepositView, cF as parseIntentView } from './vaultUtils-
|
|
1
|
+
import { R as ReferrerFeeConfig, S as SellerCredentialBundle, D as DepositWithRelations, I as IntentEntity, a as IdentityAttestationRequestBody, A as AttestationServiceIdentityResponse, B as BuyerTeeVerifyPaymentBody, b as AttestationServiceSellerVerifyResponse, c as SellerCredentialUploadInput, d as SellerCredentialUploadPlatform, e as SellerCredentialAttestationRuntime, f as AttestationServiceSellerCredentialUploadResponse, g as BuyerTeeSessionMaterialEncryptionInput, U as UploadSellerCredentialBundleParams, C as CuratorSellerCredentialUploadResponse, h as CreateReferralCodeRequest, i as ApiAdapterOptions, j as CreateReferralCodeResponse, k as ReferralReadRequest, l as ReferralDashboardResponse, m as ReferralEarningsResponse, n as ReferralCodeLookupResponse, o as RedeemReferralCodeRequest, p as RedeemReferralCodeResponse, q as UpdateReferralCodeRequest, r as UpdateReferralCodeResponse, G as GoogleOAuthSellerCredentialPlatform, s as GoogleOAuthSellerCredentialUploadBodyByPlatform, Q as QuotesBestByPlatformRequest, t as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, u as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, v as PostDepositDetailsResponse, w as GetPayeeDetailsRequest, x as GetPayeeDetailsResponse, y as GetOwnerDepositsRequest, z as GetOwnerDepositsResponse, E as GetTakerTierRequest, F as GetTakerTierResponse, H as GetDepositBundleParams, J as GetDepositBundleResponse, K as GetOrderbookParams, L as GetOrderbookResponse, M as CurrencyType, T as TakerTierLevel, N as PaymentMethodCatalog, O as TxOverrides } from './vaultUtils-BGDsoxAv.js';
|
|
2
|
+
export { a7 as ActionCallback, aC as ApiDeposit, aJ as ApiIntentStatus, bi as AttestationServiceSellerCredentialProbeResponse, a5 as AuthorizationTokenProvider, cY as BatchResult, ai as BestByPlatformResponseObject, bj as BuyerTeePaymentParams, bk as BuyerTeePaymentProofInput, bl as BuyerTeeSessionMaterial, a2 as CancelIntentMethodParams, ah as CancelIntentParams, b0 as CashAppCredentialUploadInput, aU as CashAppSessionMaterial, ab as CreateDepositConversionRate, aa as CreateDepositParams, bm as CuratorSellerCredentialStatusResponse, bn as CuratorSellerVerifyResponse, cr as Currency, cy as CurrencyData, cX as DelegationDepositTarget, cV as DelegationRoute, cW as DelegationState, cJ as Deposit, cL as DepositCurrency, bH as DepositIntentStatistics, aF as DepositStatus, aD as DepositVerifier, aE as DepositVerifierCurrency, bE as DepositVerifierData, cI as DepositView, ay as FiatResponse, bh as FulfillIntentAttestationResponse, a1 as FulfillIntentMethodParams, af as FulfillIntentParams, aj as GetBestByPlatformResponse, ak as GetBestByPlatformResponseObject, aG as GetDepositByIdRequest, aH as GetDepositByIdResponse, aO as GetIntentByHashRequest, aP as GetIntentByHashResponse, aM as GetIntentsByDepositRequest, aN as GetIntentsByDepositResponse, ao as GetNearbyQuote, ap as GetNearbySuggestions, aK as GetOwnerIntentsRequest, aL as GetOwnerIntentsResponse, al as GetPlatformQuote, aq as GetQuoteResponse, ar as GetQuoteResponseObject, as as GetQuoteSingleResponse, bs as GetSellerCredentialStatusParams, bx as IdentityAttestationActionType, by as IdentityAttestationOutput, bz as IdentityAttestationOutputFor, bA as IdentityAttestationParams, bP as IndexerClient, cl as IndexerDeploymentEnv, bV as IndexerDeposit, ca as IndexerDepositDailySnapshot, cc as IndexerDepositFilter, c9 as IndexerDepositFundActivity, cb as IndexerDepositFundActivityType, cf as IndexerDepositOrderDirection, ce as IndexerDepositOrderField, cd as IndexerDepositPagination, bY as IndexerDepositPaymentMethod, bR as IndexerDepositService, co as IndexerFulfillmentAndPaymentResponse, cm as IndexerFulfillmentRecord, bW as IndexerIntentFulfilled, bX as IndexerIntentFulfillmentAmounts, b_ as IndexerIntentStatus, c2 as IndexerManagerAggregateStats, c4 as IndexerManagerDailySnapshot, c3 as IndexerManagerStats, c7 as IndexerManualRateUpdate, bZ as IndexerMethodCurrency, c8 as IndexerOracleConfigUpdate, cn as IndexerPaymentVerifiedRecord, b$ as IndexerRateManager, c1 as IndexerRateManagerDelegation, ci as IndexerRateManagerDelegationPagination, c6 as IndexerRateManagerDetail, cg as IndexerRateManagerFilter, c5 as IndexerRateManagerListItem, ck as IndexerRateManagerOrderDirection, cj as IndexerRateManagerOrderField, ch as IndexerRateManagerPagination, c0 as IndexerRateManagerRate, bS as IndexerRateManagerService, aI as Intent, cN as IntentView, bB as MakerIdentityAttestationRequestBody, bC as MakerIdentityPlatform, aA as NearbyQuote, aB as NearbySuggestions, Z as OfframpClient, bD as OnchainCurrency, cO as OnchainIntent, bG as OrderStats, bO as OrderbookEntry, cp as PAYMENT_PLATFORMS, aZ as PayPalGoogleOAuthSellerCredentialUploadBody, cK as PaymentMethodData, cq as PaymentPlatformType, bM as PlatformLimit, am as PlatformQuote, bN as PlatformRiskLevel, bF as PreparedTransaction, ax as QuoteFeesResponse, aw as QuoteIntentResponse, an as QuoteRequest, at as QuoteResponse, au as QuoteResponseObject, av as QuoteSingleResponse, ac as Range, _ as RedeemReferralCodeSignatureOptions, W as ReferralBearerWriteOptions, cM as ReferralFee, X as ReferralReadOptions, a8 as ReferralRedemption, a9 as ReferralSignatureBody, Y as ReferralSignatureOptions, aQ as RegisterPayeeDetailsRequest, aR as RegisterPayeeDetailsResponse, bo as RegisteredSellerCredentialPlatform, bq as RegisteredUploadSellerCredentialParams, ag as ReleaseFundsToPayerParams, cD as RuntimeEnv, bf as SellerAttestationOutput, b3 as SellerCiphertextBundle, b8 as SellerCredentialBundleUpload, bg as SellerCredentialProbeResponse, ba as SellerCredentialStatus, b9 as SellerCredentialStatusValue, b2 as SellerCredentialUploadInputByPlatform, be as SellerPaymentTypedDataValue, aS as SellerPlatform, b7 as SellerProbeInput, b4 as SellerSignedCiphertextBundle, bc as SellerTypedDataField, bd as SellerTypedDataSpec, b6 as SellerVerifyInput, b5 as SellerVerifyIntentDetails, bb as SellerVerifyProxyBody, c_ as SendBatchFn, cZ as SendTransactionFn, a0 as SignalIntentMethodParams, ae as SignalIntentParams, $ as SignalIntentReferralFee, bI as TakerTier, bL as TakerTierSource, bK as TakerTierStats, bJ as TakerTierVolumeBreakdown, a6 as TimeoutConfig, az as TokenResponse, a3 as UpdateReferralCodeSignatureOptions, bv as UploadGoogleOAuthSellerCredentialParams, bt as UploadPayPalGoogleOAuthSellerCredentialParams, br as UploadSellerCredentialOptions, bp as UploadSellerCredentialParams, bu as UploadVenmoGoogleOAuthSellerCredentialParams, a$ as VenmoCredentialUploadInput, a_ as VenmoGoogleOAuthSellerCredentialUploadBody, aT as VenmoSessionMaterial, bw as VerifySellerPaymentParams, b1 as WiseCredentialUploadInput, aW as WiseProfileInfo, aY as WiseProfileNotFound, aX as WiseProfileSelectionRequired, aV as WiseSessionMaterial, ad as WithdrawDepositParams, cP as ZERO_RATE_MANAGER_ID, Z as Zkp2pClient, a4 as Zkp2pClientOptions, cU as classifyDelegationState, bT as compareEventCursorIdsByRecency, cs as currencyInfo, bQ as defaultIndexerEndpoint, cG as enrichPvDepositView, cH as enrichPvIntentView, bU as fetchIndexerFulfillmentAndPayment, cz as getContracts, cv as getCurrencyCodeFromHash, cu as getCurrencyInfoFromCountryCode, ct as getCurrencyInfoFromHash, cT as getDelegationRoute, cC as getGatingServiceAddress, cB as getPaymentMethodsCatalog, cA as getRateManagerContracts, cw as isSupportedCurrencyHash, cQ as isZeroRateManagerId, cx as mapConversionRatesToOnchainMinRate, cR as normalizeRateManagerId, cS as normalizeRegistry, cE as parseDepositView, cF as parseIntentView } from './vaultUtils-BGDsoxAv.js';
|
|
3
3
|
import { Address, Hash, Hex, WalletClient } from 'viem';
|
|
4
4
|
import { Abi } from 'abitype';
|
|
5
5
|
export { IdentityActionType, IdentityActionTypeByPlatform, IdentityParamsByPlatform, IdentityPlatform, NitroAttestationClient, NitroAttestationClientOptions, NitroAttestationEnvironment, VerifiedAttestation, VerifiedAttestationPayload, createNitroAttestationClient } from '@zkp2p/zkp2p-attestation';
|
|
@@ -185,6 +185,7 @@ type PeerAuthenticateParams = {
|
|
|
185
185
|
attestationActionType?: string | null;
|
|
186
186
|
attestationPlatform?: string | null;
|
|
187
187
|
attestationServiceUrl?: string | null;
|
|
188
|
+
callerAddress?: string | null;
|
|
188
189
|
captureMode?: PeerMetadataCaptureMode;
|
|
189
190
|
platform: string;
|
|
190
191
|
providerConfig?: PeerMetadataProviderConfig;
|
|
@@ -269,7 +270,7 @@ declare function apiCreateSellerCredentialBundle(payload: SellerCredentialUpload
|
|
|
269
270
|
/**
|
|
270
271
|
* Store an already-encrypted seller credential bundle with curator.
|
|
271
272
|
*/
|
|
272
|
-
declare function apiUploadSellerCredentialBundle(params: UploadSellerCredentialBundleParams, baseApiUrl?: string | null, timeoutMs?: number): Promise<CuratorSellerCredentialUploadResponse>;
|
|
273
|
+
declare function apiUploadSellerCredentialBundle(params: UploadSellerCredentialBundleParams, baseApiUrl?: string | null, timeoutMs?: number, authorizationToken?: string): Promise<CuratorSellerCredentialUploadResponse>;
|
|
273
274
|
|
|
274
275
|
declare function apiPostDepositDetails(req: PostDepositDetailsRequest, baseApiUrl: string, timeoutMs?: number): Promise<PostDepositDetailsResponse>;
|
|
275
276
|
declare function apiGetQuotesBestByPlatform(req: QuotesBestByPlatformRequest, baseApiUrl: string, timeoutMs?: number, apiKey?: string): Promise<BestByPlatformResponse>;
|
|
@@ -288,6 +289,7 @@ declare function apiRedeemReferralCode(req: RedeemReferralCodeRequest, opts: Api
|
|
|
288
289
|
declare function apiUpdateReferralCode(req: UpdateReferralCodeRequest, opts: ApiAdapterOptions): Promise<UpdateReferralCodeResponse>;
|
|
289
290
|
declare function apiUploadGoogleOAuthSellerCredential<P extends GoogleOAuthSellerCredentialPlatform>(processorName: P, payeeDetails: Hash, body: GoogleOAuthSellerCredentialUploadBodyByPlatform[P], baseApiUrl: string, opts?: {
|
|
290
291
|
timeoutMs?: number;
|
|
292
|
+
authorizationToken?: string;
|
|
291
293
|
}): Promise<CuratorSellerCredentialUploadResponse>;
|
|
292
294
|
declare function apiGetOrderbook(params: GetOrderbookParams, opts: ApiAdapterOptions): Promise<GetOrderbookResponse>;
|
|
293
295
|
declare function apiGetOrderbook(params: GetOrderbookParams, baseApiUrl: string, timeoutMs?: number): Promise<GetOrderbookResponse>;
|
|
@@ -537,7 +539,6 @@ declare const TOKEN_METADATA: {
|
|
|
537
539
|
* inputs behind the compatibility fields without changing this reference table.
|
|
538
540
|
*
|
|
539
541
|
* Ordered highest tier → lowest (PLATINUM first) to match UI display order.
|
|
540
|
-
* PEER_PRESIDENT is invite-only and excluded from the volume ladder.
|
|
541
542
|
*/
|
|
542
543
|
interface TakerTierScheduleEntry {
|
|
543
544
|
tier: TakerTierLevel;
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { TAKER_TIER_CAPS, TAKER_TIER_FEE_DISCOUNT_BPS, TAKER_TIER_ORDER, TAKER_TIER_SCHEDULE, ZERO_RATE_MANAGER_ID, classifyDelegationState, getDelegationRoute, getNextTakerTier, getTakerTierFeeDiscountBps, isZeroRateManagerId, normalizeRateManagerId, normalizeRegistry } from './chunk-
|
|
1
|
+
export { TAKER_TIER_CAPS, TAKER_TIER_FEE_DISCOUNT_BPS, TAKER_TIER_ORDER, TAKER_TIER_SCHEDULE, ZERO_RATE_MANAGER_ID, classifyDelegationState, getDelegationRoute, getNextTakerTier, getTakerTierFeeDiscountBps, isZeroRateManagerId, normalizeRateManagerId, normalizeRegistry } from './chunk-EIOXBVXP.mjs';
|
|
2
2
|
import { ValidationError, APIError, NetworkError } from './chunk-GHQK65J2.mjs';
|
|
3
3
|
export { APIError, ContractError, ErrorCode, NetworkError, ValidationError, ZKP2PError } from './chunk-GHQK65J2.mjs';
|
|
4
4
|
import { getContracts, getRateManagerContracts, getPaymentMethodsCatalog, resolvePaymentMethodHashFromCatalog, getGatingServiceAddress, parseBigIntLike, resolveFiatCurrencyBytes32, resolvePaymentMethodNameFromHash } from './chunk-ZM4ZP5GQ.mjs';
|
|
@@ -523,6 +523,7 @@ async function createEncryptedSellerCredentialUploadForPlatform({
|
|
|
523
523
|
return createEncryptedSellerCredentialUpload({
|
|
524
524
|
attestationServiceUrl,
|
|
525
525
|
platform: "wise",
|
|
526
|
+
...payload.callerAddress ? { callerAddress: payload.callerAddress } : {},
|
|
526
527
|
sessionMaterial: payload.sessionMaterial,
|
|
527
528
|
...typeof timeoutMs === "number" ? { timeoutMs } : {},
|
|
528
529
|
fetch: attestationTransport.fetch,
|
|
@@ -536,6 +537,7 @@ async function createEncryptedSellerCredentialUploadForPlatform({
|
|
|
536
537
|
return createEncryptedSellerCredentialUpload({
|
|
537
538
|
attestationServiceUrl,
|
|
538
539
|
platform,
|
|
540
|
+
...payload.callerAddress ? { callerAddress: payload.callerAddress } : {},
|
|
539
541
|
payeeId: payload.payeeId,
|
|
540
542
|
sessionMaterial: payload.sessionMaterial,
|
|
541
543
|
...typeof timeoutMs === "number" ? { timeoutMs } : {},
|
|
@@ -664,7 +666,10 @@ async function apiCreateSellerCredentialBundle(payload, attestationServiceUrl, p
|
|
|
664
666
|
res = await attestationTransport.fetch(`${activeBaseUrl}${endpoint}`, {
|
|
665
667
|
method: "POST",
|
|
666
668
|
headers: headers(),
|
|
667
|
-
body: JSON.stringify({
|
|
669
|
+
body: JSON.stringify({
|
|
670
|
+
encryptedUpload,
|
|
671
|
+
...payload.callerAddress ? { callerAddress: payload.callerAddress } : {}
|
|
672
|
+
})
|
|
668
673
|
});
|
|
669
674
|
} catch (error) {
|
|
670
675
|
throw new NetworkError("Failed to connect to Attestation Service", {
|
|
@@ -4618,7 +4623,7 @@ async function apiUpdateReferralCode(req, opts) {
|
|
|
4618
4623
|
});
|
|
4619
4624
|
return unwrapResponseObject(response);
|
|
4620
4625
|
}
|
|
4621
|
-
async function apiUploadSellerCredential(processorName, payeeDetails, bundle, baseApiUrl, timeoutMs) {
|
|
4626
|
+
async function apiUploadSellerCredential(processorName, payeeDetails, bundle, baseApiUrl, timeoutMs, authorizationToken) {
|
|
4622
4627
|
const endpoint = `/v2/makers/${encodeURIComponent(processorName)}/${encodeURIComponent(
|
|
4623
4628
|
payeeDetails
|
|
4624
4629
|
)}/seller-credential`;
|
|
@@ -4626,7 +4631,8 @@ async function apiUploadSellerCredential(processorName, payeeDetails, bundle, ba
|
|
|
4626
4631
|
url: `${withApiBase(baseApiUrl)}${endpoint}`,
|
|
4627
4632
|
method: "POST",
|
|
4628
4633
|
body: bundle,
|
|
4629
|
-
timeoutMs
|
|
4634
|
+
timeoutMs,
|
|
4635
|
+
authorizationToken
|
|
4630
4636
|
});
|
|
4631
4637
|
}
|
|
4632
4638
|
async function apiUploadGoogleOAuthSellerCredential(processorName, payeeDetails, body, baseApiUrl, opts) {
|
|
@@ -4637,7 +4643,8 @@ async function apiUploadGoogleOAuthSellerCredential(processorName, payeeDetails,
|
|
|
4637
4643
|
url: `${withApiBase(baseApiUrl)}${endpoint}`,
|
|
4638
4644
|
method: "POST",
|
|
4639
4645
|
body,
|
|
4640
|
-
timeoutMs: opts?.timeoutMs
|
|
4646
|
+
timeoutMs: opts?.timeoutMs,
|
|
4647
|
+
authorizationToken: opts?.authorizationToken
|
|
4641
4648
|
});
|
|
4642
4649
|
}
|
|
4643
4650
|
async function apiGetSellerCredentialStatus(processorName, payeeDetails, baseApiUrl, timeoutMs) {
|
|
@@ -5950,7 +5957,7 @@ function assertBundlePlatformMatches(params) {
|
|
|
5950
5957
|
throw new Error("Seller credential bundle platform does not match upload platform");
|
|
5951
5958
|
}
|
|
5952
5959
|
}
|
|
5953
|
-
async function apiUploadSellerCredentialBundle(params, baseApiUrl, timeoutMs) {
|
|
5960
|
+
async function apiUploadSellerCredentialBundle(params, baseApiUrl, timeoutMs, authorizationToken) {
|
|
5954
5961
|
assertBundlePlatformMatches(params);
|
|
5955
5962
|
const normalizedBaseApiUrl = normalizeBaseApiUrl(baseApiUrl);
|
|
5956
5963
|
if (params.platform === "wise") {
|
|
@@ -5959,7 +5966,8 @@ async function apiUploadSellerCredentialBundle(params, baseApiUrl, timeoutMs) {
|
|
|
5959
5966
|
params.bundle.payeeIdHash,
|
|
5960
5967
|
params.bundle,
|
|
5961
5968
|
normalizedBaseApiUrl,
|
|
5962
|
-
timeoutMs
|
|
5969
|
+
timeoutMs,
|
|
5970
|
+
authorizationToken
|
|
5963
5971
|
);
|
|
5964
5972
|
}
|
|
5965
5973
|
const registeredPayeePayload = {
|
|
@@ -5989,7 +5997,8 @@ async function apiUploadSellerCredentialBundle(params, baseApiUrl, timeoutMs) {
|
|
|
5989
5997
|
registeredPayee.hashedOnchainId,
|
|
5990
5998
|
params.bundle,
|
|
5991
5999
|
normalizedBaseApiUrl,
|
|
5992
|
-
timeoutMs
|
|
6000
|
+
timeoutMs,
|
|
6001
|
+
authorizationToken
|
|
5993
6002
|
);
|
|
5994
6003
|
}
|
|
5995
6004
|
var formatTokenAmountForDisplay = (amount, decimals) => {
|
|
@@ -6190,10 +6199,23 @@ function normalizePayeeDataInputItem(raw) {
|
|
|
6190
6199
|
if (!legacy) {
|
|
6191
6200
|
return null;
|
|
6192
6201
|
}
|
|
6202
|
+
const metadata = legacy.metadata && isObjectRecord(legacy.metadata) ? { ...legacy.metadata } : {};
|
|
6203
|
+
if (candidate.identityAttestation !== void 0 && candidate.identityAttestation !== null) {
|
|
6204
|
+
metadata.identityAttestation = candidate.identityAttestation;
|
|
6205
|
+
}
|
|
6193
6206
|
return {
|
|
6194
6207
|
offchainId: legacy.offchainId,
|
|
6195
6208
|
telegramUsername: legacy.telegramUsername,
|
|
6196
|
-
metadata:
|
|
6209
|
+
metadata: Object.keys(metadata).length > 0 ? metadata : null
|
|
6210
|
+
};
|
|
6211
|
+
}
|
|
6212
|
+
function getPayeeRegistrationMetadata(payeeData) {
|
|
6213
|
+
if (payeeData.identityAttestation === void 0 || payeeData.identityAttestation === null) {
|
|
6214
|
+
return payeeData.metadata;
|
|
6215
|
+
}
|
|
6216
|
+
return {
|
|
6217
|
+
...isObjectRecord(payeeData.metadata) ? payeeData.metadata : {},
|
|
6218
|
+
identityAttestation: payeeData.identityAttestation
|
|
6197
6219
|
};
|
|
6198
6220
|
}
|
|
6199
6221
|
function resolvePayeeDataInput(params, methodName) {
|
|
@@ -6220,7 +6242,7 @@ function toPostDepositDetailsRequest(processorName, payeeData, index) {
|
|
|
6220
6242
|
processorName,
|
|
6221
6243
|
offchainId: payeeData.offchainId,
|
|
6222
6244
|
telegramUsername: payeeData.telegramUsername,
|
|
6223
|
-
metadata: payeeData
|
|
6245
|
+
metadata: getPayeeRegistrationMetadata(payeeData)
|
|
6224
6246
|
};
|
|
6225
6247
|
}
|
|
6226
6248
|
var Zkp2pClient = class {
|
|
@@ -7266,6 +7288,12 @@ var Zkp2pClient = class {
|
|
|
7266
7288
|
`attestationServiceUrl is required when baseApiUrl is not a supported zkp2p API host: ${baseApiUrl}`
|
|
7267
7289
|
);
|
|
7268
7290
|
}
|
|
7291
|
+
async resolveAuthorizationToken() {
|
|
7292
|
+
if (this.getAuthorizationToken) {
|
|
7293
|
+
return await this.getAuthorizationToken() ?? void 0;
|
|
7294
|
+
}
|
|
7295
|
+
return this.authorizationToken;
|
|
7296
|
+
}
|
|
7269
7297
|
/**
|
|
7270
7298
|
* Normalizes currency tuples by appending an empty `oracleRateConfig` when the ABI
|
|
7271
7299
|
* requires it and the caller hasn't provided one.
|
|
@@ -8621,6 +8649,7 @@ var Zkp2pClient = class {
|
|
|
8621
8649
|
);
|
|
8622
8650
|
if (params.platform === "wise") {
|
|
8623
8651
|
const bundleResponse2 = await createBundle({
|
|
8652
|
+
...params.callerAddress ? { callerAddress: params.callerAddress } : {},
|
|
8624
8653
|
sessionMaterial: params.sessionMaterial
|
|
8625
8654
|
});
|
|
8626
8655
|
if (!bundleResponse2.success || !bundleResponse2.responseObject) {
|
|
@@ -8635,6 +8664,7 @@ var Zkp2pClient = class {
|
|
|
8635
8664
|
);
|
|
8636
8665
|
}
|
|
8637
8666
|
const bundlePayload = {
|
|
8667
|
+
...params.callerAddress ? { callerAddress: params.callerAddress } : {},
|
|
8638
8668
|
payeeId: params.payeeId,
|
|
8639
8669
|
sessionMaterial: params.sessionMaterial
|
|
8640
8670
|
};
|
|
@@ -8661,7 +8691,8 @@ var Zkp2pClient = class {
|
|
|
8661
8691
|
opts?.baseApiUrl ?? this.baseApiUrl ?? DEFAULT_BASE_API_URL
|
|
8662
8692
|
);
|
|
8663
8693
|
const timeoutMs = opts?.timeoutMs ?? this.apiTimeoutMs;
|
|
8664
|
-
|
|
8694
|
+
const authorizationToken = await this.resolveAuthorizationToken();
|
|
8695
|
+
return apiUploadSellerCredentialBundle(params, baseApiUrl, timeoutMs, authorizationToken);
|
|
8665
8696
|
}
|
|
8666
8697
|
/**
|
|
8667
8698
|
* Upload a seller Gmail OAuth authorization code through curator.
|
|
@@ -8674,6 +8705,18 @@ var Zkp2pClient = class {
|
|
|
8674
8705
|
opts?.baseApiUrl ?? this.baseApiUrl ?? DEFAULT_BASE_API_URL
|
|
8675
8706
|
);
|
|
8676
8707
|
const timeoutMs = opts?.timeoutMs ?? this.apiTimeoutMs;
|
|
8708
|
+
const getUploadOptions = async () => {
|
|
8709
|
+
let authorizationToken;
|
|
8710
|
+
try {
|
|
8711
|
+
authorizationToken = await this.resolveAuthorizationToken();
|
|
8712
|
+
} catch {
|
|
8713
|
+
authorizationToken = void 0;
|
|
8714
|
+
}
|
|
8715
|
+
return {
|
|
8716
|
+
timeoutMs,
|
|
8717
|
+
...authorizationToken ? { authorizationToken } : {}
|
|
8718
|
+
};
|
|
8719
|
+
};
|
|
8677
8720
|
if (params.platform === "paypal") {
|
|
8678
8721
|
return apiUploadGoogleOAuthSellerCredential(
|
|
8679
8722
|
"paypal",
|
|
@@ -8684,9 +8727,7 @@ var Zkp2pClient = class {
|
|
|
8684
8727
|
redirectUri: params.redirectUri
|
|
8685
8728
|
},
|
|
8686
8729
|
baseApiUrl,
|
|
8687
|
-
|
|
8688
|
-
timeoutMs
|
|
8689
|
-
}
|
|
8730
|
+
await getUploadOptions()
|
|
8690
8731
|
);
|
|
8691
8732
|
}
|
|
8692
8733
|
if (params.platform === "venmo") {
|
|
@@ -8699,9 +8740,7 @@ var Zkp2pClient = class {
|
|
|
8699
8740
|
redirectUri: params.redirectUri
|
|
8700
8741
|
},
|
|
8701
8742
|
baseApiUrl,
|
|
8702
|
-
|
|
8703
|
-
timeoutMs
|
|
8704
|
-
}
|
|
8743
|
+
await getUploadOptions()
|
|
8705
8744
|
);
|
|
8706
8745
|
}
|
|
8707
8746
|
throw new ValidationError(
|