@registrystack/client 0.31.0 → 0.33.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/README.md +2 -1
- package/breg/client.d.ts +270 -58
- package/breg/client.js +70 -0
- package/breg/index.d.ts +99 -3
- package/casework/client.d.ts +162 -99
- package/casework/client.js +34 -13
- package/casework/index.d.ts +27 -13
- package/evidence/client.d.ts +86 -1
- package/evidence/client.js +25 -0
- package/evidence/index.d.ts +23 -3
- package/native.js +1 -1
- package/package.json +4 -4
- package/relay/client.d.ts +36 -0
package/evidence/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
* FFI boundary until the caller asks for it.
|
|
7
7
|
*/
|
|
8
8
|
export declare class AudienceScopedResult {
|
|
9
|
+
/** Exact serialized pre-response trust snapshot for offline re-verification. */
|
|
10
|
+
get retainedVerification(): Buffer
|
|
9
11
|
get responseFormat(): string
|
|
10
12
|
get evidence(): any
|
|
11
13
|
get traceId(): string | null
|
|
@@ -36,6 +38,12 @@ export declare class EvidenceClient {
|
|
|
36
38
|
* client and are likewise redacted there.
|
|
37
39
|
*/
|
|
38
40
|
static fromProfile(path: string, privateKeyJwk?: any): EvidenceClient
|
|
41
|
+
/**
|
|
42
|
+
* Build a profile-driven client with a context-bound staff exchange.
|
|
43
|
+
* The profile's discovered authority and pinned OAuth request parameters
|
|
44
|
+
* must match the immutable provider before the first token is acquired.
|
|
45
|
+
*/
|
|
46
|
+
static fromProfileWithAuthorization(path: string, authorization: any): EvidenceClient
|
|
39
47
|
/**
|
|
40
48
|
* Close the expectations for one request and generate its nonce. No I/O
|
|
41
49
|
* happens here. The returned request is good for exactly one exchange:
|
|
@@ -257,8 +265,8 @@ export declare class SdJwtVcBatchResponse {
|
|
|
257
265
|
* selector or disclosed value is copied into it here.
|
|
258
266
|
*/
|
|
259
267
|
export type SubjectContinuity =
|
|
260
|
-
| { status: 'firstUse'
|
|
261
|
-
| { status: 'matched'
|
|
268
|
+
| { status: 'firstUse'; receipt: any }
|
|
269
|
+
| { status: 'matched'; receipt: any }
|
|
262
270
|
|
|
263
271
|
/**
|
|
264
272
|
* A response that satisfied every expectation.
|
|
@@ -298,5 +306,17 @@ export interface VerifiedEvidenceRequestBatch {
|
|
|
298
306
|
* `{ status: "available", verified } | { status: "notAvailable" }`.
|
|
299
307
|
*/
|
|
300
308
|
export type VerifiedEvidenceRequestBatchItem =
|
|
301
|
-
| { status: 'available'
|
|
309
|
+
| { status: 'available'; verified: VerifiedEvidence }
|
|
302
310
|
| { status: 'notAvailable' }
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Verify exact retained response bytes against a bounded pre-response trust
|
|
314
|
+
* snapshot without constructing a client or performing network I/O.
|
|
315
|
+
*/
|
|
316
|
+
export declare function verifyRetained(context: Buffer, response: Buffer): VerifiedEvidence
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Replay an earlier decision at its recorded instant. Current decisions use
|
|
320
|
+
* `verify_retained` so expired assertions cannot be accepted as current.
|
|
321
|
+
*/
|
|
322
|
+
export declare function verifyRetainedAsOf(context: Buffer, response: Buffer, asOfMillis: number): VerifiedEvidence
|
package/native.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@registrystack/client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.0",
|
|
4
4
|
"description": "Unified Node.js client for Registry Stack products.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://docs.registrystack.org/reference/client-api/",
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"typescript": "6.0.3"
|
|
58
58
|
},
|
|
59
59
|
"optionalDependencies": {
|
|
60
|
-
"@registrystack/client-darwin-arm64": "0.
|
|
61
|
-
"@registrystack/client-linux-arm64-gnu": "0.
|
|
62
|
-
"@registrystack/client-linux-x64-gnu": "0.
|
|
60
|
+
"@registrystack/client-darwin-arm64": "0.33.0",
|
|
61
|
+
"@registrystack/client-linux-arm64-gnu": "0.33.0",
|
|
62
|
+
"@registrystack/client-linux-x64-gnu": "0.33.0"
|
|
63
63
|
}
|
|
64
64
|
}
|
package/relay/client.d.ts
CHANGED
|
@@ -39,9 +39,45 @@ export interface PrivateKeyJwtConfig {
|
|
|
39
39
|
trustedRootCertificates?: string | null
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
/** One immutable verified person or grant context. Reconstruct after host source facts change. */
|
|
43
|
+
export interface ExchangeContext {
|
|
44
|
+
issuer: string
|
|
45
|
+
subject: string
|
|
46
|
+
audience: string
|
|
47
|
+
generation: string
|
|
48
|
+
deadlineSeconds: SafeInteger
|
|
49
|
+
grantId?: string | null
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export type ExchangePrivateKeyJwtConfig = PrivateKeyJwtConfig & {
|
|
53
|
+
resource: string
|
|
54
|
+
scopes: ReadonlyArray<string>
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface FirstPartyExchangeSource {
|
|
58
|
+
key: PrivateJwk
|
|
59
|
+
attributes: Readonly<Record<string, JsonValue>>
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface RemoteExchangeSource {
|
|
63
|
+
endpoint: string
|
|
64
|
+
bootstrap: ExchangePrivateKeyJwtConfig
|
|
65
|
+
bootstrapResource: string
|
|
66
|
+
bootstrapScope: string
|
|
67
|
+
requestTimeoutMilliseconds?: SafeInteger | null
|
|
68
|
+
connectTimeoutMilliseconds?: SafeInteger | null
|
|
69
|
+
userAgent?: string | null
|
|
70
|
+
trustedRootCertificates?: string | null
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export type ExchangeAuthorizationConfig =
|
|
74
|
+
| { client: ExchangePrivateKeyJwtConfig; context: ExchangeContext; firstParty: FirstPartyExchangeSource }
|
|
75
|
+
| { client: ExchangePrivateKeyJwtConfig; context: ExchangeContext; remote: RemoteExchangeSource }
|
|
76
|
+
|
|
42
77
|
export type RelayAuthorization =
|
|
43
78
|
| { static: string }
|
|
44
79
|
| { privateKeyJwt: PrivateKeyJwtConfig }
|
|
80
|
+
| { exchange: ExchangeAuthorizationConfig }
|
|
45
81
|
|
|
46
82
|
export interface RelayClientConfig {
|
|
47
83
|
baseUrl: string
|