@leofcoin/chain 1.7.96 → 1.7.98
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-BGaLaHk2-CA-9lfx-.js → client-BDXkFVRR-BZjYAtds.js} +1 -1
- package/exports/browser/{messages-BqTna7yM-sC5s4kYG.js → messages-DDEOxfJp-CggxH-2R.js} +1 -4
- package/exports/browser/{node-browser-DwZGtboN.js → node-browser-D0JliYju.js} +6 -11
- package/exports/browser/node-browser.js +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FormatInterface } from './node-browser-
|
|
1
|
+
import { F as FormatInterface } from './node-browser-D0JliYju.js';
|
|
2
2
|
import './identity-Cn0iQbY3-CeW0giQS.js';
|
|
3
3
|
import './index-DUfUgiQY.js';
|
|
4
4
|
|
|
@@ -50,9 +50,6 @@ var proto$9 = {
|
|
|
50
50
|
has: Boolean()
|
|
51
51
|
};
|
|
52
52
|
|
|
53
|
-
/**
|
|
54
|
-
* @extends typeof {FormatInterface}
|
|
55
|
-
*/
|
|
56
53
|
class DHTMessageResponse extends FormatInterface {
|
|
57
54
|
get messageName() {
|
|
58
55
|
return 'PeernetDHTMessageResponse'
|
|
@@ -8092,9 +8092,9 @@ const lastFetched = {
|
|
|
8092
8092
|
const fetchedCoordinates = {};
|
|
8093
8093
|
const getAddress = async () => {
|
|
8094
8094
|
const { address } = lastFetched;
|
|
8095
|
-
if (address) {
|
|
8096
|
-
|
|
8097
|
-
address.value = await
|
|
8095
|
+
if (!address) {
|
|
8096
|
+
const value = await fetch('https://icanhazip.com/');
|
|
8097
|
+
address.value = await value.text();
|
|
8098
8098
|
address.timestamp = Math.round(new Date().getTime() / 1000);
|
|
8099
8099
|
lastFetched.address = address;
|
|
8100
8100
|
}
|
|
@@ -8115,12 +8115,6 @@ const distanceInKmBetweenEarthCoordinates = (lat1, lon1, lat2, lon2) => {
|
|
|
8115
8115
|
};
|
|
8116
8116
|
class DhtEarth {
|
|
8117
8117
|
providerMap = new Map();
|
|
8118
|
-
/**
|
|
8119
|
-
*
|
|
8120
|
-
*/
|
|
8121
|
-
constructor() {
|
|
8122
|
-
this.providerMap = new Map();
|
|
8123
|
-
}
|
|
8124
8118
|
async getCoordinates(address) {
|
|
8125
8119
|
if (!fetchedCoordinates[address]) {
|
|
8126
8120
|
const request = `https://whereis.leofcoin.org/?ip=${address}`;
|
|
@@ -8492,11 +8486,12 @@ class Peernet {
|
|
|
8492
8486
|
* @return {Promise} instance of Peernet
|
|
8493
8487
|
*/
|
|
8494
8488
|
async _init(options, password) {
|
|
8489
|
+
await getAddress();
|
|
8495
8490
|
this.storePrefix = options.storePrefix;
|
|
8496
8491
|
this.root = options.root;
|
|
8497
8492
|
const { RequestMessage, ResponseMessage, PeerMessage, PeerMessageResponse, PeernetMessage, DHTMessage, DHTMessageResponse, DataMessage, DataMessageResponse, PsMessage, ChatMessage, PeernetFile
|
|
8498
8493
|
// FolderMessageResponse
|
|
8499
|
-
} = await import(/* webpackChunkName: "messages" */ './messages-
|
|
8494
|
+
} = await import(/* webpackChunkName: "messages" */ './messages-DDEOxfJp-CggxH-2R.js');
|
|
8500
8495
|
/**
|
|
8501
8496
|
* proto Object containing protos
|
|
8502
8497
|
* @type {Object}
|
|
@@ -8590,7 +8585,7 @@ class Peernet {
|
|
|
8590
8585
|
if (this.#starting || this.#started)
|
|
8591
8586
|
return;
|
|
8592
8587
|
this.#starting = true;
|
|
8593
|
-
const importee = await import('./client-
|
|
8588
|
+
const importee = await import('./client-BDXkFVRR-BZjYAtds.js');
|
|
8594
8589
|
/**
|
|
8595
8590
|
* @access public
|
|
8596
8591
|
* @type {PeernetClient}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leofcoin/chain",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.98",
|
|
4
4
|
"description": "Official javascript implementation",
|
|
5
5
|
"private": false,
|
|
6
6
|
"exports": {
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@leofcoin/messages": "^1.4.40",
|
|
70
70
|
"@leofcoin/multi-wallet": "^3.1.8",
|
|
71
71
|
"@leofcoin/networks": "^1.1.25",
|
|
72
|
-
"@leofcoin/peernet": "^1.1.
|
|
72
|
+
"@leofcoin/peernet": "^1.1.97",
|
|
73
73
|
"@leofcoin/storage": "^3.5.38",
|
|
74
74
|
"@leofcoin/utils": "^1.1.40",
|
|
75
75
|
"@leofcoin/workers": "^1.5.27",
|