@did-btcr2/method 0.18.1 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.js +4917 -6487
- package/dist/browser.mjs +4917 -6487
- package/dist/cjs/core/beacon/aggregation/cohort/index.js +3 -3
- package/dist/cjs/core/beacon/aggregation/cohort/index.js.map +1 -1
- package/dist/cjs/core/beacon/aggregation/cohort/messages/base.js +1 -9
- package/dist/cjs/core/beacon/aggregation/cohort/messages/base.js.map +1 -1
- package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/cohort-advert.js +2 -1
- package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/cohort-advert.js.map +1 -1
- package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/cohort-ready.js +2 -1
- package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/cohort-ready.js.map +1 -1
- package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/opt-in-accept.js +2 -1
- package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/opt-in-accept.js.map +1 -1
- package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/opt-in.js +2 -1
- package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/opt-in.js.map +1 -1
- package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/subscribe.js +2 -1
- package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/subscribe.js.map +1 -1
- package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/aggregated-nonce.js +2 -1
- package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/aggregated-nonce.js.map +1 -1
- package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/authorization-request.js +2 -1
- package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/authorization-request.js.map +1 -1
- package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/nonce-contribution.js +2 -1
- package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/nonce-contribution.js.map +1 -1
- package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/request-signature.js +2 -1
- package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/request-signature.js.map +1 -1
- package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/signature-authorization.js +2 -1
- package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/signature-authorization.js.map +1 -1
- package/dist/cjs/core/beacon/aggregation/communication/adapter/nostr.js +36 -18
- package/dist/cjs/core/beacon/aggregation/communication/adapter/nostr.js.map +1 -1
- package/dist/cjs/core/beacon/aggregation/coordinator.js +14 -14
- package/dist/cjs/core/beacon/aggregation/coordinator.js.map +1 -1
- package/dist/cjs/core/beacon/aggregation/participant.js +4 -3
- package/dist/cjs/core/beacon/aggregation/participant.js.map +1 -1
- package/dist/cjs/core/beacon/aggregation/session/index.js +1 -1
- package/dist/cjs/core/beacon/aggregation/session/index.js.map +1 -1
- package/dist/cjs/core/beacon/beacon.js +25 -0
- package/dist/cjs/core/beacon/beacon.js.map +1 -0
- package/dist/cjs/core/beacon/cas-beacon.js +39 -0
- package/dist/cjs/core/beacon/cas-beacon.js.map +1 -0
- package/dist/cjs/core/beacon/error.js +4 -4
- package/dist/cjs/core/beacon/error.js.map +1 -1
- package/dist/cjs/core/beacon/factory.js +10 -11
- package/dist/cjs/core/beacon/factory.js.map +1 -1
- package/dist/cjs/core/beacon/interfaces.js +2 -0
- package/dist/cjs/core/beacon/interfaces.js.map +1 -0
- package/dist/cjs/core/beacon/signal-discovery.js +183 -0
- package/dist/cjs/core/beacon/signal-discovery.js.map +1 -0
- package/dist/cjs/core/beacon/singleton.js +75 -178
- package/dist/cjs/core/beacon/singleton.js.map +1 -1
- package/dist/cjs/core/beacon/smt-beacon.js +39 -0
- package/dist/cjs/core/beacon/smt-beacon.js.map +1 -0
- package/dist/cjs/core/beacon/utils.js +71 -114
- package/dist/cjs/core/beacon/utils.js.map +1 -1
- package/dist/cjs/core/identifier.js +18 -21
- package/dist/cjs/core/identifier.js.map +1 -1
- package/dist/cjs/core/interfaces.js +2 -0
- package/dist/cjs/core/interfaces.js.map +1 -0
- package/dist/cjs/core/resolve.js +321 -0
- package/dist/cjs/core/resolve.js.map +1 -0
- package/dist/cjs/{utils → core}/types.js.map +1 -1
- package/dist/cjs/core/update.js +113 -0
- package/dist/cjs/core/update.js.map +1 -0
- package/dist/cjs/did-btcr2.js +168 -129
- package/dist/cjs/did-btcr2.js.map +1 -1
- package/dist/cjs/index.js +17 -16
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/utils/appendix.js +16 -33
- package/dist/cjs/utils/appendix.js.map +1 -1
- package/dist/cjs/utils/did-document-builder.js +5 -0
- package/dist/cjs/utils/did-document-builder.js.map +1 -1
- package/dist/cjs/utils/did-document.js +62 -72
- package/dist/cjs/utils/did-document.js.map +1 -1
- package/dist/cjs/utils/general.js +1 -1
- package/dist/cjs/utils/general.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/cohort/index.js +3 -3
- package/dist/esm/core/beacon/aggregation/cohort/index.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/cohort/messages/base.js +1 -9
- package/dist/esm/core/beacon/aggregation/cohort/messages/base.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/cohort-advert.js +2 -1
- package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/cohort-advert.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/cohort-ready.js +2 -1
- package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/cohort-ready.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/opt-in-accept.js +2 -1
- package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/opt-in-accept.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/opt-in.js +2 -1
- package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/opt-in.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/subscribe.js +2 -1
- package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/subscribe.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/cohort/messages/sign/aggregated-nonce.js +2 -1
- package/dist/esm/core/beacon/aggregation/cohort/messages/sign/aggregated-nonce.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/cohort/messages/sign/authorization-request.js +2 -1
- package/dist/esm/core/beacon/aggregation/cohort/messages/sign/authorization-request.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/cohort/messages/sign/nonce-contribution.js +2 -1
- package/dist/esm/core/beacon/aggregation/cohort/messages/sign/nonce-contribution.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/cohort/messages/sign/request-signature.js +2 -1
- package/dist/esm/core/beacon/aggregation/cohort/messages/sign/request-signature.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/cohort/messages/sign/signature-authorization.js +2 -1
- package/dist/esm/core/beacon/aggregation/cohort/messages/sign/signature-authorization.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/communication/adapter/nostr.js +36 -18
- package/dist/esm/core/beacon/aggregation/communication/adapter/nostr.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/coordinator.js +14 -14
- package/dist/esm/core/beacon/aggregation/coordinator.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/participant.js +4 -3
- package/dist/esm/core/beacon/aggregation/participant.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/session/index.js +1 -1
- package/dist/esm/core/beacon/aggregation/session/index.js.map +1 -1
- package/dist/esm/core/beacon/beacon.js +25 -0
- package/dist/esm/core/beacon/beacon.js.map +1 -0
- package/dist/esm/core/beacon/cas-beacon.js +39 -0
- package/dist/esm/core/beacon/cas-beacon.js.map +1 -0
- package/dist/esm/core/beacon/error.js +4 -4
- package/dist/esm/core/beacon/error.js.map +1 -1
- package/dist/esm/core/beacon/factory.js +10 -11
- package/dist/esm/core/beacon/factory.js.map +1 -1
- package/dist/esm/core/beacon/interfaces.js +2 -0
- package/dist/esm/core/beacon/interfaces.js.map +1 -0
- package/dist/esm/core/beacon/signal-discovery.js +183 -0
- package/dist/esm/core/beacon/signal-discovery.js.map +1 -0
- package/dist/esm/core/beacon/singleton.js +75 -178
- package/dist/esm/core/beacon/singleton.js.map +1 -1
- package/dist/esm/core/beacon/smt-beacon.js +39 -0
- package/dist/esm/core/beacon/smt-beacon.js.map +1 -0
- package/dist/esm/core/beacon/utils.js +71 -114
- package/dist/esm/core/beacon/utils.js.map +1 -1
- package/dist/esm/core/identifier.js +18 -21
- package/dist/esm/core/identifier.js.map +1 -1
- package/dist/esm/core/interfaces.js +2 -0
- package/dist/esm/core/interfaces.js.map +1 -0
- package/dist/esm/core/resolve.js +321 -0
- package/dist/esm/core/resolve.js.map +1 -0
- package/dist/esm/{utils → core}/types.js.map +1 -1
- package/dist/esm/core/update.js +113 -0
- package/dist/esm/core/update.js.map +1 -0
- package/dist/esm/did-btcr2.js +168 -129
- package/dist/esm/did-btcr2.js.map +1 -1
- package/dist/esm/index.js +17 -16
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/utils/appendix.js +16 -33
- package/dist/esm/utils/appendix.js.map +1 -1
- package/dist/esm/utils/did-document-builder.js +5 -0
- package/dist/esm/utils/did-document-builder.js.map +1 -1
- package/dist/esm/utils/did-document.js +62 -72
- package/dist/esm/utils/did-document.js.map +1 -1
- package/dist/esm/utils/general.js +1 -1
- package/dist/esm/utils/general.js.map +1 -1
- package/dist/types/core/beacon/aggregation/cohort/index.d.ts +1 -1
- package/dist/types/core/beacon/aggregation/cohort/messages/base.d.ts +0 -7
- package/dist/types/core/beacon/aggregation/cohort/messages/base.d.ts.map +1 -1
- package/dist/types/core/beacon/aggregation/cohort/messages/keygen/cohort-advert.d.ts.map +1 -1
- package/dist/types/core/beacon/aggregation/cohort/messages/keygen/cohort-ready.d.ts.map +1 -1
- package/dist/types/core/beacon/aggregation/cohort/messages/keygen/opt-in-accept.d.ts.map +1 -1
- package/dist/types/core/beacon/aggregation/cohort/messages/keygen/opt-in.d.ts.map +1 -1
- package/dist/types/core/beacon/aggregation/cohort/messages/keygen/subscribe.d.ts.map +1 -1
- package/dist/types/core/beacon/aggregation/cohort/messages/sign/aggregated-nonce.d.ts.map +1 -1
- package/dist/types/core/beacon/aggregation/cohort/messages/sign/authorization-request.d.ts.map +1 -1
- package/dist/types/core/beacon/aggregation/cohort/messages/sign/nonce-contribution.d.ts.map +1 -1
- package/dist/types/core/beacon/aggregation/cohort/messages/sign/request-signature.d.ts.map +1 -1
- package/dist/types/core/beacon/aggregation/cohort/messages/sign/signature-authorization.d.ts.map +1 -1
- package/dist/types/core/beacon/aggregation/communication/adapter/nostr.d.ts +13 -5
- package/dist/types/core/beacon/aggregation/communication/adapter/nostr.d.ts.map +1 -1
- package/dist/types/core/beacon/aggregation/coordinator.d.ts +17 -29
- package/dist/types/core/beacon/aggregation/coordinator.d.ts.map +1 -1
- package/dist/types/core/beacon/aggregation/participant.d.ts.map +1 -1
- package/dist/types/core/beacon/beacon.d.ts +44 -0
- package/dist/types/core/beacon/beacon.d.ts.map +1 -0
- package/dist/types/core/beacon/cas-beacon.d.ts +36 -0
- package/dist/types/core/beacon/cas-beacon.d.ts.map +1 -0
- package/dist/types/core/beacon/error.d.ts +2 -2
- package/dist/types/core/beacon/error.d.ts.map +1 -1
- package/dist/types/core/beacon/factory.d.ts +4 -5
- package/dist/types/core/beacon/factory.d.ts.map +1 -1
- package/dist/types/core/beacon/interfaces.d.ts +59 -0
- package/dist/types/core/beacon/interfaces.d.ts.map +1 -0
- package/dist/types/core/beacon/signal-discovery.d.ts +25 -0
- package/dist/types/core/beacon/signal-discovery.d.ts.map +1 -0
- package/dist/types/core/beacon/singleton.d.ts +20 -76
- package/dist/types/core/beacon/singleton.d.ts.map +1 -1
- package/dist/types/core/beacon/smt-beacon.d.ts +36 -0
- package/dist/types/core/beacon/smt-beacon.d.ts.map +1 -0
- package/dist/types/core/beacon/utils.d.ts +19 -97
- package/dist/types/core/beacon/utils.d.ts.map +1 -1
- package/dist/types/core/identifier.d.ts.map +1 -1
- package/dist/types/core/interfaces.d.ts +87 -0
- package/dist/types/core/interfaces.d.ts.map +1 -0
- package/dist/types/core/resolve.d.ts +89 -0
- package/dist/types/core/resolve.d.ts.map +1 -0
- package/dist/types/core/types.d.ts +84 -0
- package/dist/types/core/types.d.ts.map +1 -0
- package/dist/types/core/update.d.ts +51 -0
- package/dist/types/core/update.d.ts.map +1 -0
- package/dist/types/did-btcr2.d.ts +70 -89
- package/dist/types/did-btcr2.d.ts.map +1 -1
- package/dist/types/index.d.ts +17 -16
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/utils/appendix.d.ts +5 -10
- package/dist/types/utils/appendix.d.ts.map +1 -1
- package/dist/types/utils/did-document-builder.d.ts +6 -1
- package/dist/types/utils/did-document-builder.d.ts.map +1 -1
- package/dist/types/utils/did-document.d.ts +46 -42
- package/dist/types/utils/did-document.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/core/beacon/aggregation/cohort/index.ts +3 -3
- package/src/core/beacon/aggregation/cohort/messages/base.ts +1 -12
- package/src/core/beacon/aggregation/cohort/messages/keygen/cohort-advert.ts +2 -2
- package/src/core/beacon/aggregation/cohort/messages/keygen/cohort-ready.ts +2 -2
- package/src/core/beacon/aggregation/cohort/messages/keygen/opt-in-accept.ts +2 -2
- package/src/core/beacon/aggregation/cohort/messages/keygen/opt-in.ts +2 -2
- package/src/core/beacon/aggregation/cohort/messages/keygen/subscribe.ts +2 -2
- package/src/core/beacon/aggregation/cohort/messages/sign/aggregated-nonce.ts +2 -2
- package/src/core/beacon/aggregation/cohort/messages/sign/authorization-request.ts +2 -2
- package/src/core/beacon/aggregation/cohort/messages/sign/nonce-contribution.ts +2 -2
- package/src/core/beacon/aggregation/cohort/messages/sign/request-signature.ts +2 -2
- package/src/core/beacon/aggregation/cohort/messages/sign/signature-authorization.ts +2 -2
- package/src/core/beacon/aggregation/communication/adapter/nostr.ts +43 -21
- package/src/core/beacon/aggregation/coordinator.ts +41 -29
- package/src/core/beacon/aggregation/participant.ts +4 -3
- package/src/core/beacon/aggregation/session/index.ts +1 -1
- package/src/core/beacon/beacon.ts +58 -0
- package/src/core/beacon/cas-beacon.ts +53 -0
- package/src/core/beacon/error.ts +5 -6
- package/src/core/beacon/factory.ts +12 -16
- package/src/core/beacon/interfaces.ts +67 -0
- package/src/core/beacon/signal-discovery.ts +237 -0
- package/src/core/beacon/singleton.ts +107 -197
- package/src/core/beacon/smt-beacon.ts +53 -0
- package/src/core/beacon/utils.ts +95 -182
- package/src/core/identifier.ts +21 -24
- package/src/core/interfaces.ts +93 -0
- package/src/core/resolve.ts +463 -0
- package/src/core/types.ts +95 -0
- package/src/core/update.ts +154 -0
- package/src/did-btcr2.ts +255 -159
- package/src/index.ts +19 -22
- package/src/utils/appendix.ts +26 -44
- package/src/utils/did-document-builder.ts +6 -1
- package/src/utils/did-document.ts +105 -113
- package/src/utils/general.ts +1 -1
- package/dist/cjs/core/beacon/cid-aggregate.js +0 -116
- package/dist/cjs/core/beacon/cid-aggregate.js.map +0 -1
- package/dist/cjs/core/beacon/smt-aggregate.js +0 -126
- package/dist/cjs/core/beacon/smt-aggregate.js.map +0 -1
- package/dist/cjs/core/crud/deactivate.js +0 -14
- package/dist/cjs/core/crud/deactivate.js.map +0 -1
- package/dist/cjs/core/crud/read.js +0 -679
- package/dist/cjs/core/crud/read.js.map +0 -1
- package/dist/cjs/core/crud/update.js +0 -194
- package/dist/cjs/core/crud/update.js.map +0 -1
- package/dist/cjs/interfaces/beacon.js +0 -41
- package/dist/cjs/interfaces/beacon.js.map +0 -1
- package/dist/cjs/interfaces/crud.js +0 -2
- package/dist/cjs/interfaces/crud.js.map +0 -1
- package/dist/esm/core/beacon/cid-aggregate.js +0 -116
- package/dist/esm/core/beacon/cid-aggregate.js.map +0 -1
- package/dist/esm/core/beacon/smt-aggregate.js +0 -126
- package/dist/esm/core/beacon/smt-aggregate.js.map +0 -1
- package/dist/esm/core/crud/deactivate.js +0 -14
- package/dist/esm/core/crud/deactivate.js.map +0 -1
- package/dist/esm/core/crud/read.js +0 -679
- package/dist/esm/core/crud/read.js.map +0 -1
- package/dist/esm/core/crud/update.js +0 -194
- package/dist/esm/core/crud/update.js.map +0 -1
- package/dist/esm/interfaces/beacon.js +0 -41
- package/dist/esm/interfaces/beacon.js.map +0 -1
- package/dist/esm/interfaces/crud.js +0 -2
- package/dist/esm/interfaces/crud.js.map +0 -1
- package/dist/types/core/beacon/cid-aggregate.d.ts +0 -102
- package/dist/types/core/beacon/cid-aggregate.d.ts.map +0 -1
- package/dist/types/core/beacon/smt-aggregate.d.ts +0 -111
- package/dist/types/core/beacon/smt-aggregate.d.ts.map +0 -1
- package/dist/types/core/crud/deactivate.d.ts +0 -13
- package/dist/types/core/crud/deactivate.d.ts.map +0 -1
- package/dist/types/core/crud/read.d.ts +0 -334
- package/dist/types/core/crud/read.d.ts.map +0 -1
- package/dist/types/core/crud/update.d.ts +0 -93
- package/dist/types/core/crud/update.d.ts.map +0 -1
- package/dist/types/interfaces/beacon.d.ts +0 -116
- package/dist/types/interfaces/beacon.d.ts.map +0 -1
- package/dist/types/interfaces/crud.d.ts +0 -32
- package/dist/types/interfaces/crud.d.ts.map +0 -1
- package/dist/types/utils/types.d.ts +0 -38
- package/dist/types/utils/types.d.ts.map +0 -1
- package/src/canonicalize.d.ts +0 -6
- package/src/core/beacon/cid-aggregate.ts +0 -153
- package/src/core/beacon/smt-aggregate.ts +0 -135
- package/src/core/crud/deactivate.ts +0 -13
- package/src/core/crud/read.ts +0 -948
- package/src/core/crud/update.ts +0 -292
- package/src/interfaces/beacon.ts +0 -137
- package/src/interfaces/crud.ts +0 -33
- package/src/utils/types.ts +0 -41
- /package/dist/cjs/{utils → core}/types.js +0 -0
- /package/dist/esm/{utils → core}/types.js +0 -0
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { BitcoinNetworkConnection } from '@did-btcr2/bitcoin';
|
|
2
|
+
import { Canonicalization, DocumentBytes, HexString, KeyBytes, PatchOperation } from '@did-btcr2/common';
|
|
3
|
+
import { SignedBTCR2Update } from '@did-btcr2/cryptosuite';
|
|
4
|
+
import { DidMethod, DidResolutionResult } from '@web5/dids';
|
|
5
|
+
import { ResolutionOptions } from './core/interfaces.js';
|
|
6
|
+
import { Btcr2DidDocument, DidVerificationMethod } from './utils/did-document.js';
|
|
7
|
+
export declare const canonicalization: Canonicalization;
|
|
7
8
|
export type Btcr2Identifier = string;
|
|
8
9
|
export interface DidCreateOptions {
|
|
10
|
+
/** Type of identifier to create (key or external) */
|
|
11
|
+
idType: 'KEY' | 'EXTERNAL';
|
|
9
12
|
/** DID BTCR2 Version Number */
|
|
10
13
|
version?: number;
|
|
11
14
|
/** Bitcoin Network */
|
|
@@ -13,116 +16,94 @@ export interface DidCreateOptions {
|
|
|
13
16
|
}
|
|
14
17
|
/**
|
|
15
18
|
* Implements {@link https://dcdpr.github.io/did-btcr2 | did:btcr2 DID Method Specification}.
|
|
16
|
-
* did:btcr2 is a censorship
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
19
|
+
* did:btcr2 is a censorship-resistant Decentralized Identifier (DID) method using
|
|
20
|
+
* the Bitcoin blockchain as a Verifiable Data Registry to announce changes to the
|
|
21
|
+
* DID document. It supports zero-cost off-chain DID creation; aggregated updates
|
|
22
|
+
* for scalable on-chain update costs; long-term identifiers that can support
|
|
23
|
+
* frequent updates; private communication of the DID document; private DID resolution;
|
|
24
|
+
* and non-repudiation.
|
|
20
25
|
*
|
|
21
26
|
* @class DidBtcr2
|
|
22
27
|
* @type {DidBtcr2}
|
|
23
28
|
* @implements {DidMethod}
|
|
24
29
|
*/
|
|
25
30
|
export declare class DidBtcr2 implements DidMethod {
|
|
26
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* Name of the DID method, as defined in the DID BTCR2 specification
|
|
33
|
+
*/
|
|
27
34
|
static methodName: string;
|
|
28
35
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* Bitcoin network to
|
|
36
|
-
* @
|
|
37
|
-
* @
|
|
38
|
-
* @param {KeyBytes} params.pubKeyBytes Public key byte array used to create a btcr2 "key" identifier.
|
|
39
|
-
* @param {IntermediateDocument} params.intermediateDocument DID Document used to create a btcr2 "external" identifier.
|
|
40
|
-
* @param {DidCreateOptions} params.options See {@link DidCreateOptions} for create options.
|
|
41
|
-
* @param {number} params.options.version Version number of the btcr2 method.
|
|
42
|
-
* @param {string} params.options.network Bitcoin network name (mainnet, testnet, signet, regtest).
|
|
43
|
-
* @returns {Promise<CreateResponse>} Promise resolving to a CreateResponse object.
|
|
44
|
-
* @throws {DidBtcr2Error} if any of the checks fail
|
|
36
|
+
* Implements section {@link https://dcdpr.github.io/did-btcr2/operations/create.html | 7.1 Create}.
|
|
37
|
+
* @param {KeyBytes | DocumentBytes} genesisBytes The bytes used to create the genesis document for a did:btcr2 identifier.
|
|
38
|
+
* This can be either the bytes of the genesis document itself or the bytes of a key that will be used to create the genesis document.
|
|
39
|
+
* @param {DidCreateOptions} options Options for creating the identifier, including the idType (key or external), version, and network.
|
|
40
|
+
* @param {string} options.idType The type of identifier to create, either 'KEY' or 'EXTERNAL'. Defaults to 'KEY'.
|
|
41
|
+
* @param {number} options.version The version number of the did:btcr2 specification to use for creating the identifier. Defaults to 1.
|
|
42
|
+
* @param {string} options.network The Bitcoin network to use for the identifier, e.g. 'bitcoin', 'testnet', etc. Defaults to 'bitcoin'.
|
|
43
|
+
* @returns {Promise<Btcr2Identifier>} Promise resolving to a Btcr2Identifier string.
|
|
44
|
+
* @throws {MethodError} if any of the checks fail
|
|
45
45
|
*/
|
|
46
|
-
static create(
|
|
47
|
-
idType: 'KEY' | 'EXTERNAL';
|
|
48
|
-
genesisBytes: KeyBytes | DocumentBytes;
|
|
49
|
-
options?: DidCreateOptions;
|
|
50
|
-
}): Promise<Btcr2Identifier>;
|
|
46
|
+
static create(genesisBytes: KeyBytes | DocumentBytes, options?: DidCreateOptions): Promise<Btcr2Identifier>;
|
|
51
47
|
/**
|
|
52
|
-
* Entry point for section {@link https://dcdpr.github.io/did-btcr2
|
|
53
|
-
* See {@link
|
|
48
|
+
* Entry point for section {@link https://dcdpr.github.io/did-btcr2/operations/resolve.html | 7.2 Resolve}.
|
|
49
|
+
* See specification for the {@link https://dcdpr.github.io/did-btcr2/operations/resolve.html#process | Resolve Process}.
|
|
50
|
+
* See {@link Resolve | Resolve (class)} for class implementation.
|
|
54
51
|
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* object. The resolver then attempts to resolve the DID document of the identifier at a specific Target Time. The
|
|
60
|
-
* Target Time is either provided in resolutionOptions or is set to the Resolution Time of the request.
|
|
52
|
+
* Resolving a did:btcr2 identifier iteratively builds a DID document by applying
|
|
53
|
+
* BTCR2 Updates to an Initial DID Document that have been committed to the Bitcoin
|
|
54
|
+
* blockchain by Authorized Beacon Signals. The Initial DID Document is either
|
|
55
|
+
* deterministically created from the DID or provided by Sidecar Data.
|
|
61
56
|
*
|
|
62
|
-
* @param {string}
|
|
63
|
-
* @param {
|
|
64
|
-
* @
|
|
65
|
-
* @
|
|
66
|
-
* @param {DidDocument} options.sidecarData data necessary for resolving a DID
|
|
67
|
-
* @param {string} options.network Bitcoin network name (mainnet, testnet, signet, regtest).
|
|
68
|
-
* @returns {DidResolutionResult} Promise resolving to a DID Resolution Result containing the `targetDocument`
|
|
69
|
-
* @throws {Error} if the resolution fails for any reason
|
|
70
|
-
* @throws {DidError} InvalidDid if the identifier is invalid
|
|
57
|
+
* @param {string} did The did:btcr2 identifier to be resolved.
|
|
58
|
+
* @param {ResolutionOptions} resolutionOptions Options used during the resolution process.
|
|
59
|
+
* @returns {Promise<DidResolutionResult>} Promise resolving to a DID Resolution Result containing the `targetDocument`
|
|
60
|
+
* @throws {ResolveError} If the resolution process fails at any step.
|
|
71
61
|
* @example
|
|
72
62
|
* ```ts
|
|
73
|
-
* const resolution = await DidBtcr2.resolve(
|
|
63
|
+
* const resolution = await DidBtcr2.resolve(
|
|
64
|
+
* 'did:btcr2:k1q0dygyp3gz969tp46dychzy4q78c2k3js68kvyr0shanzg67jnuez2cfplh'
|
|
65
|
+
* )
|
|
74
66
|
* ```
|
|
75
67
|
*/
|
|
76
|
-
static resolve(
|
|
68
|
+
static resolve(did: string, resolutionOptions?: ResolutionOptions): Promise<DidResolutionResult>;
|
|
77
69
|
/**
|
|
78
|
-
* Entry point for section {@link https://dcdpr.github.io/did-btcr2/#
|
|
79
|
-
* See {@link
|
|
70
|
+
* Entry point for section {@link https://dcdpr.github.io/did-btcr2/#read | 7.3 Update}.
|
|
71
|
+
* See specification for the {@link https://dcdpr.github.io/did-btcr2/operations/resolve.html#process | Resolve Process}.
|
|
72
|
+
* See {@link Update | Update (class)} for class implementation.
|
|
80
73
|
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
* The
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
* @param {string} params.identifier The btcr2 identifier to be updated.
|
|
96
|
-
* @param {DidDocument} params.sourceDocument The DID document being updated.
|
|
97
|
-
* @param {string} params.sourceVersionId The versionId of the source document.
|
|
98
|
-
* @param {PatchOperation} params.documentPatch The JSON patch to be applied to the source document.
|
|
99
|
-
* @param {string} params.verificationMethodId The verificationMethod ID to sign the update
|
|
100
|
-
* @param {string[]} params.beaconIds The beacon IDs to announce the update
|
|
101
|
-
* @returns {Promise<void>} Promise resolving to void
|
|
102
|
-
* @throws {MethodError} if the verificationMethod type is not `Multikey` or the publicKeyMultibase header is not `zQ3s`
|
|
74
|
+
* BTCR2 DID documents can be updated by anchoring BTCR2 Updates to Bitcoin transactions. These transactions MAY be
|
|
75
|
+
* published to the Bitcoin network. Any property in the DID document may be updated except the id. Doing so would
|
|
76
|
+
* invalidate the DID document.
|
|
77
|
+
* @param params An object containing the parameters for the update operation.
|
|
78
|
+
* @param {Btcr2DidDocument} params.sourceDocument The DID document being updated.
|
|
79
|
+
* @param {PatchOperation[]} params.patches The array of JSON Patch operations to apply to the sourceDocument.
|
|
80
|
+
* @param {string} params.sourceVersionId The version ID before applying the update.
|
|
81
|
+
* @param {string} params.verificationMethodId The verificationMethod ID to sign the update with.
|
|
82
|
+
* @param {string} params.beaconId The beacon ID associated with the update.
|
|
83
|
+
* @param {KeyBytes | HexString} [params.signingMaterial] Optional signing material (key bytes or hex string).
|
|
84
|
+
* @param {BitcoinNetworkConnection} [params.bitcoin] Optional Bitcoin network connection for announcing the update. If not provided, a default connection will be initialized.
|
|
85
|
+
* @return {Promise<SignedBTCR2Update>} Promise resolving to the signed BTCR2 update.
|
|
86
|
+
* @throws {UpdateError} if no verificationMethod, verificationMethod type is not `Multikey` or the publicKeyMultibase
|
|
87
|
+
* header is not `zQ3s`
|
|
103
88
|
*/
|
|
104
|
-
static update(
|
|
105
|
-
|
|
106
|
-
|
|
89
|
+
static update({ sourceDocument, patches, sourceVersionId, verificationMethodId, beaconId, signingMaterial, bitcoin, }: {
|
|
90
|
+
sourceDocument: Btcr2DidDocument;
|
|
91
|
+
patches: PatchOperation[];
|
|
107
92
|
sourceVersionId: number;
|
|
108
|
-
patch: PatchOperation[];
|
|
109
93
|
verificationMethodId: string;
|
|
110
|
-
|
|
111
|
-
|
|
94
|
+
beaconId: string;
|
|
95
|
+
signingMaterial?: KeyBytes | HexString;
|
|
96
|
+
bitcoin?: BitcoinNetworkConnection;
|
|
97
|
+
}): Promise<SignedBTCR2Update>;
|
|
112
98
|
/**
|
|
113
99
|
* Given the W3C DID Document of a `did:btcr2` identifier, return the signing verification method that will be used
|
|
114
100
|
* for signing messages and credentials. If given, the `methodId` parameter is used to select the
|
|
115
101
|
* verification method. If not given, the Identity Key's verification method with an ID fragment
|
|
116
102
|
* of '#initialKey' is used.
|
|
117
|
-
*
|
|
118
|
-
* @param {
|
|
119
|
-
* @param {DidDocument} params.didDocument DID Document to get the verification method from.
|
|
120
|
-
* @param {string} params.methodId Optional ID of the verification method to use for signing.
|
|
103
|
+
* @param {Btcr2DidDocument} didDocument The DID Document of the `did:btcr2` identifier.
|
|
104
|
+
* @param {string} [methodId] Optional verification method ID to be used for signing.
|
|
121
105
|
* @returns {DidVerificationMethod} Promise resolving to the {@link DidVerificationMethod} object used for signing.
|
|
122
106
|
* @throws {DidError} if the parsed did method does not match `btcr2` or signing method could not be determined.
|
|
123
107
|
*/
|
|
124
|
-
static getSigningMethod(
|
|
125
|
-
didDocument: DidDocument;
|
|
126
|
-
methodId?: string;
|
|
127
|
-
}): DidVerificationMethod;
|
|
108
|
+
static getSigningMethod(didDocument: Btcr2DidDocument, methodId?: string): DidVerificationMethod;
|
|
128
109
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"did-btcr2.d.ts","sourceRoot":"","sources":["../../src/did-btcr2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,
|
|
1
|
+
{"version":3,"file":"did-btcr2.d.ts","sourceRoot":"","sources":["../../src/did-btcr2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,SAAS,EAIT,QAAQ,EAIR,cAAc,EAGf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAIL,SAAS,EACT,mBAAmB,EAEpB,MAAM,YAAY,CAAC;AAMpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAIzD,OAAO,EAAE,gBAAgB,EAAE,qBA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AG,qBAAqB;CA0BlG"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,42 +1,43 @@
|
|
|
1
|
+
export * from './core/beacon/aggregation/cohort/index.js';
|
|
2
|
+
export * from './core/beacon/aggregation/cohort/status.js';
|
|
3
|
+
export * from './core/beacon/aggregation/cohort/messages/base.js';
|
|
4
|
+
export * from './core/beacon/aggregation/cohort/messages/constants.js';
|
|
5
|
+
export * from './core/beacon/aggregation/cohort/messages/index.js';
|
|
6
|
+
export * from './core/beacon/aggregation/cohort/messages/keygen//subscribe.js';
|
|
1
7
|
export * from './core/beacon/aggregation/cohort/messages/keygen/cohort-advert.js';
|
|
2
8
|
export * from './core/beacon/aggregation/cohort/messages/keygen/cohort-ready.js';
|
|
3
9
|
export * from './core/beacon/aggregation/cohort/messages/keygen/opt-in-accept.js';
|
|
4
10
|
export * from './core/beacon/aggregation/cohort/messages/keygen/opt-in.js';
|
|
5
|
-
export * from './core/beacon/aggregation/cohort/messages/keygen//subscribe.js';
|
|
6
11
|
export * from './core/beacon/aggregation/cohort/messages/sign/aggregated-nonce.js';
|
|
7
12
|
export * from './core/beacon/aggregation/cohort/messages/sign/authorization-request.js';
|
|
8
13
|
export * from './core/beacon/aggregation/cohort/messages/sign/nonce-contribution.js';
|
|
9
14
|
export * from './core/beacon/aggregation/cohort/messages/sign/request-signature.js';
|
|
10
15
|
export * from './core/beacon/aggregation/cohort/messages/sign/signature-authorization.js';
|
|
11
|
-
export * from './core/beacon/aggregation/cohort/messages/base.js';
|
|
12
|
-
export * from './core/beacon/aggregation/cohort/messages/constants.js';
|
|
13
|
-
export * from './core/beacon/aggregation/cohort/messages/index.js';
|
|
14
|
-
export * from './core/beacon/aggregation/cohort/index.js';
|
|
15
|
-
export * from './core/beacon/aggregation/cohort/status.js';
|
|
16
16
|
export * from './core/beacon/aggregation/communication/adapter/did-comm.js';
|
|
17
17
|
export * from './core/beacon/aggregation/communication/adapter/nostr.js';
|
|
18
18
|
export * from './core/beacon/aggregation/communication/error.js';
|
|
19
19
|
export * from './core/beacon/aggregation/communication/factory.js';
|
|
20
20
|
export * from './core/beacon/aggregation/communication/service.js';
|
|
21
|
-
export * from './core/beacon/aggregation/session/index.js';
|
|
22
|
-
export * from './core/beacon/aggregation/session/status.js';
|
|
23
21
|
export * from './core/beacon/aggregation/coordinator.js';
|
|
24
22
|
export * from './core/beacon/aggregation/participant.js';
|
|
25
|
-
export * from './core/beacon/
|
|
23
|
+
export * from './core/beacon/aggregation/session/index.js';
|
|
24
|
+
export * from './core/beacon/aggregation/session/status.js';
|
|
25
|
+
export * from './core/beacon/beacon.js';
|
|
26
|
+
export * from './core/beacon/cas-beacon.js';
|
|
26
27
|
export * from './core/beacon/error.js';
|
|
27
28
|
export * from './core/beacon/factory.js';
|
|
29
|
+
export * from './core/beacon/interfaces.js';
|
|
30
|
+
export * from './core/beacon/signal-discovery.js';
|
|
28
31
|
export * from './core/beacon/singleton.js';
|
|
29
|
-
export * from './core/beacon/smt-
|
|
32
|
+
export * from './core/beacon/smt-beacon.js';
|
|
30
33
|
export * from './core/beacon/utils.js';
|
|
31
|
-
export * from './core/crud/deactivate.js';
|
|
32
|
-
export * from './core/crud/read.js';
|
|
33
|
-
export * from './core/crud/update.js';
|
|
34
34
|
export * from './core/identifier.js';
|
|
35
|
-
export * from './interfaces
|
|
36
|
-
export * from './
|
|
35
|
+
export * from './core/interfaces.js';
|
|
36
|
+
export * from './core/resolve.js';
|
|
37
|
+
export * from './core/types.js';
|
|
38
|
+
export * from './core/update.js';
|
|
37
39
|
export * from './utils/appendix.js';
|
|
38
40
|
export * from './utils/did-document-builder.js';
|
|
39
41
|
export * from './utils/did-document.js';
|
|
40
42
|
export * from './utils/general.js';
|
|
41
|
-
export * from './utils/types.js';
|
|
42
43
|
export * from './did-btcr2.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"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6 +1,6 @@
|
|
|
1
1
|
import { HashBytes } from '@did-btcr2/common';
|
|
2
2
|
import { DidDocument, DidService, DidVerificationMethod } from '@web5/dids';
|
|
3
|
-
import { RootCapability } from '../interfaces
|
|
3
|
+
import { RootCapability } from '../core/interfaces.js';
|
|
4
4
|
/**
|
|
5
5
|
* Implements {@link https://dcdpr.github.io/did-btcr2/#appendix | 9. Appendix} methods.
|
|
6
6
|
*
|
|
@@ -95,16 +95,11 @@ export declare class Appendix {
|
|
|
95
95
|
* }
|
|
96
96
|
* }
|
|
97
97
|
*/
|
|
98
|
-
static
|
|
98
|
+
static dereferenceZcapId(capabilityId: string): RootCapability;
|
|
99
99
|
/**
|
|
100
|
-
* Implements {@link https://dcdpr.github.io/did-btcr2
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
* bytes to a IPFS v1 Content Identifier and attempts to retrieve the identified content from Content Addressable
|
|
104
|
-
* Storage (CAS). It returns the retrieved content or null.
|
|
105
|
-
*
|
|
106
|
-
* @param {HashBytes} hashBytes The SHA256 hash of the content to be fetched.
|
|
107
|
-
* @returns {string} The fetched content or null if not found.
|
|
100
|
+
* Implements CAS Lookup Step from {@link https://dcdpr.github.io/did-btcr2/operations/resolve.html#process-beacon-signals | 7.2.e Process Beacon Signals }.
|
|
101
|
+
* @param {HashBytes} hashBytes The hash bytes to look up in the CAS system.
|
|
102
|
+
* @returns {Promise<string | undefined>} The content fetched from the CAS system, or undefined if not found.
|
|
108
103
|
*/
|
|
109
104
|
static fetchFromCas(hashBytes: HashBytes): Promise<string | undefined>;
|
|
110
105
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appendix.d.ts","sourceRoot":"","sources":["../../../src/utils/appendix.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"appendix.d.ts","sourceRoot":"","sources":["../../../src/utils/appendix.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EACL,WAAW,EAGX,UAAU,EACV,qBAAqB,EAEtB,MAAM,YAAY,CAAC;AAIpB,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;;GAKG;AACH,qBAAa,QAAQ;IACnB;;;;OAIG;WACW,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS;IAMpE;;;;OAIG;WACW,uBAAuB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,qBAAqB;IAcjF;;;;OAIG;WACW,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,UAAU;IAW3D;;;;;OAKG;WACW,sBAAsB,CAAC,WAAW,EAAE,WAAW,GAAG,qBAAqB,EAAE;IAgBvF;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CAAC,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,cAAc;IAU/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;WACW,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,cAAc;IA+CrE;;;;OAIG;WACU,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CAW7E"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import { BeaconService } from '../
|
|
1
|
+
import { BeaconService } from '../core/beacon/interfaces.js';
|
|
2
2
|
import { DidDocument, DidVerificationMethod } from './did-document.js';
|
|
3
|
+
/**
|
|
4
|
+
* A builder class for constructing DID Documents.
|
|
5
|
+
* @type {DidDocumentBuilder}
|
|
6
|
+
* @class DidDocumentBuilder
|
|
7
|
+
*/
|
|
3
8
|
export declare class DidDocumentBuilder {
|
|
4
9
|
private document;
|
|
5
10
|
constructor(initialDocument: Partial<DidDocument>);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"did-document-builder.d.ts","sourceRoot":"","sources":["../../../src/utils/did-document-builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"did-document-builder.d.ts","sourceRoot":"","sources":["../../../src/utils/did-document-builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAEvE;;;;GAIG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,QAAQ,CAA4B;gBAEhC,eAAe,EAAE,OAAO,CAAC,WAAW,CAAC;IAYjD,cAAc,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI;IAOhD,kBAAkB,CAAC,cAAc,EAAE,KAAK,CAAC,MAAM,GAAG,qBAAqB,CAAC,GAAG,IAAI;IAO/E,mBAAmB,CAAC,eAAe,EAAE,KAAK,CAAC,MAAM,GAAG,qBAAqB,CAAC,GAAG,IAAI;IAOjF,wBAAwB,CAAC,oBAAoB,EAAE,KAAK,CAAC,MAAM,GAAG,qBAAqB,CAAC,GAAG,IAAI;IAO3F,wBAAwB,CAAC,oBAAoB,EAAE,KAAK,CAAC,MAAM,GAAG,qBAAqB,CAAC,GAAG,IAAI;IAO3F,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,IAAI;IAOhD,KAAK,IAAI,WAAW;CAWrB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { JSONObject, KeyBytes } from '@did-btcr2/common';
|
|
2
|
-
import { DidDocument as
|
|
3
|
-
import { BeaconService } from '../
|
|
2
|
+
import { DidDocument as W3CDidDocument, DidVerificationMethod as W3CDidVerificationMethod } from '@web5/dids';
|
|
3
|
+
import { BeaconService } from '../core/beacon/interfaces.js';
|
|
4
|
+
export declare const ID_PLACEHOLDER_VALUE = "did:btcr2:_";
|
|
4
5
|
export declare const BECH32M_CHARS = "";
|
|
5
6
|
export declare const DID_REGEX: RegExp;
|
|
6
7
|
export type ExternalData = {
|
|
@@ -18,7 +19,9 @@ export type VerificationRelationships = {
|
|
|
18
19
|
capabilityInvocation?: Array<string | DidVerificationMethod>;
|
|
19
20
|
capabilityDelegation?: Array<string | DidVerificationMethod>;
|
|
20
21
|
};
|
|
21
|
-
|
|
22
|
+
/** Loose type for unvalidated DID document-like input objects. */
|
|
23
|
+
export type DidDocumentLike = Partial<Btcr2DidDocument>;
|
|
24
|
+
export interface Btcr2VerificationMethod extends W3CDidVerificationMethod {
|
|
22
25
|
id: string;
|
|
23
26
|
type: string;
|
|
24
27
|
controller: string;
|
|
@@ -31,19 +34,19 @@ export interface IDidVerificationMethod extends IIDidVerificationMethod {
|
|
|
31
34
|
* @type {DidVerificationMethod}
|
|
32
35
|
*
|
|
33
36
|
*/
|
|
34
|
-
export declare class DidVerificationMethod implements
|
|
37
|
+
export declare class DidVerificationMethod implements Btcr2VerificationMethod {
|
|
35
38
|
id: string;
|
|
36
39
|
type: string;
|
|
37
40
|
controller: string;
|
|
38
41
|
publicKeyMultibase: string;
|
|
39
42
|
secretKeyMultibase?: string | undefined;
|
|
40
|
-
constructor({ id, type, controller, publicKeyMultibase, secretKeyMultibase }:
|
|
43
|
+
constructor({ id, type, controller, publicKeyMultibase, secretKeyMultibase }: Btcr2VerificationMethod);
|
|
41
44
|
}
|
|
42
45
|
/**
|
|
43
46
|
* BTCR2 DID Document Interface
|
|
44
|
-
* @interface
|
|
45
|
-
* @type {
|
|
46
|
-
* @extends {
|
|
47
|
+
* @interface Btcr2DidDocument
|
|
48
|
+
* @type {Btcr2DidDocument}
|
|
49
|
+
* @extends {W3CDidDocument}
|
|
47
50
|
* @property {string} id - The identifier of the DID Document.
|
|
48
51
|
* @property {Array<string>} [controller] - The controller of the DID Document.
|
|
49
52
|
* @property {Array<string | JSONObject>} ['@context'] - The context of the DID Document.
|
|
@@ -54,7 +57,7 @@ export declare class DidVerificationMethod implements IDidVerificationMethod {
|
|
|
54
57
|
* @property {Array<string | DidVerificationMethod>} [capabilityDelegation] - The capability delegation methods of the DID Document.
|
|
55
58
|
* @property {Array<BeaconService>} service - The services of the DID Document.
|
|
56
59
|
*/
|
|
57
|
-
export interface
|
|
60
|
+
export interface Btcr2DidDocument extends W3CDidDocument {
|
|
58
61
|
id: string;
|
|
59
62
|
controller?: Array<string>;
|
|
60
63
|
'@context'?: Array<string | JSONObject>;
|
|
@@ -69,7 +72,7 @@ export interface IDidDocument extends IIDidDocument {
|
|
|
69
72
|
* BTCR2 DID Document extends the DidDocument class adding helper methods and properties
|
|
70
73
|
* @class DidDocument
|
|
71
74
|
* @type {DidDocument}
|
|
72
|
-
* @implements {
|
|
75
|
+
* @implements {Btcr2DidDocument}
|
|
73
76
|
* @property {string} id - The identifier of the DID Document.
|
|
74
77
|
* @property {Array<string>} [controller] - The controller of the DID Document.
|
|
75
78
|
* @property {Array<string | JSONObject>} ['@context'] - The context of the DID Document.
|
|
@@ -80,7 +83,7 @@ export interface IDidDocument extends IIDidDocument {
|
|
|
80
83
|
* @property {Array<string | DidVerificationMethod>} [capabilityDelegation] - The capability delegation methods of the DID Document.
|
|
81
84
|
* @property {Array<BeaconService>} service - The services of the DID Document.
|
|
82
85
|
*/
|
|
83
|
-
export declare class DidDocument implements
|
|
86
|
+
export declare class DidDocument implements Btcr2DidDocument {
|
|
84
87
|
id: string;
|
|
85
88
|
controller?: Array<string>;
|
|
86
89
|
'@context'?: Array<string | JSONObject>;
|
|
@@ -90,12 +93,13 @@ export declare class DidDocument implements IDidDocument {
|
|
|
90
93
|
capabilityInvocation?: Array<string | DidVerificationMethod>;
|
|
91
94
|
capabilityDelegation?: Array<string | DidVerificationMethod>;
|
|
92
95
|
service: Array<BeaconService>;
|
|
93
|
-
|
|
96
|
+
deactivated?: boolean;
|
|
97
|
+
constructor(document: Btcr2DidDocument);
|
|
94
98
|
/**
|
|
95
99
|
* Convert the DidDocument to a JSON object.
|
|
96
|
-
* @returns {
|
|
100
|
+
* @returns {DidDocument} The JSON representation of the DidDocument.
|
|
97
101
|
*/
|
|
98
|
-
json():
|
|
102
|
+
json(): DidDocument;
|
|
99
103
|
/**
|
|
100
104
|
* Create a minimal DidDocument from "k1" btcr2 identifier.
|
|
101
105
|
* @param {string} publicKeyMultibase The public key in multibase format.
|
|
@@ -120,7 +124,7 @@ export declare class DidDocument implements IDidDocument {
|
|
|
120
124
|
* @returns {boolean} True if the DID document is valid.
|
|
121
125
|
* @throws {DidDocumentError} If any validation check fails.
|
|
122
126
|
*/
|
|
123
|
-
static isValid(didDocument:
|
|
127
|
+
static isValid(didDocument: DidDocumentLike): boolean;
|
|
124
128
|
/**
|
|
125
129
|
* Validates that "@context" exists and includes correct values.
|
|
126
130
|
* @private
|
|
@@ -161,66 +165,66 @@ export declare class DidDocument implements IDidDocument {
|
|
|
161
165
|
* @param {DidDocument} didDocument The DID Document to validate.
|
|
162
166
|
* @returns {boolean} True if the verification relationships are valid.
|
|
163
167
|
*/
|
|
164
|
-
static isValidVerificationRelationships(didDocument:
|
|
168
|
+
static isValidVerificationRelationships(didDocument: DidDocumentLike): boolean;
|
|
165
169
|
/**
|
|
166
170
|
* Validate the DID Document
|
|
167
171
|
* @returns {DidDocument} Validated DID Document.
|
|
168
172
|
* @throws {DidDocumentError} If the DID Document is invalid.
|
|
169
173
|
*/
|
|
170
|
-
static validate(didDocument:
|
|
174
|
+
static validate(didDocument: any): DidDocument;
|
|
171
175
|
/**
|
|
172
|
-
* Validate the
|
|
173
|
-
* @returns {boolean} True if the
|
|
176
|
+
* Validate the GenesisDocument.
|
|
177
|
+
* @returns {boolean} True if the GenesisDocument is valid.
|
|
174
178
|
*/
|
|
175
|
-
|
|
179
|
+
validateGenesis(): boolean;
|
|
176
180
|
/**
|
|
177
|
-
* Convert the DidDocument to an
|
|
178
|
-
* @returns {
|
|
181
|
+
* Convert the DidDocument to an GenesisDocument.
|
|
182
|
+
* @returns {GenesisDocument} The GenesisDocument representation of the DidDocument.
|
|
179
183
|
*/
|
|
180
|
-
toIntermediate():
|
|
184
|
+
toIntermediate(): GenesisDocument;
|
|
185
|
+
}
|
|
186
|
+
export declare class Document {
|
|
187
|
+
static isValid(didDocument: DidDocument | GenesisDocument): boolean;
|
|
181
188
|
}
|
|
182
189
|
/**
|
|
183
|
-
*
|
|
190
|
+
* GenesisDocument extends the DidDocument class for creating and managing intermediate DID documents.
|
|
184
191
|
* This class is used to create a minimal DID document with a placeholder ID.
|
|
185
192
|
* It is used in the process of creating a new DID document.
|
|
186
|
-
* @class
|
|
193
|
+
* @class GenesisDocument
|
|
187
194
|
* @extends {DidDocument}
|
|
188
195
|
*/
|
|
189
|
-
export declare class
|
|
190
|
-
constructor(document:
|
|
196
|
+
export declare class GenesisDocument extends DidDocument {
|
|
197
|
+
constructor(document: object | DidDocument);
|
|
191
198
|
/**
|
|
192
|
-
* Convert the
|
|
199
|
+
* Convert the GenesisDocument to a DidDocument by replacing the placeholder value with the provided DID.
|
|
193
200
|
* @param did The DID to replace the placeholder value in the document.
|
|
194
201
|
* @returns {DidDocument} A new DidDocument with the placeholder value replaced by the provided DID.
|
|
195
202
|
*/
|
|
196
203
|
toDidDocument(did: string): DidDocument;
|
|
197
204
|
/**
|
|
198
|
-
* Create an
|
|
205
|
+
* Create an GenesisDocument from a DidDocument by replacing the DID with a placeholder value.
|
|
199
206
|
* @param {DidDocument} didDocument The DidDocument to convert.
|
|
200
|
-
* @returns {
|
|
207
|
+
* @returns {GenesisDocument} The GenesisDocument representation of the DidDocument.
|
|
201
208
|
*/
|
|
202
|
-
static fromDidDocument(didDocument: DidDocument):
|
|
209
|
+
static fromDidDocument(didDocument: DidDocument): GenesisDocument;
|
|
203
210
|
/**
|
|
204
|
-
* Create a minimal
|
|
211
|
+
* Create a minimal GenesisDocument with a placeholder ID.
|
|
205
212
|
* @param {Array<DidVerificationMethod>} verificationMethod The public key in multibase format.
|
|
206
213
|
* @param {VerificationRelationships} relationships The public key in multibase format.
|
|
207
214
|
* @param {Array<BeaconService>} service The service to be included in the document.
|
|
208
|
-
* @returns {
|
|
215
|
+
* @returns {GenesisDocument} A new GenesisDocument with the placeholder ID.
|
|
209
216
|
*/
|
|
210
|
-
static create(verificationMethod: Array<DidVerificationMethod>, relationships: VerificationRelationships, service: Array<BeaconService>):
|
|
217
|
+
static create(verificationMethod: Array<DidVerificationMethod>, relationships: VerificationRelationships, service: Array<BeaconService>): GenesisDocument;
|
|
211
218
|
/**
|
|
212
|
-
* Create a minimal
|
|
219
|
+
* Create a minimal GenesisDocument from a public key.
|
|
213
220
|
* @param {KeyBytes} publicKey The public key in bytes format.
|
|
214
|
-
* @returns {
|
|
221
|
+
* @returns {GenesisDocument} A new GenesisDocument with the placeholder ID.
|
|
215
222
|
*/
|
|
216
|
-
static fromPublicKey(publicKey: KeyBytes, network: string):
|
|
223
|
+
static fromPublicKey(publicKey: KeyBytes, network: string): GenesisDocument;
|
|
217
224
|
/**
|
|
218
225
|
* Taken an object, convert it to an IntermediateDocuemnt and then to a DidDocument.
|
|
219
|
-
* @param {
|
|
226
|
+
* @param {object | DidDocument} object The JSON object to convert.
|
|
220
227
|
* @returns {DidDocument} The created DidDocument.
|
|
221
228
|
*/
|
|
222
|
-
static fromJSON(object:
|
|
223
|
-
}
|
|
224
|
-
export declare class Document {
|
|
225
|
-
static isValid(didDocument: DidDocument | IntermediateDidDocument): boolean;
|
|
229
|
+
static fromJSON(object: object | DidDocument): GenesisDocument;
|
|
226
230
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"did-document.d.ts","sourceRoot":"","sources":["../../../src/utils/did-document.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"did-document.d.ts","sourceRoot":"","sources":["../../../src/utils/did-document.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,UAAU,EAEV,QAAQ,EACT,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,WAAW,IAAI,cAAc,EAAE,qBAAqB,IAAI,wBAAwB,E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IAAI,eAAe;CAMzC;AAED,qBAAa,QAAQ;WACL,OAAO,CAAC,WAAW,EAAE,WAAW,GAAG,eAAe,GAAG,OAAO;CAG3E;AAGD;;;;;;GAMG;AACH,qBAAa,eAAgB,SAAQ,WAAW;gBAClC,QAAQ,EAAE,MAAM,GAAG,WAAW;IAI1C;;;;OAIG;IACI,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW;IAO9C;;;;OAIG;WACW,eAAe,CAAC,WAAW,EAAE,WAAW,GAAG,eAAe;IAKxE;;;;;;OAMG;WACW,MAAM,CAClB,kBAAkB,EAAE,KAAK,CAAC,qBAAqB,CAAC,EAChD,aAAa,EAAE,yBAAyB,EACxC,OAAO,EAAE,KAAK,CAAC,aAAa,CAAC,GAC5B,eAAe;IAKlB;;;;OAIG;WACW,aAAa,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,eAAe;IA4BlF;;;;OAIG;WACW,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,GAAG,eAAe;CAGtE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@did-btcr2/method",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Javascript/TypeScript reference implementation of did:btcr2 method, a censorship resistant DID Method using the Bitcoin blockchain as a Verifiable Data Registry to announce changes to the DID document. Core package of the did-btcr2-js monorepo.",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
@@ -83,11 +83,11 @@
|
|
|
83
83
|
"multiformats": "^13.3.1",
|
|
84
84
|
"nostr-tools": "^2.15.0",
|
|
85
85
|
"tiny-secp256k1": "^2.2.3",
|
|
86
|
-
"@did-btcr2/
|
|
87
|
-
"@did-btcr2/
|
|
88
|
-
"@did-btcr2/
|
|
89
|
-
"@did-btcr2/
|
|
90
|
-
"@did-btcr2/
|
|
86
|
+
"@did-btcr2/cryptosuite": "5.0.0",
|
|
87
|
+
"@did-btcr2/bitcoin": "0.3.4",
|
|
88
|
+
"@did-btcr2/kms": "0.2.0",
|
|
89
|
+
"@did-btcr2/common": "3.1.0",
|
|
90
|
+
"@did-btcr2/keypair": "0.9.0"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
93
|
"@eslint/js": "^9.22.0",
|