@leofcoin/messages 1.4.5 → 1.4.7
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/index.d.ts +1 -0
- package/exports/index.js +1 -0
- package/exports/messages/state.d.ts +8 -0
- package/exports/protos/state.proto.d.ts +5 -0
- package/exports/state.js +20 -0
- package/package.json +5 -1
package/exports/index.d.ts
CHANGED
|
@@ -7,3 +7,4 @@ export { default as LastBlockRequestMessage } from './messages/last-block-reques
|
|
|
7
7
|
export { default as TransactionMessage } from './messages/transaction.js';
|
|
8
8
|
export { default as RawTransactionMessage } from './messages/raw-transaction.js';
|
|
9
9
|
export { default as ValidatorMessage } from './messages/validator.js';
|
|
10
|
+
export { default as stateMessage } from './messages/state.js';
|
package/exports/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export { default as LastBlockRequestMessage } from './last-block-request.js';
|
|
|
7
7
|
export { default as TransactionMessage } from './transaction.js';
|
|
8
8
|
import { FormatInterface } from '@leofcoin/codec-format-interface';
|
|
9
9
|
export { default as ValidatorMessage } from './validator.js';
|
|
10
|
+
export { default as stateMessage } from './state.js';
|
|
10
11
|
import '@leofcoin/utils';
|
|
11
12
|
import '@vandeurenglenn/typed-array-smart-concat';
|
|
12
13
|
import '@vandeurenglenn/typed-array-smart-deconcat';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import proto from '../protos/state.proto.js';
|
|
2
|
+
import { FormatInterface } from '@leofcoin/codec-format-interface';
|
|
3
|
+
import type { messageInput } from '../types.js';
|
|
4
|
+
export default class StateMessage extends FormatInterface {
|
|
5
|
+
decoded: typeof proto;
|
|
6
|
+
get messageName(): string;
|
|
7
|
+
constructor(buffer: messageInput);
|
|
8
|
+
}
|
package/exports/state.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FormatInterface } from '@leofcoin/codec-format-interface';
|
|
2
|
+
|
|
3
|
+
var proto = {
|
|
4
|
+
lastblock: Object(),
|
|
5
|
+
values: Object()
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
class StateMessage extends FormatInterface {
|
|
9
|
+
get messageName() {
|
|
10
|
+
return 'StateMessage';
|
|
11
|
+
}
|
|
12
|
+
constructor(buffer) {
|
|
13
|
+
if (buffer instanceof StateMessage)
|
|
14
|
+
return buffer;
|
|
15
|
+
const name = 'state-message';
|
|
16
|
+
super(buffer, proto, { name });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { StateMessage as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leofcoin/messages",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -34,6 +34,10 @@
|
|
|
34
34
|
"./transaction": {
|
|
35
35
|
"import": "./exports/transaction.js",
|
|
36
36
|
"types": "./exports/transaction.d.ts"
|
|
37
|
+
},
|
|
38
|
+
"./state": {
|
|
39
|
+
"import": "./exports/state.js",
|
|
40
|
+
"types": "./exports/state.d.ts"
|
|
37
41
|
}
|
|
38
42
|
},
|
|
39
43
|
"files": [
|