@interop/was-react 0.13.1 → 0.15.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 +70 -29
- package/dist/auth/walletRequestTypes.d.ts +30 -47
- package/dist/auth/walletRequestTypes.d.ts.map +1 -1
- package/dist/config.d.ts +28 -18
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +0 -0
- package/dist/config.js.map +1 -1
- package/dist/dev/provisionDevGrants.d.ts +7 -3
- package/dist/dev/provisionDevGrants.d.ts.map +1 -1
- package/dist/dev/provisionDevGrants.js +19 -7
- package/dist/dev/provisionDevGrants.js.map +1 -1
- package/dist/identity/seedCredential.d.ts +15 -13
- package/dist/identity/seedCredential.d.ts.map +1 -1
- package/dist/identity/seedCredential.js +15 -16
- package/dist/identity/seedCredential.js.map +1 -1
- package/dist/identity/seedStore.d.ts.map +1 -1
- package/dist/identity/seedStore.js +4 -3
- package/dist/identity/seedStore.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/react/documentApp.d.ts +5 -5
- package/dist/react/documentApp.d.ts.map +1 -1
- package/dist/react/documentApp.js +14 -17
- package/dist/react/documentApp.js.map +1 -1
- package/dist/session/authStore.d.ts +4 -3
- package/dist/session/authStore.d.ts.map +1 -1
- package/dist/session/authStore.js +89 -55
- package/dist/session/authStore.js.map +1 -1
- package/dist/storage/adopt.d.ts +6 -5
- package/dist/storage/adopt.d.ts.map +1 -1
- package/dist/storage/adopt.js +22 -10
- package/dist/storage/adopt.js.map +1 -1
- package/dist/storage/entityStore.d.ts +37 -9
- package/dist/storage/entityStore.d.ts.map +1 -1
- package/dist/storage/entityStore.js +19 -9
- package/dist/storage/entityStore.js.map +1 -1
- package/dist/storage/localStore.d.ts.map +1 -1
- package/dist/storage/localStore.js +51 -61
- package/dist/storage/localStore.js.map +1 -1
- package/dist/storage/sharedCollectionReader.d.ts.map +1 -1
- package/dist/storage/sharedCollectionReader.js +15 -14
- package/dist/storage/sharedCollectionReader.js.map +1 -1
- package/dist/storage/storageManager.d.ts +30 -0
- package/dist/storage/storageManager.d.ts.map +1 -1
- package/dist/storage/storageManager.js +46 -0
- package/dist/storage/storageManager.js.map +1 -1
- package/dist/storage/wasRemoteStore.d.ts +99 -28
- package/dist/storage/wasRemoteStore.d.ts.map +1 -1
- package/dist/storage/wasRemoteStore.js +205 -30
- package/dist/storage/wasRemoteStore.js.map +1 -1
- package/dist/storage/wasSync.d.ts +17 -6
- package/dist/storage/wasSync.d.ts.map +1 -1
- package/dist/storage/wasSync.js +39 -9
- package/dist/storage/wasSync.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -116,9 +116,9 @@ data-migration event, not a config tweak: rows written in the other mode stop
|
|
|
116
116
|
being readable. A registry that maps one WAS collection id to both visibilities
|
|
117
117
|
is rejected at store open. Two payload constraints on public collections: a
|
|
118
118
|
top-level object-valued `jwe` field is reserved (the read path uses it to
|
|
119
|
-
recognize a stray encrypted envelope and refuses the row), and
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
recognize a stray encrypted envelope and refuses the row), and rows carry the
|
|
120
|
+
`updatedAt` / `writerId` LWW fields like any other collection -- world-readable
|
|
121
|
+
along with the rest of the payload.
|
|
122
122
|
|
|
123
123
|
At login, a public collection is requested from the wallet with the distinct
|
|
124
124
|
`https://w3id.org/byoe#public-collection` descriptor type (private collections
|
|
@@ -223,9 +223,11 @@ export const registry: StoreRegistry = {
|
|
|
223
223
|
```
|
|
224
224
|
|
|
225
225
|
`createEntityStore` returns a zustand hook holding the decrypted payloads as a
|
|
226
|
-
`Map<uuid, Note>`; its `insert` / `update` / `remove` verbs persist
|
|
227
|
-
encrypted local store
|
|
228
|
-
|
|
226
|
+
`Map<uuid, Note>`; its `insert` / `update` / `upsert` / `remove` verbs persist
|
|
227
|
+
through the encrypted local store (the write verbs stamping the LWW fields
|
|
228
|
+
`updatedAt` / `writerId` themselves), while `hydrate` / `patch` / `drop` /
|
|
229
|
+
`replaceAll` are the handlers the rehydrate mechanism drives on login, remote
|
|
230
|
+
sync, and logout.
|
|
229
231
|
|
|
230
232
|
### 3. Provider
|
|
231
233
|
|
|
@@ -269,23 +271,18 @@ export function LoginPage() {
|
|
|
269
271
|
|
|
270
272
|
```tsx
|
|
271
273
|
import { uuidv7 } from 'uuidv7'
|
|
272
|
-
import { useSession } from '@interop/was-react'
|
|
273
274
|
import { useNotes } from './stores.js'
|
|
274
275
|
|
|
275
276
|
export function Notes() {
|
|
276
277
|
const notes = useNotes(state => [...state.byId.values()])
|
|
277
278
|
const insert = useNotes(state => state.insert)
|
|
278
|
-
const { writerId } = useSession()
|
|
279
279
|
|
|
280
280
|
async function addNote() {
|
|
281
|
-
const now = new Date().toISOString()
|
|
282
281
|
await insert({
|
|
283
282
|
id: uuidv7(),
|
|
284
283
|
title: 'Untitled',
|
|
285
284
|
body: '',
|
|
286
|
-
createdAt:
|
|
287
|
-
updatedAt: now,
|
|
288
|
-
writerId
|
|
285
|
+
createdAt: new Date().toISOString()
|
|
289
286
|
})
|
|
290
287
|
}
|
|
291
288
|
|
|
@@ -302,24 +299,28 @@ export function Notes() {
|
|
|
302
299
|
}
|
|
303
300
|
```
|
|
304
301
|
|
|
305
|
-
Entity payloads
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
302
|
+
Entity payloads carry `updatedAt` and `writerId`, the last-write-wins pair that
|
|
303
|
+
settles concurrent multi-client edits of the same entity -- but stamping them is
|
|
304
|
+
the library's job, not yours: `insert`, `update`, and `upsert` stamp a fresh
|
|
305
|
+
pair on every write, overwriting anything the caller supplied, so a payload can
|
|
306
|
+
never reach the replica unstamped. Keep the two fields in your payload type (the
|
|
307
|
+
stored rows carry them), and simply omit them at the call site.
|
|
311
308
|
|
|
312
|
-
|
|
313
|
-
|
|
309
|
+
`useSession().writerId` exposes the resolved id for display or debugging;
|
|
310
|
+
outside React, `getWriterId({ storageKeyPrefix })` resolves it under the same
|
|
311
|
+
prefix your config declares. Neither is needed to write.
|
|
312
|
+
|
|
313
|
+
A collection can additionally answer server-side equality queries, on either
|
|
314
|
+
visibility. Declare the queryable content attributes in the collection config:
|
|
314
315
|
|
|
315
316
|
```ts
|
|
316
317
|
{ key: 'posts', id: 'microblog-posts', visibility: 'public',
|
|
317
318
|
indexes: ['author', 'inReplyTo'] }
|
|
318
319
|
```
|
|
319
320
|
|
|
320
|
-
The sync bootstrap announces the declaration
|
|
321
|
-
|
|
322
|
-
|
|
321
|
+
The sync bootstrap announces the declaration (the server rejects filters on
|
|
322
|
+
undeclared attributes fail-closed), and the entity store's `query` verb runs the
|
|
323
|
+
query:
|
|
323
324
|
|
|
324
325
|
```ts
|
|
325
326
|
const page = await usePosts.getState().query({
|
|
@@ -332,12 +333,52 @@ const page = await usePosts.getState().query({
|
|
|
332
333
|
`query` is a read verb against the server (signed with the granted collection
|
|
333
334
|
capability, so it needs a wallet-connected session), not a sync path: it never
|
|
334
335
|
touches the in-memory Map. Multiple `equals` attributes AND together; values are
|
|
335
|
-
string equality only.
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
336
|
+
string equality only.
|
|
337
|
+
|
|
338
|
+
On a public collection the declaration goes into the collection description, and
|
|
339
|
+
on the wire the query is the collection list endpoint's cacheable
|
|
340
|
+
`filter[attr]=value` GET form. Filter attributes are emitted in sorted order, so
|
|
341
|
+
identical queries produce identical URLs. The same URL also answers anonymously
|
|
342
|
+
for non-app consumers.
|
|
343
|
+
|
|
344
|
+
#### Queries on a private collection
|
|
345
|
+
|
|
346
|
+
A private collection answers the same `query` call through the blinded-index
|
|
347
|
+
query profile. Two things have to be true. Declare `indexes` on the collection
|
|
348
|
+
as above, and provision the collection with a blinded-index key. That key
|
|
349
|
+
installs with the collection's first key epoch or never, so the choice belongs
|
|
350
|
+
to whoever provisions the collection -- the wallet in production. In dev, ask
|
|
351
|
+
the provisioner for it:
|
|
352
|
+
|
|
353
|
+
```ts
|
|
354
|
+
await provisionDevGrants({
|
|
355
|
+
serverUrl: 'http://localhost:3002',
|
|
356
|
+
seed: mySeedBytes,
|
|
357
|
+
collections: [{ id: 'notes', visibility: 'private', blindedIndex: true }]
|
|
358
|
+
})
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
The sync bootstrap then declares the attributes in the collection's own
|
|
362
|
+
encrypted metadata, so every recipient of the collection discovers what is
|
|
363
|
+
queryable without out-of-band coordination. Only attributes not already declared
|
|
364
|
+
are written, so a returning session declares nothing. A collection provisioned
|
|
365
|
+
without the key is warned about and keeps replicating in full; only its queries
|
|
366
|
+
are unavailable.
|
|
367
|
+
|
|
368
|
+
On the wire, attribute names and values are blinded in the browser with the
|
|
369
|
+
collection's blinding key before the request is sent. The server matches opaque
|
|
370
|
+
tokens and never sees the names or the values, and the returned envelopes are
|
|
371
|
+
decrypted locally.
|
|
372
|
+
|
|
373
|
+
Two limitations to plan around. Declarations are prospective: a document written
|
|
374
|
+
before its attribute was declared carries no blinded entry for it, and stays
|
|
375
|
+
unfindable until it is rewritten. And documents written through this library's
|
|
376
|
+
own replication path do not yet carry blinded index entries at all, because the
|
|
377
|
+
sync doc cipher underneath does not carry the index schema yet. Today a blinded
|
|
378
|
+
query therefore finds only documents written through an index-aware path, such
|
|
379
|
+
as the wallet's own writes or `@interop/was-client`'s `Collection.add`. Those
|
|
380
|
+
writes light up in a future `@interop/was-client` release, and existing
|
|
381
|
+
documents become findable once rewritten.
|
|
341
382
|
|
|
342
383
|
### Share links (publish-copy)
|
|
343
384
|
|
|
@@ -15,58 +15,42 @@
|
|
|
15
15
|
* @see https://w3c-ccg.github.io/vp-request-spec/
|
|
16
16
|
*/
|
|
17
17
|
import type { IVerifiableCredential, IVerifiablePresentation, IZcap } from '@interop/data-integrity-core';
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
* `challenge` / `domain` used when a DID Authentication proof is requested.
|
|
21
|
-
*/
|
|
22
|
-
export type IVPRDetails = {
|
|
23
|
-
query: IVPRQuery | IVPRQuery[];
|
|
24
|
-
challenge?: string;
|
|
25
|
-
domain?: string;
|
|
26
|
-
};
|
|
27
|
-
export type IVPRQuery = IDIDAuthenticationQuery | IAppConnectQuery;
|
|
18
|
+
import type { ICapabilityQueryDetail, IDIDAuthenticationQuery, IVPRDetails as IUpstreamVPRDetails } from '@interop/data-integrity-core/vpr';
|
|
19
|
+
import type { IAppConnectCapabilityQuery, IAppConnectQuery as IUpstreamAppConnectQuery } from '@interop/wallet-core/request';
|
|
28
20
|
/**
|
|
29
21
|
* A request for a proof of DID Authentication (a signed VerifiablePresentation
|
|
30
|
-
* over the request's `challenge` / `domain`)
|
|
22
|
+
* over the request's `challenge` / `domain`), and a single requested capability
|
|
23
|
+
* (which actions the RP wants on which storage target, with an optional
|
|
24
|
+
* human-readable `reason` and RP-chosen `referenceId`). Both are owned by
|
|
25
|
+
* `@interop/data-integrity-core`'s VPR vocabulary.
|
|
31
26
|
*
|
|
32
27
|
* @see https://w3c-ccg.github.io/vp-request-spec/#the-did-authentication-query-format
|
|
33
28
|
*/
|
|
34
|
-
export type IDIDAuthenticationQuery
|
|
35
|
-
type: 'DIDAuthentication';
|
|
36
|
-
acceptedMethods?: Array<{
|
|
37
|
-
method: string;
|
|
38
|
-
}>;
|
|
39
|
-
acceptedCryptosuites?: Array<{
|
|
40
|
-
cryptosuite: string;
|
|
41
|
-
}>;
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* A single requested capability: which actions (`allowedAction`) the RP
|
|
45
|
-
* (`controller`) wants on which storage target (`invocationTarget`), with an
|
|
46
|
-
* optional human-readable `reason` and RP-chosen `referenceId`. The
|
|
47
|
-
* `invocationTarget` is either a plain URL (satisfied only under the user's own
|
|
48
|
-
* Space) or a wallet-defined descriptor object
|
|
49
|
-
* (`https://w3id.org/byoe#private-collection`), resolved by
|
|
50
|
-
* `resolveInvocationTarget`. Login requests only ever ask for
|
|
51
|
-
* collection-scoped capabilities.
|
|
52
|
-
*/
|
|
53
|
-
export type ICapabilityQueryDetail = {
|
|
54
|
-
referenceId?: string;
|
|
55
|
-
reason?: string;
|
|
56
|
-
allowedAction?: string | string[];
|
|
57
|
-
controller: string;
|
|
58
|
-
invocationTarget: string | {
|
|
59
|
-
type: string;
|
|
60
|
-
name?: string;
|
|
61
|
-
};
|
|
62
|
-
};
|
|
29
|
+
export type { ICapabilityQueryDetail, IDIDAuthenticationQuery };
|
|
63
30
|
/**
|
|
64
31
|
* A single App Connect capability request: the existing
|
|
65
32
|
* {@link ICapabilityQueryDetail} shape MINUS `controller` (the wallet fills it
|
|
66
33
|
* with the app-key subject DID it matched or minted) and MINUS `reason` (the
|
|
67
34
|
* wallet's App Connect consent screen supersedes per-grant reason lines).
|
|
68
35
|
*/
|
|
69
|
-
export type IAppConnectCapabilityQuery
|
|
36
|
+
export type { IAppConnectCapabilityQuery };
|
|
37
|
+
/**
|
|
38
|
+
* The body of a Verifiable Presentation Request: one or more queries, plus the
|
|
39
|
+
* `challenge` / `domain` used when a DID Authentication proof is requested.
|
|
40
|
+
* The upstream shape, narrowed to the queries this library emits: `query` is
|
|
41
|
+
* required (every request composed here carries one) and ranges over
|
|
42
|
+
* {@link IVPRQuery}, which adds the App Connect query the upstream union does
|
|
43
|
+
* not carry.
|
|
44
|
+
*/
|
|
45
|
+
export type IVPRDetails = Omit<IUpstreamVPRDetails, 'query'> & {
|
|
46
|
+
query: IVPRQuery | IVPRQuery[];
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* The queries this library composes into a request. The VPR vocabulary leaves
|
|
50
|
+
* the union open for wallet-specific extensions, so App Connect is added here
|
|
51
|
+
* rather than upstream.
|
|
52
|
+
*/
|
|
53
|
+
export type IVPRQuery = IDIDAuthenticationQuery | IAppConnectQuery;
|
|
70
54
|
/**
|
|
71
55
|
* The one-popup App Connect query: it names the requesting app -- `name` for
|
|
72
56
|
* the consent screen, and `appUrl`, the application's canonical URL (absolute,
|
|
@@ -78,14 +62,13 @@ export type IAppConnectCapabilityQuery = Omit<ICapabilityQueryDetail, 'controlle
|
|
|
78
62
|
* UNSATISFIABLE (the intended fail-closed behavior -- see `verifyResponse` /
|
|
79
63
|
* `loginFlow`), so an older wallet cannot silently degrade the login.
|
|
80
64
|
*
|
|
65
|
+
* The upstream shape with `capabilityQuery` required: a wallet must tolerate a
|
|
66
|
+
* query that grants nothing, but every request this library composes names the
|
|
67
|
+
* collections it wants.
|
|
68
|
+
*
|
|
81
69
|
* @see https://w3c.github.io/vcalm/ -- AuthorizationCapabilityQuery
|
|
82
70
|
*/
|
|
83
|
-
export type IAppConnectQuery = {
|
|
84
|
-
type: 'AppConnectQuery';
|
|
85
|
-
app: {
|
|
86
|
-
name: string;
|
|
87
|
-
appUrl: string;
|
|
88
|
-
};
|
|
71
|
+
export type IAppConnectQuery = IUpstreamAppConnectQuery & {
|
|
89
72
|
capabilityQuery: IAppConnectCapabilityQuery | IAppConnectCapabilityQuery[];
|
|
90
73
|
};
|
|
91
74
|
export type { IVerifiableCredential, IVerifiablePresentation, IZcap };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"walletRequestTypes.d.ts","sourceRoot":"","sources":["../../src/auth/walletRequestTypes.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EACV,qBAAqB,EACrB,uBAAuB,EACvB,KAAK,EACN,MAAM,8BAA8B,CAAA;
|
|
1
|
+
{"version":3,"file":"walletRequestTypes.d.ts","sourceRoot":"","sources":["../../src/auth/walletRequestTypes.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EACV,qBAAqB,EACrB,uBAAuB,EACvB,KAAK,EACN,MAAM,8BAA8B,CAAA;AACrC,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,WAAW,IAAI,mBAAmB,EACnC,MAAM,kCAAkC,CAAA;AACzC,OAAO,KAAK,EACV,0BAA0B,EAC1B,gBAAgB,IAAI,wBAAwB,EAC7C,MAAM,8BAA8B,CAAA;AAErC;;;;;;;;GAQG;AACH,YAAY,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,CAAA;AAE/D;;;;;GAKG;AACH,YAAY,EAAE,0BAA0B,EAAE,CAAA;AAE1C;;;;;;;GAOG;AACH,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,mBAAmB,EAAE,OAAO,CAAC,GAAG;IAC7D,KAAK,EAAE,SAAS,GAAG,SAAS,EAAE,CAAA;CAC/B,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,uBAAuB,GAAG,gBAAgB,CAAA;AAElE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,gBAAgB,GAAG,wBAAwB,GAAG;IACxD,eAAe,EAAE,0BAA0B,GAAG,0BAA0B,EAAE,CAAA;CAC3E,CAAA;AAED,YAAY,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,KAAK,EAAE,CAAA"}
|
package/dist/config.d.ts
CHANGED
|
@@ -55,10 +55,19 @@ export interface WasCollectionConfig {
|
|
|
55
55
|
/**
|
|
56
56
|
* The content attributes the server indexes for equality queries
|
|
57
57
|
* (`store.query({ equals })`), e.g. `['author', 'inReplyTo']`. Declared here
|
|
58
|
-
* so the sync bootstrap can announce them
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
58
|
+
* so the sync bootstrap can announce them; an undeclared attribute is
|
|
59
|
+
* rejected fail-closed before any request. How they are announced depends on
|
|
60
|
+
* the collection's visibility:
|
|
61
|
+
*
|
|
62
|
+
* - on a PUBLIC (plaintext) collection they are written into the collection
|
|
63
|
+
* description and served by the plaintext `filter[attr]=value` GET;
|
|
64
|
+
* - on a PRIVATE (encrypted) collection they are declared as blinded-index
|
|
65
|
+
* attributes in the collection's own encrypted metadata and served by the
|
|
66
|
+
* `blinded-index` query profile. That requires the collection to have been
|
|
67
|
+
* provisioned with a blinded-index (blinding) key -- the key is installed
|
|
68
|
+
* with the collection's first key epoch or never -- and the declarations
|
|
69
|
+
* are prospective: a document written before its attribute was declared
|
|
70
|
+
* carries no blinded entry for it and is not findable until rewritten.
|
|
62
71
|
*/
|
|
63
72
|
indexes?: string[];
|
|
64
73
|
}
|
|
@@ -258,11 +267,12 @@ export declare const DEFAULT_EXPIRY_WATCH_MS: number;
|
|
|
258
267
|
* fall back to either mode), the encrypted-but-public combination: the same
|
|
259
268
|
* WAS collection id registered under conflicting visibilities, which would
|
|
260
269
|
* treat one server-side collection as both encrypted (private) and plaintext
|
|
261
|
-
* (public), and malformed `indexes` declarations (
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
*
|
|
270
|
+
* (public), and malformed `indexes` declarations (empty or duplicate attribute
|
|
271
|
+
* names, and the same WAS collection id declared with diverging index sets).
|
|
272
|
+
* Indexes are valid on either visibility -- a public collection serves them
|
|
273
|
+
* over the plaintext filter GET, a private one over the blinded-index query
|
|
274
|
+
* profile -- so only their shape is checked here. Called by the storage layer
|
|
275
|
+
* before any replica is opened.
|
|
266
276
|
*
|
|
267
277
|
* @param collections {WasCollectionConfig[]} the collection registry
|
|
268
278
|
* @returns {void}
|
|
@@ -288,15 +298,15 @@ export declare function validateSharedCollections({ collections, sharedCollectio
|
|
|
288
298
|
sharedCollections?: SharedCollectionConfig[];
|
|
289
299
|
}): void;
|
|
290
300
|
/**
|
|
291
|
-
*
|
|
301
|
+
* Whether a collection entry is public (world-readable plaintext), resolving
|
|
302
|
+
* the registry default (an omitted `visibility` means `'private'`). The one
|
|
303
|
+
* shared reading of the `visibility` field: branch sites dispatch through this
|
|
304
|
+
* predicate rather than comparing the raw, possibly-undefined field, so a
|
|
305
|
+
* future visibility mode extends here instead of at every site.
|
|
292
306
|
*
|
|
293
|
-
* @param
|
|
294
|
-
* @param
|
|
295
|
-
* @
|
|
296
|
-
* @returns {string | undefined}
|
|
307
|
+
* @param collection {object}
|
|
308
|
+
* @param [collection.visibility] {string}
|
|
309
|
+
* @returns {boolean}
|
|
297
310
|
*/
|
|
298
|
-
export declare function
|
|
299
|
-
collections: WasCollectionConfig[];
|
|
300
|
-
id: string;
|
|
301
|
-
}): string | undefined;
|
|
311
|
+
export declare function isPublicCollection({ visibility }: Pick<WasCollectionConfig, 'visibility'>): boolean;
|
|
302
312
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAA;IACjC
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAA;IACjC;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CACnB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;CACX;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;O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,KAAK,IAAI,CAAA;IAC5B;;OAEG;IACH,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAA;AAE9D;;GAEG;AACH,eAAO,MAAM,eAAe,cAAc,CAAA;AAE1C;;;GAGG;AACH,eAAO,MAAM,kBAAkB,gBAAgB,CAAA;AAE/C;;GAEG;AACH,eAAO,MAAM,0BAA0B,eAAe,CAAA;AAEtD;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,QAAQ,CAAA;AAEzC;;GAEG;AACH,eAAO,MAAM,yBAAyB,QAAiB,CAAA;AAEvD;;GAEG;AACH,eAAO,MAAM,uBAAuB,QAAY,CAAA;AAEhD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,mBAAmB,EAAE,GAAG,IAAI,CAkD5E;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,WAAW,EACX,iBAAsB,EACvB,EAAE;IACD,WAAW,EAAE,mBAAmB,EAAE,CAAA;IAClC,iBAAiB,CAAC,EAAE,sBAAsB,EAAE,CAAA;CAC7C,GAAG,IAAI,CAiCP;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,UAAU,EACX,EAAE,IAAI,CAAC,mBAAmB,EAAE,YAAY,CAAC,GAAG,OAAO,CAEnD"}
|
package/dist/config.js
CHANGED
|
Binary file
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAgPA;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAA;AAE1C;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAA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ACH,MAAM,UAAU,kBAAkB,CAAC,EACjC,UAAU,EAC8B;IACxC,OAAO,CAAC,UAAU,IAAI,SAAS,CAAC,KAAK,QAAQ,CAAA;AAC/C,CAAC"}
|
|
@@ -53,9 +53,12 @@ export interface ProvisionDevGrantsResult {
|
|
|
53
53
|
* app DID the grants are delegated to is derived from it
|
|
54
54
|
* @param options.collections {Array<string | object>} the WAS collections to
|
|
55
55
|
* create and grant: a bare id string (private by default) or
|
|
56
|
-
* `{ id, visibility }`. A private collection is declared `edv`
|
|
57
|
-
* epoch[0] roster (sole recipient: the app's identity
|
|
58
|
-
* public one stays plaintext
|
|
56
|
+
* `{ id, visibility, blindedIndex }`. A private collection is declared `edv`
|
|
57
|
+
* and gets its epoch[0] roster (sole recipient: the app's identity
|
|
58
|
+
* key-agreement key); a public one stays plaintext. `blindedIndex: true`
|
|
59
|
+
* additionally installs the collection's blinded-index key with that first
|
|
60
|
+
* epoch, which is the only moment it can be installed; it is ignored with a
|
|
61
|
+
* warning on a public collection, which is plaintext and needs no blinding
|
|
59
62
|
* @param [options.spaceName] {string} human-readable Space name (defaults to
|
|
60
63
|
* `'Dev Space'`)
|
|
61
64
|
* @param [options.outFile] {string} when given, the `{ grants }` JSON is
|
|
@@ -79,6 +82,7 @@ export declare function provisionDevGrants({ serverUrl, seed, collections, space
|
|
|
79
82
|
collections: Array<string | {
|
|
80
83
|
id: string;
|
|
81
84
|
visibility?: 'private' | 'public';
|
|
85
|
+
blindedIndex?: boolean;
|
|
82
86
|
}>;
|
|
83
87
|
spaceName?: string;
|
|
84
88
|
outFile?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provisionDevGrants.d.ts","sourceRoot":"","sources":["../../src/dev/provisionDevGrants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"provisionDevGrants.d.ts","sourceRoot":"","sources":["../../src/dev/provisionDevGrants.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAa,KAAK,WAAW,EAAE,M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,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CAChC,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAuIpC"}
|
|
@@ -11,8 +11,10 @@
|
|
|
11
11
|
* mirroring what a wallet does when it provisions RP-requested collections:
|
|
12
12
|
* a PRIVATE collection is declared `edv` and gets its epoch[0] roster
|
|
13
13
|
* installed (`ensureFirstEpoch`) with the app's identity key-agreement key
|
|
14
|
-
* as the sole recipient -- epoch-from-birth, no plaintext interlude
|
|
15
|
-
*
|
|
14
|
+
* as the sole recipient -- epoch-from-birth, no plaintext interlude, and
|
|
15
|
+
* optionally a blinded-index key alongside it (`blindedIndex: true`, which
|
|
16
|
+
* installs with the first epoch or never); a PUBLIC collection stays
|
|
17
|
+
* plaintext with no descriptor;
|
|
16
18
|
* 3. delegates a per-collection read/write zcap to the app's controller DID;
|
|
17
19
|
* 4. returns the signed grants and (optionally) writes them to a JSON file the
|
|
18
20
|
* app loads in dev-sync mode;
|
|
@@ -68,9 +70,12 @@ async function provisionerClient({ serverUrl, seed }) {
|
|
|
68
70
|
* app DID the grants are delegated to is derived from it
|
|
69
71
|
* @param options.collections {Array<string | object>} the WAS collections to
|
|
70
72
|
* create and grant: a bare id string (private by default) or
|
|
71
|
-
* `{ id, visibility }`. A private collection is declared `edv`
|
|
72
|
-
* epoch[0] roster (sole recipient: the app's identity
|
|
73
|
-
* public one stays plaintext
|
|
73
|
+
* `{ id, visibility, blindedIndex }`. A private collection is declared `edv`
|
|
74
|
+
* and gets its epoch[0] roster (sole recipient: the app's identity
|
|
75
|
+
* key-agreement key); a public one stays plaintext. `blindedIndex: true`
|
|
76
|
+
* additionally installs the collection's blinded-index key with that first
|
|
77
|
+
* epoch, which is the only moment it can be installed; it is ignored with a
|
|
78
|
+
* warning on a public collection, which is plaintext and needs no blinding
|
|
74
79
|
* @param [options.spaceName] {string} human-readable Space name (defaults to
|
|
75
80
|
* `'Dev Space'`)
|
|
76
81
|
* @param [options.outFile] {string} when given, the `{ grants }` JSON is
|
|
@@ -119,7 +124,7 @@ actions = RW_ACTIONS, probe = false, log = () => { } }) {
|
|
|
119
124
|
// `Promise.all` preserves input order, so `grants[i]` still corresponds to
|
|
120
125
|
// `collections[i]` (the probe below relies on that for `[0]`).
|
|
121
126
|
const grants = await Promise.all(collections.map(async (entry) => {
|
|
122
|
-
const { id, visibility = 'private' } = typeof entry === 'string' ? { id: entry } : entry;
|
|
127
|
+
const { id, visibility = 'private', blindedIndex = false } = typeof entry === 'string' ? { id: entry } : entry;
|
|
123
128
|
// A private collection mirrors wallet provisioning: declared `edv` at
|
|
124
129
|
// creation, epoch[0] installed with the app's identity key-agreement
|
|
125
130
|
// key as the sole recipient (the roster entry a wallet would write for
|
|
@@ -132,11 +137,18 @@ actions = RW_ACTIONS, probe = false, log = () => { } }) {
|
|
|
132
137
|
})
|
|
133
138
|
});
|
|
134
139
|
if (visibility === 'private') {
|
|
140
|
+
// The blinding key rides along with the first epoch or is never
|
|
141
|
+
// installed at all, so the choice is made here and nowhere later.
|
|
135
142
|
await ensureFirstEpoch({
|
|
136
143
|
collection,
|
|
137
|
-
recipients: [ownerRecipient({ keyAgreementKey })]
|
|
144
|
+
recipients: [ownerRecipient({ keyAgreementKey })],
|
|
145
|
+
...(blindedIndex && { blindedIndex: true })
|
|
138
146
|
});
|
|
139
147
|
}
|
|
148
|
+
else if (blindedIndex) {
|
|
149
|
+
log(` collection "${id}": ignoring blindedIndex on a public ` +
|
|
150
|
+
`(plaintext) collection -- there is nothing to blind`);
|
|
151
|
+
}
|
|
140
152
|
const zcap = await provisioner.grant({
|
|
141
153
|
to: appDid,
|
|
142
154
|
actions,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provisionDevGrants.js","sourceRoot":"","sources":["../../src/dev/provisionDevGrants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"provisionDevGrants.js","sourceRoot":"","sources":["../../src/dev/provisionDevGrants.ts"],"names":[],"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,KAAK,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAA;IAC1D,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
|
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
import type { IVerifiableCredential, IVerifiablePresentation } from '@interop/data-integrity-core';
|
|
2
|
+
import { APP_KEY_CREDENTIAL_TYPE, APP_KEY_TYPE_ARRAY } from '@interop/wallet-core/request';
|
|
2
3
|
import { type IdentityAgents } from './agents.js';
|
|
3
4
|
import type { DocumentLoader } from './documentLoader.js';
|
|
4
5
|
/**
|
|
5
|
-
* The
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* refuse a foreign app key at store time.
|
|
6
|
+
* The pinned wire constants of the app-key credential, owned by
|
|
7
|
+
* `@interop/wallet-core/request` (the wallet mints against the same values) and
|
|
8
|
+
* re-exported here so an application reads them from one place:
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* the
|
|
10
|
+
* - `APP_KEY_CREDENTIAL_TYPE` -- the marker type every app key carries, mapped
|
|
11
|
+
* to one stable IRI for every app by the hosted App Connect context. It makes
|
|
12
|
+
* "presents as an app key" a term check rather than a shape heuristic, which
|
|
13
|
+
* is what lets the wallet refuse a foreign app key at store time. It is a
|
|
14
|
+
* self-declaration, not evidence: the `type` array of a planted credential is
|
|
15
|
+
* attacker-controlled like the rest of it. The marker makes the rule precise;
|
|
16
|
+
* the seed-to-DID binding `parseSeedCredential` enforces remains the only
|
|
17
|
+
* thing that authenticates.
|
|
18
|
+
* - `APP_KEY_TYPE_ARRAY` -- the credential's fixed two-entry `type` array, in
|
|
19
|
+
* that order.
|
|
14
20
|
*/
|
|
15
|
-
export
|
|
16
|
-
/**
|
|
17
|
-
* The credential's fixed two-entry `type` array, in this order.
|
|
18
|
-
*/
|
|
19
|
-
export declare const APP_KEY_TYPE_ARRAY: readonly string[];
|
|
21
|
+
export { APP_KEY_CREDENTIAL_TYPE, APP_KEY_TYPE_ARRAY };
|
|
20
22
|
/**
|
|
21
23
|
* A parsed and structurally validated seed credential.
|
|
22
24
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seedCredential.d.ts","sourceRoot":"","sources":["../../src/identity/seedCredential.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EACV,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,8BAA8B,CAAA;AAGrC,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAA;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAIzD
|
|
1
|
+
{"version":3,"file":"seedCredential.d.ts","sourceRoot":"","sources":["../../src/identity/seedCredential.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EACV,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EACnB,MAAM,8BAA8B,CAAA;AAGrC,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAA;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAIzD;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,CAAA;AAEtD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,UAAU,CAAA;IAChB,aAAa,EAAE,MAAM,CAAA;IACrB;;;;OAIG;IACH,QAAQ,EAAE,cAAc,CAAA;CACzB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAE1D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAEzD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,mBAAmB,CAAC,EACxC,IAAI,EACJ,MAAM,EACN,MAAM,EACN,OAAO,EACP,cAAc,EACf,EAAE;IACD,IAAI,EAAE,UAAU,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,cAAc,EAAE,cAAc,CAAA;CAC/B,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAuBjC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,mBAAmB,CAAC,EACxC,UAAU,EACV,MAAM,EACN,MAAM,EACP,EAAE;IACD,UAAU,EAAE,qBAAqB,CAAA;IACjC,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;CACf,GAAG,OAAO,CAAC,oBAAoB,CAAC,CA2DhC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,YAAY,EACZ,MAAM,EACP,EAAE;IACD,YAAY,EAAE,uBAAuB,CAAA;IACrC,MAAM,EAAE,MAAM,CAAA;CACf,GAAG,qBAAqB,GAAG,IAAI,CAW/B"}
|
|
@@ -24,29 +24,28 @@
|
|
|
24
24
|
import { base64urlnopad } from '@scure/base';
|
|
25
25
|
import * as vc from '@interop/vc';
|
|
26
26
|
import { Ed25519Signature2020 } from '@interop/ed25519-signature';
|
|
27
|
+
import { APP_KEY_CREDENTIAL_TYPE, APP_KEY_TYPE_ARRAY } from '@interop/wallet-core/request';
|
|
27
28
|
import { CONTEXT_URL_V1 } from 'byoe-context';
|
|
28
29
|
import { asArray } from '../jsonLd.js';
|
|
29
30
|
import { deriveIdentity } from './agents.js';
|
|
30
31
|
const VC_1_CONTEXT_URL = 'https://www.w3.org/2018/credentials/v1';
|
|
31
32
|
/**
|
|
32
|
-
* The
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* refuse a foreign app key at store time.
|
|
33
|
+
* The pinned wire constants of the app-key credential, owned by
|
|
34
|
+
* `@interop/wallet-core/request` (the wallet mints against the same values) and
|
|
35
|
+
* re-exported here so an application reads them from one place:
|
|
36
36
|
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* the
|
|
37
|
+
* - `APP_KEY_CREDENTIAL_TYPE` -- the marker type every app key carries, mapped
|
|
38
|
+
* to one stable IRI for every app by the hosted App Connect context. It makes
|
|
39
|
+
* "presents as an app key" a term check rather than a shape heuristic, which
|
|
40
|
+
* is what lets the wallet refuse a foreign app key at store time. It is a
|
|
41
|
+
* self-declaration, not evidence: the `type` array of a planted credential is
|
|
42
|
+
* attacker-controlled like the rest of it. The marker makes the rule precise;
|
|
43
|
+
* the seed-to-DID binding `parseSeedCredential` enforces remains the only
|
|
44
|
+
* thing that authenticates.
|
|
45
|
+
* - `APP_KEY_TYPE_ARRAY` -- the credential's fixed two-entry `type` array, in
|
|
46
|
+
* that order.
|
|
41
47
|
*/
|
|
42
|
-
export
|
|
43
|
-
/**
|
|
44
|
-
* The credential's fixed two-entry `type` array, in this order.
|
|
45
|
-
*/
|
|
46
|
-
export const APP_KEY_TYPE_ARRAY = Object.freeze([
|
|
47
|
-
'VerifiableCredential',
|
|
48
|
-
APP_KEY_CREDENTIAL_TYPE
|
|
49
|
-
]);
|
|
48
|
+
export { APP_KEY_CREDENTIAL_TYPE, APP_KEY_TYPE_ARRAY };
|
|
50
49
|
/**
|
|
51
50
|
* Encodes bytes as base64url (no padding), browser- and Node-safe.
|
|
52
51
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seedCredential.js","sourceRoot":"","sources":["../../src/identity/seedCredential.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,KAAK,EAAE,MAAM,aAAa,CAAA;AACjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAKjE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CA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