@leofcoin/messages 1.4.8 → 1.4.10
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/messages/proto-block.d.ts +34 -0
- package/package.json +67 -66
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import TransactionMessage from './transaction.js';
|
|
2
|
+
import ValidatorMessage from './validator.js';
|
|
3
|
+
import { BigNumber } from '@leofcoin/utils';
|
|
4
|
+
import { messageInput } from '../types.js';
|
|
5
|
+
export default class BlockMessage {
|
|
6
|
+
#private;
|
|
7
|
+
decoded: {
|
|
8
|
+
index: Number;
|
|
9
|
+
previousHash: String;
|
|
10
|
+
timestamp: String;
|
|
11
|
+
reward: BigNumber;
|
|
12
|
+
fees: BigNumber;
|
|
13
|
+
transactions: TransactionMessage['decoded'][];
|
|
14
|
+
validators: ValidatorMessage['decoded'][];
|
|
15
|
+
};
|
|
16
|
+
encoded: any;
|
|
17
|
+
get messageName(): string;
|
|
18
|
+
constructor(buffer: messageInput);
|
|
19
|
+
init(buffer: any): Promise<this>;
|
|
20
|
+
create(decoded: any): any;
|
|
21
|
+
encode(decoded?: any): Uint8Array;
|
|
22
|
+
decode(encoded?: any): {
|
|
23
|
+
index: Number;
|
|
24
|
+
previousHash: String;
|
|
25
|
+
timestamp: String;
|
|
26
|
+
reward: BigNumber;
|
|
27
|
+
fees: BigNumber;
|
|
28
|
+
transactions: import("@leofcoin/types").Transaction[];
|
|
29
|
+
validators: {
|
|
30
|
+
address: string;
|
|
31
|
+
reward: BigNumber;
|
|
32
|
+
}[];
|
|
33
|
+
};
|
|
34
|
+
}
|
package/package.json
CHANGED
|
@@ -1,66 +1,67 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@leofcoin/messages",
|
|
3
|
-
"version": "1.4.
|
|
4
|
-
"description": "",
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
"rollup": "^
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"@leofcoin/
|
|
64
|
-
"@
|
|
65
|
-
|
|
66
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@leofcoin/messages",
|
|
3
|
+
"version": "1.4.10",
|
|
4
|
+
"description": "",
|
|
5
|
+
"private": false,
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"import": "./exports/index.js",
|
|
9
|
+
"types": "./exports/index.d.ts"
|
|
10
|
+
},
|
|
11
|
+
"./block": {
|
|
12
|
+
"import": "./exports/block.js",
|
|
13
|
+
"types": "./exports/block.d.ts"
|
|
14
|
+
},
|
|
15
|
+
"./bw-request": {
|
|
16
|
+
"import": "./exports/bw-request.js",
|
|
17
|
+
"types": "./exports/bw-request.d.ts"
|
|
18
|
+
},
|
|
19
|
+
"./bw": {
|
|
20
|
+
"import": "./exports/bw.js",
|
|
21
|
+
"types": "./exports/bw.d.ts"
|
|
22
|
+
},
|
|
23
|
+
"./contract": {
|
|
24
|
+
"import": "./exports/contract.js",
|
|
25
|
+
"types": "./exports/contract.d.ts"
|
|
26
|
+
},
|
|
27
|
+
"./last-block-request": {
|
|
28
|
+
"import": "./exports/last-block-request.js",
|
|
29
|
+
"types": "./exports/last-block-request.d.ts"
|
|
30
|
+
},
|
|
31
|
+
"./last-block": {
|
|
32
|
+
"import": "./exports/last-block.js",
|
|
33
|
+
"types": "./exports/last-block.d.ts"
|
|
34
|
+
},
|
|
35
|
+
"./transaction": {
|
|
36
|
+
"import": "./exports/transaction.js",
|
|
37
|
+
"types": "./exports/transaction.d.ts"
|
|
38
|
+
},
|
|
39
|
+
"./state": {
|
|
40
|
+
"import": "./exports/state.js",
|
|
41
|
+
"types": "./exports/state.d.ts"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"files": [
|
|
45
|
+
"exports"
|
|
46
|
+
],
|
|
47
|
+
"type": "module",
|
|
48
|
+
"scripts": {
|
|
49
|
+
"prettier": "prettier src --config ./../../.prettierrc --write",
|
|
50
|
+
"test": "node test",
|
|
51
|
+
"build": "rollup -c"
|
|
52
|
+
},
|
|
53
|
+
"keywords": [],
|
|
54
|
+
"author": "",
|
|
55
|
+
"license": "MIT",
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@rollup/plugin-typescript": "^11.0.0",
|
|
58
|
+
"rollup": "^3.10.0",
|
|
59
|
+
"tslib": "^2.4.1",
|
|
60
|
+
"typescript": "^5.2.2"
|
|
61
|
+
},
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"@leofcoin/codec-format-interface": "^1.6.18",
|
|
64
|
+
"@leofcoin/utils": "^1.1.15",
|
|
65
|
+
"@vandeurenglenn/easy-worker": "^1.0.2"
|
|
66
|
+
}
|
|
67
|
+
}
|