@leofcoin/peernet 1.1.78 → 1.1.80

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.
@@ -8,7 +8,7 @@ export default class Identity {
8
8
  get accounts(): Promise<[[name: string, externalAddress: string, internalAddress: string]]>;
9
9
  getAccounts(): Promise<[[name: string, externalAddress: string, internalAddress: string]]>;
10
10
  load(password?: string): Promise<void>;
11
- selectAccount(account: string): Promise<void> | Promise<any[]>;
11
+ selectAccount(account: string): Promise<unknown>;
12
12
  sign(hash: Uint8Array): any;
13
13
  lock(password: string): void;
14
14
  unlock(password: string): void;
@@ -0,0 +1 @@
1
+ export { I as default } from './identity-CQ_ieRiz.js';
@@ -1,5 +1,4 @@
1
- import { M as MultiWallet, e as encrypt, b as base58$1 } from './peernet-x3p3hKA5.js';
2
- import './value-wzPYMxsX.js';
1
+ import { M as MultiWallet, h as encrypt, a as base58$1 } from './identity-CQ_ieRiz.js';
3
2
 
4
3
  /**
5
4
  * @params {String} network
@@ -1,4 +1,4 @@
1
- import { c as commonjsGlobal, r as require$$3, i as inherits_browserExports, g as getDefaultExportFromCjs } from './peernet-x3p3hKA5.js';
1
+ import { c as commonjsGlobal, r as require$$3, j as inherits_browserExports, g as getDefaultExportFromCjs } from './identity-CQ_ieRiz.js';
2
2
 
3
3
  var browser$2 = {exports: {}};
4
4
 
@@ -2880,15 +2880,13 @@ ieee754.write = function (buffer, value, offset, isLE, mLen, nBytes) {
2880
2880
  if (value > max || value < min) {
2881
2881
  const n = typeof min === 'bigint' ? 'n' : '';
2882
2882
  let range;
2883
- if (byteLength > 3) {
2883
+ {
2884
2884
  if (min === 0 || min === BigInt(0)) {
2885
2885
  range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`;
2886
2886
  } else {
2887
2887
  range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +
2888
2888
  `${(byteLength + 1) * 8 - 1}${n}`;
2889
2889
  }
2890
- } else {
2891
- range = `>= ${min}${n} and <= ${max}${n}`;
2892
2890
  }
2893
2891
  throw new errors.ERR_OUT_OF_RANGE('value', range, value)
2894
2892
  }
@@ -2904,15 +2902,15 @@ ieee754.write = function (buffer, value, offset, isLE, mLen, nBytes) {
2904
2902
  function boundsError (value, length, type) {
2905
2903
  if (Math.floor(value) !== value) {
2906
2904
  validateNumber(value, type);
2907
- throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)
2905
+ throw new errors.ERR_OUT_OF_RANGE('offset', 'an integer', value)
2908
2906
  }
2909
2907
 
2910
2908
  if (length < 0) {
2911
2909
  throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()
2912
2910
  }
2913
2911
 
2914
- throw new errors.ERR_OUT_OF_RANGE(type || 'offset',
2915
- `>= ${type ? 1 : 0} and <= ${length}`,
2912
+ throw new errors.ERR_OUT_OF_RANGE('offset',
2913
+ `>= ${0} and <= ${length}`,
2916
2914
  value)
2917
2915
  }
2918
2916
 
@@ -3720,7 +3718,7 @@ function requireBuffer_list () {
3720
3718
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3721
3719
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3722
3720
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3723
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
3721
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
3724
3722
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3725
3723
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
3726
3724
  var _require = buffer,
@@ -4052,7 +4050,7 @@ function oneOf(expected, thing) {
4052
4050
 
4053
4051
 
4054
4052
  function startsWith(str, search, pos) {
4055
- return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;
4053
+ return str.substr(0 , search.length) === search;
4056
4054
  } // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith
4057
4055
 
4058
4056
 
@@ -1,5 +1,6 @@
1
- import { F as FormatInterface } from './peernet-x3p3hKA5.js';
2
- import './value-wzPYMxsX.js';
1
+ import { F as FormatInterface } from './peernet-B7TZP-Wg.js';
2
+ import './identity-CQ_ieRiz.js';
3
+ import './value-C3vAp-wb.js';
3
4
 
4
5
  var proto$b = {
5
6
  data: new Uint8Array(),