@zkp2p/sdk 0.14.6-rc.1 → 0.14.7-rc.0

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
@@ -313,6 +313,18 @@ console.log(result.hash);
313
313
  console.log(result.depositDetails);
314
314
  ```
315
315
 
316
+ By default, `createDeposit()` enables the trusted group bypass on Venmo and
317
+ PayPal methods. After the deposit mines, it sends one
318
+ `WhitelistPolicy.configureDeposit` per Venmo/PayPal method with the Peer Pay
319
+ merchant group and returns the confirmed hashes as
320
+ `result.accessPolicyTxHashes` (empty for other methods). Members of that group
321
+ skip dispute-protection staking; other takers still stake, and until the policy
322
+ mines, merchants stake too. Pass `enableTrustedGroupBypass: false` to skip it.
323
+ If the deposit was sent but the policy was not confirmed, it throws a
324
+ `ContractError` whose `details.hash` is the deposit transaction. `prepareCreateDeposit()` does not add
325
+ the policy; custom senders call `client.accessPolicy.prepareConfigurePeerPayMerchantDeposit()`
326
+ once the deposit ID is known.
327
+
316
328
  If you do not pass `payeeDetailsHashes`, `createDeposit()` can register the payee details for you. If you want to pre-register or reuse hashes across deposits, use `registerPayeeDetails()` first.
317
329
 
318
330
  New deposits default to the paid intent guardian deployed for the client's
@@ -538,7 +550,7 @@ For table-style liquidity UIs, the low-level `apiGetOrderbookTable()` adapter ex
538
550
 
539
551
  ## Seller Credential Status
540
552
 
541
- Venmo and PayPal Seller Autopilot connections use `uploadGoogleOAuthSellerCredential` for Gmail or `uploadMicrosoftOAuthSellerCredential` for personal Outlook accounts. 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.
553
+ 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.
542
554
 
543
555
  ```ts
544
556
  await client.uploadGoogleOAuthSellerCredential({
@@ -564,6 +576,19 @@ await client.uploadMicrosoftOAuthSellerCredential({
564
576
 
565
577
  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).
566
578
 
579
+ 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.
580
+
581
+ ```ts
582
+ await client.uploadICloudMailSellerCredential({
583
+ platform: 'venmo',
584
+ payeeDetails: registeredMaker.hashedOnchainId,
585
+ mailboxEmail: 'seller@icloud.com',
586
+ appSpecificPassword,
587
+ });
588
+ ```
589
+
590
+ 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.
591
+
567
592
  ```ts
568
593
  const status = await client.getSellerCredentialStatus({
569
594
  processorName: 'venmo',
@@ -660,7 +685,8 @@ transactions for policies written before Groups were retired. Gate use on
660
685
  `client.accessPolicy.isSupported`; unsupported deployments fail closed.
661
686
 
662
687
  Existing policies remain enforced on-chain until disabled or their deposits
663
- close. New policies cannot be created through the SDK. Depositors can use
688
+ close. The only new policy is the trusted group bypass that `createDeposit()`
689
+ adds to Venmo and PayPal deposits by default. Depositors can use
664
690
  `prepareDisable`, `prepareRemoveAllowedGroups`, and
665
691
  `prepareRemoveWhitelistedAddresses` to fail open and remove historical entries.
666
692
 
@@ -2,11 +2,11 @@
2
2
  "schemaVersion": 2,
3
3
  "source": {
4
4
  "repository": "zkp2p/zkp2p-clients",
5
- "commitSha": "9d179ea30bc910db9c1abe810f69e2e79789af92",
5
+ "commitSha": "702186ed22ef1102f2827501e14f12172b5acf9b",
6
6
  "kind": "github",
7
7
  "distributable": true
8
8
  },
9
- "sdkPackageVersion": "0.14.6-rc.1",
9
+ "sdkPackageVersion": "0.14.7-rc.0",
10
10
  "contractsPackageVersion": "0.4.4-rc.2",
11
11
  "indexerSchemaPackageVersion": "0.22.0",
12
12
  "activeDisputeStack": {
@@ -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: "9d179ea30bc910db9c1abe810f69e2e79789af92", kind: "github", distributable: true }, sdkPackageVersion: "0.14.6-rc.1", contractsPackageVersion: "0.4.4-rc.2", indexerSchemaPackageVersion: "0.22.0", activeDisputeStack: { base: { version: 2, selectionHash: "ba40c2954b408d0c658881a8d28e5bfcc9bade5cc3d953fd17eae1eca69d841c" }, baseStaging: { version: 2, selectionHash: "6c49c1ce51eec594a22385c4efcab08aa9926b6b63a725e14a0027ec5d2f4fc9" } } };
8
+ var define_ZKP2P_SDK_BUILD_METADATA_default = { schemaVersion: 2, source: { repository: "zkp2p/zkp2p-clients", commitSha: "702186ed22ef1102f2827501e14f12172b5acf9b", kind: "github", distributable: true }, sdkPackageVersion: "0.14.7-rc.0", 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-GSQH65XT.mjs.map
12
- //# sourceMappingURL=chunk-GSQH65XT.mjs.map
11
+ //# sourceMappingURL=chunk-35IHGX4I.mjs.map
12
+ //# sourceMappingURL=chunk-35IHGX4I.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,eAAc,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-GSQH65XT.mjs","sourcesContent":["{\"schemaVersion\":2,\"source\":{\"repository\":\"zkp2p/zkp2p-clients\",\"commitSha\":\"9d179ea30bc910db9c1abe810f69e2e79789af92\",\"kind\":\"github\",\"distributable\":true},\"sdkPackageVersion\":\"0.14.6-rc.1\",\"contractsPackageVersion\":\"0.4.4-rc.2\",\"indexerSchemaPackageVersion\":\"0.22.0\",\"activeDisputeStack\":{\"base\":{\"version\":2,\"selectionHash\":\"ba40c2954b408d0c658881a8d28e5bfcc9bade5cc3d953fd17eae1eca69d841c\"},\"baseStaging\":{\"version\":2,\"selectionHash\":\"6c49c1ce51eec594a22385c4efcab08aa9926b6b63a725e14a0027ec5d2f4fc9\"}}}"]}
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,eAAc,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-35IHGX4I.mjs","sourcesContent":["{\"schemaVersion\":2,\"source\":{\"repository\":\"zkp2p/zkp2p-clients\",\"commitSha\":\"702186ed22ef1102f2827501e14f12172b5acf9b\",\"kind\":\"github\",\"distributable\":true},\"sdkPackageVersion\":\"0.14.7-rc.0\",\"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-GSQH65XT.mjs';
2
+ import { __export } from './chunk-35IHGX4I.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-764TUYZW.mjs.map
100450
- //# sourceMappingURL=chunk-764TUYZW.mjs.map
100449
+ //# sourceMappingURL=chunk-UQ4YSOEL.mjs.map
100450
+ //# sourceMappingURL=chunk-UQ4YSOEL.mjs.map