@interop/wallet-core 0.107.0 → 0.108.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 +21 -19
- package/dist/clientAnnex/establish.d.ts +6 -5
- package/dist/clientAnnex/establish.d.ts.map +1 -1
- package/dist/clientAnnex/establish.js +9 -8
- package/dist/clientAnnex/establish.js.map +1 -1
- package/dist/clientAnnex/forget.d.ts +5 -5
- package/dist/clientAnnex/forget.d.ts.map +1 -1
- package/dist/clientAnnex/forget.js +1 -1
- package/dist/clientAnnex/forget.js.map +1 -1
- package/dist/clientAnnex/forgetLast.d.ts +8 -8
- package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
- package/dist/clientAnnex/forgetLast.js +2 -2
- package/dist/clientAnnex/forgetLast.js.map +1 -1
- package/dist/clientAnnex/gc.d.ts.map +1 -1
- package/dist/clientAnnex/gc.js +4 -1
- package/dist/clientAnnex/gc.js.map +1 -1
- package/dist/clientAnnex/grantRevocation.d.ts +11 -7
- package/dist/clientAnnex/grantRevocation.d.ts.map +1 -1
- package/dist/clientAnnex/grantRevocation.js +1 -1
- package/dist/clientAnnex/grantRevocation.js.map +1 -1
- package/dist/clientAnnex/heal.d.ts +16 -14
- package/dist/clientAnnex/heal.d.ts.map +1 -1
- package/dist/clientAnnex/heal.js +9 -9
- package/dist/clientAnnex/heal.js.map +1 -1
- package/dist/clientAnnex/ladderAnchored.d.ts +35 -27
- package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/ladderAnchored.js +26 -37
- package/dist/clientAnnex/ladderAnchored.js.map +1 -1
- package/dist/clientAnnex/log.d.ts +31 -31
- package/dist/clientAnnex/log.d.ts.map +1 -1
- package/dist/clientAnnex/log.js +28 -28
- package/dist/clientAnnex/log.js.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts +4 -3
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.js +1 -1
- package/dist/clientAnnex/selfEnroll.d.ts +3 -3
- package/dist/clientAnnex/selfEnroll.d.ts.map +1 -1
- package/dist/clientAnnex/selfEnroll.js +1 -1
- package/dist/clients/grantState.d.ts +11 -9
- package/dist/clients/grantState.d.ts.map +1 -1
- package/dist/clients/grantState.js +19 -16
- package/dist/clients/grantState.js.map +1 -1
- package/dist/clients/index.d.ts +9 -9
- package/dist/clients/index.js +9 -9
- package/dist/clients/listing.d.ts +12 -14
- package/dist/clients/listing.d.ts.map +1 -1
- package/dist/clients/listing.js +17 -23
- package/dist/clients/listing.js.map +1 -1
- package/dist/clients/revocation.d.ts +2 -2
- package/dist/clients/revocation.d.ts.map +1 -1
- package/dist/clients/revocation.js.map +1 -1
- package/dist/connections/entry.d.ts +100 -9
- package/dist/connections/entry.d.ts.map +1 -1
- package/dist/connections/entry.js +104 -12
- package/dist/connections/entry.js.map +1 -1
- package/dist/connections/grantProof.d.ts +47 -14
- package/dist/connections/grantProof.d.ts.map +1 -1
- package/dist/connections/grantProof.js +88 -57
- package/dist/connections/grantProof.js.map +1 -1
- package/dist/connections/grants.d.ts +13 -1
- package/dist/connections/grants.d.ts.map +1 -1
- package/dist/connections/grants.js +18 -31
- package/dist/connections/grants.js.map +1 -1
- package/dist/connections/index.d.ts +13 -8
- package/dist/connections/index.d.ts.map +1 -1
- package/dist/connections/index.js +10 -6
- package/dist/connections/index.js.map +1 -1
- package/dist/connections/replicas.d.ts +227 -0
- package/dist/connections/replicas.d.ts.map +1 -0
- package/dist/connections/replicas.js +539 -0
- package/dist/connections/replicas.js.map +1 -0
- package/dist/connections/upsert.d.ts +75 -1
- package/dist/connections/upsert.d.ts.map +1 -1
- package/dist/connections/upsert.js +62 -34
- package/dist/connections/upsert.js.map +1 -1
- package/dist/recovery/continuation.d.ts +3 -9
- package/dist/recovery/continuation.d.ts.map +1 -1
- package/dist/recovery/continuation.js +1 -3
- package/dist/recovery/continuation.js.map +1 -1
- package/dist/recovery/index.d.ts +2 -1
- package/dist/recovery/index.d.ts.map +1 -1
- package/dist/recovery/recoveryWebvh.d.ts +21 -15
- package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
- package/dist/recovery/recoveryWebvh.js +12 -7
- package/dist/recovery/recoveryWebvh.js.map +1 -1
- package/dist/testing/accountBuilder.d.ts.map +1 -1
- package/dist/testing/accountBuilder.js +1 -3
- package/dist/testing/accountBuilder.js.map +1 -1
- package/dist/testing/signerFixture.d.ts +3 -3
- package/dist/testing/signerFixture.d.ts.map +1 -1
- package/dist/testing/signerFixture.js +7 -5
- package/dist/testing/signerFixture.js.map +1 -1
- package/dist/unlock/index.d.ts +2 -1
- package/dist/unlock/index.d.ts.map +1 -1
- package/dist/unlock/retire.d.ts +7 -5
- package/dist/unlock/retire.d.ts.map +1 -1
- package/dist/unlock/retire.js +5 -4
- package/dist/unlock/retire.js.map +1 -1
- package/dist/unlock/standingWebvh.d.ts +24 -15
- package/dist/unlock/standingWebvh.d.ts.map +1 -1
- package/dist/unlock/standingWebvh.js +32 -19
- package/dist/unlock/standingWebvh.js.map +1 -1
- package/dist/webvh/accountEntry.d.ts +39 -50
- package/dist/webvh/accountEntry.d.ts.map +1 -1
- package/dist/webvh/accountEntry.js +133 -55
- package/dist/webvh/accountEntry.js.map +1 -1
- package/dist/webvh/delegatedLogStore.d.ts +4 -11
- package/dist/webvh/delegatedLogStore.d.ts.map +1 -1
- package/dist/webvh/delegatedLogStore.js +1 -1
- package/dist/webvh/delegatedLogStore.js.map +1 -1
- package/dist/webvh/didWebProjection.d.ts +30 -49
- package/dist/webvh/didWebProjection.d.ts.map +1 -1
- package/dist/webvh/didWebProjection.js +9 -56
- package/dist/webvh/didWebProjection.js.map +1 -1
- package/dist/webvh/didWebvh.d.ts +13 -8
- package/dist/webvh/didWebvh.d.ts.map +1 -1
- package/dist/webvh/didWebvh.js +11 -7
- package/dist/webvh/didWebvh.js.map +1 -1
- package/dist/webvh/enrollClient.d.ts +5 -3
- package/dist/webvh/enrollClient.d.ts.map +1 -1
- package/dist/webvh/enrollClient.js +12 -10
- package/dist/webvh/enrollClient.js.map +1 -1
- package/dist/webvh/index.d.ts +14 -7
- package/dist/webvh/index.d.ts.map +1 -1
- package/dist/webvh/index.js +12 -5
- package/dist/webvh/index.js.map +1 -1
- package/dist/webvh/listClients.d.ts +124 -15
- package/dist/webvh/listClients.d.ts.map +1 -1
- package/dist/webvh/listClients.js +148 -43
- package/dist/webvh/listClients.js.map +1 -1
- package/dist/webvh/revokeClient.d.ts +10 -4
- package/dist/webvh/revokeClient.d.ts.map +1 -1
- package/dist/webvh/revokeClient.js +22 -22
- package/dist/webvh/revokeClient.js.map +1 -1
- package/dist/webvh/standingZcap.d.ts +4 -1
- package/dist/webvh/standingZcap.d.ts.map +1 -1
- package/dist/webvh/standingZcap.js +13 -14
- package/dist/webvh/standingZcap.js.map +1 -1
- package/package.json +7 -7
package/dist/webvh/index.d.ts
CHANGED
|
@@ -45,10 +45,17 @@
|
|
|
45
45
|
* no-pad, over a key-agreement key's decoded multikey bytes, and the
|
|
46
46
|
* decode-based check that verifies a candidate key against a published
|
|
47
47
|
* commitment.
|
|
48
|
-
* - `
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
48
|
+
* - `delegationSignerKey` / `delegationSignerKeyReader` /
|
|
49
|
+
* `delegationKeyInDocument` -- the one reader of a delegation signer's
|
|
50
|
+
* published key (and its memoized form over one document), and the
|
|
51
|
+
* current-key-set rule for one recorded delegation: does the document
|
|
52
|
+
* still list the key that signed it under `capabilityDelegation` (a key
|
|
53
|
+
* kept under another relation alone does not count, and a missing key id
|
|
54
|
+
* reads as "cannot be checked", so: no). `signerKeyNamed`, `sameSigner`,
|
|
55
|
+
* and `didKeyMultibase` are the attribution-side readings beside it: the
|
|
56
|
+
* key an id names for "who signed this", which a did:key id carries by
|
|
57
|
+
* spec whether or not the document still lists it, and whether two ids
|
|
58
|
+
* name one signer (the same id, or the same named key).
|
|
52
59
|
* - `standingZcapStale` / `recordedZcapStale` -- the composed house staleness
|
|
53
60
|
* rule every re-mint pass and renewal stage asks (expiry, signer death, and
|
|
54
61
|
* the caller's retiring set), over a delegation in hand or over the
|
|
@@ -101,11 +108,11 @@ export type { VerifiedAccountLog } from './verifyLog.js';
|
|
|
101
108
|
export { wasWebvhIdStore, wasWebvhLogStore } from './wasIdStore.js';
|
|
102
109
|
export type { WebvhLogResourceStore } from './wasIdStore.js';
|
|
103
110
|
export { didWebProjectionCurrent, ensureDidWebProjection, putDidWebProjection } from './didWebProjection.js';
|
|
111
|
+
export type { DidWebProjectionStore } from './didWebProjection.js';
|
|
104
112
|
export { delegatedWebvhLogStore } from './delegatedLogStore.js';
|
|
105
|
-
export type { DelegatedWebvhLogStore } from './delegatedLogStore.js';
|
|
106
113
|
export { delegationAtExpiry, delegationExpired, delegationProofKeyId, delegationSignerGone, recordedZcapStale, REVOCATION_CLOCK_SKEW_MS, STANDING_ZCAP_TTL_MS, standingZcapStale, embeddedParentCapability, firstDelegationProof, ZCAP_RENEWAL_WINDOW_MS, zcapExpiring } from './standingZcap.js';
|
|
107
|
-
export { attributeClientUpdateKey, delegationKeyInDocument, documentKeyMultibases, enrolledClientVmIds, isLastEnrolledClient, listEnrolledWebvhClients, markedKeyAgreementMethods, markedKeyAgreementMultibases } from './listClients.js';
|
|
108
|
-
export type { EnrolledWebvhClient, PublishedKeyDocument } from './listClients.js';
|
|
114
|
+
export { attributeClientUpdateKey, delegationKeyInDocument, delegationSignerKey, delegationSignerKeyReader, didKeyMultibase, documentKeyMultibases, sameSigner, signerKeyNamed, enrolledClientVmIds, isLastEnrolledClient, listEnrolledWebvhClients, markedKeyAgreementMethods, markedKeyAgreementMultibases } from './listClients.js';
|
|
115
|
+
export type { EnrolledWebvhClient, DelegationSignerReader, PublishedKeyDocument } from './listClients.js';
|
|
109
116
|
export { mergeVerificationMethods } from './mergeMethods.js';
|
|
110
117
|
export { accountLogDids, walletClientDid } from './documentDids.js';
|
|
111
118
|
export type { RelationMembership } from './mergeMethods.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/webvh/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/webvh/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoGG;AACH,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,EACpB,4BAA4B,EAC5B,oBAAoB,EACpB,0BAA0B,EAC1B,cAAc,EACd,sBAAsB,EACtB,yBAAyB,EACzB,2BAA2B,EAC3B,4BAA4B,EAC5B,yBAAyB,EACzB,oBAAoB,EACpB,UAAU,EACV,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,yBAAyB,EACzB,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,gBAAgB,CAAA;AACvB,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACnE,YAAY,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAC5D,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EACpB,MAAM,uBAAuB,CAAA;AAC9B,YAAY,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,iBA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AAA;AAC3E,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACtE,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC3B,MAAM,kBAAkB,CAAA;AACzB,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,YAAY,EACV,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EAChB,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC1D,YAAY,EACV,qBAAqB,EACrB,eAAe,EACf,aAAa,EACb,cAAc,EACd,wBAAwB,EACxB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,YAAY,EACb,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1D,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACpB,WAAW,EACX,eAAe,EAChB,MAAM,WAAW,CAAA;AAClB,YAAY,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA"}
|
package/dist/webvh/index.js
CHANGED
|
@@ -45,10 +45,17 @@
|
|
|
45
45
|
* no-pad, over a key-agreement key's decoded multikey bytes, and the
|
|
46
46
|
* decode-based check that verifies a candidate key against a published
|
|
47
47
|
* commitment.
|
|
48
|
-
* - `
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
48
|
+
* - `delegationSignerKey` / `delegationSignerKeyReader` /
|
|
49
|
+
* `delegationKeyInDocument` -- the one reader of a delegation signer's
|
|
50
|
+
* published key (and its memoized form over one document), and the
|
|
51
|
+
* current-key-set rule for one recorded delegation: does the document
|
|
52
|
+
* still list the key that signed it under `capabilityDelegation` (a key
|
|
53
|
+
* kept under another relation alone does not count, and a missing key id
|
|
54
|
+
* reads as "cannot be checked", so: no). `signerKeyNamed`, `sameSigner`,
|
|
55
|
+
* and `didKeyMultibase` are the attribution-side readings beside it: the
|
|
56
|
+
* key an id names for "who signed this", which a did:key id carries by
|
|
57
|
+
* spec whether or not the document still lists it, and whether two ids
|
|
58
|
+
* name one signer (the same id, or the same named key).
|
|
52
59
|
* - `standingZcapStale` / `recordedZcapStale` -- the composed house staleness
|
|
53
60
|
* rule every re-mint pass and renewal stage asks (expiry, signer death, and
|
|
54
61
|
* the caller's retiring set), over a delegation in hand or over the
|
|
@@ -101,7 +108,7 @@ export { wasWebvhIdStore, wasWebvhLogStore } from './wasIdStore.js';
|
|
|
101
108
|
export { didWebProjectionCurrent, ensureDidWebProjection, putDidWebProjection } from './didWebProjection.js';
|
|
102
109
|
export { delegatedWebvhLogStore } from './delegatedLogStore.js';
|
|
103
110
|
export { delegationAtExpiry, delegationExpired, delegationProofKeyId, delegationSignerGone, recordedZcapStale, REVOCATION_CLOCK_SKEW_MS, STANDING_ZCAP_TTL_MS, standingZcapStale, embeddedParentCapability, firstDelegationProof, ZCAP_RENEWAL_WINDOW_MS, zcapExpiring } from './standingZcap.js';
|
|
104
|
-
export { attributeClientUpdateKey, delegationKeyInDocument, documentKeyMultibases, enrolledClientVmIds, isLastEnrolledClient, listEnrolledWebvhClients, markedKeyAgreementMethods, markedKeyAgreementMultibases } from './listClients.js';
|
|
111
|
+
export { attributeClientUpdateKey, delegationKeyInDocument, delegationSignerKey, delegationSignerKeyReader, didKeyMultibase, documentKeyMultibases, sameSigner, signerKeyNamed, enrolledClientVmIds, isLastEnrolledClient, listEnrolledWebvhClients, markedKeyAgreementMethods, markedKeyAgreementMultibases } from './listClients.js';
|
|
105
112
|
export { mergeVerificationMethods } from './mergeMethods.js';
|
|
106
113
|
export { accountLogDids, walletClientDid } from './documentDids.js';
|
|
107
114
|
export { credentialKeyAgreementMethods, enrolledClientKeyMultibases, introducedCredentialKeys, ladderVmIds, ladderVmKeyMultibases, relationIds, resolvedKeyAgreementMethods, retiredCredentialKeys } from '../resourceLog/document.js';
|
package/dist/webvh/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/webvh/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/webvh/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoGG;AACH,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,EACpB,4BAA4B,EAC5B,oBAAoB,EACpB,0BAA0B,EAC1B,cAAc,EACd,sBAAsB,EACtB,yBAAyB,EACzB,2BAA2B,EAC3B,4BAA4B,EAC5B,yBAAyB,EACzB,oBAAoB,EACpB,UAAU,EACV,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,yBAAyB,EACzB,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAEnE,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EACpB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,EACtB,YAAY,EACb,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,mBAAmB,EACnB,yBAAyB,EACzB,eAAe,EACf,qBAAqB,EACrB,UAAU,EACV,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,yBAAyB,EACzB,4BAA4B,EAC7B,MAAM,kBAAkB,CAAA;AAMzB,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnE,OAAO,EACL,6BAA6B,EAC7B,2BAA2B,EAC3B,wBAAwB,EACxB,WAAW,EACX,qBAAqB,EACrB,WAAW,EACX,2BAA2B,EAC3B,qBAAqB,EACtB,MAAM,4BAA4B,CAAA;AAKnC,OAAO,EACL,iBAAiB,EACjB,8BAA8B,EAC/B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,EACL,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,YAAY,EACb,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,eAAe,EACf,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACtE,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC3B,MAAM,kBAAkB,CAAA;AAsBzB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAGzC,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACpB,WAAW,EACX,eAAe,EAChB,MAAM,WAAW,CAAA"}
|
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
*
|
|
8
8
|
* The document is the roster, so the listing is a pure read over it, keyed on
|
|
9
9
|
* `capabilityInvocation`: every enrolled client publishes its Ed25519 signing
|
|
10
|
-
* key there
|
|
11
|
-
*
|
|
10
|
+
* key there (each client's `signingKeyMultibase` is the key its member
|
|
11
|
+
* publishes, the same read as `enrolledClientKeyMultibases`), while a
|
|
12
|
+
* recovery code's key appears only under `keyAgreement` (deliberately unmarked) and the KMS-held convenience key only under
|
|
12
13
|
* `authentication` -- so neither can ever surface in the listing,
|
|
13
14
|
* structurally rather than by filtering.
|
|
14
15
|
*
|
|
@@ -45,15 +46,19 @@
|
|
|
45
46
|
* against the account pointer (the wallet's ordinary
|
|
46
47
|
* verify-the-published-log step); this module only enumerates it.
|
|
47
48
|
*
|
|
48
|
-
* Beside the listing lives the current-key-set rule as one
|
|
49
|
-
* `
|
|
50
|
-
* document
|
|
51
|
-
* the whole question -- a delegation proof verifies only against a method
|
|
52
|
-
* document publishes for that purpose now -- so a key surviving under
|
|
53
|
-
* `authentication` or `keyAgreement` alone does not keep a grant chaining.
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
49
|
+
* Beside the listing lives the current-key-set rule as one reader,
|
|
50
|
+
* `delegationSignerKey`: given a recorded delegation's signer id, which key
|
|
51
|
+
* does the document publish for it under `capabilityDelegation`? The relation
|
|
52
|
+
* is the whole question -- a delegation proof verifies only against a method
|
|
53
|
+
* the document publishes for that purpose now -- so a key surviving under
|
|
54
|
+
* `authentication` or `keyAgreement` alone does not keep a grant chaining.
|
|
55
|
+
* The key is the resolved member's `publicKeyMultibase` and the id fragment
|
|
56
|
+
* is an opaque selector (the DID Core reading, the one the library's log
|
|
57
|
+
* verifier applies); only a did:key signer id carries its key in the id,
|
|
58
|
+
* by that method's spec. Every surface that has to decide "does this
|
|
59
|
+
* delegation still chain" reads through it (`delegationKeyInDocument` is
|
|
60
|
+
* the yes/no over it), so no two readers can name different keys over one
|
|
61
|
+
* document.
|
|
57
62
|
*/
|
|
58
63
|
import type { DIDLog } from '@interop/did-method-webvh';
|
|
59
64
|
import type { KeyAgreementDocument } from '../resourceLog/document.js';
|
|
@@ -81,6 +86,7 @@ export interface EnrolledWebvhClient {
|
|
|
81
86
|
* does any narrower document shape a wallet already holds.
|
|
82
87
|
*/
|
|
83
88
|
export interface PublishedKeyDocument {
|
|
89
|
+
id?: string;
|
|
84
90
|
verificationMethod?: Array<{
|
|
85
91
|
id?: string;
|
|
86
92
|
publicKeyMultibase?: string;
|
|
@@ -103,9 +109,110 @@ export interface PublishedKeyDocument {
|
|
|
103
109
|
export declare function documentKeyMultibases({ doc }: {
|
|
104
110
|
doc: PublishedKeyDocument;
|
|
105
111
|
}): Set<string>;
|
|
112
|
+
/**
|
|
113
|
+
* The key a did:key DID URL carries: `did:key:<key>` or `did:key:<key>#<key>`,
|
|
114
|
+
* the forms a client signs under before the account's controller is
|
|
115
|
+
* promoted. By that method's spec the DID itself is the key, so the reading
|
|
116
|
+
* needs no document. A did:key URL whose fragment names another key is
|
|
117
|
+
* malformed and names none, and any other DID names none here.
|
|
118
|
+
*
|
|
119
|
+
* @param id {string} a DID or DID URL
|
|
120
|
+
* @returns {string | undefined} the key multibase
|
|
121
|
+
*/
|
|
122
|
+
export declare function didKeyMultibase(id: string): string | undefined;
|
|
123
|
+
/**
|
|
124
|
+
* A reader of delegation signers over one document:
|
|
125
|
+
* `(signerKeyId) => key`, the published key
|
|
126
|
+
* {@link delegationSignerKey} names for the id. Built once per document by
|
|
127
|
+
* a caller that reads many signers against it (a directory scan, a row of
|
|
128
|
+
* recorded grants), so the relation's key set is computed once and each
|
|
129
|
+
* id's dereference once.
|
|
130
|
+
*/
|
|
131
|
+
export type DelegationSignerReader = (signerKeyId: string) => string | undefined;
|
|
132
|
+
/**
|
|
133
|
+
* Builds the {@link DelegationSignerReader} over a document. The rule is
|
|
134
|
+
* {@link delegationSignerKey}'s; this is the memoized form.
|
|
135
|
+
*
|
|
136
|
+
* @param options {object}
|
|
137
|
+
* @param options.doc {PublishedKeyDocument} a locally verified document
|
|
138
|
+
* @returns {DelegationSignerReader}
|
|
139
|
+
*/
|
|
140
|
+
export declare function delegationSignerKeyReader({ doc }: {
|
|
141
|
+
doc: PublishedKeyDocument;
|
|
142
|
+
}): DelegationSignerReader;
|
|
143
|
+
/**
|
|
144
|
+
* The key the document publishes under `capabilityDelegation` for a
|
|
145
|
+
* delegation's signer id (a proof's `verificationMethod` DID URL), or
|
|
146
|
+
* `undefined` when the id names no listed key: the one reader every
|
|
147
|
+
* delegation-signer check in this library goes through. A URL under the
|
|
148
|
+
* document's DID dereferences to the member it names
|
|
149
|
+
* (`relationMemberNamed`) and takes that member's `publicKeyMultibase`
|
|
150
|
+
* (`memberKeyMultibase`); its fragment is an opaque selector that names no
|
|
151
|
+
* key of its own. The URL is split the way the resource-log verifier splits
|
|
152
|
+
* a proof's method id (`parseVersionedVm`), so a `versionId` DID parameter
|
|
153
|
+
* is dropped and the dereference runs against the current document, which
|
|
154
|
+
* is the current-key-set rule. A did:key URL carries its key in the DID
|
|
155
|
+
* itself, by that method's spec, and names it only while the relation
|
|
156
|
+
* publishes that key. A relative member id resolves against the document's
|
|
157
|
+
* own `id` alone, so a document handed without one lists its absolute
|
|
158
|
+
* members only. Any other DID (a client annex's, say) is one the document
|
|
159
|
+
* does not list, so it names no key here.
|
|
160
|
+
*
|
|
161
|
+
* @param options {object}
|
|
162
|
+
* @param options.doc {PublishedKeyDocument} a locally verified document
|
|
163
|
+
* @param options.signerKeyId {string} the delegation's verification-method
|
|
164
|
+
* id, in either DID form
|
|
165
|
+
* @returns {string | undefined} the published key multibase
|
|
166
|
+
*/
|
|
167
|
+
export declare function delegationSignerKey({ doc, signerKeyId }: {
|
|
168
|
+
doc: PublishedKeyDocument;
|
|
169
|
+
signerKeyId: string;
|
|
170
|
+
}): string | undefined;
|
|
171
|
+
/**
|
|
172
|
+
* The key a signer id names for attribution, as opposed to authorization: a
|
|
173
|
+
* bare multibase is the key itself, a did:key id carries its key by that
|
|
174
|
+
* method's spec whether or not the document still lists it, and an id under
|
|
175
|
+
* the account DID names the key the document publishes for it, through the
|
|
176
|
+
* reader when one is given. An id under the account DID that the document no
|
|
177
|
+
* longer publishes (a key the edit already struck) names no key, and a caller
|
|
178
|
+
* attributing by it falls back to comparing ids verbatim. This is what lets
|
|
179
|
+
* a post-edit sweep still find what a withdrawn key signed.
|
|
180
|
+
*
|
|
181
|
+
* @param options {object}
|
|
182
|
+
* @param options.id {string} a verification-method id in either DID form,
|
|
183
|
+
* or a bare multibase
|
|
184
|
+
* @param [options.signerKey] {DelegationSignerReader} the reader over the
|
|
185
|
+
* verified document, when one is in hand
|
|
186
|
+
* @returns {string | undefined}
|
|
187
|
+
*/
|
|
188
|
+
export declare function signerKeyNamed({ id, signerKey }: {
|
|
189
|
+
id: string;
|
|
190
|
+
signerKey?: DelegationSignerReader;
|
|
191
|
+
}): string | undefined;
|
|
192
|
+
/**
|
|
193
|
+
* Whether two signer ids name one signer for attribution: the same id
|
|
194
|
+
* verbatim, or two ids that each name a key ({@link signerKeyNamed}) and
|
|
195
|
+
* name the same one. The verbatim arm is what keeps a key the document
|
|
196
|
+
* already struck attributable by its exact id, which a torn ceremony's
|
|
197
|
+
* post-edit sweep depends on.
|
|
198
|
+
*
|
|
199
|
+
* @param options {object}
|
|
200
|
+
* @param options.signerId {string} a verification-method id in either DID
|
|
201
|
+
* form, or a bare multibase
|
|
202
|
+
* @param options.otherId {string} the id to compare it with, in the same
|
|
203
|
+
* forms
|
|
204
|
+
* @param [options.signerKey] {DelegationSignerReader} the reader over the
|
|
205
|
+
* verified document, when one is in hand
|
|
206
|
+
* @returns {boolean}
|
|
207
|
+
*/
|
|
208
|
+
export declare function sameSigner({ signerId, otherId, signerKey }: {
|
|
209
|
+
signerId: string;
|
|
210
|
+
otherId: string;
|
|
211
|
+
signerKey?: DelegationSignerReader;
|
|
212
|
+
}): boolean;
|
|
106
213
|
/**
|
|
107
214
|
* The current-key-set rule for a recorded delegation: does the document still
|
|
108
|
-
*
|
|
215
|
+
* publish a key under `capabilityDelegation` for the method that signed it?
|
|
109
216
|
* That relation is the test rather than mere membership in the document,
|
|
110
217
|
* because a delegation proof verifies only against a method published for the
|
|
111
218
|
* delegation purpose as the document resolves NOW. A key kept under
|
|
@@ -114,9 +221,11 @@ export declare function documentKeyMultibases({ doc }: {
|
|
|
114
221
|
* A `false` is exactly "this recorded grant has rotted" -- the signal behind a
|
|
115
222
|
* re-mint or a health nudge.
|
|
116
223
|
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
* controller was promoted names the same key under a different DID)
|
|
224
|
+
* The read is {@link delegationSignerKey}'s, so the did:key and did:webvh
|
|
225
|
+
* forms of one key agree (a delegation signed before the account's
|
|
226
|
+
* controller was promoted names the same key under a different DID), and a
|
|
227
|
+
* member whose id fragment and `publicKeyMultibase` disagree is known by the
|
|
228
|
+
* key it publishes.
|
|
120
229
|
*
|
|
121
230
|
* An ABSENT `delegationKeyId` reports `false`: a record that does not say
|
|
122
231
|
* which key signed it cannot be checked against the document, and the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listClients.d.ts","sourceRoot":"","sources":["../../src/webvh/listClients.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"listClients.d.ts","sourceRoot":"","sources":["../../src/webvh/listClients.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAiBvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAEtE;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,mBAAmB;IAClC,mBAAmB,EAAE,MAAM,CAAA;IAC3B,yBAAyB,EAAE,MAAM,EAAE,CAAA;IACnC,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;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,CAAA;KAAE,CAAA;CAChE,GAAG,MAAM,EAAE,CAEX;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,GAAG,EACH,WAAW,EACZ,EAAE;IACD,GAAG,EAAE;QAAE,oBAAoB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG;YAAE,EAAE,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE,CAAA;IAC/D,WAAW,EAAE,MAAM,CAAA;CACpB,GAAG,OAAO,CAKV;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,GAAG,EACJ,EAAE;IACD,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,mBAAmB,EAAE,CAsCxB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { vmFragmentOf } from '@interop/vh-resource-log';
|
|
1
|
+
import { memberKeyMultibase, parseVersionedVm, relationKeyMultibases, relationMemberNamed, vmFragmentOf } from '@interop/vh-resource-log';
|
|
2
2
|
import { clientKeyAgreementController, effectiveParameters } from './didWebvh.js';
|
|
3
|
-
import { relationIds, resolvedKeyAgreementMethods
|
|
3
|
+
import { enrolledClientKeyMultibases, relationIds, resolvedKeyAgreementMethods } from '../resourceLog/document.js';
|
|
4
4
|
/**
|
|
5
5
|
* The key multibases the document currently publishes: every verification
|
|
6
6
|
* method's `publicKeyMultibase`, plus the fragment of its id (for a did:webvh
|
|
@@ -25,38 +25,138 @@ export function documentKeyMultibases({ doc }) {
|
|
|
25
25
|
return multibases;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
|
-
* The key
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
28
|
+
* The key a did:key DID URL carries: `did:key:<key>` or `did:key:<key>#<key>`,
|
|
29
|
+
* the forms a client signs under before the account's controller is
|
|
30
|
+
* promoted. By that method's spec the DID itself is the key, so the reading
|
|
31
|
+
* needs no document. A did:key URL whose fragment names another key is
|
|
32
|
+
* malformed and names none, and any other DID names none here.
|
|
33
|
+
*
|
|
34
|
+
* @param id {string} a DID or DID URL
|
|
35
|
+
* @returns {string | undefined} the key multibase
|
|
36
|
+
*/
|
|
37
|
+
export function didKeyMultibase(id) {
|
|
38
|
+
const hash = id.indexOf('#');
|
|
39
|
+
const did = hash === -1 ? id : id.slice(0, hash);
|
|
40
|
+
if (!did.startsWith('did:key:')) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
const key = did.slice('did:key:'.length);
|
|
44
|
+
if (key === '' || key.includes('?')) {
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
return hash === -1 || id.slice(hash + 1) === key ? key : undefined;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Builds the {@link DelegationSignerReader} over a document. The rule is
|
|
51
|
+
* {@link delegationSignerKey}'s; this is the memoized form.
|
|
34
52
|
*
|
|
35
53
|
* @param options {object}
|
|
36
54
|
* @param options.doc {PublishedKeyDocument} a locally verified document
|
|
37
|
-
* @returns {
|
|
55
|
+
* @returns {DelegationSignerReader}
|
|
38
56
|
*/
|
|
39
|
-
function
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
57
|
+
export function delegationSignerKeyReader({ doc }) {
|
|
58
|
+
const relation = 'capabilityDelegation';
|
|
59
|
+
let published;
|
|
60
|
+
const resolved = new Map();
|
|
61
|
+
const resolve = (signerKeyId) => {
|
|
62
|
+
const parsed = parseVersionedVm(signerKeyId);
|
|
63
|
+
if (parsed === undefined) {
|
|
64
|
+
return undefined;
|
|
45
65
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
66
|
+
const { did, fragment } = parsed;
|
|
67
|
+
if (did.startsWith('did:key:')) {
|
|
68
|
+
// A did:key signer is read by its method's spec: the DID is the key,
|
|
69
|
+
// named while the relation publishes it.
|
|
70
|
+
const key = didKeyMultibase(signerKeyId);
|
|
71
|
+
published ??= relationKeyMultibases({ doc, relation });
|
|
72
|
+
return key !== undefined && published.has(key) ? key : undefined;
|
|
53
73
|
}
|
|
74
|
+
const member = relationMemberNamed({ doc, relation, did, fragment });
|
|
75
|
+
return member === undefined ? undefined : memberKeyMultibase(member);
|
|
76
|
+
};
|
|
77
|
+
return signerKeyId => {
|
|
78
|
+
if (!resolved.has(signerKeyId)) {
|
|
79
|
+
resolved.set(signerKeyId, resolve(signerKeyId));
|
|
80
|
+
}
|
|
81
|
+
return resolved.get(signerKeyId);
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* The key the document publishes under `capabilityDelegation` for a
|
|
86
|
+
* delegation's signer id (a proof's `verificationMethod` DID URL), or
|
|
87
|
+
* `undefined` when the id names no listed key: the one reader every
|
|
88
|
+
* delegation-signer check in this library goes through. A URL under the
|
|
89
|
+
* document's DID dereferences to the member it names
|
|
90
|
+
* (`relationMemberNamed`) and takes that member's `publicKeyMultibase`
|
|
91
|
+
* (`memberKeyMultibase`); its fragment is an opaque selector that names no
|
|
92
|
+
* key of its own. The URL is split the way the resource-log verifier splits
|
|
93
|
+
* a proof's method id (`parseVersionedVm`), so a `versionId` DID parameter
|
|
94
|
+
* is dropped and the dereference runs against the current document, which
|
|
95
|
+
* is the current-key-set rule. A did:key URL carries its key in the DID
|
|
96
|
+
* itself, by that method's spec, and names it only while the relation
|
|
97
|
+
* publishes that key. A relative member id resolves against the document's
|
|
98
|
+
* own `id` alone, so a document handed without one lists its absolute
|
|
99
|
+
* members only. Any other DID (a client annex's, say) is one the document
|
|
100
|
+
* does not list, so it names no key here.
|
|
101
|
+
*
|
|
102
|
+
* @param options {object}
|
|
103
|
+
* @param options.doc {PublishedKeyDocument} a locally verified document
|
|
104
|
+
* @param options.signerKeyId {string} the delegation's verification-method
|
|
105
|
+
* id, in either DID form
|
|
106
|
+
* @returns {string | undefined} the published key multibase
|
|
107
|
+
*/
|
|
108
|
+
export function delegationSignerKey({ doc, signerKeyId }) {
|
|
109
|
+
return delegationSignerKeyReader({ doc })(signerKeyId);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* The key a signer id names for attribution, as opposed to authorization: a
|
|
113
|
+
* bare multibase is the key itself, a did:key id carries its key by that
|
|
114
|
+
* method's spec whether or not the document still lists it, and an id under
|
|
115
|
+
* the account DID names the key the document publishes for it, through the
|
|
116
|
+
* reader when one is given. An id under the account DID that the document no
|
|
117
|
+
* longer publishes (a key the edit already struck) names no key, and a caller
|
|
118
|
+
* attributing by it falls back to comparing ids verbatim. This is what lets
|
|
119
|
+
* a post-edit sweep still find what a withdrawn key signed.
|
|
120
|
+
*
|
|
121
|
+
* @param options {object}
|
|
122
|
+
* @param options.id {string} a verification-method id in either DID form,
|
|
123
|
+
* or a bare multibase
|
|
124
|
+
* @param [options.signerKey] {DelegationSignerReader} the reader over the
|
|
125
|
+
* verified document, when one is in hand
|
|
126
|
+
* @returns {string | undefined}
|
|
127
|
+
*/
|
|
128
|
+
export function signerKeyNamed({ id, signerKey }) {
|
|
129
|
+
if (!id.startsWith('did:')) {
|
|
130
|
+
return id;
|
|
54
131
|
}
|
|
55
|
-
return
|
|
132
|
+
return didKeyMultibase(id) ?? signerKey?.(id);
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Whether two signer ids name one signer for attribution: the same id
|
|
136
|
+
* verbatim, or two ids that each name a key ({@link signerKeyNamed}) and
|
|
137
|
+
* name the same one. The verbatim arm is what keeps a key the document
|
|
138
|
+
* already struck attributable by its exact id, which a torn ceremony's
|
|
139
|
+
* post-edit sweep depends on.
|
|
140
|
+
*
|
|
141
|
+
* @param options {object}
|
|
142
|
+
* @param options.signerId {string} a verification-method id in either DID
|
|
143
|
+
* form, or a bare multibase
|
|
144
|
+
* @param options.otherId {string} the id to compare it with, in the same
|
|
145
|
+
* forms
|
|
146
|
+
* @param [options.signerKey] {DelegationSignerReader} the reader over the
|
|
147
|
+
* verified document, when one is in hand
|
|
148
|
+
* @returns {boolean}
|
|
149
|
+
*/
|
|
150
|
+
export function sameSigner({ signerId, otherId, signerKey }) {
|
|
151
|
+
if (signerId === otherId) {
|
|
152
|
+
return true;
|
|
153
|
+
}
|
|
154
|
+
const key = signerKeyNamed({ id: signerId, signerKey });
|
|
155
|
+
return key !== undefined && signerKeyNamed({ id: otherId, signerKey }) === key;
|
|
56
156
|
}
|
|
57
157
|
/**
|
|
58
158
|
* The current-key-set rule for a recorded delegation: does the document still
|
|
59
|
-
*
|
|
159
|
+
* publish a key under `capabilityDelegation` for the method that signed it?
|
|
60
160
|
* That relation is the test rather than mere membership in the document,
|
|
61
161
|
* because a delegation proof verifies only against a method published for the
|
|
62
162
|
* delegation purpose as the document resolves NOW. A key kept under
|
|
@@ -65,9 +165,11 @@ function delegationRelationMultibases({ doc }) {
|
|
|
65
165
|
* A `false` is exactly "this recorded grant has rotted" -- the signal behind a
|
|
66
166
|
* re-mint or a health nudge.
|
|
67
167
|
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
* controller was promoted names the same key under a different DID)
|
|
168
|
+
* The read is {@link delegationSignerKey}'s, so the did:key and did:webvh
|
|
169
|
+
* forms of one key agree (a delegation signed before the account's
|
|
170
|
+
* controller was promoted names the same key under a different DID), and a
|
|
171
|
+
* member whose id fragment and `publicKeyMultibase` disagree is known by the
|
|
172
|
+
* key it publishes.
|
|
71
173
|
*
|
|
72
174
|
* An ABSENT `delegationKeyId` reports `false`: a record that does not say
|
|
73
175
|
* which key signed it cannot be checked against the document, and the
|
|
@@ -82,11 +184,8 @@ function delegationRelationMultibases({ doc }) {
|
|
|
82
184
|
* @returns {boolean}
|
|
83
185
|
*/
|
|
84
186
|
export function delegationKeyInDocument({ doc, delegationKeyId }) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
return false;
|
|
88
|
-
}
|
|
89
|
-
return delegationRelationMultibases({ doc }).has(multibase);
|
|
187
|
+
return (delegationKeyId !== undefined &&
|
|
188
|
+
delegationSignerKey({ doc, signerKeyId: delegationKeyId }) !== undefined);
|
|
90
189
|
}
|
|
91
190
|
/**
|
|
92
191
|
* The `keyAgreement` verification methods one client's controller marker
|
|
@@ -274,9 +373,9 @@ function attributeActiveUpdateKeys({ params, addIndexes }) {
|
|
|
274
373
|
/**
|
|
275
374
|
* The index of the entry that published a client's verification methods (its
|
|
276
375
|
* enrollment moment, and the attribution anchor for its update key), or `-1`
|
|
277
|
-
* when the log never published them. Keyed on the signing key's multibase
|
|
278
|
-
*
|
|
279
|
-
*
|
|
376
|
+
* when the log never published them. Keyed on the signing key's multibase as
|
|
377
|
+
* the entry's document publishes it under `capabilityInvocation`
|
|
378
|
+
* (`relationKeyMultibases`, the same read as `enrolledClientKeyMultibases`).
|
|
280
379
|
*
|
|
281
380
|
* @param options {object}
|
|
282
381
|
* @param options.log {DIDLog}
|
|
@@ -284,7 +383,10 @@ function attributeActiveUpdateKeys({ params, addIndexes }) {
|
|
|
284
383
|
* @returns {number}
|
|
285
384
|
*/
|
|
286
385
|
function clientAddIndex({ log, signingKeyMultibase }) {
|
|
287
|
-
return log.findIndex(entry =>
|
|
386
|
+
return log.findIndex(entry => relationKeyMultibases({
|
|
387
|
+
doc: entry.state,
|
|
388
|
+
relation: 'capabilityInvocation'
|
|
389
|
+
}).has(signingKeyMultibase));
|
|
288
390
|
}
|
|
289
391
|
/**
|
|
290
392
|
* One enrolled client's ACTIVE update key as the log states it, keyed on the
|
|
@@ -329,10 +431,11 @@ function clientAddIndexes({ log, signingKeyMultibases }) {
|
|
|
329
431
|
if (addIndexes.size === signingKeyMultibases.size) {
|
|
330
432
|
break;
|
|
331
433
|
}
|
|
332
|
-
for (const
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
434
|
+
for (const signingKeyMultibase of relationKeyMultibases({
|
|
435
|
+
doc: entry.state,
|
|
436
|
+
relation: 'capabilityInvocation'
|
|
437
|
+
})) {
|
|
438
|
+
if (signingKeyMultibases.has(signingKeyMultibase) &&
|
|
336
439
|
!addIndexes.has(signingKeyMultibase)) {
|
|
337
440
|
addIndexes.set(signingKeyMultibase, index);
|
|
338
441
|
}
|
|
@@ -396,9 +499,11 @@ export function listEnrolledWebvhClients({ log }) {
|
|
|
396
499
|
}
|
|
397
500
|
const doc = log[log.length - 1].state;
|
|
398
501
|
const params = effectiveParameters(log);
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
502
|
+
// Each enrolled client's signing key is the key its `capabilityInvocation`
|
|
503
|
+
// member publishes, in document order, deduplicated: the same read as
|
|
504
|
+
// `enrolledClientKeyMultibases`, so the listing and the key census name
|
|
505
|
+
// the same keys. A member publishing no key lists no client.
|
|
506
|
+
const signingKeyMultibases = [...enrolledClientKeyMultibases({ doc })];
|
|
402
507
|
// The entry that published each client's verification methods -- its
|
|
403
508
|
// enrollment moment, and the attribution anchor for its update key.
|
|
404
509
|
const addIndexes = clientAddIndexes({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listClients.js","sourceRoot":"","sources":["../../src/webvh/listClients.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"listClients.js","sourceRoot":"","sources":["../../src/webvh/listClients.ts"],"names":[],"mappings":"AA+DA,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,EACrB,mBAAmB,EACnB,YAAY,EACb,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACL,4BAA4B,EAC5B,mBAAmB,EACpB,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,2BAA2B,EAC3B,WAAW,EACX,2BAA2B,EAC5B,MAAM,4BAA4B,CAAA;AAmCnC;;;;;;;;;GASG;AACH,MAAM,UAAU,qBAAqB,CAAC,EACpC,GAAG,EAGJ;IACC,MAAM,UAAU,GAAG,IAAI,GAAG,EAAU,CAAA;IACpC,KAAK,MAAM,MAAM,IAAI,GAAG,CAAC,kBAAkB,IAAI,E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B,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { DIDDoc, DIDLog, VerificationMethod } from '@interop/did-method-webvh';
|
|
2
2
|
import type { AccountLogSigner } from './accountEntry.js';
|
|
3
|
+
import type { DidWebProjectionStore } from './didWebProjection.js';
|
|
3
4
|
import type { PublishedWebvhLog, WebvhIdStore } from './didWebvh.js';
|
|
4
5
|
/**
|
|
5
6
|
* The public halves of the client being revoked, as the document and log
|
|
@@ -173,9 +174,14 @@ export declare function clientRemovalFields({ published, target, knownLatentHash
|
|
|
173
174
|
* post-removal `did:web` projection is PUT through it immediately BEFORE
|
|
174
175
|
* the removal entry publishes, which is what keeps a ladder-signed removal
|
|
175
176
|
* from leaving `did.json` naming the revoked client. Best-effort: a failed
|
|
176
|
-
* PUT is warned and the removal proceeds.
|
|
177
|
-
* the
|
|
178
|
-
*
|
|
177
|
+
* PUT is warned and the removal proceeds. On the enrolled arm, whose
|
|
178
|
+
* authority survives the entry (a client cannot revoke itself), the
|
|
179
|
+
* projection is PUT AFTER the entry instead, through this store or,
|
|
180
|
+
* omitted, through the client's own controller-invoking `idStore`; there a
|
|
181
|
+
* failed PUT throws and the re-run's idempotent path republishes it. The
|
|
182
|
+
* ladder arm's idempotent path republishes nothing, since the entry an
|
|
183
|
+
* earlier run landed may have ended this store's authority. Omitted on the
|
|
184
|
+
* ladder arm, the next visit's `ensureDidWebProjection` is the mender
|
|
179
185
|
* @param options.revokedClient {RevokedClientKeys} the revoked client's
|
|
180
186
|
* public halves; an `updateKeyMultibase` the log does not authorize (stale,
|
|
181
187
|
* or the client's staged key) is re-derived from the log
|
|
@@ -198,7 +204,7 @@ export declare function clientRemovalFields({ published, target, knownLatentHash
|
|
|
198
204
|
export declare function revokeWebvhClient(options: {
|
|
199
205
|
idStore: WebvhIdStore;
|
|
200
206
|
signer: AccountLogSigner;
|
|
201
|
-
projectionStore?:
|
|
207
|
+
projectionStore?: DidWebProjectionStore;
|
|
202
208
|
revokedClient: RevokedClientKeys;
|
|
203
209
|
knownLatentHashes?: string[];
|
|
204
210
|
expectedDid?: string;
|