@zkp2p/sdk 0.4.0 → 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 +230 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +18 -4
- package/dist/index.d.ts +18 -4
- package/dist/index.mjs +229 -28
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/{vaultUtils-CyPf4QGT.d.mts → vaultUtils-Bi2uldoa.d.mts} +97 -7
- package/dist/{vaultUtils-CyPf4QGT.d.ts → vaultUtils-Bi2uldoa.d.ts} +97 -7
- package/package.json +2 -2
package/dist/react.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Z as Zkp2pClient, P as PostDepositDetailsRequest,
|
|
2
|
-
export {
|
|
1
|
+
import { Z as Zkp2pClient, P as PostDepositDetailsRequest, v as SignalIntentMethodParams, bf as PreparedTransaction, bi as TakerTier, l as GetTakerTierRequest, m as GetTakerTierResponse, F as FulfillIntentMethodParams, cy as SendTransactionFn, cz as SendBatchFn, cw as DelegationDepositTarget, cx as BatchResult } from './vaultUtils-Bi2uldoa.mjs';
|
|
2
|
+
export { cu as DelegationRoute, cv as DelegationState, cA as VAULT_ZERO_ADDRESS, co as ZERO_RATE_MANAGER_ID, cB as asErrorMessage, cC as assertDelegationMethodSupport, ct as classifyDelegationState, cs as getDelegationRoute, cp as isZeroRateManagerId, cq as normalizeRateManagerId, cr as normalizeRegistry } from './vaultUtils-Bi2uldoa.mjs';
|
|
3
3
|
import { Hash, Address, Hex } from 'viem';
|
|
4
4
|
import '@zkp2p/indexer-schema';
|
|
5
5
|
import 'abitype';
|
package/dist/react.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Z as Zkp2pClient, P as PostDepositDetailsRequest,
|
|
2
|
-
export {
|
|
1
|
+
import { Z as Zkp2pClient, P as PostDepositDetailsRequest, v as SignalIntentMethodParams, bf as PreparedTransaction, bi as TakerTier, l as GetTakerTierRequest, m as GetTakerTierResponse, F as FulfillIntentMethodParams, cy as SendTransactionFn, cz as SendBatchFn, cw as DelegationDepositTarget, cx as BatchResult } from './vaultUtils-Bi2uldoa.js';
|
|
2
|
+
export { cu as DelegationRoute, cv as DelegationState, cA as VAULT_ZERO_ADDRESS, co as ZERO_RATE_MANAGER_ID, cB as asErrorMessage, cC as assertDelegationMethodSupport, ct as classifyDelegationState, cs as getDelegationRoute, cp as isZeroRateManagerId, cq as normalizeRateManagerId, cr as normalizeRegistry } from './vaultUtils-Bi2uldoa.js';
|
|
3
3
|
import { Hash, Address, Hex } from 'viem';
|
|
4
4
|
import '@zkp2p/indexer-schema';
|
|
5
5
|
import 'abitype';
|
|
@@ -1001,8 +1001,8 @@ type CuratorPayeeDataInput = {
|
|
|
1001
1001
|
type FulfillIntentParams = {
|
|
1002
1002
|
/** Hash of the intent to fulfill */
|
|
1003
1003
|
intentHash: Hash;
|
|
1004
|
-
/**
|
|
1005
|
-
proof: Record<string, unknown> | string;
|
|
1004
|
+
/** Payment proof from Reclaim (object or JSON string) or buyer TEE proof input */
|
|
1005
|
+
proof: Record<string, unknown> | string | BuyerTeePaymentProofInput;
|
|
1006
1006
|
/** Optional attestation timestamp buffer override in milliseconds */
|
|
1007
1007
|
timestampBufferMs?: number | string;
|
|
1008
1008
|
/** Override the attestation service base URL */
|
|
@@ -1082,6 +1082,10 @@ type PostDepositDetailsResponse = {
|
|
|
1082
1082
|
metadata: Record<string, string> | null;
|
|
1083
1083
|
hashedOnchainId: string;
|
|
1084
1084
|
createdAt: string;
|
|
1085
|
+
/** Per-merchant forwarding alias (PayPal multi-merchant flow) */
|
|
1086
|
+
forwardingMailboxAlias?: string | null;
|
|
1087
|
+
/** Alias surfaced by curator maker lookup (alternative field name from GET /v1/makers/paypal/<hash>) */
|
|
1088
|
+
paypalForwardingAlias?: string | null;
|
|
1085
1089
|
};
|
|
1086
1090
|
statusCode: number;
|
|
1087
1091
|
};
|
|
@@ -1125,7 +1129,23 @@ type WiseProfileNotFound = {
|
|
|
1125
1129
|
};
|
|
1126
1130
|
type PayPalSessionMaterial = {
|
|
1127
1131
|
payeeEmail: string;
|
|
1128
|
-
|
|
1132
|
+
forwardingBaseMailbox: string;
|
|
1133
|
+
forwardingMailboxAlias: string;
|
|
1134
|
+
};
|
|
1135
|
+
type GoogleOAuthSellerCredentialPlatform = Extract<SellerPlatform, 'paypal' | 'venmo'>;
|
|
1136
|
+
type PayPalGoogleOAuthSellerCredentialUploadBody = {
|
|
1137
|
+
payeeEmail: string;
|
|
1138
|
+
authorizationCode: string;
|
|
1139
|
+
redirectUri: string;
|
|
1140
|
+
};
|
|
1141
|
+
type VenmoGoogleOAuthSellerCredentialUploadBody = {
|
|
1142
|
+
accountId: string;
|
|
1143
|
+
authorizationCode: string;
|
|
1144
|
+
redirectUri: string;
|
|
1145
|
+
};
|
|
1146
|
+
type GoogleOAuthSellerCredentialUploadBodyByPlatform = {
|
|
1147
|
+
paypal: PayPalGoogleOAuthSellerCredentialUploadBody;
|
|
1148
|
+
venmo: VenmoGoogleOAuthSellerCredentialUploadBody;
|
|
1129
1149
|
};
|
|
1130
1150
|
type VenmoCredentialUploadInput = {
|
|
1131
1151
|
payeeId: string;
|
|
@@ -1199,6 +1219,23 @@ type SellerVerifyProxyBody = {
|
|
|
1199
1219
|
intent: SellerVerifyIntentDetails;
|
|
1200
1220
|
metadata?: Record<string, unknown>;
|
|
1201
1221
|
};
|
|
1222
|
+
type BuyerTeePaymentParams = Record<string, string | number | boolean>;
|
|
1223
|
+
type BuyerTeePaymentProofInput = {
|
|
1224
|
+
proofType: 'buyerTee';
|
|
1225
|
+
encryptedSessionMaterial: string;
|
|
1226
|
+
params: BuyerTeePaymentParams;
|
|
1227
|
+
actionType?: string;
|
|
1228
|
+
actionPlatform?: string;
|
|
1229
|
+
};
|
|
1230
|
+
type BuyerTeeSessionMaterial = Record<string, string>;
|
|
1231
|
+
type BuyerTeeSessionMaterialEncryptionInput = {
|
|
1232
|
+
actionType: string;
|
|
1233
|
+
attestationRuntime?: SellerCredentialAttestationRuntime;
|
|
1234
|
+
attestationServiceUrl: string;
|
|
1235
|
+
platform: string;
|
|
1236
|
+
sessionMaterial: BuyerTeeSessionMaterial;
|
|
1237
|
+
timeoutMs?: number | null;
|
|
1238
|
+
};
|
|
1202
1239
|
type SellerTypedDataField = {
|
|
1203
1240
|
name: string;
|
|
1204
1241
|
type: string;
|
|
@@ -1294,6 +1331,35 @@ type GetSellerCredentialStatusParams = {
|
|
|
1294
1331
|
processorName: SellerPlatform;
|
|
1295
1332
|
payeeDetails: Hash;
|
|
1296
1333
|
};
|
|
1334
|
+
type PayPalForwardingConfirmationErrorCode = 'paypal_forwarding_confirmation_not_found' | 'paypal_forwarding_initiator_email_mismatch' | 'paypal_forwarding_confirmation_expired' | 'paypal_forwarding_confirmation_rejected';
|
|
1335
|
+
type ConfirmPayPalForwardingRequest = {
|
|
1336
|
+
payeeDetails: Hash;
|
|
1337
|
+
payeeEmail: string;
|
|
1338
|
+
forwardingInitiatorEmail: string;
|
|
1339
|
+
};
|
|
1340
|
+
type ConfirmPayPalForwardingStatus = Omit<SellerCredentialStatus, 'payeeIdHash'> & {
|
|
1341
|
+
payeeIdHash?: Hash;
|
|
1342
|
+
};
|
|
1343
|
+
type ConfirmPayPalForwardingResponse = {
|
|
1344
|
+
success: boolean;
|
|
1345
|
+
message: string;
|
|
1346
|
+
responseObject: ConfirmPayPalForwardingStatus;
|
|
1347
|
+
statusCode: number;
|
|
1348
|
+
};
|
|
1349
|
+
type GoogleOAuthSellerCredentialBaseParams = {
|
|
1350
|
+
authorizationCode: string;
|
|
1351
|
+
payeeDetails: Hash;
|
|
1352
|
+
redirectUri: string;
|
|
1353
|
+
};
|
|
1354
|
+
type UploadPayPalGoogleOAuthSellerCredentialParams = GoogleOAuthSellerCredentialBaseParams & {
|
|
1355
|
+
platform: 'paypal';
|
|
1356
|
+
payeeEmail: string;
|
|
1357
|
+
};
|
|
1358
|
+
type UploadVenmoGoogleOAuthSellerCredentialParams = GoogleOAuthSellerCredentialBaseParams & {
|
|
1359
|
+
platform: 'venmo';
|
|
1360
|
+
accountId: string;
|
|
1361
|
+
};
|
|
1362
|
+
type UploadGoogleOAuthSellerCredentialParams = UploadPayPalGoogleOAuthSellerCredentialParams | UploadVenmoGoogleOAuthSellerCredentialParams;
|
|
1297
1363
|
type VerifySellerPaymentParams = {
|
|
1298
1364
|
platform: SellerPlatform;
|
|
1299
1365
|
} & SellerVerifyProxyBody;
|
|
@@ -1516,6 +1582,8 @@ type GetPayeeDetailsResponse = {
|
|
|
1516
1582
|
metadata: Record<string, string> | null;
|
|
1517
1583
|
hashedOnchainId: string;
|
|
1518
1584
|
createdAt: string;
|
|
1585
|
+
/** Per-merchant forwarding alias surfaced on maker lookup (PayPal multi-merchant flow) */
|
|
1586
|
+
paypalForwardingAlias?: string | null;
|
|
1519
1587
|
};
|
|
1520
1588
|
statusCode: number;
|
|
1521
1589
|
};
|
|
@@ -1798,6 +1866,7 @@ type GetOrderbookParams = {
|
|
|
1798
1866
|
token?: string;
|
|
1799
1867
|
};
|
|
1800
1868
|
type OrderbookEntry = {
|
|
1869
|
+
depositIdOnContract?: string;
|
|
1801
1870
|
depositId: string;
|
|
1802
1871
|
depositor: string;
|
|
1803
1872
|
price: string;
|
|
@@ -1943,8 +2012,8 @@ type CancelIntentMethodParams = {
|
|
|
1943
2012
|
type FulfillIntentMethodParams = {
|
|
1944
2013
|
/** The intent hash to fulfill (0x-prefixed, 32 bytes) */
|
|
1945
2014
|
intentHash: `0x${string}`;
|
|
1946
|
-
/** Payment proof from Reclaim (object or JSON string) */
|
|
1947
|
-
proof: Record<string, unknown> | string;
|
|
2015
|
+
/** Payment proof from Reclaim (object or JSON string) or buyer TEE proof input */
|
|
2016
|
+
proof: Record<string, unknown> | string | BuyerTeePaymentProofInput;
|
|
1948
2017
|
/** Allowed timestamp variance in ms (default: 300000ms) */
|
|
1949
2018
|
timestampBufferMs?: string;
|
|
1950
2019
|
/** Override attestation service URL */
|
|
@@ -3244,7 +3313,7 @@ declare class Zkp2pClient {
|
|
|
3244
3313
|
* ```
|
|
3245
3314
|
*
|
|
3246
3315
|
* @param params.intentHash - The intent hash to fulfill (0x-prefixed, 32 bytes)
|
|
3247
|
-
* @param params.proof - Payment proof from Reclaim (object or JSON string)
|
|
3316
|
+
* @param params.proof - Payment proof from Reclaim (object or JSON string) or buyer TEE proof input
|
|
3248
3317
|
* @param params.timestampBufferMs - Allowed timestamp variance (default: 300000ms)
|
|
3249
3318
|
* @param params.attestationServiceUrl - Override attestation service URL
|
|
3250
3319
|
* @param params.postIntentHookData - Data to pass to post-intent hook
|
|
@@ -3360,6 +3429,27 @@ declare class Zkp2pClient {
|
|
|
3360
3429
|
* from the submitted Personal API Token.
|
|
3361
3430
|
*/
|
|
3362
3431
|
uploadSellerCredential(params: UploadSellerCredentialParams, opts?: UploadSellerCredentialOptions): Promise<CuratorSellerCredentialUploadResponse>;
|
|
3432
|
+
/**
|
|
3433
|
+
* Confirms the PayPal Gmail-forwarding setup for an existing maker payee hash.
|
|
3434
|
+
*
|
|
3435
|
+
* Uses curator's `/forwarding-confirmation` route and forwards both API key and
|
|
3436
|
+
* bearer token so either auth strategy can satisfy the hybrid gate. The endpoint
|
|
3437
|
+
* is rate-limited server-side; callers should surface retry guidance from APIError.
|
|
3438
|
+
*/
|
|
3439
|
+
confirmPayPalForwarding(params: ConfirmPayPalForwardingRequest, opts?: {
|
|
3440
|
+
baseApiUrl?: string;
|
|
3441
|
+
timeoutMs?: number;
|
|
3442
|
+
}): Promise<ConfirmPayPalForwardingResponse>;
|
|
3443
|
+
/**
|
|
3444
|
+
* Upload a seller Gmail OAuth authorization code through curator.
|
|
3445
|
+
*
|
|
3446
|
+
* Curator owns the encryption hop to attestation-service for this flow, so
|
|
3447
|
+
* callers send the one-time Google code plus the stable seller identity.
|
|
3448
|
+
*/
|
|
3449
|
+
uploadGoogleOAuthSellerCredential(params: UploadGoogleOAuthSellerCredentialParams, opts?: {
|
|
3450
|
+
baseApiUrl?: string;
|
|
3451
|
+
timeoutMs?: number;
|
|
3452
|
+
}): Promise<CuratorSellerCredentialUploadResponse>;
|
|
3363
3453
|
/**
|
|
3364
3454
|
* Status is a coarse curator-owned signal (`active` / `inactive` / `missing`) and intentionally
|
|
3365
3455
|
* omits low-level diagnostics. Curator may still re-probe stale credentials during verify, so callers
|
|
@@ -3546,4 +3636,4 @@ type SendBatchFn = (txs: Array<{
|
|
|
3546
3636
|
value?: bigint;
|
|
3547
3637
|
}>) => Promise<string>;
|
|
3548
3638
|
|
|
3549
|
-
export { type
|
|
3639
|
+
export { type PlatformQuote as $, type AttestationServiceSellerCredentialUploadResponse as A, type BuyerTeeSessionMaterialEncryptionInput as B, type ConfirmPayPalForwardingResponse as C, type DepositWithRelations as D, type ActionCallback as E, type FulfillIntentMethodParams as F, type GoogleOAuthSellerCredentialPlatform as G, type CreateDepositParams as H, type IntentEntity$1 as I, type CreateDepositConversionRate as J, type Range as K, type SignalIntentParams as L, type FulfillIntentParams as M, type ReleaseFundsToPayerParams as N, type CancelIntentParams as O, type PostDepositDetailsRequest as P, type QuotesBestByPlatformRequest as Q, type ReferrerFeeConfig as R, type SellerCredentialUploadInput as S, type TxOverrides as T, type BestByPlatformResponseObject as U, type ValidatePayeeDetailsRequest as V, type WithdrawDepositParams as W, type GetBestByPlatformResponse as X, type GetBestByPlatformResponseObject as Y, Zkp2pClient as Z, type GetPlatformQuote as _, type SellerPlatform as a, type BuyerTeePaymentProofInput as a$, type QuoteRequest as a0, type GetNearbyQuote as a1, type GetNearbySuggestions as a2, type GetQuoteResponse as a3, type GetQuoteResponseObject as a4, type GetQuoteSingleResponse as a5, type QuoteResponse as a6, type QuoteResponseObject as a7, type QuoteSingleResponse as a8, type QuoteIntentResponse as a9, type WiseProfileNotFound as aA, type PayPalSessionMaterial as aB, type PayPalGoogleOAuthSellerCredentialUploadBody as aC, type VenmoGoogleOAuthSellerCredentialUploadBody as aD, type VenmoCredentialUploadInput as aE, type CashAppCredentialUploadInput as aF, type WiseCredentialUploadInput as aG, type PayPalCredentialUploadInput as aH, type SellerCredentialUploadInputByPlatform as aI, type SellerCiphertextBundle as aJ, type SellerSignedCiphertextBundle as aK, type SellerVerifyIntentDetails as aL, type SellerVerifyInput as aM, type SellerProbeInput as aN, type SellerCredentialBundle as aO, type SellerCredentialBundleUpload as aP, type SellerCredentialStatusValue as aQ, type SellerCredentialStatus as aR, type SellerVerifyProxyBody as aS, type SellerTypedDataField as aT, type SellerTypedDataSpec as aU, type SellerPaymentTypedDataValue as aV, type SellerAttestationOutput as aW, type SellerCredentialProbeResponse as aX, type AttestationServiceSellerVerifyResponse as aY, type AttestationServiceSellerCredentialProbeResponse as aZ, type BuyerTeePaymentParams as a_, type QuoteFeesResponse as aa, type FiatResponse as ab, type TokenResponse as ac, type NearbyQuote as ad, type NearbySuggestions as ae, type ApiDeposit as af, type DepositVerifier as ag, type DepositVerifierCurrency as ah, type DepositStatus as ai, type GetDepositByIdRequest as aj, type GetDepositByIdResponse as ak, type Intent as al, type ApiIntentStatus as am, type GetOwnerIntentsRequest as an, type GetOwnerIntentsResponse as ao, type GetIntentsByDepositRequest as ap, type GetIntentsByDepositResponse as aq, type GetIntentByHashRequest as ar, type GetIntentByHashResponse as as, type RegisterPayeeDetailsRequest as at, type RegisterPayeeDetailsResponse as au, type VenmoSessionMaterial as av, type CashAppSessionMaterial as aw, type WiseSessionMaterial as ax, type WiseProfileInfo as ay, type WiseProfileSelectionRequired as az, type SellerCredentialAttestationRuntime as b, type PaymentPlatformType as b$, type BuyerTeeSessionMaterial as b0, type CuratorSellerCredentialStatusResponse as b1, type CuratorSellerVerifyResponse as b2, type UploadSellerCredentialParams as b3, type RegisteredUploadSellerCredentialParams as b4, type UploadSellerCredentialOptions as b5, type GetSellerCredentialStatusParams as b6, type ConfirmPayPalForwardingRequest as b7, type PayPalForwardingConfirmationErrorCode as b8, type UploadPayPalGoogleOAuthSellerCredentialParams as b9, type RateManagerEntity as bA, type RateManagerRateEntity as bB, type RateManagerDelegationEntity as bC, type ManagerAggregateStatsEntity as bD, type ManagerStatsEntity as bE, type ManagerDailySnapshotEntity as bF, type RateManagerListItem as bG, type RateManagerDetail as bH, type ManualRateUpdateEntity as bI, type OracleConfigUpdateEntity as bJ, type DepositFundActivityEntity$1 as bK, type DepositDailySnapshotEntity$1 as bL, type DepositFundActivityType$1 as bM, type DepositFilter as bN, type PaginationOptions as bO, type DepositOrderField as bP, type OrderDirection$1 as bQ, type RateManagerFilter as bR, type RateManagerPaginationOptions as bS, type RateManagerDelegationPaginationOptions as bT, type RateManagerOrderField as bU, type OrderDirection as bV, type DeploymentEnv as bW, type FulfillmentRecord as bX, type PaymentVerifiedRecord as bY, type FulfillmentAndPaymentResponse as bZ, PAYMENT_PLATFORMS as b_, type UploadVenmoGoogleOAuthSellerCredentialParams as ba, type UploadGoogleOAuthSellerCredentialParams as bb, type VerifySellerPaymentParams as bc, type OnchainCurrency as bd, type DepositVerifierData as be, type PreparedTransaction as bf, type OrderStats as bg, type DepositIntentStatistics as bh, type TakerTier as bi, type TakerTierStats as bj, type TakerTierLevel as bk, type PlatformLimit as bl, type PlatformRiskLevel as bm, type OrderbookEntry as bn, IndexerClient as bo, defaultIndexerEndpoint as bp, IndexerDepositService as bq, IndexerRateManagerService as br, compareEventCursorIdsByRecency as bs, fetchFulfillmentAndPayment as bt, type DepositEntity$1 as bu, type IntentFulfilledEntity as bv, type IntentFulfillmentAmountsEntity as bw, type DepositPaymentMethodEntity$1 as bx, type MethodCurrencyEntity$1 as by, type IntentStatus as bz, type GoogleOAuthSellerCredentialUploadBodyByPlatform as c, Currency as c0, currencyInfo as c1, getCurrencyInfoFromHash as c2, getCurrencyInfoFromCountryCode as c3, getCurrencyCodeFromHash as c4, isSupportedCurrencyHash as c5, mapConversionRatesToOnchainMinRate as c6, type CurrencyData as c7, getContracts as c8, getRateManagerContracts as c9, ZERO_ADDRESS as cA, asErrorMessage as cB, assertDelegationMethodSupport as cC, getPaymentMethodsCatalog as ca, getGatingServiceAddress as cb, type RuntimeEnv as cc, parseDepositView as cd, parseIntentView as ce, enrichPvDepositView as cf, enrichPvIntentView as cg, type PV_DepositView as ch, type PV_Deposit as ci, type PV_PaymentMethodData as cj, type PV_Currency as ck, type PV_ReferralFee as cl, type PV_IntentView as cm, type PV_Intent as cn, ZERO_RATE_MANAGER_ID as co, isZeroRateManagerId as cp, normalizeRateManagerId as cq, normalizeRegistry as cr, getDelegationRoute as cs, classifyDelegationState as ct, type DelegationRoute as cu, type DelegationState as cv, type DelegationDepositTarget as cw, type BatchResult as cx, type SendTransactionFn as cy, type SendBatchFn as cz, type CuratorSellerCredentialUploadResponse as d, type BestByPlatformResponse as e, type ValidatePayeeDetailsResponse as f, type PostDepositDetailsResponse as g, type GetPayeeDetailsRequest as h, type GetPayeeDetailsResponse as i, type GetOwnerDepositsRequest as j, type GetOwnerDepositsResponse as k, type GetTakerTierRequest as l, type GetTakerTierResponse as m, type GetDepositBundleParams as n, type ApiAdapterOptions as o, type GetDepositBundleResponse as p, type GetOrderbookParams as q, type GetOrderbookResponse as r, type CurrencyType as s, type PaymentMethodCatalog as t, type SignalIntentReferralFee as u, type SignalIntentMethodParams as v, type CancelIntentMethodParams as w, type Zkp2pNextOptions as x, type AuthorizationTokenProvider as y, type TimeoutConfig as z };
|
|
@@ -1001,8 +1001,8 @@ type CuratorPayeeDataInput = {
|
|
|
1001
1001
|
type FulfillIntentParams = {
|
|
1002
1002
|
/** Hash of the intent to fulfill */
|
|
1003
1003
|
intentHash: Hash;
|
|
1004
|
-
/**
|
|
1005
|
-
proof: Record<string, unknown> | string;
|
|
1004
|
+
/** Payment proof from Reclaim (object or JSON string) or buyer TEE proof input */
|
|
1005
|
+
proof: Record<string, unknown> | string | BuyerTeePaymentProofInput;
|
|
1006
1006
|
/** Optional attestation timestamp buffer override in milliseconds */
|
|
1007
1007
|
timestampBufferMs?: number | string;
|
|
1008
1008
|
/** Override the attestation service base URL */
|
|
@@ -1082,6 +1082,10 @@ type PostDepositDetailsResponse = {
|
|
|
1082
1082
|
metadata: Record<string, string> | null;
|
|
1083
1083
|
hashedOnchainId: string;
|
|
1084
1084
|
createdAt: string;
|
|
1085
|
+
/** Per-merchant forwarding alias (PayPal multi-merchant flow) */
|
|
1086
|
+
forwardingMailboxAlias?: string | null;
|
|
1087
|
+
/** Alias surfaced by curator maker lookup (alternative field name from GET /v1/makers/paypal/<hash>) */
|
|
1088
|
+
paypalForwardingAlias?: string | null;
|
|
1085
1089
|
};
|
|
1086
1090
|
statusCode: number;
|
|
1087
1091
|
};
|
|
@@ -1125,7 +1129,23 @@ type WiseProfileNotFound = {
|
|
|
1125
1129
|
};
|
|
1126
1130
|
type PayPalSessionMaterial = {
|
|
1127
1131
|
payeeEmail: string;
|
|
1128
|
-
|
|
1132
|
+
forwardingBaseMailbox: string;
|
|
1133
|
+
forwardingMailboxAlias: string;
|
|
1134
|
+
};
|
|
1135
|
+
type GoogleOAuthSellerCredentialPlatform = Extract<SellerPlatform, 'paypal' | 'venmo'>;
|
|
1136
|
+
type PayPalGoogleOAuthSellerCredentialUploadBody = {
|
|
1137
|
+
payeeEmail: string;
|
|
1138
|
+
authorizationCode: string;
|
|
1139
|
+
redirectUri: string;
|
|
1140
|
+
};
|
|
1141
|
+
type VenmoGoogleOAuthSellerCredentialUploadBody = {
|
|
1142
|
+
accountId: string;
|
|
1143
|
+
authorizationCode: string;
|
|
1144
|
+
redirectUri: string;
|
|
1145
|
+
};
|
|
1146
|
+
type GoogleOAuthSellerCredentialUploadBodyByPlatform = {
|
|
1147
|
+
paypal: PayPalGoogleOAuthSellerCredentialUploadBody;
|
|
1148
|
+
venmo: VenmoGoogleOAuthSellerCredentialUploadBody;
|
|
1129
1149
|
};
|
|
1130
1150
|
type VenmoCredentialUploadInput = {
|
|
1131
1151
|
payeeId: string;
|
|
@@ -1199,6 +1219,23 @@ type SellerVerifyProxyBody = {
|
|
|
1199
1219
|
intent: SellerVerifyIntentDetails;
|
|
1200
1220
|
metadata?: Record<string, unknown>;
|
|
1201
1221
|
};
|
|
1222
|
+
type BuyerTeePaymentParams = Record<string, string | number | boolean>;
|
|
1223
|
+
type BuyerTeePaymentProofInput = {
|
|
1224
|
+
proofType: 'buyerTee';
|
|
1225
|
+
encryptedSessionMaterial: string;
|
|
1226
|
+
params: BuyerTeePaymentParams;
|
|
1227
|
+
actionType?: string;
|
|
1228
|
+
actionPlatform?: string;
|
|
1229
|
+
};
|
|
1230
|
+
type BuyerTeeSessionMaterial = Record<string, string>;
|
|
1231
|
+
type BuyerTeeSessionMaterialEncryptionInput = {
|
|
1232
|
+
actionType: string;
|
|
1233
|
+
attestationRuntime?: SellerCredentialAttestationRuntime;
|
|
1234
|
+
attestationServiceUrl: string;
|
|
1235
|
+
platform: string;
|
|
1236
|
+
sessionMaterial: BuyerTeeSessionMaterial;
|
|
1237
|
+
timeoutMs?: number | null;
|
|
1238
|
+
};
|
|
1202
1239
|
type SellerTypedDataField = {
|
|
1203
1240
|
name: string;
|
|
1204
1241
|
type: string;
|
|
@@ -1294,6 +1331,35 @@ type GetSellerCredentialStatusParams = {
|
|
|
1294
1331
|
processorName: SellerPlatform;
|
|
1295
1332
|
payeeDetails: Hash;
|
|
1296
1333
|
};
|
|
1334
|
+
type PayPalForwardingConfirmationErrorCode = 'paypal_forwarding_confirmation_not_found' | 'paypal_forwarding_initiator_email_mismatch' | 'paypal_forwarding_confirmation_expired' | 'paypal_forwarding_confirmation_rejected';
|
|
1335
|
+
type ConfirmPayPalForwardingRequest = {
|
|
1336
|
+
payeeDetails: Hash;
|
|
1337
|
+
payeeEmail: string;
|
|
1338
|
+
forwardingInitiatorEmail: string;
|
|
1339
|
+
};
|
|
1340
|
+
type ConfirmPayPalForwardingStatus = Omit<SellerCredentialStatus, 'payeeIdHash'> & {
|
|
1341
|
+
payeeIdHash?: Hash;
|
|
1342
|
+
};
|
|
1343
|
+
type ConfirmPayPalForwardingResponse = {
|
|
1344
|
+
success: boolean;
|
|
1345
|
+
message: string;
|
|
1346
|
+
responseObject: ConfirmPayPalForwardingStatus;
|
|
1347
|
+
statusCode: number;
|
|
1348
|
+
};
|
|
1349
|
+
type GoogleOAuthSellerCredentialBaseParams = {
|
|
1350
|
+
authorizationCode: string;
|
|
1351
|
+
payeeDetails: Hash;
|
|
1352
|
+
redirectUri: string;
|
|
1353
|
+
};
|
|
1354
|
+
type UploadPayPalGoogleOAuthSellerCredentialParams = GoogleOAuthSellerCredentialBaseParams & {
|
|
1355
|
+
platform: 'paypal';
|
|
1356
|
+
payeeEmail: string;
|
|
1357
|
+
};
|
|
1358
|
+
type UploadVenmoGoogleOAuthSellerCredentialParams = GoogleOAuthSellerCredentialBaseParams & {
|
|
1359
|
+
platform: 'venmo';
|
|
1360
|
+
accountId: string;
|
|
1361
|
+
};
|
|
1362
|
+
type UploadGoogleOAuthSellerCredentialParams = UploadPayPalGoogleOAuthSellerCredentialParams | UploadVenmoGoogleOAuthSellerCredentialParams;
|
|
1297
1363
|
type VerifySellerPaymentParams = {
|
|
1298
1364
|
platform: SellerPlatform;
|
|
1299
1365
|
} & SellerVerifyProxyBody;
|
|
@@ -1516,6 +1582,8 @@ type GetPayeeDetailsResponse = {
|
|
|
1516
1582
|
metadata: Record<string, string> | null;
|
|
1517
1583
|
hashedOnchainId: string;
|
|
1518
1584
|
createdAt: string;
|
|
1585
|
+
/** Per-merchant forwarding alias surfaced on maker lookup (PayPal multi-merchant flow) */
|
|
1586
|
+
paypalForwardingAlias?: string | null;
|
|
1519
1587
|
};
|
|
1520
1588
|
statusCode: number;
|
|
1521
1589
|
};
|
|
@@ -1798,6 +1866,7 @@ type GetOrderbookParams = {
|
|
|
1798
1866
|
token?: string;
|
|
1799
1867
|
};
|
|
1800
1868
|
type OrderbookEntry = {
|
|
1869
|
+
depositIdOnContract?: string;
|
|
1801
1870
|
depositId: string;
|
|
1802
1871
|
depositor: string;
|
|
1803
1872
|
price: string;
|
|
@@ -1943,8 +2012,8 @@ type CancelIntentMethodParams = {
|
|
|
1943
2012
|
type FulfillIntentMethodParams = {
|
|
1944
2013
|
/** The intent hash to fulfill (0x-prefixed, 32 bytes) */
|
|
1945
2014
|
intentHash: `0x${string}`;
|
|
1946
|
-
/** Payment proof from Reclaim (object or JSON string) */
|
|
1947
|
-
proof: Record<string, unknown> | string;
|
|
2015
|
+
/** Payment proof from Reclaim (object or JSON string) or buyer TEE proof input */
|
|
2016
|
+
proof: Record<string, unknown> | string | BuyerTeePaymentProofInput;
|
|
1948
2017
|
/** Allowed timestamp variance in ms (default: 300000ms) */
|
|
1949
2018
|
timestampBufferMs?: string;
|
|
1950
2019
|
/** Override attestation service URL */
|
|
@@ -3244,7 +3313,7 @@ declare class Zkp2pClient {
|
|
|
3244
3313
|
* ```
|
|
3245
3314
|
*
|
|
3246
3315
|
* @param params.intentHash - The intent hash to fulfill (0x-prefixed, 32 bytes)
|
|
3247
|
-
* @param params.proof - Payment proof from Reclaim (object or JSON string)
|
|
3316
|
+
* @param params.proof - Payment proof from Reclaim (object or JSON string) or buyer TEE proof input
|
|
3248
3317
|
* @param params.timestampBufferMs - Allowed timestamp variance (default: 300000ms)
|
|
3249
3318
|
* @param params.attestationServiceUrl - Override attestation service URL
|
|
3250
3319
|
* @param params.postIntentHookData - Data to pass to post-intent hook
|
|
@@ -3360,6 +3429,27 @@ declare class Zkp2pClient {
|
|
|
3360
3429
|
* from the submitted Personal API Token.
|
|
3361
3430
|
*/
|
|
3362
3431
|
uploadSellerCredential(params: UploadSellerCredentialParams, opts?: UploadSellerCredentialOptions): Promise<CuratorSellerCredentialUploadResponse>;
|
|
3432
|
+
/**
|
|
3433
|
+
* Confirms the PayPal Gmail-forwarding setup for an existing maker payee hash.
|
|
3434
|
+
*
|
|
3435
|
+
* Uses curator's `/forwarding-confirmation` route and forwards both API key and
|
|
3436
|
+
* bearer token so either auth strategy can satisfy the hybrid gate. The endpoint
|
|
3437
|
+
* is rate-limited server-side; callers should surface retry guidance from APIError.
|
|
3438
|
+
*/
|
|
3439
|
+
confirmPayPalForwarding(params: ConfirmPayPalForwardingRequest, opts?: {
|
|
3440
|
+
baseApiUrl?: string;
|
|
3441
|
+
timeoutMs?: number;
|
|
3442
|
+
}): Promise<ConfirmPayPalForwardingResponse>;
|
|
3443
|
+
/**
|
|
3444
|
+
* Upload a seller Gmail OAuth authorization code through curator.
|
|
3445
|
+
*
|
|
3446
|
+
* Curator owns the encryption hop to attestation-service for this flow, so
|
|
3447
|
+
* callers send the one-time Google code plus the stable seller identity.
|
|
3448
|
+
*/
|
|
3449
|
+
uploadGoogleOAuthSellerCredential(params: UploadGoogleOAuthSellerCredentialParams, opts?: {
|
|
3450
|
+
baseApiUrl?: string;
|
|
3451
|
+
timeoutMs?: number;
|
|
3452
|
+
}): Promise<CuratorSellerCredentialUploadResponse>;
|
|
3363
3453
|
/**
|
|
3364
3454
|
* Status is a coarse curator-owned signal (`active` / `inactive` / `missing`) and intentionally
|
|
3365
3455
|
* omits low-level diagnostics. Curator may still re-probe stale credentials during verify, so callers
|
|
@@ -3546,4 +3636,4 @@ type SendBatchFn = (txs: Array<{
|
|
|
3546
3636
|
value?: bigint;
|
|
3547
3637
|
}>) => Promise<string>;
|
|
3548
3638
|
|
|
3549
|
-
export { type
|
|
3639
|
+
export { type PlatformQuote as $, type AttestationServiceSellerCredentialUploadResponse as A, type BuyerTeeSessionMaterialEncryptionInput as B, type ConfirmPayPalForwardingResponse as C, type DepositWithRelations as D, type ActionCallback as E, type FulfillIntentMethodParams as F, type GoogleOAuthSellerCredentialPlatform as G, type CreateDepositParams as H, type IntentEntity$1 as I, type CreateDepositConversionRate as J, type Range as K, type SignalIntentParams as L, type FulfillIntentParams as M, type ReleaseFundsToPayerParams as N, type CancelIntentParams as O, type PostDepositDetailsRequest as P, type QuotesBestByPlatformRequest as Q, type ReferrerFeeConfig as R, type SellerCredentialUploadInput as S, type TxOverrides as T, type BestByPlatformResponseObject as U, type ValidatePayeeDetailsRequest as V, type WithdrawDepositParams as W, type GetBestByPlatformResponse as X, type GetBestByPlatformResponseObject as Y, Zkp2pClient as Z, type GetPlatformQuote as _, type SellerPlatform as a, type BuyerTeePaymentProofInput as a$, type QuoteRequest as a0, type GetNearbyQuote as a1, type GetNearbySuggestions as a2, type GetQuoteResponse as a3, type GetQuoteResponseObject as a4, type GetQuoteSingleResponse as a5, type QuoteResponse as a6, type QuoteResponseObject as a7, type QuoteSingleResponse as a8, type QuoteIntentResponse as a9, type WiseProfileNotFound as aA, type PayPalSessionMaterial as aB, type PayPalGoogleOAuthSellerCredentialUploadBody as aC, type VenmoGoogleOAuthSellerCredentialUploadBody as aD, type VenmoCredentialUploadInput as aE, type CashAppCredentialUploadInput as aF, type WiseCredentialUploadInput as aG, type PayPalCredentialUploadInput as aH, type SellerCredentialUploadInputByPlatform as aI, type SellerCiphertextBundle as aJ, type SellerSignedCiphertextBundle as aK, type SellerVerifyIntentDetails as aL, type SellerVerifyInput as aM, type SellerProbeInput as aN, type SellerCredentialBundle as aO, type SellerCredentialBundleUpload as aP, type SellerCredentialStatusValue as aQ, type SellerCredentialStatus as aR, type SellerVerifyProxyBody as aS, type SellerTypedDataField as aT, type SellerTypedDataSpec as aU, type SellerPaymentTypedDataValue as aV, type SellerAttestationOutput as aW, type SellerCredentialProbeResponse as aX, type AttestationServiceSellerVerifyResponse as aY, type AttestationServiceSellerCredentialProbeResponse as aZ, type BuyerTeePaymentParams as a_, type QuoteFeesResponse as aa, type FiatResponse as ab, type TokenResponse as ac, type NearbyQuote as ad, type NearbySuggestions as ae, type ApiDeposit as af, type DepositVerifier as ag, type DepositVerifierCurrency as ah, type DepositStatus as ai, type GetDepositByIdRequest as aj, type GetDepositByIdResponse as ak, type Intent as al, type ApiIntentStatus as am, type GetOwnerIntentsRequest as an, type GetOwnerIntentsResponse as ao, type GetIntentsByDepositRequest as ap, type GetIntentsByDepositResponse as aq, type GetIntentByHashRequest as ar, type GetIntentByHashResponse as as, type RegisterPayeeDetailsRequest as at, type RegisterPayeeDetailsResponse as au, type VenmoSessionMaterial as av, type CashAppSessionMaterial as aw, type WiseSessionMaterial as ax, type WiseProfileInfo as ay, type WiseProfileSelectionRequired as az, type SellerCredentialAttestationRuntime as b, type PaymentPlatformType as b$, type BuyerTeeSessionMaterial as b0, type CuratorSellerCredentialStatusResponse as b1, type CuratorSellerVerifyResponse as b2, type UploadSellerCredentialParams as b3, type RegisteredUploadSellerCredentialParams as b4, type UploadSellerCredentialOptions as b5, type GetSellerCredentialStatusParams as b6, type ConfirmPayPalForwardingRequest as b7, type PayPalForwardingConfirmationErrorCode as b8, type UploadPayPalGoogleOAuthSellerCredentialParams as b9, type RateManagerEntity as bA, type RateManagerRateEntity as bB, type RateManagerDelegationEntity as bC, type ManagerAggregateStatsEntity as bD, type ManagerStatsEntity as bE, type ManagerDailySnapshotEntity as bF, type RateManagerListItem as bG, type RateManagerDetail as bH, type ManualRateUpdateEntity as bI, type OracleConfigUpdateEntity as bJ, type DepositFundActivityEntity$1 as bK, type DepositDailySnapshotEntity$1 as bL, type DepositFundActivityType$1 as bM, type DepositFilter as bN, type PaginationOptions as bO, type DepositOrderField as bP, type OrderDirection$1 as bQ, type RateManagerFilter as bR, type RateManagerPaginationOptions as bS, type RateManagerDelegationPaginationOptions as bT, type RateManagerOrderField as bU, type OrderDirection as bV, type DeploymentEnv as bW, type FulfillmentRecord as bX, type PaymentVerifiedRecord as bY, type FulfillmentAndPaymentResponse as bZ, PAYMENT_PLATFORMS as b_, type UploadVenmoGoogleOAuthSellerCredentialParams as ba, type UploadGoogleOAuthSellerCredentialParams as bb, type VerifySellerPaymentParams as bc, type OnchainCurrency as bd, type DepositVerifierData as be, type PreparedTransaction as bf, type OrderStats as bg, type DepositIntentStatistics as bh, type TakerTier as bi, type TakerTierStats as bj, type TakerTierLevel as bk, type PlatformLimit as bl, type PlatformRiskLevel as bm, type OrderbookEntry as bn, IndexerClient as bo, defaultIndexerEndpoint as bp, IndexerDepositService as bq, IndexerRateManagerService as br, compareEventCursorIdsByRecency as bs, fetchFulfillmentAndPayment as bt, type DepositEntity$1 as bu, type IntentFulfilledEntity as bv, type IntentFulfillmentAmountsEntity as bw, type DepositPaymentMethodEntity$1 as bx, type MethodCurrencyEntity$1 as by, type IntentStatus as bz, type GoogleOAuthSellerCredentialUploadBodyByPlatform as c, Currency as c0, currencyInfo as c1, getCurrencyInfoFromHash as c2, getCurrencyInfoFromCountryCode as c3, getCurrencyCodeFromHash as c4, isSupportedCurrencyHash as c5, mapConversionRatesToOnchainMinRate as c6, type CurrencyData as c7, getContracts as c8, getRateManagerContracts as c9, ZERO_ADDRESS as cA, asErrorMessage as cB, assertDelegationMethodSupport as cC, getPaymentMethodsCatalog as ca, getGatingServiceAddress as cb, type RuntimeEnv as cc, parseDepositView as cd, parseIntentView as ce, enrichPvDepositView as cf, enrichPvIntentView as cg, type PV_DepositView as ch, type PV_Deposit as ci, type PV_PaymentMethodData as cj, type PV_Currency as ck, type PV_ReferralFee as cl, type PV_IntentView as cm, type PV_Intent as cn, ZERO_RATE_MANAGER_ID as co, isZeroRateManagerId as cp, normalizeRateManagerId as cq, normalizeRegistry as cr, getDelegationRoute as cs, classifyDelegationState as ct, type DelegationRoute as cu, type DelegationState as cv, type DelegationDepositTarget as cw, type BatchResult as cx, type SendTransactionFn as cy, type SendBatchFn as cz, type CuratorSellerCredentialUploadResponse as d, type BestByPlatformResponse as e, type ValidatePayeeDetailsResponse as f, type PostDepositDetailsResponse as g, type GetPayeeDetailsRequest as h, type GetPayeeDetailsResponse as i, type GetOwnerDepositsRequest as j, type GetOwnerDepositsResponse as k, type GetTakerTierRequest as l, type GetTakerTierResponse as m, type GetDepositBundleParams as n, type ApiAdapterOptions as o, type GetDepositBundleResponse as p, type GetOrderbookParams as q, type GetOrderbookResponse as r, type CurrencyType as s, type PaymentMethodCatalog as t, type SignalIntentReferralFee as u, type SignalIntentMethodParams as v, type CancelIntentMethodParams as w, type Zkp2pNextOptions as x, type AuthorizationTokenProvider as y, type TimeoutConfig as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zkp2p/sdk",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "ZKP2P Client SDK - TypeScript SDK for deposit management, liquidity provision, and onramping",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"dependencies": {
|
|
90
90
|
"@zkp2p/indexer-schema": "0.2.3",
|
|
91
91
|
"@zkp2p/contracts-v2": "0.2.2",
|
|
92
|
-
"@zkp2p/zkp2p-attestation": "1.1
|
|
92
|
+
"@zkp2p/zkp2p-attestation": "1.3.1",
|
|
93
93
|
"ethers": "^6.0.0",
|
|
94
94
|
"ox": "^0.11.1"
|
|
95
95
|
},
|