@zkp2p/sdk 0.14.8 → 0.14.10
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 +25 -5
- package/dist/build-metadata.json +2 -2
- package/dist/chunk-DIHRDN2W.mjs +12 -0
- package/dist/chunk-DIHRDN2W.mjs.map +1 -0
- package/dist/{chunk-Q33OEQMR.mjs → chunk-PLUTAOT5.mjs} +3 -3
- package/dist/{chunk-Q33OEQMR.mjs.map → chunk-PLUTAOT5.mjs.map} +1 -1
- package/dist/{currency-ELLII4P5.mjs → currency-74LZHM6Q.mjs} +3 -3
- package/dist/{currency-ELLII4P5.mjs.map → currency-74LZHM6Q.mjs.map} +1 -1
- package/dist/index.cjs +87 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +27 -7
- package/dist/index.d.ts +27 -7
- package/dist/index.mjs +88 -46
- package/dist/index.mjs.map +1 -1
- package/dist/protocolViewerParsers-6BOFKH3F.mjs +5 -0
- package/dist/{protocolViewerParsers-6IAP5ZIJ.mjs.map → protocolViewerParsers-6BOFKH3F.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-WX76D6NU.mjs} +3 -3
- package/dist/{timeout-GGK4EEKQ.mjs.map → timeout-WX76D6NU.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/chunk-HG27KAGT.mjs +0 -12
- package/dist/chunk-HG27KAGT.mjs.map +0 -1
- package/dist/protocolViewerParsers-6IAP5ZIJ.mjs +0 -5
package/README.md
CHANGED
|
@@ -79,6 +79,23 @@ hosts and custom window handling with account-status polling at least ten second
|
|
|
79
79
|
apart. Deploy the hosted page before using the SDK helper. See the
|
|
80
80
|
[flow specification](https://github.com/zkp2p/zkp2p-clients/blob/main/docs/venmo-gmail-connect.md).
|
|
81
81
|
|
|
82
|
+
### X Money receipt linking
|
|
83
|
+
|
|
84
|
+
`getXMoneyConnectUrl` and `openXMoneyConnect` use the same mailbox flow at
|
|
85
|
+
`/connect/xmoney`. Pass the registered `payeeDetails` hash and `payeeUsername`.
|
|
86
|
+
The normalized X username must hash to that identity. Both stay in the URL
|
|
87
|
+
fragment. X Money email notifications must be enabled and the inbox must contain
|
|
88
|
+
a signed received-payment receipt for that account. Gmail, personal Outlook and
|
|
89
|
+
iCloud Mail are supported. Deploy the hosted page before enabling this helper.
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
import { openXMoneyConnect } from '@zkp2p/sdk';
|
|
93
|
+
await openXMoneyConnect({ payeeDetails, payeeUsername: 'seller' });
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The URL builder also accepts `returnUrl` for native hosts. Re-check the mailbox
|
|
97
|
+
credential status after return or dismissal, as with Venmo.
|
|
98
|
+
|
|
82
99
|
### Native app return
|
|
83
100
|
|
|
84
101
|
SDK `0.14.3` adds optional `returnUrl` to the URL builder. Partners
|
|
@@ -292,9 +309,10 @@ bundle `payeeIdHash`, and store the encrypted bundle with curator. Plaintext
|
|
|
292
309
|
seller session material is never returned to the page.
|
|
293
310
|
|
|
294
311
|
`Zkp2pClient.uploadSellerCredential()` supports Cash App, Wise, and Amazon Pay UPI
|
|
295
|
-
plaintext input from trusted runtimes.
|
|
296
|
-
|
|
297
|
-
|
|
312
|
+
plaintext input from trusted runtimes. It creates the encrypted bundle, then uses
|
|
313
|
+
`apiUploadSellerCredentialBundle()` for storage. Venmo, PayPal, and X Money use
|
|
314
|
+
the [mailbox upload helpers](#seller-credential-status) for Gmail, personal
|
|
315
|
+
Outlook, or iCloud Mail.
|
|
298
316
|
|
|
299
317
|
## Create a Deposit
|
|
300
318
|
|
|
@@ -551,7 +569,7 @@ For table-style liquidity UIs, the low-level `apiGetOrderbookTable()` adapter ex
|
|
|
551
569
|
|
|
552
570
|
## Seller Credential Status
|
|
553
571
|
|
|
554
|
-
Venmo and
|
|
572
|
+
Venmo, PayPal and X Money Seller Autopilot connections use `uploadGoogleOAuthSellerCredential` for Gmail, `uploadMicrosoftOAuthSellerCredential` for personal Outlook accounts, or `uploadICloudMailSellerCredential` for iCloud Mail. The normal `uploadSellerCredential` and extension seller-capture paths support Cash App, Wise (token upload only), and Amazon Pay UPI. Existing backend Venmo cookie bundles remain usable through status/verification and low-level encrypted-bundle APIs.
|
|
555
573
|
|
|
556
574
|
```ts
|
|
557
575
|
await client.uploadGoogleOAuthSellerCredential({
|
|
@@ -575,9 +593,11 @@ await client.uploadMicrosoftOAuthSellerCredential({
|
|
|
575
593
|
});
|
|
576
594
|
```
|
|
577
595
|
|
|
596
|
+
X Money mailbox uploads require SDK 0.14.9 or later. For Gmail and Outlook, pass `platform: 'xmoney'` with the registered maker hash and the same OAuth code fields; no `payeeEmail` is needed. Enable X Money email notifications and receive a payment before connecting. The server accepts a credential only after validating a received-payment email for the registered X account. A historical receipt establishes delivery, not the current notification-setting state; keep notifications enabled for future payments. A missing or invalid receipt returns `XMONEY_EMAIL_RECEIPT_NOT_FOUND`.
|
|
597
|
+
|
|
578
598
|
Validate OAuth state in the initiating browser tab before uploading. `redirectUri` must exactly match the one in the authorization request. Both methods exchange a one-time code without retrying; start fresh consent if the response is lost. The Microsoft client secret stays server-side. See [email connection setup](../../docs/email-oauth.md).
|
|
579
599
|
|
|
580
|
-
iCloud Mail has no OAuth. Pass the seller's Apple app-specific password with the registered maker hash; PayPal also passes its receiving email. For Venmo, the SDK fetches the maker's account ID from Curator (`GET /v2/makers/venmo/{payeeDetails}/payee-id`) and checks it against `payeeDetails` before any mailbox work, so sellers never enter it.
|
|
600
|
+
iCloud Mail has no OAuth. Pass the seller's Apple app-specific password with the registered maker hash; PayPal also passes its receiving email, and X Money passes `payeeUsername` (normalized lowercase and checked against the maker hash). For Venmo, the SDK fetches the maker's account ID from Curator (`GET /v2/makers/venmo/{payeeDetails}/payee-id`) and checks it against `payeeDetails` before any mailbox work, so sellers never enter it.
|
|
581
601
|
|
|
582
602
|
```ts
|
|
583
603
|
await client.uploadICloudMailSellerCredential({
|
package/dist/build-metadata.json
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"source": {
|
|
4
4
|
"repository": "zkp2p/zkp2p-clients",
|
|
5
|
-
"commitSha": "
|
|
5
|
+
"commitSha": "561ca15adeac3e97e582647c818656e69289020d",
|
|
6
6
|
"kind": "github",
|
|
7
7
|
"distributable": true
|
|
8
8
|
},
|
|
9
|
-
"sdkPackageVersion": "0.14.
|
|
9
|
+
"sdkPackageVersion": "0.14.10",
|
|
10
10
|
"contractsPackageVersion": "0.4.4-rc.2",
|
|
11
11
|
"indexerSchemaPackageVersion": "0.22.0",
|
|
12
12
|
"activeDisputeStack": {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __export = (target, all) => {
|
|
3
|
+
for (var name in all)
|
|
4
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
// <define:__ZKP2P_SDK_BUILD_METADATA__>
|
|
8
|
+
var define_ZKP2P_SDK_BUILD_METADATA_default = { schemaVersion: 2, source: { repository: "zkp2p/zkp2p-clients", commitSha: "561ca15adeac3e97e582647c818656e69289020d", kind: "github", distributable: true }, sdkPackageVersion: "0.14.10", contractsPackageVersion: "0.4.4-rc.2", indexerSchemaPackageVersion: "0.22.0", activeDisputeStack: { base: { version: 2, selectionHash: "ba40c2954b408d0c658881a8d28e5bfcc9bade5cc3d953fd17eae1eca69d841c" }, baseStaging: { version: 2, selectionHash: "6c49c1ce51eec594a22385c4efcab08aa9926b6b63a725e14a0027ec5d2f4fc9" } } };
|
|
9
|
+
|
|
10
|
+
export { __export, define_ZKP2P_SDK_BUILD_METADATA_default };
|
|
11
|
+
//# sourceMappingURL=chunk-DIHRDN2W.mjs.map
|
|
12
|
+
//# sourceMappingURL=chunk-DIHRDN2W.mjs.map
|
|
@@ -0,0 +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,WAAU,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-DIHRDN2W.mjs","sourcesContent":["{\"schemaVersion\":2,\"source\":{\"repository\":\"zkp2p/zkp2p-clients\",\"commitSha\":\"561ca15adeac3e97e582647c818656e69289020d\",\"kind\":\"github\",\"distributable\":true},\"sdkPackageVersion\":\"0.14.10\",\"contractsPackageVersion\":\"0.4.4-rc.2\",\"indexerSchemaPackageVersion\":\"0.22.0\",\"activeDisputeStack\":{\"base\":{\"version\":2,\"selectionHash\":\"ba40c2954b408d0c658881a8d28e5bfcc9bade5cc3d953fd17eae1eca69d841c\"},\"baseStaging\":{\"version\":2,\"selectionHash\":\"6c49c1ce51eec594a22385c4efcab08aa9926b6b63a725e14a0027ec5d2f4fc9\"}}}"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { currencyKeccak256, getCurrencyInfoFromHash } from './chunk-WDEEWFEU.mjs';
|
|
2
|
-
import { __export } from './chunk-
|
|
2
|
+
import { __export } from './chunk-DIHRDN2W.mjs';
|
|
3
3
|
import { hexToBytes, keccak256, toBytes, bytesToHex } from 'viem';
|
|
4
4
|
|
|
5
5
|
// src/utils/bigint.ts
|
|
@@ -100446,5 +100446,5 @@ function enrichPvIntentView(view, chainId, env = "production") {
|
|
|
100446
100446
|
}
|
|
100447
100447
|
|
|
100448
100448
|
export { DISPUTE_PROTECTION_POLICY_ABI, DISPUTE_PROTECTION_POLICY_ABI2, DisputeNullifierRegistry_default3 as DisputeNullifierRegistry_default, DisputeProtectionPolicy_default3 as DisputeProtectionPolicy_default, DisputeVerifier_default3 as DisputeVerifier_default, IntentLifecycleHookV1_default3 as IntentLifecycleHookV1_default, METHOD_NAME_TO_HASH, MultiAttestationVerifier_default3 as MultiAttestationVerifier_default, ORCHESTRATOR_V3_ABI2 as ORCHESTRATOR_V3_ABI, OrchestratorRegistry_default3 as OrchestratorRegistry_default, OrchestratorV3_default3 as OrchestratorV3_default, PAYMENT_PLATFORMS, STAKE_VAULT_ABI2 as STAKE_VAULT_ABI, SUPPORTED_PAYMENT_METHOD_HASHES, StakeVault_default3 as StakeVault_default, WhitelistPolicy_default3 as WhitelistPolicy_default, asciiToBytes32, enrichPvDepositView, enrichPvIntentView, ensureBytes32, getContracts, getDisputeProtectionPolicyContract, getGatingServiceAddress, getIntentGuardianContract, getOrchestratorV3Contract, getPaymentMethodsCatalog, getRateManagerContracts, getStakeVaultContract, hasIntentGuardian, matchesPaymentMethodNameAndHash, matchesQuotePaymentMethod, parseBigIntLike, parseDepositView, parseIntentView, resolveFiatCurrencyBytes32, resolvePaymentMethodHash, resolvePaymentMethodHashFromCatalog, resolvePaymentMethodNameFromHash };
|
|
100449
|
-
//# sourceMappingURL=chunk-
|
|
100450
|
-
//# sourceMappingURL=chunk-
|
|
100449
|
+
//# sourceMappingURL=chunk-PLUTAOT5.mjs.map
|
|
100450
|
+
//# sourceMappingURL=chunk-PLUTAOT5.mjs.map
|