@leofcoin/chain 1.7.138 → 1.7.141
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/chain.js +16 -29
- package/exports/browser/{client-Lwke64Zq-DO2uqAHA.js → client-q0JXZnpu-ChkF_Pn_.js} +1 -1
- package/exports/browser/{messages-C22qRxnF-tW3z5FMF.js → messages-CC7UR5ol-BvFNyHjv.js} +1 -1
- package/exports/browser/{node-browser-C5GuLP_b.js → node-browser-SPIwS-5O.js} +3 -3
- package/exports/browser/node-browser.js +1 -1
- package/exports/chain.d.ts +0 -1
- package/exports/chain.js +2 -2
- package/package.json +4 -4
package/exports/browser/chain.js
CHANGED
|
@@ -1,40 +1,27 @@
|
|
|
1
1
|
import { t as toBase58, T as TransactionMessage, C as ContractMessage, R as RawTransactionMessage, B as BlockMessage, a as BWMessage, b as BWRequestMessage } from './index-DUfUgiQY.js';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
if (globalThis.localStorage) {
|
|
3
|
+
let TARGETS = undefined;
|
|
4
|
+
if (globalThis.localStorage && !TARGETS) {
|
|
6
5
|
const DEBUG = globalThis.localStorage.getItem("DEBUG");
|
|
7
6
|
if (DEBUG) {
|
|
8
|
-
|
|
9
|
-
? JSON.parse(DEBUG).split(",")
|
|
10
|
-
: [DEBUG];
|
|
7
|
+
TARGETS = JSON.parse(DEBUG);
|
|
11
8
|
}
|
|
12
|
-
}
|
|
13
9
|
}
|
|
14
|
-
|
|
15
10
|
const getLogger = (trace) => (trace ? console.trace : console.log);
|
|
16
|
-
|
|
17
11
|
const debug$3 = (target, text, trace) => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
12
|
+
const _logger = getLogger(trace);
|
|
13
|
+
if (!TARGETS)
|
|
14
|
+
return;
|
|
15
|
+
if (TARGETS === true ||
|
|
16
|
+
TARGETS?.indexOf(target) !== -1 ||
|
|
17
|
+
TARGETS?.indexOf("*") !== -1 ||
|
|
18
|
+
TARGETS?.indexOf(target.split("/")[0]) !== -1)
|
|
19
|
+
if (text)
|
|
20
|
+
_logger("\x1b[34m\x1b[1m%s", `${target}: ${text}`, "\x1b[0m");
|
|
21
|
+
else
|
|
22
|
+
_logger("\x1b[34m\x1b[1m%s", `${target}`, "\x1b[0m");
|
|
29
23
|
};
|
|
30
|
-
|
|
31
|
-
const createDebugger = (target) => (text) => debug$3(target, text);
|
|
32
|
-
|
|
33
|
-
if (!globalThis.debug) {
|
|
34
|
-
globalThis.debug = debug$3;
|
|
35
|
-
// todo: deprecate
|
|
36
|
-
globalThis.createDebugger = createDebugger;
|
|
37
|
-
}
|
|
24
|
+
const createDebugger = (target) => (text, trace) => debug$3(target, text, trace);
|
|
38
25
|
|
|
39
26
|
/* Do NOT modify this file; see /src.ts/_admin/update-version.ts */
|
|
40
27
|
/**
|
|
@@ -5715,7 +5702,7 @@ class ConnectionMonitor {
|
|
|
5715
5702
|
}
|
|
5716
5703
|
}
|
|
5717
5704
|
|
|
5718
|
-
const debug =
|
|
5705
|
+
const debug = createDebugger('leofcoin/chain');
|
|
5719
5706
|
// check if browser or local
|
|
5720
5707
|
class Chain extends VersionControl {
|
|
5721
5708
|
#state;
|
|
@@ -8347,7 +8347,7 @@ globalThis.LeofcoinStorage = LeofcoinStorage$1;
|
|
|
8347
8347
|
globalThis.leofcoin = globalThis.leofcoin || {};
|
|
8348
8348
|
globalThis.pubsub = globalThis.pubsub || new LittlePubSub();
|
|
8349
8349
|
globalThis.globalSub = globalThis.globalSub || new LittlePubSub();
|
|
8350
|
-
const debug =
|
|
8350
|
+
const debug = createDebugger('peernet');
|
|
8351
8351
|
/**
|
|
8352
8352
|
* @access public
|
|
8353
8353
|
* @example
|
|
@@ -8491,7 +8491,7 @@ class Peernet {
|
|
|
8491
8491
|
this.root = options.root;
|
|
8492
8492
|
const { RequestMessage, ResponseMessage, PeerMessage, PeerMessageResponse, PeernetMessage, DHTMessage, DHTMessageResponse, DataMessage, DataMessageResponse, PsMessage, ChatMessage, PeernetFile
|
|
8493
8493
|
// FolderMessageResponse
|
|
8494
|
-
} = await import(/* webpackChunkName: "messages" */ './messages-
|
|
8494
|
+
} = await import(/* webpackChunkName: "messages" */ './messages-CC7UR5ol-BvFNyHjv.js');
|
|
8495
8495
|
/**
|
|
8496
8496
|
* proto Object containing protos
|
|
8497
8497
|
* @type {Object}
|
|
@@ -8585,7 +8585,7 @@ class Peernet {
|
|
|
8585
8585
|
if (this.#starting || this.#started)
|
|
8586
8586
|
return;
|
|
8587
8587
|
this.#starting = true;
|
|
8588
|
-
const importee = await import('./client-
|
|
8588
|
+
const importee = await import('./client-q0JXZnpu-ChkF_Pn_.js');
|
|
8589
8589
|
/**
|
|
8590
8590
|
* @access public
|
|
8591
8591
|
* @type {PeernetClient}
|
package/exports/chain.d.ts
CHANGED
package/exports/chain.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@vandeurenglenn/debug';
|
|
1
|
+
import { createDebugger } from '@vandeurenglenn/debug';
|
|
2
2
|
import { formatBytes, jsonStringifyBigInt, jsonParseBigInt, parseUnits, formatUnits } from '@leofcoin/utils';
|
|
3
3
|
import { TransactionMessage, BlockMessage, ContractMessage, BWMessage, BWRequestMessage } from '@leofcoin/messages';
|
|
4
4
|
import addresses, { contractFactory } from '@leofcoin/addresses';
|
|
@@ -1842,7 +1842,7 @@ class ConnectionMonitor {
|
|
|
1842
1842
|
}
|
|
1843
1843
|
}
|
|
1844
1844
|
|
|
1845
|
-
const debug =
|
|
1845
|
+
const debug = createDebugger('leofcoin/chain');
|
|
1846
1846
|
// check if browser or local
|
|
1847
1847
|
class Chain extends VersionControl {
|
|
1848
1848
|
#state;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leofcoin/chain",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.141",
|
|
4
4
|
"description": "Official javascript implementation",
|
|
5
5
|
"private": false,
|
|
6
6
|
"exports": {
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
55
55
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
56
56
|
"@types/semver": "^7.7.1",
|
|
57
|
-
"@vandeurenglenn/debug": "^1.2.
|
|
58
|
-
"rollup": "^4.53.
|
|
57
|
+
"@vandeurenglenn/debug": "^1.2.7",
|
|
58
|
+
"rollup": "^4.53.4",
|
|
59
59
|
"rollup-plugin-modify": "^3.0.0",
|
|
60
60
|
"tape": "^5.9.0",
|
|
61
61
|
"tslib": "^2.8.1"
|
|
@@ -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.105",
|
|
73
73
|
"@leofcoin/storage": "^3.5.38",
|
|
74
74
|
"@leofcoin/utils": "^1.1.40",
|
|
75
75
|
"@leofcoin/workers": "^1.5.27",
|