@interop/wallet-core 0.69.0 → 0.71.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 +22 -36
- package/dist/clientAnnex/ladder.d.ts +103 -57
- package/dist/clientAnnex/ladder.d.ts.map +1 -1
- package/dist/clientAnnex/ladder.js +254 -335
- package/dist/clientAnnex/ladder.js.map +1 -1
- package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/ladderAnchored.js +10 -5
- package/dist/clientAnnex/ladderAnchored.js.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts +3 -15
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.js +22 -3
- package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -1
- package/dist/clientAnnex/selfEnroll.js +1 -1
- package/dist/clientAnnex/selfEnroll.js.map +1 -1
- package/dist/clientAnnex/zcap.js +1 -1
- package/dist/clientAnnex/zcap.js.map +1 -1
- package/dist/clients/grantState.d.ts +67 -0
- package/dist/clients/grantState.d.ts.map +1 -0
- package/dist/clients/grantState.js +72 -0
- package/dist/clients/grantState.js.map +1 -0
- package/dist/clients/index.d.ts +7 -0
- package/dist/clients/index.d.ts.map +1 -1
- package/dist/clients/index.js +6 -0
- package/dist/clients/index.js.map +1 -1
- package/dist/enrollment/connectCode.d.ts +4 -3
- package/dist/enrollment/connectCode.d.ts.map +1 -1
- package/dist/enrollment/connectCode.js +4 -3
- package/dist/enrollment/connectCode.js.map +1 -1
- package/dist/enrollment/enrollment.js +1 -1
- package/dist/enrollment/enrollment.js.map +1 -1
- package/dist/enrollment/index.d.ts +2 -2
- package/dist/enrollment/index.js +2 -2
- package/dist/enrollment/onboardingInvite.d.ts +1 -1
- package/dist/enrollment/onboardingInvite.js +1 -1
- package/dist/enrollment/onboardingResponse.js +1 -1
- package/dist/index.d.ts +4 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -11
- package/dist/index.js.map +1 -1
- package/dist/keyring/index.d.ts +1 -1
- package/dist/keyring/index.js +1 -1
- package/dist/keyring/kdf.d.ts +34 -20
- package/dist/keyring/kdf.d.ts.map +1 -1
- package/dist/keyring/kdf.js +37 -26
- package/dist/keyring/kdf.js.map +1 -1
- package/dist/keys/userKey.js +1 -1
- package/dist/keys/userKey.js.map +1 -1
- package/dist/recovery/continuation.d.ts +5 -4
- package/dist/recovery/continuation.d.ts.map +1 -1
- package/dist/recovery/continuation.js +14 -13
- package/dist/recovery/continuation.js.map +1 -1
- package/dist/resourceLog/document.d.ts +10 -2
- package/dist/resourceLog/document.d.ts.map +1 -1
- package/dist/resourceLog/document.js +1 -2
- package/dist/resourceLog/document.js.map +1 -1
- package/dist/space/index.d.ts +4 -2
- package/dist/space/index.d.ts.map +1 -1
- package/dist/space/index.js +4 -2
- package/dist/space/index.js.map +1 -1
- package/dist/space/wasLink.d.ts +13 -2
- package/dist/space/wasLink.d.ts.map +1 -1
- package/dist/space/wasLink.js +28 -2
- package/dist/space/wasLink.js.map +1 -1
- package/dist/unlock/index.d.ts +1 -1
- package/dist/unlock/index.d.ts.map +1 -1
- package/dist/unlock/index.js.map +1 -1
- package/dist/unlock/standingClient.d.ts +1 -1
- package/dist/unlock/standingClient.d.ts.map +1 -1
- package/dist/unlock/standingClient.js +3 -3
- package/dist/unlock/standingClient.js.map +1 -1
- package/dist/unlock/standingWebvh.d.ts +81 -19
- package/dist/unlock/standingWebvh.d.ts.map +1 -1
- package/dist/unlock/standingWebvh.js +170 -30
- package/dist/unlock/standingWebvh.js.map +1 -1
- package/dist/webvh/did.d.ts +2 -4
- package/dist/webvh/did.d.ts.map +1 -1
- package/dist/webvh/did.js +2 -4
- package/dist/webvh/did.js.map +1 -1
- package/dist/webvh/didWebvh.d.ts +3 -2
- package/dist/webvh/didWebvh.d.ts.map +1 -1
- package/dist/webvh/didWebvh.js +2 -1
- package/dist/webvh/didWebvh.js.map +1 -1
- package/dist/webvh/index.d.ts +1 -1
- package/dist/webvh/index.js +1 -1
- package/dist/webvh/revokeClient.d.ts +13 -7
- package/dist/webvh/revokeClient.d.ts.map +1 -1
- package/dist/webvh/revokeClient.js +14 -7
- package/dist/webvh/revokeClient.js.map +1 -1
- package/dist/webvh/zcap.js +1 -1
- package/dist/webvh/zcap.js.map +1 -1
- package/package.json +2 -23
- package/dist/identity/agents.d.ts +0 -100
- package/dist/identity/agents.d.ts.map +0 -1
- package/dist/identity/agents.js +0 -120
- package/dist/identity/agents.js.map +0 -1
- package/dist/identity/index.d.ts +0 -24
- package/dist/identity/index.d.ts.map +0 -1
- package/dist/identity/index.js +0 -23
- package/dist/identity/index.js.map +0 -1
- package/dist/identity/keyResolver.d.ts +0 -30
- package/dist/identity/keyResolver.d.ts.map +0 -1
- package/dist/identity/keyResolver.js +0 -25
- package/dist/identity/keyResolver.js.map +0 -1
- package/dist/request/appKey.d.ts +0 -295
- package/dist/request/appKey.d.ts.map +0 -1
- package/dist/request/appKey.js +0 -516
- package/dist/request/appKey.js.map +0 -1
- package/dist/request/capabilityRequest.d.ts +0 -41
- package/dist/request/capabilityRequest.d.ts.map +0 -1
- package/dist/request/capabilityRequest.js +0 -46
- package/dist/request/capabilityRequest.js.map +0 -1
- package/dist/request/classify.d.ts +0 -226
- package/dist/request/classify.d.ts.map +0 -1
- package/dist/request/classify.js +0 -416
- package/dist/request/classify.js.map +0 -1
- package/dist/request/composeVp.d.ts +0 -52
- package/dist/request/composeVp.d.ts.map +0 -1
- package/dist/request/composeVp.js +0 -176
- package/dist/request/composeVp.js.map +0 -1
- package/dist/request/ephemeralExchange.d.ts +0 -100
- package/dist/request/ephemeralExchange.d.ts.map +0 -1
- package/dist/request/ephemeralExchange.js +0 -230
- package/dist/request/ephemeralExchange.js.map +0 -1
- package/dist/request/exchangeClient.d.ts +0 -142
- package/dist/request/exchangeClient.d.ts.map +0 -1
- package/dist/request/exchangeClient.js +0 -241
- package/dist/request/exchangeClient.js.map +0 -1
- package/dist/request/index.d.ts +0 -59
- package/dist/request/index.d.ts.map +0 -1
- package/dist/request/index.js +0 -59
- package/dist/request/index.js.map +0 -1
- package/dist/request/interactionRequest.d.ts +0 -23
- package/dist/request/interactionRequest.d.ts.map +0 -1
- package/dist/request/interactionRequest.js +0 -46
- package/dist/request/interactionRequest.js.map +0 -1
- package/dist/request/interactionUrl.d.ts +0 -42
- package/dist/request/interactionUrl.d.ts.map +0 -1
- package/dist/request/interactionUrl.js +0 -104
- package/dist/request/interactionUrl.js.map +0 -1
- package/dist/request/matching.d.ts +0 -95
- package/dist/request/matching.d.ts.map +0 -1
- package/dist/request/matching.js +0 -205
- package/dist/request/matching.js.map +0 -1
- package/dist/request/onboarding.d.ts +0 -94
- package/dist/request/onboarding.d.ts.map +0 -1
- package/dist/request/onboarding.js +0 -167
- package/dist/request/onboarding.js.map +0 -1
- package/dist/request/parse.d.ts +0 -63
- package/dist/request/parse.d.ts.map +0 -1
- package/dist/request/parse.js +0 -153
- package/dist/request/parse.js.map +0 -1
- package/dist/request/presentationSuite.d.ts +0 -71
- package/dist/request/presentationSuite.d.ts.map +0 -1
- package/dist/request/presentationSuite.js +0 -143
- package/dist/request/presentationSuite.js.map +0 -1
- package/dist/request/processRequest.d.ts +0 -45
- package/dist/request/processRequest.d.ts.map +0 -1
- package/dist/request/processRequest.js +0 -147
- package/dist/request/processRequest.js.map +0 -1
- package/dist/request/queryPredicates.d.ts +0 -98
- package/dist/request/queryPredicates.d.ts.map +0 -1
- package/dist/request/queryPredicates.js +0 -107
- package/dist/request/queryPredicates.js.map +0 -1
- package/dist/request/types.d.ts +0 -257
- package/dist/request/types.d.ts.map +0 -1
- package/dist/request/types.js +0 -2
- package/dist/request/types.js.map +0 -1
- package/dist/request/walletInput.d.ts +0 -93
- package/dist/request/walletInput.d.ts.map +0 -1
- package/dist/request/walletInput.js +0 -179
- package/dist/request/walletInput.js.map +0 -1
|
@@ -20,9 +20,10 @@
|
|
|
20
20
|
* layer rule lets the annex import from the base and not the reverse.
|
|
21
21
|
*/
|
|
22
22
|
import { deriveNextKeyHash } from '@interop/did-method-webvh';
|
|
23
|
-
import { effectiveParameters, ladderVerificationMethod,
|
|
23
|
+
import { effectiveParameters, ladderVerificationMethod, readPublishedLogOrThrow, servedHead } from '../webvh/didWebvh.js';
|
|
24
24
|
import { accountEntryHead, signAccountEntry } from '../webvh/accountEntry.js';
|
|
25
25
|
import { mergeVerificationMethods } from '../webvh/mergeMethods.js';
|
|
26
|
+
import { unlockKeyVerificationMethod } from '../unlock/standingWebvh.js';
|
|
26
27
|
import { credentialKeyAgreementMethods, ladderVmIds, retiredCredentialKeys } from '../resourceLog/document.js';
|
|
27
28
|
// The base-side dependency the lint config pins: the ladder ATTRIBUTION
|
|
28
29
|
// helpers only, never the annex log machinery. The add-and-retire entry
|
|
@@ -196,7 +197,7 @@ export class RecoveryCredentialStandingError extends Error {
|
|
|
196
197
|
* The reveal-and-commit entry commits, in this order, the successor key's
|
|
197
198
|
* hash, its staged partner's hash, and the replacement code's rung-0 hash --
|
|
198
199
|
* the ratified append order of `decisions/0007` (the replacement's comes
|
|
199
|
-
* LAST)
|
|
200
|
+
* LAST), which the forward ladder walk reads. The
|
|
200
201
|
* add-and-retire entry is built on the head the reveal entry's own publish
|
|
201
202
|
* leaves standing, with no read in between; against a store whose PUT serves
|
|
202
203
|
* no ETag it is re-read under the same pin instead, so its compare-and-swap
|
|
@@ -361,18 +362,21 @@ export async function recoveryContinuationOnce({ store, recovery, successor, rep
|
|
|
361
362
|
// key-agreement member: a code is a standing credential with a ladder,
|
|
362
363
|
// and its own bridge delegation is signed by this VM, so a replacement
|
|
363
364
|
// without it could never spend (`decisions/0019`, `decisions/0020`).
|
|
364
|
-
// Its rung-0 hash
|
|
365
|
-
//
|
|
365
|
+
// Its rung-0 hash is committed already -- the reveal-and-commit entry
|
|
366
|
+
// did that, and this entry carries it through -- and the member names
|
|
367
|
+
// it as its ladder commitment, which is how a later recovery anchors
|
|
368
|
+
// the replacement's ladder without reading the reveal entry.
|
|
366
369
|
const replacementLadderVmId = `${did}#${replacement.ladderVmKeyMultibase}`;
|
|
367
370
|
const variant = added({ did, doc, persisted });
|
|
368
371
|
const addedMethods = [
|
|
369
372
|
...variant.methods,
|
|
370
|
-
{
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
373
|
+
unlockKeyVerificationMethod({
|
|
374
|
+
did,
|
|
375
|
+
keyAgreement: {
|
|
376
|
+
publicKeyMultibase: replacement.keyAgreementKeyMultibase
|
|
377
|
+
},
|
|
378
|
+
ladderCommitment: replacementHash
|
|
379
|
+
}),
|
|
376
380
|
ladderVerificationMethod({
|
|
377
381
|
controller: did,
|
|
378
382
|
publicKeyMultibase: replacement.ladderVmKeyMultibase
|
|
@@ -436,9 +440,6 @@ export async function recoveryContinuationOnce({ store, recovery, successor, rep
|
|
|
436
440
|
...(variant.assertionMethod ?? []),
|
|
437
441
|
replacementLadderVmId
|
|
438
442
|
],
|
|
439
|
-
// The variant's own key-agreement member precedes the replacement
|
|
440
|
-
// code's: the position `decisions/0014`'s anchor rule reads the
|
|
441
|
-
// pair by.
|
|
442
443
|
keyAgreement: [...(variant.keyAgreement ?? []), replacementVmId],
|
|
443
444
|
capabilityInvocation: variant.capabilityInvocation,
|
|
444
445
|
capabilityDelegation: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"continuation.js","sourceRoot":"","sources":["../../src/recovery/continuation.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAO7D,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,
|
|
1
|
+
{"version":3,"file":"continuation.js","sourceRoot":"","sources":["../../src/recovery/continuation.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,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G;QAChB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,SAAS,EAAE,IAAI;QACf,sBAAsB;QACtB,gBAAgB,EAAE,MAAM,CAAC,YAAY;QACrC,wBAAwB,EAAE,MAAM,CAAC,wBAAwB;KAC1D,CAAA;AACH,CAAC"}
|
|
@@ -30,6 +30,14 @@
|
|
|
30
30
|
* (`publicKeyCommitment`). The `type` rides along so a consumer can tell the
|
|
31
31
|
* two published flavors apart (`Multikey` vs `MultikeyCommitment`) instead of
|
|
32
32
|
* inferring the flavor from which property happens to be present.
|
|
33
|
+
*
|
|
34
|
+
* A credential-class member of either flavor also names its ladder's rung-0
|
|
35
|
+
* commitment (`ladderCommitment`): `hash(rung 0)` in the multihash form
|
|
36
|
+
* `nextKeyHashes` carries, the value a seedless reader anchors the
|
|
37
|
+
* credential's ladder walk on. It is a plain JSON member with no JSON-LD
|
|
38
|
+
* term: nothing processes the account document as JSON-LD, and every
|
|
39
|
+
* signature over it is JCS-canonicalized. An enrolled client's marked twin
|
|
40
|
+
* never carries it.
|
|
33
41
|
*/
|
|
34
42
|
export interface ResolvedKeyAgreementMethod {
|
|
35
43
|
id?: string;
|
|
@@ -37,6 +45,7 @@ export interface ResolvedKeyAgreementMethod {
|
|
|
37
45
|
controller?: string;
|
|
38
46
|
publicKeyMultibase?: string;
|
|
39
47
|
publicKeyCommitment?: string;
|
|
48
|
+
ladderCommitment?: string;
|
|
40
49
|
}
|
|
41
50
|
/**
|
|
42
51
|
* A locally verified did:webvh document, read for the verification relations
|
|
@@ -133,8 +142,7 @@ export declare function credentialKeyAgreementMethods({ doc, did }: {
|
|
|
133
142
|
* did not. Credential-class means account-controlled
|
|
134
143
|
* (`credentialKeyAgreementMethods`), so an enrolled client's marked twin
|
|
135
144
|
* never counts. The co-introduction arm of the ladder-VM attribution reads
|
|
136
|
-
* this and refuses to act unless the answer is exactly this credential
|
|
137
|
-
* the bind-anchor rule reads it to find a credential's bind entry.
|
|
145
|
+
* this and refuses to act unless the answer is exactly this credential.
|
|
138
146
|
*
|
|
139
147
|
* @param options {object}
|
|
140
148
|
* @param options.doc {KeyAgreementDocument} the entry's document
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../src/resourceLog/document.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH
|
|
1
|
+
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../src/resourceLog/document.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,0BAA0B;IACzC,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,kBAAkB,CAAC,EAAE,0BAA0B,EAAE,CAAA;IACjD,eAAe,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,0BAA0B,CAAC,CAAA;IAC5D,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,0BAA0B,CAAC,CAAA;IACzD,oBAAoB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,0BAA0B,CAAC,CAAA;IACjE,oBAAoB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,0BAA0B,CAAC,CAAA;CAClE;AAED;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,eAAe,CAAA;AAElD;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,CACpC,MAAM,eAAe,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CAAC,EAC1B,GAAG,EACJ,EAAE;IACD,GAAG,EAAE;QACH,oBAAoB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG;YAAE,EAAE,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;QACtD,oBAAoB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG;YAAE,EAAE,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KACvD,CAAA;CACF,GAAG,MAAM,EAAE,CAGX;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,EAC9B,GAAG,EACJ,EAAE;IACD,GAAG,EAAE,eAAe,CAAA;CACrB,GAAG,0BAA0B,EAAE,CAM/B"}
|
|
@@ -112,8 +112,7 @@ export function credentialKeyAgreementMethods({ doc, did }) {
|
|
|
112
112
|
* did not. Credential-class means account-controlled
|
|
113
113
|
* (`credentialKeyAgreementMethods`), so an enrolled client's marked twin
|
|
114
114
|
* never counts. The co-introduction arm of the ladder-VM attribution reads
|
|
115
|
-
* this and refuses to act unless the answer is exactly this credential
|
|
116
|
-
* the bind-anchor rule reads it to find a credential's bind entry.
|
|
115
|
+
* this and refuses to act unless the answer is exactly this credential.
|
|
117
116
|
*
|
|
118
117
|
* @param options {object}
|
|
119
118
|
* @param options.doc {KeyAgreementDocument} the entry's document
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document.js","sourceRoot":"","sources":["../../src/resourceLog/document.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;GAqBG;
|
|
1
|
+
{"version":3,"file":"document.js","sourceRoot":"","sources":["../../src/resourceLog/document.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;GAqBG;AAyDH;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CACzB,QAAqD;IAErD,MAAM,GAAG,GAAa,EAAE,CAAA;IACxB,KAAK,MAAM,KAAK,IAAI,QAAQ,IAAI,EAAE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AAC,MAAM,CAAC,EAAE,CAAC;SACxB,MAAM,CAAC,CAAC,EAAE,EAAgB,EAAE,CAAC,EAAE,KAAK,SAAS,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAA;AACrE,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,WAAW,CAAC,EAC1B,GAAG,EAMJ;IACC,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC,CAAA;IAChE,OAAO,WAAW,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAA;AAC/E,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,eAAe,CAAC,EAC9B,GAAG,EAGJ;IACC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,WAAW,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAA;IACzC,OAAO,uBAAuB,CAAC;QAC7B,GAAG;QACH,QAAQ,EAAE,sBAAsB;KACjC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,MAAM,CAAC,EAAE,KAAK,QAAQ,IAAI,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAA;AAC1E,CAAC"}
|
package/dist/space/index.d.ts
CHANGED
|
@@ -30,7 +30,9 @@
|
|
|
30
30
|
* - `publicCredentialUrl`, the world-readable shared-credential URL both
|
|
31
31
|
* replicas derive identically.
|
|
32
32
|
* - The `was-link` QR hand-off contract (`buildWasLinkPayload` /
|
|
33
|
-
* `parseWasLinkPayload` / `encodeWasLinkSecret`)
|
|
33
|
+
* `parseWasLinkPayload` / `encodeWasLinkSecret`) and `isWasLinkPayload`,
|
|
34
|
+
* the recognizer a wallet hands `@interop/wallet-request`'s input
|
|
35
|
+
* classifier.
|
|
34
36
|
* - `CEREMONY_IDS` / `CeremonyId`, the typed vocabulary of shared account
|
|
35
37
|
* ceremony ids.
|
|
36
38
|
*/
|
|
@@ -43,7 +45,7 @@ export { plaintextCollection } from './plaintextCollection.js';
|
|
|
43
45
|
export { ACTIVITY_TYPE, addHistoryNewAccount, addHistorySpaceCreated, addHistoryCredentialCreated, addHistoryCredentialDeleted, addHistoryCredentialShared, addHistoryCredentialUnshared, addHistoryLogin, addHistoryWalletLogin, addHistoryAppRevoke, addHistoryAgentRevoke, addHistoryClientRevoked, addHistoryGenerationCollected } from './activity.js';
|
|
44
46
|
export type { WalletActivity, ActivityGrant } from './activity.js';
|
|
45
47
|
export { publicCredentialUrl } from './publicLink.js';
|
|
46
|
-
export { encodeWasLinkSecret, buildWasLinkPayload, parseWasLinkPayload } from './wasLink.js';
|
|
48
|
+
export { encodeWasLinkSecret, isWasLinkPayload, buildWasLinkPayload, parseWasLinkPayload } from './wasLink.js';
|
|
47
49
|
export type { WasLinkPayload } from './wasLink.js';
|
|
48
50
|
export { HumanReadableError } from './errors.js';
|
|
49
51
|
export { CEREMONY_IDS } from './ceremony.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/space/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/space/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,EACL,iBAAiB,EACjB,8BAA8B,EAC9B,6BAA6B,EAC7B,0BAA0B,EAC1B,0BAA0B,EAC1B,mCAAmC,EACnC,kCAAkC,EAClC,+BAA+B,EAC/B,8BAA8B,EAC9B,sCAAsC,EACtC,+BAA+B,EAC/B,yBAAyB,EACzB,yBAAyB,EACzB,6BAA6B,EAC9B,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,yBAAyB,EACzB,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,8BAA8B,EAC9B,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,4BAA4B,EAC5B,kCAAkC,EAClC,sBAAsB,EACtB,uBAAuB,EACvB,gBAAgB,EACjB,MAAM,kBAAkB,CAAA;AACzB,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAE/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAExD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAE9D,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,sBAAsB,EACtB,2BAA2B,EAC3B,2BAA2B,EAC3B,0BAA0B,EAC1B,4BAA4B,EAC5B,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,6BAA6B,EAC9B,MAAM,eAAe,CAAA;AACtB,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAElE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAErD,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,cAAc,CAAA;AACrB,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAElD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA"}
|
package/dist/space/index.js
CHANGED
|
@@ -30,7 +30,9 @@
|
|
|
30
30
|
* - `publicCredentialUrl`, the world-readable shared-credential URL both
|
|
31
31
|
* replicas derive identically.
|
|
32
32
|
* - The `was-link` QR hand-off contract (`buildWasLinkPayload` /
|
|
33
|
-
* `parseWasLinkPayload` / `encodeWasLinkSecret`)
|
|
33
|
+
* `parseWasLinkPayload` / `encodeWasLinkSecret`) and `isWasLinkPayload`,
|
|
34
|
+
* the recognizer a wallet hands `@interop/wallet-request`'s input
|
|
35
|
+
* classifier.
|
|
34
36
|
* - `CEREMONY_IDS` / `CeremonyId`, the typed vocabulary of shared account
|
|
35
37
|
* ceremony ids.
|
|
36
38
|
*/
|
|
@@ -41,7 +43,7 @@ export { provisionWalletSpace } from './provisioning.js';
|
|
|
41
43
|
export { plaintextCollection } from './plaintextCollection.js';
|
|
42
44
|
export { ACTIVITY_TYPE, addHistoryNewAccount, addHistorySpaceCreated, addHistoryCredentialCreated, addHistoryCredentialDeleted, addHistoryCredentialShared, addHistoryCredentialUnshared, addHistoryLogin, addHistoryWalletLogin, addHistoryAppRevoke, addHistoryAgentRevoke, addHistoryClientRevoked, addHistoryGenerationCollected } from './activity.js';
|
|
43
45
|
export { publicCredentialUrl } from './publicLink.js';
|
|
44
|
-
export { encodeWasLinkSecret, buildWasLinkPayload, parseWasLinkPayload } from './wasLink.js';
|
|
46
|
+
export { encodeWasLinkSecret, isWasLinkPayload, buildWasLinkPayload, parseWasLinkPayload } from './wasLink.js';
|
|
45
47
|
export { HumanReadableError } from './errors.js';
|
|
46
48
|
export { CEREMONY_IDS } from './ceremony.js';
|
|
47
49
|
//# sourceMappingURL=index.js.map
|
package/dist/space/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/space/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/space/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,EACL,iBAAiB,EACjB,8BAA8B,EAC9B,6BAA6B,EAC7B,0BAA0B,EAC1B,0BAA0B,EAC1B,mCAAmC,EACnC,kCAAkC,EAClC,+BAA+B,EAC/B,8BAA8B,EAC9B,sCAAsC,EACtC,+BAA+B,EAC/B,yBAAyB,EACzB,yBAAyB,EACzB,6BAA6B,EAC9B,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,yBAAyB,EACzB,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,8BAA8B,EAC9B,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,4BAA4B,EAC5B,kCAAkC,EAClC,sBAAsB,EACtB,uBAAuB,EACvB,gBAAgB,EACjB,MAAM,kBAAkB,CAAA;AAGzB,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAExD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAE9D,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,sBAAsB,EACtB,2BAA2B,EAC3B,2BAA2B,EAC3B,0BAA0B,EAC1B,4BAA4B,EAC5B,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,6BAA6B,EAC9B,MAAM,eAAe,CAAA;AAGtB,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAErD,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,cAAc,CAAA;AAGrB,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA"}
|
package/dist/space/wasLink.d.ts
CHANGED
|
@@ -9,10 +9,21 @@ export interface WasLinkPayload {
|
|
|
9
9
|
secret: string;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
* The `t` discriminator member every `was-link` payload carries.
|
|
13
|
-
* input classification can match it structurally without calling the parser.
|
|
12
|
+
* The `t` discriminator member every `was-link` payload carries.
|
|
14
13
|
*/
|
|
15
14
|
export declare const WAS_LINK_TYPE = "was-link";
|
|
15
|
+
/**
|
|
16
|
+
* Whether some scanned or pasted text has a `was-link` payload's JSON shape.
|
|
17
|
+
* Matched structurally on the `t` member rather than by calling the parser,
|
|
18
|
+
* so an unrelated JSON blob is not refused with a connection-code error
|
|
19
|
+
* message. This is the recognizer a wallet hands `@interop/wallet-request`'s
|
|
20
|
+
* input classifier for its `was-link` branch; whether the payload is valid
|
|
21
|
+
* is {@link parseWasLinkPayload}'s answer.
|
|
22
|
+
*
|
|
23
|
+
* @param text {string}
|
|
24
|
+
* @returns {boolean}
|
|
25
|
+
*/
|
|
26
|
+
export declare function isWasLinkPayload(text: string): boolean;
|
|
16
27
|
/**
|
|
17
28
|
* Encodes a passphrase into the payload's `secret` field: `base64url(utf8(...))`,
|
|
18
29
|
* no padding.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wasLink.d.ts","sourceRoot":"","sources":["../../src/space/wasLink.ts"],"names":[],"mappings":"AAgBA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;CACf;AAED
|
|
1
|
+
{"version":3,"file":"wasLink.d.ts","sourceRoot":"","sources":["../../src/space/wasLink.ts"],"names":[],"mappings":"AAgBA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,aAAa,CAAA;AAEvC;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAgBtD;AA4CD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,SAAS,EACT,UAAU,EACX,EAAE;IACD,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;CACnB,GAAG,MAAM,CAOT;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAyC/D"}
|
package/dist/space/wasLink.js
CHANGED
|
@@ -14,10 +14,36 @@
|
|
|
14
14
|
import { base64urlnopad } from '@scure/base';
|
|
15
15
|
import { HumanReadableError } from './errors.js';
|
|
16
16
|
/**
|
|
17
|
-
* The `t` discriminator member every `was-link` payload carries.
|
|
18
|
-
* input classification can match it structurally without calling the parser.
|
|
17
|
+
* The `t` discriminator member every `was-link` payload carries.
|
|
19
18
|
*/
|
|
20
19
|
export const WAS_LINK_TYPE = 'was-link';
|
|
20
|
+
/**
|
|
21
|
+
* Whether some scanned or pasted text has a `was-link` payload's JSON shape.
|
|
22
|
+
* Matched structurally on the `t` member rather than by calling the parser,
|
|
23
|
+
* so an unrelated JSON blob is not refused with a connection-code error
|
|
24
|
+
* message. This is the recognizer a wallet hands `@interop/wallet-request`'s
|
|
25
|
+
* input classifier for its `was-link` branch; whether the payload is valid
|
|
26
|
+
* is {@link parseWasLinkPayload}'s answer.
|
|
27
|
+
*
|
|
28
|
+
* @param text {string}
|
|
29
|
+
* @returns {boolean}
|
|
30
|
+
*/
|
|
31
|
+
export function isWasLinkPayload(text) {
|
|
32
|
+
const trimmed = text.trim();
|
|
33
|
+
if (!trimmed.startsWith('{')) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
let parsed;
|
|
37
|
+
try {
|
|
38
|
+
parsed = JSON.parse(trimmed);
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
return (parsed !== null &&
|
|
44
|
+
typeof parsed === 'object' &&
|
|
45
|
+
parsed.t === WAS_LINK_TYPE);
|
|
46
|
+
}
|
|
21
47
|
const NOT_A_LINK = 'This QR code is not a wallet connection code.';
|
|
22
48
|
const BAD_SERVER = 'Connection code points at an insecure or invalid server and was rejected.';
|
|
23
49
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wasLink.js","sourceRoot":"","sources":["../../src/space/wasLink.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;GASG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAahD
|
|
1
|
+
{"version":3,"file":"wasLink.js","sourceRoot":"","sources":["../../src/space/wasLink.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;GASG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAahD;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CAAA;AAEvC;;;;;;;;;;GAUG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAA;IAC3B,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QAC7B,OAAO,KAAK,CAAA;IACd,CAAC;IACD,IAAI,MAAe,CAAA;IACnB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;IAC9B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAA;IACd,CAAC;IACD,OAAO,CACL,MAAM,KAAK,IAAI;QACf,OAAO,MAAM,KAAK,QAAQ;QACzB,MAA0B,CAAC,CAAC,KAAK,aAAa,CAChD,CAAA;AACH,CAAC;AAED,MAAM,UAAU,GAAG,+CAA+C,CAAA;AAClE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CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,kBAAkB,CAAC,sCAAsC,CAAC,CAAA;IACtE,CAAC;IAED,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,CAAA;AAC1C,CAAC"}
|
package/dist/unlock/index.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export type { StandingUnlockClient, UnlockClientIdentity } from './standingClien
|
|
|
40
40
|
export { computeUnlockBinding, LADDER_SEED_BYTES, recordSealedRecipientKeys, remintUnlockRecordDelegations, UnlockBindingError, unlockRecordBinding, unlockRecordSealedTo, unwrapUnlockRecord, wrapUnlockRecord } from './unlockRecord.js';
|
|
41
41
|
export type { SealedRecordMember, SignedUnlockRecord, UnlockRecordContents, UnlockRecordProofState } from './unlockRecord.js';
|
|
42
42
|
export { assertLadderVmClaimed, ladderVmClaimOf, preflightUnlockCredentialRetirement, publishUnlockKey, removeUnlockKey, UnclaimedLadderVmRetirementError, unlockKeyVerificationMethod, unlockKeyVmId } from './standingWebvh.js';
|
|
43
|
-
export type { LadderVmRemovalReport, StandingUnlockKeys, UnlockKeyAgreementPublication, UnlockLogStore } from './standingWebvh.js';
|
|
43
|
+
export type { CredentialKeyAgreementMethod, LadderVmRemovalReport, StandingUnlockKeys, UnlockKeyAgreementPublication, UnlockLogStore } from './standingWebvh.js';
|
|
44
44
|
export { retireUnlockCredential } from './retire.js';
|
|
45
45
|
export type { ClientAnnexInventoryRetirement, UnlockCredentialRetirementResult } from './retire.js';
|
|
46
46
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/unlock/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EACL,4BAA4B,EAC5B,oBAAoB,EACpB,4BAA4B,EAC7B,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EACV,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,yBAAyB,EACzB,6BAA6B,EAC7B,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,mCAAmC,EACnC,gBAAgB,EAChB,eAAe,EACf,gCAAgC,EAChC,2BAA2B,EAC3B,aAAa,EACd,MAAM,oBAAoB,CAAA;AAC3B,YAAY,EACV,qBAAqB,EACrB,kBAAkB,EAClB,6BAA6B,EAC7B,cAAc,EACf,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AACpD,YAAY,EACV,8BAA8B,EAC9B,gCAAgC,EACjC,MAAM,aAAa,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/unlock/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EACL,4BAA4B,EAC5B,oBAAoB,EACpB,4BAA4B,EAC7B,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EACV,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,yBAAyB,EACzB,6BAA6B,EAC7B,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,mCAAmC,EACnC,gBAAgB,EAChB,eAAe,EACf,gCAAgC,EAChC,2BAA2B,EAC3B,aAAa,EACd,MAAM,oBAAoB,CAAA;AAC3B,YAAY,EACV,4BAA4B,EAC5B,qBAAqB,EACrB,kBAAkB,EAClB,6BAA6B,EAC7B,cAAc,EACf,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AACpD,YAAY,EACV,8BAA8B,EAC9B,gCAAgC,EACjC,MAAM,aAAa,CAAA"}
|
package/dist/unlock/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/unlock/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EACL,4BAA4B,EAC5B,oBAAoB,EACpB,4BAA4B,EAC7B,MAAM,qBAAqB,CAAA;AAM5B,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,yBAAyB,EACzB,6BAA6B,EAC7B,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,mBAAmB,CAAA;AAQ1B,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,mCAAmC,EACnC,gBAAgB,EAChB,eAAe,EACf,gCAAgC,EAChC,2BAA2B,EAC3B,aAAa,EACd,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/unlock/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EACL,4BAA4B,EAC5B,oBAAoB,EACpB,4BAA4B,EAC7B,MAAM,qBAAqB,CAAA;AAM5B,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,yBAAyB,EACzB,6BAA6B,EAC7B,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,mBAAmB,CAAA;AAQ1B,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,mCAAmC,EACnC,gBAAgB,EAChB,eAAe,EACf,gCAAgC,EAChC,2BAA2B,EAC3B,aAAa,EACd,MAAM,oBAAoB,CAAA;AAS3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ProfileAgents } from '
|
|
1
|
+
import type { ProfileAgents } from '@interop/was-client/identity';
|
|
2
2
|
/**
|
|
3
3
|
* The HKDF salt for a standing credential's client-side expansions, and the
|
|
4
4
|
* per-key info labels. All permanent. The salt differs from the recovery
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standingClient.d.ts","sourceRoot":"","sources":["../../src/unlock/standingClient.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"standingClient.d.ts","sourceRoot":"","sources":["../../src/unlock/standingClient.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAEjE;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,yCAAyC,CAAA;AAI1E;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,EAAE,aAAa,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,wBAAwB,EAAE,MAAM,CAAA;IAChC;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAA;CACrB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,4BAA4B,CAAC,EACjD,UAAU,EACX,EAAE;IACD,UAAU,EAAE,UAAU,CAAA;CACvB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAmBhC;AAED;;;;;GAKG;AACH,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;IAChE,aAAa,EAAE,UAAU,CAAA;CAC1B;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,4BAA4B,CAAC,EACjD,UAAU,EACX,EAAE;IACD,UAAU,EAAE,UAAU,CAAA;CACvB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAkBhC"}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
import { hkdf } from '@noble/hashes/hkdf.js';
|
|
24
24
|
import { sha256 } from '@noble/hashes/sha2.js';
|
|
25
25
|
import { rosterRecipientKid } from '../keys/userKeyRoster.js';
|
|
26
|
-
import { agentsFromSeed } from '
|
|
26
|
+
import { agentsFromSeed } from '@interop/was-client/identity';
|
|
27
27
|
/**
|
|
28
28
|
* The HKDF salt for a standing credential's client-side expansions, and the
|
|
29
29
|
* per-key info labels. All permanent. The salt differs from the recovery
|
|
@@ -51,11 +51,11 @@ export async function unlockClientIdentityFromSeed({ clientSeed }) {
|
|
|
51
51
|
if (!keyAgreementKeyMultibase) {
|
|
52
52
|
throw new Error('The derived key-agreement key has no public multibase.');
|
|
53
53
|
}
|
|
54
|
-
const [, , signingKeyMultibase] = agents.
|
|
54
|
+
const [, , signingKeyMultibase] = agents.controllerDid.split(':');
|
|
55
55
|
return {
|
|
56
56
|
clientSeed,
|
|
57
57
|
agents,
|
|
58
|
-
clientDid: agents.
|
|
58
|
+
clientDid: agents.controllerDid,
|
|
59
59
|
signingKeyMultibase: signingKeyMultibase,
|
|
60
60
|
keyAgreementKeyMultibase,
|
|
61
61
|
recipientKid: rosterRecipientKid({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standingClient.js","sourceRoot":"","sources":["../../src/unlock/standingClient.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,uBA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kBAAkB,CAAC;YAC/B,mBAAmB,EAAE,mBAAoB;YACzC,wBAAwB;SACzB,CAAC;KACH,CAAA;AACH,CAAC;AAYD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAAC,EACjD,UAAU,EAGX;IACC,MAAM,IAAI,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAA;IAC3D,MAAM,UAAU,GAAG,IAAI,CACrB,MAAM,EACN,UAAU,EACV,IAAI,EACJ,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,yBAAyB,CAAC,EACnD,EAAE,CACH,CAAA;IACD,MAAM,aAAa,GAAG,IAAI,CACxB,MAAM,EACN,UAAU,EACV,IAAI,EACJ,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,yBAAyB,CAAC,EACnD,EAAE,CACH,CAAA;IACD,MAAM,QAAQ,GAAG,MAAM,4BAA4B,CAAC,EAAE,UAAU,EAAE,CAAC,CAAA;IACnE,OAAO,EAAE,GAAG,QAAQ,EAAE,aAAa,EAAE,CAAA;AACvC,CAAC"}
|
|
@@ -109,11 +109,32 @@ export declare function unlockKeyVmId({ did, keyAgreement }: {
|
|
|
109
109
|
}): string;
|
|
110
110
|
/**
|
|
111
111
|
* What of a standing credential's ladder currently stands in the published
|
|
112
|
-
* log, resolved
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
112
|
+
* log, resolved from the two anchors a ceremony holds and cross-checked
|
|
113
|
+
* between them. The registry's recorded update key (`updateKeyMultibase`,
|
|
114
|
+
* rung 0 at bind time or a later rung a self-enrollment advanced it to) is
|
|
115
|
+
* one anchor; the credential's own `keyAgreement` member names the other,
|
|
116
|
+
* its rung-0 commitment (`ladderCommitment`, read by
|
|
117
|
+
* {@link credentialLadderAnchor}). Either one alone can be wrong for this
|
|
118
|
+
* credential -- a registry entry recording another ladder's key, a member a
|
|
119
|
+
* foreign update-key holder restated -- and a walk that trusts one strikes
|
|
120
|
+
* whatever ladder that anchor names. The removal edit uses the result to
|
|
121
|
+
* know what to strike; the retirement ceremony uses it one stage earlier,
|
|
122
|
+
* to name the ladder VM it is about to strike to the pass that re-mints
|
|
123
|
+
* whatever that VM signed for other credentials.
|
|
124
|
+
*
|
|
125
|
+
* Seedless, both walks run when the member names an anchor. The
|
|
126
|
+
* member-anchored walk starts at rung 0 and needs no backward recovery, so
|
|
127
|
+
* it is the complete reading; the registry-anchored walk may start at a
|
|
128
|
+
* later rung and recover the earlier ones from the log's positional rules,
|
|
129
|
+
* which leaves it at best equal and in one reachable history (WC-158)
|
|
130
|
+
* short of the member's. So the registry-anchored inventory must be
|
|
131
|
+
* contained in the member-anchored one, and the member-anchored one is what
|
|
132
|
+
* is returned. Anything else -- the two anchors naming different ladders --
|
|
133
|
+
* refuses with {@link LadderAttributionError}. A member naming no anchor
|
|
134
|
+
* (a split bind torn before its authority entry, a member without the
|
|
135
|
+
* property) leaves the registry walk to answer alone, as before. With the
|
|
136
|
+
* ladder seed in hand the cross-check is direct: the seed's rung-0 hash must
|
|
137
|
+
* be the member's named anchor, and the seeded walk is returned.
|
|
117
138
|
*
|
|
118
139
|
* It lives here rather than in the ceremony because this module is the one
|
|
119
140
|
* base-side holder of the annex attribution helpers (the pinned lint
|
|
@@ -264,6 +285,22 @@ export declare function preflightUnlockCredentialRetirement({ idStore, unlockKey
|
|
|
264
285
|
ladderVmIds: string[];
|
|
265
286
|
document: DIDDoc;
|
|
266
287
|
}>;
|
|
288
|
+
/**
|
|
289
|
+
* The write-side shape of a credential-class `keyAgreement` member, the
|
|
290
|
+
* twin of the read side's `ResolvedKeyAgreementMethod`: a `VerificationMethod`
|
|
291
|
+
* carrying the key verbatim (`publicKeyMultibase`) or its hash commitment
|
|
292
|
+
* (`publicKeyCommitment`), and always the ladder's rung-0 commitment. Every
|
|
293
|
+
* bind site builds one through {@link unlockKeyVerificationMethod}, so the
|
|
294
|
+
* permanent property is typed where it is written rather than cast in.
|
|
295
|
+
*/
|
|
296
|
+
export type CredentialKeyAgreementMethod = VerificationMethod & {
|
|
297
|
+
controller: string;
|
|
298
|
+
ladderCommitment: string;
|
|
299
|
+
} & ({
|
|
300
|
+
publicKeyMultibase: string;
|
|
301
|
+
} | {
|
|
302
|
+
publicKeyCommitment: string;
|
|
303
|
+
});
|
|
267
304
|
/**
|
|
268
305
|
* The credential's `keyAgreement` verification method: an ordinary unmarked
|
|
269
306
|
* entry carrying either the key verbatim (a `Multikey` with
|
|
@@ -275,15 +312,26 @@ export declare function preflightUnlockCredentialRetirement({ idStore, unlockKey
|
|
|
275
312
|
* carry the controller marker a client listing or a revocation removal
|
|
276
313
|
* matches on.
|
|
277
314
|
*
|
|
315
|
+
* Either flavor names its ladder's rung-0 commitment (`ladderCommitment`):
|
|
316
|
+
* `hash(rung 0)` in the multihash form `nextKeyHashes` carries, the same
|
|
317
|
+
* value the bind commits there. It is what a seedless reader anchors the
|
|
318
|
+
* credential's ladder walk on (`credentialLadderAnchor`), so no reader
|
|
319
|
+
* infers the anchor from the shape of the entry that introduced the member.
|
|
320
|
+
* Every bind site builds the member here, so no emitter can omit it; the
|
|
321
|
+
* roster resolver and the client listings ignore it.
|
|
322
|
+
*
|
|
278
323
|
* @param options {object}
|
|
279
324
|
* @param options.did {string} the account's did:webvh
|
|
280
325
|
* @param options.keyAgreement {UnlockKeyAgreementPublication}
|
|
281
|
-
* @
|
|
326
|
+
* @param options.ladderCommitment {string} `hash(rung 0)` of the
|
|
327
|
+
* credential's ladder, as `deriveNextKeyHash` renders it
|
|
328
|
+
* @returns {CredentialKeyAgreementMethod}
|
|
282
329
|
*/
|
|
283
|
-
export declare function unlockKeyVerificationMethod({ did, keyAgreement }: {
|
|
330
|
+
export declare function unlockKeyVerificationMethod({ did, keyAgreement, ladderCommitment }: {
|
|
284
331
|
did: string;
|
|
285
332
|
keyAgreement: UnlockKeyAgreementPublication;
|
|
286
|
-
|
|
333
|
+
ladderCommitment: string;
|
|
334
|
+
}): CredentialKeyAgreementMethod;
|
|
287
335
|
/**
|
|
288
336
|
* BIND (run by an enrolled client, root authority): publishes a standing
|
|
289
337
|
* credential's split configuration into the document -- one entry adding the
|
|
@@ -299,7 +347,17 @@ export declare function unlockKeyVerificationMethod({ did, keyAgreement }: {
|
|
|
299
347
|
* idempotence against the SAME seed, finds the completed stage and publishes
|
|
300
348
|
* nothing -- where a mint-when-absent would publish a second VM that no
|
|
301
349
|
* anchored attribution could later strike. A credential with no ladder at all
|
|
302
|
-
* passes `null` and gets no VM.
|
|
350
|
+
* passes `null` and gets no VM. The same rule is enforced against the
|
|
351
|
+
* document, since a caller can mint a fresh seed for a member that already
|
|
352
|
+
* stands (a torn establishment re-run, a registry entry recording the wrong
|
|
353
|
+
* key): a standing member names its ladder's rung-0 commitment
|
|
354
|
+
* (`ladderCommitment`), and a bind whose rung-0 hash differs from it refuses
|
|
355
|
+
* with {@link LadderAttributionError} and writes nothing. Re-adding the
|
|
356
|
+
* member under the new hash would leave it unclaimable by every seedless
|
|
357
|
+
* reader for the rest of its standing run and the first ladder's VM and
|
|
358
|
+
* commitment as orphans; the re-run that converges holds the seed that bound
|
|
359
|
+
* the member. A standing member naming the same hash is extended as before,
|
|
360
|
+
* which is what a split bind's authority entry does.
|
|
303
361
|
*
|
|
304
362
|
* `part` splits the bind across two entries where a ceremony needs the
|
|
305
363
|
* credential's decryption material to precede its authority: `'key'`
|
|
@@ -370,16 +428,20 @@ export declare function publishUnlockKey(options: {
|
|
|
370
428
|
* too, reading the log's positional rules backwards, so an anchor advanced by
|
|
371
429
|
* a self-enrollment resolves the same inventory a bind-time anchor does
|
|
372
430
|
* wherever each rung's hash was committed by an entry that also revealed the
|
|
373
|
-
* previous rung, or by a handover.
|
|
374
|
-
*
|
|
375
|
-
*
|
|
376
|
-
*
|
|
377
|
-
*
|
|
378
|
-
*
|
|
379
|
-
*
|
|
380
|
-
*
|
|
381
|
-
*
|
|
382
|
-
*
|
|
431
|
+
* previous rung, or by a handover. The credential's own member names a
|
|
432
|
+
* second anchor, its rung-0 commitment, and the removal walks from both and
|
|
433
|
+
* cross-checks them ({@link attributeUnlockLadderInventory}): the
|
|
434
|
+
* member-anchored walk reads the whole history forward and is what the
|
|
435
|
+
* strike acts on, the registry-anchored one must be contained in it, and
|
|
436
|
+
* two anchors resolving to different ladders refuse with
|
|
437
|
+
* {@link LadderAttributionError}. That is what reads the one history the
|
|
438
|
+
* backward walk cannot -- a ladder VM the last-client transition reinstalled,
|
|
439
|
+
* whose acting rung a later self-enrollment then spends, so that the
|
|
440
|
+
* registry anchor advances past a reveal-and-commit entry that authorized no
|
|
441
|
+
* key. A supplied `ladderSeed` is then a shortcut and a cross-check rather
|
|
442
|
+
* than a requirement (every rung known outright, no backward walk). For a
|
|
443
|
+
* single-key credential (a recovery code, a never-self-enrolled bind) the
|
|
444
|
+
* resolution degenerates to exactly the recorded key's hash, as before.
|
|
383
445
|
*
|
|
384
446
|
* The credential's LADDER VM goes in the same entry, so a retired credential
|
|
385
447
|
* no longer signs governed-log appends or account delegations. This is the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standingWebvh.d.ts","sourceRoot":"","sources":["../../src/unlock/standingWebvh.ts"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EACN,kBAAkB,EACnB,MAAM,2BAA2B,CAAA;AASlC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAGhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAMxD,OAAO,
|
|
1
|
+
{"version":3,"file":"standingWebvh.d.ts","sourceRoot":"","sources":["../../src/unlock/standingWebvh.ts"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EACN,kBAAkB,EACnB,MAAM,2BAA2B,CAAA;AASlC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAGhE,OAAO,KAAK,EAAE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