@leofcoin/peernet 1.1.9 → 1.1.10
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/{client-6f8b633a.js → client-3c5cc737.js} +6 -2
- package/exports/browser/{index-59ec4d46.js → index-62470ce4.js} +1 -1
- package/exports/browser/{messages-c720a8ba.js → messages-9bda9ff7.js} +1 -1
- package/exports/browser/{peernet-3281374b.js → peernet-4b44a873.js} +3 -3
- package/exports/browser/peernet.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getDefaultExportFromCjs, c as commonjsGlobal } from './peernet-
|
|
1
|
+
import { g as getDefaultExportFromCjs, c as commonjsGlobal } from './peernet-4b44a873.js';
|
|
2
2
|
import './value-157ab062.js';
|
|
3
3
|
|
|
4
4
|
function commonjsRequire(path) {
|
|
@@ -41043,13 +41043,17 @@ class P2PTClient extends P2PT {
|
|
|
41043
41043
|
pubsub.publish('peer:left', this.#discovered[peer.id]);
|
|
41044
41044
|
});
|
|
41045
41045
|
|
|
41046
|
-
this.on('
|
|
41046
|
+
this.on('msg', async (peer, data) => {
|
|
41047
41047
|
const hasPeer = this.#discovered[peer.id];
|
|
41048
41048
|
if (!hasPeer) this.#discovered[peer.id] = await new P2PTPeer(peer, this);
|
|
41049
41049
|
|
|
41050
41050
|
this.#discovered[peer.id]?._handleMessage(new Uint8Array(Object.values(data)));
|
|
41051
41051
|
this.bw.down += data.length || data.byteLength;
|
|
41052
41052
|
});
|
|
41053
|
+
|
|
41054
|
+
this.on('data', async (peer, data) => {
|
|
41055
|
+
pubsub.publish('peernet:shard', {peer, data});
|
|
41056
|
+
});
|
|
41053
41057
|
console.log('Peer started as: ' + this._peerId);
|
|
41054
41058
|
this.start();
|
|
41055
41059
|
}
|
|
@@ -16086,7 +16086,7 @@ class Identity {
|
|
|
16086
16086
|
globalThis.peernet.selectedAccount = new TextDecoder().decode(selected);
|
|
16087
16087
|
}
|
|
16088
16088
|
else {
|
|
16089
|
-
const importee = await import(/* webpackChunkName: "generate-account" */ './index-
|
|
16089
|
+
const importee = await import(/* webpackChunkName: "generate-account" */ './index-62470ce4.js');
|
|
16090
16090
|
const { identity, accounts } = await importee.default(password, this.network);
|
|
16091
16091
|
await globalThis.accountStore.put('public', JSON.stringify({ walletId: identity.walletId }));
|
|
16092
16092
|
await globalThis.walletStore.put('version', String(1));
|
|
@@ -16257,7 +16257,7 @@ class Peernet {
|
|
|
16257
16257
|
this.root = options.root;
|
|
16258
16258
|
const { RequestMessage, ResponseMessage, PeerMessage, PeerMessageResponse, PeernetMessage, DHTMessage, DHTMessageResponse, DataMessage, DataMessageResponse, PsMessage, ChatMessage, PeernetFile
|
|
16259
16259
|
// FolderMessageResponse
|
|
16260
|
-
} = await import(/* webpackChunkName: "messages" */ './messages-
|
|
16260
|
+
} = await import(/* webpackChunkName: "messages" */ './messages-9bda9ff7.js');
|
|
16261
16261
|
/**
|
|
16262
16262
|
* proto Object containing protos
|
|
16263
16263
|
* @type {Object}
|
|
@@ -16328,7 +16328,7 @@ class Peernet {
|
|
|
16328
16328
|
if (this.#starting || this.#started)
|
|
16329
16329
|
return;
|
|
16330
16330
|
this.#starting = true;
|
|
16331
|
-
const importee = await import('./client-
|
|
16331
|
+
const importee = await import('./client-3c5cc737.js');
|
|
16332
16332
|
/**
|
|
16333
16333
|
* @access public
|
|
16334
16334
|
* @type {PeernetClient}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { P as default } from './peernet-
|
|
1
|
+
export { P as default } from './peernet-4b44a873.js';
|
|
2
2
|
import './value-157ab062.js';
|