@leofcoin/peernet 0.18.2 → 0.18.4

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 { L as LittlePubSub } from './peernet-2796cdb2.js';
1
+ import { L as LittlePubSub } from './peernet-0418c064.js';
2
2
  import './value-40634404.js';
3
3
 
4
4
  var clientApi = _pubsub => {
@@ -1,4 +1,4 @@
1
- import { b as base58$1, i as index$1, a as index$2, c as index$3, d as index$4, e as createRIPEMD160, f as createHMAC, g as createSHA512, h as createKeccak } from './peernet-2796cdb2.js';
1
+ import { b as base58$1, i as index$1, a as index$2, c as index$3, d as index$4, e as createRIPEMD160, f as createHMAC, g as createSHA512, h as createKeccak } from './peernet-0418c064.js';
2
2
  import './value-40634404.js';
3
3
 
4
4
  const randombytes = strength => crypto.getRandomValues(new Uint8Array(strength));
@@ -1,5 +1,5 @@
1
- import MultiWallet from './index-7018cab6.js';
2
- import './peernet-2796cdb2.js';
1
+ import MultiWallet from './index-b1a03d93.js';
2
+ import './peernet-0418c064.js';
3
3
  import './value-40634404.js';
4
4
 
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { F as FormatInterface } from './peernet-2796cdb2.js';
1
+ import { F as FormatInterface } from './peernet-0418c064.js';
2
2
  import './value-40634404.js';
3
3
 
4
4
  var proto$b = {
@@ -1389,27 +1389,26 @@ const codecs = [
1389
1389
  }
1390
1390
  ];
1391
1391
 
1392
- globalThis.peernet = globalThis.peernet || {};
1393
- globalThis.peernet.codecs = globalThis.peernet.codecs || {};
1392
+ globalThis.peernetCodecs = globalThis.peernetCodecs || {};
1394
1393
  const addCodec = (codecInput) => {
1395
1394
  let { hashAlg, codec, name } = codecInput;
1396
- if (!globalThis.peernet.codecs[name])
1397
- globalThis.peernet.codecs[name] = {
1395
+ if (!globalThis.peernetCodecs[name])
1396
+ globalThis.peernetCodecs[name] = {
1398
1397
  hashAlg,
1399
1398
  codec: parseInt(codec, 16)
1400
1399
  };
1401
1400
  };
1402
- const getCodec = (name) => globalThis.peernet.codecs[name];
1401
+ const getCodec = (name) => globalThis.peernetCodecs[name];
1403
1402
  const getCodecName = (codec) => {
1404
- return Object.keys(globalThis.peernet.codecs).reduce((p, c) => {
1405
- const item = globalThis.peernet.codecs[c];
1403
+ return Object.keys(globalThis.peernetCodecs).reduce((p, c) => {
1404
+ const item = globalThis.peernetCodecs[c];
1406
1405
  if (item.codec === codec)
1407
1406
  return c;
1408
1407
  else
1409
1408
  return p;
1410
1409
  }, undefined);
1411
1410
  };
1412
- const getCodecByName = (name) => globalThis.peernet.codecs[name];
1411
+ const getCodecByName = (name) => globalThis.peernetCodecs[name];
1413
1412
  const getHashAlg = (name) => {
1414
1413
  if (typeof name === 'number')
1415
1414
  return getCodecByName(getCodecName(name)).hashAlg;
@@ -1436,7 +1435,7 @@ var utils = {
1436
1435
  getHashAlg,
1437
1436
  getCodecName,
1438
1437
  validateCodec,
1439
- codecs: globalThis.peernet.codecs
1438
+ codecs: globalThis.peernetCodecs
1440
1439
  };
1441
1440
 
1442
1441
  /**
@@ -2147,7 +2146,7 @@ class MessageHandler {
2147
2146
  let identity = await walletStore.get('identity');
2148
2147
  identity = JSON.parse(identity);
2149
2148
  if (!globalThis.MultiWallet) {
2150
- const importee = await import(/* webpackChunkName: "multi-wallet" */ './index-7018cab6.js');
2149
+ const importee = await import(/* webpackChunkName: "multi-wallet" */ './index-b1a03d93.js');
2151
2150
  globalThis.MultiWallet = importee.default;
2152
2151
  }
2153
2152
  const wallet = new MultiWallet(this.network);
@@ -2473,7 +2472,7 @@ class Peernet {
2473
2472
  this.root = options.root;
2474
2473
  const { RequestMessage, ResponseMessage, PeerMessage, PeerMessageResponse, PeernetMessage, DHTMessage, DHTMessageResponse, DataMessage, DataMessageResponse, PsMessage, ChatMessage, PeernetFile
2475
2474
  // FolderMessageResponse
2476
- } = await import(/* webpackChunkName: "messages" */ './messages-452642e3.js');
2475
+ } = await import(/* webpackChunkName: "messages" */ './messages-bc8f619c.js');
2477
2476
  /**
2478
2477
  * proto Object containing protos
2479
2478
  * @type {Object}
@@ -2521,7 +2520,7 @@ class Peernet {
2521
2520
  }
2522
2521
  }
2523
2522
  else {
2524
- const importee = await import(/* webpackChunkName: "generate-account" */ './index-ddd5774f.js');
2523
+ const importee = await import(/* webpackChunkName: "generate-account" */ './index-d7584e0e.js');
2525
2524
  const generateAccount = importee.default;
2526
2525
  const { identity, accounts, config } = await generateAccount(this.network);
2527
2526
  // await accountStore.put('config', JSON.stringify(config));
@@ -2550,7 +2549,7 @@ class Peernet {
2550
2549
  * @see DataHandler
2551
2550
  */
2552
2551
  pubsub.subscribe('peer:data', dataHandler);
2553
- const importee = await import('./client-ed00c639.js');
2552
+ const importee = await import('./client-bcc5fcc2.js');
2554
2553
  /**
2555
2554
  * @access public
2556
2555
  * @type {PeernetClient}
@@ -1,2 +1,2 @@
1
- export { P as default } from './peernet-2796cdb2.js';
1
+ export { P as default } from './peernet-0418c064.js';
2
2
  import './value-40634404.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/peernet",
3
- "version": "0.18.2",
3
+ "version": "0.18.4",
4
4
  "description": "",
5
5
  "main": "src/peernet.js",
6
6
  "exports": {