@bitspark/archon-sdk 0.13.0 → 0.14.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.
@@ -0,0 +1,91 @@
1
+ import { type EnrollRequest } from "./enroll.js";
2
+ /** The first byte of an intent in format 1. */
3
+ export declare const ENROLL_INTENT_FORMAT = 1;
4
+ /** The shortest blind: 128 bits, so the digest cannot confirm a guess. */
5
+ export declare const ENROLL_MIN_BLIND_SIZE = 16;
6
+ /** The longest blind. */
7
+ export declare const ENROLL_MAX_BLIND_SIZE = 64;
8
+ /** The longest account id, account name, purpose or restriction, in bytes. */
9
+ export declare const ENROLL_MAX_TEXT_SIZE = 255;
10
+ /** The most restrictions an intent holds. */
11
+ export declare const ENROLL_MAX_RESTRICTIONS = 32;
12
+ /** The challenge token's prefix. */
13
+ export declare const ENROLL_CHALLENGE_PREFIX = "archon-enroll-challenge-1:";
14
+ /** The proof token's prefix. */
15
+ export declare const ENROLL_PROOF_PREFIX = "archon-enroll-proof-1:";
16
+ /** The longest token, in bytes of text, surrounding whitespace excluded. */
17
+ export declare const ENROLL_MAX_TOKEN_SIZE = 65536;
18
+ /** The longest nonce a challenge token carries. */
19
+ export declare const ENROLL_MAX_NONCE_SIZE = 255;
20
+ /** The longest intent a challenge token carries. */
21
+ export declare const ENROLL_MAX_INTENT_SIZE = 65535;
22
+ /** The possession signature's length. */
23
+ export declare const ENROLL_PROOF_SIZE = 64;
24
+ /** 9999-12-31T23:59:59Z in Unix seconds: every lane renders it, and it fits in 53 bits. */
25
+ export declare const ENROLL_MAX_DEADLINE = 253402300799;
26
+ /**
27
+ * An enrollment intent in format 1. The service builds it from its own validated records; the
28
+ * command decodes it and shows it. Every text field is 1..=255 bytes of UTF-8 with no
29
+ * display-unsafe code point (`displayUnsafe`).
30
+ */
31
+ export interface EnrollIntent {
32
+ /** 16..=64 bytes from a CSPRNG, fresh for every intent. */
33
+ blind: Uint8Array;
34
+ /** The service's identifier for the account. */
35
+ accountId: string;
36
+ /** The account's unique name, such as its sign-in handle: never a free display name. */
37
+ accountName: string;
38
+ /** The binding's purpose. */
39
+ purpose: string;
40
+ /** 0..=32 lines, in order. */
41
+ restrictions: string[];
42
+ }
43
+ /** The challenge token's content. `intent` is the exact intent bytes; the token's codec checks
44
+ * only its own fields, and `enrollChallengeRequest` decodes the intent. */
45
+ export interface EnrollChallenge {
46
+ audience: string;
47
+ /** 1..=255 bytes. */
48
+ transaction: Uint8Array;
49
+ /** 16..=255 bytes. */
50
+ nonce: Uint8Array;
51
+ /** The key the record enrolls. */
52
+ newKey: Uint8Array;
53
+ /** 1..=65535 bytes. */
54
+ intent: Uint8Array;
55
+ /** The record's expiry in whole Unix seconds, 0..=ENROLL_MAX_DEADLINE. */
56
+ deadline: number;
57
+ }
58
+ /** The proof token's content: what the command prints and the service reads back. */
59
+ export interface EnrollProof {
60
+ /** 1..=255 bytes. */
61
+ transaction: Uint8Array;
62
+ /** The key that proved. */
63
+ newKey: Uint8Array;
64
+ /** The possession signature, 64 bytes. */
65
+ proof: Uint8Array;
66
+ }
67
+ /** Writes `intent` in format 1, refusing any field outside its bounds. */
68
+ export declare function encodeEnrollIntent(intent: EnrollIntent): Uint8Array;
69
+ /** Reads an intent in format 1. Refuses an unknown format, any field outside its bounds,
70
+ * display-unsafe or non-UTF-8 text, and any byte left over. */
71
+ export declare function decodeEnrollIntent(bytes: Uint8Array): EnrollIntent;
72
+ /** Writes `challenge` as a challenge token. */
73
+ export declare function encodeEnrollChallenge(challenge: EnrollChallenge): string;
74
+ /** Reads a challenge token. Surrounding tabs, line feeds, carriage returns and spaces are
75
+ * ignored; anything else that is not exactly the prefix and lowercase hex of the fields, with
76
+ * no byte left over, is refused. */
77
+ export declare function decodeEnrollChallenge(text: string): EnrollChallenge;
78
+ /**
79
+ * The enrollment request a challenge token yields (docs/enroll.md §3): the token's nonce,
80
+ * transaction and new key, the intent's purpose, and SHA-256 of the token's intent bytes, with
81
+ * the decoded intent. Refuses an intent that is not format 1. It is the one derivation of what
82
+ * an `archon enroll` proof binds, so what the command shows is what it binds.
83
+ */
84
+ export declare function enrollChallengeRequest(challenge: EnrollChallenge): {
85
+ request: EnrollRequest;
86
+ intent: EnrollIntent;
87
+ };
88
+ /** Writes `proof` as a proof token. */
89
+ export declare function encodeEnrollProof(proof: EnrollProof): string;
90
+ /** Reads a proof token, under `decodeEnrollChallenge`'s rules. */
91
+ export declare function decodeEnrollProof(text: string): EnrollProof;
@@ -0,0 +1,314 @@
1
+ // `archon enroll`'s formats (docs/enroll.md §2–§3, ADR 0013): the intent in format 1, which a
2
+ // service builds and the command renders, and the two tokens a person carries by hand between
3
+ // the signed-in page and the command. The proof never reads an intent; these are for the
4
+ // command, which must show the person which account a key joins before it signs.
5
+ //
6
+ // Pinned by vectors/enroll.json.
7
+ import { PUBLIC_KEY_SIZE } from "@bitspark/archon";
8
+ import { sha256 } from "@noble/hashes/sha2.js";
9
+ import { ENROLL_MAX_TRANSACTION_SIZE } from "./enroll.js";
10
+ import { displayUnsafe } from "./login-display.js";
11
+ import { MIN_NONCE_SIZE } from "./possession.js";
12
+ /** The first byte of an intent in format 1. */
13
+ export const ENROLL_INTENT_FORMAT = 0x01;
14
+ /** The shortest blind: 128 bits, so the digest cannot confirm a guess. */
15
+ export const ENROLL_MIN_BLIND_SIZE = 16;
16
+ /** The longest blind. */
17
+ export const ENROLL_MAX_BLIND_SIZE = 64;
18
+ /** The longest account id, account name, purpose or restriction, in bytes. */
19
+ export const ENROLL_MAX_TEXT_SIZE = 255;
20
+ /** The most restrictions an intent holds. */
21
+ export const ENROLL_MAX_RESTRICTIONS = 32;
22
+ /** The challenge token's prefix. */
23
+ export const ENROLL_CHALLENGE_PREFIX = "archon-enroll-challenge-1:";
24
+ /** The proof token's prefix. */
25
+ export const ENROLL_PROOF_PREFIX = "archon-enroll-proof-1:";
26
+ /** The longest token, in bytes of text, surrounding whitespace excluded. */
27
+ export const ENROLL_MAX_TOKEN_SIZE = 65536;
28
+ /** The longest nonce a challenge token carries. */
29
+ export const ENROLL_MAX_NONCE_SIZE = 255;
30
+ /** The longest intent a challenge token carries. */
31
+ export const ENROLL_MAX_INTENT_SIZE = 0xffff;
32
+ /** The possession signature's length. */
33
+ export const ENROLL_PROOF_SIZE = 64;
34
+ /** 9999-12-31T23:59:59Z in Unix seconds: every lane renders it, and it fits in 53 bits. */
35
+ export const ENROLL_MAX_DEADLINE = 253402300799;
36
+ const utf8 = new TextEncoder();
37
+ // fatal: refuse what is not UTF-8. ignoreBOM: KEEP a leading U+FEFF, so the display check
38
+ // refuses it as the other lanes do, instead of the decoder silently dropping it.
39
+ const utf8Strict = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true });
40
+ /** Writes `intent` in format 1, refusing any field outside its bounds. */
41
+ export function encodeEnrollIntent(intent) {
42
+ checkBlind(intent.blind);
43
+ const fields = [
44
+ shownBytes("account id", intent.accountId),
45
+ shownBytes("account name", intent.accountName),
46
+ shownBytes("purpose", intent.purpose),
47
+ ];
48
+ if (intent.restrictions.length > ENROLL_MAX_RESTRICTIONS) {
49
+ throw new Error(`enroll: ${intent.restrictions.length} restrictions, want at most ${ENROLL_MAX_RESTRICTIONS}`);
50
+ }
51
+ const restrictions = intent.restrictions.map((r, n) => shownBytes(`restriction ${n}`, r));
52
+ const out = [ENROLL_INTENT_FORMAT];
53
+ pushField(out, intent.blind);
54
+ for (const f of fields)
55
+ pushField(out, f);
56
+ out.push(restrictions.length);
57
+ for (const r of restrictions)
58
+ pushField(out, r);
59
+ return Uint8Array.from(out);
60
+ }
61
+ /** Reads an intent in format 1. Refuses an unknown format, any field outside its bounds,
62
+ * display-unsafe or non-UTF-8 text, and any byte left over. */
63
+ export function decodeEnrollIntent(bytes) {
64
+ const r = new Reader(bytes);
65
+ const format = r.take(1)[0];
66
+ if (format !== ENROLL_INTENT_FORMAT) {
67
+ throw new Error(`enroll: intent format 0x${hex2(format)}, want 0x${hex2(ENROLL_INTENT_FORMAT)}`);
68
+ }
69
+ const blind = r.field().slice();
70
+ checkBlind(blind);
71
+ const accountId = shownText(r, "account id");
72
+ const accountName = shownText(r, "account name");
73
+ const purpose = shownText(r, "purpose");
74
+ const count = r.take(1)[0];
75
+ if (count > ENROLL_MAX_RESTRICTIONS) {
76
+ throw new Error(`enroll: ${count} restrictions, want at most ${ENROLL_MAX_RESTRICTIONS}`);
77
+ }
78
+ const restrictions = [];
79
+ for (let n = 0; n < count; n++)
80
+ restrictions.push(shownText(r, `restriction ${n}`));
81
+ r.end();
82
+ return { blind, accountId, accountName, purpose, restrictions };
83
+ }
84
+ /** Writes `challenge` as a challenge token. */
85
+ export function encodeEnrollChallenge(challenge) {
86
+ const audience = checkChallenge(challenge);
87
+ const out = [];
88
+ pushField(out, audience);
89
+ pushField(out, challenge.transaction);
90
+ pushField(out, challenge.nonce);
91
+ out.push(...challenge.newKey);
92
+ pushField(out, challenge.intent);
93
+ const hi = Math.floor(challenge.deadline / 0x1_0000_0000);
94
+ const lo = challenge.deadline % 0x1_0000_0000;
95
+ out.push((hi >>> 24) & 0xff, (hi >>> 16) & 0xff, (hi >>> 8) & 0xff, hi & 0xff);
96
+ out.push((lo >>> 24) & 0xff, (lo >>> 16) & 0xff, (lo >>> 8) & 0xff, lo & 0xff);
97
+ const text = ENROLL_CHALLENGE_PREFIX + toHex(Uint8Array.from(out));
98
+ if (text.length > ENROLL_MAX_TOKEN_SIZE) {
99
+ throw new Error(`enroll: challenge token is ${text.length} bytes, over ${ENROLL_MAX_TOKEN_SIZE}`);
100
+ }
101
+ return text;
102
+ }
103
+ /** Reads a challenge token. Surrounding tabs, line feeds, carriage returns and spaces are
104
+ * ignored; anything else that is not exactly the prefix and lowercase hex of the fields, with
105
+ * no byte left over, is refused. */
106
+ export function decodeEnrollChallenge(text) {
107
+ const r = new Reader(unwrap(text, ENROLL_CHALLENGE_PREFIX));
108
+ let audience;
109
+ try {
110
+ audience = utf8Strict.decode(r.field());
111
+ }
112
+ catch {
113
+ throw new Error("enroll: audience is not valid UTF-8");
114
+ }
115
+ const transaction = r.field().slice();
116
+ const nonce = r.field().slice();
117
+ const newKey = r.take(PUBLIC_KEY_SIZE).slice();
118
+ const intent = r.field().slice();
119
+ const d = r.take(8);
120
+ r.end();
121
+ const hi = ((d[0] << 24) | (d[1] << 16) | (d[2] << 8) | d[3]) >>> 0;
122
+ const lo = ((d[4] << 24) | (d[5] << 16) | (d[6] << 8) | d[7]) >>> 0;
123
+ if (hi > Math.floor(ENROLL_MAX_DEADLINE / 0x1_0000_0000))
124
+ throw new Error("enroll: deadline is after 9999-12-31T23:59:59Z");
125
+ const challenge = { audience, transaction, nonce, newKey, intent, deadline: hi * 0x1_0000_0000 + lo };
126
+ checkChallenge(challenge);
127
+ return challenge;
128
+ }
129
+ /**
130
+ * The enrollment request a challenge token yields (docs/enroll.md §3): the token's nonce,
131
+ * transaction and new key, the intent's purpose, and SHA-256 of the token's intent bytes, with
132
+ * the decoded intent. Refuses an intent that is not format 1. It is the one derivation of what
133
+ * an `archon enroll` proof binds, so what the command shows is what it binds.
134
+ */
135
+ export function enrollChallengeRequest(challenge) {
136
+ checkChallenge(challenge);
137
+ const intent = decodeEnrollIntent(challenge.intent);
138
+ return {
139
+ request: {
140
+ nonce: challenge.nonce.slice(),
141
+ transaction: challenge.transaction.slice(),
142
+ purpose: intent.purpose,
143
+ newKey: challenge.newKey.slice(),
144
+ intentDigest: sha256(challenge.intent),
145
+ },
146
+ intent,
147
+ };
148
+ }
149
+ /** Writes `proof` as a proof token. */
150
+ export function encodeEnrollProof(proof) {
151
+ checkProof(proof);
152
+ const out = [];
153
+ pushField(out, proof.transaction);
154
+ out.push(...proof.newKey, ...proof.proof);
155
+ return ENROLL_PROOF_PREFIX + toHex(Uint8Array.from(out));
156
+ }
157
+ /** Reads a proof token, under `decodeEnrollChallenge`'s rules. */
158
+ export function decodeEnrollProof(text) {
159
+ const r = new Reader(unwrap(text, ENROLL_PROOF_PREFIX));
160
+ const proof = { transaction: r.field().slice(), newKey: r.take(PUBLIC_KEY_SIZE).slice(), proof: r.take(ENROLL_PROOF_SIZE).slice() };
161
+ r.end();
162
+ checkProof(proof);
163
+ return proof;
164
+ }
165
+ /** Checks a challenge's fields; returns the audience's UTF-8 bytes. The audience rule is
166
+ * stricter than the binding's (C0 and DEL only): a command that refuses a token prints its
167
+ * audience, so nothing display-unsafe may get that far. */
168
+ function checkChallenge(c) {
169
+ const audience = utf8.encode(c.audience);
170
+ if (!isWellFormed(c.audience) || audience.length === 0 || audience.length > 0xffff) {
171
+ throw new Error(`enroll: audience is ${audience.length} bytes, want 1..=65535 of UTF-8`);
172
+ }
173
+ refuseUnsafe("audience", c.audience);
174
+ if (c.transaction.length === 0 || c.transaction.length > ENROLL_MAX_TRANSACTION_SIZE) {
175
+ throw new Error(`enroll: transaction is ${c.transaction.length} bytes, want 1..=${ENROLL_MAX_TRANSACTION_SIZE}`);
176
+ }
177
+ if (c.nonce.length < MIN_NONCE_SIZE || c.nonce.length > ENROLL_MAX_NONCE_SIZE) {
178
+ throw new Error(`enroll: nonce is ${c.nonce.length} bytes, want ${MIN_NONCE_SIZE}..=${ENROLL_MAX_NONCE_SIZE}`);
179
+ }
180
+ if (c.newKey.length !== PUBLIC_KEY_SIZE) {
181
+ throw new Error(`enroll: new key is ${c.newKey.length} bytes, want ${PUBLIC_KEY_SIZE}`);
182
+ }
183
+ if (c.intent.length === 0 || c.intent.length > ENROLL_MAX_INTENT_SIZE) {
184
+ throw new Error(`enroll: intent is ${c.intent.length} bytes, want 1..=${ENROLL_MAX_INTENT_SIZE}`);
185
+ }
186
+ if (!Number.isSafeInteger(c.deadline) || c.deadline < 0 || c.deadline > ENROLL_MAX_DEADLINE) {
187
+ throw new Error("enroll: deadline must be whole seconds from 1970 to 9999-12-31T23:59:59Z");
188
+ }
189
+ return audience;
190
+ }
191
+ function checkProof(p) {
192
+ if (p.transaction.length === 0 || p.transaction.length > ENROLL_MAX_TRANSACTION_SIZE) {
193
+ throw new Error(`enroll: transaction is ${p.transaction.length} bytes, want 1..=${ENROLL_MAX_TRANSACTION_SIZE}`);
194
+ }
195
+ if (p.newKey.length !== PUBLIC_KEY_SIZE)
196
+ throw new Error(`enroll: new key is ${p.newKey.length} bytes, want ${PUBLIC_KEY_SIZE}`);
197
+ if (p.proof.length !== ENROLL_PROOF_SIZE)
198
+ throw new Error(`enroll: proof is ${p.proof.length} bytes, want ${ENROLL_PROOF_SIZE}`);
199
+ }
200
+ function checkBlind(blind) {
201
+ if (blind.length < ENROLL_MIN_BLIND_SIZE || blind.length > ENROLL_MAX_BLIND_SIZE) {
202
+ throw new Error(`enroll: blind is ${blind.length} bytes, want ${ENROLL_MIN_BLIND_SIZE}..=${ENROLL_MAX_BLIND_SIZE}`);
203
+ }
204
+ }
205
+ /** The rule for text the command shows: 1..=255 bytes of well-formed UTF-8 with no
206
+ * display-unsafe code point. Returns the UTF-8 bytes. The code point is named, never echoed. */
207
+ function shownBytes(what, s) {
208
+ if (!isWellFormed(s))
209
+ throw new Error(`enroll: ${what} is not well-formed UTF-16 (a lone surrogate is not UTF-8)`);
210
+ const bytes = utf8.encode(s);
211
+ if (bytes.length === 0 || bytes.length > ENROLL_MAX_TEXT_SIZE) {
212
+ throw new Error(`enroll: ${what} is ${bytes.length} bytes, want 1..=${ENROLL_MAX_TEXT_SIZE}`);
213
+ }
214
+ refuseUnsafe(what, s);
215
+ return bytes;
216
+ }
217
+ function shownText(r, what) {
218
+ let s;
219
+ try {
220
+ s = utf8Strict.decode(r.field());
221
+ }
222
+ catch {
223
+ throw new Error(`enroll: ${what} is not valid UTF-8`);
224
+ }
225
+ shownBytes(what, s);
226
+ return s;
227
+ }
228
+ function refuseUnsafe(what, s) {
229
+ for (const ch of s) {
230
+ const cp = ch.codePointAt(0);
231
+ if (displayUnsafe(cp)) {
232
+ throw new Error(`enroll: ${what} carries a code point that cannot be shown, U+${cp.toString(16).toUpperCase().padStart(4, "0")}`);
233
+ }
234
+ }
235
+ }
236
+ /** Strips the surrounding whitespace the token rules allow and decodes the hex after `prefix`:
237
+ * lowercase only, even length, nothing else. */
238
+ function unwrap(text, prefix) {
239
+ let i = 0;
240
+ let j = text.length;
241
+ const ws = (c) => c === "\t" || c === "\n" || c === "\r" || c === " ";
242
+ while (i < j && ws(text[i]))
243
+ i++;
244
+ while (j > i && ws(text[j - 1]))
245
+ j--;
246
+ const t = text.slice(i, j);
247
+ const size = utf8.encode(t).length;
248
+ if (size > ENROLL_MAX_TOKEN_SIZE)
249
+ throw new Error(`enroll: token is ${size} bytes, over ${ENROLL_MAX_TOKEN_SIZE}`);
250
+ if (!t.startsWith(prefix))
251
+ throw new Error(`enroll: not a token beginning ${JSON.stringify(prefix)}`);
252
+ const h = t.slice(prefix.length);
253
+ if (h.length % 2 !== 0)
254
+ throw new Error("enroll: token hex has an odd length");
255
+ if (!/^[0-9a-f]*$/.test(h))
256
+ throw new Error("enroll: token is not lowercase hex");
257
+ const out = new Uint8Array(h.length / 2);
258
+ for (let k = 0; k < out.length; k++)
259
+ out[k] = Number.parseInt(h.slice(k * 2, k * 2 + 2), 16);
260
+ return out;
261
+ }
262
+ function toHex(b) {
263
+ return Array.from(b, (x) => x.toString(16).padStart(2, "0")).join("");
264
+ }
265
+ function hex2(n) {
266
+ return n.toString(16).padStart(2, "0");
267
+ }
268
+ function pushField(out, field) {
269
+ out.push((field.length >> 8) & 0xff, field.length & 0xff);
270
+ for (const b of field)
271
+ out.push(b);
272
+ }
273
+ function isWellFormed(s) {
274
+ const native = s.isWellFormed;
275
+ if (typeof native === "function")
276
+ return native.call(s);
277
+ for (let i = 0; i < s.length; i++) {
278
+ const c = s.charCodeAt(i);
279
+ if (c >= 0xd800 && c <= 0xdbff) {
280
+ const d = s.charCodeAt(i + 1);
281
+ if (!(d >= 0xdc00 && d <= 0xdfff))
282
+ return false;
283
+ i++;
284
+ }
285
+ else if (c >= 0xdc00 && c <= 0xdfff) {
286
+ return false;
287
+ }
288
+ }
289
+ return true;
290
+ }
291
+ /** Takes length-prefixed fields off a byte array, refusing anything that runs past it. */
292
+ class Reader {
293
+ bytes;
294
+ #pos = 0;
295
+ constructor(bytes) {
296
+ this.bytes = bytes;
297
+ }
298
+ take(n) {
299
+ if (n > this.bytes.length - this.#pos)
300
+ throw new Error("enroll: truncated");
301
+ const out = this.bytes.subarray(this.#pos, this.#pos + n);
302
+ this.#pos += n;
303
+ return out;
304
+ }
305
+ field() {
306
+ const n = this.take(2);
307
+ return this.take((n[0] << 8) | n[1]);
308
+ }
309
+ end() {
310
+ if (this.#pos !== this.bytes.length)
311
+ throw new Error(`enroll: ${this.bytes.length - this.#pos} bytes left over`);
312
+ }
313
+ }
314
+ //# sourceMappingURL=enroll-token.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enroll-token.js","sourceRoot":"","sources":["../../src/enroll-token.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,8FAA8F;AAC9F,yFAAyF;AACzF,iFAAiF;AACjF,EAAE;AACF,iCAAiC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,OAAO,EAAE,2BAA2B,EAAsB,MAAM,aAAa,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,+CAA+C;AAC/C,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC;AACzC,0EAA0E;AAC1E,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACxC,yBAAyB;AACzB,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACxC,8EAA8E;AAC9E,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAC;AACxC,6CAA6C;AAC7C,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAC1C,oCAAoC;AACpC,MAAM,CAAC,MAAM,uBAAuB,GAAG,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,5 @@ export * from "./login.js";
5
5
  export * from "./login-audience.js";
6
6
  export * from "./login-display.js";
7
7
  export * from "./enroll.js";
8
+ export * from "./enroll-token.js";
8
9
  export * from "./request.js";
package/dist/src/index.js CHANGED
@@ -23,5 +23,6 @@ export * from "./login.js";
23
23
  export * from "./login-audience.js";
24
24
  export * from "./login-display.js";
25
25
  export * from "./enroll.js";
26
+ export * from "./enroll-token.js";
26
27
  export * from "./request.js";
27
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,EAAE;AACF,uFAAuF;AACvF,wEAAwE;AACxE,EAAE;AACF,qFAAqF;AACrF,kEAAkE;AAClE,gFAAgF;AAChF,EAAE;AACF,6FAA6F;AAC7F,8FAA8F;AAC9F,wBAAwB;AACxB,EAAE;AACF,+EAA+E;AAC/E,yFAAyF;AACzF,sFAAsF;AACtF,uFAAuF;AACvF,+CAA+C;AAC/C,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,EAAE;AACF,uFAAuF;AACvF,wEAAwE;AACxE,EAAE;AACF,qFAAqF;AACrF,kEAAkE;AAClE,gFAAgF;AAChF,EAAE;AACF,6FAA6F;AAC7F,8FAA8F;AAC9F,wBAAwB;AACxB,EAAE;AACF,+EAA+E;AAC/E,yFAAyF;AACzF,sFAAsF;AACtF,uFAAuF;AACvF,+CAA+C;AAC/C,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitspark/archon-sdk",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "archon-sdk: proof of possession and the signed envelope, one layer above the identity floor. Deterministic given its inputs; no RNG, no clock, no socket.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -22,7 +22,7 @@
22
22
  "test": "tsc -p tsconfig.json && node --test dist/test/*.test.js"
23
23
  },
24
24
  "dependencies": {
25
- "@bitspark/archon": "^0.13.0",
25
+ "@bitspark/archon": "^0.14.0",
26
26
  "@noble/hashes": "^2.2.0"
27
27
  },
28
28
  "devDependencies": {