insumer-verify 1.3.0 → 1.3.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.
Files changed (2) hide show
  1. package/README.md +3 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -183,7 +183,9 @@ When `jwksUrl` is set, the library fetches the JWKS, matches the key by `kid` fr
183
183
 
184
184
  | Parameter | Type | Description |
185
185
  |-----------|------|-------------|
186
- | `response` | `unknown` | Full InsumerAPI response (must contain `data.attestation` and `data.sig`) |
186
+ | `response` | `unknown` | Full InsumerAPI response envelope (must contain `data.attestation` and `data.sig`) |
187
+
188
+ > **Common mistake:** Pass the **full API response** (`await res.json()`), not `response.data` or `response.data.attestation`. The function expects the outer envelope `{ok, data: {attestation, sig, kid}, meta}`. Passing the inner `data` object will throw `"Invalid response: missing data object"`.
187
189
  | `options.maxAge` | `number` | Optional max age in seconds for block freshness check |
188
190
  | `options.jwksUrl` | `string` | Optional JWKS URL for dynamic key discovery (e.g. `https://insumermodel.com/.well-known/jwks.json`) |
189
191
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "insumer-verify",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Client-side verifier for InsumerAPI attestations. ECDSA P-256 signatures, condition hashes, block freshness, expiry. Zero dependencies. Used by DJD Agent Score (Coinbase x402).",
5
5
  "type": "module",
6
6
  "main": "build/index.js",