@leofcoin/chain 1.5.13 → 1.5.15
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/exports/browser/{index-329e0324-67daaccb.js → index-329e0324-71fa9c50.js} +1 -1
- package/exports/browser/{messages-000b7f84-fd07a3bf.js → messages-000b7f84-88d5e15b.js} +1 -1
- package/exports/browser/{node-browser-505084de.js → node-browser-af58f01b.js} +7 -5
- package/exports/browser/node-browser.js +1 -1
- package/exports/node.js +5 -3
- package/package.json +1 -1
|
@@ -20216,7 +20216,7 @@ class Identity {
|
|
|
20216
20216
|
this.selectedAccount = new TextDecoder().decode(selected);
|
|
20217
20217
|
}
|
|
20218
20218
|
else {
|
|
20219
|
-
const importee = await import(/* webpackChunkName: "generate-account" */ './index-329e0324-
|
|
20219
|
+
const importee = await import(/* webpackChunkName: "generate-account" */ './index-329e0324-71fa9c50.js');
|
|
20220
20220
|
const { identity, accounts } = await importee.default(password, this.network);
|
|
20221
20221
|
await globalThis.accountStore.put('public', JSON.stringify({ walletId: identity.walletId }));
|
|
20222
20222
|
await globalThis.walletStore.put('version', String(1));
|
|
@@ -20407,7 +20407,7 @@ class Peernet {
|
|
|
20407
20407
|
this.root = options.root;
|
|
20408
20408
|
const { RequestMessage, ResponseMessage, PeerMessage, PeerMessageResponse, PeernetMessage, DHTMessage, DHTMessageResponse, DataMessage, DataMessageResponse, PsMessage, ChatMessage, PeernetFile
|
|
20409
20409
|
// FolderMessageResponse
|
|
20410
|
-
} = await import(/* webpackChunkName: "messages" */ './messages-000b7f84-
|
|
20410
|
+
} = await import(/* webpackChunkName: "messages" */ './messages-000b7f84-88d5e15b.js');
|
|
20411
20411
|
/**
|
|
20412
20412
|
* proto Object containing protos
|
|
20413
20413
|
* @type {Object}
|
|
@@ -20973,9 +20973,11 @@ class Node {
|
|
|
20973
20973
|
}, password) {
|
|
20974
20974
|
this.#node = globalThis.Peernet ? await new globalThis.Peernet(config, password) : await new Peernet(config, password);
|
|
20975
20975
|
await nodeConfig(config);
|
|
20976
|
-
globalThis.pubsub.subscribe('chain:ready', () => {
|
|
20977
|
-
if (!this.#node.autoStart)
|
|
20978
|
-
this.#node.start();
|
|
20976
|
+
globalThis.pubsub.subscribe('chain:ready', async () => {
|
|
20977
|
+
if (!this.#node.autoStart) {
|
|
20978
|
+
await this.#node.start();
|
|
20979
|
+
pubsub.publish('node:ready', true);
|
|
20980
|
+
}
|
|
20979
20981
|
});
|
|
20980
20982
|
return this;
|
|
20981
20983
|
// this.config = await config()
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { N as default } from './node-browser-
|
|
1
|
+
export { N as default } from './node-browser-af58f01b.js';
|
|
2
2
|
import './index-e8f03811.js';
|
package/exports/node.js
CHANGED
|
@@ -18,10 +18,12 @@ class Node {
|
|
|
18
18
|
}, password) {
|
|
19
19
|
this.#node = globalThis.Peernet ? await new globalThis.Peernet(config, password) : await new Peernet(config, password);
|
|
20
20
|
await nodeConfig(config);
|
|
21
|
-
globalThis.pubsub.subscribe('chain:ready', () => {
|
|
21
|
+
globalThis.pubsub.subscribe('chain:ready', async () => {
|
|
22
22
|
// when autostart is false the node will only be started after the chain is ready (this is here so we can just use node for communication)
|
|
23
|
-
if (!this.#node.autoStart)
|
|
24
|
-
this.#node.start();
|
|
23
|
+
if (!this.#node.autoStart) {
|
|
24
|
+
await this.#node.start();
|
|
25
|
+
pubsub.publish('node:ready', true);
|
|
26
|
+
}
|
|
25
27
|
});
|
|
26
28
|
return this;
|
|
27
29
|
// this.config = await config()
|