@zkp2p/sdk 0.14.2-rc.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 +18 -11
- package/dist/build-metadata.json +2 -2
- package/dist/{chunk-DOZJKZTL.mjs → chunk-DPMEQLSY.mjs} +3 -3
- package/dist/{chunk-DOZJKZTL.mjs.map → chunk-DPMEQLSY.mjs.map} +1 -1
- package/dist/{chunk-PBNUROW5.mjs → chunk-EDYYWCCJ.mjs} +3 -3
- package/dist/{chunk-PBNUROW5.mjs.map → chunk-EDYYWCCJ.mjs.map} +1 -1
- package/dist/{currency-DFRG54XQ.mjs → currency-C5E6NVSR.mjs} +3 -3
- package/dist/{currency-DFRG54XQ.mjs.map → currency-C5E6NVSR.mjs.map} +1 -1
- package/dist/index.cjs +117 -34
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +7 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.mjs +126 -44
- package/dist/index.mjs.map +1 -1
- package/dist/protocolViewerParsers-4BJOG6JG.mjs +5 -0
- package/dist/{protocolViewerParsers-WVXVSWCY.mjs.map → protocolViewerParsers-4BJOG6JG.mjs.map} +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.mjs +1 -1
- package/dist/{timeout-7LS5AHSS.mjs → timeout-QRO3IS4N.mjs} +3 -3
- package/dist/{timeout-7LS5AHSS.mjs.map → timeout-QRO3IS4N.mjs.map} +1 -1
- package/dist/{vaultUtils-Llr7Gh2R.d.mts → vaultUtils-D3J7IDTF.d.mts} +40 -10
- package/dist/{vaultUtils-Llr7Gh2R.d.ts → vaultUtils-D3J7IDTF.d.ts} +40 -10
- package/package.json +1 -1
- package/dist/protocolViewerParsers-WVXVSWCY.mjs +0 -5
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()`
|
|
164
|
-
plaintext
|
|
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.
|
|
405
|
+
await client.uploadGoogleOAuthSellerCredential({
|
|
401
406
|
platform: 'venmo',
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
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.
|
package/dist/build-metadata.json
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"source": {
|
|
4
4
|
"repository": "zkp2p/zkp2p-clients",
|
|
5
|
-
"commitSha": "
|
|
5
|
+
"commitSha": "d6dc13e55393ed8758b7ba6e3d50d0a52b434011",
|
|
6
6
|
"kind": "github",
|
|
7
7
|
"distributable": true
|
|
8
8
|
},
|
|
9
|
-
"sdkPackageVersion": "0.14.2-rc.
|
|
9
|
+
"sdkPackageVersion": "0.14.2-rc.2",
|
|
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-
|
|
2
|
+
import { __export } from './chunk-EDYYWCCJ.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-
|
|
97852
|
-
//# sourceMappingURL=chunk-
|
|
97851
|
+
//# sourceMappingURL=chunk-DPMEQLSY.mjs.map
|
|
97852
|
+
//# sourceMappingURL=chunk-DPMEQLSY.mjs.map
|