@leofcoin/peernet 1.0.10 → 1.0.11
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/BREAKING_CHANGES.md +14 -0
- package/README.md +3 -1
- package/exports/browser/{client-bbd6e332.js → client-0d28cffd.js} +1 -1
- package/exports/browser/{index-84ee0e0b.js → index-a3af83e4.js} +1 -1
- package/exports/browser/{messages-def41fbf.js → messages-c871d6f3.js} +1 -1
- package/exports/browser/{peernet-7ba6837f.js → peernet-c184b33c.js} +13 -8
- package/exports/browser/peernet.js +1 -1
- package/exports/peernet.js +11 -6
- package/package.json +1 -1
- package/src/peernet.ts +12 -7
package/README.md
CHANGED
|
@@ -16082,7 +16082,7 @@ class Identity {
|
|
|
16082
16082
|
globalThis.peernet.selectedAccount = new TextDecoder().decode(selected);
|
|
16083
16083
|
}
|
|
16084
16084
|
else {
|
|
16085
|
-
const importee = await import(/* webpackChunkName: "generate-account" */ './index-
|
|
16085
|
+
const importee = await import(/* webpackChunkName: "generate-account" */ './index-a3af83e4.js');
|
|
16086
16086
|
const { identity, accounts } = await importee.default(password, this.network);
|
|
16087
16087
|
await globalThis.accountStore.put('public', JSON.stringify({ walletId: identity.walletId }));
|
|
16088
16088
|
await globalThis.walletStore.put('version', String(1));
|
|
@@ -16248,7 +16248,7 @@ class Peernet {
|
|
|
16248
16248
|
this.root = options.root;
|
|
16249
16249
|
const { RequestMessage, ResponseMessage, PeerMessage, PeerMessageResponse, PeernetMessage, DHTMessage, DHTMessageResponse, DataMessage, DataMessageResponse, PsMessage, ChatMessage, PeernetFile
|
|
16250
16250
|
// FolderMessageResponse
|
|
16251
|
-
} = await import(/* webpackChunkName: "messages" */ './messages-
|
|
16251
|
+
} = await import(/* webpackChunkName: "messages" */ './messages-c871d6f3.js');
|
|
16252
16252
|
/**
|
|
16253
16253
|
* proto Object containing protos
|
|
16254
16254
|
* @type {Object}
|
|
@@ -16297,12 +16297,6 @@ class Peernet {
|
|
|
16297
16297
|
* @see DataHandler
|
|
16298
16298
|
*/
|
|
16299
16299
|
pubsub.subscribe('peer:data', dataHandler);
|
|
16300
|
-
const importee = await import('./client-bbd6e332.js');
|
|
16301
|
-
/**
|
|
16302
|
-
* @access public
|
|
16303
|
-
* @type {PeernetClient}
|
|
16304
|
-
*/
|
|
16305
|
-
this.client = new importee.default(this.id, this.networkVersion, this.stars);
|
|
16306
16300
|
if (globalThis.navigator) {
|
|
16307
16301
|
globalThis.addEventListener('beforeunload', async () => this.client.close());
|
|
16308
16302
|
}
|
|
@@ -16315,6 +16309,17 @@ class Peernet {
|
|
|
16315
16309
|
}
|
|
16316
16310
|
return this;
|
|
16317
16311
|
}
|
|
16312
|
+
async start() {
|
|
16313
|
+
this.starting = true;
|
|
16314
|
+
const importee = await import('./client-0d28cffd.js');
|
|
16315
|
+
/**
|
|
16316
|
+
* @access public
|
|
16317
|
+
* @type {PeernetClient}
|
|
16318
|
+
*/
|
|
16319
|
+
this.client = new importee.default(this.id, this.networkVersion, this.stars);
|
|
16320
|
+
this.started = true;
|
|
16321
|
+
this.starting = false;
|
|
16322
|
+
}
|
|
16318
16323
|
addRequestHandler(name, method) {
|
|
16319
16324
|
this.requestProtos[name] = method;
|
|
16320
16325
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { P as default } from './peernet-
|
|
1
|
+
export { P as default } from './peernet-c184b33c.js';
|
|
2
2
|
import './value-157ab062.js';
|
package/exports/peernet.js
CHANGED
|
@@ -555,12 +555,6 @@ class Peernet {
|
|
|
555
555
|
* @see DataHandler
|
|
556
556
|
*/
|
|
557
557
|
pubsub.subscribe('peer:data', dataHandler);
|
|
558
|
-
const importee = await import('@leofcoin/peernet-swarm/client');
|
|
559
|
-
/**
|
|
560
|
-
* @access public
|
|
561
|
-
* @type {PeernetClient}
|
|
562
|
-
*/
|
|
563
|
-
this.client = new importee.default(this.id, this.networkVersion, this.stars);
|
|
564
558
|
if (globalThis.navigator) {
|
|
565
559
|
globalThis.addEventListener('beforeunload', async () => this.client.close());
|
|
566
560
|
}
|
|
@@ -573,6 +567,17 @@ class Peernet {
|
|
|
573
567
|
}
|
|
574
568
|
return this;
|
|
575
569
|
}
|
|
570
|
+
async start() {
|
|
571
|
+
this.starting = true;
|
|
572
|
+
const importee = await import('@leofcoin/peernet-swarm/client');
|
|
573
|
+
/**
|
|
574
|
+
* @access public
|
|
575
|
+
* @type {PeernetClient}
|
|
576
|
+
*/
|
|
577
|
+
this.client = new importee.default(this.id, this.networkVersion, this.stars);
|
|
578
|
+
this.started = true;
|
|
579
|
+
this.starting = false;
|
|
580
|
+
}
|
|
576
581
|
addRequestHandler(name, method) {
|
|
577
582
|
this.requestProtos[name] = method;
|
|
578
583
|
}
|
package/package.json
CHANGED
package/src/peernet.ts
CHANGED
|
@@ -235,13 +235,6 @@ export default class Peernet {
|
|
|
235
235
|
*/
|
|
236
236
|
pubsub.subscribe('peer:data', dataHandler)
|
|
237
237
|
|
|
238
|
-
|
|
239
|
-
const importee = await import('@leofcoin/peernet-swarm/client')
|
|
240
|
-
/**
|
|
241
|
-
* @access public
|
|
242
|
-
* @type {PeernetClient}
|
|
243
|
-
*/
|
|
244
|
-
this.client = new importee.default(this.id, this.networkVersion, this.stars)
|
|
245
238
|
if (globalThis.navigator) {
|
|
246
239
|
globalThis.addEventListener('beforeunload', async () => this.client.close());
|
|
247
240
|
} else {
|
|
@@ -254,6 +247,18 @@ export default class Peernet {
|
|
|
254
247
|
return this
|
|
255
248
|
}
|
|
256
249
|
|
|
250
|
+
async start() {
|
|
251
|
+
this.starting = true
|
|
252
|
+
const importee = await import('@leofcoin/peernet-swarm/client')
|
|
253
|
+
/**
|
|
254
|
+
* @access public
|
|
255
|
+
* @type {PeernetClient}
|
|
256
|
+
*/
|
|
257
|
+
this.client = new importee.default(this.id, this.networkVersion, this.stars)
|
|
258
|
+
this.started = true
|
|
259
|
+
this.starting = false
|
|
260
|
+
}
|
|
261
|
+
|
|
257
262
|
addRequestHandler(name, method) {
|
|
258
263
|
this.requestProtos[name] = method
|
|
259
264
|
}
|