@agentidentitytrustprotocol/aitp 0.5.0 → 0.6.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/index.d.ts +27 -0
- package/index.js +3 -1
- package/package.json +5 -5
package/index.d.ts
CHANGED
|
@@ -157,6 +157,33 @@ export declare function computeAidJkt(aid: string): string
|
|
|
157
157
|
* a 32-byte Buffer. Throws if `certDer` is not a parseable certificate.
|
|
158
158
|
*/
|
|
159
159
|
export declare function computeSpkiHash(certDer: Buffer): Buffer
|
|
160
|
+
/**
|
|
161
|
+
* Verify a `RevocationListEnvelope` JSON string against a pinned issuer.
|
|
162
|
+
*
|
|
163
|
+
* Resolves on success; on failure throws an `Error` whose **`code`** property
|
|
164
|
+
* is one of `signature_invalid`, `issuer_mismatch`, `version_unknown`,
|
|
165
|
+
* `expired`, `malformed`. Branch on `error.code`, never on `error.message`:
|
|
166
|
+
* the code is the contract, the message wording is not.
|
|
167
|
+
*
|
|
168
|
+
* Establishes **authenticity and non-expiry only** — that the snapshot was
|
|
169
|
+
* signed by the holder of `expectedIssuerAid` and that its `expires_at` has
|
|
170
|
+
* not passed. It deliberately does not check `published_at` staleness:
|
|
171
|
+
* RFC-AITP-0008 §3 puts freshness policy at the consuming peer, and
|
|
172
|
+
* collapsing authenticity and freshness into a single switch is how a
|
|
173
|
+
* `soft_fail` mode ends up reporting a *forged* snapshot as not-revoked.
|
|
174
|
+
* The caller owns the staleness budget.
|
|
175
|
+
*/
|
|
176
|
+
export declare function verifyRevocationList(envelopeJson: string, expectedIssuerAid: string, nowUnixSecs?: number | undefined | null): void
|
|
177
|
+
/**
|
|
178
|
+
* The exact bytes a revocation snapshot's signature is computed over:
|
|
179
|
+
* `JCS(revocation_list)` — the **inner** body, not the transport wrapper.
|
|
180
|
+
*
|
|
181
|
+
* Exposed so a caller needing the signed bytes (an independent verifier, an
|
|
182
|
+
* HSM signing path, a debugging tool) obtains them rather than reconstructing
|
|
183
|
+
* the shape at the call site. Reconstructing it is how signer, verifier and
|
|
184
|
+
* conformance fixture drifted apart before 0.5.0.
|
|
185
|
+
*/
|
|
186
|
+
export declare function revocationSigningBytes(envelopeJson: string): Buffer
|
|
160
187
|
/** Result of `processHello`: response body plus session id. */
|
|
161
188
|
export interface JsHelloAckResult {
|
|
162
189
|
/** `MUTUAL_HELLO_ACK` envelope JSON — set as the HTTP response body. */
|
package/index.js
CHANGED
|
@@ -310,7 +310,7 @@ if (!nativeBinding) {
|
|
|
310
310
|
throw new Error(`Failed to load native binding`)
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
-
const { AitpAgent, SessionBundleBuilder, verifySessionBundle, verifyDelegation, verifyDelegationMultihop, computeAidJkt, JwksProvider, computeSpkiHash, SpkiPinVerifier, JsInitiatorSession, JsResponderSession, TctStore, verifyManifestJson } = nativeBinding
|
|
313
|
+
const { AitpAgent, SessionBundleBuilder, verifySessionBundle, verifyDelegation, verifyDelegationMultihop, computeAidJkt, JwksProvider, computeSpkiHash, SpkiPinVerifier, verifyRevocationList, revocationSigningBytes, JsInitiatorSession, JsResponderSession, TctStore, verifyManifestJson } = nativeBinding
|
|
314
314
|
|
|
315
315
|
module.exports.AitpAgent = AitpAgent
|
|
316
316
|
module.exports.SessionBundleBuilder = SessionBundleBuilder
|
|
@@ -321,6 +321,8 @@ module.exports.computeAidJkt = computeAidJkt
|
|
|
321
321
|
module.exports.JwksProvider = JwksProvider
|
|
322
322
|
module.exports.computeSpkiHash = computeSpkiHash
|
|
323
323
|
module.exports.SpkiPinVerifier = SpkiPinVerifier
|
|
324
|
+
module.exports.verifyRevocationList = verifyRevocationList
|
|
325
|
+
module.exports.revocationSigningBytes = revocationSigningBytes
|
|
324
326
|
module.exports.JsInitiatorSession = JsInitiatorSession
|
|
325
327
|
module.exports.JsResponderSession = JsResponderSession
|
|
326
328
|
module.exports.TctStore = TctStore
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentidentitytrustprotocol/aitp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Agent Identity Trust Protocol — Node.js SDK",
|
|
5
5
|
"license": "MIT OR Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"registry": "https://registry.npmjs.org/"
|
|
54
54
|
},
|
|
55
55
|
"optionalDependencies": {
|
|
56
|
-
"@agentidentitytrustprotocol/aitp-darwin-x64": "0.
|
|
57
|
-
"@agentidentitytrustprotocol/aitp-darwin-arm64": "0.
|
|
58
|
-
"@agentidentitytrustprotocol/aitp-linux-x64-gnu": "0.
|
|
59
|
-
"@agentidentitytrustprotocol/aitp-linux-arm64-gnu": "0.
|
|
56
|
+
"@agentidentitytrustprotocol/aitp-darwin-x64": "0.6.0",
|
|
57
|
+
"@agentidentitytrustprotocol/aitp-darwin-arm64": "0.6.0",
|
|
58
|
+
"@agentidentitytrustprotocol/aitp-linux-x64-gnu": "0.6.0",
|
|
59
|
+
"@agentidentitytrustprotocol/aitp-linux-arm64-gnu": "0.6.0"
|
|
60
60
|
}
|
|
61
61
|
}
|