@zkp2p/sdk 0.14.2-rc.3 → 0.14.2-rc.4

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
@@ -33,6 +33,43 @@ and chargeback-risk surface. The workspace version lives in `package.json`.
33
33
  - Modular internals: intent, guardian, access-policy, staking, vault, and ProtocolViewer logic are extracted from `Zkp2pClient`, keeping the main client focused on orchestration.
34
34
  - App-level rollout control: the SDK is capability-based. Product gating and phase flags belong in your app layer, not inside transaction helpers.
35
35
 
36
+ ## Optional Venmo Gmail connection
37
+
38
+ Open Peer's **Link your Venmo** popup for an already-registered account.
39
+ The host passes the selected account hash; the user selects Connect Gmail,
40
+ then chooses their receipt inbox through Google.
41
+
42
+ ```ts
43
+ import { openVenmoGmailConnect, VenmoGmailConnectError } from '@zkp2p/sdk';
44
+
45
+ // Call directly from your button's click handler.
46
+ try {
47
+ await openVenmoGmailConnect({ payeeDetails });
48
+ // Refresh the account's credential status.
49
+ } catch (error) {
50
+ if (error instanceof VenmoGmailConnectError) {
51
+ // Preserve error.code for host UI handling and display error.message.
52
+ // Missing receipts: venmo_google_oauth_receipt_not_found.
53
+ }
54
+ }
55
+ ```
56
+
57
+ Google-hosted school and custom domains can attempt verification; no email
58
+ suffix check runs. Missing receipts produce a recoverable verification error.
59
+ Mobile widths request a normal browser tab; desktop requests a popup. The SDK
60
+ also reports blocked popups, closure, and a ten-minute timeout. Browser
61
+ opener isolation or a lost response can interrupt notification; reconcile with
62
+ `client.getSellerCredentialStatus()` or `apiGetSellerCredentialStatus()` before
63
+ retrying. Only `active` with `credentialType: 'google_oauth'` means Gmail is linked.
64
+ Already-active Gmail needs no reconnect. Linking is optional and never gates deposits.
65
+
66
+ Use matching Peer/Curator environments and configure Curator CORS for your host.
67
+ `peerOrigin` accepts HTTPS origins or HTTP localhost for development; Google must
68
+ have the exact callback origin registered. `getVenmoGmailConnectUrl` supports native
69
+ hosts and custom window handling with account-status polling at least ten seconds
70
+ apart. Deploy the hosted page before using the SDK helper. See the
71
+ [flow specification](https://github.com/zkp2p/zkp2p-clients/blob/main/docs/venmo-gmail-connect.md).
72
+
36
73
  ## Installation
37
74
 
38
75
  ```bash
@@ -2,11 +2,11 @@
2
2
  "schemaVersion": 2,
3
3
  "source": {
4
4
  "repository": "zkp2p/zkp2p-clients",
5
- "commitSha": "aaeaeda52c93c46337bd6f3e6d7a49535622fbd2",
5
+ "commitSha": "8f8238e57dadbf8c2dddc5e6a1db1bfaf2d21df2",
6
6
  "kind": "github",
7
7
  "distributable": true
8
8
  },
9
- "sdkPackageVersion": "0.14.2-rc.3",
9
+ "sdkPackageVersion": "0.14.2-rc.4",
10
10
  "contractsPackageVersion": "0.4.2-rc.2",
11
11
  "indexerSchemaPackageVersion": "0.22.0",
12
12
  "activeDisputeStack": {
@@ -1,5 +1,5 @@
1
1
  import { currencyKeccak256, getCurrencyInfoFromHash } from './chunk-ZB22BZLZ.mjs';
2
- import { __export } from './chunk-VGVHGGQU.mjs';
2
+ import { __export } from './chunk-U555K2CU.mjs';
3
3
  import { hexToBytes, keccak256, toBytes, bytesToHex } from 'viem';
4
4
 
5
5
  // src/utils/bigint.ts
@@ -97848,5 +97848,5 @@ function enrichPvIntentView(view, chainId, env = "production") {
97848
97848
  }
97849
97849
 
97850
97850
  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 };
97851
- //# sourceMappingURL=chunk-DNKX73LN.mjs.map
97852
- //# sourceMappingURL=chunk-DNKX73LN.mjs.map
97851
+ //# sourceMappingURL=chunk-4SDRVKB5.mjs.map
97852
+ //# sourceMappingURL=chunk-4SDRVKB5.mjs.map