@did-btcr2/method 0.16.0 → 0.17.1
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 +182 -202
- package/dist/browser.mjs +182 -202
- package/dist/cjs/core/beacon/aggregation/protocol/nostr.js +1 -1
- package/dist/cjs/core/beacon/aggregation/protocol/nostr.js.map +1 -1
- package/dist/cjs/core/crud/update.js +1 -1
- package/dist/cjs/core/crud/update.js.map +1 -1
- package/dist/cjs/did-btcr2.js +7 -19
- package/dist/cjs/did-btcr2.js.map +1 -1
- package/dist/cjs/index.js +0 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/utils/did-document.js +61 -13
- package/dist/cjs/utils/did-document.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/protocol/nostr.js +1 -1
- package/dist/esm/core/beacon/aggregation/protocol/nostr.js.map +1 -1
- package/dist/esm/core/crud/update.js +1 -1
- package/dist/esm/core/crud/update.js.map +1 -1
- package/dist/esm/did-btcr2.js +7 -19
- package/dist/esm/did-btcr2.js.map +1 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/utils/did-document.js +61 -13
- package/dist/esm/utils/did-document.js.map +1 -1
- package/dist/types/core/crud/update.d.ts +10 -0
- package/dist/types/core/crud/update.d.ts.map +1 -1
- package/dist/types/did-btcr2.d.ts +16 -5
- package/dist/types/did-btcr2.d.ts.map +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/utils/did-document.d.ts +25 -10
- package/dist/types/utils/did-document.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/core/beacon/aggregation/protocol/nostr.ts +1 -1
- package/src/core/crud/update.ts +13 -1
- package/src/did-btcr2.ts +25 -25
- package/src/index.ts +0 -1
- package/src/utils/did-document.ts +72 -16
- package/dist/cjs/core/crud/create.js +0 -102
- package/dist/cjs/core/crud/create.js.map +0 -1
- package/dist/esm/core/crud/create.js +0 -102
- package/dist/esm/core/crud/create.js.map +0 -1
- package/dist/types/core/crud/create.d.ts +0 -92
- package/dist/types/core/crud/create.d.ts.map +0 -1
- package/src/core/crud/create.ts +0 -160
package/dist/browser.mjs
CHANGED
|
@@ -45001,11 +45001,11 @@ var require_Reflect = __commonJS({
|
|
|
45001
45001
|
};
|
|
45002
45002
|
metadataRegistry.registerProvider(provider);
|
|
45003
45003
|
return provider;
|
|
45004
|
-
function GetOrCreateMetadataMap(O, P3,
|
|
45004
|
+
function GetOrCreateMetadataMap(O, P3, Create) {
|
|
45005
45005
|
var targetMetadata = metadata2.get(O);
|
|
45006
45006
|
var createdTargetMetadata = false;
|
|
45007
45007
|
if (IsUndefined(targetMetadata)) {
|
|
45008
|
-
if (!
|
|
45008
|
+
if (!Create)
|
|
45009
45009
|
return void 0;
|
|
45010
45010
|
targetMetadata = new _Map();
|
|
45011
45011
|
metadata2.set(O, targetMetadata);
|
|
@@ -45013,7 +45013,7 @@ var require_Reflect = __commonJS({
|
|
|
45013
45013
|
}
|
|
45014
45014
|
var metadataMap = targetMetadata.get(P3);
|
|
45015
45015
|
if (IsUndefined(metadataMap)) {
|
|
45016
|
-
if (!
|
|
45016
|
+
if (!Create)
|
|
45017
45017
|
return void 0;
|
|
45018
45018
|
metadataMap = new _Map();
|
|
45019
45019
|
targetMetadata.set(P3, metadataMap);
|
|
@@ -45140,12 +45140,12 @@ var require_Reflect = __commonJS({
|
|
|
45140
45140
|
};
|
|
45141
45141
|
return provider;
|
|
45142
45142
|
}
|
|
45143
|
-
function GetMetadataProvider(O, P3,
|
|
45143
|
+
function GetMetadataProvider(O, P3, Create) {
|
|
45144
45144
|
var registeredProvider = metadataRegistry.getProvider(O, P3);
|
|
45145
45145
|
if (!IsUndefined(registeredProvider)) {
|
|
45146
45146
|
return registeredProvider;
|
|
45147
45147
|
}
|
|
45148
|
-
if (
|
|
45148
|
+
if (Create) {
|
|
45149
45149
|
if (metadataRegistry.setProvider(O, P3, metadataProvider)) {
|
|
45150
45150
|
return metadataProvider;
|
|
45151
45151
|
}
|
|
@@ -48485,6 +48485,45 @@ init_shim();
|
|
|
48485
48485
|
// ../bitcoin/dist/esm/client/rest/index.js
|
|
48486
48486
|
init_shim();
|
|
48487
48487
|
|
|
48488
|
+
// ../bitcoin/dist/esm/constants.js
|
|
48489
|
+
init_shim();
|
|
48490
|
+
var TXIN_WITNESS_COINBASE = "0000000000000000000000000000000000000000000000000000000000000000";
|
|
48491
|
+
var GENESIS_TX_ID = "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b";
|
|
48492
|
+
var DEFAULT_BITCOIN_NETWORK_CONFIG = {
|
|
48493
|
+
bitcoin: {
|
|
48494
|
+
rpc: void 0,
|
|
48495
|
+
rest: { host: "https://mempool.holdings/api" }
|
|
48496
|
+
},
|
|
48497
|
+
testnet3: {
|
|
48498
|
+
rpc: void 0,
|
|
48499
|
+
rest: { host: "https://mempool.holdings/testnet/api" }
|
|
48500
|
+
},
|
|
48501
|
+
testnet4: {
|
|
48502
|
+
rpc: void 0,
|
|
48503
|
+
rest: { host: "https://mempool.holdings/testnet4/api" }
|
|
48504
|
+
},
|
|
48505
|
+
signet: {
|
|
48506
|
+
rpc: void 0,
|
|
48507
|
+
rest: { host: "https://mempool.holdings/signet/api" }
|
|
48508
|
+
},
|
|
48509
|
+
mutinynet: {
|
|
48510
|
+
rpc: void 0,
|
|
48511
|
+
rest: { host: "https://mutinynet.com/api" }
|
|
48512
|
+
},
|
|
48513
|
+
regtest: {
|
|
48514
|
+
rpc: {
|
|
48515
|
+
network: "regtest",
|
|
48516
|
+
host: "http://localhost:18443",
|
|
48517
|
+
port: 18443,
|
|
48518
|
+
username: "polaruser",
|
|
48519
|
+
password: "polarpass",
|
|
48520
|
+
allowDefaultWallet: true,
|
|
48521
|
+
version: "28.1.0"
|
|
48522
|
+
},
|
|
48523
|
+
rest: { host: "http://localhost:3000" }
|
|
48524
|
+
}
|
|
48525
|
+
};
|
|
48526
|
+
|
|
48488
48527
|
// ../bitcoin/dist/esm/client/rest/address.js
|
|
48489
48528
|
init_shim();
|
|
48490
48529
|
var BitcoinAddress = class {
|
|
@@ -48680,46 +48719,8 @@ var BitcoinTransaction = class {
|
|
|
48680
48719
|
}
|
|
48681
48720
|
};
|
|
48682
48721
|
|
|
48683
|
-
// ../bitcoin/dist/esm/
|
|
48722
|
+
// ../bitcoin/dist/esm/types.js
|
|
48684
48723
|
init_shim();
|
|
48685
|
-
var TXIN_WITNESS_COINBASE = "0000000000000000000000000000000000000000000000000000000000000000";
|
|
48686
|
-
var GENESIS_TX_ID = "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b";
|
|
48687
|
-
var DEFAULT_BITCOIN_NETWORK_CONFIG = {
|
|
48688
|
-
mainnet: {
|
|
48689
|
-
rpc: void 0,
|
|
48690
|
-
rest: { host: "https://mempool.space/api" }
|
|
48691
|
-
},
|
|
48692
|
-
testnet3: {
|
|
48693
|
-
rpc: void 0,
|
|
48694
|
-
rest: { host: "https://mempool.space/testnet/api" }
|
|
48695
|
-
},
|
|
48696
|
-
testnet4: {
|
|
48697
|
-
rpc: void 0,
|
|
48698
|
-
rest: { host: "https://mempool.space/testnet4/api" }
|
|
48699
|
-
},
|
|
48700
|
-
signet: {
|
|
48701
|
-
rpc: void 0,
|
|
48702
|
-
rest: { host: "https://mempool.space/signet/api" }
|
|
48703
|
-
},
|
|
48704
|
-
mutinynet: {
|
|
48705
|
-
rpc: void 0,
|
|
48706
|
-
rest: { host: "https://mutinynet.com/api" }
|
|
48707
|
-
},
|
|
48708
|
-
regtest: {
|
|
48709
|
-
rpc: {
|
|
48710
|
-
network: "regtest",
|
|
48711
|
-
host: "http://localhost:18443",
|
|
48712
|
-
port: 18443,
|
|
48713
|
-
username: "polaruser",
|
|
48714
|
-
password: "polarpass",
|
|
48715
|
-
allowDefaultWallet: true,
|
|
48716
|
-
version: "28.1.0"
|
|
48717
|
-
},
|
|
48718
|
-
rest: { host: "http://localhost:3000" }
|
|
48719
|
-
}
|
|
48720
|
-
};
|
|
48721
|
-
|
|
48722
|
-
// ../bitcoin/dist/esm/client/rest/index.js
|
|
48723
48724
|
var RestClientConfig = class {
|
|
48724
48725
|
host;
|
|
48725
48726
|
headers;
|
|
@@ -48728,6 +48729,51 @@ var RestClientConfig = class {
|
|
|
48728
48729
|
this.headers = headers;
|
|
48729
48730
|
}
|
|
48730
48731
|
};
|
|
48732
|
+
var BitcoinRpcClientConfig = class _BitcoinRpcClientConfig {
|
|
48733
|
+
network;
|
|
48734
|
+
headers;
|
|
48735
|
+
host;
|
|
48736
|
+
logger;
|
|
48737
|
+
password;
|
|
48738
|
+
timeout;
|
|
48739
|
+
username;
|
|
48740
|
+
version;
|
|
48741
|
+
wallet;
|
|
48742
|
+
allowDefaultWallet;
|
|
48743
|
+
constructor(options2 = {
|
|
48744
|
+
headers: {},
|
|
48745
|
+
host: "http://localhost",
|
|
48746
|
+
logger: console,
|
|
48747
|
+
password: "",
|
|
48748
|
+
timeout: 3e4,
|
|
48749
|
+
username: "",
|
|
48750
|
+
version: "0.21.1",
|
|
48751
|
+
wallet: "",
|
|
48752
|
+
allowDefaultWallet: false
|
|
48753
|
+
}) {
|
|
48754
|
+
this.headers = options2.headers;
|
|
48755
|
+
this.host = options2.host;
|
|
48756
|
+
this.logger = options2.logger;
|
|
48757
|
+
this.password = options2.password;
|
|
48758
|
+
this.timeout = options2.timeout;
|
|
48759
|
+
this.username = options2.username;
|
|
48760
|
+
this.version = options2.version;
|
|
48761
|
+
this.wallet = options2.wallet;
|
|
48762
|
+
this.allowDefaultWallet = options2.allowDefaultWallet;
|
|
48763
|
+
}
|
|
48764
|
+
static initialize(options2) {
|
|
48765
|
+
return new _BitcoinRpcClientConfig(options2);
|
|
48766
|
+
}
|
|
48767
|
+
};
|
|
48768
|
+
var VerbosityLevel;
|
|
48769
|
+
(function(VerbosityLevel2) {
|
|
48770
|
+
VerbosityLevel2[VerbosityLevel2["hex"] = 0] = "hex";
|
|
48771
|
+
VerbosityLevel2[VerbosityLevel2["json"] = 1] = "json";
|
|
48772
|
+
VerbosityLevel2[VerbosityLevel2["jsonext"] = 2] = "jsonext";
|
|
48773
|
+
VerbosityLevel2[VerbosityLevel2["jsonextprev"] = 3] = "jsonextprev";
|
|
48774
|
+
})(VerbosityLevel || (VerbosityLevel = {}));
|
|
48775
|
+
|
|
48776
|
+
// ../bitcoin/dist/esm/client/rest/index.js
|
|
48731
48777
|
var BitcoinRestClient = class _BitcoinRestClient {
|
|
48732
48778
|
/**
|
|
48733
48779
|
* The encapsulated {@link RestClientConfig} object.
|
|
@@ -48820,52 +48866,6 @@ var BitcoinRestClient = class _BitcoinRestClient {
|
|
|
48820
48866
|
// ../bitcoin/dist/esm/client/rpc/index.js
|
|
48821
48867
|
init_shim();
|
|
48822
48868
|
|
|
48823
|
-
// ../bitcoin/dist/esm/types.js
|
|
48824
|
-
init_shim();
|
|
48825
|
-
var BitcoinRpcClientConfig = class _BitcoinRpcClientConfig {
|
|
48826
|
-
network;
|
|
48827
|
-
headers;
|
|
48828
|
-
host;
|
|
48829
|
-
logger;
|
|
48830
|
-
password;
|
|
48831
|
-
timeout;
|
|
48832
|
-
username;
|
|
48833
|
-
version;
|
|
48834
|
-
wallet;
|
|
48835
|
-
allowDefaultWallet;
|
|
48836
|
-
constructor(options2 = {
|
|
48837
|
-
headers: {},
|
|
48838
|
-
host: "localhost",
|
|
48839
|
-
logger: console,
|
|
48840
|
-
password: "",
|
|
48841
|
-
timeout: 3e4,
|
|
48842
|
-
username: "",
|
|
48843
|
-
version: "0.21.1",
|
|
48844
|
-
wallet: "",
|
|
48845
|
-
allowDefaultWallet: false
|
|
48846
|
-
}) {
|
|
48847
|
-
this.headers = options2.headers;
|
|
48848
|
-
this.host = options2.host;
|
|
48849
|
-
this.logger = options2.logger;
|
|
48850
|
-
this.password = options2.password;
|
|
48851
|
-
this.timeout = options2.timeout;
|
|
48852
|
-
this.username = options2.username;
|
|
48853
|
-
this.version = options2.version;
|
|
48854
|
-
this.wallet = options2.wallet;
|
|
48855
|
-
this.allowDefaultWallet = options2.allowDefaultWallet;
|
|
48856
|
-
}
|
|
48857
|
-
static initialize(options2) {
|
|
48858
|
-
return new _BitcoinRpcClientConfig(options2);
|
|
48859
|
-
}
|
|
48860
|
-
};
|
|
48861
|
-
var VerbosityLevel;
|
|
48862
|
-
(function(VerbosityLevel2) {
|
|
48863
|
-
VerbosityLevel2[VerbosityLevel2["hex"] = 0] = "hex";
|
|
48864
|
-
VerbosityLevel2[VerbosityLevel2["json"] = 1] = "json";
|
|
48865
|
-
VerbosityLevel2[VerbosityLevel2["jsonext"] = 2] = "jsonext";
|
|
48866
|
-
VerbosityLevel2[VerbosityLevel2["jsonextprev"] = 3] = "jsonextprev";
|
|
48867
|
-
})(VerbosityLevel || (VerbosityLevel = {}));
|
|
48868
|
-
|
|
48869
48869
|
// ../bitcoin/dist/esm/client/rpc/json-rpc.js
|
|
48870
48870
|
init_shim();
|
|
48871
48871
|
|
|
@@ -48904,8 +48904,8 @@ var JsonRpcTransport = class {
|
|
|
48904
48904
|
u.password = "";
|
|
48905
48905
|
this.url = u.toString().replace(/\/+$/, "");
|
|
48906
48906
|
}
|
|
48907
|
-
} catch {
|
|
48908
|
-
console.error(
|
|
48907
|
+
} catch (error) {
|
|
48908
|
+
console.error(`Invalid URL in Bitcoin RPC config: ${this.url}`, error);
|
|
48909
48909
|
}
|
|
48910
48910
|
}
|
|
48911
48911
|
}
|
|
@@ -57816,7 +57816,7 @@ var Secp256k1SecretKey = class _Secp256k1SecretKey {
|
|
|
57816
57816
|
}
|
|
57817
57817
|
/**
|
|
57818
57818
|
* Computes the public key from the secret key bytes.
|
|
57819
|
-
* @returns {
|
|
57819
|
+
* @returns {CompressedSecp256k1PublicKey} The computed public key
|
|
57820
57820
|
*/
|
|
57821
57821
|
computePublicKey() {
|
|
57822
57822
|
const publicKeyBytes = tinysecp.pointFromScalar(this.bytes, true);
|
|
@@ -57826,7 +57826,7 @@ var Secp256k1SecretKey = class _Secp256k1SecretKey {
|
|
|
57826
57826
|
if (publicKeyBytes.length !== 33) {
|
|
57827
57827
|
throw new SecretKeyError("Invalid compute: public key not compressed format", "COMPUTE_PUBLIC_KEY_ERROR");
|
|
57828
57828
|
}
|
|
57829
|
-
return publicKeyBytes;
|
|
57829
|
+
return new CompressedSecp256k1PublicKey(publicKeyBytes);
|
|
57830
57830
|
}
|
|
57831
57831
|
/**
|
|
57832
57832
|
* Converts the secret key to a JSON object.
|
|
@@ -57848,15 +57848,14 @@ var Secp256k1SecretKey = class _Secp256k1SecretKey {
|
|
|
57848
57848
|
}
|
|
57849
57849
|
/**
|
|
57850
57850
|
* Checks if the public key is a valid secp256k1 point.
|
|
57851
|
-
* @param {CompressedSecp256k1PublicKey} pk The public key to validate
|
|
57852
57851
|
* @returns {boolean} True if the public key is valid, false otherwise
|
|
57853
57852
|
*/
|
|
57854
|
-
hasValidPublicKey(
|
|
57853
|
+
hasValidPublicKey() {
|
|
57854
|
+
const pk = this.computePublicKey();
|
|
57855
57855
|
if (!tinysecp.isPoint(pk.compressed)) {
|
|
57856
57856
|
return false;
|
|
57857
57857
|
}
|
|
57858
|
-
|
|
57859
|
-
return computed.equals(pk);
|
|
57858
|
+
return true;
|
|
57860
57859
|
}
|
|
57861
57860
|
/**
|
|
57862
57861
|
* Decodes the multibase string to the 34-byte secret key (2 byte prefix + 32 byte key).
|
|
@@ -57943,7 +57942,7 @@ var Secp256k1SecretKey = class _Secp256k1SecretKey {
|
|
|
57943
57942
|
/**
|
|
57944
57943
|
* Generates a public key from the given secret key bytes.
|
|
57945
57944
|
* @param {KeyBytes} bytes The secret key bytes
|
|
57946
|
-
* @returns {
|
|
57945
|
+
* @returns {CompressedSecp256k1PublicKey} The computed public key bytes
|
|
57947
57946
|
*/
|
|
57948
57947
|
static getPublicKey(bytes3) {
|
|
57949
57948
|
return new _Secp256k1SecretKey(bytes3).computePublicKey();
|
|
@@ -58000,10 +57999,15 @@ var CompressedSecp256k1PublicKey = class _CompressedSecp256k1PublicKey {
|
|
|
58000
57999
|
}
|
|
58001
58000
|
/**
|
|
58002
58001
|
* Parity of the SEC compressed public key.
|
|
58003
|
-
* @returns {
|
|
58002
|
+
* @returns {0x02 | 0x03} The parity byte (0x02 if even, 0x03 if odd).
|
|
58003
|
+
* @throws {PublicKeyError} If the parity byte is not 0x02 or 0x03.
|
|
58004
58004
|
*/
|
|
58005
58005
|
get parity() {
|
|
58006
|
-
|
|
58006
|
+
const parity = this._bytes[0];
|
|
58007
|
+
if (![2, 3].includes(parity)) {
|
|
58008
|
+
throw new PublicKeyError("Invalid state: parity byte must be 2 or 3", "PARITY_ERROR", { parity });
|
|
58009
|
+
}
|
|
58010
|
+
return parity;
|
|
58007
58011
|
}
|
|
58008
58012
|
/**
|
|
58009
58013
|
* Whether the SEC compressed public key has even Y.
|
|
@@ -58150,7 +58154,7 @@ var CompressedSecp256k1PublicKey = class _CompressedSecp256k1PublicKey {
|
|
|
58150
58154
|
throw new PublicKeyError("Invalid arg: must be 32 byte secret key", "FROM_SECRET_KEY_ERROR");
|
|
58151
58155
|
}
|
|
58152
58156
|
const secret = sk instanceof Secp256k1SecretKey ? sk : new Secp256k1SecretKey(sk);
|
|
58153
|
-
return
|
|
58157
|
+
return secret.computePublicKey();
|
|
58154
58158
|
}
|
|
58155
58159
|
/**
|
|
58156
58160
|
* Computes modular exponentiation: (base^exp) % mod.
|
|
@@ -58232,7 +58236,7 @@ var SchnorrKeyPair = class _SchnorrKeyPair {
|
|
|
58232
58236
|
} else if (params.publicKey instanceof Uint8Array) {
|
|
58233
58237
|
this._publicKey = new CompressedSecp256k1PublicKey(params.publicKey);
|
|
58234
58238
|
} else {
|
|
58235
|
-
this._publicKey =
|
|
58239
|
+
this._publicKey = this._secretKey.computePublicKey();
|
|
58236
58240
|
}
|
|
58237
58241
|
this._publicKeyMultibase = this._publicKey.multibase.encoded;
|
|
58238
58242
|
this._secretKeyMultibase = this._secretKey ? this._secretKey.multibase : "";
|
|
@@ -58258,8 +58262,13 @@ var SchnorrKeyPair = class _SchnorrKeyPair {
|
|
|
58258
58262
|
* @throws {KeyPairError} If the public key is not a valid pair with the secret key.
|
|
58259
58263
|
*/
|
|
58260
58264
|
set publicKey(publicKey2) {
|
|
58261
|
-
if (this.secretKey
|
|
58262
|
-
|
|
58265
|
+
if (this.secretKey) {
|
|
58266
|
+
if (!this.secretKey.hasValidPublicKey()) {
|
|
58267
|
+
throw new KeyPairError("Secret key is not valid", "SECRET_KEY_ERROR");
|
|
58268
|
+
}
|
|
58269
|
+
const cPk = this.secretKey.computePublicKey();
|
|
58270
|
+
if (!publicKey2.equals(cPk))
|
|
58271
|
+
throw new KeyPairError("Public key is not a valid pair with the secret key", "PUBLIC_KEY_ERROR");
|
|
58263
58272
|
}
|
|
58264
58273
|
this._publicKey = publicKey2;
|
|
58265
58274
|
this._publicKeyMultibase = publicKey2.multibase.encoded;
|
|
@@ -145745,7 +145754,7 @@ var SchnorrMultikey = class _SchnorrMultikey {
|
|
|
145745
145754
|
* @throws {MultikeyError} if neither a publicKey nor a privateKey is provided
|
|
145746
145755
|
* @returns {SchnorrMultikey} A new Multikey instance
|
|
145747
145756
|
*/
|
|
145748
|
-
static
|
|
145757
|
+
static create({ id, controller, keys }) {
|
|
145749
145758
|
return new _SchnorrMultikey({ id, controller, keys });
|
|
145750
145759
|
}
|
|
145751
145760
|
/**
|
|
@@ -146346,7 +146355,14 @@ var BeaconFactory = class {
|
|
|
146346
146355
|
}
|
|
146347
146356
|
};
|
|
146348
146357
|
|
|
146349
|
-
// src/core/crud/
|
|
146358
|
+
// src/core/crud/deactivate.ts
|
|
146359
|
+
init_shim();
|
|
146360
|
+
|
|
146361
|
+
// src/did-btcr2.ts
|
|
146362
|
+
init_shim();
|
|
146363
|
+
var tinysecp4 = __toESM(require_dist2(), 1);
|
|
146364
|
+
|
|
146365
|
+
// src/core/crud/read.ts
|
|
146350
146366
|
init_shim();
|
|
146351
146367
|
|
|
146352
146368
|
// src/utils/beacons.ts
|
|
@@ -147114,6 +147130,7 @@ var DidDocument2 = class _DidDocument {
|
|
|
147114
147130
|
capabilityDelegation;
|
|
147115
147131
|
service;
|
|
147116
147132
|
constructor(document2) {
|
|
147133
|
+
console.log("Constructing DidDocument with document:", document2);
|
|
147117
147134
|
const idType = document2.id.includes("k1") ? IdentifierTypes.KEY : IdentifierTypes.EXTERNAL;
|
|
147118
147135
|
const isIntermediate = document2.id === ID_PLACEHOLDER_VALUE;
|
|
147119
147136
|
const { id, controller, verificationMethod: vm, service } = document2;
|
|
@@ -147353,6 +147370,7 @@ var DidDocument2 = class _DidDocument {
|
|
|
147353
147370
|
if (!_DidDocument.isValidVerificationRelationships(this)) {
|
|
147354
147371
|
throw new DidDocumentError("Invalid IntermediateDidDocument assertionMethod", INVALID_DID_DOCUMENT, this);
|
|
147355
147372
|
}
|
|
147373
|
+
return true;
|
|
147356
147374
|
}
|
|
147357
147375
|
/**
|
|
147358
147376
|
* Convert the DidDocument to an IntermediateDidDocument.
|
|
@@ -147367,19 +147385,7 @@ var DidDocument2 = class _DidDocument {
|
|
|
147367
147385
|
};
|
|
147368
147386
|
var IntermediateDidDocument = class _IntermediateDidDocument extends DidDocument2 {
|
|
147369
147387
|
constructor(document2) {
|
|
147370
|
-
|
|
147371
|
-
super(intermediateDocument);
|
|
147372
|
-
}
|
|
147373
|
-
/**
|
|
147374
|
-
* Create a minimal IntermediateDidDocument with a placeholder ID.
|
|
147375
|
-
* @param {Array<DidVerificationMethod>} verificationMethod The public key in multibase format.
|
|
147376
|
-
* @param {VerificationRelationships} relationships The public key in multibase format.
|
|
147377
|
-
* @param {Array<BeaconService>} service The service to be included in the document.
|
|
147378
|
-
* @returns {IntermediateDidDocument} A new IntermediateDidDocument with the placeholder ID.
|
|
147379
|
-
*/
|
|
147380
|
-
static create(verificationMethod, relationships, service) {
|
|
147381
|
-
const id = ID_PLACEHOLDER_VALUE;
|
|
147382
|
-
return new _IntermediateDidDocument({ id, ...relationships, verificationMethod, service });
|
|
147388
|
+
super(document2);
|
|
147383
147389
|
}
|
|
147384
147390
|
/**
|
|
147385
147391
|
* Convert the IntermediateDidDocument to a DidDocument by replacing the placeholder value with the provided DID.
|
|
@@ -147392,92 +147398,72 @@ var IntermediateDidDocument = class _IntermediateDidDocument extends DidDocument
|
|
|
147392
147398
|
return new DidDocument2(parseThis);
|
|
147393
147399
|
}
|
|
147394
147400
|
/**
|
|
147395
|
-
* Create a DidDocument
|
|
147396
|
-
* @param {
|
|
147397
|
-
* @returns {
|
|
147401
|
+
* Create an IntermediateDidDocument from a DidDocument by replacing the DID with a placeholder value.
|
|
147402
|
+
* @param {DidDocument} didDocument The DidDocument to convert.
|
|
147403
|
+
* @returns {IntermediateDidDocument} The IntermediateDidDocument representation of the DidDocument.
|
|
147398
147404
|
*/
|
|
147399
|
-
static
|
|
147400
|
-
|
|
147405
|
+
static fromDidDocument(didDocument) {
|
|
147406
|
+
const intermediateDocument = JSON.cloneReplace(didDocument, DID_REGEX, ID_PLACEHOLDER_VALUE);
|
|
147407
|
+
return new _IntermediateDidDocument(intermediateDocument);
|
|
147401
147408
|
}
|
|
147402
|
-
};
|
|
147403
|
-
|
|
147404
|
-
// src/core/crud/create.ts
|
|
147405
|
-
var Create = class {
|
|
147406
147409
|
/**
|
|
147407
|
-
*
|
|
147408
|
-
*
|
|
147409
|
-
*
|
|
147410
|
-
* to
|
|
147411
|
-
*
|
|
147412
|
-
* @param {CreateKeyParams} params See {@link CreateKeyParams} for details.
|
|
147413
|
-
* @param {number} params.version did-btcr2 identifier version.
|
|
147414
|
-
* @param {string} params.network did-btcr2 bitcoin network.
|
|
147415
|
-
* @param {KeyBytes} params.pubKeyBytes public key bytes for id creation.
|
|
147416
|
-
* @returns {CreateResponse} A response object of type {@link CreateResponse}.
|
|
147417
|
-
* @throws {DidError} if the public key is missing or invalid.
|
|
147410
|
+
* Create a minimal IntermediateDidDocument with a placeholder ID.
|
|
147411
|
+
* @param {Array<DidVerificationMethod>} verificationMethod The public key in multibase format.
|
|
147412
|
+
* @param {VerificationRelationships} relationships The public key in multibase format.
|
|
147413
|
+
* @param {Array<BeaconService>} service The service to be included in the document.
|
|
147414
|
+
* @returns {IntermediateDidDocument} A new IntermediateDidDocument with the placeholder ID.
|
|
147418
147415
|
*/
|
|
147419
|
-
static
|
|
147420
|
-
const
|
|
147421
|
-
|
|
147422
|
-
|
|
147423
|
-
|
|
147424
|
-
|
|
147425
|
-
|
|
147426
|
-
|
|
147416
|
+
static create(verificationMethod, relationships, service) {
|
|
147417
|
+
const id = ID_PLACEHOLDER_VALUE;
|
|
147418
|
+
return new _IntermediateDidDocument({ id, ...relationships, verificationMethod, service });
|
|
147419
|
+
}
|
|
147420
|
+
/**
|
|
147421
|
+
* Create a minimal IntermediateDidDocument from a public key.
|
|
147422
|
+
* @param {KeyBytes} publicKey The public key in bytes format.
|
|
147423
|
+
* @returns {IntermediateDidDocument} A new IntermediateDidDocument with the placeholder ID.
|
|
147424
|
+
*/
|
|
147425
|
+
static fromPublicKey(publicKey2, network) {
|
|
147426
|
+
const pk = new CompressedSecp256k1PublicKey(publicKey2);
|
|
147427
|
+
const id = ID_PLACEHOLDER_VALUE;
|
|
147428
|
+
const service = BeaconUtils.generateBeaconService({
|
|
147429
|
+
id: `${id}#key-0`,
|
|
147430
|
+
publicKey: pk.compressed,
|
|
147427
147431
|
network: getNetwork(network),
|
|
147432
|
+
addressType: "p2pkh",
|
|
147428
147433
|
type: "SingletonBeacon"
|
|
147429
147434
|
});
|
|
147430
|
-
const
|
|
147431
|
-
|
|
147432
|
-
|
|
147433
|
-
|
|
147434
|
-
|
|
147435
|
+
const relationships = {
|
|
147436
|
+
authentication: [`${id}#key-0`],
|
|
147437
|
+
assertionMethod: [`${id}#key-0`],
|
|
147438
|
+
capabilityInvocation: [`${id}#key-0`],
|
|
147439
|
+
capabilityDelegation: [`${id}#key-0`]
|
|
147440
|
+
};
|
|
147441
|
+
const verificationMethod = [
|
|
147442
|
+
{
|
|
147443
|
+
id: `${id}#key-0`,
|
|
147435
147444
|
type: "Multikey",
|
|
147436
|
-
controller:
|
|
147437
|
-
publicKeyMultibase:
|
|
147438
|
-
}
|
|
147439
|
-
|
|
147440
|
-
|
|
147441
|
-
return { did: identifier, initialDocument };
|
|
147445
|
+
controller: id,
|
|
147446
|
+
publicKeyMultibase: pk.multibase.encoded
|
|
147447
|
+
}
|
|
147448
|
+
];
|
|
147449
|
+
return _IntermediateDidDocument.create(verificationMethod, relationships, [service]);
|
|
147442
147450
|
}
|
|
147443
147451
|
/**
|
|
147444
|
-
*
|
|
147445
|
-
*
|
|
147446
|
-
*
|
|
147447
|
-
* initial DID documents, including the ability to include Service Endpoints and Beacons that support aggregation.
|
|
147448
|
-
* Inputs include `intermediateDocument`, optional version and network returning initialDidDocument. The
|
|
147449
|
-
* intermediateDocument should be a valid DID document except all places where the DID document requires the use of
|
|
147450
|
-
* the identifier (e.g. the id field). These fields should use placeholder value
|
|
147451
|
-
* `did:btcr2:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`. The intermediateDocument should include at
|
|
147452
|
-
* least one verificationMethod and service of the type SingletonBeacon.
|
|
147453
|
-
*
|
|
147454
|
-
* @param {CreateExternalParams} params See {@link CreateExternalParams} for details.
|
|
147455
|
-
* @param {number} params.version Identifier version.
|
|
147456
|
-
* @param {string} params.network Identifier network name.
|
|
147457
|
-
* @param {string} params.documentBytes Intermediate DID Document bytes.
|
|
147458
|
-
* @returns {CreateResponse} A Promise resolving to {@link CreateResponses}.
|
|
147459
|
-
* @throws {DidError} if the verificationMethod or service objects are missing required properties
|
|
147452
|
+
* Taken an object, convert it to an IntermediateDocuemnt and then to a DidDocument.
|
|
147453
|
+
* @param {JSONObject} object The JSON object to convert.
|
|
147454
|
+
* @returns {DidDocument} The created DidDocument.
|
|
147460
147455
|
*/
|
|
147461
|
-
static
|
|
147462
|
-
|
|
147463
|
-
|
|
147464
|
-
|
|
147465
|
-
|
|
147466
|
-
|
|
147467
|
-
|
|
147468
|
-
return { did, initialDocument };
|
|
147456
|
+
static fromJSON(object2) {
|
|
147457
|
+
return new _IntermediateDidDocument(object2);
|
|
147458
|
+
}
|
|
147459
|
+
};
|
|
147460
|
+
var Document = class {
|
|
147461
|
+
static isValid(didDocument) {
|
|
147462
|
+
return new DidDocument2(didDocument).validateIntermediate();
|
|
147469
147463
|
}
|
|
147470
147464
|
};
|
|
147471
|
-
|
|
147472
|
-
// src/core/crud/deactivate.ts
|
|
147473
|
-
init_shim();
|
|
147474
|
-
|
|
147475
|
-
// src/did-btcr2.ts
|
|
147476
|
-
init_shim();
|
|
147477
|
-
var tinysecp4 = __toESM(require_dist2(), 1);
|
|
147478
147465
|
|
|
147479
147466
|
// src/core/crud/read.ts
|
|
147480
|
-
init_shim();
|
|
147481
147467
|
var bitcoin4 = new BitcoinNetworkConnection();
|
|
147482
147468
|
var Resolve = class {
|
|
147483
147469
|
/**
|
|
@@ -148079,7 +148065,7 @@ var Update = class {
|
|
|
148079
148065
|
);
|
|
148080
148066
|
}
|
|
148081
148067
|
const id = fullId.slice(fullId.indexOf("#"));
|
|
148082
|
-
const multikey = !secretKeyMultibase ? await KeyManager.getKeyPair(fullId) : SchnorrMultikey.
|
|
148068
|
+
const multikey = !secretKeyMultibase ? await KeyManager.getKeyPair(fullId) : SchnorrMultikey.create({
|
|
148083
148069
|
id,
|
|
148084
148070
|
controller,
|
|
148085
148071
|
keys: new SchnorrKeyPair({
|
|
@@ -148176,15 +148162,9 @@ var DidBtcr2 = class {
|
|
|
148176
148162
|
*/
|
|
148177
148163
|
static async create(params) {
|
|
148178
148164
|
const { idType, options: options2 = {} } = params;
|
|
148179
|
-
|
|
148180
|
-
|
|
148181
|
-
|
|
148182
|
-
}
|
|
148183
|
-
if (idType === IdentifierTypes.EXTERNAL) {
|
|
148184
|
-
const { intermediateDocument } = params;
|
|
148185
|
-
return await Create.external({ intermediateDocument, options: options2 });
|
|
148186
|
-
}
|
|
148187
|
-
throw new MethodError('Invalid idType: expected "KEY" or "EXTERNAL"', INVALID_DID, params);
|
|
148165
|
+
const { version: version3 = 1, network = "bitcoin" } = options2;
|
|
148166
|
+
const genesisBytes = params.genesisBytes;
|
|
148167
|
+
return Identifier.encode({ idType, genesisBytes, version: version3, network });
|
|
148188
148168
|
}
|
|
148189
148169
|
/**
|
|
148190
148170
|
* Entry point for section {@link https://dcdpr.github.io/did-btcr2/#read | 7.2 Read}.
|
|
@@ -150912,13 +150892,13 @@ export {
|
|
|
150912
150892
|
BeaconFactory,
|
|
150913
150893
|
BeaconUtils,
|
|
150914
150894
|
CIDAggregateBeacon,
|
|
150915
|
-
Create,
|
|
150916
150895
|
DID_REGEX,
|
|
150917
150896
|
Deactivate,
|
|
150918
150897
|
DidBtcr2,
|
|
150919
150898
|
DidDocument2 as DidDocument,
|
|
150920
150899
|
DidDocumentBuilder,
|
|
150921
150900
|
DidVerificationMethod,
|
|
150901
|
+
Document,
|
|
150922
150902
|
GeneralUtils,
|
|
150923
150903
|
Identifier,
|
|
150924
150904
|
IntermediateDidDocument,
|
|
@@ -44,7 +44,7 @@ export class NostrAdapter {
|
|
|
44
44
|
*/
|
|
45
45
|
generateIdentity() {
|
|
46
46
|
this.config.keys.secret = Secp256k1SecretKey.random();
|
|
47
|
-
this.config.keys.public = Secp256k1SecretKey.getPublicKey(this.config.keys.secret);
|
|
47
|
+
this.config.keys.public = Secp256k1SecretKey.getPublicKey(this.config.keys.secret).compressed;
|
|
48
48
|
this.config.did = Identifier.encode({
|
|
49
49
|
idType: this.config.components.idType || 'KEY',
|
|
50
50
|
version: this.config.components.version || 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nostr.js","sourceRoot":"","sources":["../../../../../../src/core/beacon/aggregation/protocol/nostr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExE,OAA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