@zkp2p/zkp2p-attestation 1.4.0 → 1.5.1
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 +10 -4
- package/dist/cli/verify.js +1 -1
- 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 -2
- package/dist/index.d.ts +3 -2
- 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,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.5.1
|
|
4
|
+
|
|
5
|
+
- Change Venmo identity registration to derive the stories URL from `params.SENDER_ID`. Venmo identity session material now requires only `Cookie`, while the service verifies the authenticated account id before replaying the derived stories request.
|
|
6
|
+
|
|
7
|
+
## 1.5.0
|
|
8
|
+
|
|
9
|
+
- Require the captured Venmo identity stories URL in session material. This release was superseded by `1.5.1` because the runtime no longer requires `sessionMaterial.url`.
|
|
10
|
+
- Require `callerAddress` on identity attestation requests and bind it into the signed `IdentityAttestation`; `verifyIdentityAttestation` now requires `expectedCallerAddress`.
|
|
11
|
+
|
|
3
12
|
## 1.4.0
|
|
4
13
|
|
|
5
14
|
- Add typed identity flow helpers: `encryptIdentitySessionMaterial`, `createEncryptedIdentitySessionMaterial`, and `requestIdentityAttestation`.
|
package/README.md
CHANGED
|
@@ -160,15 +160,16 @@ are encrypted before being sent to the service.
|
|
|
160
160
|
|
|
161
161
|
Identity requests use the same attested upload key and compact JWE plaintext shape as buyer TEE, but with a narrower
|
|
162
162
|
platform/action matrix. The typed helper encrypts captured session material, posts
|
|
163
|
-
`{ platform, actionType, encryptedSessionMaterial, params }` to `POST /identity`, unwraps the service response, and
|
|
163
|
+
`{ platform, actionType, callerAddress, encryptedSessionMaterial, params }` to `POST /identity`, unwraps the service response, and
|
|
164
164
|
returns an `IdentityAttestationOutput`. `verifyIdentityAttestation` checks the EIP-712 signature, trusted signer,
|
|
165
|
-
platform/action binding, expected payee hash, canonical identity `dataHash`, and `validUntil`,
|
|
166
|
-
identity details.
|
|
165
|
+
platform/action binding, expected caller address, expected payee hash, canonical identity `dataHash`, and `validUntil`,
|
|
166
|
+
then returns normalized identity details.
|
|
167
167
|
|
|
168
168
|
```ts
|
|
169
169
|
const identityPayload = await nitro.requestIdentityAttestation({
|
|
170
170
|
platform: "wise",
|
|
171
171
|
actionType: "register_wise",
|
|
172
|
+
callerAddress: "0x0000000000000000000000000000000000000002",
|
|
172
173
|
sessionMaterial: {
|
|
173
174
|
Cookie: "<captured-cookie-header>",
|
|
174
175
|
"X-Access-Token": "<captured-token>",
|
|
@@ -180,6 +181,7 @@ const identity = verifyIdentityAttestation(identityPayload, {
|
|
|
180
181
|
trustedSigners,
|
|
181
182
|
expectedPlatform: "wise",
|
|
182
183
|
expectedActionType: "register_wise",
|
|
184
|
+
expectedCallerAddress: "0x0000000000000000000000000000000000000002",
|
|
183
185
|
expectedPayeeIdHash: hashUtf8("<wise-recipient-id>"),
|
|
184
186
|
});
|
|
185
187
|
// identity: { payeeIdHash, payeeId, username, metadata, ... }
|
|
@@ -189,10 +191,14 @@ Identity platform matrix:
|
|
|
189
191
|
|
|
190
192
|
| Platform | `actionType` | Required encrypted session material | Public params fields |
|
|
191
193
|
|---|---|---|---|
|
|
192
|
-
| `venmo` | `register_venmo` | `Cookie` | `SENDER_ID
|
|
194
|
+
| `venmo` | `register_venmo` | `Cookie` | `SENDER_ID` |
|
|
193
195
|
| `paypal` | `register_paypal` | `Cookie` | `{}` |
|
|
194
196
|
| `wise` | `register_wise` | `Cookie`, `X-Access-Token` | `PROFILE_ID` |
|
|
195
197
|
|
|
198
|
+
For Venmo identity, pass `SENDER_ID` in public params and include a replayable `Cookie` header in encrypted session
|
|
199
|
+
material. The service verifies the authenticated account id, derives the stories URL from `SENDER_ID`, and requires
|
|
200
|
+
Venmo to return a valid stories response with an explicit `stories` array.
|
|
201
|
+
|
|
196
202
|
Buyer TEE and identity expose discriminated unions keyed by `platform` and `actionType`, including per-platform
|
|
197
203
|
`params`, so invalid pairings fail during TypeScript compilation. Seller credential upload keeps its existing
|
|
198
204
|
platform narrowing (`wise` derives payee id from the credential; Venmo, Cash App, and PayPal require `payeeId`) but
|
package/dist/cli/verify.js
CHANGED
|
@@ -4672,7 +4672,7 @@ Options:
|
|
|
4672
4672
|
--expected-pcr8 <hex> Strict PCR8 pin
|
|
4673
4673
|
--expected-signer <addr> Strict signer pin for --verify-signature
|
|
4674
4674
|
--expected-verifying-contract <addr> Strict verifyingContract pin
|
|
4675
|
-
--verify-signature <path> Optional path to a prior
|
|
4675
|
+
--verify-signature <path> Optional path to a prior buyer or seller verify JSON response
|
|
4676
4676
|
--help Show this help text
|
|
4677
4677
|
`);
|
|
4678
4678
|
}
|