@zkp2p/sdk 0.14.8 → 0.14.9
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 +8 -5
- package/dist/build-metadata.json +2 -2
- package/dist/{chunk-Q33OEQMR.mjs → chunk-4GCGSZA2.mjs} +3 -3
- package/dist/{chunk-Q33OEQMR.mjs.map → chunk-4GCGSZA2.mjs.map} +1 -1
- package/dist/{chunk-HG27KAGT.mjs → chunk-ERJIIFAV.mjs} +3 -3
- package/dist/{chunk-HG27KAGT.mjs.map → chunk-ERJIIFAV.mjs.map} +1 -1
- package/dist/{currency-ELLII4P5.mjs → currency-AGVR2YDU.mjs} +3 -3
- package/dist/{currency-ELLII4P5.mjs.map → currency-AGVR2YDU.mjs.map} +1 -1
- package/dist/index.cjs +12 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +21 -20
- package/dist/index.mjs.map +1 -1
- package/dist/protocolViewerParsers-O5WTGTUK.mjs +5 -0
- package/dist/{protocolViewerParsers-6IAP5ZIJ.mjs.map → protocolViewerParsers-O5WTGTUK.mjs.map} +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.mjs +1 -1
- package/dist/{timeout-GGK4EEKQ.mjs → timeout-RXDD3LQG.mjs} +3 -3
- package/dist/{timeout-GGK4EEKQ.mjs.map → timeout-RXDD3LQG.mjs.map} +1 -1
- package/dist/{vaultUtils-C8yL2H-O.d.mts → vaultUtils-PRhZBjwX.d.mts} +18 -6
- package/dist/{vaultUtils-C8yL2H-O.d.ts → vaultUtils-PRhZBjwX.d.ts} +18 -6
- package/package.json +2 -2
- package/dist/protocolViewerParsers-6IAP5ZIJ.mjs +0 -5
|
@@ -5,8 +5,8 @@ var __export = (target, all) => {
|
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
// <define:__ZKP2P_SDK_BUILD_METADATA__>
|
|
8
|
-
var define_ZKP2P_SDK_BUILD_METADATA_default = { schemaVersion: 2, source: { repository: "zkp2p/zkp2p-clients", commitSha: "
|
|
8
|
+
var define_ZKP2P_SDK_BUILD_METADATA_default = { schemaVersion: 2, source: { repository: "zkp2p/zkp2p-clients", commitSha: "d2e1cd11fec30f7b401b43a3842414c11379ab35", kind: "github", distributable: true }, sdkPackageVersion: "0.14.9", contractsPackageVersion: "0.4.4-rc.2", indexerSchemaPackageVersion: "0.22.0", activeDisputeStack: { base: { version: 2, selectionHash: "ba40c2954b408d0c658881a8d28e5bfcc9bade5cc3d953fd17eae1eca69d841c" }, baseStaging: { version: 2, selectionHash: "6c49c1ce51eec594a22385c4efcab08aa9926b6b63a725e14a0027ec5d2f4fc9" } } };
|
|
9
9
|
|
|
10
10
|
export { __export, define_ZKP2P_SDK_BUILD_METADATA_default };
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
12
|
-
//# sourceMappingURL=chunk-
|
|
11
|
+
//# sourceMappingURL=chunk-ERJIIFAV.mjs.map
|
|
12
|
+
//# sourceMappingURL=chunk-ERJIIFAV.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["%3Cdefine:__ZKP2P_SDK_BUILD_METADATA__%3E"],"names":[],"mappings":";;;;;;;AAAA,IAAA,uCAAA,GAAA,EAAC,aAAA,EAAgB,CAAA,EAAE,MAAA,EAAS,EAAC,YAAa,qBAAA,EAAsB,SAAA,EAAY,0CAAA,EAA2C,IAAA,EAAO,UAAS,aAAA,EAAgB,IAAA,EAAI,EAAE,iBAAA,EAAoB,UAAS,uBAAA,EAA0B,YAAA,EAAa,2BAAA,EAA8B,QAAA,EAAS,oBAAqB,EAAC,IAAA,EAAO,EAAC,OAAA,EAAU,GAAE,aAAA,EAAgB,kEAAA,EAAkE,EAAE,WAAA,EAAc,EAAC,OAAA,EAAU,CAAA,EAAE,aAAA,EAAgB,kEAAA,IAAmE","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["%3Cdefine:__ZKP2P_SDK_BUILD_METADATA__%3E"],"names":[],"mappings":";;;;;;;AAAA,IAAA,uCAAA,GAAA,EAAC,aAAA,EAAgB,CAAA,EAAE,MAAA,EAAS,EAAC,YAAa,qBAAA,EAAsB,SAAA,EAAY,0CAAA,EAA2C,IAAA,EAAO,UAAS,aAAA,EAAgB,IAAA,EAAI,EAAE,iBAAA,EAAoB,UAAS,uBAAA,EAA0B,YAAA,EAAa,2BAAA,EAA8B,QAAA,EAAS,oBAAqB,EAAC,IAAA,EAAO,EAAC,OAAA,EAAU,GAAE,aAAA,EAAgB,kEAAA,EAAkE,EAAE,WAAA,EAAc,EAAC,OAAA,EAAU,CAAA,EAAE,aAAA,EAAgB,kEAAA,IAAmE","file":"chunk-ERJIIFAV.mjs","sourcesContent":["{\"schemaVersion\":2,\"source\":{\"repository\":\"zkp2p/zkp2p-clients\",\"commitSha\":\"d2e1cd11fec30f7b401b43a3842414c11379ab35\",\"kind\":\"github\",\"distributable\":true},\"sdkPackageVersion\":\"0.14.9\",\"contractsPackageVersion\":\"0.4.4-rc.2\",\"indexerSchemaPackageVersion\":\"0.22.0\",\"activeDisputeStack\":{\"base\":{\"version\":2,\"selectionHash\":\"ba40c2954b408d0c658881a8d28e5bfcc9bade5cc3d953fd17eae1eca69d841c\"},\"baseStaging\":{\"version\":2,\"selectionHash\":\"6c49c1ce51eec594a22385c4efcab08aa9926b6b63a725e14a0027ec5d2f4fc9\"}}}"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { Currency, currencyInfo, getCurrencyCodeFromHash, getCurrencyInfoFromCountryCode, getCurrencyInfoFromHash, isSupportedCurrencyHash, mapConversionRatesToOnchain, mapConversionRatesToOnchainMinRate } from './chunk-WDEEWFEU.mjs';
|
|
2
|
-
import './chunk-
|
|
3
|
-
//# sourceMappingURL=currency-
|
|
4
|
-
//# sourceMappingURL=currency-
|
|
2
|
+
import './chunk-ERJIIFAV.mjs';
|
|
3
|
+
//# sourceMappingURL=currency-AGVR2YDU.mjs.map
|
|
4
|
+
//# sourceMappingURL=currency-AGVR2YDU.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"currency-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"currency-AGVR2YDU.mjs"}
|
package/dist/index.cjs
CHANGED
|
@@ -21,7 +21,7 @@ var __export = (target, all) => {
|
|
|
21
21
|
var define_ZKP2P_SDK_BUILD_METADATA_default;
|
|
22
22
|
var init_define_ZKP2P_SDK_BUILD_METADATA = __esm({
|
|
23
23
|
"<define:__ZKP2P_SDK_BUILD_METADATA__>"() {
|
|
24
|
-
define_ZKP2P_SDK_BUILD_METADATA_default = { schemaVersion: 2, source: { repository: "zkp2p/zkp2p-clients", commitSha: "
|
|
24
|
+
define_ZKP2P_SDK_BUILD_METADATA_default = { schemaVersion: 2, source: { repository: "zkp2p/zkp2p-clients", commitSha: "d2e1cd11fec30f7b401b43a3842414c11379ab35", kind: "github", distributable: true }, sdkPackageVersion: "0.14.9", contractsPackageVersion: "0.4.4-rc.2", indexerSchemaPackageVersion: "0.22.0", activeDisputeStack: { base: { version: 2, selectionHash: "ba40c2954b408d0c658881a8d28e5bfcc9bade5cc3d953fd17eae1eca69d841c" }, baseStaging: { version: 2, selectionHash: "6c49c1ce51eec594a22385c4efcab08aa9926b6b63a725e14a0027ec5d2f4fc9" } } };
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
|
|
@@ -102300,8 +102300,9 @@ var usdcUnits = (amount) => {
|
|
|
102300
102300
|
return viem.parseUnits(amount.toString(), 6);
|
|
102301
102301
|
};
|
|
102302
102302
|
({
|
|
102303
|
-
|
|
102304
|
-
|
|
102303
|
+
orderCapDeposit: {
|
|
102304
|
+
minOrder: usdcUnits(5),
|
|
102305
|
+
maxOrder: usdcUnits(500)}});
|
|
102305
102306
|
var DISPUTE_PROTECTION_STAKE_PLATFORMS = [
|
|
102306
102307
|
PaymentPlatform.VENMO,
|
|
102307
102308
|
PaymentPlatform.PAYPAL
|
|
@@ -107277,7 +107278,7 @@ async function apiUploadMicrosoftOAuthSellerCredential(processorName, payeeDetai
|
|
|
107277
107278
|
}
|
|
107278
107279
|
async function apiUploadEmailOAuthSellerCredential(provider, processorName, payeeDetails, body, baseApiUrl, opts) {
|
|
107279
107280
|
const providerName = provider === "google" ? "Google" : "Microsoft";
|
|
107280
|
-
if (processorName !== "paypal" && processorName !== "venmo") {
|
|
107281
|
+
if (processorName !== "paypal" && processorName !== "venmo" && processorName !== "xmoney") {
|
|
107281
107282
|
throw new exports.ValidationError(
|
|
107282
107283
|
`Unsupported ${providerName} OAuth seller credential platform: ${String(processorName)}`,
|
|
107283
107284
|
"processorName"
|
|
@@ -110986,7 +110987,7 @@ function toAttestorError(error, platform, mailboxEmail) {
|
|
|
110986
110987
|
const status = error.details?.status;
|
|
110987
110988
|
const responseObject = asRecord(error.details?.responseObject);
|
|
110988
110989
|
if (status === 429) return rateLimited(mailboxEmail, responseObject, error);
|
|
110989
|
-
if (status === 400 && responseObject?.code === `${platform.toUpperCase()}_ICLOUD_RECEIPT_NOT_FOUND`) {
|
|
110990
|
+
if (status === 400 && responseObject?.code === (platform === "xmoney" ? "XMONEY_EMAIL_RECEIPT_NOT_FOUND" : `${platform.toUpperCase()}_ICLOUD_RECEIPT_NOT_FOUND`)) {
|
|
110990
110991
|
return new ICloudMailCredentialError("receipt_not_found", error.message, {
|
|
110991
110992
|
cause: error
|
|
110992
110993
|
});
|
|
@@ -111080,11 +111081,11 @@ async function uploadICloudMailSellerCredential(params, context) {
|
|
|
111080
111081
|
throw new exports.ValidationError("appSpecificPassword is required", "appSpecificPassword");
|
|
111081
111082
|
}
|
|
111082
111083
|
const payeeDetails = params.payeeDetails.toLowerCase();
|
|
111083
|
-
const
|
|
111084
|
-
if (
|
|
111084
|
+
const suppliedPayeeId = params.platform === "paypal" ? params.payeeEmail.trim().toLowerCase() : params.platform === "xmoney" ? params.payeeUsername.trim().replace(/^@/u, "").toLowerCase() : null;
|
|
111085
|
+
if (suppliedPayeeId !== null && zkp2pAttestation.hashUtf8(suppliedPayeeId) !== payeeDetails) {
|
|
111085
111086
|
throw new ICloudMailCredentialError(
|
|
111086
111087
|
"payee_mismatch",
|
|
111087
|
-
"The PayPal email does not match the registered maker"
|
|
111088
|
+
params.platform === "paypal" ? "The PayPal email does not match the registered maker" : "The X username does not match the registered maker"
|
|
111088
111089
|
);
|
|
111089
111090
|
}
|
|
111090
111091
|
const retryAt = mailboxRetryAt.get(mailboxEmail);
|
|
@@ -111099,7 +111100,7 @@ async function uploadICloudMailSellerCredential(params, context) {
|
|
|
111099
111100
|
const environment = resolveAttestorEnvironment(context.attestationServiceUrl);
|
|
111100
111101
|
mailboxesInFlight.add(mailboxEmail);
|
|
111101
111102
|
try {
|
|
111102
|
-
const payeeId =
|
|
111103
|
+
const payeeId = suppliedPayeeId ?? await resolveVenmoPayeeId(payeeDetails, mailboxEmail, context);
|
|
111103
111104
|
let bundle;
|
|
111104
111105
|
try {
|
|
111105
111106
|
const nitro = zkp2pAttestation.createNitroAttestationClient({
|
|
@@ -114422,7 +114423,7 @@ var Zkp2pClient = class {
|
|
|
114422
114423
|
const providerName = params.provider === "google" ? "Google" : "Microsoft";
|
|
114423
114424
|
if (opts?.signal?.aborted) throw new Error(`${providerName} OAuth upload cancelled.`);
|
|
114424
114425
|
const platform = params.platform;
|
|
114425
|
-
if (platform !== "paypal" && platform !== "venmo") {
|
|
114426
|
+
if (platform !== "paypal" && platform !== "venmo" && platform !== "xmoney") {
|
|
114426
114427
|
throw new exports.ValidationError(
|
|
114427
114428
|
`Unsupported ${providerName} OAuth seller credential platform: ${String(platform)}`,
|
|
114428
114429
|
"platform"
|
|
@@ -114458,7 +114459,7 @@ var Zkp2pClient = class {
|
|
|
114458
114459
|
);
|
|
114459
114460
|
}
|
|
114460
114461
|
/**
|
|
114461
|
-
* Connect an iCloud Mail receipt inbox for PayPal or
|
|
114462
|
+
* Connect an iCloud Mail receipt inbox for PayPal, Venmo or X Money seller automated
|
|
114462
114463
|
* release. The app-specific password is encrypted to the attested enclave and
|
|
114463
114464
|
* posted directly to the attestor (no proxy, no retry). The returned bundle is
|
|
114464
114465
|
* verified against the pinned enclave signer, platform and registered maker,
|