@zkp2p/sdk 0.14.2-rc.4 → 0.14.2

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
@@ -35,6 +35,11 @@ and chargeback-risk surface. The workspace version lives in `package.json`.
35
35
 
36
36
  ## Optional Venmo Gmail connection
37
37
 
38
+ For partner cash-out integrations, prefer stable `@zkp2p/cash@0.6.1` and its
39
+ [prepare/open/status flow](https://docs.peer.xyz/developer/peer-cash/guide#optional-venmo-receipt-linking).
40
+ It selects the matching environment and keeps linking separate from cash-out.
41
+ The direct SDK helpers below require `@zkp2p/sdk@0.14.2`.
42
+
38
43
  Open Peer's **Link your Venmo** popup for an already-registered account.
39
44
  The host passes the selected account hash; the user selects Connect Gmail,
40
45
  then chooses their receipt inbox through Google.
@@ -70,6 +75,51 @@ hosts and custom window handling with account-status polling at least ten second
70
75
  apart. Deploy the hosted page before using the SDK helper. See the
71
76
  [flow specification](https://github.com/zkp2p/zkp2p-clients/blob/main/docs/venmo-gmail-connect.md).
72
77
 
78
+ ### Popup customization
79
+
80
+ Pass `appearance` to either hosted-link helper and `popup` to the browser opener:
81
+
82
+ ```ts
83
+ await openVenmoGmailConnect({
84
+ payeeDetails,
85
+ popup: { width: 500, height: 620 },
86
+ appearance: {
87
+ logoUrl: 'https://your-app.example/logo.png',
88
+ logoAlt: 'Your app',
89
+ backgroundColor: '#FFFFFF',
90
+ textColor: '#172033',
91
+ secondaryTextColor: '#636B7A',
92
+ buttonColor: '#6246EA',
93
+ buttonTextColor: '#FFFFFF',
94
+ buttonHoverColor: '#5035CC',
95
+ focusColor: '#6246EA',
96
+ fontFamily: 'Arial, sans-serif',
97
+ headingFontFamily: 'Arial, sans-serif',
98
+ headingTextTransform: 'none',
99
+ buttonTextTransform: 'none',
100
+ headingFontSize: 30,
101
+ buttonBorderRadius: 24,
102
+ buttonHeight: 52,
103
+ logoHeight: 44,
104
+ },
105
+ });
106
+ ```
107
+
108
+ The page centers your hosted logo and Venmo in equal circular frames with connection dots below the explanation, using Peer when no partner logo is supplied. `fontUrl` optionally loads a hosted WOFF/WOFF2 face (the font host must
109
+ allow CORS); a failed font uses the fallback stack. Failed partner images show Peer. Asset URLs require HTTPS, with HTTP localhost allowed for development.
110
+
111
+ `VenmoGmailAppearance` also exposes `cardBackgroundColor`, `cardBorderRadius`,
112
+ `borderColor`, `contentWidth`, `padding`, `gap`, `fontSize`, `successColor` and
113
+ `errorColor`. Colors use `#RGB` or `#RRGGBB`; sizes are pixels. Invalid options
114
+ throw `ValidationError` before the popup opens. Arbitrary CSS/HTML is not accepted.
115
+ Choose contrasting text, button and focus colors.
116
+
117
+ Popup width supports 320–1200 px and height 480–1600 px. Mobile still requests a
118
+ regular tab, whose size and presentation are controlled by the browser. Branding
119
+ and styles survive the existing Google callback; account binding, consent copy,
120
+ receipt verification and error codes remain unchanged. Google controls its own
121
+ consent page's appearance.
122
+
73
123
  ## Installation
74
124
 
75
125
  ```bash
@@ -2,11 +2,11 @@
2
2
  "schemaVersion": 2,
3
3
  "source": {
4
4
  "repository": "zkp2p/zkp2p-clients",
5
- "commitSha": "8f8238e57dadbf8c2dddc5e6a1db1bfaf2d21df2",
5
+ "commitSha": "a87f38c512f987fc3b9234b5aee31115bf840a18",
6
6
  "kind": "github",
7
7
  "distributable": true
8
8
  },
9
- "sdkPackageVersion": "0.14.2-rc.4",
9
+ "sdkPackageVersion": "0.14.2",
10
10
  "contractsPackageVersion": "0.4.2-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: "a87f38c512f987fc3b9234b5aee31115bf840a18", kind: "github", distributable: true }, sdkPackageVersion: "0.14.2", contractsPackageVersion: "0.4.2-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-BVBHBKX7.mjs.map
12
+ //# sourceMappingURL=chunk-BVBHBKX7.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,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-BVBHBKX7.mjs","sourcesContent":["{\"schemaVersion\":2,\"source\":{\"repository\":\"zkp2p/zkp2p-clients\",\"commitSha\":\"a87f38c512f987fc3b9234b5aee31115bf840a18\",\"kind\":\"github\",\"distributable\":true},\"sdkPackageVersion\":\"0.14.2\",\"contractsPackageVersion\":\"0.4.2-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-ZB22BZLZ.mjs';
2
- import { __export } from './chunk-U555K2CU.mjs';
2
+ import { __export } from './chunk-BVBHBKX7.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-4SDRVKB5.mjs.map
97852
- //# sourceMappingURL=chunk-4SDRVKB5.mjs.map
97851
+ //# sourceMappingURL=chunk-OP2REHNS.mjs.map
97852
+ //# sourceMappingURL=chunk-OP2REHNS.mjs.map