@keri-ts/wallet 0.0.0-stage → 2.0.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.
- package/LICENSE +202 -0
- package/README.md +134 -2
- package/esm/package.json +3 -0
- package/esm/wallet/npm/src/mod.js +6 -0
- package/esm/wallet/npm/src/src/authoring.js +219 -0
- package/esm/wallet/npm/src/src/custody.js +137 -0
- package/esm/wallet/npm/src/src/disclosing.js +528 -0
- package/esm/wallet/npm/src/src/storing.js +60 -0
- package/esm/wallet/npm/src/src/wallet.js +251 -0
- package/package.json +42 -4
- package/types/mod.d.ts +7 -0
- package/types/mod.d.ts.map +1 -0
- package/types/src/authoring.d.ts +51 -0
- package/types/src/authoring.d.ts.map +1 -0
- package/types/src/custody.d.ts +53 -0
- package/types/src/custody.d.ts.map +1 -0
- package/types/src/disclosing.d.ts +109 -0
- package/types/src/disclosing.d.ts.map +1 -0
- package/types/src/storing.d.ts +56 -0
- package/types/src/storing.d.ts.map +1 -0
- package/types/src/wallet.d.ts +77 -0
- package/types/src/wallet.d.ts.map +1 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Komer, LMDBer, Suber } from "keri-ts/db";
|
|
2
|
+
import { DatabaseNotOpenError, RawRecord } from "keri-ts/runtime";
|
|
3
|
+
/** Komer hydration of issued application records. */
|
|
4
|
+
export class IssuedRecord extends RawRecord {
|
|
5
|
+
}
|
|
6
|
+
/** Komer hydration of explicit consent records. */
|
|
7
|
+
export class AdmittedRecord extends RawRecord {
|
|
8
|
+
}
|
|
9
|
+
/** Own only wallet inventory; protocol acceptance remains in the borrowed processors. */
|
|
10
|
+
export class WalletBaser extends LMDBer {
|
|
11
|
+
constructor(options = {}) {
|
|
12
|
+
super(options, {
|
|
13
|
+
tailDirPath: "keri/wallet",
|
|
14
|
+
cleanTailDirPath: "keri/clean/wallet",
|
|
15
|
+
altTailDirPath: ".tufa/wallet",
|
|
16
|
+
altCleanTailDirPath: ".tufa/clean/wallet",
|
|
17
|
+
tempPrefix: "keri_wallet_",
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(this, "issued", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
configurable: true,
|
|
22
|
+
writable: true,
|
|
23
|
+
value: void 0
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(this, "admitted", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
configurable: true,
|
|
28
|
+
writable: true,
|
|
29
|
+
value: void 0
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(this, "credentials", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
configurable: true,
|
|
34
|
+
writable: true,
|
|
35
|
+
value: void 0
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/** Rebind the application's ordinary typed tables on joined reopen. */
|
|
39
|
+
*reopen(options = {}) {
|
|
40
|
+
if (!(yield* super.reopen(options)))
|
|
41
|
+
return false;
|
|
42
|
+
try {
|
|
43
|
+
this.issued = new Komer(this, { subkey: "issued.", recordClass: IssuedRecord });
|
|
44
|
+
this.admitted = new Komer(this, { subkey: "admitted.", recordClass: AdmittedRecord });
|
|
45
|
+
this.credentials = new Suber(this, { subkey: "credential-grants." });
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
yield* this.close();
|
|
50
|
+
throw error;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/** Acquire a wallet environment; callers join close after all borrowed users finish. */
|
|
55
|
+
export function* createWalletBaser(options = {}) {
|
|
56
|
+
const db = new WalletBaser(options);
|
|
57
|
+
if (!(yield* db.reopen()))
|
|
58
|
+
throw new DatabaseNotOpenError("Wallet environment could not open.");
|
|
59
|
+
return db;
|
|
60
|
+
}
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
/** Explicit ACDC inventory and consent over borrowed authenticated protocol evidence. */
|
|
2
|
+
import { bytesEqual, collectPayload, nestedPayload, SerderACDC, Vrsn_2_0, } from "cesr-ts";
|
|
3
|
+
import { call } from "effection";
|
|
4
|
+
import { loadNests } from "keri-ts/db";
|
|
5
|
+
import { acceptedRegistryEvidence, authenticateIpexNode, envelopeFromFrame, evaluateChain, ipexExnBody, isLocalGroupHab, issuedNodeVerdict, ValidationError, vet, walkIpexGraph, } from "keri-ts/runtime";
|
|
6
|
+
import { Buffer } from "node:buffer";
|
|
7
|
+
import { anchorExchange, exchangeWire, WalletDiscloser } from "./disclosing.js";
|
|
8
|
+
/** Compare durable application values, including exact originally issued raw bytes. */
|
|
9
|
+
function identical(left, right) {
|
|
10
|
+
return JSON.stringify(left) === JSON.stringify(right);
|
|
11
|
+
}
|
|
12
|
+
/** Inventory owns consent, never protocol acceptance, current standing or custody. */
|
|
13
|
+
export class Wallet {
|
|
14
|
+
constructor({ hby, registry, exc, db }) {
|
|
15
|
+
Object.defineProperty(this, "hby", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
configurable: true,
|
|
18
|
+
writable: true,
|
|
19
|
+
value: void 0
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(this, "registry", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
configurable: true,
|
|
24
|
+
writable: true,
|
|
25
|
+
value: void 0
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(this, "exc", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
configurable: true,
|
|
30
|
+
writable: true,
|
|
31
|
+
value: void 0
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(this, "db", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
configurable: true,
|
|
36
|
+
writable: true,
|
|
37
|
+
value: void 0
|
|
38
|
+
});
|
|
39
|
+
if (exc.hby !== hby)
|
|
40
|
+
throw new ValidationError("Wallet requires its actual Exchanger.");
|
|
41
|
+
this.hby = hby;
|
|
42
|
+
this.registry = registry;
|
|
43
|
+
this.exc = exc;
|
|
44
|
+
this.db = db;
|
|
45
|
+
}
|
|
46
|
+
/** Verify accepted local issuance, or return identical retained history without fresh proof. */
|
|
47
|
+
recordIssued(acdc, update, { blinder } = {}) {
|
|
48
|
+
const event = this.registry.event(update);
|
|
49
|
+
const regid = acdc.regid ?? (typeof event?.sad?.rd === "string" ? event.sad.rd : null);
|
|
50
|
+
const chain = regid ? acceptedRegistryEvidence(this.registry, regid) : null;
|
|
51
|
+
if (!event || !chain || !this.hby.habs.has(chain.rip.issuer)) {
|
|
52
|
+
throw new ValidationError("Local accepted issuance evidence is required.");
|
|
53
|
+
}
|
|
54
|
+
const index = chain.updates.findIndex((item) => item.said === update);
|
|
55
|
+
if (index < 0)
|
|
56
|
+
throw new ValidationError("Issuance update is still pending.");
|
|
57
|
+
const old = this.db.issued.get([acdc.said]);
|
|
58
|
+
const raw = Buffer.from(acdc.raw).toString("base64");
|
|
59
|
+
if (old && !blinder) {
|
|
60
|
+
const expected = {
|
|
61
|
+
credential: acdc.said,
|
|
62
|
+
registry: regid,
|
|
63
|
+
controller: chain.rip.issuer,
|
|
64
|
+
update,
|
|
65
|
+
raw,
|
|
66
|
+
encoding: "base64",
|
|
67
|
+
bound: old.bound,
|
|
68
|
+
};
|
|
69
|
+
if (!identical(old, expected))
|
|
70
|
+
throw new ValidationError("Different issuance is already retained.");
|
|
71
|
+
return old;
|
|
72
|
+
}
|
|
73
|
+
if (event.ilk === "bup" && !blinder) {
|
|
74
|
+
throw new ValidationError("Fresh blinded issuance requires an explicit opening.");
|
|
75
|
+
}
|
|
76
|
+
if (blinder && event.ilk !== "bup")
|
|
77
|
+
throw new ValidationError("Opening requires a blinded update.");
|
|
78
|
+
const verified = vet({ ...chain, updates: chain.updates.slice(0, index + 1), db: this.hby.db, acdc, blinder });
|
|
79
|
+
if (verified.kind !== "verified" || verified.state.state !== "issued") {
|
|
80
|
+
throw new ValidationError("Referenced update does not prove issued state.");
|
|
81
|
+
}
|
|
82
|
+
const record = {
|
|
83
|
+
credential: acdc.said,
|
|
84
|
+
registry: regid,
|
|
85
|
+
controller: chain.rip.issuer,
|
|
86
|
+
update,
|
|
87
|
+
raw,
|
|
88
|
+
encoding: "base64",
|
|
89
|
+
bound: blinder && "bn" in blinder ? { bn: blinder.bn.num.toString(16), bd: blinder.bd.qb64 } : null,
|
|
90
|
+
};
|
|
91
|
+
if (old && !identical(old, record))
|
|
92
|
+
throw new ValidationError("Different issuance is already retained.");
|
|
93
|
+
this.db.issued.put([acdc.said], record);
|
|
94
|
+
return this.db.issued.get([acdc.said]);
|
|
95
|
+
}
|
|
96
|
+
/** Reconstruct the original serialization without asserting present registry standing. */
|
|
97
|
+
issuedCredential(said) {
|
|
98
|
+
const record = this.db.issued.get([said]);
|
|
99
|
+
if (!record || record.encoding !== "base64")
|
|
100
|
+
throw new ValidationError("Issued credential is required.");
|
|
101
|
+
const raw = new Uint8Array(Buffer.from(record.raw, "base64"));
|
|
102
|
+
const acdc = new SerderACDC({ raw });
|
|
103
|
+
if (Buffer.from(raw).toString("base64") !== record.raw || acdc.said !== said || !bytesEqual(acdc.raw, raw)) {
|
|
104
|
+
throw new ValidationError("Retained issuance bytes do not match their identifier.");
|
|
105
|
+
}
|
|
106
|
+
return acdc;
|
|
107
|
+
}
|
|
108
|
+
/** Authenticate accepted outer evidence through existing replay, without current node policy. */
|
|
109
|
+
async accepted(said, route) {
|
|
110
|
+
const body = this.hby.db.exns.get([said]);
|
|
111
|
+
if (!body || body.said !== said || body.route !== route || body.pvrsn.major !== 2 || !this.exc.complete(said)) {
|
|
112
|
+
throw new ValidationError("Accepted ACDC v2 exchange at the exact route is required.");
|
|
113
|
+
}
|
|
114
|
+
for await (const _chunk of this.exc.replay(said)) { /* replay authenticates retained outer factors */ }
|
|
115
|
+
return body;
|
|
116
|
+
}
|
|
117
|
+
/** New use requires current node evidence and a valid root under shared issued-state policy. */
|
|
118
|
+
graphAccepted(grant, origin) {
|
|
119
|
+
if (!this.exc.verifyAccepted(grant, "/ipex/grant"))
|
|
120
|
+
return false;
|
|
121
|
+
const graph = walkIpexGraph(origin, loadNests(this.hby.db, grant), true);
|
|
122
|
+
if (!graph)
|
|
123
|
+
return false;
|
|
124
|
+
const verdicts = new Map();
|
|
125
|
+
for (const [said, node] of graph.nodes) {
|
|
126
|
+
const auth = authenticateIpexNode(node.body, envelopeFromFrame(node), this.hby.db, this.registry);
|
|
127
|
+
verdicts.set(said, issuedNodeVerdict(auth));
|
|
128
|
+
}
|
|
129
|
+
return evaluateChain(graph, verdicts, this.hby.db)?.kind === "valid";
|
|
130
|
+
}
|
|
131
|
+
/** Resolve only the origin actually carried by this accepted Grant. */
|
|
132
|
+
origin(grant) {
|
|
133
|
+
const origins = grant.sad.a && grant.sad.a.o;
|
|
134
|
+
if (!Array.isArray(origins) || origins.length !== 1 || typeof origins[0] !== "string") {
|
|
135
|
+
throw new ValidationError("Wallet admission requires one disclosed origin.");
|
|
136
|
+
}
|
|
137
|
+
if (!loadNests(this.hby.db, grant.said).some((node) => node.body instanceof SerderACDC && node.body.said === origins[0])) {
|
|
138
|
+
throw new ValidationError("Accepted Grant origin is missing.");
|
|
139
|
+
}
|
|
140
|
+
return origins[0];
|
|
141
|
+
}
|
|
142
|
+
/** Freeze an unsigned response only after explicit consent, exact prior authentication and current root truth. */
|
|
143
|
+
*prepareAdmitBody(grant, holder, { consent = false, message = "", gvrsn = Vrsn_2_0 } = {}) {
|
|
144
|
+
if (consent !== true)
|
|
145
|
+
throw new ValidationError("Explicit consent is required.");
|
|
146
|
+
if (gvrsn.major < 2)
|
|
147
|
+
throw new ValidationError("ACDC v2 Admit requires attachment genus 2 or later.");
|
|
148
|
+
const g = yield* call(() => this.accepted(grant, "/ipex/grant")), hab = this.hby.habs.get(holder);
|
|
149
|
+
if (!hab || g.sad.ri !== holder)
|
|
150
|
+
throw new ValidationError("Grant must address the intended local holder.");
|
|
151
|
+
const response = this.hby.db.erpy.get([grant]);
|
|
152
|
+
if (response && this.exc.complete(response.qb64)) {
|
|
153
|
+
throw new ValidationError("Grant already has an accepted response.");
|
|
154
|
+
}
|
|
155
|
+
if (!this.graphAccepted(grant, this.origin(g))) {
|
|
156
|
+
throw new ValidationError("Current authenticated graph acceptance is required before signing.");
|
|
157
|
+
}
|
|
158
|
+
return ipexExnBody(holder, "/ipex/admit", [], { message, prior: g, gvrsn });
|
|
159
|
+
}
|
|
160
|
+
/** Sign an individual response; group approval consumes the same unsigned body through its own exact-stream owner. */
|
|
161
|
+
*prepareAdmit(grant, holder, { consent = false, message = "", gvrsn = Vrsn_2_0, receiptor, auths } = {}) {
|
|
162
|
+
if (consent !== true)
|
|
163
|
+
throw new ValidationError("Explicit consent is required.");
|
|
164
|
+
if (gvrsn.major < 2)
|
|
165
|
+
throw new ValidationError("ACDC v2 Admit requires attachment genus 2 or later.");
|
|
166
|
+
const hab = this.hby.habs.get(holder);
|
|
167
|
+
if (!hab)
|
|
168
|
+
throw new ValidationError("Grant must address the intended local holder.");
|
|
169
|
+
if (isLocalGroupHab(this.hby, hab)) {
|
|
170
|
+
throw new ValidationError("ACDC v2 wallet admission requires a single-signature holder.");
|
|
171
|
+
}
|
|
172
|
+
const admit = yield* this.prepareAdmitBody(grant, holder, { consent, message, gvrsn });
|
|
173
|
+
const anchored = admit.sad.a.ax?.[0] === true;
|
|
174
|
+
if (anchored && !receiptor)
|
|
175
|
+
throw new ValidationError("Anchored Admit requires its actual receipt owner.");
|
|
176
|
+
const source = anchored ? yield* anchorExchange(this, receiptor, hab, admit, auths) : undefined;
|
|
177
|
+
if (!this.graphAccepted(grant, this.origin(this.hby.db.exns.get([grant])))) {
|
|
178
|
+
throw new ValidationError("Current authenticated graph acceptance is required after source receipts.");
|
|
179
|
+
}
|
|
180
|
+
return {
|
|
181
|
+
admit,
|
|
182
|
+
wire: exchangeWire(hab, admit, undefined, source, gvrsn),
|
|
183
|
+
support: source ? new WalletDiscloser(this, receiptor).kel(hab) : new Uint8Array(),
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
/** Record explicit local consent to one accepted, linked Grant/Admit pair. */
|
|
187
|
+
async recordAdmission(grant, admit, { consent = false } = {}) {
|
|
188
|
+
if (consent !== true)
|
|
189
|
+
throw new ValidationError("Explicit consent is required.");
|
|
190
|
+
const g = await this.accepted(grant, "/ipex/grant"), a = await this.accepted(admit, "/ipex/admit");
|
|
191
|
+
const holder = g.sad.ri;
|
|
192
|
+
if (typeof holder !== "string" || !this.hby.habs.has(holder) || a.pre !== holder || a.sad.p !== grant
|
|
193
|
+
|| a.sad.ri !== g.pre || this.hby.db.erpy.get([grant])?.qb64 !== admit) {
|
|
194
|
+
throw new ValidationError("Admit must be the intended local holder response to this Grant.");
|
|
195
|
+
}
|
|
196
|
+
const origin = this.origin(g);
|
|
197
|
+
const old = this.db.admitted.get([grant]);
|
|
198
|
+
if (old) {
|
|
199
|
+
if (old.admit !== admit || old.credential !== origin || old.holder !== holder) {
|
|
200
|
+
throw new ValidationError("Conflicting wallet admission.");
|
|
201
|
+
}
|
|
202
|
+
return old;
|
|
203
|
+
}
|
|
204
|
+
if (!this.exc.verifyAccepted(admit, "/ipex/admit") || !this.graphAccepted(grant, origin)) {
|
|
205
|
+
throw new ValidationError("Current authenticated graph acceptance is required for new admission.");
|
|
206
|
+
}
|
|
207
|
+
const record = { credential: origin, grant, admit, holder, admitted: new Date().toISOString() };
|
|
208
|
+
this.db.env.transactionSync(() => {
|
|
209
|
+
this.db.admitted.put([grant], record);
|
|
210
|
+
this.db.credentials.put([origin, grant], grant);
|
|
211
|
+
});
|
|
212
|
+
return this.db.admitted.get([grant]);
|
|
213
|
+
}
|
|
214
|
+
/** Read the original admitted proof; later disclosures and current policy cannot expand it. */
|
|
215
|
+
async heldCredential(grant, { presenterAuthorized = false } = {}) {
|
|
216
|
+
const record = this.db.admitted.get([grant]);
|
|
217
|
+
if (!record && presenterAuthorized !== true) {
|
|
218
|
+
throw new ValidationError("Grant has not been admitted; a transferred view requires explicit presenter authorization.");
|
|
219
|
+
}
|
|
220
|
+
const body = await this.accepted(grant, "/ipex/grant");
|
|
221
|
+
const admit = record?.admit ?? this.hby.db.erpy.get([grant])?.qb64;
|
|
222
|
+
if (!admit)
|
|
223
|
+
throw new ValidationError("Transferred Grant requires its exact accepted Admit.");
|
|
224
|
+
const response = await this.accepted(admit, "/ipex/admit");
|
|
225
|
+
if (response.sad.p !== grant || response.pre !== body.sad.ri) {
|
|
226
|
+
throw new ValidationError("Transferred Admit does not match the exact view.");
|
|
227
|
+
}
|
|
228
|
+
const nests = loadNests(this.hby.db, grant);
|
|
229
|
+
const origin = nests.find((node) => node.body instanceof SerderACDC && node.body.said === (record?.credential ?? this.origin(body)));
|
|
230
|
+
if (!origin)
|
|
231
|
+
throw new ValidationError("Admitted origin evidence is missing.");
|
|
232
|
+
return {
|
|
233
|
+
credential: origin.body,
|
|
234
|
+
proof: await collectPayload(nestedPayload(origin, Vrsn_2_0)),
|
|
235
|
+
artifacts: await Promise.all(nests.filter((node) => node !== origin).map((node) => collectPayload(nestedPayload(node, Vrsn_2_0)))),
|
|
236
|
+
grant: body,
|
|
237
|
+
admit,
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
/** List historical references, with no current-standing or private-capability claim. */
|
|
241
|
+
inventory() {
|
|
242
|
+
return {
|
|
243
|
+
issued: [...this.db.issued.getTopItemIter()].map(([, row]) => row),
|
|
244
|
+
held: [...this.db.admitted.getTopItemIter()].map(([, row]) => row),
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
/** List distinct explicit disclosure admissions for the same credential. */
|
|
248
|
+
admissions(credential) {
|
|
249
|
+
return [...this.db.credentials.getTopItemIter([credential])].map(([, grant]) => this.db.admitted.get([grant]));
|
|
250
|
+
}
|
|
251
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,44 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keri-ts/wallet",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "2.0.1",
|
|
4
|
+
"description": "Explicit local ACDC credential inventory and admission",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/kentbull/keri-ts.git",
|
|
8
|
+
"directory": "packages/wallet"
|
|
9
|
+
},
|
|
10
|
+
"license": "Apache-2.0",
|
|
11
|
+
"main": "./esm/wallet/npm/src/mod.js",
|
|
12
|
+
"module": "./esm/wallet/npm/src/mod.js",
|
|
13
|
+
"types": "./types/mod.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./types/mod.d.ts",
|
|
17
|
+
"import": "./esm/wallet/npm/src/mod.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"test": "node --version"
|
|
22
|
+
},
|
|
23
|
+
"type": "module",
|
|
24
|
+
"sideEffects": false,
|
|
25
|
+
"files": [
|
|
26
|
+
"esm",
|
|
27
|
+
"types",
|
|
28
|
+
"README.md",
|
|
29
|
+
"LICENSE"
|
|
30
|
+
],
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=20.3"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"cesr-ts": "2.0.0",
|
|
36
|
+
"effection": "^3.6.0",
|
|
37
|
+
"keri-ts": "2.0.1",
|
|
38
|
+
"@deno/shim-deno": "~0.18.0"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@types/node": "^20.9.0"
|
|
42
|
+
},
|
|
43
|
+
"_generatedBy": "dnt@dev"
|
|
44
|
+
}
|
package/types/mod.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Wallet application entrypoint; public protocol owners remain borrowed from keri-ts. */
|
|
2
|
+
export { type AcdcV2UpdateOptions, WalletAuthor } from "./src/authoring.js";
|
|
3
|
+
export { RegistryCustody } from "./src/custody.js";
|
|
4
|
+
export { type DisclosureSelection, exchangeWire, type GrantFileSelection, type InspectedGrantFile, type IssuanceGrantOptions, type PreparedDisclosure, type PreparedGrantBody, WalletDiscloser, } from "./src/disclosing.js";
|
|
5
|
+
export { type AdmittedCredential, createWalletBaser, type IssuedCredential, WalletBaser } from "./src/storing.js";
|
|
6
|
+
export { type HeldCredential, type PreparedAdmit, Wallet, type WalletOptions } from "./src/wallet.js";
|
|
7
|
+
//# sourceMappingURL=mod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,OAAO,EAAE,KAAK,mBAAmB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EACL,KAAK,mBAAmB,EACxB,YAAY,EACZ,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,kBAAkB,EAAE,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAClH,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/** Finite ACDC v2 registry authoring; existing engines own acceptance and receipt authentication. */
|
|
2
|
+
import { type SerderACDC } from "cesr-ts";
|
|
3
|
+
import type { Operation } from "effection";
|
|
4
|
+
import { type AcdcMapOptions, type AcdcV2Regery, type AcdcV2Registry, type Receiptor, type RegistryDisclosure, type WitnessAuthMap } from "keri-ts/runtime";
|
|
5
|
+
import type { RegistryCustody } from "./custody.js";
|
|
6
|
+
import type { Wallet } from "./wallet.js";
|
|
7
|
+
/** Public means deliberate opening publication; private derivation requires supplied custody. */
|
|
8
|
+
export interface AcdcV2UpdateOptions {
|
|
9
|
+
public?: boolean;
|
|
10
|
+
stamp?: string;
|
|
11
|
+
boundEvent?: string;
|
|
12
|
+
/** Transient witness codes for this operation; never retained with registry evidence. */
|
|
13
|
+
auths?: WitnessAuthMap;
|
|
14
|
+
}
|
|
15
|
+
/** Borrow the actual wallet, registry environment and receipt collector; acquire no handles or workers. */
|
|
16
|
+
export declare class WalletAuthor {
|
|
17
|
+
readonly wallet: Wallet;
|
|
18
|
+
readonly rgy: AcdcV2Regery;
|
|
19
|
+
readonly receiptor: Receiptor;
|
|
20
|
+
readonly custody?: RegistryCustody | undefined;
|
|
21
|
+
constructor(wallet: Wallet, rgy: AcdcV2Regery, receiptor: Receiptor, custody?: RegistryCustody | undefined);
|
|
22
|
+
/** Resolve the actual local registry; staging supports groups while signing methods enforce their owner. */
|
|
23
|
+
registry(name: string, controller: string): AcdcV2Registry;
|
|
24
|
+
/** Signing belongs either to this individual owner or to explicit group approval, never a staging flag. */
|
|
25
|
+
private individual;
|
|
26
|
+
/** Idempotently stage an alias, then return only its exact accepted inception. */
|
|
27
|
+
incept(name: string, controller: string, auths?: WitnessAuthMap): Operation<SerderACDC>;
|
|
28
|
+
/** Construct the issuer's credential using the existing ACDC v2 finite builder. */
|
|
29
|
+
create(reg: AcdcV2Registry, options: Omit<AcdcMapOptions, "regid">): SerderACDC;
|
|
30
|
+
/** Stage one BUP state advance, preserving an exact pending retry and its opening. Never author historical upd. */
|
|
31
|
+
stage(reg: AcdcV2Registry, acdc: SerderACDC, state: string, options?: AcdcV2UpdateOptions): {
|
|
32
|
+
event: SerderACDC;
|
|
33
|
+
opening: RegistryDisclosure;
|
|
34
|
+
};
|
|
35
|
+
/** Ensure revocation of retained local issuance; an identical accepted revocation remains an idempotent retry. */
|
|
36
|
+
stageRevocation(reg: AcdcV2Registry, said: string, options?: AcdcV2UpdateOptions): {
|
|
37
|
+
event: SerderACDC;
|
|
38
|
+
opening: RegistryDisclosure;
|
|
39
|
+
};
|
|
40
|
+
/** Share validation and exact pending-next reuse; only the concrete revocation ensure operation can reuse an accepted head. */
|
|
41
|
+
private stageState;
|
|
42
|
+
/** Advance one explicit state through real anchoring; staging is never reported as accepted. */
|
|
43
|
+
update(reg: AcdcV2Registry, acdc: SerderACDC, state: string, options?: AcdcV2UpdateOptions): Operation<SerderACDC>;
|
|
44
|
+
/** Preserve original issued history on retry; inventory follows exact witnessed TEL acceptance. */
|
|
45
|
+
issue(reg: AcdcV2Registry, acdc: SerderACDC, options?: AcdcV2UpdateOptions): Generator<import("effection").Instruction, import("./storing.js").IssuedCredential, any>;
|
|
46
|
+
/** Revoke only locally retained issuance, not an unrelated arbitrary target digest. */
|
|
47
|
+
revoke(reg: AcdcV2Registry, said: string, options?: AcdcV2UpdateOptions): Operation<SerderACDC>;
|
|
48
|
+
/** Reuse the current branch's already signed seal even before receipts; no extra anchor merely to poll. */
|
|
49
|
+
anchor(reg: AcdcV2Registry, event: SerderACDC, auths?: WitnessAuthMap): Operation<void>;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=authoring.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authoring.d.ts","sourceRoot":"","sources":["../../src/src/authoring.ts"],"names":[],"mappings":"AAAA,qGAAqG;AACrG,OAAO,EAA8B,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,cAAc,EAInB,KAAK,SAAS,EACd,KAAK,kBAAkB,EAGvB,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,iGAAiG;AACjG,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,E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F,MAAM,CACL,GAAG,EAAE,cAAc,EACnB,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,mBAAwB,GAChC,SAAS,CAAC,UAAU,CAAC;IAOxB,mGAAmG;IAClG,KAAK,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,GAAE,mBAAwB;IAW/E,uFAAuF;IACtF,MAAM,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,mBAAwB,GAAG,SAAS,CAAC,UAAU,CAAC;IAOpG,2GAA2G;IAC1G,MAAM,CAAC,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC,IAAI,CAAC;CA4BzF"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/** Optional encrypted derivation capability; ordinary wallet inventory never constructs or reads it. */
|
|
2
|
+
import { type SerderACDC } from "cesr-ts";
|
|
3
|
+
import { type RegistryStore } from "keri-ts/db";
|
|
4
|
+
import { type Hab, type Habery, type RegistryDisclosure } from "keri-ts/runtime";
|
|
5
|
+
import type { WalletBaser } from "./storing.js";
|
|
6
|
+
interface DerivedUpdate {
|
|
7
|
+
credential: string;
|
|
8
|
+
state: string;
|
|
9
|
+
bound: {
|
|
10
|
+
bn: string;
|
|
11
|
+
bd: string;
|
|
12
|
+
} | null;
|
|
13
|
+
}
|
|
14
|
+
/** Explicit capability over an existing wallet environment and accepted public registry evidence. */
|
|
15
|
+
export declare class RegistryCustody {
|
|
16
|
+
readonly options: {
|
|
17
|
+
hby: Habery;
|
|
18
|
+
hab: Hab;
|
|
19
|
+
registry: RegistryStore;
|
|
20
|
+
db: WalletBaser;
|
|
21
|
+
};
|
|
22
|
+
private env;
|
|
23
|
+
private derivations?;
|
|
24
|
+
/** Borrow owners only; construction opens no table and loads no encrypted row. */
|
|
25
|
+
constructor(options: {
|
|
26
|
+
hby: Habery;
|
|
27
|
+
hab: Hab;
|
|
28
|
+
registry: RegistryStore;
|
|
29
|
+
db: WalletBaser;
|
|
30
|
+
});
|
|
31
|
+
/** Bind the actual local habitat and its key owners, never an AID label alone. */
|
|
32
|
+
private owner;
|
|
33
|
+
/** Rebind optional tables after the caller reopens the same wallet owner. */
|
|
34
|
+
private tables;
|
|
35
|
+
/** Load only this habitat's Keeper root; possession confers no protocol authority. */
|
|
36
|
+
private load;
|
|
37
|
+
/** Provision an issuer-selected root once, refusing replacement behind opaque accepted history. */
|
|
38
|
+
createCustody(registry: string): {
|
|
39
|
+
registry: string;
|
|
40
|
+
};
|
|
41
|
+
/** Derive a candidate only; consumers still authenticate its exact accepted event and bound KEL reference. */
|
|
42
|
+
derive(registry: string, ordinal: number | bigint, credential: string, state: string, options?: {
|
|
43
|
+
bound?: boolean;
|
|
44
|
+
bsn?: number | bigint;
|
|
45
|
+
bd?: string;
|
|
46
|
+
}): RegistryDisclosure;
|
|
47
|
+
/** Persist exact nonsecret coordinates before processing/anchoring a newly derived BUP. */
|
|
48
|
+
retainDerivedUpdate(event: SerderACDC, opening: RegistryDisclosure): DerivedUpdate;
|
|
49
|
+
/** Reproduce only the exact accepted event, never today's head or a later credential's coordinates. */
|
|
50
|
+
derivedOpening(event: SerderACDC): RegistryDisclosure;
|
|
51
|
+
}
|
|
52
|
+
export {};
|
|
53
|
+
//# sourceMappingURL=custody.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custody.d.ts","sourceRoot":"","sources":["../../src/src/custody.ts"],"names":[],"mappings":"AAAA,wGAAwG;AACxG,OAAO,EAA8D,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AACtG,OAAO,EAAS,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,MAAM,EAAa,KAAK,kBAAkB,EAA6B,MAAM,iBAAiB,CAAC;AACvH,OAAO,KAAK,EA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AAkB,GAAG,aAAa;IAiBlF,uGAAuG;IACvG,cAAc,CAAC,KAAK,EAAE,UAAU,GAAG,kBAAkB;CAwBtD"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/** Finite ACDC v2 IPEX composition over exact wallet views and explicitly supplied private capability. */
|
|
2
|
+
import { type CesrFrame, SealSource, SerderACDC, SerderKERI, type Versionage } from "cesr-ts";
|
|
3
|
+
import { type Operation } from "effection";
|
|
4
|
+
import { type AcdcV2Registry, type Hab, type IpexV2BodyOptions, type Receiptor, type RegistryDisclosure, type WitnessAuthMap } from "keri-ts/runtime";
|
|
5
|
+
import type { RegistryCustody } from "./custody.js";
|
|
6
|
+
import type { Wallet } from "./wallet.js";
|
|
7
|
+
/** A prepared signed exchange and its supporting public KEL/TEL bytes; delivery and intake stay explicit. */
|
|
8
|
+
export interface PreparedDisclosure {
|
|
9
|
+
exn: SerderKERI;
|
|
10
|
+
wire: Uint8Array;
|
|
11
|
+
support: Uint8Array;
|
|
12
|
+
}
|
|
13
|
+
/** Frozen unsigned Grant and its exact selected nodes; group approval and presentation anchoring remain explicit. */
|
|
14
|
+
export interface PreparedGrantBody {
|
|
15
|
+
exn: SerderKERI;
|
|
16
|
+
raw: Uint8Array;
|
|
17
|
+
nests: Uint8Array;
|
|
18
|
+
}
|
|
19
|
+
/** Exact parties reviewed by the operator before adding independent issuer authentication. */
|
|
20
|
+
export interface GrantFileSelection {
|
|
21
|
+
said: string;
|
|
22
|
+
sender: string;
|
|
23
|
+
recipient: string;
|
|
24
|
+
}
|
|
25
|
+
/** Valid individual factors may remain below their ordinary signing threshold. */
|
|
26
|
+
export interface InspectedGrantFile {
|
|
27
|
+
frame: CesrFrame;
|
|
28
|
+
completeSigners: string[];
|
|
29
|
+
partialSigners: string[];
|
|
30
|
+
}
|
|
31
|
+
/** Fresh origin and explicit far-node proofs; preparation grants neither DH nor inventory consent. */
|
|
32
|
+
export interface IssuanceGrantOptions extends Omit<IpexV2BodyOptions, "prior"> {
|
|
33
|
+
recipient: string;
|
|
34
|
+
priorSaid?: string;
|
|
35
|
+
artifacts?: readonly Uint8Array[];
|
|
36
|
+
}
|
|
37
|
+
/** Select an exact issued credential or a retained Grant, never the fullest cached credential. */
|
|
38
|
+
export interface DisclosureSelection {
|
|
39
|
+
said?: string;
|
|
40
|
+
fromGrant?: string;
|
|
41
|
+
/** Exact transferred credential/proof bytes; explicit presenter authorization creates no inventory consent. */
|
|
42
|
+
transferred?: Uint8Array;
|
|
43
|
+
presenterAuthorized?: boolean;
|
|
44
|
+
disclose?: readonly string[];
|
|
45
|
+
refresh?: boolean;
|
|
46
|
+
openings?: readonly RegistryDisclosure[];
|
|
47
|
+
derive?: boolean;
|
|
48
|
+
artifacts?: readonly Uint8Array[];
|
|
49
|
+
}
|
|
50
|
+
/** Reuse a matching accepted KEL seal, or author once and gather real witness receipts. */
|
|
51
|
+
export declare function anchorExchange(wallet: Wallet, receiptor: Receiptor, hab: Hab, body: SerderKERI | SerderACDC, auths?: WitnessAuthMap): Operation<SealSource>;
|
|
52
|
+
/** Encode one frozen body and its existing prepared nests; source proofs do not alter its SAID. */
|
|
53
|
+
export declare function exchangeWire(hab: Hab, exn: SerderKERI, nested?: Uint8Array, source?: SealSource, gvrsn?: Versionage): Uint8Array;
|
|
54
|
+
/** Borrow concrete owners only. No constructor opens a store, starts a worker or loads registry secrets. */
|
|
55
|
+
export declare class WalletDiscloser {
|
|
56
|
+
readonly wallet: Wallet;
|
|
57
|
+
readonly receiptor: Receiptor;
|
|
58
|
+
readonly custody?: RegistryCustody | undefined;
|
|
59
|
+
constructor(wallet: Wallet, receiptor: Receiptor, custody?: RegistryCustody | undefined);
|
|
60
|
+
/** Resolve only a local individual signer; group approval composes this body in the group workflow. */
|
|
61
|
+
private signer;
|
|
62
|
+
/** Revalidate exact accepted prior bytes without treating notification or salt possession as acceptance. */
|
|
63
|
+
private prior;
|
|
64
|
+
/** Reduce only the selected attribute view using the existing commitment-preserving Compactor. */
|
|
65
|
+
private partial;
|
|
66
|
+
/** Authenticate every selected node, then authorize only the shared complete-root expression. */
|
|
67
|
+
private requireGraph;
|
|
68
|
+
/** Recover a candidate using an explicitly possessed UUID; this neither derives a salt nor grants authority. */
|
|
69
|
+
unblind(opening: RegistryDisclosure, credential: string, states: readonly string[], bounds?: readonly (readonly [number | bigint, string])[]): RegistryDisclosure | null;
|
|
70
|
+
/** Attach exact accepted issuer openings from head through vacuous suffix to this credential's binding. */
|
|
71
|
+
registryProof(credential: SerderACDC, registry: string, retained?: readonly RegistryDisclosure[], options?: Pick<DisclosureSelection, "derive">): Uint8Array;
|
|
72
|
+
/** Select immutable admitted/transferred nests; proof refresh changes attachments only when explicitly requested. */
|
|
73
|
+
private selected;
|
|
74
|
+
/** Create an application request; no credential-use approval is invented for negotiation. */
|
|
75
|
+
prepareApply(sender: string, options: IpexV2BodyOptions): Operation<PreparedDisclosure>;
|
|
76
|
+
/** Offer only the selected commitment/view without issuer proof attachments. */
|
|
77
|
+
prepareOffer(sender: string, selection: DisclosureSelection, options: IpexV2BodyOptions & {
|
|
78
|
+
priorSaid?: string;
|
|
79
|
+
}): Operation<PreparedDisclosure>;
|
|
80
|
+
/** Accept or decline the exact authenticated predecessor and its negotiated anchoring choice. */
|
|
81
|
+
prepareReply(sender: string, verb: "agree" | "spurn", priorSaid: string, message?: string, recipient?: string, auths?: WitnessAuthMap): Operation<PreparedDisclosure>;
|
|
82
|
+
/** Select and authorize once before freezing a Grant body, without signing or committing group approval. */
|
|
83
|
+
prepareGrantBody(sender: string, selection: DisclosureSelection, options: IpexV2BodyOptions & {
|
|
84
|
+
priorSaid?: string;
|
|
85
|
+
}): Operation<PreparedGrantBody>;
|
|
86
|
+
/** Freeze an endorsement file from issued evidence, allowing only retryable current-opening absence. */
|
|
87
|
+
prepareGrantFileBody(sender: string, selection: DisclosureSelection, options: IpexV2BodyOptions & {
|
|
88
|
+
priorSaid?: string;
|
|
89
|
+
}): Operation<PreparedGrantBody>;
|
|
90
|
+
/** Both public preparation profiles preserve the same selected view and body construction. */
|
|
91
|
+
private grantBody;
|
|
92
|
+
/** Inspect one exact unanchored Grant without dropping invalid signatures or publishing any evidence. */
|
|
93
|
+
inspectGrantFile(raw: Uint8Array, selection?: GrantFileSelection): InspectedGrantFile;
|
|
94
|
+
/** Prepare one fresh issuer origin with explicit authenticated far nodes, without changing disclosure authority. */
|
|
95
|
+
prepareIssuanceGrantBody(sender: string, credential: SerderACDC, options: IssuanceGrantOptions): Operation<PreparedGrantBody>;
|
|
96
|
+
/** Extend the frozen Grant's exact origin proof; ordinary intake still authenticates the supplied presentation evidence. */
|
|
97
|
+
attachPresentationProof(prepared: PreparedGrantBody, opening: RegistryDisclosure, source: SealSource): Operation<PreparedGrantBody>;
|
|
98
|
+
/** Authenticate and authorize the selected graph before the Grant builder and after receipt waits. */
|
|
99
|
+
prepareGrant(sender: string, selection: DisclosureSelection, options: IpexV2BodyOptions & {
|
|
100
|
+
priorSaid?: string;
|
|
101
|
+
presentation?: AcdcV2Registry;
|
|
102
|
+
auths?: WitnessAuthMap;
|
|
103
|
+
}): Operation<PreparedDisclosure>;
|
|
104
|
+
/** Carry selected public evidence and root-first delegation ancestry; receiver intake still verifies every approval. */
|
|
105
|
+
proofSupport(raw: Uint8Array, hab: Hab): Uint8Array;
|
|
106
|
+
/** Public replay includes actual stored witness receipts; it grants no new consent. */
|
|
107
|
+
kel(hab: Hab): Uint8Array;
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=disclosing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disclosing.d.ts","sourceRoot":"","sources":["../../src/src/disclosing.ts"],"names":[],"mappings":"AAAA,0GAA0G;AAC1G,OAAO,EACL,KAAK,SAAS,EAWd,UAAU,EACV,UAAU,EACV,UAAU,EAGV,KAAK,UAAU,EAEhB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAEjD,OAAO,EAGL,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