@interop/wallet-core 0.27.1 → 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/README.md +6 -4
- package/dist/enrollment/index.d.ts +6 -0
- package/dist/enrollment/index.d.ts.map +1 -1
- package/dist/enrollment/index.js +5 -0
- package/dist/enrollment/index.js.map +1 -1
- package/dist/enrollment/onboardingResponse.d.ts +60 -0
- package/dist/enrollment/onboardingResponse.d.ts.map +1 -0
- package/dist/enrollment/onboardingResponse.js +132 -0
- package/dist/enrollment/onboardingResponse.js.map +1 -0
- package/dist/request/classify.d.ts.map +1 -1
- package/dist/request/classify.js +4 -3
- package/dist/request/classify.js.map +1 -1
- package/dist/request/index.d.ts +6 -0
- package/dist/request/index.d.ts.map +1 -1
- package/dist/request/index.js +6 -0
- package/dist/request/index.js.map +1 -1
- package/dist/request/onboarding.d.ts +94 -0
- package/dist/request/onboarding.d.ts.map +1 -0
- package/dist/request/onboarding.js +175 -0
- package/dist/request/onboarding.js.map +1 -0
- package/dist/request/types.d.ts +43 -0
- 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/README.md
CHANGED
|
@@ -54,9 +54,10 @@ The subpaths:
|
|
|
54
54
|
negotiation, `composeVp` (signer and holder injected), the pure
|
|
55
55
|
`processRequest` (consent runs in the caller; zcap / App Connect processing
|
|
56
56
|
injected), the App Connect app-key credential module (query validation,
|
|
57
|
-
matching, minting, store-time refusal, legacy re-issue), the
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
matching, minting, store-time refusal, legacy re-issue), the
|
|
58
|
+
`WalletOnboardingQuery` transport vocabulary (compose and classification), the
|
|
59
|
+
VC-API exchange client, and VCALM `interaction:` URL handling. The VPR type
|
|
60
|
+
vocabulary lives in
|
|
60
61
|
[`@interop/data-integrity-core`](https://npm.im/@interop/data-integrity-core)
|
|
61
62
|
and is re-exported here.
|
|
62
63
|
|
|
@@ -123,7 +124,8 @@ The subpaths:
|
|
|
123
124
|
lifecycle.
|
|
124
125
|
|
|
125
126
|
- **`@interop/wallet-core/enrollment`** -- the client enrollment ceremony
|
|
126
|
-
(connect code, approval, completion)
|
|
127
|
+
(connect code, approval, completion) plus the onboarding-response envelope
|
|
128
|
+
that carries a connect code back over an exchange.
|
|
127
129
|
|
|
128
130
|
- **`@interop/wallet-core/recovery`** -- recovery codes on the roster identity
|
|
129
131
|
model: a code as a minimal always-enrolled wallet client (format and
|
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
* `enrollmentRecipientKid` -- the connect-code channel layer.
|
|
14
14
|
* - `approveEnrollment` -- the enrolling client's half, in the push order
|
|
15
15
|
* (roster wrap, then the two did:webvh log entries).
|
|
16
|
+
* - `encodeOnboardingResponse` / `parseOnboardingResponse` -- the onboarding-
|
|
17
|
+
* response envelope, the transport that carries a connect code (verbatim)
|
|
18
|
+
* plus a suggested display label back over an exchange whose request asked
|
|
19
|
+
* with a `WalletOnboardingQuery` (`@interop/wallet-core/request`).
|
|
16
20
|
* - `completeEnrollmentCore` -- the enrollee's half: verify from the published
|
|
17
21
|
* log, read the roster, hand back the user key and the epoch to pin. Persisting
|
|
18
22
|
* the key set stays with the caller's own unlock layer.
|
|
@@ -20,4 +24,6 @@
|
|
|
20
24
|
export { approveEnrollment, completeEnrollmentCore, encodeEnrollmentRequest, EnrollmentPendingError, enrollmentClientDid, enrollmentRecipientKid, mintEnrollmentRequest, parseEnrollmentRequest } from './enrollment.js';
|
|
21
25
|
export type { EnrollmentRequest } from './enrollment.js';
|
|
22
26
|
export { CONNECT_CODE_PREFIX, isConnectCode } from './connectCode.js';
|
|
27
|
+
export { encodeOnboardingResponse, ONBOARDING_LABEL_MAX_LENGTH, ONBOARDING_RESPONSE_VERSION, parseOnboardingResponse } from './onboardingResponse.js';
|
|
28
|
+
export type { WalletOnboardingResponse } from './onboardingResponse.js';
|
|
23
29
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/enrollment/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/enrollment/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,iBAAiB,CAAA;AACxB,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrE,OAAO,EACL,wBAAwB,EACxB,2BAA2B,EAC3B,2BAA2B,EAC3B,uBAAuB,EACxB,MAAM,yBAAyB,CAAA;AAChC,YAAY,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAA"}
|
package/dist/enrollment/index.js
CHANGED
|
@@ -13,10 +13,15 @@
|
|
|
13
13
|
* `enrollmentRecipientKid` -- the connect-code channel layer.
|
|
14
14
|
* - `approveEnrollment` -- the enrolling client's half, in the push order
|
|
15
15
|
* (roster wrap, then the two did:webvh log entries).
|
|
16
|
+
* - `encodeOnboardingResponse` / `parseOnboardingResponse` -- the onboarding-
|
|
17
|
+
* response envelope, the transport that carries a connect code (verbatim)
|
|
18
|
+
* plus a suggested display label back over an exchange whose request asked
|
|
19
|
+
* with a `WalletOnboardingQuery` (`@interop/wallet-core/request`).
|
|
16
20
|
* - `completeEnrollmentCore` -- the enrollee's half: verify from the published
|
|
17
21
|
* log, read the roster, hand back the user key and the epoch to pin. Persisting
|
|
18
22
|
* the key set stays with the caller's own unlock layer.
|
|
19
23
|
*/
|
|
20
24
|
export { approveEnrollment, completeEnrollmentCore, encodeEnrollmentRequest, EnrollmentPendingError, enrollmentClientDid, enrollmentRecipientKid, mintEnrollmentRequest, parseEnrollmentRequest } from './enrollment.js';
|
|
21
25
|
export { CONNECT_CODE_PREFIX, isConnectCode } from './connectCode.js';
|
|
26
|
+
export { encodeOnboardingResponse, ONBOARDING_LABEL_MAX_LENGTH, ONBOARDING_RESPONSE_VERSION, parseOnboardingResponse } from './onboardingResponse.js';
|
|
22
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/enrollment/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/enrollment/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrE,OAAO,EACL,wBAAwB,EACxB,2BAA2B,EAC3B,2BAA2B,EAC3B,uBAAuB,EACxB,MAAM,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { EnrollmentRequest } from './enrollment.js';
|
|
2
|
+
/**
|
|
3
|
+
* The onboarding-response envelope version this build mints and accepts.
|
|
4
|
+
*/
|
|
5
|
+
export declare const ONBOARDING_RESPONSE_VERSION = 1;
|
|
6
|
+
/**
|
|
7
|
+
* The longest suggested display label an onboarding response may carry, in
|
|
8
|
+
* code points, after control characters are stripped and whitespace trimmed.
|
|
9
|
+
*/
|
|
10
|
+
export declare const ONBOARDING_LABEL_MAX_LENGTH = 64;
|
|
11
|
+
/**
|
|
12
|
+
* The onboarding-response envelope as it travels: the versioned wrapper, the
|
|
13
|
+
* connect code verbatim, and the enrollee's optional suggested display label.
|
|
14
|
+
*/
|
|
15
|
+
export type WalletOnboardingResponse = {
|
|
16
|
+
walletOnboarding: {
|
|
17
|
+
v: number;
|
|
18
|
+
code: string;
|
|
19
|
+
label?: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* ENROLLEE: builds the response envelope for a connect code it just minted.
|
|
24
|
+
* The code is validated with the ceremony's own parser (a code this side
|
|
25
|
+
* cannot parse is one the inviter would refuse), and the label is sanitized by
|
|
26
|
+
* the same rule the parse side applies, so an envelope this call produces is
|
|
27
|
+
* always one {@link parseOnboardingResponse} accepts.
|
|
28
|
+
*
|
|
29
|
+
* @param options {object}
|
|
30
|
+
* @param options.code {string} the `freewallet-connect:` connect code
|
|
31
|
+
* @param [options.label] {string} a display label to suggest for this client
|
|
32
|
+
* @returns {WalletOnboardingResponse}
|
|
33
|
+
*/
|
|
34
|
+
export declare function encodeOnboardingResponse({ code, label }: {
|
|
35
|
+
code: string;
|
|
36
|
+
label?: string;
|
|
37
|
+
}): WalletOnboardingResponse;
|
|
38
|
+
/**
|
|
39
|
+
* INVITER: validates a received onboarding-response body and hands back what
|
|
40
|
+
* the approval screen needs -- the parsed enrollment request (so the
|
|
41
|
+
* fingerprint renders without a second parse), the code verbatim (so
|
|
42
|
+
* `approveEnrollment` receives exactly what the enrollee minted), and the
|
|
43
|
+
* sanitized label, if any. Anything malformed throws: a body that is not an
|
|
44
|
+
* object, a missing or mis-shaped envelope, an unsupported version, a
|
|
45
|
+
* non-string or unparseable code, or a label that is not a string or exceeds
|
|
46
|
+
* the cap. The remedy for every one of them is the same -- generate a new code
|
|
47
|
+
* and try again.
|
|
48
|
+
*
|
|
49
|
+
* @param options {object}
|
|
50
|
+
* @param options.body {unknown} the received JSON body
|
|
51
|
+
* @returns {object} the parsed request, the code verbatim, and the label
|
|
52
|
+
*/
|
|
53
|
+
export declare function parseOnboardingResponse({ body }: {
|
|
54
|
+
body: unknown;
|
|
55
|
+
}): {
|
|
56
|
+
request: EnrollmentRequest;
|
|
57
|
+
code: string;
|
|
58
|
+
label?: string;
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=onboardingResponse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onboardingResponse.d.ts","sourceRoot":"","sources":["../../src/enrollment/onboardingResponse.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAExD;;GAEG;AACH,eAAO,MAAM,2BAA2B,IAAI,CAAA;AAE5C;;;GAGG;AACH,eAAO,MAAM,2BAA2B,KAAK,CAAA;AAY7C;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,gBAAgB,EAAE;QAChB,CAAC,EAAE,MAAM,CAAA;QACT,IAAI,EAAE,MAAM,CAAA;QACZ,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;CACF,CAAA;AAoCD;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,IAAI,EACJ,KAAK,EACN,EAAE;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,wBAAwB,CAU3B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GAAG;IACpE,OAAO,EAAE,iBAAiB,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAsBA"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The onboarding-response envelope: what a fresh wallet (the enrollee) POSTs
|
|
6
|
+
* back to an ephemeral exchange whose request carried a
|
|
7
|
+
* `WalletOnboardingQuery` (`@interop/wallet-core/request`). It is transport
|
|
8
|
+
* vocabulary only -- the enrollment ceremony is untouched.
|
|
9
|
+
*
|
|
10
|
+
* The envelope carries an ordinary connect code VERBATIM as its payload, so
|
|
11
|
+
* the ceremony's strict validation applies unchanged and the inviter hands the
|
|
12
|
+
* string it receives straight to `approveEnrollment`; the connect-code payload
|
|
13
|
+
* version is deliberately NOT bumped by this transport. Beside it rides an
|
|
14
|
+
* optional display label the enrollee suggests for itself. The label lives in
|
|
15
|
+
* the envelope rather than in the code because its durable home is the
|
|
16
|
+
* account's client-labels record, which the approving client writes -- the
|
|
17
|
+
* code stays the ceremony's own artifact.
|
|
18
|
+
*
|
|
19
|
+
* The label is attacker-adjacent free text that renders on the approver's
|
|
20
|
+
* consent screen, so it is stripped of control characters, trimmed, and
|
|
21
|
+
* length-capped, and an over-cap label is REFUSED rather than silently
|
|
22
|
+
* truncated: a truncated label would be a silently different name for a client
|
|
23
|
+
* the person is about to authorize, where a refusal costs only a fresh code.
|
|
24
|
+
*/
|
|
25
|
+
import { parseEnrollmentRequest } from './enrollment.js';
|
|
26
|
+
/**
|
|
27
|
+
* The onboarding-response envelope version this build mints and accepts.
|
|
28
|
+
*/
|
|
29
|
+
export const ONBOARDING_RESPONSE_VERSION = 1;
|
|
30
|
+
/**
|
|
31
|
+
* The longest suggested display label an onboarding response may carry, in
|
|
32
|
+
* code points, after control characters are stripped and whitespace trimmed.
|
|
33
|
+
*/
|
|
34
|
+
export const ONBOARDING_LABEL_MAX_LENGTH = 64;
|
|
35
|
+
/**
|
|
36
|
+
* Characters stripped from a suggested label before it is measured: the C0 and
|
|
37
|
+
* C1 control ranges (including DEL) plus the bidirectional formatting and
|
|
38
|
+
* isolate controls, none of which a display name needs and all of which can
|
|
39
|
+
* reorder or hide what a consent screen shows.
|
|
40
|
+
*/
|
|
41
|
+
const LABEL_STRIPPED_CHARACTERS =
|
|
42
|
+
// eslint-disable-next-line no-control-regex
|
|
43
|
+
/[\u0000-\u001f\u007f-\u009f\u200e\u200f\u202a-\u202e\u2066-\u2069]/gu;
|
|
44
|
+
/**
|
|
45
|
+
* Sanitizes a suggested display label: strips the control and bidi characters
|
|
46
|
+
* above, trims surrounding whitespace, and refuses anything still longer than
|
|
47
|
+
* {@link ONBOARDING_LABEL_MAX_LENGTH}. A label that sanitizes to nothing at
|
|
48
|
+
* all is absent rather than empty, so no consent screen renders a blank name.
|
|
49
|
+
*
|
|
50
|
+
* @param options {object}
|
|
51
|
+
* @param options.label {unknown} the envelope's `label` member, if any
|
|
52
|
+
* @returns {string | undefined}
|
|
53
|
+
*/
|
|
54
|
+
function sanitizedOnboardingLabel({ label }) {
|
|
55
|
+
if (label === undefined || label === null) {
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
if (typeof label !== 'string') {
|
|
59
|
+
throw new Error('An onboarding response label must be a string.');
|
|
60
|
+
}
|
|
61
|
+
const sanitized = label.replace(LABEL_STRIPPED_CHARACTERS, '').trim();
|
|
62
|
+
if (sanitized.length === 0) {
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
if ([...sanitized].length > ONBOARDING_LABEL_MAX_LENGTH) {
|
|
66
|
+
throw new Error(`An onboarding response label may be at most ` +
|
|
67
|
+
`${ONBOARDING_LABEL_MAX_LENGTH} characters.`);
|
|
68
|
+
}
|
|
69
|
+
return sanitized;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* ENROLLEE: builds the response envelope for a connect code it just minted.
|
|
73
|
+
* The code is validated with the ceremony's own parser (a code this side
|
|
74
|
+
* cannot parse is one the inviter would refuse), and the label is sanitized by
|
|
75
|
+
* the same rule the parse side applies, so an envelope this call produces is
|
|
76
|
+
* always one {@link parseOnboardingResponse} accepts.
|
|
77
|
+
*
|
|
78
|
+
* @param options {object}
|
|
79
|
+
* @param options.code {string} the `freewallet-connect:` connect code
|
|
80
|
+
* @param [options.label] {string} a display label to suggest for this client
|
|
81
|
+
* @returns {WalletOnboardingResponse}
|
|
82
|
+
*/
|
|
83
|
+
export function encodeOnboardingResponse({ code, label }) {
|
|
84
|
+
parseEnrollmentRequest({ code });
|
|
85
|
+
const suggested = sanitizedOnboardingLabel({ label });
|
|
86
|
+
return {
|
|
87
|
+
walletOnboarding: {
|
|
88
|
+
v: ONBOARDING_RESPONSE_VERSION,
|
|
89
|
+
code,
|
|
90
|
+
...(suggested !== undefined && { label: suggested })
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* INVITER: validates a received onboarding-response body and hands back what
|
|
96
|
+
* the approval screen needs -- the parsed enrollment request (so the
|
|
97
|
+
* fingerprint renders without a second parse), the code verbatim (so
|
|
98
|
+
* `approveEnrollment` receives exactly what the enrollee minted), and the
|
|
99
|
+
* sanitized label, if any. Anything malformed throws: a body that is not an
|
|
100
|
+
* object, a missing or mis-shaped envelope, an unsupported version, a
|
|
101
|
+
* non-string or unparseable code, or a label that is not a string or exceeds
|
|
102
|
+
* the cap. The remedy for every one of them is the same -- generate a new code
|
|
103
|
+
* and try again.
|
|
104
|
+
*
|
|
105
|
+
* @param options {object}
|
|
106
|
+
* @param options.body {unknown} the received JSON body
|
|
107
|
+
* @returns {object} the parsed request, the code verbatim, and the label
|
|
108
|
+
*/
|
|
109
|
+
export function parseOnboardingResponse({ body }) {
|
|
110
|
+
if (body === null || typeof body !== 'object') {
|
|
111
|
+
throw new Error('The onboarding response is malformed.');
|
|
112
|
+
}
|
|
113
|
+
const { walletOnboarding } = body;
|
|
114
|
+
if (walletOnboarding === null || typeof walletOnboarding !== 'object') {
|
|
115
|
+
throw new Error('The onboarding response carries no walletOnboarding.');
|
|
116
|
+
}
|
|
117
|
+
const { v, code, label } = walletOnboarding;
|
|
118
|
+
if (v !== ONBOARDING_RESPONSE_VERSION) {
|
|
119
|
+
throw new Error(`Unsupported onboarding response version "${String(v)}".`);
|
|
120
|
+
}
|
|
121
|
+
if (typeof code !== 'string') {
|
|
122
|
+
throw new Error('The onboarding response carries no connect code.');
|
|
123
|
+
}
|
|
124
|
+
const request = parseEnrollmentRequest({ code });
|
|
125
|
+
const suggested = sanitizedOnboardingLabel({ label });
|
|
126
|
+
return {
|
|
127
|
+
request,
|
|
128
|
+
code,
|
|
129
|
+
...(suggested !== undefined && { label: suggested })
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=onboardingResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onboardingResponse.js","sourceRoot":"","sources":["../../src/enrollment/onboardingResponse.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAGxD;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAA;AAE5C;;;GAGG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,EAAE,CAAA;AAE7C;;;;;GAKG;AACH,MAAM,yBAAyB;AAC7B,4CAA4C;AAC5C,sEAAsE,CAAA;AAcxE;;;;;;;;;GASG;AACH,SAAS,wBAAwB,CAAC,EAChC,KAAK,EAGN;IACC,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAC1C,OAAO,SAAS,CAAA;IAClB,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAA;IACnE,CAAC;IACD,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,yBAAyB,EAAE,EAAE,CAAC,CAAC,IA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,CAAC,EACjC,OAAO,EACR,EAAE;IACD,OAAO,EAAE,SAAS,EAAE,CAAA;CACrB,GAAG,OAAO,CAQV;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,EAAE,CAS3D;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,eAAe,GACrB,gBAAgB,EAAE,CAMpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,SAAS,EAAE,GAAG,sBAAsB,EAAE,CAoB5E;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,MAAM,EACP,EAAE;IACD,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;CACf,GAAG,MAAM,CA4BT;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,OAAO,EACP,MAAM,EACP,EAAE;IACD,OAAO,EAAE,SAAS,EAAE,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;CACf,GAAG,kBAAkB,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"classify.d.ts","sourceRoot":"","sources":["../../src/request/classify.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EACV,eAAe,EAGf,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAEhB,eAAe,EACf,QAAQ,EACR,UAAU,EACV,WAAW,EACX,SAAS,EACT,qBAAqB,EACrB,uBAAuB,EAEvB,oBAAoB,EACrB,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAO/C;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,qBAAqB,EAAE,GACnC,MAAM,CAOR;AA0DD;;;;;GAKG;AACH,wBAAgB,a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O,EAAE,SAAS,EAAE,GAAG,OAAO,CAQpE"}
|
package/dist/request/classify.js
CHANGED
|
@@ -258,10 +258,11 @@ export function appConnectRequestOf({ queries, origin }) {
|
|
|
258
258
|
}
|
|
259
259
|
const mixed = queries.some(query => query.type === 'QueryByExample' ||
|
|
260
260
|
query.type === 'AuthorizationCapabilityQuery' ||
|
|
261
|
-
query.type === 'ZcapQuery'
|
|
261
|
+
query.type === 'ZcapQuery' ||
|
|
262
|
+
query.type === 'WalletOnboardingQuery');
|
|
262
263
|
if (mixed) {
|
|
263
|
-
throw new Error('An AppConnectQuery cannot be combined with QueryByExample
|
|
264
|
-
'standalone capability queries.');
|
|
264
|
+
throw new Error('An AppConnectQuery cannot be combined with QueryByExample, ' +
|
|
265
|
+
'standalone capability queries, or a WalletOnboardingQuery.');
|
|
265
266
|
}
|
|
266
267
|
const { app, capabilityQuery } = appConnectQueries[0];
|
|
267
268
|
if (!app || typeof app.name !== 'string' || typeof app.appUrl !== 'string') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classify.js","sourceRoot":"","sources":["../../src/request/classify.ts"],"names":[],"mappings":"AAkCA,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAA;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAE7C,MAAM,gBAAgB,GAAG,wCAAwC,CAAA;AACjE,MAAM,gBAAgB,GAAG,sCAAsC,CAAA;AAE/D;;;;;;;;;GASG;AACH,MAAM,UAAU,sBAAsB,CACpC,WAAoC;IAEpC,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;QACzC,MAAM,QAAQ,GAAG,UAAU,EAAE,CAAC,UAAU,CAAC,CAAA;QACzC,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAA;QACpE,OAAO,YAAY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
|
|
14
14
|
* - `matching` filters stored credentials against a QueryByExample (both the
|
|
15
15
|
* jsonpath deep matcher and the type/issuer matcher).
|
|
16
|
+
* - `onboarding` is the `WalletOnboardingQuery` transport vocabulary: the
|
|
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).
|
|
16
21
|
* - `appKey` is the App Connect app-key credential module: the wire constants,
|
|
17
22
|
* the matching / minting / legacy re-issue paths, and the store-time
|
|
18
23
|
* refusal policy.
|
|
@@ -32,6 +37,7 @@
|
|
|
32
37
|
export * from './types.js';
|
|
33
38
|
export * from './parse.js';
|
|
34
39
|
export * from './classify.js';
|
|
40
|
+
export * from './onboarding.js';
|
|
35
41
|
export * from './matching.js';
|
|
36
42
|
export * from './appKey.js';
|
|
37
43
|
export * from './presentationSuite.js';
|
|
@@ -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
|
@@ -13,6 +13,11 @@
|
|
|
13
13
|
* typed message and dispatch on what it asks for.
|
|
14
14
|
* - `matching` filters stored credentials against a QueryByExample (both the
|
|
15
15
|
* jsonpath deep matcher and the type/issuer matcher).
|
|
16
|
+
* - `onboarding` is the `WalletOnboardingQuery` transport vocabulary: the
|
|
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).
|
|
16
21
|
* - `appKey` is the App Connect app-key credential module: the wire constants,
|
|
17
22
|
* the matching / minting / legacy re-issue paths, and the store-time
|
|
18
23
|
* refusal policy.
|
|
@@ -32,6 +37,7 @@
|
|
|
32
37
|
export * from './types.js';
|
|
33
38
|
export * from './parse.js';
|
|
34
39
|
export * from './classify.js';
|
|
40
|
+
export * from './onboarding.js';
|
|
35
41
|
export * from './matching.js';
|
|
36
42
|
export * from './appKey.js';
|
|
37
43
|
export * from './presentationSuite.js';
|
|
@@ -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"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { IVPRDetails, IVPRQuery, IWalletOnboardingRequest } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Validates a wallet-onboarding `host` and returns its serialized form. The
|
|
4
|
+
* value must parse as an absolute URL and must be `http:` or `https:` (it is
|
|
5
|
+
* dereferenced as a WAS server base URL) and must not carry a fragment; any
|
|
6
|
+
* violation throws. Compose and classification share this one rule, so the
|
|
7
|
+
* spelling the inviter publishes is the spelling the enrollee resolves, and
|
|
8
|
+
* URLs differing only in a default port, percent-encoding case, or dot
|
|
9
|
+
* segments do not name distinct servers.
|
|
10
|
+
*
|
|
11
|
+
* There is no attested origin to compare against here -- an exchange has no
|
|
12
|
+
* CHAPI requesting origin -- so unlike an App Connect `appUrl` the check is
|
|
13
|
+
* shape only. The channel's trust comes from the point-to-point fingerprint
|
|
14
|
+
* comparison of the enrollment ceremony, not from this value.
|
|
15
|
+
*
|
|
16
|
+
* The fragment check reads the serialized URL rather than `url.hash`: a bare
|
|
17
|
+
* trailing `#` sets an empty (non-null) fragment that `hash` reports as `''`.
|
|
18
|
+
*
|
|
19
|
+
* @param options {object}
|
|
20
|
+
* @param options.host {string} - The query's `host`.
|
|
21
|
+
* @returns {string} The parsed URL's serialization.
|
|
22
|
+
*/
|
|
23
|
+
export declare function serializedOnboardingHost({ host }: {
|
|
24
|
+
host: string;
|
|
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;
|
|
53
|
+
/**
|
|
54
|
+
* INVITER: the VPR details body to store on the ephemeral exchange -- one
|
|
55
|
+
* `WalletOnboardingQuery` and nothing else, since the query is one mental
|
|
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}).
|
|
59
|
+
*
|
|
60
|
+
* @param options {object}
|
|
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.
|
|
65
|
+
* @returns {IVPRDetails}
|
|
66
|
+
*/
|
|
67
|
+
export declare function composeWalletOnboardingRequest({ pointer, controller }: {
|
|
68
|
+
pointer: {
|
|
69
|
+
did?: string;
|
|
70
|
+
spaceId: string;
|
|
71
|
+
host: string;
|
|
72
|
+
};
|
|
73
|
+
controller: string;
|
|
74
|
+
}): IVPRDetails;
|
|
75
|
+
/**
|
|
76
|
+
* ENROLLEE: extracts the wallet-onboarding request from a query set, when one
|
|
77
|
+
* is present. Like an `AppConnectQuery`, a `WalletOnboardingQuery` is one
|
|
78
|
+
* mental model per exchange: at most one may appear, and it must not be
|
|
79
|
+
* combined with `QueryByExample`, standalone capability queries, or an
|
|
80
|
+
* `AppConnectQuery` (a screen that asks the person to connect a wallet must
|
|
81
|
+
* not simultaneously ask them to share credentials or grant capabilities).
|
|
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.
|
|
86
|
+
*
|
|
87
|
+
* @param options {object}
|
|
88
|
+
* @param options.queries {IVPRQuery[]}
|
|
89
|
+
* @returns {IWalletOnboardingRequest | null}
|
|
90
|
+
*/
|
|
91
|
+
export declare function walletOnboardingRequestOf({ queries }: {
|
|
92
|
+
queries: IVPRQuery[];
|
|
93
|
+
}): IWalletOnboardingRequest | null;
|
|
94
|
+
//# sourceMappingURL=onboarding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,175 @@
|
|
|
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';
|
|
34
|
+
/**
|
|
35
|
+
* Validates a wallet-onboarding `host` and returns its serialized form. The
|
|
36
|
+
* value must parse as an absolute URL and must be `http:` or `https:` (it is
|
|
37
|
+
* dereferenced as a WAS server base URL) and must not carry a fragment; any
|
|
38
|
+
* violation throws. Compose and classification share this one rule, so the
|
|
39
|
+
* spelling the inviter publishes is the spelling the enrollee resolves, and
|
|
40
|
+
* URLs differing only in a default port, percent-encoding case, or dot
|
|
41
|
+
* segments do not name distinct servers.
|
|
42
|
+
*
|
|
43
|
+
* There is no attested origin to compare against here -- an exchange has no
|
|
44
|
+
* CHAPI requesting origin -- so unlike an App Connect `appUrl` the check is
|
|
45
|
+
* shape only. The channel's trust comes from the point-to-point fingerprint
|
|
46
|
+
* comparison of the enrollment ceremony, not from this value.
|
|
47
|
+
*
|
|
48
|
+
* The fragment check reads the serialized URL rather than `url.hash`: a bare
|
|
49
|
+
* trailing `#` sets an empty (non-null) fragment that `hash` reports as `''`.
|
|
50
|
+
*
|
|
51
|
+
* @param options {object}
|
|
52
|
+
* @param options.host {string} - The query's `host`.
|
|
53
|
+
* @returns {string} The parsed URL's serialization.
|
|
54
|
+
*/
|
|
55
|
+
export function serializedOnboardingHost({ host }) {
|
|
56
|
+
let url;
|
|
57
|
+
try {
|
|
58
|
+
url = new URL(host);
|
|
59
|
+
}
|
|
60
|
+
catch (err) {
|
|
61
|
+
throw new Error(`A WalletOnboardingQuery "host" must be an absolute URL (got "${host}").`, { cause: err });
|
|
62
|
+
}
|
|
63
|
+
if (url.protocol !== 'https:' && url.protocol !== 'http:') {
|
|
64
|
+
throw new Error(`A WalletOnboardingQuery "host" must be an http(s) URL (got "${host}").`);
|
|
65
|
+
}
|
|
66
|
+
if (url.href.includes('#')) {
|
|
67
|
+
throw new Error(`A WalletOnboardingQuery "host" must not carry a fragment (got ` +
|
|
68
|
+
`"${host}").`);
|
|
69
|
+
}
|
|
70
|
+
return url.href;
|
|
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
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* INVITER: the VPR details body to store on the ephemeral exchange -- one
|
|
119
|
+
* `WalletOnboardingQuery` and nothing else, since the query is one mental
|
|
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}).
|
|
123
|
+
*
|
|
124
|
+
* @param options {object}
|
|
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.
|
|
129
|
+
* @returns {IVPRDetails}
|
|
130
|
+
*/
|
|
131
|
+
export function composeWalletOnboardingRequest({ pointer, controller }) {
|
|
132
|
+
const query = {
|
|
133
|
+
type: 'WalletOnboardingQuery',
|
|
134
|
+
...validatedOnboardingAccount({ ...pointer, controller })
|
|
135
|
+
};
|
|
136
|
+
return { query: [query] };
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* ENROLLEE: extracts the wallet-onboarding request from a query set, when one
|
|
140
|
+
* is present. Like an `AppConnectQuery`, a `WalletOnboardingQuery` is one
|
|
141
|
+
* mental model per exchange: at most one may appear, and it must not be
|
|
142
|
+
* combined with `QueryByExample`, standalone capability queries, or an
|
|
143
|
+
* `AppConnectQuery` (a screen that asks the person to connect a wallet must
|
|
144
|
+
* not simultaneously ask them to share credentials or grant capabilities).
|
|
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.
|
|
149
|
+
*
|
|
150
|
+
* @param options {object}
|
|
151
|
+
* @param options.queries {IVPRQuery[]}
|
|
152
|
+
* @returns {IWalletOnboardingRequest | null}
|
|
153
|
+
*/
|
|
154
|
+
export function walletOnboardingRequestOf({ queries }) {
|
|
155
|
+
// `WalletOnboardingQuery` extends the spec query union, so it is matched by
|
|
156
|
+
// its `type` string and upcast rather than narrowed via a type predicate.
|
|
157
|
+
const onboardingQueries = queries.filter(query => query.type === 'WalletOnboardingQuery');
|
|
158
|
+
if (onboardingQueries.length === 0) {
|
|
159
|
+
return null;
|
|
160
|
+
}
|
|
161
|
+
if (onboardingQueries.length > 1) {
|
|
162
|
+
throw new Error('More than one WalletOnboardingQuery found, exiting.');
|
|
163
|
+
}
|
|
164
|
+
const mixed = queries.some(query => query.type === 'QueryByExample' ||
|
|
165
|
+
query.type === 'AuthorizationCapabilityQuery' ||
|
|
166
|
+
query.type === 'ZcapQuery' ||
|
|
167
|
+
query.type === 'AppConnectQuery');
|
|
168
|
+
if (mixed) {
|
|
169
|
+
throw new Error('A WalletOnboardingQuery cannot be combined with QueryByExample, ' +
|
|
170
|
+
'standalone capability queries, or an AppConnectQuery.');
|
|
171
|
+
}
|
|
172
|
+
const { host, did, spaceId, controller } = onboardingQueries[0];
|
|
173
|
+
return validatedOnboardingAccount({ host, did, spaceId, controller });
|
|
174
|
+
}
|
|
175
|
+
//# sourceMappingURL=onboarding.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,KAAK,OAAO,EAAE,CAAC;QAC1D,MAAM,IAAI,KAAK,CACb,+DAA+D,IAAI,KAAK,CACzE,CAAA;IACH,CAAC;IACD,IAAI,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CACb,gEAAgE;YAC9D,IAAI,IAAI,KAAK,CAChB,CAAA;IACH,CAAC;IACD,OAAO,GAAG,CAAC,IAAI,CAAA;AACjB,CAAC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,0BAA0B,CAAC,EACzC,GAAG,EACH,OAAO,EACP,IAAI,EACJ,UAAU,EAMX;IACC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QAC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AK,uBAAuB,CACrB,CAAA;IACxC,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACnC,OAAO,IAAI,CAAA;IACb,CAAC;IACD,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAA;IACxE,CAAC;IACD,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CACxB,KAAK,CAAC,EAAE,CACN,KAAK,CAAC,IAAI,KAAK,gBAAgB;QAC/B,KAAK,CAAC,IAAI,KAAK,8BAA8B;QAC7C,KAAK,CAAC,IAAI,KAAK,WAAW;QACzB,KAAK,CAAC,IAAe,KAAK,iBAAiB,CAC/C,CAAA;IACD,IAAI,KAAK,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CACb,kEAAkE;YAChE,uDAAuD,CAC1D,CAAA;IACH,CAAC;IACD,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,iBAAiB,CAAC,CAAC,CAAE,CAAA;IAChE,OAAO,0BAA0B,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAA;AACvE,CAAC"}
|
package/dist/request/types.d.ts
CHANGED
|
@@ -145,6 +145,49 @@ export type IAppConnectRequest = {
|
|
|
145
145
|
app: IAppConnectApp;
|
|
146
146
|
capabilityQueries: IAppConnectCapabilityQuery[];
|
|
147
147
|
};
|
|
148
|
+
/**
|
|
149
|
+
* "Connect a new wallet client to this account" -- the query an already-
|
|
150
|
+
* enrolled wallet client (the inviter) puts in the VPR of an ephemeral
|
|
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.
|
|
171
|
+
*/
|
|
172
|
+
export type IWalletOnboardingQuery = {
|
|
173
|
+
type: 'WalletOnboardingQuery';
|
|
174
|
+
host: string;
|
|
175
|
+
did: string;
|
|
176
|
+
spaceId: string;
|
|
177
|
+
controller: string;
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* A wallet-onboarding request as classified and validated by
|
|
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.
|
|
184
|
+
*/
|
|
185
|
+
export type IWalletOnboardingRequest = {
|
|
186
|
+
host: string;
|
|
187
|
+
did: string;
|
|
188
|
+
spaceId: string;
|
|
189
|
+
controller: string;
|
|
190
|
+
};
|
|
148
191
|
/**
|
|
149
192
|
* The authentication signer plus the DID to name as the VP `holder`. Each app
|
|
150
193
|
* resolves this from its own key material (DCW from the selected profile's
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/request/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;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G;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,OAAO,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;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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ificationKeyPair: () => 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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B,CAAC,CAAA;AACJ,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAC/B,QAAQ,EAGT;IACC,MAAM,MAAM,GAAG,QAAQ,CAAC,SAAS,EAAE,CAAA;IACnC,OAAO,IAAI,UAAU,CAAC;QACpB,UAAU,EAAE,oBAAoB;QAChC,gBAAgB,EAAE,MAAM;QACxB,gBAAgB,EAAE,MAAM;KACzB,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",
|