@interop/was-react 0.7.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -45,12 +45,12 @@ export interface LoginConfig {
45
45
  appName: string;
46
46
  /**
47
47
  * The collections to request read/write grants for (WAS collection id +
48
- * visibility; `'public'` selects the `urn:was:public-collection` descriptor).
48
+ * visibility; `'public'` selects the `https://w3id.org/byoe#public-collection` descriptor).
49
49
  */
50
50
  collections: GrantRequestCollection[];
51
51
  /**
52
52
  * WAS collection ids of wallet-owned collections to request read-and-decrypt
53
- * access to (the `urn:was:shared-collection` grant). Read-only; never
53
+ * access to (the `https://w3id.org/byoe#shared-collection` grant). Read-only; never
54
54
  * replicated.
55
55
  */
56
56
  sharedCollections?: string[];
@@ -15,7 +15,7 @@
15
15
  *
16
16
  * Only collection-scoped capabilities are requested (no whole-space grant). A
17
17
  * `visibility: 'public'` collection is requested with the distinct descriptor
18
- * type `urn:was:public-collection` (the wallet provisions it plaintext with a
18
+ * type `https://w3id.org/byoe#public-collection` (the wallet provisions it plaintext with a
19
19
  * collection-level public-read policy and renders a world-readable consent
20
20
  * warning); wallets that predate the type render it UNSATISFIABLE, which is the
21
21
  * intended fail-closed behavior -- an older wallet must not silently provision a
@@ -24,10 +24,10 @@
24
24
  * fails closed rather than degrading into a partial generic flow.
25
25
  *
26
26
  * A SHARED collection -- one the wallet already owns and encrypts, which the app
27
- * asks to read and decrypt -- uses the `urn:was:shared-collection` descriptor
27
+ * asks to read and decrypt -- uses the `https://w3id.org/byoe#shared-collection` descriptor
28
28
  * type, and the actions are read-only by construction ({@link SHARED_ACTIONS}):
29
29
  * the app never requests writes on a wallet collection. Exactly like
30
- * `urn:was:public-collection`, a wallet that predates the type resolves the
30
+ * `https://w3id.org/byoe#public-collection`, a wallet that predates the type resolves the
31
31
  * descriptor UNSATISFIABLE and fails closed -- which is the point here. A share
32
32
  * fuses two axes (a read zcap AND an entry in the collection's key-epoch
33
33
  * roster), so a wallet that granted only the zcap would hand the app ciphertext
@@ -61,7 +61,7 @@ export interface GrantRequestCollection {
61
61
  id: string;
62
62
  /**
63
63
  * Who can read the collection; selects the descriptor type
64
- * (`urn:was:collection` for `'private'`/unset, `urn:was:public-collection`
64
+ * (`https://w3id.org/byoe#collection` for `'private'`/unset, `https://w3id.org/byoe#public-collection`
65
65
  * for `'public'`).
66
66
  */
67
67
  visibility?: 'private' | 'public';
@@ -80,8 +80,8 @@ export declare function newChallenge(): string;
80
80
  * shape MINUS `controller` (the wallet fills it with the app-key subject DID)
81
81
  * and MINUS `reason` (the App Connect consent screen supersedes per-grant
82
82
  * reasons). A `visibility: 'public'` collection uses the
83
- * `urn:was:public-collection` descriptor type; everything else uses
84
- * `urn:was:collection`.
83
+ * `https://w3id.org/byoe#public-collection` descriptor type; everything else uses
84
+ * `https://w3id.org/byoe#collection`.
85
85
  *
86
86
  * @param options {object}
87
87
  * @param options.challenge {string}
@@ -94,7 +94,7 @@ export declare function newChallenge(): string;
94
94
  * request (WAS collection id + visibility)
95
95
  * @param [options.sharedCollections] {string[]} WAS collection ids of
96
96
  * wallet-owned collections to request read-and-decrypt access to; each gets a
97
- * `urn:was:shared-collection` descriptor with {@link SHARED_ACTIONS}
97
+ * `https://w3id.org/byoe#shared-collection` descriptor with {@link SHARED_ACTIONS}
98
98
  * @param [options.actions] {string[]} the RW action set (defaults to
99
99
  * `RW_ACTIONS`)
100
100
  * @returns {IVPRDetails}
@@ -1 +1 @@
1
- {"version":3,"file":"loginRequest.d.ts","sourceRoot":"","sources":["../../src/auth/loginRequest.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAA;AACzE,OAAO,KAAK,EAEV,WAAW,EACZ,MAAM,yBAAyB,CAAA;AAEhC;;GAEG;AACH,eAAO,MAAM,UAAU,UAA2C,CAAA;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YAAY,IAAI,MAAM,CAErC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,MAAM,EACN,OAAO,EACP,UAAU,EACV,WAAW,EACX,iBAAsB,EACtB,OAAoB,EACrB,EAAE;IACD,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,oBAAoB,CAAA;IAChC,WAAW,EAAE,sBAAsB,EAAE,CAAA;IACrC,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC5B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CACnB,GAAG,WAAW,CA2Cd"}
@@ -24,8 +24,8 @@ export function newChallenge() {
24
24
  * shape MINUS `controller` (the wallet fills it with the app-key subject DID)
25
25
  * and MINUS `reason` (the App Connect consent screen supersedes per-grant
26
26
  * reasons). A `visibility: 'public'` collection uses the
27
- * `urn:was:public-collection` descriptor type; everything else uses
28
- * `urn:was:collection`.
27
+ * `https://w3id.org/byoe#public-collection` descriptor type; everything else uses
28
+ * `https://w3id.org/byoe#collection`.
29
29
  *
30
30
  * @param options {object}
31
31
  * @param options.challenge {string}
@@ -38,7 +38,7 @@ export function newChallenge() {
38
38
  * request (WAS collection id + visibility)
39
39
  * @param [options.sharedCollections] {string[]} WAS collection ids of
40
40
  * wallet-owned collections to request read-and-decrypt access to; each gets a
41
- * `urn:was:shared-collection` descriptor with {@link SHARED_ACTIONS}
41
+ * `https://w3id.org/byoe#shared-collection` descriptor with {@link SHARED_ACTIONS}
42
42
  * @param [options.actions] {string[]} the RW action set (defaults to
43
43
  * `RW_ACTIONS`)
44
44
  * @returns {IVPRDetails}
@@ -49,8 +49,8 @@ export function buildAppConnectVpr({ challenge, domain, appName, credential, col
49
49
  allowedAction: actions,
50
50
  invocationTarget: {
51
51
  type: visibility === 'public'
52
- ? 'urn:was:public-collection'
53
- : 'urn:was:collection',
52
+ ? 'https://w3id.org/byoe#public-collection'
53
+ : 'https://w3id.org/byoe#collection',
54
54
  name: id
55
55
  }
56
56
  }));
@@ -58,7 +58,10 @@ export function buildAppConnectVpr({ challenge, domain, appName, credential, col
58
58
  capabilityQuery.push({
59
59
  referenceId: id,
60
60
  allowedAction: SHARED_ACTIONS,
61
- invocationTarget: { type: 'urn:was:shared-collection', name: id }
61
+ invocationTarget: {
62
+ type: 'https://w3id.org/byoe#shared-collection',
63
+ name: id
64
+ }
62
65
  });
63
66
  }
64
67
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"loginRequest.js","sourceRoot":"","sources":["../../src/auth/loginRequest.ts"],"names":[],"mappings":"AA8CA;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAA;AAElE;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;AAmB7C;;GAEG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,MAAM,CAAC,UAAU,EAAE,CAAA;AAC5B,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,UAAU,kBAAkB,CAAC,EACjC,SAAS,EACT,MAAM,EACN,OAAO,EACP,UAAU,EACV,WAAW,EACX,iBAAiB,GAAG,EAAE,EACtB,OAAO,GAAG,UAAU,EASrB;IACC,MAAM,eAAe,GAAiC,WAAW,CAAC,GAAG,CACnE,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;QACvB,WAAW,EAAE,EAAE;QACf,aAAa,EAAE,OAAO;QACtB,gBAAgB,EAAE;YAChB,IAAI,EACF,UAAU,KAAK,QAAQ;gBACrB,CAAC,CAAC,2BAA2B;gBAC7B,CAAC,CAAC,oBAAoB;YAC1B,IAAI,EAAE,EAAE;SACT;KACF,CAAC,CACH,CAAA;IACD,KAAK,MAAM,EAAE,IAAI,iBAAiB,EAAE,CAAC;QACnC,eAAe,CAAC,IAAI,CAAC;YACnB,WAAW,EAAE,EAAE;YACf,aAAa,EAAE,cAAc;YAC7B,gBAAgB,EAAE,EAAE,IAAI,EAAE,2BAA2B,EAAE,IAAI,EAAE,EAAE,EAAE;SAClE,CAAC,CAAA;IACJ,CAAC;IACD,OAAO;QACL,KAAK,EAAE;YACL;gBACE,IAAI,EAAE,mBAAmB;gBACzB,eAAe,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;aACrC;YACD;gBACE,IAAI,EAAE,iBAAiB;gBACvB,GAAG,EAAE;oBACH,IAAI,EAAE,OAAO;oBACb,cAAc,EAAE,UAAU,CAAC,cAAc;oBACzC,SAAS,EAAE,UAAU,CAAC,SAAS;iBAChC;gBACD,eAAe;aAChB;SACF;QACD,SAAS;QACT,MAAM;KACP,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"loginRequest.js","sourceRoot":"","sources":["../../src/auth/loginRequest.ts"],"names":[],"mappings":"AA8CA;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAA;AAElE;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;AAmB7C;;GAEG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,MAAM,CAAC,UAAU,EAAE,CAAA;AAC5B,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,UAAU,kBAAkB,CAAC,EACjC,SAAS,EACT,MAAM,EACN,OAAO,EACP,UAAU,EACV,WAAW,EACX,iBAAiB,GAAG,EAAE,EACtB,OAAO,GAAG,UAAU,EASrB;IACC,MAAM,eAAe,GAAiC,WAAW,CAAC,GAAG,CACnE,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;QACvB,WAAW,EAAE,EAAE;QACf,aAAa,EAAE,OAAO;QACtB,gBAAgB,EAAE;YAChB,IAAI,EACF,UAAU,KAAK,QAAQ;gBACrB,CAAC,CAAC,yCAAyC;gBAC3C,CAAC,CAAC,kCAAkC;YACxC,IAAI,EAAE,EAAE;SACT;KACF,CAAC,CACH,CAAA;IACD,KAAK,MAAM,EAAE,IAAI,iBAAiB,EAAE,CAAC;QACnC,eAAe,CAAC,IAAI,CAAC;YACnB,WAAW,EAAE,EAAE;YACf,aAAa,EAAE,cAAc;YAC7B,gBAAgB,EAAE;gBAChB,IAAI,EAAE,yCAAyC;gBAC/C,IAAI,EAAE,EAAE;aACT;SACF,CAAC,CAAA;IACJ,CAAC;IACD,OAAO;QACL,KAAK,EAAE;YACL;gBACE,IAAI,EAAE,mBAAmB;gBACzB,eAAe,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;aACrC;YACD;gBACE,IAAI,EAAE,iBAAiB;gBACvB,GAAG,EAAE;oBACH,IAAI,EAAE,OAAO;oBACb,cAAc,EAAE,UAAU,CAAC,cAAc;oBACzC,SAAS,EAAE,UAAU,CAAC,SAAS;iBAChC;gBACD,eAAe;aAChB;SACF;QACD,SAAS;QACT,MAAM;KACP,CAAA;AACH,CAAC"}
@@ -105,7 +105,7 @@ export type IZcapQuery = {
105
105
  * (`controller`) wants on which storage target (`invocationTarget`), with an
106
106
  * optional human-readable `reason` and RP-chosen `referenceId`. The
107
107
  * `invocationTarget` is either a plain URL (satisfied only under the user's own
108
- * Space) or a wallet-defined descriptor object (`urn:was:collection`), resolved
108
+ * Space) or a wallet-defined descriptor object (`https://w3id.org/byoe#collection`), resolved
109
109
  * by `resolveInvocationTarget`. Login requests only ever ask for
110
110
  * collection-scoped capabilities.
111
111
  */
@@ -1 +1 @@
1
- {"version":3,"file":"seedCredential.d.ts","sourceRoot":"","sources":["../../src/identity/seedCredential.ts"],"names":[],"mapp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E,uBAAuB,CAAA;IACrC,cAAc,EAAE,MAAM,CAAA;CACvB,GAAG,qBAAqB,GAAG,IAAI,CAY/B"}
1
+ {"version":3,"file":"seedCredential.d.ts","sourceRoot":"","sources":["../../src/identity/seedCredential.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EACV,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,8BAA8B,CAAA;AAGrC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAIzD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uBAAuB,qBAAqB,CAAA;AAUzD;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,cAAc,EAAE,MAAM,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,UAAU,CAAA;IAChB,aAAa,EAAE,MAAM,CAAA;CACtB;AAyBD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAE1D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAEzD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,mBAAmB,CAAC,EACxC,IAAI,EACJ,MAAM,EACN,OAAO,EACP,MAAM,EACN,cAAc,EACf,EAAE;IACD,IAAI,EAAE,UAAU,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,oBAAoB,CAAA;IAC5B,cAAc,EAAE,cAAc,CAAA;CAC/B,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA4BjC;AAED;;;;;;;;;;;;;;;;;;GAkBG;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,oBAAoB,CAAA;CAC7B,GAAG,OAAO,CAAC,oBAAoB,CAAC,CA+ChC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,YAAY,EACZ,cAAc,EACf,EAAE;IACD,YAAY,EAAE,uBAAuB,CAAA;IACrC,cAAc,EAAE,MAAM,CAAA;CACvB,GAAG,qBAAqB,GAAG,IAAI,CAY/B"}
@@ -18,6 +18,7 @@
18
18
  import { base64urlnopad } from '@scure/base';
19
19
  import * as vc from '@interop/vc';
20
20
  import { Ed25519Signature2020 } from '@interop/ed25519-signature';
21
+ import { CONTEXT_V1 } from 'byoe-context';
21
22
  import { deriveIdentity } from './agents.js';
22
23
  const VC_1_CONTEXT_URL = 'https://www.w3.org/2018/credentials/v1';
23
24
  /**
@@ -33,23 +34,29 @@ const VC_1_CONTEXT_URL = 'https://www.w3.org/2018/credentials/v1';
33
34
  * the only thing that authenticates.
34
35
  */
35
36
  export const APP_KEY_CREDENTIAL_TYPE = 'AppKeyCredential';
36
- const APP_KEY_CREDENTIAL_TYPE_IRI = 'urn:was:AppKeyCredential';
37
+ /**
38
+ * The shared BYOE term IRIs, taken from the published context rather than
39
+ * restated here.
40
+ */
41
+ const BYOE_TERMS = CONTEXT_V1['@context'];
42
+ const APP_KEY_CREDENTIAL_TYPE_IRI = BYOE_TERMS.AppKeyCredential;
37
43
  /**
38
44
  * Builds the inline context object for the credential's terms, so it stays
39
45
  * verifiable with no remote vocabulary fetch. The marker type and the `seed` /
40
- * `origin` claims carry shared `urn:was:` IRIs -- they mean the same thing for
41
- * every app, so they do not belong under a per-app `vocabBase`, which keeps
42
- * only the app's own type term.
46
+ * `origin` claims carry shared `https://w3id.org/byoe#` IRIs (imported from
47
+ * `byoe-context`) -- they mean the same thing for every app, so they do not
48
+ * belong under a per-app `vocabBase`, which keeps only the app's own type
49
+ * term.
43
50
  */
44
51
  function seedContext({ credentialType, vocabBase }) {
45
52
  return {
46
53
  '@protected': true,
47
54
  [APP_KEY_CREDENTIAL_TYPE]: APP_KEY_CREDENTIAL_TYPE_IRI,
48
55
  [credentialType]: `${vocabBase}${credentialType}`,
49
- seed: 'urn:was:seed',
50
- origin: 'urn:was:origin',
51
- name: 'https://schema.org/name',
52
- description: 'https://schema.org/description'
56
+ seed: BYOE_TERMS.seed,
57
+ origin: BYOE_TERMS.origin,
58
+ name: BYOE_TERMS.name,
59
+ description: BYOE_TERMS.description
53
60
  };
54
61
  }
55
62
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"seedCredential.js","sourceRoot":"","sources":["../../src/identity/seedCredential.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;GAaG;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,aAAa,CAAA;AAG5C,MAAM,gBAAgB,GAAG,wCAAwC,CAAA;AAEjE;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,kBAAkB,CAAA;AAEzD,MAAM,2BAA2B,GAAG,0BAA0B,CAAA;AAoB9D;;;;;;GAMG;AACH,SAAS,WAAW,CAAC,EAAE,cAAc,EAAE,SAAS,EAAwB;IAItE,OAAO;QACL,YAAY,EAAE,IAAI;QAClB,CAAC,uBAAuB,CAAC,EAAE,2BAA2B;QACtD,CAAC,cAAc,CAAC,EAAE,GAAG,SAAS,GAAG,cAAc,EAAE;QACjD,IAAI,EAAE,cAAc;QACpB,MAAM,EAAE,gBAAgB;QACxB,IAAI,EAAE,yBAAyB;QAC/B,WAAW,EAAE,gCAAgC;KAC9C,CAAA;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAiB;IAChD,OAAO,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACrC,CAAC;AAED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,CAAC,MAAM,KAAK,EAAE,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CACb,GAAG,cAAc,sCAAsC,IAAI,CAAC,MAAM,IAAI,CACvE,CAAA;IACH,CAAC;IACD,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,cAAc,CAAC,EAAE,IAAI,EAAE,CAAC,CAAA;IACxD,IAAI,aAAa,KAAK,OAAO,CAAC,EAAE,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CACb,GAAG,cAAc,mDAAmD,CACrE,CAAA;IACH,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,CAAA;AAChC,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,kBAAkB,CAAC,EACjC,YAAY,EACZ,cAAc,EAIf;IACC,MAAM,QAAQ,GAAI,YAAmD;SAClE,oBAAoB,CAAA;IACvB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IAC5E,KAAK,MAAM,KAAK,IAAI,IAAI,EAAE,CAAC;QACzB,MAAM,KAAK,GAAI,KAAsC,CAAC,IAAI,CAAA;QAC1D,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;QACtD,IAAI,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC;YACrC,OAAO,KAA8B,CAAA;QACvC,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC"}
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * SharedCollectionReader: a READ-ONLY view over one wallet-owned encrypted
6
6
  * collection the wallet has shared with this app (the
7
- * `urn:was:shared-collection` grant). It is the app-side other half of the
7
+ * `https://w3id.org/byoe#shared-collection` grant). It is the app-side other half of the
8
8
  * wallet's share flow, and it is read-only BY CONSTRUCTION -- there is no write
9
9
  * verb on this class, the collection is never replicated into RxDB, and the
10
10
  * sync bootstrap never PUTs a description onto it.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@interop/was-react",
3
3
  "description": "React library for building 'Bring Your Own Everything' (BYOE) apps on Wallet Attached Storage: DID Auth login via CHAPI wallet, local-first encrypted storage, and background sync to a WAS server.",
4
- "version": "0.7.0",
4
+ "version": "0.8.1",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "build": "pnpm run clear && tsc",
@@ -50,14 +50,15 @@
50
50
  "@interop/did-method-webvh": "^5.0.0",
51
51
  "@interop/ed25519-signature": "^7.1.4",
52
52
  "@interop/ezcap": "^7.4.1",
53
- "@interop/security-document-loader": "^9.5.0",
53
+ "@interop/security-document-loader": "^9.5.1",
54
54
  "@interop/vc": "^11.0.6",
55
- "@interop/verifier-core": "^3.5.0",
56
- "@interop/wallet-core": "^0.8.0",
57
- "@interop/was-client": "^0.23.0",
55
+ "@interop/verifier-core": "^3.5.2",
56
+ "@interop/wallet-core": "^0.14.0",
57
+ "@interop/was-client": "^0.25.0",
58
58
  "@interop/webkms-client": "^14.7.1",
59
59
  "@interop/x25519-key-agreement-key": "^5.2.1",
60
60
  "@scure/base": "^2.2.0",
61
+ "byoe-context": "^0.2.0",
61
62
  "credential-handler-polyfill": "^4.1.0",
62
63
  "uuidv7": "^1.2.1"
63
64
  },