@zkp2p/sdk 0.14.1 → 0.14.2-rc.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
@@ -152,7 +152,7 @@ origins. Trusted Peer hosts and `localhost` are already connected.
152
152
  `actionType`; the extension fetches the matching extension-managed template
153
153
  from `https://api.zkp2p.xyz/providers/`. Buyer TEE is API/template driven: pass `captureMode: "buyerTee"` plus
154
154
  `attestationServiceUrl`, and the extension returns encrypted session material.
155
- For SAR, pass `captureMode: "sellerCredential"` and optionally pass
155
+ For Cash App and Amazon Pay UPI SAR, pass `captureMode: "sellerCredential"` and optionally pass
156
156
  `attestationServiceUrl` only when overriding the extension's production
157
157
  attestation default. The extension returns `sarCredentialCapture.credentialBundle`
158
158
  plus `offchainId`. The page should call `apiUploadSellerCredentialBundle()` to
@@ -160,8 +160,8 @@ register maker payee details with curator, compare the registered hash to the
160
160
  bundle `payeeIdHash`, and store the encrypted bundle with curator. Plaintext
161
161
  seller session material is never returned to the page.
162
162
 
163
- `Zkp2pClient.uploadSellerCredential()` remains the backwards-compatible
164
- plaintext convenience path for mobile and React Native callers. Internally it
163
+ `Zkp2pClient.uploadSellerCredential()` supports Cash App, Wise, and Amazon Pay UPI
164
+ plaintext input from trusted runtimes. Venmo and PayPal use the Google OAuth helper. Internally it
165
165
  creates the encrypted bundle, then uses the same
166
166
  `apiUploadSellerCredentialBundle()` storage helper.
167
167
 
@@ -276,9 +276,12 @@ const activity = await client.indexer.getStakeActivity({
276
276
  chainId: 8453,
277
277
  vaultAddress: client.getStakeVaultContract().address,
278
278
  merchant: takerAddress,
279
+ orderDirection: 'desc', // Newest first; defaults to asc for chronological ingestion.
279
280
  limit: 50,
280
281
  });
281
282
 
283
+ // Keep orderDirection unchanged when passing activity.nextCursor for older pages.
284
+
282
285
  const finalizedDisputes = await client.indexer.getDisputeProtectionIntents({
283
286
  chainId: 8453,
284
287
  policyAddress: client.getDisputeProtectionPolicyContract().address,
@@ -396,16 +399,14 @@ For table-style liquidity UIs, the low-level `apiGetOrderbookTable()` adapter ex
396
399
 
397
400
  ## Seller Credential Status
398
401
 
402
+ Venmo and PayPal Seller Autopilot connections use `uploadGoogleOAuthSellerCredential`. 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.
403
+
399
404
  ```ts
400
- await client.uploadSellerCredential({
405
+ await client.uploadGoogleOAuthSellerCredential({
401
406
  platform: 'venmo',
402
- offchainId: 'example-user',
403
- payeeId: 'example-payee-id',
404
- sessionMaterial: {
405
- recipientUsername: 'example-user',
406
- accountId: 'example-account-id',
407
- sessionCookie: 'redacted-session-cookie',
408
- },
407
+ payeeDetails: registeredMaker.hashedOnchainId,
408
+ authorizationCode,
409
+ redirectUri,
409
410
  });
410
411
  ```
411
412
 
@@ -980,3 +981,9 @@ pnpm docs
980
981
  - Docs: https://docs.peer.xyz
981
982
  - Monorepo: https://github.com/zkp2p/zkp2p-clients
982
983
  - TypeDoc output: `packages/sdk/docs` (generated locally by `pnpm --filter @zkp2p/sdk docs`)
984
+
985
+ ### Amazon Pay UPI seller credentials
986
+
987
+ Use `platform: 'upi'` with `callerAddress` and `sessionMaterial: { sessionCookie, userAgent }` in the private extension runtime. Omit `payeeId` and `offchainId` when creating the bundle: the attestor derives the receiving VPA from Amazon's current QR. `getAmazonPaySellerIdentity(bundle)` reads that returned identity; storage registers that exact VPA and checks its maker hash against the sealed bundle. Never expose session material to the requesting page.
988
+
989
+ Amazon capture requires extension 0.6.8 or later. Staging SAR uses the trusted staging attestor and staging provider templates; production requires its Amazon template and backend rollout. This source change does not publish either package or extension.
@@ -2,12 +2,12 @@
2
2
  "schemaVersion": 2,
3
3
  "source": {
4
4
  "repository": "zkp2p/zkp2p-clients",
5
- "commitSha": "d79a1d06e126e0407d68e4b98bf7c8abb54f0bc9",
5
+ "commitSha": "d6dc13e55393ed8758b7ba6e3d50d0a52b434011",
6
6
  "kind": "github",
7
7
  "distributable": true
8
8
  },
9
- "sdkPackageVersion": "0.14.1",
10
- "contractsPackageVersion": "0.4.1",
9
+ "sdkPackageVersion": "0.14.2-rc.2",
10
+ "contractsPackageVersion": "0.4.2-rc.2",
11
11
  "indexerSchemaPackageVersion": "0.22.0",
12
12
  "activeDisputeStack": {
13
13
  "base": {