@zkp2p/zkp2p-attestation 1.2.0 → 1.3.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 +9 -0
- package/README.md +16 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.3.0
|
|
4
|
+
|
|
5
|
+
- BREAKING: Buyer TEE verify request body field renamed from `metadata` to `params`. The server Zod schema rejects the legacy `metadata` field. All `*BuyerTeeMetadata` types in `@zkp2p/zkp2p-attestation` are renamed to `*BuyerTeeParams`, and `BuyerTeeMetadataByPlatform` is now `BuyerTeeParamsByPlatform`.
|
|
6
|
+
- BREAKING: Buyer TEE `params` shape no longer accepts duplicate provider-row fields. `N26BuyerTeeParams` is `{}`. `RevolutBuyerTeeParams`, `CitiBuyerTeeParams`, and `BankOfAmericaBuyerTeeParams` are `{ index }` only — `paymentId`, `transactionId`, and `confirmationNumber` are derived from the selected response row.
|
|
7
|
+
- BREAKING: Drop `jweId` from the buyer TEE session-material plaintext and from `EncryptBuyerTeeSessionMaterialBaseParams`. The server enforces a strict plaintext schema and rejects envelopes that still carry `jweId`. Seller credential upload still uses `jweId`.
|
|
8
|
+
- BREAKING: Drop `issuedAtMs` and `now` from `EncryptBuyerTeeSessionMaterialBaseParams` and from the buyer TEE plaintext schema. The server no longer enforces a 5-minute capture-age window on buyer envelopes; encrypted session material is valid for the lifetime of the upstream session (cookies/PAT). Seller credential upload still carries `issuedAtMs` and is unchanged.
|
|
9
|
+
- Migration: regenerate buyer TEE envelopes after upgrading; do not retry an envelope produced by `<1.3.0`. Update buyer TEE call sites to rename `metadata` to `params` and drop the removed per-platform fields (Revolut `paymentId`, Citi `transactionId`, BoA `confirmationNumber`, N26 `paymentId`).
|
|
10
|
+
- Operational note: a leaked encrypted JWE is now valid for the upstream session lifetime — treat any disclosure as equivalent to leaking the underlying upstream credential and rotate the upstream session.
|
|
11
|
+
|
|
3
12
|
## 1.2.0
|
|
4
13
|
|
|
5
14
|
- Expand buyer TEE SDK types from Venmo-only to all 15 server-registered platforms.
|
package/README.md
CHANGED
|
@@ -78,8 +78,12 @@ const encryptedUpload = await nitro.createEncryptedSellerCredentialUpload({
|
|
|
78
78
|
```
|
|
79
79
|
|
|
80
80
|
Buyer TEE requests use the same attested upload key and compact JWE envelope. The typed helper encrypts the captured
|
|
81
|
-
session material, posts `{ encryptedSessionMaterial,
|
|
82
|
-
`POST /buyer/verify/:platform/:actionType`, unwraps the service envelope, and returns a typed `AttestationOutput
|
|
81
|
+
session material, posts `{ encryptedSessionMaterial, params, chainId, intent }` to
|
|
82
|
+
`POST /buyer/verify/:platform/:actionType`, unwraps the service envelope, and returns a typed `AttestationOutput`.
|
|
83
|
+
The service does not enforce capture-age or one-use replay limits for buyer TEE session material; verification depends
|
|
84
|
+
on the upstream session still being active. A leaked encrypted JWE is therefore valid for the upstream session
|
|
85
|
+
lifetime — treat any accidental disclosure as equivalent to leaking the underlying upstream credential (cookies, PAT,
|
|
86
|
+
etc.) and rotate the upstream session.
|
|
83
87
|
|
|
84
88
|
```ts
|
|
85
89
|
const attestation = await nitro.verifyBuyerTeePayment({
|
|
@@ -89,7 +93,7 @@ const attestation = await nitro.verifyBuyerTeePayment({
|
|
|
89
93
|
Cookie: "<captured-cookie-header>",
|
|
90
94
|
"User-Agent": "<captured-user-agent>",
|
|
91
95
|
},
|
|
92
|
-
|
|
96
|
+
params: { senderId: "<venmo-account-id>", index: 0 },
|
|
93
97
|
chainId,
|
|
94
98
|
intent,
|
|
95
99
|
});
|
|
@@ -109,7 +113,7 @@ await fetch(`${attestationServiceUrl}/buyer/verify/wise/transfer_wise`, {
|
|
|
109
113
|
headers: { "content-type": "application/json" },
|
|
110
114
|
body: JSON.stringify({
|
|
111
115
|
encryptedSessionMaterial,
|
|
112
|
-
|
|
116
|
+
params: { profileId: "41246868", transactionId: "123456789" },
|
|
113
117
|
chainId,
|
|
114
118
|
intent,
|
|
115
119
|
}),
|
|
@@ -118,26 +122,27 @@ await fetch(`${attestationServiceUrl}/buyer/verify/wise/transfer_wise`, {
|
|
|
118
122
|
|
|
119
123
|
Buyer TEE platform matrix:
|
|
120
124
|
|
|
121
|
-
| Platform | `actionType` | Required session
|
|
125
|
+
| Platform | `actionType` | Required encrypted session material | Public params fields |
|
|
122
126
|
|---|---|---|---|
|
|
123
127
|
| `venmo` | `transfer_venmo` | `Cookie` | `senderId`, `index` |
|
|
124
128
|
| `cashapp` | `transfer_cashapp` | `Cookie`, `x-csrf-token`, `x-device-name`, `x-request-signature`, `x-request-uuid`, `cash-web-request`, `x-web-device-info`, `x-web-context`, `x-bt-id` | `senderId`, `index` |
|
|
125
129
|
| `luxon` | `transfer_luxon` | `X-Auth-Token` | `transferId` |
|
|
126
130
|
| `monzo` | `transfer_monzo` | `Authorization` | `txId` |
|
|
127
|
-
| `n26` | `transfer_n26` | `Cookie`, `csrf-token` | `
|
|
131
|
+
| `n26` | `transfer_n26` | `Cookie`, `csrf-token`, `body` | `{}` |
|
|
128
132
|
| `wise` | `transfer_wise` | `Cookie` or `X-Access-Token` | `profileId`, `transactionId` |
|
|
129
|
-
| `revolut` | `transfer_revolut` | `Cookie`, `x-device-id` | `index
|
|
133
|
+
| `revolut` | `transfer_revolut` | `Cookie`, `x-device-id` | `index` |
|
|
130
134
|
| `idfc` | `transfer_idfc` | `Cookie` | `senderId`, `index` |
|
|
131
|
-
| `citi` | `transfer_zelle` | `Cookie` | `index
|
|
132
|
-
| `chime` | `transfer_chime` | `Cookie` | `
|
|
135
|
+
| `citi` | `transfer_zelle` | `Cookie` | `index` |
|
|
136
|
+
| `chime` | `transfer_chime` | `Cookie`, `body` | `{}` |
|
|
133
137
|
| `chase` | `transfer_zelle` | `Cookie`, `x-jpmc-channel`, `x-jpmc-csrf-token`, `Referer`, `Origin` | `index` |
|
|
134
|
-
| `bankofamerica` | `transfer_zelle` | `Cookie` | `index
|
|
138
|
+
| `bankofamerica` | `transfer_zelle` | `Cookie` | `index` |
|
|
135
139
|
| `mercadopago` | `transfer_mercadopago` | `Cookie` | `paymentId`, `urlParamsFrom` |
|
|
136
140
|
| `paypal` | `transfer_paypal` | `Cookie` | `index` |
|
|
137
141
|
| `alipay` | `transfer_alipay` | `Cookie` | `tradeNo` |
|
|
138
142
|
|
|
139
143
|
Per-platform session-material types require these headers using the canonical names shown above while still allowing
|
|
140
|
-
additional captured headers.
|
|
144
|
+
additional captured headers. Captured request bodies are session material because they can contain sensitive data and
|
|
145
|
+
are encrypted before being sent to the service.
|
|
141
146
|
|
|
142
147
|
## Cache-Friendly Path
|
|
143
148
|
|
package/package.json
CHANGED