@tinycloud/node-sdk 2.2.1-beta.1 → 2.3.0-beta.2
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/core.cjs +4 -4
- package/dist/core.cjs.map +1 -1
- package/dist/core.js +4 -4
- package/dist/core.js.map +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -19330,8 +19330,8 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
19330
19330
|
fetchByNetworkId: (networkId) => this.getEncryptionNetwork(networkId)
|
|
19331
19331
|
},
|
|
19332
19332
|
wellKnown: {
|
|
19333
|
-
fetchWellKnown: async (
|
|
19334
|
-
if (!this._address ||
|
|
19333
|
+
fetchWellKnown: async (ownerDid, discoveryKey) => {
|
|
19334
|
+
if (!this._address || ownerDid !== this.did) {
|
|
19335
19335
|
return null;
|
|
19336
19336
|
}
|
|
19337
19337
|
if (!this.config.host) {
|
|
@@ -19793,11 +19793,11 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
19793
19793
|
}
|
|
19794
19794
|
async createEncryptionNetwork(name = DEFAULT_ENCRYPTION_NETWORK_NAME) {
|
|
19795
19795
|
const targetNode = await this.fetchNodeId();
|
|
19796
|
-
const
|
|
19796
|
+
const ownerDid = this.did;
|
|
19797
19797
|
const networkId = this.getDefaultEncryptionNetworkId(name);
|
|
19798
19798
|
const body = {
|
|
19799
19799
|
name,
|
|
19800
|
-
|
|
19800
|
+
ownerDid,
|
|
19801
19801
|
threshold: { n: 1, t: 1 }
|
|
19802
19802
|
};
|
|
19803
19803
|
const crypto2 = this.createEncryptionCrypto();
|