@leofcoin/chain 1.7.37 → 1.7.38
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.
|
@@ -476,6 +476,9 @@ worker.onmessage(({ id, type, input }) => {
|
|
|
476
476
|
case 'lastBlock':
|
|
477
477
|
respond(id, lastBlock);
|
|
478
478
|
break;
|
|
479
|
+
case 'lastBlockHeight':
|
|
480
|
+
respond(id, lastBlock.index);
|
|
481
|
+
break;
|
|
479
482
|
case 'latestTransactions':
|
|
480
483
|
respond(id, latestTransactions);
|
|
481
484
|
break;
|
package/exports/state.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export default class State extends Contract {
|
|
|
38
38
|
hash: string;
|
|
39
39
|
previousHash: string;
|
|
40
40
|
};
|
|
41
|
-
get lastBlockHeight():
|
|
41
|
+
get lastBlockHeight(): Promise<any> | 0;
|
|
42
42
|
getBlock(index: any): Promise<any>;
|
|
43
43
|
getBlocks(from?: any, to?: any): Promise<[]>;
|
|
44
44
|
get totalSize(): number;
|
|
@@ -476,6 +476,9 @@ worker.onmessage(({ id, type, input }) => {
|
|
|
476
476
|
case 'lastBlock':
|
|
477
477
|
respond(id, lastBlock);
|
|
478
478
|
break;
|
|
479
|
+
case 'lastBlockHeight':
|
|
480
|
+
respond(id, lastBlock.index);
|
|
481
|
+
break;
|
|
479
482
|
case 'latestTransactions':
|
|
480
483
|
respond(id, latestTransactions);
|
|
481
484
|
break;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leofcoin/chain",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.38",
|
|
4
4
|
"description": "Official javascript implementation",
|
|
5
5
|
"private": false,
|
|
6
6
|
"exports": {
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@leofcoin/peernet": "^1.1.79",
|
|
73
73
|
"@leofcoin/storage": "^3.5.31",
|
|
74
74
|
"@leofcoin/utils": "^1.1.18",
|
|
75
|
-
"@leofcoin/workers": "^1.5.
|
|
75
|
+
"@leofcoin/workers": "^1.5.6",
|
|
76
76
|
"@vandeurenglenn/base58": "^1.1.9",
|
|
77
77
|
"@vandeurenglenn/easy-worker": "^1.0.2",
|
|
78
78
|
"semver": "^7.6.3"
|