@gramota/issuer 0.1.0 → 0.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/README.md +40 -7
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/issuer.d.ts +41 -2
- package/dist/issuer.d.ts.map +1 -1
- package/dist/issuer.js +86 -1
- package/dist/issuer.js.map +1 -1
- package/dist/types.d.ts +49 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @gramota/issuer
|
|
2
2
|
|
|
3
|
-
> EUDIW credential issuer — sign SD-JWT-VC credentials with selective disclosure and key binding.
|
|
3
|
+
> EUDIW credential issuer — sign SD-JWT-VC credentials with selective disclosure and holder-key binding (cnf claim). One method, fully configurable, ES256 by default.
|
|
4
4
|
|
|
5
5
|
Part of [Gramota](https://github.com/gramota-org/gramota) — the TypeScript
|
|
6
6
|
SDK for the EU Digital Identity Wallet (EUDIW).
|
|
@@ -13,17 +13,50 @@ pnpm add @gramota/issuer
|
|
|
13
13
|
# or: yarn add @gramota/issuer
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
##
|
|
16
|
+
## Quick example
|
|
17
17
|
|
|
18
18
|
```ts
|
|
19
19
|
import { Issuer } from "@gramota/issuer";
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
import { exportJWK, generateKeyPair } from "jose";
|
|
21
|
+
|
|
22
|
+
// Issuer's signing keypair (production: HSM / KMS — use makeSigner from @gramota/jose)
|
|
23
|
+
const { publicKey, privateKey } = await generateKeyPair("ES256", { extractable: true });
|
|
24
|
+
|
|
25
|
+
const issuer = new Issuer({
|
|
26
|
+
issuerId: "https://issuer.example",
|
|
27
|
+
publicKey: await exportJWK(publicKey),
|
|
28
|
+
privateKey: await exportJWK(privateKey),
|
|
29
|
+
alg: "ES256",
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const result = await issuer.issue({
|
|
33
|
+
vct: "urn:eudi:pid:1",
|
|
34
|
+
subject: {
|
|
35
|
+
given_name: "Greta",
|
|
36
|
+
family_name: "Smith",
|
|
37
|
+
birth_date: "1990-04-15",
|
|
38
|
+
},
|
|
39
|
+
selectivelyDisclosable: ["given_name", "family_name", "birth_date"],
|
|
40
|
+
holderKey: holderJwk, // binds the credential to the holder
|
|
41
|
+
expiresIn: 365 * 24 * 3600, // 1 year
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
console.log(result.token); // SD-JWT-VC compact-serialised string
|
|
23
45
|
```
|
|
24
46
|
|
|
25
|
-
|
|
26
|
-
|
|
47
|
+
## What's inside
|
|
48
|
+
|
|
49
|
+
- `Issuer` — single class, stateless, configured once
|
|
50
|
+
- Two equivalent call shapes for the same operation:
|
|
51
|
+
- `issuer.credentials.issue(options)` — Stripe-style namespacing, symmetric with `holder.credentials.*`, forward-compatible with future ops (revoke, suspend, list)
|
|
52
|
+
- `issuer.issue(options)` — flat shorthand for the common case
|
|
53
|
+
- `IssuerError` with stable `code` for failure cases (`issuer.holder_key_required`, `issuer.vct_required`, `issuer.expiry_invalid`, ...)
|
|
54
|
+
|
|
55
|
+
The `cnf.jwk` claim is set automatically from `holderKey`, binding the
|
|
56
|
+
credential to the holder's key for the KB-JWT proof during presentation.
|
|
57
|
+
|
|
58
|
+
For the high-level Holder / Verifier API, see the
|
|
59
|
+
[main repo](https://github.com/gramota-org/gramota).
|
|
27
60
|
|
|
28
61
|
## License
|
|
29
62
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Issuer } from "./issuer.js";
|
|
2
|
-
export { IssuerError, type IssuerConfig, type IssuerErrorCode, type IssueOptions, type IssueResult, } from "./types.js";
|
|
1
|
+
export { Issuer, type IssuerCredentialsApi } from "./issuer.js";
|
|
2
|
+
export { IssuerError, type BatchIssueEntry, type BatchIssueOptions, type IssuerConfig, type IssuerErrorCode, type IssueOptions, type IssueResult, } from "./types.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EACL,WAAW,EACX,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,WAAW,GACjB,MAAM,YAAY,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA6B,MAAM,aAAa,CAAC;AAChE,OAAO,EACL,WAAW,GAOZ,MAAM,YAAY,CAAC"}
|
package/dist/issuer.d.ts
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import { type JsonWebKey } from "@gramota/jose";
|
|
2
|
-
import { type IssueOptions, type IssueResult, type IssuerConfig } from "./types.js";
|
|
2
|
+
import { type BatchIssueOptions, type IssueOptions, type IssueResult, type IssuerConfig } from "./types.js";
|
|
3
|
+
/** Stripe-style sub-API for credential operations.
|
|
4
|
+
* `issuer.credentials.X(...)`. */
|
|
5
|
+
export interface IssuerCredentialsApi {
|
|
6
|
+
/** Issue a single SD-JWT-VC credential bound to a holder. */
|
|
7
|
+
issue(options: IssueOptions): Promise<IssueResult>;
|
|
8
|
+
/** Issue N credentials in a batch, one per holder-key entry — the
|
|
9
|
+
* OID4VCI Draft 14/15 batch flow. The EU reference wallet asks for
|
|
10
|
+
* `numberOfCredentials = 10` so it can use a fresh credential per
|
|
11
|
+
* presentation (one-time use, unlinkable). Each entry gets its own
|
|
12
|
+
* `cnf.jwk`, fresh disclosure salts, and a distinct credentialId. */
|
|
13
|
+
issueBatch(options: BatchIssueOptions): Promise<readonly IssueResult[]>;
|
|
14
|
+
}
|
|
3
15
|
/**
|
|
4
16
|
* The issuer role per IETF SD-JWT-VC §3.
|
|
5
17
|
*
|
|
@@ -11,6 +23,12 @@ import { type IssueOptions, type IssueResult, type IssuerConfig } from "./types.
|
|
|
11
23
|
* appear in `subject`,
|
|
12
24
|
* - {@link Signer} Strategy for signing — accepts raw JWKs (shorthand)
|
|
13
25
|
* or production-grade Signers (HSM, KMS, custom backends).
|
|
26
|
+
*
|
|
27
|
+
* Two API shapes resolve to the same code path:
|
|
28
|
+
* - `issuer.credentials.issue(...)` — Stripe-style namespacing,
|
|
29
|
+
* symmetric with `holder.credentials.*` and forward-compatible
|
|
30
|
+
* with future operations (revoke, suspend, list).
|
|
31
|
+
* - `issuer.issue(...)` — flat shorthand for the common case.
|
|
14
32
|
*/
|
|
15
33
|
export declare class Issuer {
|
|
16
34
|
/** The issuer's signer. Either supplied directly via `config.signer`
|
|
@@ -21,9 +39,30 @@ export declare class Issuer {
|
|
|
21
39
|
private readonly kid;
|
|
22
40
|
private readonly typ;
|
|
23
41
|
private readonly hashAlg;
|
|
42
|
+
/** Credential operations. `issuer.credentials.{issue,issueBatch}(...)`.
|
|
43
|
+
* Mirrors `holder.credentials.*` for stylistic symmetry across the SDK. */
|
|
44
|
+
readonly credentials: IssuerCredentialsApi;
|
|
24
45
|
constructor(config: IssuerConfig);
|
|
25
|
-
/** Issue a single SD-JWT-VC credential bound to a holder.
|
|
46
|
+
/** Issue a single SD-JWT-VC credential bound to a holder.
|
|
47
|
+
*
|
|
48
|
+
* Equivalent to `issuer.credentials.issue(options)`. Both shapes are
|
|
49
|
+
* stable; pick whichever reads better at the call site. */
|
|
26
50
|
issue(options: IssueOptions): Promise<IssueResult>;
|
|
51
|
+
/** Issue N credentials in a batch — OID4VCI Draft 14/15 batch flow.
|
|
52
|
+
*
|
|
53
|
+
* Equivalent to `issuer.credentials.issueBatch(options)`. Each entry in
|
|
54
|
+
* `options.credentials` produces one independent credential bound to
|
|
55
|
+
* that entry's `holderKey`, with fresh disclosure salts (so two
|
|
56
|
+
* credentials over the same claims are unlinkable on the wire) and a
|
|
57
|
+
* distinct credentialId. Shared options (subject, vct, expiry, …)
|
|
58
|
+
* apply to every credential.
|
|
59
|
+
*
|
|
60
|
+
* The EU reference wallet uses this to mint pools of one-time-use
|
|
61
|
+
* credentials so each presentation reveals a fresh token rather than
|
|
62
|
+
* a long-lived one. */
|
|
63
|
+
issueBatch(options: BatchIssueOptions): Promise<readonly IssueResult[]>;
|
|
64
|
+
private issueBatchImpl;
|
|
65
|
+
private issueImpl;
|
|
27
66
|
/** The issuer's public JWK — useful to publish at /.well-known/jwks.json. */
|
|
28
67
|
get publicKey(): JsonWebKey;
|
|
29
68
|
/** The issuer's identifier — useful for downstream URLs. */
|
package/dist/issuer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"issuer.d.ts","sourceRoot":"","sources":["../src/issuer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,UAAU,EAAe,MAAM,eAAe,CAAC;AACvE,OAAO,
|
|
1
|
+
{"version":3,"file":"issuer.d.ts","sourceRoot":"","sources":["../src/issuer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,UAAU,EAAe,MAAM,eAAe,CAAC;AACvE,OAAO,EAGL,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,YAAY,CAAC;AAKpB;mCACmC;AACnC,MAAM,WAAW,oBAAoB;IACnC,6DAA6D;IAC7D,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IACnD;;;;yEAIqE;IACrE,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,SAAS,WAAW,EAAE,CAAC,CAAC;CACzE;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,MAAM;IACjB;4EACwE;IACxE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,sCAAsC;IACtC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;IACvC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAqB;IACzC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAqB;IACzC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAsB;IAE9C;+EAC2E;IAC3E,QAAQ,CAAC,WAAW,EAAE,oBAAoB,CAAC;gBAE/B,MAAM,EAAE,YAAY;IAkBhC;;;+DAG2D;IACrD,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC;IAIxD;;;;;;;;;;;2BAWuB;IACjB,UAAU,CACd,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,SAAS,WAAW,EAAE,CAAC;YAIpB,cAAc;YAiCd,SAAS;IAsDvB,6EAA6E;IAC7E,IAAI,SAAS,IAAI,UAAU,CAE1B;IAED,4DAA4D;IAC5D,IAAI,QAAQ,IAAI,MAAM,CAErB;CACF"}
|
package/dist/issuer.js
CHANGED
|
@@ -15,6 +15,12 @@ const DEFAULT_HASH_ALG = "sha-256";
|
|
|
15
15
|
* appear in `subject`,
|
|
16
16
|
* - {@link Signer} Strategy for signing — accepts raw JWKs (shorthand)
|
|
17
17
|
* or production-grade Signers (HSM, KMS, custom backends).
|
|
18
|
+
*
|
|
19
|
+
* Two API shapes resolve to the same code path:
|
|
20
|
+
* - `issuer.credentials.issue(...)` — Stripe-style namespacing,
|
|
21
|
+
* symmetric with `holder.credentials.*` and forward-compatible
|
|
22
|
+
* with future operations (revoke, suspend, list).
|
|
23
|
+
* - `issuer.issue(...)` — flat shorthand for the common case.
|
|
18
24
|
*/
|
|
19
25
|
export class Issuer {
|
|
20
26
|
/** The issuer's signer. Either supplied directly via `config.signer`
|
|
@@ -25,6 +31,9 @@ export class Issuer {
|
|
|
25
31
|
kid;
|
|
26
32
|
typ;
|
|
27
33
|
hashAlg;
|
|
34
|
+
/** Credential operations. `issuer.credentials.{issue,issueBatch}(...)`.
|
|
35
|
+
* Mirrors `holder.credentials.*` for stylistic symmetry across the SDK. */
|
|
36
|
+
credentials;
|
|
28
37
|
constructor(config) {
|
|
29
38
|
if (typeof config.issuerId !== "string" || config.issuerId.length === 0) {
|
|
30
39
|
throw new TypeError("Issuer: issuerId is required (a stable URL)");
|
|
@@ -34,9 +43,59 @@ export class Issuer {
|
|
|
34
43
|
this.kid = config.kid;
|
|
35
44
|
this.typ = config.typ;
|
|
36
45
|
this.hashAlg = config.hashAlg;
|
|
46
|
+
// Build the namespaced sub-API. `issuer.credentials.{issue,issueBatch}`
|
|
47
|
+
// and `issuer.{issue,issueBatch}` both resolve here — single impl per op.
|
|
48
|
+
this.credentials = {
|
|
49
|
+
issue: (options) => this.issueImpl(options),
|
|
50
|
+
issueBatch: (options) => this.issueBatchImpl(options),
|
|
51
|
+
};
|
|
37
52
|
}
|
|
38
|
-
/** Issue a single SD-JWT-VC credential bound to a holder.
|
|
53
|
+
/** Issue a single SD-JWT-VC credential bound to a holder.
|
|
54
|
+
*
|
|
55
|
+
* Equivalent to `issuer.credentials.issue(options)`. Both shapes are
|
|
56
|
+
* stable; pick whichever reads better at the call site. */
|
|
39
57
|
async issue(options) {
|
|
58
|
+
return this.issueImpl(options);
|
|
59
|
+
}
|
|
60
|
+
/** Issue N credentials in a batch — OID4VCI Draft 14/15 batch flow.
|
|
61
|
+
*
|
|
62
|
+
* Equivalent to `issuer.credentials.issueBatch(options)`. Each entry in
|
|
63
|
+
* `options.credentials` produces one independent credential bound to
|
|
64
|
+
* that entry's `holderKey`, with fresh disclosure salts (so two
|
|
65
|
+
* credentials over the same claims are unlinkable on the wire) and a
|
|
66
|
+
* distinct credentialId. Shared options (subject, vct, expiry, …)
|
|
67
|
+
* apply to every credential.
|
|
68
|
+
*
|
|
69
|
+
* The EU reference wallet uses this to mint pools of one-time-use
|
|
70
|
+
* credentials so each presentation reveals a fresh token rather than
|
|
71
|
+
* a long-lived one. */
|
|
72
|
+
async issueBatch(options) {
|
|
73
|
+
return this.issueBatchImpl(options);
|
|
74
|
+
}
|
|
75
|
+
async issueBatchImpl(options) {
|
|
76
|
+
if (!Array.isArray(options.credentials) || options.credentials.length === 0) {
|
|
77
|
+
throw new IssuerError("issuer.batch_empty", "issueBatch: credentials must be a non-empty array");
|
|
78
|
+
}
|
|
79
|
+
// Pin `issuedAt` once so every credential in the batch reports the same
|
|
80
|
+
// iat. Without this, two credentials issued in the same logical batch
|
|
81
|
+
// could differ by a second — fine for spec, awkward for audit logs.
|
|
82
|
+
const sharedIssuedAt = options.issuedAt ?? Math.floor(Date.now() / 1000);
|
|
83
|
+
// Validate shared shape once via a representative `IssueOptions` (with
|
|
84
|
+
// a placeholder holderKey from the first entry) so errors like
|
|
85
|
+
// `disclosable_missing` and `expiry_conflict` surface once with a
|
|
86
|
+
// clean stack, not N times wrapped in batch noise.
|
|
87
|
+
const head = options.credentials[0];
|
|
88
|
+
validate(toIssueOptions(options, head, sharedIssuedAt));
|
|
89
|
+
// Issue each credential. We do this sequentially rather than via
|
|
90
|
+
// Promise.all to keep error reporting deterministic — a failure on
|
|
91
|
+
// entry 5 reports as "entry 5" and we stop, rather than racing.
|
|
92
|
+
const results = [];
|
|
93
|
+
for (const entry of options.credentials) {
|
|
94
|
+
results.push(await this.issueImpl(toIssueOptions(options, entry, sharedIssuedAt)));
|
|
95
|
+
}
|
|
96
|
+
return results;
|
|
97
|
+
}
|
|
98
|
+
async issueImpl(options) {
|
|
40
99
|
validate(options);
|
|
41
100
|
const issuedAt = options.issuedAt ?? Math.floor(Date.now() / 1000);
|
|
42
101
|
const expiresAt = computeExpiry(options, issuedAt);
|
|
@@ -121,6 +180,32 @@ function normalizeIssuerSigner(config) {
|
|
|
121
180
|
}
|
|
122
181
|
throw new TypeError("Issuer: pass either { privateKey, publicKey, alg } (raw shorthand) or { signer } (production)");
|
|
123
182
|
}
|
|
183
|
+
/**
|
|
184
|
+
* Merge shared batch options with one per-credential entry into the
|
|
185
|
+
* `IssueOptions` shape that `issueImpl` consumes. Pure function — no
|
|
186
|
+
* side effects — so it's safe to call once per entry in a tight loop.
|
|
187
|
+
*
|
|
188
|
+
* Conditional spreads honour `exactOptionalPropertyTypes`: a property is
|
|
189
|
+
* either set (with a defined value) or absent, never `undefined`.
|
|
190
|
+
*/
|
|
191
|
+
function toIssueOptions(shared, entry, sharedIssuedAt) {
|
|
192
|
+
return {
|
|
193
|
+
subject: shared.subject,
|
|
194
|
+
vct: shared.vct,
|
|
195
|
+
holderKey: entry.holderKey,
|
|
196
|
+
issuedAt: sharedIssuedAt,
|
|
197
|
+
...(shared.selectivelyDisclosable !== undefined
|
|
198
|
+
? { selectivelyDisclosable: shared.selectivelyDisclosable }
|
|
199
|
+
: {}),
|
|
200
|
+
...(shared.expiresIn !== undefined ? { expiresIn: shared.expiresIn } : {}),
|
|
201
|
+
...(shared.expiresAt !== undefined ? { expiresAt: shared.expiresAt } : {}),
|
|
202
|
+
...(shared.notBefore !== undefined ? { notBefore: shared.notBefore } : {}),
|
|
203
|
+
...(entry.credentialId !== undefined
|
|
204
|
+
? { credentialId: entry.credentialId }
|
|
205
|
+
: {}),
|
|
206
|
+
...(entry.status !== undefined ? { status: entry.status } : {}),
|
|
207
|
+
};
|
|
208
|
+
}
|
|
124
209
|
// ---------------------------------------------------------------------------
|
|
125
210
|
// validation
|
|
126
211
|
// ---------------------------------------------------------------------------
|
package/dist/issuer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"issuer.js","sourceRoot":"","sources":["../src/issuer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAgB,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAgC,MAAM,eAAe,CAAC;AACvE,OAAO,EACL,WAAW,
|
|
1
|
+
{"version":3,"file":"issuer.js","sourceRoot":"","sources":["../src/issuer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAgB,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAgC,MAAM,eAAe,CAAC;AACvE,OAAO,EACL,WAAW,GAMZ,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,GAAG,WAAW,CAAC;AAChC,MAAM,gBAAgB,GAAY,SAAS,CAAC;AAe5C;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,MAAM;IACjB;4EACwE;IACvD,MAAM,CAAS;IAChC,sCAAsC;IACrB,aAAa,CAAS;IACtB,GAAG,CAAqB;IACxB,GAAG,CAAqB;IACxB,OAAO,CAAsB;IAE9C;+EAC2E;IAClE,WAAW,CAAuB;IAE3C,YAAY,MAAoB;QAC9B,IAAI,OAAO,MAAM,CAAC,QAAQ,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxE,MAAM,IAAI,SAAS,CAAC,6CAA6C,CAAC,CAAC;QACrE,CAAC;QACD,IAAI,CAAC,MAAM,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;QAC5C,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,QAAQ,CAAC;QACrC,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC;QACtB,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,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C,SAAS,CAAC;IAC3B,CAAC;IACD,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;QACpC,IAAI,OAAO,CAAC,SAAS,IAAI,CAAC,EAAE,CAAC;YAC3B,MAAM,IAAI,WAAW,CAAC,uBAAuB,EAAE,sCAAsC,CAAC,CAAC;QACzF,CAAC;QACD,OAAO,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC;IACtC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -73,8 +73,56 @@ export interface IssueResult {
|
|
|
73
73
|
/** Computed expiry (if `expiresIn` or `expiresAt` was set). */
|
|
74
74
|
expiresAt: number | undefined;
|
|
75
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* Per-credential binding for `issueBatch`. Everything that varies *across*
|
|
78
|
+
* credentials in the batch goes here; everything shared (subject, vct,
|
|
79
|
+
* expiry, …) sits at the top level of {@link BatchIssueOptions}.
|
|
80
|
+
*/
|
|
81
|
+
export interface BatchIssueEntry {
|
|
82
|
+
/** Holder's PUBLIC JWK — bound into this credential's `cnf.jwk`. Each
|
|
83
|
+
* entry must have a distinct holder key for one-time-use unlinkability. */
|
|
84
|
+
holderKey: JsonWebKey;
|
|
85
|
+
/** Override the generated credential ID (default: random UUID v4 per entry). */
|
|
86
|
+
credentialId?: string;
|
|
87
|
+
/** Per-credential `status` claim — typical use is to allocate a distinct
|
|
88
|
+
* Token Status List index for each one-time credential so they can be
|
|
89
|
+
* revoked independently. */
|
|
90
|
+
status?: Readonly<Record<string, unknown>>;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Options for `issuer.issueBatch()` (OID4VCI Draft 14/15 batch issuance).
|
|
94
|
+
*
|
|
95
|
+
* Shared across the batch: subject, vct, expiry, notBefore, issuedAt,
|
|
96
|
+
* selectivelyDisclosable.
|
|
97
|
+
*
|
|
98
|
+
* Per-credential: `credentials[i]` (holderKey, optional credentialId,
|
|
99
|
+
* optional status).
|
|
100
|
+
*/
|
|
101
|
+
export interface BatchIssueOptions {
|
|
102
|
+
/** Claims shared by every credential in the batch. Same semantics as
|
|
103
|
+
* {@link IssueOptions.subject}. */
|
|
104
|
+
subject: Readonly<Record<string, unknown>>;
|
|
105
|
+
/** SD-JWT-VC type identifier — shared across the batch. */
|
|
106
|
+
vct: string;
|
|
107
|
+
/** Names of `subject` keys to make selectively disclosable. Validated
|
|
108
|
+
* once against `subject`; applies to every credential. Each credential
|
|
109
|
+
* gets fresh random salts (so two credentials over the same data are
|
|
110
|
+
* unlinkable on the wire). */
|
|
111
|
+
selectivelyDisclosable?: readonly string[];
|
|
112
|
+
/** Shared `expiresIn`. Mutually exclusive with `expiresAt`. */
|
|
113
|
+
expiresIn?: number;
|
|
114
|
+
/** Shared absolute `expiresAt`. Mutually exclusive with `expiresIn`. */
|
|
115
|
+
expiresAt?: number;
|
|
116
|
+
/** Shared `nbf`. */
|
|
117
|
+
notBefore?: number;
|
|
118
|
+
/** Shared `iat`. Defaults to `floor(Date.now()/1000)` evaluated *once*
|
|
119
|
+
* for the whole batch (so every credential reports the same iat). */
|
|
120
|
+
issuedAt?: number;
|
|
121
|
+
/** One entry per credential to issue. Length ≥ 1. */
|
|
122
|
+
credentials: readonly BatchIssueEntry[];
|
|
123
|
+
}
|
|
76
124
|
/** Stable codes for `IssuerError`. */
|
|
77
|
-
export type IssuerErrorCode = "issuer.subject_invalid" | "issuer.holder_key_required" | "issuer.vct_required" | "issuer.expiry_conflict" | "issuer.expiry_invalid" | "issuer.disclosable_missing" | "issuer.reserved_claim_in_subject";
|
|
125
|
+
export type IssuerErrorCode = "issuer.subject_invalid" | "issuer.holder_key_required" | "issuer.vct_required" | "issuer.expiry_conflict" | "issuer.expiry_invalid" | "issuer.disclosable_missing" | "issuer.reserved_claim_in_subject" | "issuer.batch_empty";
|
|
78
126
|
export declare class IssuerError extends Error {
|
|
79
127
|
readonly name = "IssuerError";
|
|
80
128
|
readonly code: IssuerEr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C,CAAC,CAAC;CAC5C;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IAChC;uCACmC;IACnC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC3C,2DAA2D;IAC3D,GAAG,EAAE,MAAM,CAAC;IACZ;;;kCAG8B;IAC9B,sBAAsB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C,+DAA+D;IAC/D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oBAAoB;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;yEACqE;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,WAAW,EAAE,SAAS,eAAe,EAAE,CAAC;CACzC;AAED,sCAAsC;AACtC,MAAM,MAAM,eAAe,GACvB,wBAAwB,GACxB,4BAA4B,GAC5B,qBAAqB,GACrB,wBAAwB,GACxB,uBAAuB,GACvB,4BAA4B,GAC5B,kCAAkC,GAClC,oBAAoB,CAAC;AAEzB,qBAAa,WAAY,SAAQ,KAAK;IACpC,SAAkB,IAAI,iBAAiB;IACvC,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;gBAE7B,IAAI,EAAE,eAAe,EACrB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAQhC"}
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AA+IA,MAAM,OAAO,WAAY,SAAQ,KAAK;IAClB,IAAI,GAAG,aAAa,CAAC;IAC9B,IAAI,CAAkB;IAC/B,YACE,IAAqB,EACrB,OAAe,EACf,OAA6B;QAE7B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,OAAO,EAAE,KAAK,KAAK,SAAS,EAAE,CAAC;YAChC,IAA4B,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QACtD,CAAC;IACH,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gramota/issuer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "EUDIW credential issuer — sign SD-JWT-VC credentials with selective disclosure and key binding.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@gramota/jose": "0.
|
|
20
|
-
"@gramota/sd-jwt": "0.
|
|
19
|
+
"@gramota/jose": "0.2.0",
|
|
20
|
+
"@gramota/sd-jwt": "0.2.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"jose": "^5.9.6"
|