@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/core.js
CHANGED
|
@@ -2304,8 +2304,8 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
2304
2304
|
fetchByNetworkId: (networkId) => this.getEncryptionNetwork(networkId)
|
|
2305
2305
|
},
|
|
2306
2306
|
wellKnown: {
|
|
2307
|
-
fetchWellKnown: async (
|
|
2308
|
-
if (!this._address ||
|
|
2307
|
+
fetchWellKnown: async (ownerDid, discoveryKey) => {
|
|
2308
|
+
if (!this._address || ownerDid !== this.did) {
|
|
2309
2309
|
return null;
|
|
2310
2310
|
}
|
|
2311
2311
|
if (!this.config.host) {
|
|
@@ -2767,11 +2767,11 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
2767
2767
|
}
|
|
2768
2768
|
async createEncryptionNetwork(name = DEFAULT_ENCRYPTION_NETWORK_NAME) {
|
|
2769
2769
|
const targetNode = await this.fetchNodeId();
|
|
2770
|
-
const
|
|
2770
|
+
const ownerDid = this.did;
|
|
2771
2771
|
const networkId = this.getDefaultEncryptionNetworkId(name);
|
|
2772
2772
|
const body = {
|
|
2773
2773
|
name,
|
|
2774
|
-
|
|
2774
|
+
ownerDid,
|
|
2775
2775
|
threshold: { n: 1, t: 1 }
|
|
2776
2776
|
};
|
|
2777
2777
|
const crypto = this.createEncryptionCrypto();
|