@interop/was-client 0.50.0 → 0.52.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 +59 -7
- package/dist/Collection.d.ts +66 -0
- package/dist/Collection.d.ts.map +1 -1
- package/dist/Collection.js +161 -53
- package/dist/Collection.js.map +1 -1
- package/dist/Resource.js +2 -2
- package/dist/Resource.js.map +1 -1
- package/dist/Space.d.ts.map +1 -1
- package/dist/Space.js +15 -11
- package/dist/Space.js.map +1 -1
- package/dist/codec.d.ts +54 -12
- package/dist/codec.d.ts.map +1 -1
- package/dist/edv/EdvCodec.d.ts +9 -8
- package/dist/edv/EdvCodec.d.ts.map +1 -1
- package/dist/edv/EdvCodec.js +65 -33
- package/dist/edv/EdvCodec.js.map +1 -1
- package/dist/edv/descriptorStore.d.ts.map +1 -1
- package/dist/edv/descriptorStore.js +2 -0
- package/dist/edv/descriptorStore.js.map +1 -1
- package/dist/edv/docCipher.d.ts.map +1 -1
- package/dist/edv/docCipher.js +1 -1
- package/dist/edv/docCipher.js.map +1 -1
- package/dist/edv/index.d.ts +2 -0
- package/dist/edv/index.d.ts.map +1 -1
- package/dist/edv/index.js +1 -0
- package/dist/edv/index.js.map +1 -1
- package/dist/edv/logGovernedDescriptorStore.d.ts +164 -0
- package/dist/edv/logGovernedDescriptorStore.d.ts.map +1 -0
- package/dist/edv/logGovernedDescriptorStore.js +476 -0
- package/dist/edv/logGovernedDescriptorStore.js.map +1 -0
- package/dist/edv/recipients.d.ts.map +1 -1
- package/dist/edv/recipients.js +25 -82
- package/dist/edv/recipients.js.map +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +1 -0
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/internal/cas.d.ts +95 -0
- package/dist/internal/cas.d.ts.map +1 -0
- package/dist/internal/cas.js +116 -0
- package/dist/internal/cas.js.map +1 -0
- package/dist/internal/codec.d.ts.map +1 -1
- package/dist/internal/codec.js +6 -6
- package/dist/internal/codec.js.map +1 -1
- package/dist/internal/conditional.d.ts +12 -0
- package/dist/internal/conditional.d.ts.map +1 -1
- package/dist/internal/conditional.js +17 -0
- package/dist/internal/conditional.js.map +1 -1
- package/dist/internal/content.d.ts +8 -0
- package/dist/internal/content.d.ts.map +1 -1
- package/dist/internal/content.js +8 -0
- package/dist/internal/content.js.map +1 -1
- package/dist/internal/meta.d.ts +9 -9
- package/dist/internal/meta.d.ts.map +1 -1
- package/dist/internal/meta.js +13 -14
- package/dist/internal/meta.js.map +1 -1
- package/dist/internal/paths.d.ts +6 -0
- package/dist/internal/paths.d.ts.map +1 -1
- package/dist/internal/paths.js +8 -0
- package/dist/internal/paths.js.map +1 -1
- package/dist/internal/write.d.ts +1 -1
- package/dist/internal/write.d.ts.map +1 -1
- package/dist/internal/write.js +4 -2
- package/dist/internal/write.js.map +1 -1
- package/dist/log/index.d.ts +2 -1
- package/dist/log/index.d.ts.map +1 -1
- package/dist/log/index.js +2 -1
- package/dist/log/index.js.map +1 -1
- package/dist/log/logStore.d.ts +38 -25
- package/dist/log/logStore.d.ts.map +1 -1
- package/dist/log/logStore.js +99 -42
- package/dist/log/logStore.js.map +1 -1
- package/dist/paths.d.ts +1 -1
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +1 -1
- package/dist/paths.js.map +1 -1
- package/dist/sync/provisioning.d.ts.map +1 -1
- package/dist/sync/provisioning.js +49 -14
- package/dist/sync/provisioning.js.map +1 -1
- package/dist/types.d.ts +11 -12
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descriptorStore.js","sourceRoot":"","sources":["../../src/edv/descriptorStore.ts"],"names":[],"mappings":"AAiCA,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAA;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AA0D9C;;;;;;;;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A;KAAE,CAAA;CAC5B,GAAG,OAAO,CAAC,YAAY,CAAC,CAuDxB;AAwGD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAsB,6BAA6B,CAAC,EAClD,YAAY,EACZ,YAAwB,EACxB,UAAU,EACX,EAAE;IACD,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAA;IACnC,UAAU,EAAE,oBAAoB,CAAA;CACjC,GAAG,OAAO,CAAC,SAAS,CAAC,CAsBrB"}
|
package/dist/edv/docCipher.js
CHANGED
|
@@ -116,7 +116,7 @@ export async function createEdvDocCipher({ keyAgreementKey, keyResolver, collect
|
|
|
116
116
|
if (!indexing) {
|
|
117
117
|
return EMPTY_INDEX_SCHEMA;
|
|
118
118
|
}
|
|
119
|
-
const schema = readIndexSchema(await codec.decodeMeta(stored));
|
|
119
|
+
const schema = readIndexSchema(await codec.decodeMeta(stored, { kind: 'collection' }));
|
|
120
120
|
indexing.applySchema(schema);
|
|
121
121
|
return schema;
|
|
122
122
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docCipher.js","sourceRoot":"","sources":["../../src/edv/docCipher.ts"],"names":[],"mappings":"AAiDA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAChE,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAChF,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,eAAe,EAChB,MAAM,cAAc,CAAA;AAGrB,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAIlE,8EAA8E;AAC9E,+EAA+E;AAC/E,6EAA6E;AAC7E,qEAAqE;AACrE,8EAA8E;AAC9E,iBAAiB;AACjB,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AA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AC;QACtC,YAAY;QACZ,YAAY;QACZ,UAAU;KACX,CAAC,CAAA;IACF,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,kBAAkB,CAAC;QACpD,KAAK;QACL,YAAY;KACb,CAAC,CAAA;IACF,OAAO;QACL,OAAO;QACP,aAAa;QACb,KAAK,CAAC,OAAO;YACX,MAAM,IAAI,sBAAsB,CAC9B,4CAA4C,YAAY,YAAY;gBAClE,kEAAkE;gBAClE,mDAAmD;gBACnD,wDAAwD,CAC3D,CAAA;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
|
package/dist/edv/index.d.ts
CHANGED
|
@@ -62,6 +62,8 @@ export type { RecipientPublicKey } from './recipients.js';
|
|
|
62
62
|
export { isEd25519DidKey, x25519RecipientFromDidKey } from './didKeyRecipient.js';
|
|
63
63
|
export { collectionDescriptorStore, resourceDescriptorStore } from './descriptorStore.js';
|
|
64
64
|
export type { EncryptionDescriptorStore } from './descriptorStore.js';
|
|
65
|
+
export { EPOCH_CONFIGURATION_STATE_TYPE, logGovernedCollectionDescriptorStore, logGovernedDescriptorStore, readGovernedEpochConfiguration, toEpochConfigurationState } from './logGovernedDescriptorStore.js';
|
|
66
|
+
export type { LogGovernedDescriptorStore } from './logGovernedDescriptorStore.js';
|
|
65
67
|
export { mintEpoch, epochKeyIdFor, unwrapEpochSecret, wrapEpochSecret } from './epochCrypto.js';
|
|
66
68
|
export { hasKeyEpochs, epochRostersEqual } from './epochRoster.js';
|
|
67
69
|
export { resolveEpochKeys } from './epochKeys.js';
|
package/dist/edv/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/edv/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,OAAO,EACL,mBAAmB,EACnB,QAAQ,EACR,mBAAmB,EACpB,MAAM,eAAe,C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,cAAc,EACd,sBAAsB,EACtB,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,gBAAgB,CAAA;AACvB,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA"}
|
package/dist/edv/index.js
CHANGED
|
@@ -59,6 +59,7 @@ export { EDV_SCHEME_VERSION, JOSE_CONTENT_TYPE } from './constants.js';
|
|
|
59
59
|
export { ensureFirstEpoch, initRecipients, addRecipient, removeRecipient, replaceRecipient } from './recipients.js';
|
|
60
60
|
export { isEd25519DidKey, x25519RecipientFromDidKey } from './didKeyRecipient.js';
|
|
61
61
|
export { collectionDescriptorStore, resourceDescriptorStore } from './descriptorStore.js';
|
|
62
|
+
export { EPOCH_CONFIGURATION_STATE_TYPE, logGovernedCollectionDescriptorStore, logGovernedDescriptorStore, readGovernedEpochConfiguration, toEpochConfigurationState } from './logGovernedDescriptorStore.js';
|
|
62
63
|
export { mintEpoch, epochKeyIdFor, unwrapEpochSecret, wrapEpochSecret } from './epochCrypto.js';
|
|
63
64
|
export { hasKeyEpochs, epochRostersEqual } from './epochRoster.js';
|
|
64
65
|
export { resolveEpochKeys } from './epochKeys.js';
|
package/dist/edv/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/edv/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,OAAO,EACL,mBAAmB,EACnB,QAAQ,EACR,mBAAmB,EACpB,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AACtE,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,gBAAgB,EACjB,MAAM,iBAAiB,CAAA;AA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AM,iCAAiC,CAAA;AAExC,OAAO,EACL,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,eAAe,EAChB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAEjD,OAAO,EACL,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,cAAc,EACf,MAAM,cAAc,CAAA;AAErB,OAAO,EACL,kBAAkB,EAClB,6BAA6B,EAC7B,cAAc,EACd,sBAAsB,EACtB,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { type ResourceLogController, type ResourceLogPinStore, type ResourceLogSigner, type ResourceLogStore, type VerifiedResourceLog } from '@interop/vh-resource-log';
|
|
2
|
+
import type { Collection } from '../Collection.js';
|
|
3
|
+
import type { CollectionEncryption } from '../types.js';
|
|
4
|
+
import type { EncryptionDescriptorStore } from './descriptorStore.js';
|
|
5
|
+
/**
|
|
6
|
+
* The state-document schema identifier an encryption descriptor carries in a
|
|
7
|
+
* governed log entry, per the Encrypted Collections profile.
|
|
8
|
+
*/
|
|
9
|
+
export declare const EPOCH_CONFIGURATION_STATE_TYPE = "WasEpochConfiguration";
|
|
10
|
+
/**
|
|
11
|
+
* The log-entry `state` for a descriptor: the point-state projection's
|
|
12
|
+
* `history` member stripped (it belongs to the projection only; the verifier
|
|
13
|
+
* refuses an entry whose state carries it) and the schema identifier stamped.
|
|
14
|
+
*
|
|
15
|
+
* @param descriptor {CollectionEncryption}
|
|
16
|
+
* @returns {CollectionEncryption & { type: string }}
|
|
17
|
+
*/
|
|
18
|
+
export declare function toEpochConfigurationState(descriptor: CollectionEncryption): CollectionEncryption & {
|
|
19
|
+
type: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* The one governed epoch-configuration read: the fail-closed boundary that
|
|
23
|
+
* decides whether a served log state may be treated as an encryption
|
|
24
|
+
* descriptor. Resolves the controller view, reads and fully verifies the log
|
|
25
|
+
* (chain, proofs, external authorization, and the chain-head pin, via
|
|
26
|
+
* `readResourceLog`), and refuses a verified head whose state is not a
|
|
27
|
+
* `WasEpochConfiguration` rather than handing it out as a descriptor.
|
|
28
|
+
* Resolves `null` for an absent log (the pre-genesis state) only while no pin
|
|
29
|
+
* is held for it; under a held pin an absent log is refused as a `rollback`,
|
|
30
|
+
* the library's rule. Every trusted descriptor read goes through this helper,
|
|
31
|
+
* so a hardening applied here reaches all of them.
|
|
32
|
+
*
|
|
33
|
+
* @param options {object}
|
|
34
|
+
* @param options.store {ResourceLogStore} the log's transport seam
|
|
35
|
+
* @param options.resolveController {function}
|
|
36
|
+
* `() => Promise<ResourceLogController>` -- the caller's currently verified
|
|
37
|
+
* controller view, resolved per operation
|
|
38
|
+
* @param options.pinStore {ResourceLogPinStore} this client's chain-head
|
|
39
|
+
* pin for this log
|
|
40
|
+
* @param options.logId {string} the pin-slot key for this log, from
|
|
41
|
+
* `resourceLogPinId`
|
|
42
|
+
* @returns {Promise<{ verified: VerifiedResourceLog; descriptor: CollectionEncryption; controller: ResourceLogController; etag?: string } | null>}
|
|
43
|
+
* the verified log, its head state as the descriptor, the controller view
|
|
44
|
+
* it was verified under, and the log's validator
|
|
45
|
+
*/
|
|
46
|
+
export declare function readGovernedEpochConfiguration({ store, resolveController, pinStore, logId }: {
|
|
47
|
+
store: ResourceLogStore;
|
|
48
|
+
resolveController: () => Promise<ResourceLogController>;
|
|
49
|
+
pinStore: ResourceLogPinStore;
|
|
50
|
+
logId: string;
|
|
51
|
+
}): Promise<{
|
|
52
|
+
verified: VerifiedResourceLog;
|
|
53
|
+
descriptor: CollectionEncryption;
|
|
54
|
+
controller: ResourceLogController;
|
|
55
|
+
etag?: string;
|
|
56
|
+
} | null>;
|
|
57
|
+
/**
|
|
58
|
+
* An `EncryptionDescriptorStore` over a resource log, which can therefore be
|
|
59
|
+
* SEALED: `seal()` runs the sealing sweep (`sealResourceLog`) against the
|
|
60
|
+
* caller's currently verified controller view, appending the idempotent no-op
|
|
61
|
+
* backstop entry when the log's head still carries a controller version
|
|
62
|
+
* before the controller's latest membership change -- `'sealed'` -- and
|
|
63
|
+
* writing nothing when the log is already sealed, absent, or has no
|
|
64
|
+
* membership change to seal against -- `'noop'`. A store built without a
|
|
65
|
+
* signer has no `create` and refuses `replace` and `seal`.
|
|
66
|
+
*/
|
|
67
|
+
export interface LogGovernedDescriptorStore extends EncryptionDescriptorStore {
|
|
68
|
+
/**
|
|
69
|
+
* The port's read, plus the verified log the descriptor is the head state
|
|
70
|
+
* of, for a caller that needs the log's history beside its head (the
|
|
71
|
+
* Collection store uses it to tell a stale served projection from a forged
|
|
72
|
+
* one). Absent only from the Collection store's read of a Collection that
|
|
73
|
+
* is not log-governed, whose descriptor comes from no log.
|
|
74
|
+
*/
|
|
75
|
+
read(): Promise<{
|
|
76
|
+
descriptor: CollectionEncryption;
|
|
77
|
+
verified?: VerifiedResourceLog;
|
|
78
|
+
etag?: string;
|
|
79
|
+
} | null>;
|
|
80
|
+
seal(): Promise<'sealed' | 'noop'>;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Builds the generic log-governed `EncryptionDescriptorStore` over a resource
|
|
84
|
+
* log's transport seam. Because the seam is the same one the edv recipient
|
|
85
|
+
* primitives (`initRecipients` / `addRecipient` / `removeRecipient`, with
|
|
86
|
+
* their compare-and-swap retry loops) already drive, they run over a log
|
|
87
|
+
* without knowing it: a lost race on the log is translated back to the
|
|
88
|
+
* `PreconditionFailedError` those loops rebase on.
|
|
89
|
+
*
|
|
90
|
+
* The controller view is resolved per operation rather than held, so a
|
|
91
|
+
* caller that just edited its controller document hands every subsequent
|
|
92
|
+
* write the view it now verifies. A replace builds its entry on the head the most
|
|
93
|
+
* recent read on this instance verified, pinned to that read's `etag`, so a
|
|
94
|
+
* stale head loses the compare-and-swap instead of forking; the library's
|
|
95
|
+
* pre-write pass verifies the candidate as a reader would before it lands,
|
|
96
|
+
* so a refused entry never poisons the served log for other readers.
|
|
97
|
+
*
|
|
98
|
+
* @param options {object}
|
|
99
|
+
* @param options.log {ResourceLogStore} the log's transport seam
|
|
100
|
+
* @param options.resolveController {function}
|
|
101
|
+
* `() => Promise<ResourceLogController>` -- the caller's currently verified
|
|
102
|
+
* controller view, resolved per operation
|
|
103
|
+
* @param options.pinStore {ResourceLogPinStore} this client's chain-head pin
|
|
104
|
+
* for this log
|
|
105
|
+
* @param options.logId {string} the pin-slot key for this log, from
|
|
106
|
+
* `resourceLogPinId`
|
|
107
|
+
* @param [options.signer] {ResourceLogSigner} this client's enrolled
|
|
108
|
+
* signing key, for the appends this store writes; absent, the store is
|
|
109
|
+
* read-only
|
|
110
|
+
* @returns {LogGovernedDescriptorStore}
|
|
111
|
+
*/
|
|
112
|
+
export declare function logGovernedDescriptorStore({ log, resolveController, pinStore, logId, signer }: {
|
|
113
|
+
log: ResourceLogStore;
|
|
114
|
+
resolveController: () => Promise<ResourceLogController>;
|
|
115
|
+
pinStore: ResourceLogPinStore;
|
|
116
|
+
logId: string;
|
|
117
|
+
signer?: ResourceLogSigner;
|
|
118
|
+
}): LogGovernedDescriptorStore;
|
|
119
|
+
/**
|
|
120
|
+
* Builds the `EncryptionDescriptorStore` over a Collection that may be
|
|
121
|
+
* log-governed. `read()` fetches the Collection Description and dispatches on
|
|
122
|
+
* its `encryption` member: absent, the store resolves `null` (a fresh
|
|
123
|
+
* Collection that `create` makes log-governed with a genesis entry); present
|
|
124
|
+
* without `history`, it is the plain point-state descriptor and the store
|
|
125
|
+
* behaves exactly like `collectionDescriptorStore`; present with `history`,
|
|
126
|
+
* the store refuses a `history.method` other than the profile's format
|
|
127
|
+
* identifier before any fetch, refuses a `history.resource` that is not this
|
|
128
|
+
* Collection's own log URL, opens the log through `resourceLogStore`, reads
|
|
129
|
+
* it through the generic {@link logGovernedDescriptorStore}, and holds the
|
|
130
|
+
* projection to the verified head's state after stripping `history`. The
|
|
131
|
+
* Description and the log are two reads, so a projection that equals an
|
|
132
|
+
* EARLIER entry's state is a concurrent append landing between them and is
|
|
133
|
+
* reported as `PreconditionFailedError` (412), which the recipient loops
|
|
134
|
+
* rebase on; a projection matching no entry at all is refused as
|
|
135
|
+
* `ResourceLogIntegrityError`. The descriptor handed out is the verified head
|
|
136
|
+
* state with the served `history` pointer kept on it.
|
|
137
|
+
*
|
|
138
|
+
* Writes on a governed Collection are the generic store's signed appends and
|
|
139
|
+
* need `signer`; without one the store is read-only for governed collections
|
|
140
|
+
* (`replace` and `seal` refuse, `create` is absent). A lost race surfaces as
|
|
141
|
+
* `PreconditionFailedError` (412), the port's documented class. `seal()` is
|
|
142
|
+
* the generic store's sealing sweep over the Collection's log.
|
|
143
|
+
*
|
|
144
|
+
* @param options {object}
|
|
145
|
+
* @param options.collection {Collection}
|
|
146
|
+
* @param options.resolveController {function}
|
|
147
|
+
* `() => Promise<ResourceLogController>` -- the caller's currently verified
|
|
148
|
+
* controller view, resolved per operation
|
|
149
|
+
* @param options.pinStore {ResourceLogPinStore} this client's chain-head pin
|
|
150
|
+
* for this log
|
|
151
|
+
* @param options.logId {string} the pin-slot key for this log, from
|
|
152
|
+
* `resourceLogPinId`
|
|
153
|
+
* @param [options.signer] {ResourceLogSigner} this client's enrolled
|
|
154
|
+
* signing key, for the appends this store writes
|
|
155
|
+
* @returns {LogGovernedDescriptorStore}
|
|
156
|
+
*/
|
|
157
|
+
export declare function logGovernedCollectionDescriptorStore({ collection, resolveController, pinStore, logId, signer }: {
|
|
158
|
+
collection: Collection;
|
|
159
|
+
resolveController: () => Promise<ResourceLogController>;
|
|
160
|
+
pinStore: ResourceLogPinStore;
|
|
161
|
+
logId: string;
|
|
162
|
+
signer?: ResourceLogSigner;
|
|
163
|
+
}): LogGovernedDescriptorStore;
|
|
164
|
+
//# sourceMappingURL=logGovernedDescriptorStore.d.ts.map
|
|
@@ -0,0 +1 @@
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