keri-ts 2.2.0 → 2.2.2
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/esm/keri/npm/src/_dnt.polyfills.js +1 -127
- package/esm/keri/npm/src/acdc/custody.js +23 -0
- package/esm/keri/npm/src/acdc/dhking.js +6 -1
- package/esm/keri/npm/src/acdc/salting.js +18 -0
- package/esm/keri/npm/src/acdc/scheming.js +31 -18
- package/esm/keri/npm/src/acdc/unblinding.js +112 -6
- package/esm/keri/npm/src/app/delivery/forwarding.js +9 -0
- package/esm/keri/npm/src/app/delivery/respondant.js +21 -0
- package/esm/keri/npm/src/app/identity/habbing.js +4 -1
- package/esm/keri/npm/src/app/identity/keeping.js +38 -1
- package/esm/keri/npm/src/app/ipex/group-ipex.js +14 -0
- package/esm/keri/npm/src/app/ipex/group-issuance.js +15 -9
- package/esm/keri/npm/src/app/ipex/ipex-building.js +2 -1
- package/esm/keri/npm/src/app/ipex/ipex-discloser.js +32 -8
- package/esm/keri/npm/src/app/ipex/ipex-grouping.js +16 -8
- package/esm/keri/npm/src/app/ipex/ipex-node-authentication.js +42 -18
- package/esm/keri/npm/src/app/ipex/issuance.js +136 -40
- package/esm/keri/npm/src/app/ipex/pending-presentations.js +50 -0
- package/esm/keri/npm/src/app/ipex/presenting.js +44 -2
- package/esm/keri/npm/src/app/ipex/unblinding-workflow.js +141 -30
- package/esm/keri/npm/src/app/mailbox/mailbox-poller.js +37 -9
- package/esm/keri/npm/src/app/mailbox/mailboxing.js +9 -3
- package/esm/keri/npm/src/app/multisig/counseling.js +83 -4
- package/esm/keri/npm/src/app/multisig/event-forwarding.js +27 -0
- package/esm/keri/npm/src/app/multisig/grouping.js +120 -1
- package/esm/keri/npm/src/app/multisig/multisig-messaging.js +33 -6
- package/esm/keri/npm/src/app/multisig/multisig-workflows.js +5 -9
- package/esm/keri/npm/src/app/multisig/proposals.js +1 -1
- package/esm/keri/npm/src/app/runtime/agent-runtime.js +43 -23
- package/esm/keri/npm/src/app/runtime/ipex-auxiliaries.js +59 -25
- package/esm/keri/npm/src/app/runtime/operation-owners.js +1 -0
- package/esm/keri/npm/src/app/runtime/signer-conditions.js +51 -0
- package/esm/keri/npm/src/app/transport/cesr-egress.js +6 -0
- package/esm/keri/npm/src/cli/credentials/ipex.js +7 -1
- package/esm/keri/npm/src/cli/messaging/group-join.js +7 -3
- package/esm/keri/npm/src/cli/messaging/multisig.js +37 -11
- package/esm/keri/npm/src/core/errors.js +91 -3
- package/esm/keri/npm/src/core/json-schema-meta.js +688 -0
- package/esm/keri/npm/src/core/json-schema.js +147 -0
- package/esm/keri/npm/src/core/kel/eventing.js +20 -2
- package/esm/keri/npm/src/core/scheming.js +27 -26
- package/esm/keri/npm/src/db/replay/tel-replay.js +6 -0
- package/esm/keri/npm/src/db/store-lock.js +12 -0
- package/esm/keri/npm/src/runtime/index.js +9 -8
- package/esm/keri/npm/src/runtime/web/output-barrier.js +9 -0
- package/esm/keri/npm/src/version.js +2 -2
- package/package.json +2 -2
- package/types/_dnt.polyfills.d.ts +0 -99
- package/types/_dnt.polyfills.d.ts.map +1 -1
- package/types/acdc/custody.d.ts +7 -0
- package/types/acdc/custody.d.ts.map +1 -1
- package/types/acdc/dhking.d.ts.map +1 -1
- package/types/acdc/salting.d.ts +2 -0
- package/types/acdc/salting.d.ts.map +1 -1
- package/types/acdc/scheming.d.ts +2 -0
- package/types/acdc/scheming.d.ts.map +1 -1
- package/types/acdc/unblinding.d.ts +16 -5
- package/types/acdc/unblinding.d.ts.map +1 -1
- package/types/app/delivery/forwarding.d.ts +1 -0
- package/types/app/delivery/forwarding.d.ts.map +1 -1
- package/types/app/delivery/respondant.d.ts +7 -0
- package/types/app/delivery/respondant.d.ts.map +1 -1
- package/types/app/identity/habbing.d.ts +10 -1
- package/types/app/identity/habbing.d.ts.map +1 -1
- package/types/app/identity/keeping.d.ts +18 -0
- package/types/app/identity/keeping.d.ts.map +1 -1
- package/types/app/ipex/group-ipex.d.ts +7 -0
- package/types/app/ipex/group-ipex.d.ts.map +1 -1
- package/types/app/ipex/group-issuance.d.ts +1 -1
- package/types/app/ipex/group-issuance.d.ts.map +1 -1
- package/types/app/ipex/ipex-building.d.ts.map +1 -1
- package/types/app/ipex/ipex-discloser.d.ts +31 -19
- package/types/app/ipex/ipex-discloser.d.ts.map +1 -1
- package/types/app/ipex/ipex-grouping.d.ts.map +1 -1
- package/types/app/ipex/ipex-node-authentication.d.ts +9 -1
- package/types/app/ipex/ipex-node-authentication.d.ts.map +1 -1
- package/types/app/ipex/issuance.d.ts +41 -8
- package/types/app/ipex/issuance.d.ts.map +1 -1
- package/types/app/ipex/pending-presentations.d.ts +62 -1
- package/types/app/ipex/pending-presentations.d.ts.map +1 -1
- package/types/app/ipex/presenting.d.ts +41 -4
- package/types/app/ipex/presenting.d.ts.map +1 -1
- package/types/app/ipex/unblinding-workflow.d.ts +46 -10
- package/types/app/ipex/unblinding-workflow.d.ts.map +1 -1
- package/types/app/mailbox/mailbox-poller.d.ts +11 -2
- package/types/app/mailbox/mailbox-poller.d.ts.map +1 -1
- package/types/app/mailbox/mailboxing.d.ts +4 -1
- package/types/app/mailbox/mailboxing.d.ts.map +1 -1
- package/types/app/multisig/counseling.d.ts +22 -1
- package/types/app/multisig/counseling.d.ts.map +1 -1
- package/types/app/multisig/event-forwarding.d.ts +6 -0
- package/types/app/multisig/event-forwarding.d.ts.map +1 -0
- package/types/app/multisig/grouping.d.ts +26 -0
- package/types/app/multisig/grouping.d.ts.map +1 -1
- package/types/app/multisig/multisig-messaging.d.ts +23 -6
- package/types/app/multisig/multisig-messaging.d.ts.map +1 -1
- package/types/app/multisig/multisig-workflows.d.ts.map +1 -1
- package/types/app/multisig/proposals.d.ts +3 -2
- package/types/app/multisig/proposals.d.ts.map +1 -1
- package/types/app/multisig/proposing.d.ts +8 -1
- package/types/app/multisig/proposing.d.ts.map +1 -1
- package/types/app/runtime/agent-runtime.d.ts +3 -0
- package/types/app/runtime/agent-runtime.d.ts.map +1 -1
- package/types/app/runtime/ipex-auxiliaries.d.ts +8 -3
- package/types/app/runtime/ipex-auxiliaries.d.ts.map +1 -1
- package/types/app/runtime/operation-owners.d.ts.map +1 -1
- package/types/app/runtime/signer-conditions.d.ts +32 -0
- package/types/app/runtime/signer-conditions.d.ts.map +1 -0
- package/types/app/transport/cesr-egress.d.ts +1 -0
- package/types/app/transport/cesr-egress.d.ts.map +1 -1
- package/types/cli/credentials/ipex.d.ts.map +1 -1
- package/types/cli/messaging/group-join.d.ts +4 -1
- package/types/cli/messaging/group-join.d.ts.map +1 -1
- package/types/cli/messaging/multisig.d.ts +1 -0
- package/types/cli/messaging/multisig.d.ts.map +1 -1
- package/types/core/errors.d.ts +20 -1
- package/types/core/errors.d.ts.map +1 -1
- package/types/core/json-schema-meta.d.ts +19 -0
- package/types/core/json-schema-meta.d.ts.map +1 -0
- package/types/core/json-schema.d.ts +29 -0
- package/types/core/json-schema.d.ts.map +1 -0
- package/types/core/scheming.d.ts +1 -0
- package/types/core/scheming.d.ts.map +1 -1
- package/types/db/replay/tel-replay.d.ts +1 -0
- package/types/db/replay/tel-replay.d.ts.map +1 -1
- package/types/db/store-lock.d.ts +2 -0
- package/types/db/store-lock.d.ts.map +1 -1
- package/types/runtime/index.d.ts +12 -11
- package/types/runtime/index.d.ts.map +1 -1
- package/types/runtime/web/output-barrier.d.ts +1 -0
- package/types/runtime/web/output-barrier.d.ts.map +1 -1
- package/types/version.d.ts +2 -2
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Join approves exactly one stored proposal, the first the user consents to:
|
|
5
5
|
* - an explicit `--said` names the proposal, otherwise the unapproved proposals
|
|
6
|
-
* the notice store announces are offered in notice order;
|
|
6
|
+
* the notice store announces are offered in notice order; `--kind` restricts the
|
|
7
|
+
* offer (and a `--said`) to one proposal kind, so a join never signs another kind;
|
|
7
8
|
* - without `--auto` every offered proposal is shown and approved only on a yes;
|
|
8
9
|
* - with `--auto` the first offered proposal is approved without a prompt. This is
|
|
9
10
|
* the whole of auto consent: it exists only inside the `join` the user ran for
|
|
@@ -19,17 +20,20 @@ function joinedGroup(hby, group) {
|
|
|
19
20
|
return group === undefined ? undefined : (hby.habByName(group) ?? hby.habs.get(group))?.pre ?? undefined;
|
|
20
21
|
}
|
|
21
22
|
/** Candidates for one pass, oldest first. */
|
|
22
|
-
function candidates(deps, { said, group }) {
|
|
23
|
+
function candidates(deps, { said, group, kind }) {
|
|
23
24
|
const wanted = joinedGroup(deps.hby, group);
|
|
24
25
|
if (said !== undefined) {
|
|
25
26
|
const proposal = findGroupProposal(deps, said);
|
|
27
|
+
if (proposal && kind !== undefined && proposal.kind !== kind) {
|
|
28
|
+
throw new ValidationError(`Multisig exchange ${said} is a ${proposal.kind} proposal, not ${kind}.`);
|
|
29
|
+
}
|
|
26
30
|
if (proposal && wanted !== undefined && proposal.group !== wanted) {
|
|
27
31
|
throw new ValidationError(`Multisig exchange ${said} belongs to group ${proposal.group}, not ${wanted}.`);
|
|
28
32
|
}
|
|
29
33
|
return proposal ? [proposal] : [];
|
|
30
34
|
}
|
|
31
35
|
return listGroupProposals(deps, wanted === undefined ? {} : { group: wanted })
|
|
32
|
-
.filter(proposal => proposal.local === "unapproved");
|
|
36
|
+
.filter(proposal => proposal.local === "unapproved" && (kind === undefined || proposal.kind === kind));
|
|
33
37
|
}
|
|
34
38
|
/**
|
|
35
39
|
* Approve the first proposal the user consents to, polling stored proposals until
|
|
@@ -32,12 +32,32 @@ import { rootCopyLine } from "./root-copy-lines.js";
|
|
|
32
32
|
* rekeyed, as KERIpy `kli multisig rotate|join`. Runs while the command's
|
|
33
33
|
* runtime worker delivers; every outcome is returned, none fails the rotation.
|
|
34
34
|
*/
|
|
35
|
-
function* resealAfterRotation(hby, runtime, group, rotation) {
|
|
36
|
-
const replicating = runtime.rootReplicator;
|
|
37
|
-
if (!hby.habs.get(group) || !replicating)
|
|
35
|
+
function* resealAfterRotation(hby, runtime, group, rotation, since) {
|
|
36
|
+
const replicating = runtime.rootReplicator, root = runtime.registryRoot;
|
|
37
|
+
if (!hby.habs.get(group) || !replicating || !root)
|
|
38
38
|
return [];
|
|
39
39
|
replicating.prompt(group);
|
|
40
|
-
|
|
40
|
+
const results = yield* replicating.processOnce();
|
|
41
|
+
const lines = results.map(rootCopyLine);
|
|
42
|
+
// The runtime's loop may have sent a copy since the rotation cue prompted it, before this pass: such a copy reads
|
|
43
|
+
// from the sent marker as transmitted, so the report does not depend on which of the two sent first.
|
|
44
|
+
const attempted = new Set(results.filter(result => result.group === group).map(result => `${result.registry}/${result.recipient}`));
|
|
45
|
+
const sender = localGroupMember(hby, group).pre, from = new Date(since).toISOString();
|
|
46
|
+
for (const [[, registry, recipient], marker] of [...hby.db.rrsn.getTopItemIter([group])]) {
|
|
47
|
+
if (attempted.has(`${registry}/${recipient}`) || marker.dt < from)
|
|
48
|
+
continue;
|
|
49
|
+
if (marker.key !== root.contributor(group, recipient))
|
|
50
|
+
continue;
|
|
51
|
+
lines.push({
|
|
52
|
+
phase: "root_copy",
|
|
53
|
+
gid: group,
|
|
54
|
+
registry: registry,
|
|
55
|
+
sender,
|
|
56
|
+
recipient: recipient,
|
|
57
|
+
transmitted: true,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
return lines;
|
|
41
61
|
}
|
|
42
62
|
function requireText(value, label) {
|
|
43
63
|
if (!value) {
|
|
@@ -122,15 +142,18 @@ export function* multisigJoinCommand(args) {
|
|
|
122
142
|
auto: parseBooleanOption(args.auto, "auto"),
|
|
123
143
|
registryName: parseStringOption(args.registryName, "registryName"),
|
|
124
144
|
said: parseStringOption(args.said, "said"),
|
|
145
|
+
kind: parseStringOption(args.kind, "kind"),
|
|
125
146
|
approvalTimeoutSeconds: nonNegativeNumber(args.approvalTimeoutSeconds, 60, "approval timeout seconds"),
|
|
126
147
|
proxy: parseStringOption(args.proxy, "proxy"),
|
|
127
148
|
};
|
|
128
149
|
const name = requireText(commandArgs.name, "Name");
|
|
129
150
|
return yield* withMultisigRuntime(commandArgs, name, function* ({ hby, runtime }) {
|
|
151
|
+
const since = runtime.clock.now();
|
|
130
152
|
const deadline = approvalDeadline(commandArgs);
|
|
131
153
|
const joined = yield* joinProposal(approvalDeps(hby, runtime), {
|
|
132
154
|
group: commandArgs.group,
|
|
133
155
|
said: commandArgs.said,
|
|
156
|
+
kind: commandArgs.kind,
|
|
134
157
|
deadline,
|
|
135
158
|
confirm: proposal => approvePrompt(commandArgs, proposal),
|
|
136
159
|
groupAlias: proposal => chooseGroupAlias(hby, commandArgs, proposal.group),
|
|
@@ -138,7 +161,7 @@ export function* multisigJoinCommand(args) {
|
|
|
138
161
|
inputs: () => ({ fallbackAfterMs: 0 }),
|
|
139
162
|
});
|
|
140
163
|
if (!joined) {
|
|
141
|
-
const local = yield* completeLocalGroupEvent(hby, runtime, commandArgs, deadline);
|
|
164
|
+
const local = yield* completeLocalGroupEvent(hby, runtime, commandArgs, deadline, since);
|
|
142
165
|
if (!local) {
|
|
143
166
|
throw new ValidationError("No matching stored multisig proposal was available to join.");
|
|
144
167
|
}
|
|
@@ -168,7 +191,7 @@ export function* multisigJoinCommand(args) {
|
|
|
168
191
|
return result;
|
|
169
192
|
// No scheduling point separates the approval from here, so the Counselor has not yet used its defaults.
|
|
170
193
|
supplyDelegationProxy(hby, runtime, event, commandArgs.proxy);
|
|
171
|
-
return yield* finishJoinedEvent(hby, runtime, result, event, commandArgs);
|
|
194
|
+
return yield* finishJoinedEvent(hby, runtime, result, event, commandArgs, since);
|
|
172
195
|
});
|
|
173
196
|
}
|
|
174
197
|
/** Create or begin one group interaction event. */
|
|
@@ -232,6 +255,7 @@ export function* multisigRotateCommand(args) {
|
|
|
232
255
|
const group = requireText(commandArgs.group ?? commandArgs.alias, "Group");
|
|
233
256
|
const options = mergeRotateOptions(commandArgs);
|
|
234
257
|
return yield* withMultisigRuntime(commandArgs, name, function* ({ hby, runtime }) {
|
|
258
|
+
const since = runtime.clock.now();
|
|
235
259
|
const groupHab = requireGroupHab(hby, group);
|
|
236
260
|
const sent = yield* proposeGroupRotation(proposeDeps(hby, runtime), groupHab, {
|
|
237
261
|
smids: commandArgs.smids,
|
|
@@ -251,7 +275,7 @@ export function* multisigRotateCommand(args) {
|
|
|
251
275
|
// The proposer's own acceptance must commit the rotated membership as a joiner's does.
|
|
252
276
|
settleProposedRotation({ hby }, sent);
|
|
253
277
|
delegationPhase = yield* finishAcceptedEvent(hby, runtime, sent.event, commandArgs);
|
|
254
|
-
rootCopies = yield* resealAfterRotation(hby, runtime, sent.group, sent.event.said);
|
|
278
|
+
rootCopies = yield* resealAfterRotation(hby, runtime, sent.group, sent.event.said, since);
|
|
255
279
|
}
|
|
256
280
|
return { ...groupEventResult(hby, sent, accepted), delegationPhase, rootCopies };
|
|
257
281
|
});
|
|
@@ -371,6 +395,7 @@ function groupEventResult(hby, sent, accepted) {
|
|
|
371
395
|
accepted,
|
|
372
396
|
messages: sent.messages,
|
|
373
397
|
deliveries: sent.deliveries,
|
|
398
|
+
members: sent.members,
|
|
374
399
|
state: hby.db.getState(sent.group),
|
|
375
400
|
delegationPhase: null,
|
|
376
401
|
};
|
|
@@ -380,16 +405,16 @@ function groupEventResult(hby, sent, accepted) {
|
|
|
380
405
|
* members; finish its receipts and delegation. One that still needs other members
|
|
381
406
|
* returns at once and stays counseled in the store.
|
|
382
407
|
*/
|
|
383
|
-
function* finishJoinedEvent(hby, runtime, result, event, args) {
|
|
408
|
+
function* finishJoinedEvent(hby, runtime, result, event, args, since) {
|
|
384
409
|
if (!result.accepted)
|
|
385
410
|
return result;
|
|
386
411
|
yield* finishAcceptedEvent(hby, runtime, event, args);
|
|
387
412
|
if (result.route !== MULTISIG_ROT_ROUTE)
|
|
388
413
|
return result;
|
|
389
|
-
return { ...result, rootCopies: yield* resealAfterRotation(hby, runtime, result.group, result.embedded) };
|
|
414
|
+
return { ...result, rootCopies: yield* resealAfterRotation(hby, runtime, result.group, result.embedded, since) };
|
|
390
415
|
}
|
|
391
416
|
/** Resume a locally authored group event named by `--group` when no proposal was left to join. */
|
|
392
|
-
function* completeLocalGroupEvent(hby, runtime, args, deadline) {
|
|
417
|
+
function* completeLocalGroupEvent(hby, runtime, args, deadline, since) {
|
|
393
418
|
if (!args.group || args.said)
|
|
394
419
|
return null;
|
|
395
420
|
const groupHab = hby.habByName(args.group) ?? hby.habs.get(args.group);
|
|
@@ -411,8 +436,9 @@ function* completeLocalGroupEvent(hby, runtime, args, deadline) {
|
|
|
411
436
|
accepted,
|
|
412
437
|
deliveries: [],
|
|
413
438
|
messages: [],
|
|
439
|
+
members: [],
|
|
414
440
|
};
|
|
415
|
-
return yield* finishJoinedEvent(hby, runtime, result, event, args);
|
|
441
|
+
return yield* finishJoinedEvent(hby, runtime, result, event, args, since);
|
|
416
442
|
}
|
|
417
443
|
function chooseRegistryName(args, regk) {
|
|
418
444
|
if (args.registryName) {
|
|
@@ -6,29 +6,117 @@
|
|
|
6
6
|
* opaque; domain processing never inspects them for instructions.
|
|
7
7
|
*/
|
|
8
8
|
export class AppError extends Error {
|
|
9
|
-
constructor(
|
|
10
|
-
super(
|
|
11
|
-
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
/**
|
|
12
|
+
* Every class names itself with a literal. `new.target.name` and `constructor.name` are not used: they are
|
|
13
|
+
* mangled by a minifier, and the dnt transform of `new.target` needs a polyfill the browser entries do not load.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(this, "name", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
configurable: true,
|
|
18
|
+
writable: true,
|
|
19
|
+
value: "AppError"
|
|
20
|
+
});
|
|
12
21
|
}
|
|
13
22
|
}
|
|
14
23
|
/** Invalid caller input or state transition at an application boundary. */
|
|
15
24
|
export class ValidationError extends AppError {
|
|
25
|
+
constructor() {
|
|
26
|
+
super(...arguments);
|
|
27
|
+
Object.defineProperty(this, "name", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
configurable: true,
|
|
30
|
+
writable: true,
|
|
31
|
+
value: "ValidationError"
|
|
32
|
+
});
|
|
33
|
+
}
|
|
16
34
|
}
|
|
17
35
|
/** Filesystem or path-resolution failure from path-managed resources. */
|
|
18
36
|
export class PathError extends AppError {
|
|
37
|
+
constructor() {
|
|
38
|
+
super(...arguments);
|
|
39
|
+
Object.defineProperty(this, "name", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
configurable: true,
|
|
42
|
+
writable: true,
|
|
43
|
+
value: "PathError"
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* An Unblind was asked of a presentation whose exchange already has its terminal response (an Admit or a Spurn). The
|
|
49
|
+
* discloser consented to answer queries about a live presentation; the response ends that authority, so the
|
|
50
|
+
* Unblind must be requested before the response is made.
|
|
51
|
+
*/
|
|
52
|
+
export class PresentationClosedError extends ValidationError {
|
|
53
|
+
constructor() {
|
|
54
|
+
super(...arguments);
|
|
55
|
+
Object.defineProperty(this, "name", {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
configurable: true,
|
|
58
|
+
writable: true,
|
|
59
|
+
value: "PresentationClosedError"
|
|
60
|
+
});
|
|
61
|
+
}
|
|
19
62
|
}
|
|
20
63
|
/** Rejected path name because it violates relative-name constraints. */
|
|
21
64
|
export class InvalidPathNameError extends ValidationError {
|
|
65
|
+
constructor() {
|
|
66
|
+
super(...arguments);
|
|
67
|
+
Object.defineProperty(this, "name", {
|
|
68
|
+
enumerable: true,
|
|
69
|
+
configurable: true,
|
|
70
|
+
writable: true,
|
|
71
|
+
value: "InvalidPathNameError"
|
|
72
|
+
});
|
|
73
|
+
}
|
|
22
74
|
}
|
|
23
75
|
/** Base error for LMDB or higher-level database operations. */
|
|
24
76
|
export class DatabaseError extends AppError {
|
|
77
|
+
constructor() {
|
|
78
|
+
super(...arguments);
|
|
79
|
+
Object.defineProperty(this, "name", {
|
|
80
|
+
enumerable: true,
|
|
81
|
+
configurable: true,
|
|
82
|
+
writable: true,
|
|
83
|
+
value: "DatabaseError"
|
|
84
|
+
});
|
|
85
|
+
}
|
|
25
86
|
}
|
|
26
87
|
/** Database-dependent operation attempted before the resource was opened. */
|
|
27
88
|
export class DatabaseNotOpenError extends DatabaseError {
|
|
89
|
+
constructor() {
|
|
90
|
+
super(...arguments);
|
|
91
|
+
Object.defineProperty(this, "name", {
|
|
92
|
+
enumerable: true,
|
|
93
|
+
configurable: true,
|
|
94
|
+
writable: true,
|
|
95
|
+
value: "DatabaseNotOpenError"
|
|
96
|
+
});
|
|
97
|
+
}
|
|
28
98
|
}
|
|
29
99
|
/** Key encoding/shape failure while reading or writing database state. */
|
|
30
100
|
export class DatabaseKeyError extends DatabaseError {
|
|
101
|
+
constructor() {
|
|
102
|
+
super(...arguments);
|
|
103
|
+
Object.defineProperty(this, "name", {
|
|
104
|
+
enumerable: true,
|
|
105
|
+
configurable: true,
|
|
106
|
+
writable: true,
|
|
107
|
+
value: "DatabaseKeyError"
|
|
108
|
+
});
|
|
109
|
+
}
|
|
31
110
|
}
|
|
32
111
|
/** Operational LMDB/path failure during a database lifecycle step. */
|
|
33
112
|
export class DatabaseOperationError extends DatabaseError {
|
|
113
|
+
constructor() {
|
|
114
|
+
super(...arguments);
|
|
115
|
+
Object.defineProperty(this, "name", {
|
|
116
|
+
enumerable: true,
|
|
117
|
+
configurable: true,
|
|
118
|
+
writable: true,
|
|
119
|
+
value: "DatabaseOperationError"
|
|
120
|
+
});
|
|
121
|
+
}
|
|
34
122
|
}
|