@leofcoin/chain 1.7.33 → 1.7.35
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 +28 -16
- package/exports/chain.js +28 -16
- package/exports/machine.d.ts +4 -4
- package/exports/state.d.ts +5 -1
- package/package.json +5 -6
package/exports/browser/chain.js
CHANGED
|
@@ -3558,18 +3558,6 @@ class Machine {
|
|
|
3558
3558
|
get nativeTransfers() {
|
|
3559
3559
|
return this.#askWorker('nativeTransfers');
|
|
3560
3560
|
}
|
|
3561
|
-
get totalTransactions() {
|
|
3562
|
-
return this.#askWorker('totalTransactions');
|
|
3563
|
-
}
|
|
3564
|
-
get blocks() {
|
|
3565
|
-
return this.getBlocks();
|
|
3566
|
-
}
|
|
3567
|
-
get lastBlock() {
|
|
3568
|
-
return this.#askWorker('lastBlock');
|
|
3569
|
-
}
|
|
3570
|
-
get totalBlocks() {
|
|
3571
|
-
return this.#askWorker('totalBlocks');
|
|
3572
|
-
}
|
|
3573
3561
|
get totalBurnAmount() {
|
|
3574
3562
|
return this.#askWorker('totalBurnAmount');
|
|
3575
3563
|
}
|
|
@@ -3579,6 +3567,18 @@ class Machine {
|
|
|
3579
3567
|
get totalTransferAmount() {
|
|
3580
3568
|
return this.#askWorker('totalTransferAmount');
|
|
3581
3569
|
}
|
|
3570
|
+
get totalTransactions() {
|
|
3571
|
+
return this.#askWorker('totalTransactions');
|
|
3572
|
+
}
|
|
3573
|
+
get totalBlocks() {
|
|
3574
|
+
return this.#askWorker('totalBlocks');
|
|
3575
|
+
}
|
|
3576
|
+
get blocks() {
|
|
3577
|
+
return this.getBlocks();
|
|
3578
|
+
}
|
|
3579
|
+
get lastBlock() {
|
|
3580
|
+
return this.#askWorker('lastBlock');
|
|
3581
|
+
}
|
|
3582
3582
|
getBlocks(from, to) {
|
|
3583
3583
|
return this.#askWorker('blocks', { from, to });
|
|
3584
3584
|
}
|
|
@@ -3675,6 +3675,9 @@ class State extends Contract {
|
|
|
3675
3675
|
get resolving() {
|
|
3676
3676
|
return this.#resolving;
|
|
3677
3677
|
}
|
|
3678
|
+
get nativeCalls() {
|
|
3679
|
+
return this.#machine.nativeCalls;
|
|
3680
|
+
}
|
|
3678
3681
|
get nativeMints() {
|
|
3679
3682
|
return this.#machine.nativeMints;
|
|
3680
3683
|
}
|
|
@@ -3684,11 +3687,20 @@ class State extends Contract {
|
|
|
3684
3687
|
get nativeTransfers() {
|
|
3685
3688
|
return this.#machine.nativeTransfers;
|
|
3686
3689
|
}
|
|
3690
|
+
get totalBurnAmouint() {
|
|
3691
|
+
return this.#machine.totalBurnAmount;
|
|
3692
|
+
}
|
|
3693
|
+
get totalMintAmount() {
|
|
3694
|
+
return this.#machine.totalMintAmount;
|
|
3695
|
+
}
|
|
3696
|
+
get totalTransferAmount() {
|
|
3697
|
+
return this.#machine.totalTransferAmount;
|
|
3698
|
+
}
|
|
3687
3699
|
get totalTransactions() {
|
|
3688
3700
|
return this.#machine.totalTransactions;
|
|
3689
3701
|
}
|
|
3690
|
-
get
|
|
3691
|
-
return this.#machine.
|
|
3702
|
+
get totalBlocks() {
|
|
3703
|
+
return this.#machine.totalBlocks;
|
|
3692
3704
|
}
|
|
3693
3705
|
get blocks() {
|
|
3694
3706
|
return this.getBlocks();
|
|
@@ -4434,9 +4446,9 @@ class Chain extends VersionControl {
|
|
|
4434
4446
|
if (Object.keys(lastBlock).length > 0) {
|
|
4435
4447
|
if (!this.lastBlock || higherThenCurrentLocal) {
|
|
4436
4448
|
this.knownBlocks = await this.#makeRequest(peer, 'knownBlocks');
|
|
4437
|
-
const
|
|
4449
|
+
const stateInfo = await this.#makeRequest(peer, 'stateInfo');
|
|
4438
4450
|
await this.syncChain(lastBlock);
|
|
4439
|
-
this
|
|
4451
|
+
this.machine.states.info = stateInfo;
|
|
4440
4452
|
}
|
|
4441
4453
|
}
|
|
4442
4454
|
if (this.wantList.length > 0) {
|
package/exports/chain.js
CHANGED
|
@@ -659,18 +659,6 @@ class Machine {
|
|
|
659
659
|
get nativeTransfers() {
|
|
660
660
|
return this.#askWorker('nativeTransfers');
|
|
661
661
|
}
|
|
662
|
-
get totalTransactions() {
|
|
663
|
-
return this.#askWorker('totalTransactions');
|
|
664
|
-
}
|
|
665
|
-
get blocks() {
|
|
666
|
-
return this.getBlocks();
|
|
667
|
-
}
|
|
668
|
-
get lastBlock() {
|
|
669
|
-
return this.#askWorker('lastBlock');
|
|
670
|
-
}
|
|
671
|
-
get totalBlocks() {
|
|
672
|
-
return this.#askWorker('totalBlocks');
|
|
673
|
-
}
|
|
674
662
|
get totalBurnAmount() {
|
|
675
663
|
return this.#askWorker('totalBurnAmount');
|
|
676
664
|
}
|
|
@@ -680,6 +668,18 @@ class Machine {
|
|
|
680
668
|
get totalTransferAmount() {
|
|
681
669
|
return this.#askWorker('totalTransferAmount');
|
|
682
670
|
}
|
|
671
|
+
get totalTransactions() {
|
|
672
|
+
return this.#askWorker('totalTransactions');
|
|
673
|
+
}
|
|
674
|
+
get totalBlocks() {
|
|
675
|
+
return this.#askWorker('totalBlocks');
|
|
676
|
+
}
|
|
677
|
+
get blocks() {
|
|
678
|
+
return this.getBlocks();
|
|
679
|
+
}
|
|
680
|
+
get lastBlock() {
|
|
681
|
+
return this.#askWorker('lastBlock');
|
|
682
|
+
}
|
|
683
683
|
getBlocks(from, to) {
|
|
684
684
|
return this.#askWorker('blocks', { from, to });
|
|
685
685
|
}
|
|
@@ -776,6 +776,9 @@ class State extends Contract {
|
|
|
776
776
|
get resolving() {
|
|
777
777
|
return this.#resolving;
|
|
778
778
|
}
|
|
779
|
+
get nativeCalls() {
|
|
780
|
+
return this.#machine.nativeCalls;
|
|
781
|
+
}
|
|
779
782
|
get nativeMints() {
|
|
780
783
|
return this.#machine.nativeMints;
|
|
781
784
|
}
|
|
@@ -785,11 +788,20 @@ class State extends Contract {
|
|
|
785
788
|
get nativeTransfers() {
|
|
786
789
|
return this.#machine.nativeTransfers;
|
|
787
790
|
}
|
|
791
|
+
get totalBurnAmouint() {
|
|
792
|
+
return this.#machine.totalBurnAmount;
|
|
793
|
+
}
|
|
794
|
+
get totalMintAmount() {
|
|
795
|
+
return this.#machine.totalMintAmount;
|
|
796
|
+
}
|
|
797
|
+
get totalTransferAmount() {
|
|
798
|
+
return this.#machine.totalTransferAmount;
|
|
799
|
+
}
|
|
788
800
|
get totalTransactions() {
|
|
789
801
|
return this.#machine.totalTransactions;
|
|
790
802
|
}
|
|
791
|
-
get
|
|
792
|
-
return this.#machine.
|
|
803
|
+
get totalBlocks() {
|
|
804
|
+
return this.#machine.totalBlocks;
|
|
793
805
|
}
|
|
794
806
|
get blocks() {
|
|
795
807
|
return this.getBlocks();
|
|
@@ -1535,9 +1547,9 @@ class Chain extends VersionControl {
|
|
|
1535
1547
|
if (Object.keys(lastBlock).length > 0) {
|
|
1536
1548
|
if (!this.lastBlock || higherThenCurrentLocal) {
|
|
1537
1549
|
this.knownBlocks = await this.#makeRequest(peer, 'knownBlocks');
|
|
1538
|
-
const
|
|
1550
|
+
const stateInfo = await this.#makeRequest(peer, 'stateInfo');
|
|
1539
1551
|
await this.syncChain(lastBlock);
|
|
1540
|
-
this
|
|
1552
|
+
this.machine.states.info = stateInfo;
|
|
1541
1553
|
}
|
|
1542
1554
|
}
|
|
1543
1555
|
if (this.wantList.length > 0) {
|
package/exports/machine.d.ts
CHANGED
|
@@ -39,13 +39,13 @@ export default class Machine {
|
|
|
39
39
|
get nativeMints(): Promise<any>;
|
|
40
40
|
get nativeBurns(): Promise<any>;
|
|
41
41
|
get nativeTransfers(): Promise<any>;
|
|
42
|
-
get totalTransactions(): Promise<any>;
|
|
43
|
-
get blocks(): Promise<[]>;
|
|
44
|
-
get lastBlock(): Promise<any>;
|
|
45
|
-
get totalBlocks(): Promise<any>;
|
|
46
42
|
get totalBurnAmount(): Promise<any>;
|
|
47
43
|
get totalMintAmount(): Promise<any>;
|
|
48
44
|
get totalTransferAmount(): Promise<any>;
|
|
45
|
+
get totalTransactions(): Promise<any>;
|
|
46
|
+
get totalBlocks(): Promise<any>;
|
|
47
|
+
get blocks(): Promise<[]>;
|
|
48
|
+
get lastBlock(): Promise<any>;
|
|
49
49
|
getBlocks(from?: any, to?: any): Promise<[]>;
|
|
50
50
|
getBlock(index: any): Promise<any>;
|
|
51
51
|
addLoadedBlock(block: any): Promise<any>;
|
package/exports/state.d.ts
CHANGED
|
@@ -21,11 +21,15 @@ export default class State extends Contract {
|
|
|
21
21
|
get blockHashMap(): IterableIterator<[any, any]>;
|
|
22
22
|
get loaded(): boolean;
|
|
23
23
|
get resolving(): boolean;
|
|
24
|
+
get nativeCalls(): Promise<any>;
|
|
24
25
|
get nativeMints(): Promise<any>;
|
|
25
26
|
get nativeBurns(): Promise<any>;
|
|
26
27
|
get nativeTransfers(): Promise<any>;
|
|
28
|
+
get totalBurnAmouint(): Promise<any>;
|
|
29
|
+
get totalMintAmount(): Promise<any>;
|
|
30
|
+
get totalTransferAmount(): Promise<any>;
|
|
27
31
|
get totalTransactions(): Promise<any>;
|
|
28
|
-
get
|
|
32
|
+
get totalBlocks(): Promise<any>;
|
|
29
33
|
get blocks(): Promise<[]>;
|
|
30
34
|
get lastBlock(): Promise<any> | {
|
|
31
35
|
index: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leofcoin/chain",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.35",
|
|
4
4
|
"description": "Official javascript implementation",
|
|
5
5
|
"private": false,
|
|
6
6
|
"exports": {
|
|
@@ -38,8 +38,7 @@
|
|
|
38
38
|
"test": "node --inspect test",
|
|
39
39
|
"pack": "webpack",
|
|
40
40
|
"build": "rollup -c --silent error",
|
|
41
|
-
"npm-check-updates": "npx npm-check-updates -
|
|
42
|
-
"check-dependencies": "npx depcheck"
|
|
41
|
+
"npm-check-updates": "npx npm-check-updates -u --install always"
|
|
43
42
|
},
|
|
44
43
|
"np": {
|
|
45
44
|
"yarn": false,
|
|
@@ -56,10 +55,10 @@
|
|
|
56
55
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
57
56
|
"@types/semver": "^7.5.8",
|
|
58
57
|
"@vandeurenglenn/debug": "^1.2.5",
|
|
59
|
-
"rollup": "^4.21.
|
|
58
|
+
"rollup": "^4.21.1",
|
|
60
59
|
"rollup-plugin-modify": "^3.0.0",
|
|
61
60
|
"tape": "^5.8.1",
|
|
62
|
-
"tslib": "^2.
|
|
61
|
+
"tslib": "^2.7.0"
|
|
63
62
|
},
|
|
64
63
|
"dependencies": {
|
|
65
64
|
"@leofcoin/addresses": "^1.0.24",
|
|
@@ -73,7 +72,7 @@
|
|
|
73
72
|
"@leofcoin/peernet": "^1.1.79",
|
|
74
73
|
"@leofcoin/storage": "^3.5.30",
|
|
75
74
|
"@leofcoin/utils": "^1.1.18",
|
|
76
|
-
"@leofcoin/workers": "^1.5.
|
|
75
|
+
"@leofcoin/workers": "^1.5.3",
|
|
77
76
|
"@vandeurenglenn/base58": "^1.1.9",
|
|
78
77
|
"@vandeurenglenn/easy-worker": "^1.0.2",
|
|
79
78
|
"semver": "^7.6.3"
|