@interop/was-client 0.29.2 → 0.31.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 +29 -0
- package/dist/edv/EdvCodec.d.ts.map +1 -1
- package/dist/edv/EdvCodec.js +11 -3
- package/dist/edv/EdvCodec.js.map +1 -1
- package/dist/edv/epochKeys.d.ts.map +1 -1
- package/dist/edv/epochKeys.js +13 -7
- package/dist/edv/epochKeys.js.map +1 -1
- package/dist/edv/epochMac.d.ts +1 -24
- package/dist/edv/epochMac.d.ts.map +1 -1
- package/dist/edv/epochMac.js +10 -24
- package/dist/edv/epochMac.js.map +1 -1
- package/dist/edv/index.d.ts +1 -2
- package/dist/edv/index.d.ts.map +1 -1
- package/dist/edv/index.js +1 -1
- package/dist/edv/index.js.map +1 -1
- package/dist/edv/recipients.d.ts +4 -21
- package/dist/edv/recipients.d.ts.map +1 -1
- package/dist/edv/recipients.js +18 -56
- package/dist/edv/recipients.js.map +1 -1
- package/dist/errors.d.ts +10 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +10 -0
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/log/index.d.ts +25 -0
- package/dist/log/index.d.ts.map +1 -0
- package/dist/log/index.js +23 -0
- package/dist/log/index.js.map +1 -0
- package/dist/log/jsonl.d.ts +49 -0
- package/dist/log/jsonl.d.ts.map +1 -0
- package/dist/log/jsonl.js +60 -0
- package/dist/log/jsonl.js.map +1 -0
- package/dist/log/logStore.d.ts +95 -0
- package/dist/log/logStore.d.ts.map +1 -0
- package/dist/log/logStore.js +123 -0
- package/dist/log/logStore.js.map +1 -0
- package/dist/log/projection.d.ts +43 -0
- package/dist/log/projection.d.ts.map +1 -0
- package/dist/log/projection.js +27 -0
- package/dist/log/projection.js.map +1 -0
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +10 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logStore.d.ts","sourceRoot":"","sources":["../../src/log/logStore.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAS9C;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,eAAe,CAAA;AAE5C;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;;;OAUG;IACH,IAAI,IAAI,OAAO,CAAC;QAAE,OAAO,EAAE,gBAAgB,EAAE,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,CAAA;IAEtE;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAE5E;;;;;;;;OAQG;IACH,MAAM,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAC/C;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACT,EAAE;IACD,QAAQ,EAAE,QAAQ,CAAA;CACnB,GAAG,gBAAgB,CAoDnB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,aAAa,CAAC,EAClC,KAAK,EACL,KAAK,EACN,EAAE;IACD,KAAK,EAAE,gBAAgB,CAAA;IACvB,KAAK,EAAE,gBAAgB,CAAA;CACxB,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAuB1D"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The log-store seam: where a resource log lives and how it is extended --
|
|
6
|
+
* read-with-etag of the full log, compare-and-swap append conditioned on that
|
|
7
|
+
* etag, and the guarded create of a genesis entry. The seam is transport only,
|
|
8
|
+
* the log-side sibling of the descriptor-store seam (`edv/descriptorStore.ts`):
|
|
9
|
+
* chain verification (SCID, entry hashes, proofs, authorization, the chain-head
|
|
10
|
+
* pin) lives in the consuming verifier, which reads through this seam, verifies
|
|
11
|
+
* the parsed entries, builds the next entry against the verified head, and
|
|
12
|
+
* appends through it.
|
|
13
|
+
*
|
|
14
|
+
* Both the append and the create ride the backend's `conditional-writes`
|
|
15
|
+
* feature -- the profile requires it (without the precondition, concurrent
|
|
16
|
+
* appends silently overwrite one another instead of failing into the caller's
|
|
17
|
+
* rebase-and-retry loop). `confirmAppend` is the profile's "acknowledgement is
|
|
18
|
+
* a promise" rule: after an acked append, read the log back and check the
|
|
19
|
+
* entry is actually in the served history before treating the append -- or any
|
|
20
|
+
* ceremony step gated on it -- as durable.
|
|
21
|
+
*/
|
|
22
|
+
import { canonicalize } from 'json-canonicalize';
|
|
23
|
+
import { LogNotConfirmedError, ValidationError } from '../errors.js';
|
|
24
|
+
import { ENCODER } from '../internal/content.js';
|
|
25
|
+
import { parseResourceLog, serializeResourceLog, serializeResourceLogEntry } from './jsonl.js';
|
|
26
|
+
/**
|
|
27
|
+
* The content type a resource log is stored under (JSON Lines, not JSON --
|
|
28
|
+
* load-bearing: a JSON content type would have the request layer parse and
|
|
29
|
+
* re-serialize the body, losing the line framing).
|
|
30
|
+
*/
|
|
31
|
+
export const LOG_CONTENT_TYPE = 'text/jsonl';
|
|
32
|
+
/**
|
|
33
|
+
* The WAS Resource adapter: the log is the resource's entire body, stored as
|
|
34
|
+
* `text/jsonl`. Host the resource in a plaintext collection -- on an encrypted
|
|
35
|
+
* collection the EDV codec computes the write preconditions itself, so this
|
|
36
|
+
* store's `ifMatch` / create guard would not be honored.
|
|
37
|
+
*
|
|
38
|
+
* @param options {object}
|
|
39
|
+
* @param options.resource {Resource}
|
|
40
|
+
* @returns {ResourceLogStore}
|
|
41
|
+
*/
|
|
42
|
+
export function resourceLogStore({ resource }) {
|
|
43
|
+
// The raw body observed by the most recent read; an append extends these
|
|
44
|
+
// bytes verbatim instead of re-serializing the parsed entries. Safe to carry
|
|
45
|
+
// even if stale: the append is pinned to the same read's ETag, so a
|
|
46
|
+
// concurrent append fails the CAS instead.
|
|
47
|
+
let lastReadBody;
|
|
48
|
+
return {
|
|
49
|
+
async read() {
|
|
50
|
+
const current = await resource.getWithEtag();
|
|
51
|
+
if (current === null) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
const body = current.data instanceof Blob
|
|
55
|
+
? await current.data.text()
|
|
56
|
+
: typeof current.data === 'string'
|
|
57
|
+
? current.data
|
|
58
|
+
: undefined;
|
|
59
|
+
if (body === undefined) {
|
|
60
|
+
throw new ValidationError(`Cannot read resource log: the resource "${resource.id}" does not ` +
|
|
61
|
+
'hold a text body (is it stored as JSON instead of JSON Lines?).');
|
|
62
|
+
}
|
|
63
|
+
const entries = parseResourceLog(body);
|
|
64
|
+
lastReadBody = body;
|
|
65
|
+
return { entries, etag: current.etag };
|
|
66
|
+
},
|
|
67
|
+
async append(entry, { ifMatch }) {
|
|
68
|
+
if (lastReadBody === undefined) {
|
|
69
|
+
throw new ValidationError('Cannot append to resource log: append must follow a read on the ' +
|
|
70
|
+
'same store instance.');
|
|
71
|
+
}
|
|
72
|
+
const separator = lastReadBody.endsWith('\n') ? '' : '\n';
|
|
73
|
+
const extended = lastReadBody + separator + serializeResourceLogEntry(entry) + '\n';
|
|
74
|
+
await resource.put(ENCODER.encode(extended), {
|
|
75
|
+
contentType: LOG_CONTENT_TYPE,
|
|
76
|
+
ifMatch
|
|
77
|
+
});
|
|
78
|
+
lastReadBody = extended;
|
|
79
|
+
},
|
|
80
|
+
async create(entry) {
|
|
81
|
+
await resource.put(ENCODER.encode(serializeResourceLog([entry])), {
|
|
82
|
+
contentType: LOG_CONTENT_TYPE,
|
|
83
|
+
ifNoneMatch: true
|
|
84
|
+
});
|
|
85
|
+
lastReadBody = serializeResourceLog([entry]);
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* The profile's "acknowledgement is a promise" rule, mechanically: after an
|
|
91
|
+
* acked {@link ResourceLogStore.append} (or `create`), reads the log back and
|
|
92
|
+
* checks the served history actually contains the written entry at its
|
|
93
|
+
* ordinal, throwing {@link LogNotConfirmedError} when it does not (the log is
|
|
94
|
+
* missing, shorter than the entry's ordinal, or holds a different entry
|
|
95
|
+
* there). Returns the read-back log so the caller can run full chain
|
|
96
|
+
* verification over exactly what was confirmed -- containment here is a
|
|
97
|
+
* byte-level check (JCS equality), not a verification.
|
|
98
|
+
*
|
|
99
|
+
* @param options {object}
|
|
100
|
+
* @param options.store {ResourceLogStore}
|
|
101
|
+
* @param options.entry {ResourceLogEntry} the entry the append wrote
|
|
102
|
+
* @returns {Promise<{ entries: ResourceLogEntry[]; etag?: string }>} the
|
|
103
|
+
* read-back log containing the entry
|
|
104
|
+
*/
|
|
105
|
+
export async function confirmAppend({ store, entry }) {
|
|
106
|
+
const ordinal = Number.parseInt(entry.versionId, 10);
|
|
107
|
+
if (!Number.isInteger(ordinal) || ordinal < 1) {
|
|
108
|
+
throw new ValidationError(`Cannot confirm append: the entry's versionId "${entry.versionId}" ` +
|
|
109
|
+
'does not start with a 1-based ordinal.');
|
|
110
|
+
}
|
|
111
|
+
const current = await store.read();
|
|
112
|
+
if (current === null) {
|
|
113
|
+
throw new LogNotConfirmedError('Resource-log append not confirmed: the log resource is missing on ' +
|
|
114
|
+
'read-back.');
|
|
115
|
+
}
|
|
116
|
+
const served = current.entries[ordinal - 1];
|
|
117
|
+
if (served === undefined || canonicalize(served) !== canonicalize(entry)) {
|
|
118
|
+
throw new LogNotConfirmedError(`Resource-log append not confirmed: the served log does not contain ` +
|
|
119
|
+
`the appended entry at ordinal ${ordinal}.`);
|
|
120
|
+
}
|
|
121
|
+
return current;
|
|
122
|
+
}
|
|
123
|
+
//# sourceMappingURL=logStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logStore.js","sourceRoot":"","sources":["../../src/log/logStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAGhD,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAChD,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,YAAY,CAAA;AAEnB;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,YAAY,CAAA;AAkD5C;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAC/B,QAAQ,EAGT;IACC,yEAAyE;IACzE,6EAA6E;IAC7E,oEAAoE;IACpE,2CAA2C;IAC3C,IAAI,YAAgC,CAAA;IACpC,OAAO;QACL,KAAK,CAAC,IAAI;YACR,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,WAAW,EAAE,CAAA;YAC5C,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;gBACrB,OAAO,IAAI,CAAA;YACb,CAAC;YACD,MAAM,IAAI,GACR,OAAO,CAAC,IAAI,YAAY,IAAI;gBAC1B,CAAC,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE;gBAC3B,CAAC,CAAC,OAAO,OAAO,CAAC,IAAI,KAAK,QAAQ;oBAChC,CAAC,CAAC,OAAO,CAAC,IAAI;oBACd,CAAC,CAAC,SAAS,CAAA;YACjB,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;gBACvB,MAAM,IA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AAK,EAIN;IACC,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,EAAE,EAAE,CAAC,CAAA;IACpD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAI,eAAe,CACvB,iDAAiD,KAAK,CAAC,SAAS,IAAI;YAClE,wCAAwC,CAC3C,CAAA;IACH,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,IAAI,EAAE,CAAA;IAClC,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACrB,MAAM,IAAI,oBAAoB,CAC5B,oEAAoE;YAClE,YAAY,CACf,CAAA;IACH,CAAC;IACD,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,GAAG,CAAC,CAAC,CAAA;IAC3C,IAAI,MAAM,KAAK,SAAS,IAAI,YAAY,CAAC,MAAM,CAAC,KAAK,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;QACzE,MAAM,IAAI,oBAAoB,CAC5B,qEAAqE;YACnE,iCAAiC,OAAO,GAAG,CAC9C,CAAA;IACH,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The point-state projection write: the descriptor document a non-verifying
|
|
6
|
+
* consumer reads, written from the verified head entry's `state` plus the
|
|
7
|
+
* `history` dispatch hint, after a log append has succeeded and been
|
|
8
|
+
* confirmed. The log is the source of truth and the projection follows it --
|
|
9
|
+
* a consumer that needs trust verifies the log and acts on the projection
|
|
10
|
+
* only where it equals the verified head's `state` (after removing
|
|
11
|
+
* `history`); a mismatch is an integrity failure, not a race resolved in the
|
|
12
|
+
* projection's favor. Because the log settles every race, the write is
|
|
13
|
+
* deliberately unconditional: a stale projection left behind by a lost race
|
|
14
|
+
* is repaired by the next writer's projection, and never trusted meanwhile.
|
|
15
|
+
*/
|
|
16
|
+
import type { ResourceLogEntry } from '@interop/storage-core';
|
|
17
|
+
import type { Resource } from '../Resource.js';
|
|
18
|
+
/**
|
|
19
|
+
* Writes a log's point-state projection: the resource's content becomes the
|
|
20
|
+
* head entry's `state` with the `history: { method, resource }` dispatch hint
|
|
21
|
+
* added. Refuses a `state` that already carries a `history` member (the
|
|
22
|
+
* profile forbids one inside a log entry, so its presence means the caller is
|
|
23
|
+
* projecting something that was never a valid entry state).
|
|
24
|
+
*
|
|
25
|
+
* @param options {object}
|
|
26
|
+
* @param options.resource {Resource} the point-state document's resource
|
|
27
|
+
* @param options.state {ResourceLogEntry['state']} the VERIFIED head
|
|
28
|
+
* entry's state -- callers project only what chain verification returned
|
|
29
|
+
* @param options.history {object} the dispatch hint
|
|
30
|
+
* @param options.history.method {string} the log's format identifier (the
|
|
31
|
+
* genesis `parameters.method`, which the log itself must confirm)
|
|
32
|
+
* @param options.history.resource {string} the log resource's URL
|
|
33
|
+
* @returns {Promise<void>}
|
|
34
|
+
*/
|
|
35
|
+
export declare function writeLogProjection({ resource, state, history }: {
|
|
36
|
+
resource: Resource;
|
|
37
|
+
state: ResourceLogEntry['state'];
|
|
38
|
+
history: {
|
|
39
|
+
method: string;
|
|
40
|
+
resource: string;
|
|
41
|
+
};
|
|
42
|
+
}): Promise<void>;
|
|
43
|
+
//# sourceMappingURL=projection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projection.d.ts","sourceRoot":"","sources":["../../src/log/projection.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAI9C;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,kBAAkB,CAAC,EACvC,QAAQ,EACR,KAAK,EACL,OAAO,EACR,EAAE;IACD,QAAQ,EAAE,QAAQ,CAAA;IAClB,KAAK,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAChC,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAA;CAC9C,GAAG,OAAO,CAAC,IAAI,CAAC,CAShB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ValidationError } from '../errors.js';
|
|
2
|
+
/**
|
|
3
|
+
* Writes a log's point-state projection: the resource's content becomes the
|
|
4
|
+
* head entry's `state` with the `history: { method, resource }` dispatch hint
|
|
5
|
+
* added. Refuses a `state` that already carries a `history` member (the
|
|
6
|
+
* profile forbids one inside a log entry, so its presence means the caller is
|
|
7
|
+
* projecting something that was never a valid entry state).
|
|
8
|
+
*
|
|
9
|
+
* @param options {object}
|
|
10
|
+
* @param options.resource {Resource} the point-state document's resource
|
|
11
|
+
* @param options.state {ResourceLogEntry['state']} the VERIFIED head
|
|
12
|
+
* entry's state -- callers project only what chain verification returned
|
|
13
|
+
* @param options.history {object} the dispatch hint
|
|
14
|
+
* @param options.history.method {string} the log's format identifier (the
|
|
15
|
+
* genesis `parameters.method`, which the log itself must confirm)
|
|
16
|
+
* @param options.history.resource {string} the log resource's URL
|
|
17
|
+
* @returns {Promise<void>}
|
|
18
|
+
*/
|
|
19
|
+
export async function writeLogProjection({ resource, state, history }) {
|
|
20
|
+
if ('history' in state) {
|
|
21
|
+
throw new ValidationError('Cannot write log projection: the head state already carries a ' +
|
|
22
|
+
'`history` member (a log entry state must not have one).');
|
|
23
|
+
}
|
|
24
|
+
const projection = { ...state, history };
|
|
25
|
+
await resource.put(projection, {});
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=projection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projection.js","sourceRoot":"","sources":["../../src/log/projection.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAE9C;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,EACvC,QAAQ,EACR,KAAK,EACL,OAAO,EAKR;IACC,IAAI,SAAS,IAAI,KAAK,EAAE,CAAC;QACvB,MAAM,IAAI,eAAe,CACvB,gEAAgE;YAC9D,yDAAyD,CAC5D,CAAA;IACH,CAAC;IACD,MAAM,UAAU,GAAG,EAAE,GAAG,KAAK,EAAE,OAAO,EAAE,CAAA;IACxC,MAAM,QAAQ,CAAC,GAAG,CAAC,UAAmC,EAAE,EAAE,CAAC,CAAA;AAC7D,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export type { IZcap, IDelegatedZcap, IRootZcap, ISigner };
|
|
|
22
22
|
* `ResourceListing`) and the collections-in-a-space listing is `CollectionsList`
|
|
23
23
|
* (formerly `CollectionListing`).
|
|
24
24
|
*/
|
|
25
|
-
export type { Action, ActionInput, SpaceDescription, CollectionDescription, CollectionEncryption, CollectionEncryptionEpoch, CollectionEncryptionEpochsMac,
|
|
25
|
+
export type { Action, ActionInput, SpaceDescription, CollectionDescription, CollectionEncryption, CollectionEncryptionEpoch, CollectionEncryptionEpochsMac, CollectionEncryptionRecipient, PolicyDocument, LinkSet, LinkSetEntry, CollectionSummary, CollectionsList, SpaceSummary, SpaceListing, ResourceSummary, CollectionResourcesList, ResourceMetadata, ResourceMetadataCustom, ImportStats, BackendReference, BackendDescriptor, BackendRegistration, BackendConnectionInput, BackendConnectionPublic, StorageLimit, CollectionUsage, BackendUsage, SpaceQuotaReport } from '@interop/storage-core';
|
|
26
26
|
import type { BackendReference, CollectionEncryption } from '@interop/storage-core';
|
|
27
27
|
/**
|
|
28
28
|
* The client-writable fields of a Collection Description -- the shape shared
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EACV,KAAK,EACL,cAAc,EACd,SAAS,EACV,MAAM,mCAAmC,CAAA;AAC1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AAE3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,YAAY,EAAE,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,OAAO,EAAE,CAAA;AAEzD;;;;;GAKG;AACH,YAAY,EACV,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,yBAAyB,EACzB,6BAA6B,EAC7B,6BAA6B,EAC7B,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EACV,KAAK,EACL,cAAc,EACd,SAAS,EACV,MAAM,mCAAmC,CAAA;AAC1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AAE3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,YAAY,EAAE,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,OAAO,EAAE,CAAA;AAEzD;;;;;GAKG;AACH,YAAY,EACV,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,yBAAyB,EACzB,6BAA6B,EAC7B,6BAA6B,EAC7B,cAAc,EACd,OAAO,EACP,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,uBAAuB,EACvB,gBAAgB,EAChB,sBAAsB,EACtB,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,EACvB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;IACV,OAAO,EAAE,WAAW,EAAE,CAAA;IACtB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,KAAK,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,IAAI,GAAG,UAAU,CAAA;IACxB,UAAU,CAAC,EAAE,KAAK,CAAA;CACnB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@interop/was-client",
|
|
3
3
|
"description": "A developer-friendly client for Wallet Attached Storage (WAS) servers.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.31.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "pnpm run clear && tsc",
|
|
@@ -36,6 +36,12 @@
|
|
|
36
36
|
"import": "./dist/edv/index.js",
|
|
37
37
|
"default": "./dist/edv/index.js"
|
|
38
38
|
},
|
|
39
|
+
"./log": {
|
|
40
|
+
"types": "./dist/log/index.d.ts",
|
|
41
|
+
"react-native": "./dist/log/index.js",
|
|
42
|
+
"import": "./dist/log/index.js",
|
|
43
|
+
"default": "./dist/log/index.js"
|
|
44
|
+
},
|
|
39
45
|
"./sync": {
|
|
40
46
|
"types": "./dist/sync/index.d.ts",
|
|
41
47
|
"react-native": "./dist/sync/index.js",
|
|
@@ -52,12 +58,12 @@
|
|
|
52
58
|
"@interop/ed25519-signature": "^7.1.4",
|
|
53
59
|
"@interop/edv-client": "^17.8.0",
|
|
54
60
|
"@interop/ezcap": "^7.4.1",
|
|
55
|
-
"@interop/http-client": "^1.0.
|
|
61
|
+
"@interop/http-client": "^1.0.5",
|
|
56
62
|
"@interop/minimal-cipher": "^7.8.1",
|
|
57
|
-
"@interop/storage-core": "^0.
|
|
63
|
+
"@interop/storage-core": "^0.4.0",
|
|
58
64
|
"@interop/x25519-key-agreement-key": "^5.2.1",
|
|
59
65
|
"@noble/hashes": "^2.3.0",
|
|
60
|
-
"@scure/base": "^2.
|
|
66
|
+
"@scure/base": "^2.3.0",
|
|
61
67
|
"json-canonicalize": "^2.0.0"
|
|
62
68
|
},
|
|
63
69
|
"devDependencies": {
|