@zkp2p/sdk 0.14.9 → 0.14.11-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 +19 -2
- package/dist/build-metadata.json +2 -2
- package/dist/chunk-IYYNDUDP.mjs +12 -0
- package/dist/chunk-IYYNDUDP.mjs.map +1 -0
- package/dist/{chunk-4GCGSZA2.mjs → chunk-QDSNHQGS.mjs} +3 -3
- package/dist/{chunk-4GCGSZA2.mjs.map → chunk-QDSNHQGS.mjs.map} +1 -1
- package/dist/{currency-AGVR2YDU.mjs → currency-224A3JT3.mjs} +3 -3
- package/dist/{currency-AGVR2YDU.mjs.map → currency-224A3JT3.mjs.map} +1 -1
- package/dist/index.cjs +93 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +27 -7
- package/dist/index.d.ts +27 -7
- package/dist/index.mjs +94 -42
- package/dist/index.mjs.map +1 -1
- package/dist/protocolViewerParsers-XBMV53ND.mjs +5 -0
- package/dist/{protocolViewerParsers-O5WTGTUK.mjs.map → protocolViewerParsers-XBMV53ND.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-RXDD3LQG.mjs → timeout-G23BY4BS.mjs} +3 -3
- package/dist/{timeout-RXDD3LQG.mjs.map → timeout-G23BY4BS.mjs.map} +1 -1
- package/dist/{vaultUtils-PRhZBjwX.d.mts → vaultUtils-rtYn04WQ.d.mts} +9 -7
- package/dist/{vaultUtils-PRhZBjwX.d.ts → vaultUtils-rtYn04WQ.d.ts} +9 -7
- package/package.json +1 -1
- package/dist/chunk-ERJIIFAV.mjs +0 -12
- package/dist/chunk-ERJIIFAV.mjs.map +0 -1
- package/dist/protocolViewerParsers-O5WTGTUK.mjs +0 -5
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ 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.7.
|
|
38
|
+
For partner cash-out integrations, prefer stable `@zkp2p/cash@0.7.3` and its
|
|
39
39
|
[prepare/open/status flow](https://docs.peer.xyz/developer/peer-cash/guide#optional-venmo-receipt-linking).
|
|
40
40
|
It selects the matching environment and keeps linking separate from cash-out.
|
|
41
41
|
The direct SDK helpers below require `@zkp2p/sdk@0.14.2` or later.
|
|
@@ -79,6 +79,23 @@ hosts and custom window handling with account-status polling at least ten second
|
|
|
79
79
|
apart. Deploy the hosted page before using the SDK helper. See the
|
|
80
80
|
[flow specification](https://github.com/zkp2p/zkp2p-clients/blob/main/docs/venmo-gmail-connect.md).
|
|
81
81
|
|
|
82
|
+
### X Money receipt linking
|
|
83
|
+
|
|
84
|
+
SDK `0.14.10` adds `getXMoneyConnectUrl` and `openXMoneyConnect`, using the same mailbox flow at
|
|
85
|
+
`/connect/xmoney`. Pass the registered `payeeDetails` hash and `payeeUsername`.
|
|
86
|
+
The normalized X username must hash to that identity. Both stay in the URL
|
|
87
|
+
fragment. X Money email notifications must be enabled and the inbox must contain
|
|
88
|
+
a signed received-payment receipt for that account. Gmail, personal Outlook and
|
|
89
|
+
iCloud Mail are supported. Deploy the hosted page before enabling this helper.
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
import { openXMoneyConnect } from '@zkp2p/sdk';
|
|
93
|
+
await openXMoneyConnect({ payeeDetails, payeeUsername: 'seller' });
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The URL builder also accepts `returnUrl` for native hosts. Re-check the mailbox
|
|
97
|
+
credential status after return or dismissal, as with Venmo.
|
|
98
|
+
|
|
82
99
|
### Native app return
|
|
83
100
|
|
|
84
101
|
SDK `0.14.3` adds optional `returnUrl` to the URL builder. Partners
|
|
@@ -591,7 +608,7 @@ await client.uploadICloudMailSellerCredential({
|
|
|
591
608
|
});
|
|
592
609
|
```
|
|
593
610
|
|
|
594
|
-
The password is encrypted to the attested enclave and posted
|
|
611
|
+
The password is encrypted to the attested enclave and posted to the attestor paired with `baseApiUrl`. If a request to the attestor fails at the network layer, the SDK sends it once through that attestor's proxy, which serves the same enclave; the attestation is still checked against that attestor's pins. 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). Apart from that fallback, the method never retries; one connection per mailbox runs at a time. `isMailboxSellerCredentialType` recognizes Gmail, Outlook and iCloud Mail credentials.
|
|
595
612
|
|
|
596
613
|
```ts
|
|
597
614
|
const status = await client.getSellerCredentialStatus({
|
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": "26dc03c06a65c8c09395cb30fc341aa20f550bf9",
|
|
6
6
|
"kind": "github",
|
|
7
7
|
"distributable": true
|
|
8
8
|
},
|
|
9
|
-
"sdkPackageVersion": "0.14.
|
|
9
|
+
"sdkPackageVersion": "0.14.11-rc.0",
|
|
10
10
|
"contractsPackageVersion": "0.4.4-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: "26dc03c06a65c8c09395cb30fc341aa20f550bf9", kind: "github", distributable: true }, sdkPackageVersion: "0.14.11-rc.0", contractsPackageVersion: "0.4.4-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-IYYNDUDP.mjs.map
|
|
12
|
+
//# sourceMappingURL=chunk-IYYNDUDP.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,gBAAe,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-IYYNDUDP.mjs","sourcesContent":["{\"schemaVersion\":2,\"source\":{\"repository\":\"zkp2p/zkp2p-clients\",\"commitSha\":\"26dc03c06a65c8c09395cb30fc341aa20f550bf9\",\"kind\":\"github\",\"distributable\":true},\"sdkPackageVersion\":\"0.14.11-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-
|
|
2
|
+
import { __export } from './chunk-IYYNDUDP.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-
|
|
100450
|
-
//# sourceMappingURL=chunk-
|
|
100449
|
+
//# sourceMappingURL=chunk-QDSNHQGS.mjs.map
|
|
100450
|
+
//# sourceMappingURL=chunk-QDSNHQGS.mjs.map
|