@leofcoin/peernet 1.1.17 → 1.1.18

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.
@@ -1,4 +1,4 @@
1
- import { g as getDefaultExportFromCjs, c as commonjsGlobal } from './peernet-1eabb5ba.js';
1
+ import { g as getDefaultExportFromCjs, c as commonjsGlobal } from './peernet-ea3ab655.js';
2
2
  import './value-157ab062.js';
3
3
 
4
4
  function commonjsRequire(path) {
@@ -1,4 +1,4 @@
1
- import { M as MultiWallet, e as encrypt, b as base58$1 } from './peernet-1eabb5ba.js';
1
+ import { M as MultiWallet, e as encrypt, b as base58$1 } from './peernet-ea3ab655.js';
2
2
  import './value-157ab062.js';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { F as FormatInterface } from './peernet-1eabb5ba.js';
1
+ import { F as FormatInterface } from './peernet-ea3ab655.js';
2
2
  import './value-157ab062.js';
3
3
 
4
4
  var proto$b = {
@@ -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-06f8d69a.js');
16089
+ const importee = await import(/* webpackChunkName: "generate-account" */ './index-123daa04.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-43b935b0.js');
16260
+ } = await import(/* webpackChunkName: "messages" */ './messages-5ddc1083.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-04e72306.js');
16331
+ const importee = await import('./client-033977a1.js');
16332
16332
  /**
16333
16333
  * @access public
16334
16334
  * @type {PeernetClient}
@@ -16729,7 +16729,7 @@ class Peernet {
16729
16729
  // globalSub.publish(topic, data)
16730
16730
  const id = Math.random().toString(36).slice(-12);
16731
16731
  data = await new globalThis.peernet.protos['peernet-ps']({ data, topic });
16732
- for (const [peerId, peer] of this.#connections) {
16732
+ for (const [peerId, peer] of Object.entries(this.#connections)) {
16733
16733
  if (peerId !== this.id) {
16734
16734
  const node = await this.prepareMessage(data);
16735
16735
  this.sendMessage(peer, id, node.encoded);
@@ -1,2 +1,2 @@
1
- export { P as default } from './peernet-1eabb5ba.js';
1
+ export { P as default } from './peernet-ea3ab655.js';
2
2
  import './value-157ab062.js';
@@ -983,7 +983,7 @@ class Peernet {
983
983
  // globalSub.publish(topic, data)
984
984
  const id = Math.random().toString(36).slice(-12);
985
985
  data = await new globalThis.peernet.protos['peernet-ps']({ data, topic });
986
- for (const [peerId, peer] of this.#connections) {
986
+ for (const [peerId, peer] of Object.entries(this.#connections)) {
987
987
  if (peerId !== this.id) {
988
988
  const node = await this.prepareMessage(data);
989
989
  this.sendMessage(peer, id, node.encoded);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/peernet",
3
- "version": "1.1.17",
3
+ "version": "1.1.18",
4
4
  "description": "",
5
5
  "main": "src/peernet.js",
6
6
  "exports": {
package/src/peernet.ts CHANGED
@@ -688,7 +688,7 @@ export default class Peernet {
688
688
  // globalSub.publish(topic, data)
689
689
  const id = Math.random().toString(36).slice(-12)
690
690
  data = await new globalThis.peernet.protos['peernet-ps']({data, topic})
691
- for (const [peerId, peer] of this.#connections) {
691
+ for (const [peerId, peer] of Object.entries(this.#connections)) {
692
692
  if (peerId !== this.id) {
693
693
  const node = await this.prepareMessage(data)
694
694
  this.sendMessage(peer, id, node.encoded)