@vocdoni/proto 1.15.3 → 1.15.5

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.
@@ -1201,7 +1201,11 @@ var require_reader = __commonJS({
1201
1201
  this.pos += length;
1202
1202
  if (Array.isArray(this.buf))
1203
1203
  return this.buf.slice(start, end);
1204
- return start === end ? new this.buf.constructor(0) : this._slice.call(this.buf, start, end);
1204
+ if (start === end) {
1205
+ var nativeBuffer = util.Buffer;
1206
+ return nativeBuffer ? nativeBuffer.alloc(0) : new this.buf.constructor(0);
1207
+ }
1208
+ return this._slice.call(this.buf, start, end);
1205
1209
  };
1206
1210
  Reader.prototype.string = function read_string() {
1207
1211
  var bytes = this.bytes();
@@ -1485,8 +1489,8 @@ var EntityReference = {
1485
1489
  },
1486
1490
  fromJSON(object) {
1487
1491
  return {
1488
- entityId: isSet(object.entityId) ? String(object.entityId) : "",
1489
- entryPoints: Array.isArray(object?.entryPoints) ? object.entryPoints.map((e) => String(e)) : []
1492
+ entityId: isSet(object.entityId) ? globalThis.String(object.entityId) : "",
1493
+ entryPoints: globalThis.Array.isArray(object?.entryPoints) ? object.entryPoints.map((e) => globalThis.String(e)) : []
1490
1494
  };
1491
1495
  },
1492
1496
  toJSON(message) {
@@ -1614,8 +1618,8 @@ var Wallet = {
1614
1618
  fromJSON(object) {
1615
1619
  return {
1616
1620
  encryptedMnemonic: isSet2(object.encryptedMnemonic) ? bytesFromBase64(object.encryptedMnemonic) : new Uint8Array(0),
1617
- hdPath: isSet2(object.hdPath) ? String(object.hdPath) : "",
1618
- locale: isSet2(object.locale) ? String(object.locale) : "",
1621
+ hdPath: isSet2(object.hdPath) ? globalThis.String(object.hdPath) : "",
1622
+ locale: isSet2(object.locale) ? globalThis.String(object.locale) : "",
1619
1623
  authMethod: isSet2(object.authMethod) ? wallet_AuthMethodFromJSON(object.authMethod) : 0
1620
1624
  };
1621
1625
  },
@@ -1647,26 +1651,11 @@ var Wallet = {
1647
1651
  return message;
1648
1652
  }
1649
1653
  };
1650
- var tsProtoGlobalThis = (() => {
1651
- if (typeof globalThis !== "undefined") {
1652
- return globalThis;
1653
- }
1654
- if (typeof self !== "undefined") {
1655
- return self;
1656
- }
1657
- if (typeof window !== "undefined") {
1658
- return window;
1659
- }
1660
- if (typeof global !== "undefined") {
1661
- return global;
1662
- }
1663
- throw "Unable to locate global object";
1664
- })();
1665
1654
  function bytesFromBase64(b64) {
1666
- if (tsProtoGlobalThis.Buffer) {
1667
- return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64"));
1655
+ if (globalThis.Buffer) {
1656
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
1668
1657
  } else {
1669
- const bin = tsProtoGlobalThis.atob(b64);
1658
+ const bin = globalThis.atob(b64);
1670
1659
  const arr = new Uint8Array(bin.length);
1671
1660
  for (let i = 0; i < bin.length; ++i) {
1672
1661
  arr[i] = bin.charCodeAt(i);
@@ -1675,14 +1664,14 @@ function bytesFromBase64(b64) {
1675
1664
  }
1676
1665
  }
1677
1666
  function base64FromBytes(arr) {
1678
- if (tsProtoGlobalThis.Buffer) {
1679
- return tsProtoGlobalThis.Buffer.from(arr).toString("base64");
1667
+ if (globalThis.Buffer) {
1668
+ return globalThis.Buffer.from(arr).toString("base64");
1680
1669
  } else {
1681
1670
  const bin = [];
1682
1671
  arr.forEach((byte) => {
1683
- bin.push(String.fromCharCode(byte));
1672
+ bin.push(globalThis.String.fromCharCode(byte));
1684
1673
  });
1685
- return tsProtoGlobalThis.btoa(bin.join(""));
1674
+ return globalThis.btoa(bin.join(""));
1686
1675
  }
1687
1676
  }
1688
1677
  function isSet2(value) {
@@ -1722,7 +1711,7 @@ var AccountsStore = {
1722
1711
  return message;
1723
1712
  },
1724
1713
  fromJSON(object) {
1725
- return { items: Array.isArray(object?.items) ? object.items.map((e) => Account.fromJSON(e)) : [] };
1714
+ return { items: globalThis.Array.isArray(object?.items) ? object.items.map((e) => Account.fromJSON(e)) : [] };
1726
1715
  },
1727
1716
  toJSON(message) {
1728
1717
  const obj = {};
@@ -1821,10 +1810,10 @@ var Account = {
1821
1810
  },
1822
1811
  fromJSON(object) {
1823
1812
  return {
1824
- name: isSet3(object.name) ? String(object.name) : "",
1813
+ name: isSet3(object.name) ? globalThis.String(object.name) : "",
1825
1814
  wallet: isSet3(object.wallet) ? Wallet.fromJSON(object.wallet) : void 0,
1826
- address: isSet3(object.address) ? String(object.address) : "",
1827
- hasBackup: isSet3(object.hasBackup) ? Boolean(object.hasBackup) : false,
1815
+ address: isSet3(object.address) ? globalThis.String(object.address) : "",
1816
+ hasBackup: isSet3(object.hasBackup) ? globalThis.Boolean(object.hasBackup) : false,
1828
1817
  extra: isSet3(object.extra) ? Account_Extra.fromJSON(object.extra) : void 0,
1829
1818
  meta: isObject(object.meta) ? Object.entries(object.meta).reduce((acc, [key, value]) => {
1830
1819
  acc[key] = String(value);
@@ -1872,7 +1861,7 @@ var Account = {
1872
1861
  message.extra = object.extra !== void 0 && object.extra !== null ? Account_Extra.fromPartial(object.extra) : void 0;
1873
1862
  message.meta = Object.entries(object.meta ?? {}).reduce((acc, [key, value]) => {
1874
1863
  if (value !== void 0) {
1875
- acc[key] = String(value);
1864
+ acc[key] = globalThis.String(value);
1876
1865
  }
1877
1866
  return acc;
1878
1867
  }, {});
@@ -1921,8 +1910,8 @@ var Account_AppVoter = {
1921
1910
  },
1922
1911
  fromJSON(object) {
1923
1912
  return {
1924
- appAnalyticsID: isSet3(object.appAnalyticsID) ? String(object.appAnalyticsID) : "",
1925
- entities: Array.isArray(object?.entities) ? object.entities.map((e) => EntityReference.fromJSON(e)) : []
1913
+ appAnalyticsID: isSet3(object.appAnalyticsID) ? globalThis.String(object.appAnalyticsID) : "",
1914
+ entities: globalThis.Array.isArray(object?.entities) ? object.entities.map((e) => EntityReference.fromJSON(e)) : []
1926
1915
  };
1927
1916
  },
1928
1917
  toJSON(message) {
@@ -1977,7 +1966,7 @@ var Account_WebEntity = {
1977
1966
  return message;
1978
1967
  },
1979
1968
  fromJSON(object) {
1980
- return { webAnalyticsID: isSet3(object.webAnalyticsID) ? String(object.webAnalyticsID) : "" };
1969
+ return { webAnalyticsID: isSet3(object.webAnalyticsID) ? globalThis.String(object.webAnalyticsID) : "" };
1981
1970
  },
1982
1971
  toJSON(message) {
1983
1972
  const obj = {};
@@ -2107,7 +2096,10 @@ var Account_MetaEntry = {
2107
2096
  return message;
2108
2097
  },
2109
2098
  fromJSON(object) {
2110
- return { key: isSet3(object.key) ? String(object.key) : "", value: isSet3(object.value) ? String(object.value) : "" };
2099
+ return {
2100
+ key: isSet3(object.key) ? globalThis.String(object.key) : "",
2101
+ value: isSet3(object.value) ? globalThis.String(object.value) : ""
2102
+ };
2111
2103
  },
2112
2104
  toJSON(message) {
2113
2105
  const obj = {};
@@ -2340,8 +2332,8 @@ var WalletBackup = {
2340
2332
  },
2341
2333
  fromJSON(object) {
2342
2334
  return {
2343
- name: isSet4(object.name) ? String(object.name) : "",
2344
- timestamp: isSet4(object.timestamp) ? Number(object.timestamp) : 0,
2335
+ name: isSet4(object.name) ? globalThis.String(object.name) : "",
2336
+ timestamp: isSet4(object.timestamp) ? globalThis.Number(object.timestamp) : 0,
2345
2337
  wallet: isSet4(object.wallet) ? Wallet.fromJSON(object.wallet) : void 0,
2346
2338
  passphraseRecovery: isSet4(object.passphraseRecovery) ? WalletBackup_Recovery.fromJSON(object.passphraseRecovery) : void 0
2347
2339
  };
@@ -2425,7 +2417,7 @@ var WalletBackup_Recovery = {
2425
2417
  },
2426
2418
  fromJSON(object) {
2427
2419
  return {
2428
- questionIds: Array.isArray(object?.questionIds) ? object.questionIds.map((e) => walletBackup_Recovery_QuestionEnumFromJSON(e)) : [],
2420
+ questionIds: globalThis.Array.isArray(object?.questionIds) ? object.questionIds.map((e) => walletBackup_Recovery_QuestionEnumFromJSON(e)) : [],
2429
2421
  encryptedPassphrase: isSet4(object.encryptedPassphrase) ? bytesFromBase642(object.encryptedPassphrase) : new Uint8Array(0)
2430
2422
  };
2431
2423
  },
@@ -2449,26 +2441,11 @@ var WalletBackup_Recovery = {
2449
2441
  return message;
2450
2442
  }
2451
2443
  };
2452
- var tsProtoGlobalThis2 = (() => {
2453
- if (typeof globalThis !== "undefined") {
2454
- return globalThis;
2455
- }
2456
- if (typeof self !== "undefined") {
2457
- return self;
2458
- }
2459
- if (typeof window !== "undefined") {
2460
- return window;
2461
- }
2462
- if (typeof global !== "undefined") {
2463
- return global;
2464
- }
2465
- throw "Unable to locate global object";
2466
- })();
2467
2444
  function bytesFromBase642(b64) {
2468
- if (tsProtoGlobalThis2.Buffer) {
2469
- return Uint8Array.from(tsProtoGlobalThis2.Buffer.from(b64, "base64"));
2445
+ if (globalThis.Buffer) {
2446
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
2470
2447
  } else {
2471
- const bin = tsProtoGlobalThis2.atob(b64);
2448
+ const bin = globalThis.atob(b64);
2472
2449
  const arr = new Uint8Array(bin.length);
2473
2450
  for (let i = 0; i < bin.length; ++i) {
2474
2451
  arr[i] = bin.charCodeAt(i);
@@ -2477,19 +2454,19 @@ function bytesFromBase642(b64) {
2477
2454
  }
2478
2455
  }
2479
2456
  function base64FromBytes2(arr) {
2480
- if (tsProtoGlobalThis2.Buffer) {
2481
- return tsProtoGlobalThis2.Buffer.from(arr).toString("base64");
2457
+ if (globalThis.Buffer) {
2458
+ return globalThis.Buffer.from(arr).toString("base64");
2482
2459
  } else {
2483
2460
  const bin = [];
2484
2461
  arr.forEach((byte) => {
2485
- bin.push(String.fromCharCode(byte));
2462
+ bin.push(globalThis.String.fromCharCode(byte));
2486
2463
  });
2487
- return tsProtoGlobalThis2.btoa(bin.join(""));
2464
+ return globalThis.btoa(bin.join(""));
2488
2465
  }
2489
2466
  }
2490
2467
  function longToNumber(long) {
2491
- if (long.gt(Number.MAX_SAFE_INTEGER)) {
2492
- throw new tsProtoGlobalThis2.Error("Value is larger than Number.MAX_SAFE_INTEGER");
2468
+ if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
2469
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
2493
2470
  }
2494
2471
  return long.toNumber();
2495
2472
  }
@@ -2643,7 +2620,7 @@ var BootNodeGateways = {
2643
2620
  message.rinkeby = object.rinkeby !== void 0 && object.rinkeby !== null ? BootNodeGateways_NetworkNodes.fromPartial(object.rinkeby) : void 0;
2644
2621
  message.meta = Object.entries(object.meta ?? {}).reduce((acc, [key, value]) => {
2645
2622
  if (value !== void 0) {
2646
- acc[key] = String(value);
2623
+ acc[key] = globalThis.String(value);
2647
2624
  }
2648
2625
  return acc;
2649
2626
  }, {});
@@ -2692,8 +2669,8 @@ var BootNodeGateways_NetworkNodes = {
2692
2669
  },
2693
2670
  fromJSON(object) {
2694
2671
  return {
2695
- dvote: Array.isArray(object?.dvote) ? object.dvote.map((e) => BootNodeGateways_NetworkNodes_DVote.fromJSON(e)) : [],
2696
- web3: Array.isArray(object?.web3) ? object.web3.map((e) => BootNodeGateways_NetworkNodes_Web3.fromJSON(e)) : []
2672
+ dvote: globalThis.Array.isArray(object?.dvote) ? object.dvote.map((e) => BootNodeGateways_NetworkNodes_DVote.fromJSON(e)) : [],
2673
+ web3: globalThis.Array.isArray(object?.web3) ? object.web3.map((e) => BootNodeGateways_NetworkNodes_Web3.fromJSON(e)) : []
2697
2674
  };
2698
2675
  },
2699
2676
  toJSON(message) {
@@ -2767,9 +2744,9 @@ var BootNodeGateways_NetworkNodes_DVote = {
2767
2744
  },
2768
2745
  fromJSON(object) {
2769
2746
  return {
2770
- uri: isSet5(object.uri) ? String(object.uri) : "",
2771
- apis: Array.isArray(object?.apis) ? object.apis.map((e) => String(e)) : [],
2772
- pubKey: isSet5(object.pubKey) ? String(object.pubKey) : ""
2747
+ uri: isSet5(object.uri) ? globalThis.String(object.uri) : "",
2748
+ apis: globalThis.Array.isArray(object?.apis) ? object.apis.map((e) => globalThis.String(e)) : [],
2749
+ pubKey: isSet5(object.pubKey) ? globalThis.String(object.pubKey) : ""
2773
2750
  };
2774
2751
  },
2775
2752
  toJSON(message) {
@@ -2828,7 +2805,7 @@ var BootNodeGateways_NetworkNodes_Web3 = {
2828
2805
  return message;
2829
2806
  },
2830
2807
  fromJSON(object) {
2831
- return { uri: isSet5(object.uri) ? String(object.uri) : "" };
2808
+ return { uri: isSet5(object.uri) ? globalThis.String(object.uri) : "" };
2832
2809
  },
2833
2810
  toJSON(message) {
2834
2811
  const obj = {};
@@ -2887,7 +2864,10 @@ var BootNodeGateways_MetaEntry = {
2887
2864
  return message;
2888
2865
  },
2889
2866
  fromJSON(object) {
2890
- return { key: isSet5(object.key) ? String(object.key) : "", value: isSet5(object.value) ? String(object.value) : "" };
2867
+ return {
2868
+ key: isSet5(object.key) ? globalThis.String(object.key) : "",
2869
+ value: isSet5(object.value) ? globalThis.String(object.value) : ""
2870
+ };
2891
2871
  },
2892
2872
  toJSON(message) {
2893
2873
  const obj = {};
@@ -1199,7 +1199,11 @@ var require_reader = __commonJS({
1199
1199
  this.pos += length;
1200
1200
  if (Array.isArray(this.buf))
1201
1201
  return this.buf.slice(start, end);
1202
- return start === end ? new this.buf.constructor(0) : this._slice.call(this.buf, start, end);
1202
+ if (start === end) {
1203
+ var nativeBuffer = util.Buffer;
1204
+ return nativeBuffer ? nativeBuffer.alloc(0) : new this.buf.constructor(0);
1205
+ }
1206
+ return this._slice.call(this.buf, start, end);
1203
1207
  };
1204
1208
  Reader.prototype.string = function read_string() {
1205
1209
  var bytes = this.bytes();
@@ -1473,8 +1477,8 @@ var EntityReference = {
1473
1477
  },
1474
1478
  fromJSON(object) {
1475
1479
  return {
1476
- entityId: isSet(object.entityId) ? String(object.entityId) : "",
1477
- entryPoints: Array.isArray(object?.entryPoints) ? object.entryPoints.map((e) => String(e)) : []
1480
+ entityId: isSet(object.entityId) ? globalThis.String(object.entityId) : "",
1481
+ entryPoints: globalThis.Array.isArray(object?.entryPoints) ? object.entryPoints.map((e) => globalThis.String(e)) : []
1478
1482
  };
1479
1483
  },
1480
1484
  toJSON(message) {
@@ -1602,8 +1606,8 @@ var Wallet = {
1602
1606
  fromJSON(object) {
1603
1607
  return {
1604
1608
  encryptedMnemonic: isSet2(object.encryptedMnemonic) ? bytesFromBase64(object.encryptedMnemonic) : new Uint8Array(0),
1605
- hdPath: isSet2(object.hdPath) ? String(object.hdPath) : "",
1606
- locale: isSet2(object.locale) ? String(object.locale) : "",
1609
+ hdPath: isSet2(object.hdPath) ? globalThis.String(object.hdPath) : "",
1610
+ locale: isSet2(object.locale) ? globalThis.String(object.locale) : "",
1607
1611
  authMethod: isSet2(object.authMethod) ? wallet_AuthMethodFromJSON(object.authMethod) : 0
1608
1612
  };
1609
1613
  },
@@ -1635,26 +1639,11 @@ var Wallet = {
1635
1639
  return message;
1636
1640
  }
1637
1641
  };
1638
- var tsProtoGlobalThis = (() => {
1639
- if (typeof globalThis !== "undefined") {
1640
- return globalThis;
1641
- }
1642
- if (typeof self !== "undefined") {
1643
- return self;
1644
- }
1645
- if (typeof window !== "undefined") {
1646
- return window;
1647
- }
1648
- if (typeof global !== "undefined") {
1649
- return global;
1650
- }
1651
- throw "Unable to locate global object";
1652
- })();
1653
1642
  function bytesFromBase64(b64) {
1654
- if (tsProtoGlobalThis.Buffer) {
1655
- return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64"));
1643
+ if (globalThis.Buffer) {
1644
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
1656
1645
  } else {
1657
- const bin = tsProtoGlobalThis.atob(b64);
1646
+ const bin = globalThis.atob(b64);
1658
1647
  const arr = new Uint8Array(bin.length);
1659
1648
  for (let i = 0; i < bin.length; ++i) {
1660
1649
  arr[i] = bin.charCodeAt(i);
@@ -1663,14 +1652,14 @@ function bytesFromBase64(b64) {
1663
1652
  }
1664
1653
  }
1665
1654
  function base64FromBytes(arr) {
1666
- if (tsProtoGlobalThis.Buffer) {
1667
- return tsProtoGlobalThis.Buffer.from(arr).toString("base64");
1655
+ if (globalThis.Buffer) {
1656
+ return globalThis.Buffer.from(arr).toString("base64");
1668
1657
  } else {
1669
1658
  const bin = [];
1670
1659
  arr.forEach((byte) => {
1671
- bin.push(String.fromCharCode(byte));
1660
+ bin.push(globalThis.String.fromCharCode(byte));
1672
1661
  });
1673
- return tsProtoGlobalThis.btoa(bin.join(""));
1662
+ return globalThis.btoa(bin.join(""));
1674
1663
  }
1675
1664
  }
1676
1665
  function isSet2(value) {
@@ -1710,7 +1699,7 @@ var AccountsStore = {
1710
1699
  return message;
1711
1700
  },
1712
1701
  fromJSON(object) {
1713
- return { items: Array.isArray(object?.items) ? object.items.map((e) => Account.fromJSON(e)) : [] };
1702
+ return { items: globalThis.Array.isArray(object?.items) ? object.items.map((e) => Account.fromJSON(e)) : [] };
1714
1703
  },
1715
1704
  toJSON(message) {
1716
1705
  const obj = {};
@@ -1809,10 +1798,10 @@ var Account = {
1809
1798
  },
1810
1799
  fromJSON(object) {
1811
1800
  return {
1812
- name: isSet3(object.name) ? String(object.name) : "",
1801
+ name: isSet3(object.name) ? globalThis.String(object.name) : "",
1813
1802
  wallet: isSet3(object.wallet) ? Wallet.fromJSON(object.wallet) : void 0,
1814
- address: isSet3(object.address) ? String(object.address) : "",
1815
- hasBackup: isSet3(object.hasBackup) ? Boolean(object.hasBackup) : false,
1803
+ address: isSet3(object.address) ? globalThis.String(object.address) : "",
1804
+ hasBackup: isSet3(object.hasBackup) ? globalThis.Boolean(object.hasBackup) : false,
1816
1805
  extra: isSet3(object.extra) ? Account_Extra.fromJSON(object.extra) : void 0,
1817
1806
  meta: isObject(object.meta) ? Object.entries(object.meta).reduce((acc, [key, value]) => {
1818
1807
  acc[key] = String(value);
@@ -1860,7 +1849,7 @@ var Account = {
1860
1849
  message.extra = object.extra !== void 0 && object.extra !== null ? Account_Extra.fromPartial(object.extra) : void 0;
1861
1850
  message.meta = Object.entries(object.meta ?? {}).reduce((acc, [key, value]) => {
1862
1851
  if (value !== void 0) {
1863
- acc[key] = String(value);
1852
+ acc[key] = globalThis.String(value);
1864
1853
  }
1865
1854
  return acc;
1866
1855
  }, {});
@@ -1909,8 +1898,8 @@ var Account_AppVoter = {
1909
1898
  },
1910
1899
  fromJSON(object) {
1911
1900
  return {
1912
- appAnalyticsID: isSet3(object.appAnalyticsID) ? String(object.appAnalyticsID) : "",
1913
- entities: Array.isArray(object?.entities) ? object.entities.map((e) => EntityReference.fromJSON(e)) : []
1901
+ appAnalyticsID: isSet3(object.appAnalyticsID) ? globalThis.String(object.appAnalyticsID) : "",
1902
+ entities: globalThis.Array.isArray(object?.entities) ? object.entities.map((e) => EntityReference.fromJSON(e)) : []
1914
1903
  };
1915
1904
  },
1916
1905
  toJSON(message) {
@@ -1965,7 +1954,7 @@ var Account_WebEntity = {
1965
1954
  return message;
1966
1955
  },
1967
1956
  fromJSON(object) {
1968
- return { webAnalyticsID: isSet3(object.webAnalyticsID) ? String(object.webAnalyticsID) : "" };
1957
+ return { webAnalyticsID: isSet3(object.webAnalyticsID) ? globalThis.String(object.webAnalyticsID) : "" };
1969
1958
  },
1970
1959
  toJSON(message) {
1971
1960
  const obj = {};
@@ -2095,7 +2084,10 @@ var Account_MetaEntry = {
2095
2084
  return message;
2096
2085
  },
2097
2086
  fromJSON(object) {
2098
- return { key: isSet3(object.key) ? String(object.key) : "", value: isSet3(object.value) ? String(object.value) : "" };
2087
+ return {
2088
+ key: isSet3(object.key) ? globalThis.String(object.key) : "",
2089
+ value: isSet3(object.value) ? globalThis.String(object.value) : ""
2090
+ };
2099
2091
  },
2100
2092
  toJSON(message) {
2101
2093
  const obj = {};
@@ -2328,8 +2320,8 @@ var WalletBackup = {
2328
2320
  },
2329
2321
  fromJSON(object) {
2330
2322
  return {
2331
- name: isSet4(object.name) ? String(object.name) : "",
2332
- timestamp: isSet4(object.timestamp) ? Number(object.timestamp) : 0,
2323
+ name: isSet4(object.name) ? globalThis.String(object.name) : "",
2324
+ timestamp: isSet4(object.timestamp) ? globalThis.Number(object.timestamp) : 0,
2333
2325
  wallet: isSet4(object.wallet) ? Wallet.fromJSON(object.wallet) : void 0,
2334
2326
  passphraseRecovery: isSet4(object.passphraseRecovery) ? WalletBackup_Recovery.fromJSON(object.passphraseRecovery) : void 0
2335
2327
  };
@@ -2413,7 +2405,7 @@ var WalletBackup_Recovery = {
2413
2405
  },
2414
2406
  fromJSON(object) {
2415
2407
  return {
2416
- questionIds: Array.isArray(object?.questionIds) ? object.questionIds.map((e) => walletBackup_Recovery_QuestionEnumFromJSON(e)) : [],
2408
+ questionIds: globalThis.Array.isArray(object?.questionIds) ? object.questionIds.map((e) => walletBackup_Recovery_QuestionEnumFromJSON(e)) : [],
2417
2409
  encryptedPassphrase: isSet4(object.encryptedPassphrase) ? bytesFromBase642(object.encryptedPassphrase) : new Uint8Array(0)
2418
2410
  };
2419
2411
  },
@@ -2437,26 +2429,11 @@ var WalletBackup_Recovery = {
2437
2429
  return message;
2438
2430
  }
2439
2431
  };
2440
- var tsProtoGlobalThis2 = (() => {
2441
- if (typeof globalThis !== "undefined") {
2442
- return globalThis;
2443
- }
2444
- if (typeof self !== "undefined") {
2445
- return self;
2446
- }
2447
- if (typeof window !== "undefined") {
2448
- return window;
2449
- }
2450
- if (typeof global !== "undefined") {
2451
- return global;
2452
- }
2453
- throw "Unable to locate global object";
2454
- })();
2455
2432
  function bytesFromBase642(b64) {
2456
- if (tsProtoGlobalThis2.Buffer) {
2457
- return Uint8Array.from(tsProtoGlobalThis2.Buffer.from(b64, "base64"));
2433
+ if (globalThis.Buffer) {
2434
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
2458
2435
  } else {
2459
- const bin = tsProtoGlobalThis2.atob(b64);
2436
+ const bin = globalThis.atob(b64);
2460
2437
  const arr = new Uint8Array(bin.length);
2461
2438
  for (let i = 0; i < bin.length; ++i) {
2462
2439
  arr[i] = bin.charCodeAt(i);
@@ -2465,19 +2442,19 @@ function bytesFromBase642(b64) {
2465
2442
  }
2466
2443
  }
2467
2444
  function base64FromBytes2(arr) {
2468
- if (tsProtoGlobalThis2.Buffer) {
2469
- return tsProtoGlobalThis2.Buffer.from(arr).toString("base64");
2445
+ if (globalThis.Buffer) {
2446
+ return globalThis.Buffer.from(arr).toString("base64");
2470
2447
  } else {
2471
2448
  const bin = [];
2472
2449
  arr.forEach((byte) => {
2473
- bin.push(String.fromCharCode(byte));
2450
+ bin.push(globalThis.String.fromCharCode(byte));
2474
2451
  });
2475
- return tsProtoGlobalThis2.btoa(bin.join(""));
2452
+ return globalThis.btoa(bin.join(""));
2476
2453
  }
2477
2454
  }
2478
2455
  function longToNumber(long) {
2479
- if (long.gt(Number.MAX_SAFE_INTEGER)) {
2480
- throw new tsProtoGlobalThis2.Error("Value is larger than Number.MAX_SAFE_INTEGER");
2456
+ if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
2457
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
2481
2458
  }
2482
2459
  return long.toNumber();
2483
2460
  }
@@ -2631,7 +2608,7 @@ var BootNodeGateways = {
2631
2608
  message.rinkeby = object.rinkeby !== void 0 && object.rinkeby !== null ? BootNodeGateways_NetworkNodes.fromPartial(object.rinkeby) : void 0;
2632
2609
  message.meta = Object.entries(object.meta ?? {}).reduce((acc, [key, value]) => {
2633
2610
  if (value !== void 0) {
2634
- acc[key] = String(value);
2611
+ acc[key] = globalThis.String(value);
2635
2612
  }
2636
2613
  return acc;
2637
2614
  }, {});
@@ -2680,8 +2657,8 @@ var BootNodeGateways_NetworkNodes = {
2680
2657
  },
2681
2658
  fromJSON(object) {
2682
2659
  return {
2683
- dvote: Array.isArray(object?.dvote) ? object.dvote.map((e) => BootNodeGateways_NetworkNodes_DVote.fromJSON(e)) : [],
2684
- web3: Array.isArray(object?.web3) ? object.web3.map((e) => BootNodeGateways_NetworkNodes_Web3.fromJSON(e)) : []
2660
+ dvote: globalThis.Array.isArray(object?.dvote) ? object.dvote.map((e) => BootNodeGateways_NetworkNodes_DVote.fromJSON(e)) : [],
2661
+ web3: globalThis.Array.isArray(object?.web3) ? object.web3.map((e) => BootNodeGateways_NetworkNodes_Web3.fromJSON(e)) : []
2685
2662
  };
2686
2663
  },
2687
2664
  toJSON(message) {
@@ -2755,9 +2732,9 @@ var BootNodeGateways_NetworkNodes_DVote = {
2755
2732
  },
2756
2733
  fromJSON(object) {
2757
2734
  return {
2758
- uri: isSet5(object.uri) ? String(object.uri) : "",
2759
- apis: Array.isArray(object?.apis) ? object.apis.map((e) => String(e)) : [],
2760
- pubKey: isSet5(object.pubKey) ? String(object.pubKey) : ""
2735
+ uri: isSet5(object.uri) ? globalThis.String(object.uri) : "",
2736
+ apis: globalThis.Array.isArray(object?.apis) ? object.apis.map((e) => globalThis.String(e)) : [],
2737
+ pubKey: isSet5(object.pubKey) ? globalThis.String(object.pubKey) : ""
2761
2738
  };
2762
2739
  },
2763
2740
  toJSON(message) {
@@ -2816,7 +2793,7 @@ var BootNodeGateways_NetworkNodes_Web3 = {
2816
2793
  return message;
2817
2794
  },
2818
2795
  fromJSON(object) {
2819
- return { uri: isSet5(object.uri) ? String(object.uri) : "" };
2796
+ return { uri: isSet5(object.uri) ? globalThis.String(object.uri) : "" };
2820
2797
  },
2821
2798
  toJSON(message) {
2822
2799
  const obj = {};
@@ -2875,7 +2852,10 @@ var BootNodeGateways_MetaEntry = {
2875
2852
  return message;
2876
2853
  },
2877
2854
  fromJSON(object) {
2878
- return { key: isSet5(object.key) ? String(object.key) : "", value: isSet5(object.value) ? String(object.value) : "" };
2855
+ return {
2856
+ key: isSet5(object.key) ? globalThis.String(object.key) : "",
2857
+ value: isSet5(object.value) ? globalThis.String(object.value) : ""
2858
+ };
2879
2859
  },
2880
2860
  toJSON(message) {
2881
2861
  const obj = {};