@zkp2p/sdk 0.14.8-rc.0 → 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 CHANGED
@@ -40,7 +40,7 @@ For partner cash-out integrations, prefer stable `@zkp2p/cash@0.7.2` and its
40
40
  It selects the matching environment and keeps linking separate from cash-out.
41
41
  The direct SDK helpers below require `@zkp2p/sdk@0.14.2` or later.
42
42
 
43
- Open Peer's **Link your Venmo** popup for an already-registered account.
43
+ Open Peer's **Verify your Venmo** popup for an already-registered account.
44
44
  The host passes the selected account hash; the user picks Gmail or Outlook,
45
45
  which opens that provider's consent, or iCloud Mail, which takes an Apple
46
46
  app-specific password on the Peer page.
@@ -292,9 +292,10 @@ bundle `payeeIdHash`, and store the encrypted bundle with curator. Plaintext
292
292
  seller session material is never returned to the page.
293
293
 
294
294
  `Zkp2pClient.uploadSellerCredential()` supports Cash App, Wise, and Amazon Pay UPI
295
- plaintext input from trusted runtimes. Venmo and PayPal use the Google OAuth helper. Internally it
296
- creates the encrypted bundle, then uses the same
297
- `apiUploadSellerCredentialBundle()` storage helper.
295
+ plaintext input from trusted runtimes. It creates the encrypted bundle, then uses
296
+ `apiUploadSellerCredentialBundle()` for storage. Venmo, PayPal, and X Money use
297
+ the [mailbox upload helpers](#seller-credential-status) for Gmail, personal
298
+ Outlook, or iCloud Mail.
298
299
 
299
300
  ## Create a Deposit
300
301
 
@@ -551,7 +552,7 @@ For table-style liquidity UIs, the low-level `apiGetOrderbookTable()` adapter ex
551
552
 
552
553
  ## Seller Credential Status
553
554
 
554
- Venmo and PayPal 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
+ 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
556
 
556
557
  ```ts
557
558
  await client.uploadGoogleOAuthSellerCredential({
@@ -575,9 +576,11 @@ await client.uploadMicrosoftOAuthSellerCredential({
575
576
  });
576
577
  ```
577
578
 
579
+ 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`.
580
+
578
581
  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
582
 
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.
583
+ 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
584
 
582
585
  ```ts
583
586
  await client.uploadICloudMailSellerCredential({
@@ -590,8 +593,6 @@ await client.uploadICloudMailSellerCredential({
590
593
 
591
594
  The password is encrypted to the attested enclave and posted directly to the attestor paired with `baseApiUrl`. The returned bundle is verified against the pinned enclave signer, platform and maker before it is stored unchanged; the maker is not re-registered. React Native callers pass `{ attestationRuntime: { subtle, getRandomValues } }`. Failures reject with `ICloudMailCredentialError`, whose `reason` names the condition (`payee_mismatch`, `payee_not_found`, `receipt_not_found`, `app_password_rejected`, `rate_limited` with `retryAfterMs`, and so on). The method never retries; one connection per mailbox runs at a time. `isMailboxSellerCredentialType` recognizes Gmail, Outlook and iCloud Mail credentials.
592
595
 
593
- To store the bundle through another Curator route, such as an App Clip's request-scoped SAR connection, call `client.attestICloudMailSellerCredential` with the same arguments. It runs the same checks, enclave upload and verification, then returns the verified `SellerCredentialBundleUpload` without storing it, so it needs no Curator session. Walletless callers use the exported `attestICloudMailSellerCredential(params, { attestationServiceUrl, baseApiUrl, timeoutMs, attestationRuntime })` and name the attestor themselves. Errors, the mailbox lock and rate-limit delays match the upload.
594
-
595
596
  ```ts
596
597
  const status = await client.getSellerCredentialStatus({
597
598
  processorName: 'venmo',
@@ -2,11 +2,11 @@
2
2
  "schemaVersion": 2,
3
3
  "source": {
4
4
  "repository": "zkp2p/zkp2p-clients",
5
- "commitSha": "959ea2fdca3a9938c97be98f96f66f1e74ec144d",
5
+ "commitSha": "d2e1cd11fec30f7b401b43a3842414c11379ab35",
6
6
  "kind": "github",
7
7
  "distributable": true
8
8
  },
9
- "sdkPackageVersion": "0.14.8-rc.0",
9
+ "sdkPackageVersion": "0.14.9",
10
10
  "contractsPackageVersion": "0.4.4-rc.2",
11
11
  "indexerSchemaPackageVersion": "0.22.0",
12
12
  "activeDisputeStack": {
@@ -1,5 +1,5 @@
1
1
  import { currencyKeccak256, getCurrencyInfoFromHash } from './chunk-WDEEWFEU.mjs';
2
- import { __export } from './chunk-KQT4XYPO.mjs';
2
+ import { __export } from './chunk-ERJIIFAV.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-7MZINJ6Z.mjs.map
100450
- //# sourceMappingURL=chunk-7MZINJ6Z.mjs.map
100449
+ //# sourceMappingURL=chunk-4GCGSZA2.mjs.map
100450
+ //# sourceMappingURL=chunk-4GCGSZA2.mjs.map