@interop/wallet-core 0.28.0 → 0.29.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/dist/request/index.d.ts +4 -3
- package/dist/request/index.d.ts.map +1 -1
- package/dist/request/index.js +4 -3
- package/dist/request/index.js.map +1 -1
- package/dist/request/onboarding.d.ts +45 -30
- package/dist/request/onboarding.d.ts.map +1 -1
- package/dist/request/onboarding.js +93 -13
- package/dist/request/onboarding.js.map +1 -1
- package/dist/request/types.d.ts +29 -7
- package/dist/request/types.d.ts.map +1 -1
- package/dist/webvh/did.d.ts +20 -0
- package/dist/webvh/did.d.ts.map +1 -0
- package/dist/webvh/did.js +22 -0
- package/dist/webvh/did.js.map +1 -0
- package/dist/webvh/zcap.d.ts +1 -9
- package/dist/webvh/zcap.d.ts.map +1 -1
- package/dist/webvh/zcap.js +3 -11
- package/dist/webvh/zcap.js.map +1 -1
- package/package.json +1 -1
package/dist/request/index.d.ts
CHANGED
|
@@ -14,9 +14,10 @@
|
|
|
14
14
|
* - `matching` filters stored credentials against a QueryByExample (both the
|
|
15
15
|
* jsonpath deep matcher and the type/issuer matcher).
|
|
16
16
|
* - `onboarding` is the `WalletOnboardingQuery` transport vocabulary: the
|
|
17
|
-
* inviter's compose helper and the enrollee's classification
|
|
18
|
-
*
|
|
19
|
-
*
|
|
17
|
+
* inviter's compose helper and the enrollee's classification, over a query
|
|
18
|
+
* carrying the account pointer (did:webvh id, `spaceId`, `host`) and the
|
|
19
|
+
* account controller did:key (the response envelope itself lives in
|
|
20
|
+
* `@interop/wallet-core/enrollment`, beside the connect code it carries).
|
|
20
21
|
* - `appKey` is the App Connect app-key credential module: the wire constants,
|
|
21
22
|
* the matching / minting / legacy re-issue paths, and the store-time
|
|
22
23
|
* refusal policy.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/request/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/request/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,wBAAwB,CAAA;AACtC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA"}
|
package/dist/request/index.js
CHANGED
|
@@ -14,9 +14,10 @@
|
|
|
14
14
|
* - `matching` filters stored credentials against a QueryByExample (both the
|
|
15
15
|
* jsonpath deep matcher and the type/issuer matcher).
|
|
16
16
|
* - `onboarding` is the `WalletOnboardingQuery` transport vocabulary: the
|
|
17
|
-
* inviter's compose helper and the enrollee's classification
|
|
18
|
-
*
|
|
19
|
-
*
|
|
17
|
+
* inviter's compose helper and the enrollee's classification, over a query
|
|
18
|
+
* carrying the account pointer (did:webvh id, `spaceId`, `host`) and the
|
|
19
|
+
* account controller did:key (the response envelope itself lives in
|
|
20
|
+
* `@interop/wallet-core/enrollment`, beside the connect code it carries).
|
|
20
21
|
* - `appKey` is the App Connect app-key credential module: the wire constants,
|
|
21
22
|
* the matching / minting / legacy re-issue paths, and the store-time
|
|
22
23
|
* refusal policy.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/request/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/request/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,wBAAwB,CAAA;AACtC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA"}
|
|
@@ -1,25 +1,3 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* The `WalletOnboardingQuery` transport vocabulary: the VPR half of "connect a
|
|
6
|
-
* new wallet client over an exchange". An already-enrolled client (the
|
|
7
|
-
* inviter) composes a request body carrying the query and stores it on an
|
|
8
|
-
* ephemeral exchange; a fresh wallet (the enrollee) scans the exchange's
|
|
9
|
-
* interaction URL, classifies the query here, and answers with the onboarding
|
|
10
|
-
* response envelope (`@interop/wallet-core/enrollment`).
|
|
11
|
-
*
|
|
12
|
-
* Vocabulary only -- the enrollment ceremony itself is untouched, and nothing
|
|
13
|
-
* but public key multibases and a display label ever crosses the channel. The
|
|
14
|
-
* query carries exactly one member, `host`: the WAS server base URL, so the
|
|
15
|
-
* enrollee's server field is prefilled instead of typed. It names no account
|
|
16
|
-
* and authorizes nothing.
|
|
17
|
-
*
|
|
18
|
-
* A wallet that predates the query type finds nothing it can satisfy in such a
|
|
19
|
-
* request (`classifyRequest` reports no DID Auth, no credential queries, and
|
|
20
|
-
* no capability requests) and refuses, rather than degrading into a partial
|
|
21
|
-
* generic flow.
|
|
22
|
-
*/
|
|
23
1
|
import type { IVPRDetails, IVPRQuery, IWalletOnboardingRequest } from './types.js';
|
|
24
2
|
/**
|
|
25
3
|
* Validates a wallet-onboarding `host` and returns its serialized form. The
|
|
@@ -45,18 +23,54 @@ import type { IVPRDetails, IVPRQuery, IWalletOnboardingRequest } from './types.j
|
|
|
45
23
|
export declare function serializedOnboardingHost({ host }: {
|
|
46
24
|
host: string;
|
|
47
25
|
}): string;
|
|
26
|
+
/**
|
|
27
|
+
* Validates the account members a `WalletOnboardingQuery` carries and returns
|
|
28
|
+
* them in the classified form: the account's did:webvh `did`, its `spaceId`,
|
|
29
|
+
* the serialized `host`, and the account controller did:key. Compose and
|
|
30
|
+
* classification share this one rule, so the two sides cannot drift.
|
|
31
|
+
*
|
|
32
|
+
* The `did` must be a did:webvh id: only a promoted account (one whose Space
|
|
33
|
+
* controller is its published did:webvh) has the world-readable log the
|
|
34
|
+
* enrollee verifies its approval from. The `controller` check is shape only
|
|
35
|
+
* (a non-empty `did:key:` string) -- it is a discovery value the enrollee
|
|
36
|
+
* stores, and the channel's trust comes from the ceremony's confirmation-code
|
|
37
|
+
* comparison, not from any member of the query.
|
|
38
|
+
*
|
|
39
|
+
* @param options {object}
|
|
40
|
+
* @param options.did {string | undefined} the account's did:webvh id.
|
|
41
|
+
* @param options.spaceId {string | undefined} the account's Space id.
|
|
42
|
+
* @param options.host {string | undefined} the WAS server base URL.
|
|
43
|
+
* @param options.controller {string | undefined} the account controller
|
|
44
|
+
* did:key.
|
|
45
|
+
* @returns {IWalletOnboardingRequest}
|
|
46
|
+
*/
|
|
47
|
+
export declare function validatedOnboardingAccount({ did, spaceId, host, controller }: {
|
|
48
|
+
did?: string | undefined;
|
|
49
|
+
spaceId?: string | undefined;
|
|
50
|
+
host?: string | undefined;
|
|
51
|
+
controller?: string | undefined;
|
|
52
|
+
}): IWalletOnboardingRequest;
|
|
48
53
|
/**
|
|
49
54
|
* INVITER: the VPR details body to store on the ephemeral exchange -- one
|
|
50
55
|
* `WalletOnboardingQuery` and nothing else, since the query is one mental
|
|
51
|
-
* model per exchange. The
|
|
52
|
-
*
|
|
56
|
+
* model per exchange. The account members are validated by
|
|
57
|
+
* {@link validatedOnboardingAccount} and the `host` is stored in its
|
|
58
|
+
* serialized form ({@link serializedOnboardingHost}).
|
|
53
59
|
*
|
|
54
60
|
* @param options {object}
|
|
55
|
-
* @param options.
|
|
61
|
+
* @param options.pointer {object} the account pointer (keyring's
|
|
62
|
+
* `AccountPointer` shape: the inviter passes its session pointer straight
|
|
63
|
+
* in), whose `did` must already be the promoted did:webvh id.
|
|
64
|
+
* @param options.controller {string} the account controller did:key.
|
|
56
65
|
* @returns {IVPRDetails}
|
|
57
66
|
*/
|
|
58
|
-
export declare function composeWalletOnboardingRequest({
|
|
59
|
-
|
|
67
|
+
export declare function composeWalletOnboardingRequest({ pointer, controller }: {
|
|
68
|
+
pointer: {
|
|
69
|
+
did?: string;
|
|
70
|
+
spaceId: string;
|
|
71
|
+
host: string;
|
|
72
|
+
};
|
|
73
|
+
controller: string;
|
|
60
74
|
}): IVPRDetails;
|
|
61
75
|
/**
|
|
62
76
|
* ENROLLEE: extracts the wallet-onboarding request from a query set, when one
|
|
@@ -65,9 +79,10 @@ export declare function composeWalletOnboardingRequest({ host }: {
|
|
|
65
79
|
* combined with `QueryByExample`, standalone capability queries, or an
|
|
66
80
|
* `AppConnectQuery` (a screen that asks the person to connect a wallet must
|
|
67
81
|
* not simultaneously ask them to share credentials or grant capabilities).
|
|
68
|
-
* Its
|
|
69
|
-
*
|
|
70
|
-
*
|
|
82
|
+
* Its account members must satisfy {@link validatedOnboardingAccount} (so a
|
|
83
|
+
* query missing the pointer or the controller is malformed), and its `host` is
|
|
84
|
+
* rewritten to its serialized form. Violations throw; classification-time
|
|
85
|
+
* callers surface the throw as a malformed-request state.
|
|
71
86
|
*
|
|
72
87
|
* @param options {object}
|
|
73
88
|
* @param options.queries {IVPRQuery[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onboarding.d.ts","sourceRoot":"","sources":["../../src/request/onboarding.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"onboarding.d.ts","sourceRoot":"","sources":["../../src/request/onboarding.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EAET,wBAAwB,EACzB,MAAM,YAAY,CAAA;AAEnB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAsB3E;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,0BAA0B,CAAC,EACzC,GAAG,EACH,OAAO,EACP,IAAI,EACJ,UAAU,EACX,EAAE;IACD,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACxB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAChC,GAAG,wBAAwB,CA6B3B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,8BAA8B,CAAC,EAC7C,OAAO,EACP,UAAU,EACX,EAAE;IACD,OAAO,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IACxD,UAAU,EAAE,MAAM,CAAA;CACnB,GAAG,WAAW,CAMd;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,OAAO,EACR,EAAE;IACD,OAAO,EAAE,SAAS,EAAE,CAAA;CACrB,GAAG,wBAAwB,GAAG,IAAI,CA2BlC"}
|
|
@@ -1,3 +1,36 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The `WalletOnboardingQuery` transport vocabulary: the VPR half of "connect a
|
|
6
|
+
* new wallet client over an exchange". An already-enrolled client (the
|
|
7
|
+
* inviter) composes a request body carrying the query and stores it on an
|
|
8
|
+
* ephemeral exchange; a fresh wallet (the enrollee) scans the exchange's
|
|
9
|
+
* interaction URL, classifies the query here, and answers with the onboarding
|
|
10
|
+
* response envelope (`@interop/wallet-core/enrollment`).
|
|
11
|
+
*
|
|
12
|
+
* Vocabulary only -- the enrollment ceremony itself is untouched, and nothing
|
|
13
|
+
* secret crosses the channel: connect-code public halves travel one way, the
|
|
14
|
+
* account pointer and controller the other. The query carries the account's
|
|
15
|
+
* did:webvh `did`, its `spaceId` and `host` (together the account pointer),
|
|
16
|
+
* and the account controller did:key, so the enrollee locates the account
|
|
17
|
+
* without being asked for the account passphrase -- which a passkey-only
|
|
18
|
+
* account does not even have. The inviter already holds all four values.
|
|
19
|
+
*
|
|
20
|
+
* The query names the account but authorizes nothing. A holder of the QR or
|
|
21
|
+
* capability URL gains a world-readable DID log and nothing else; every act on
|
|
22
|
+
* the Space still requires zcaps they do not have, and the rendezvous server
|
|
23
|
+
* that sees the pointer is the same WAS server that hosts the Space and
|
|
24
|
+
* already knows the account DID. Injection by a URL holder remains the real
|
|
25
|
+
* threat, and remains covered by the ceremony's fingerprint / confirmation-
|
|
26
|
+
* code comparison: nothing is authorized before that human check.
|
|
27
|
+
*
|
|
28
|
+
* A wallet that predates the query type finds nothing it can satisfy in such a
|
|
29
|
+
* request (`classifyRequest` reports no DID Auth, no credential queries, and
|
|
30
|
+
* no capability requests) and refuses, rather than degrading into a partial
|
|
31
|
+
* generic flow.
|
|
32
|
+
*/
|
|
33
|
+
import { isWebvhDid } from '../webvh/did.js';
|
|
1
34
|
/**
|
|
2
35
|
* Validates a wallet-onboarding `host` and returns its serialized form. The
|
|
3
36
|
* value must parse as an absolute URL and must be `http:` or `https:` (it is
|
|
@@ -36,20 +69,69 @@ export function serializedOnboardingHost({ host }) {
|
|
|
36
69
|
}
|
|
37
70
|
return url.href;
|
|
38
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* Validates the account members a `WalletOnboardingQuery` carries and returns
|
|
74
|
+
* them in the classified form: the account's did:webvh `did`, its `spaceId`,
|
|
75
|
+
* the serialized `host`, and the account controller did:key. Compose and
|
|
76
|
+
* classification share this one rule, so the two sides cannot drift.
|
|
77
|
+
*
|
|
78
|
+
* The `did` must be a did:webvh id: only a promoted account (one whose Space
|
|
79
|
+
* controller is its published did:webvh) has the world-readable log the
|
|
80
|
+
* enrollee verifies its approval from. The `controller` check is shape only
|
|
81
|
+
* (a non-empty `did:key:` string) -- it is a discovery value the enrollee
|
|
82
|
+
* stores, and the channel's trust comes from the ceremony's confirmation-code
|
|
83
|
+
* comparison, not from any member of the query.
|
|
84
|
+
*
|
|
85
|
+
* @param options {object}
|
|
86
|
+
* @param options.did {string | undefined} the account's did:webvh id.
|
|
87
|
+
* @param options.spaceId {string | undefined} the account's Space id.
|
|
88
|
+
* @param options.host {string | undefined} the WAS server base URL.
|
|
89
|
+
* @param options.controller {string | undefined} the account controller
|
|
90
|
+
* did:key.
|
|
91
|
+
* @returns {IWalletOnboardingRequest}
|
|
92
|
+
*/
|
|
93
|
+
export function validatedOnboardingAccount({ did, spaceId, host, controller }) {
|
|
94
|
+
if (!isWebvhDid(did)) {
|
|
95
|
+
throw new Error('A WalletOnboardingQuery "did" must be the account\'s did:webvh id ' +
|
|
96
|
+
`(got "${String(did)}") -- only a promoted account can onboard ` +
|
|
97
|
+
'another wallet.');
|
|
98
|
+
}
|
|
99
|
+
if (typeof spaceId !== 'string' || spaceId.length === 0) {
|
|
100
|
+
throw new Error('A WalletOnboardingQuery "spaceId" must be a non-empty string (got ' +
|
|
101
|
+
`"${String(spaceId)}").`);
|
|
102
|
+
}
|
|
103
|
+
if (typeof host !== 'string') {
|
|
104
|
+
throw new Error('A WalletOnboardingQuery is missing its host.');
|
|
105
|
+
}
|
|
106
|
+
if (typeof controller !== 'string' || !controller.startsWith('did:key:')) {
|
|
107
|
+
throw new Error('A WalletOnboardingQuery "controller" must be a did:key string (got ' +
|
|
108
|
+
`"${String(controller)}").`);
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
host: serializedOnboardingHost({ host }),
|
|
112
|
+
did,
|
|
113
|
+
spaceId,
|
|
114
|
+
controller
|
|
115
|
+
};
|
|
116
|
+
}
|
|
39
117
|
/**
|
|
40
118
|
* INVITER: the VPR details body to store on the ephemeral exchange -- one
|
|
41
119
|
* `WalletOnboardingQuery` and nothing else, since the query is one mental
|
|
42
|
-
* model per exchange. The
|
|
43
|
-
*
|
|
120
|
+
* model per exchange. The account members are validated by
|
|
121
|
+
* {@link validatedOnboardingAccount} and the `host` is stored in its
|
|
122
|
+
* serialized form ({@link serializedOnboardingHost}).
|
|
44
123
|
*
|
|
45
124
|
* @param options {object}
|
|
46
|
-
* @param options.
|
|
125
|
+
* @param options.pointer {object} the account pointer (keyring's
|
|
126
|
+
* `AccountPointer` shape: the inviter passes its session pointer straight
|
|
127
|
+
* in), whose `did` must already be the promoted did:webvh id.
|
|
128
|
+
* @param options.controller {string} the account controller did:key.
|
|
47
129
|
* @returns {IVPRDetails}
|
|
48
130
|
*/
|
|
49
|
-
export function composeWalletOnboardingRequest({
|
|
131
|
+
export function composeWalletOnboardingRequest({ pointer, controller }) {
|
|
50
132
|
const query = {
|
|
51
133
|
type: 'WalletOnboardingQuery',
|
|
52
|
-
|
|
134
|
+
...validatedOnboardingAccount({ ...pointer, controller })
|
|
53
135
|
};
|
|
54
136
|
return { query: [query] };
|
|
55
137
|
}
|
|
@@ -60,9 +142,10 @@ export function composeWalletOnboardingRequest({ host }) {
|
|
|
60
142
|
* combined with `QueryByExample`, standalone capability queries, or an
|
|
61
143
|
* `AppConnectQuery` (a screen that asks the person to connect a wallet must
|
|
62
144
|
* not simultaneously ask them to share credentials or grant capabilities).
|
|
63
|
-
* Its
|
|
64
|
-
*
|
|
65
|
-
*
|
|
145
|
+
* Its account members must satisfy {@link validatedOnboardingAccount} (so a
|
|
146
|
+
* query missing the pointer or the controller is malformed), and its `host` is
|
|
147
|
+
* rewritten to its serialized form. Violations throw; classification-time
|
|
148
|
+
* callers surface the throw as a malformed-request state.
|
|
66
149
|
*
|
|
67
150
|
* @param options {object}
|
|
68
151
|
* @param options.queries {IVPRQuery[]}
|
|
@@ -86,10 +169,7 @@ export function walletOnboardingRequestOf({ queries }) {
|
|
|
86
169
|
throw new Error('A WalletOnboardingQuery cannot be combined with QueryByExample, ' +
|
|
87
170
|
'standalone capability queries, or an AppConnectQuery.');
|
|
88
171
|
}
|
|
89
|
-
const { host } = onboardingQueries[0];
|
|
90
|
-
|
|
91
|
-
throw new Error('A WalletOnboardingQuery is missing its host.');
|
|
92
|
-
}
|
|
93
|
-
return { host: serializedOnboardingHost({ host }) };
|
|
172
|
+
const { host, did, spaceId, controller } = onboardingQueries[0];
|
|
173
|
+
return validatedOnboardingAccount({ host, did, spaceId, controller });
|
|
94
174
|
}
|
|
95
175
|
//# sourceMappingURL=onboarding.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onboarding.js","sourceRoot":"","sources":["../../src/request/onboarding.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"onboarding.js","sourceRoot":"","sources":["../../src/request/onboarding.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAQ5C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,wBAAwB,CAAC,EAAE,IAAI,EAAoB;IACjE,IAAI,GAAQ,CAAA;IACZ,IAAI,CAAC;QACH,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,CAAA;IACrB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,gEAAgE,IAAI,KAAK,EACzE,EAAE,KAAK,EAAE,GAAG,EAAE,CACf,CAAA;IACH,CAAC;IACD,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ,IAAI,GAAG,CAAC,QAAQ,K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,CAAA;AACvE,CAAC"}
|
package/dist/request/types.d.ts
CHANGED
|
@@ -148,23 +148,45 @@ export type IAppConnectRequest = {
|
|
|
148
148
|
/**
|
|
149
149
|
* "Connect a new wallet client to this account" -- the query an already-
|
|
150
150
|
* enrolled wallet client (the inviter) puts in the VPR of an ephemeral
|
|
151
|
-
* exchange for a fresh wallet (the enrollee) to answer.
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
151
|
+
* exchange for a fresh wallet (the enrollee) to answer. It carries everything
|
|
152
|
+
* the enrollee needs to find the account, so no secret is required of the
|
|
153
|
+
* person joining:
|
|
154
|
+
*
|
|
155
|
+
* - `did` -- the account's stable did:webvh id, whose log is world-readable
|
|
156
|
+
* and is where the enrollee verifies its own approval.
|
|
157
|
+
* - `spaceId` and `host` -- where the account lives (the WAS server base URL
|
|
158
|
+
* and the Space on it); together with `did` these are exactly the account
|
|
159
|
+
* pointer a keyring record carries (keyring's `AccountPointer` shape), so
|
|
160
|
+
* the inviter passes its session pointer straight in.
|
|
161
|
+
* - `controller` -- the account controller did:key, what the enrollee's own
|
|
162
|
+
* profile link stores once it has joined.
|
|
163
|
+
*
|
|
164
|
+
* Discovery only: the query names the account but authorizes nothing. Every
|
|
165
|
+
* act on the Space still requires zcaps a holder of the QR or capability URL
|
|
166
|
+
* does not have, and nothing is authorized before the ceremony's
|
|
167
|
+
* confirmation-code comparison. The enrollee answers off-band of the VPR
|
|
168
|
+
* vocabulary, with the onboarding response envelope
|
|
169
|
+
* (`@interop/wallet-core/enrollment`), whose payload is an ordinary connect
|
|
170
|
+
* code.
|
|
157
171
|
*/
|
|
158
172
|
export type IWalletOnboardingQuery = {
|
|
159
173
|
type: 'WalletOnboardingQuery';
|
|
160
174
|
host: string;
|
|
175
|
+
did: string;
|
|
176
|
+
spaceId: string;
|
|
177
|
+
controller: string;
|
|
161
178
|
};
|
|
162
179
|
/**
|
|
163
180
|
* A wallet-onboarding request as classified and validated by
|
|
164
|
-
* `walletOnboardingRequestOf`: the
|
|
181
|
+
* `walletOnboardingRequestOf`: the account's did:webvh `did`, its `spaceId`,
|
|
182
|
+
* the `host` already in serialized URL form (the three together being the
|
|
183
|
+
* account pointer), and the account controller did:key.
|
|
165
184
|
*/
|
|
166
185
|
export type IWalletOnboardingRequest = {
|
|
167
186
|
host: string;
|
|
187
|
+
did: string;
|
|
188
|
+
spaceId: string;
|
|
189
|
+
controller: string;
|
|
168
190
|
};
|
|
169
191
|
/**
|
|
170
192
|
* The authentication signer plus the DID to name as the VP `holder`. Each app
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/request/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,KAAK,EACV,qBAAqB,EACrB,uBAAuB,EACvB,KAAK,EACN,MAAM,8BAA8B,CAAA;AACrC,OAAO,KAAK,EACV,sBAAsB,EACtB,eAAe,EACf,WAAW,EACX,cAAc,EACf,MAAM,kCAAkC,CAAA;AAMzC,YAAY,EACV,UAAU,EACV,QAAQ,EACR,aAAa,EACb,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,YAAY,EACZ,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACvB,UAAU,EACV,sBAAsB,EACtB,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,uBAAuB,EACxB,MAAM,kCAAkC,CAAA;AACzC,YAAY,EACV,qBAAqB,EACrB,uBAAuB,EACvB,KAAK,EACN,MAAM,8BAA8B,CAAA;AAErC;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC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E,CAAA;CACvC;AAED;;;;;GAKG;AACH,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAC3C,sBAAsB,EACtB,YAAY,GAAG,QAAQ,CACxB,CAAA;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,iBAAiB,CAAA;IACvB,GAAG,EAAE,cAAc,CAAA;IACnB,eAAe,CAAC,EAAE,0BAA0B,GAAG,0BAA0B,EAAE,CAAA;CAC5E,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,GAAG,EAAE,cAAc,CAAA;IACnB,iBAAiB,EAAE,0BAA0B,EAAE,CAAA;CAChD,CAAA;AAED
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/request/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,KAAK,EACV,qBAAqB,EACrB,uBAAuB,EACvB,KAAK,EACN,MAAM,8BAA8B,CAAA;AACrC,OAAO,KAAK,EACV,sBAAsB,EACtB,eAAe,EACf,WAAW,EACX,cAAc,EACf,MAAM,kCAAkC,CAAA;AAMzC,YAAY,EACV,UAAU,EACV,QAAQ,EACR,aAAa,EACb,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,YAAY,EACZ,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACvB,UAAU,EACV,sBAAsB,EACtB,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,uBAAuB,EACxB,MAAM,kCAAkC,CAAA;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;CACf;AAED;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;AAE9E;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE;QACpB,YAAY,EAAE,sBAAsB,EAAE,CAAA;KACvC,KAAK,OAAO,CAAC,KAAK,EAAE,CAAC,CAAA;IACtB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE;QACzB,OAAO,EAAE,WAAW,CAAA;QACpB,UAAU,EAAE,kBAAkB,CAAA;QAC9B,MAAM,EAAE,MAAM,CAAA;QACd,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,gBAAgB,EAAE,OAAO,CAAA;QACzB,WAAW,CAAC,EAAE,MAAM,CAAA;KACrB,KAAK,OAAO,CAAC,cAAc,CAAC,CAAA;CAC9B"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The did:webvh id shape check, on its own leaf file so a module that only
|
|
6
|
+
* needs to recognize an account DID (the `request` subpath's
|
|
7
|
+
* `WalletOnboardingQuery` validation, for instance) can import it without
|
|
8
|
+
* pulling in the zcap signing graph. Its public home stays `webvh/zcap.ts`,
|
|
9
|
+
* which re-exports it.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Whether a DID (an account pointer's `did` member, typically) is a
|
|
13
|
+
* did:webvh id -- the marker that the account's Space controller has been
|
|
14
|
+
* promoted, so sessions must sign with the did:webvh keyId.
|
|
15
|
+
*
|
|
16
|
+
* @param did {string | undefined}
|
|
17
|
+
* @returns {boolean}
|
|
18
|
+
*/
|
|
19
|
+
export declare function isWebvhDid(did: string | undefined): did is string;
|
|
20
|
+
//# sourceMappingURL=did.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"did.d.ts","sourceRoot":"","sources":["../../src/webvh/did.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;GAMG;AAEH;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,GAAG,IAAI,MAAM,CAEjE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The did:webvh id shape check, on its own leaf file so a module that only
|
|
6
|
+
* needs to recognize an account DID (the `request` subpath's
|
|
7
|
+
* `WalletOnboardingQuery` validation, for instance) can import it without
|
|
8
|
+
* pulling in the zcap signing graph. Its public home stays `webvh/zcap.ts`,
|
|
9
|
+
* which re-exports it.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Whether a DID (an account pointer's `did` member, typically) is a
|
|
13
|
+
* did:webvh id -- the marker that the account's Space controller has been
|
|
14
|
+
* promoted, so sessions must sign with the did:webvh keyId.
|
|
15
|
+
*
|
|
16
|
+
* @param did {string | undefined}
|
|
17
|
+
* @returns {boolean}
|
|
18
|
+
*/
|
|
19
|
+
export function isWebvhDid(did) {
|
|
20
|
+
return typeof did === 'string' && did.startsWith('did:webvh:');
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=did.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"did.js","sourceRoot":"","sources":["../../src/webvh/did.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;GAMG;AAEH;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU,CAAC,GAAuB;IAChD,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,UAAU,CAAC,YAAY,CAAC,CAAA;AAChE,CAAC"}
|
package/dist/webvh/zcap.d.ts
CHANGED
|
@@ -92,13 +92,5 @@ export declare function webvhCapabilityAgent({ keyAgent, did }: {
|
|
|
92
92
|
keyAgent: ICapabilityAgent;
|
|
93
93
|
did: string;
|
|
94
94
|
}): ICapabilityAgent;
|
|
95
|
-
|
|
96
|
-
* Whether a DID (an account pointer's `did` member, typically) is a
|
|
97
|
-
* did:webvh id -- the marker that the account's Space controller has been
|
|
98
|
-
* promoted, so sessions must sign with the did:webvh keyId.
|
|
99
|
-
*
|
|
100
|
-
* @param did {string | undefined}
|
|
101
|
-
* @returns {boolean}
|
|
102
|
-
*/
|
|
103
|
-
export declare function isWebvhDid(did: string | undefined): did is string;
|
|
95
|
+
export { isWebvhDid } from './did.js';
|
|
104
96
|
//# sourceMappingURL=zcap.d.ts.map
|
package/dist/webvh/zcap.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zcap.d.ts","sourceRoot":"","sources":["../../src/webvh/zcap.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AAE3D;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,OAAO,CAAA;IACxB,sBAAsB,EAAE,MAAM;QAC5B,IAAI,EAAE,MAAM,CAAA;QACZ,UAAU,EAAE,MAAM,CAAA;QAClB,kBAAkB,EAAE,MAAM,CAAA;QAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAA;KAC7B,CAAA;CACF;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,QAAQ,EACT,EAAE;IACD,QAAQ,EAAE,gBAAgB,CAAA;CAC3B,GAAG,MAAM,CAMT;AAED;;;;;;;;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H,wBAAgB,yBAAyB,CAAC,EACxC,QAAQ,EACT,EAAE;IACD,QAAQ,EAAE,gBAAgB,CAAA;CAC3B,GAAG,MAAM,CAMT;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,GAAG,EACJ,EAAE;IACD,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,GAAG,EAAE,MAAM,CAAA;CACZ;;;oBAGmB;QAAE,IAAI,EAAE,UAAU,CAAA;KAAE,KAAK,OAAO,CAAC,UAAU,CAAC;EAO/D;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,GAAG,EACJ,EAAE;IACD,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,UAAU,CAOb;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACT,EAAE;IACD,QAAQ,EAAE,gBAAgB,CAAA;CAC3B,GAAG,UAAU,CAOb;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,GAAG,EACJ,EAAE;IACD,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,gBAAgB,CAQnB;AAID,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA"}
|
package/dist/webvh/zcap.js
CHANGED
|
@@ -103,15 +103,7 @@ export function webvhCapabilityAgent({ keyAgent, did }) {
|
|
|
103
103
|
getVerificationKeyPair: () => keyAgent.getVerificationKeyPair()
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
* promoted, so sessions must sign with the did:webvh keyId.
|
|
110
|
-
*
|
|
111
|
-
* @param did {string | undefined}
|
|
112
|
-
* @returns {boolean}
|
|
113
|
-
*/
|
|
114
|
-
export function isWebvhDid(did) {
|
|
115
|
-
return typeof did === 'string' && did.startsWith('did:webvh:');
|
|
116
|
-
}
|
|
106
|
+
// `isWebvhDid` lives in the `did.ts` leaf so modules outside the signing graph
|
|
107
|
+
// can import the shape check alone; this remains its public home.
|
|
108
|
+
export { isWebvhDid } from './did.js';
|
|
117
109
|
//# sourceMappingURL=zcap.js.map
|
package/dist/webvh/zcap.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zcap.js","sourceRoot":"","sources":["../../src/webvh/zcap.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;GASG;AACH,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAsB3C;;;;;;;GAOG;AACH,MAAM,UAAU,yBAAyB,CAAC,EACxC,QAAQ,EAGT;IACC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACnE,IAAI,MAAM,KAAK,KAAK,IAAI,MAAM,KAAK,KAAK,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAChE,MAAM,IAAI,KAAK,CAAC,4BAA4B,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAA;IAC9D,CAAC;IACD,OAAO,kBAAkB,CAAA;AAC3B,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,WAAW,CAAC,EAC1B,QAAQ,EACR,GAAG,EAIJ;IACC,MAAM,IAAI,GAAG,QAAQ,CAAC,SAAS,EAG9B,CAAA;IACD,OAAO;QACL,EAAE,EAAE,GAAG,GAAG,IAAI,yBAAyB,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE;QACvD,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,4BAA4B;QAC/C,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;KAC3B,CAAA;AACH,C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ACzB,CAAC,CAAA;AACJ,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,oBAAoB,CAAC,EACnC,QAAQ,EACR,GAAG,EAIJ;IACC,MAAM,MAAM,GAAG,WAAW,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAA;IAC7C,OAAO;QACL,EAAE,EAAE,GAAG;QACP,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,SAAS,EAAE,GAAG,EAAE,CAAC,MAAM;QACvB,sBAAsB,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,sBAAsB,EAAE;KAChE,CAAA;AACH,CAAC;AAED,+EAA+E;AAC/E,kEAAkE;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@interop/wallet-core",
|
|
3
3
|
"description": "Shared wallet-domain logic (WAS sync engine core and wallet Space layout contracts) for Interop wallet apps.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.29.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "pnpm run clear && tsc",
|