@zkp2p/zkp2p-attestation 1.6.2 → 2.0.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/CHANGELOG.md +12 -1
- package/README.md +5 -11
- package/dist/cli/verify.js +10 -4
- package/dist/cli/verify.js.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -24
- package/dist/index.d.ts +3 -24
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
## 2.0.0
|
|
6
|
+
|
|
7
|
+
- Hard-cut the preprod hostname to the isolated preprod enclave PCR8. Production remains pinned only at `attestation-service.zkp2p.xyz`.
|
|
8
|
+
- BREAKING: Buyer TEE Zelle verification now accepts only `platform: "zelle"` with `transfer_zelle_bofa`, `transfer_zelle_chase`, or `transfer_zelle_citi`. All three actions attest the generic Zelle payment-method hash.
|
|
9
|
+
|
|
10
|
+
## 1.6.3
|
|
11
|
+
|
|
12
|
+
- Bind the default global `fetch` fallback to `globalThis` so browser and extension callers that rely on SDK defaults do not hit receiver-sensitive `Illegal invocation` failures. Caller-provided `fetch` overrides are still used unchanged.
|
|
13
|
+
|
|
3
14
|
## 1.6.2
|
|
4
15
|
|
|
5
16
|
- Default the production environment to `https://attestation-service.zkp2p.xyz` and bundle a production PCR8 pin for that hostname. The historical `attestation-service-preprod.zkp2p.xyz` hostname remains pinned to the same production PCR8.
|
|
@@ -11,7 +22,7 @@
|
|
|
11
22
|
|
|
12
23
|
## 1.6.0
|
|
13
24
|
|
|
14
|
-
- Add generic buyer TEE Zelle typing for `platform: "zelle"` and bank-specific action types `transfer_zelle_bofa`, `transfer_zelle_chase`, and `transfer_zelle_citi
|
|
25
|
+
- Add generic buyer TEE Zelle typing for `platform: "zelle"` and bank-specific action types `transfer_zelle_bofa`, `transfer_zelle_chase`, and `transfer_zelle_citi`.
|
|
15
26
|
|
|
16
27
|
## 1.5.1
|
|
17
28
|
|
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ Environment defaults:
|
|
|
31
31
|
| `staging` | `https://attestation-service-staging.zkp2p.xyz` | bundled staging pin |
|
|
32
32
|
| `production` | `https://attestation-service.zkp2p.xyz` | bundled production pin |
|
|
33
33
|
|
|
34
|
-
Callers can still pass `attestationServiceUrl` and `trust.expectedPcr8Hex` directly. Explicit trust pins always win. The
|
|
34
|
+
Callers can still pass `attestationServiceUrl` and `trust.expectedPcr8Hex` directly. Explicit trust pins always win. The preprod hostname is pinned to the isolated preprod enclave; it is not a production alias.
|
|
35
35
|
|
|
36
36
|
## Fast Path
|
|
37
37
|
|
|
@@ -75,7 +75,7 @@ const verifiedCredentialBundle = verifySellerCredentialBundle(credentialBundle,
|
|
|
75
75
|
});
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
Venmo, Cash App,
|
|
78
|
+
Venmo, Cash App, and PayPal still require a top-level `payeeId`; existing callers can keep using the same call shape:
|
|
79
79
|
|
|
80
80
|
```ts
|
|
81
81
|
const encryptedUpload = await nitro.createEncryptedSellerCredentialUpload({
|
|
@@ -88,8 +88,6 @@ Venmo seller uploads can use either the existing session material or Google OAut
|
|
|
88
88
|
|
|
89
89
|
PayPal Gmail OAuth seller uploads use the same app-selection model. Pass the seller PayPal email as `payeeId` and use `sessionMaterial: { credentialSource: "google_oauth", authorizationCode, redirectUri }`; the service validates Gmail access against paypal.com DKIM-signed payment receipts. To onboard through a partner-owned Google OAuth app, include `oauthClient: { clientId, clientSecret }` inside the encrypted `sessionMaterial`. The PayPal partner client secret is handled as seller credential material: it rides only in the compact JWE upload plaintext, is sealed with the Gmail refresh token in the KMS-envelope seller credential bundle, and is reused only to refresh that seller's Gmail access token.
|
|
90
90
|
|
|
91
|
-
Zelle seller uploads use the same Gmail OAuth shape with `platform: "zelle"` and a top-level `payeeId` for the seller's Zelle recipient identifier. The service validates the OAuth mailbox by finding at least one DKIM-verified incoming Zelle receipt from a supported bank/Zelle sender, then later resolves `/seller/verify/zelle` by matching `txId` against the received receipt's transaction, confirmation, reference, or payment id. Seller Zelle attestations use the generic on-chain payment method `keccak256("zelle")`; receipt providers such as Chase, Citi, and Bank of America are metadata only.
|
|
92
|
-
|
|
93
91
|
Buyer TEE requests use the same attested upload key and compact JWE envelope. The typed helper encrypts the captured
|
|
94
92
|
session material, posts `{ encryptedSessionMaterial, params, chainId, intent }` to
|
|
95
93
|
`POST /buyer/verify/:platform/:actionType`, unwraps the service envelope, and returns a typed `AttestationOutput`.
|
|
@@ -150,18 +148,14 @@ Buyer TEE platform matrix:
|
|
|
150
148
|
| `monzo` | `transfer_monzo` | `Authorization` | `TX_ID` |
|
|
151
149
|
| `wise` | `transfer_wise` | `Cookie` or `X-Access-Token` | `PROFILE_ID`, `TRANSACTION_ID` |
|
|
152
150
|
| `revolut` | `transfer_revolut` | `Cookie`, `x-device-id` | `index` |
|
|
153
|
-
| `citi` | `transfer_zelle` | `Cookie` | `index` |
|
|
154
151
|
| `chime` | `transfer_chime` | `Cookie`, `body` | `{}` |
|
|
155
|
-
| `chase` | `transfer_zelle` | `Cookie`, `x-jpmc-channel`, `x-jpmc-csrf-token`, `Referer`, `Origin` | `index` |
|
|
156
|
-
| `bankofamerica` | `transfer_zelle` | `Cookie` | `index` |
|
|
157
152
|
| `zelle` | `transfer_zelle_bofa` | `Cookie` | `index` |
|
|
158
153
|
| `zelle` | `transfer_zelle_chase` | `Cookie`, `x-jpmc-channel`, `x-jpmc-csrf-token`, `Referer`, `Origin` | `index` |
|
|
159
154
|
| `zelle` | `transfer_zelle_citi` | `Cookie` | `index` |
|
|
160
155
|
| `paypal` | `transfer_paypal` | `Cookie` | `PAYMENT_ID` |
|
|
161
156
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
legacy drain support with `hashUtf8("zelle-citi")`, `hashUtf8("zelle-chase")`, or `hashUtf8("zelle-bofa")`.
|
|
157
|
+
Zelle buyer verification uses only `platform: "zelle"` with bank-specific action types. Every Zelle action attests
|
|
158
|
+
`intent.paymentMethod = hashUtf8("zelle")`; direct bank-specific platforms are unsupported.
|
|
165
159
|
|
|
166
160
|
Per-platform session-material types require these headers using the canonical names shown above while still allowing
|
|
167
161
|
additional captured headers. Captured request bodies are session material because they can contain sensitive data and
|
|
@@ -215,7 +209,7 @@ For Cash App identity, pass the replayable Cash App session cookie as `sessionMa
|
|
|
215
209
|
|
|
216
210
|
Buyer TEE and identity expose discriminated unions keyed by `platform` and `actionType`, including per-platform
|
|
217
211
|
`params`, so invalid pairings fail during TypeScript compilation. Seller credential upload keeps its existing
|
|
218
|
-
platform narrowing (`wise` derives payee id from the credential; Venmo, Cash App,
|
|
212
|
+
platform narrowing (`wise` derives payee id from the credential; Venmo, Cash App, and PayPal require `payeeId`) but
|
|
219
213
|
does not add exhaustive `sessionMaterial` typing: each seller platform can accept multiple credential sources, such as
|
|
220
214
|
cookie headers or Google OAuth with optional partner OAuth client material, and encoding all combinations would make
|
|
221
215
|
the SDK brittle without improving the wire contract.
|
package/dist/cli/verify.js
CHANGED
|
@@ -3809,11 +3809,16 @@ async function wrapCryptoFailure(promise, code, message) {
|
|
|
3809
3809
|
|
|
3810
3810
|
// src/crypto/env.ts
|
|
3811
3811
|
function resolveFetch(fetchOverride) {
|
|
3812
|
-
|
|
3813
|
-
|
|
3812
|
+
if (fetchOverride !== void 0) {
|
|
3813
|
+
if (typeof fetchOverride !== "function") {
|
|
3814
|
+
fail("CRYPTO_UNAVAILABLE", "fetch is unavailable; pass a fetch implementation");
|
|
3815
|
+
}
|
|
3816
|
+
return fetchOverride;
|
|
3817
|
+
}
|
|
3818
|
+
if (typeof globalThis.fetch !== "function") {
|
|
3814
3819
|
fail("CRYPTO_UNAVAILABLE", "fetch is unavailable; pass a fetch implementation");
|
|
3815
3820
|
}
|
|
3816
|
-
return
|
|
3821
|
+
return globalThis.fetch.bind(globalThis);
|
|
3817
3822
|
}
|
|
3818
3823
|
function resolveSubtle(subtleOverride) {
|
|
3819
3824
|
const subtle = subtleOverride ?? globalThis.crypto?.subtle;
|
|
@@ -4505,9 +4510,10 @@ var DEFAULT_TIMEOUT_MS = 1e4;
|
|
|
4505
4510
|
// src/trust/pins.ts
|
|
4506
4511
|
var STAGING_PCR8 = "5636e3bd96f847cf12cfd9de7faa8cad0e6fa00962ce16ba185f8e5ea57105abb3cc9cc34f1e1e4de3444ceabcca7485";
|
|
4507
4512
|
var PRODUCTION_PCR8 = "41a4ae0b9b96752cab5addb7d22689b3070e564e29f90a54316fa33fa38ea51387a6e887ea4f5a4b0cc34f69cea3f40e";
|
|
4513
|
+
var PREPROD_PCR8 = "5453c5bfb7d040285be5ba9af142f4fbdd9685d082f244b66c62bf7b22d8d02a638fa2e02b9a6fe8877953a9429209e0";
|
|
4508
4514
|
var DEFAULT_EXPECTED_PCR8_BY_HOST = {
|
|
4509
4515
|
"attestation-service-staging.zkp2p.xyz": normalizePcr8Pin(STAGING_PCR8, "bundled staging PCR8"),
|
|
4510
|
-
"attestation-service-preprod.zkp2p.xyz": normalizePcr8Pin(
|
|
4516
|
+
"attestation-service-preprod.zkp2p.xyz": normalizePcr8Pin(PREPROD_PCR8, "bundled preprod PCR8"),
|
|
4511
4517
|
"attestation-service.zkp2p.xyz": normalizePcr8Pin(PRODUCTION_PCR8, "bundled production PCR8")
|
|
4512
4518
|
};
|
|
4513
4519
|
|