@xelis/sdk 0.11.30 → 0.11.32
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/dist/cjs/daemon/rpc.js +21 -0
- package/dist/cjs/daemon/types.js +14 -2
- package/dist/cjs/daemon/websocket.js +21 -0
- package/dist/esm/daemon/rpc.js +21 -0
- package/dist/esm/daemon/types.js +13 -1
- package/dist/esm/daemon/websocket.js +21 -0
- package/dist/types/daemon/rpc.d.ts +8 -1
- package/dist/types/daemon/types.d.ts +87 -3
- package/dist/types/daemon/websocket.d.ts +8 -1
- package/package.json +1 -1
package/dist/cjs/daemon/rpc.js
CHANGED
|
@@ -52,6 +52,18 @@ class RPC extends http_1.HttpRPC {
|
|
|
52
52
|
getTopBlock(params) {
|
|
53
53
|
return this.request(types_1.RPCMethod.GetTopBlock, params);
|
|
54
54
|
}
|
|
55
|
+
getBlockDifficultyByHash(params) {
|
|
56
|
+
return this.request(types_1.RPCMethod.GetBlockDifficultyByHash, params);
|
|
57
|
+
}
|
|
58
|
+
getBlockBaseFeeByHash(params) {
|
|
59
|
+
return this.request(types_1.RPCMethod.GetBlockBaseFeeByHash, params);
|
|
60
|
+
}
|
|
61
|
+
getBlockSummaryAtTopoheight(params) {
|
|
62
|
+
return this.request(types_1.RPCMethod.GetBlockSummaryAtTopoheight, params);
|
|
63
|
+
}
|
|
64
|
+
getBlockSummaryByHash(params) {
|
|
65
|
+
return this.request(types_1.RPCMethod.GetBlockSummaryByHash, params);
|
|
66
|
+
}
|
|
55
67
|
getBalance(params) {
|
|
56
68
|
return this.request(types_1.RPCMethod.GetBalance, params);
|
|
57
69
|
}
|
|
@@ -106,6 +118,9 @@ class RPC extends http_1.HttpRPC {
|
|
|
106
118
|
getTransactions(txHashes) {
|
|
107
119
|
return this.request(types_1.RPCMethod.GetTransactions, { tx_hashes: txHashes });
|
|
108
120
|
}
|
|
121
|
+
getTransactionsSummary(params) {
|
|
122
|
+
return this.request(types_1.RPCMethod.GetTransactionsSummary, params);
|
|
123
|
+
}
|
|
109
124
|
isTxExecutedInBlock(params) {
|
|
110
125
|
return this.request(types_1.RPCMethod.IsTxExecutedInBlock, params);
|
|
111
126
|
}
|
|
@@ -163,6 +178,9 @@ class RPC extends http_1.HttpRPC {
|
|
|
163
178
|
extractKeyFromAddress(params) {
|
|
164
179
|
return this.request(types_1.RPCMethod.ExtractKeyFromAddress, params);
|
|
165
180
|
}
|
|
181
|
+
keyToAddress(params) {
|
|
182
|
+
return this.request(types_1.RPCMethod.KeyToAddress, params);
|
|
183
|
+
}
|
|
166
184
|
makeIntegratedAddress(params) {
|
|
167
185
|
return this.request(types_1.RPCMethod.MakeIntegratedAddress, params);
|
|
168
186
|
}
|
|
@@ -190,6 +208,9 @@ class RPC extends http_1.HttpRPC {
|
|
|
190
208
|
getContractRegisteredExecutionsAtTopoheight(params) {
|
|
191
209
|
return this.request(types_1.RPCMethod.GetContractRegisteredExecutionsAtTopoheight, params);
|
|
192
210
|
}
|
|
211
|
+
getContractsOutputs(params) {
|
|
212
|
+
return this.request(types_1.RPCMethod.GetContractsOutputs);
|
|
213
|
+
}
|
|
193
214
|
getContractModule(params) {
|
|
194
215
|
return this.request(types_1.RPCMethod.GetContractModule, params);
|
|
195
216
|
}
|
package/dist/cjs/daemon/types.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RPCEvent = exports.RPCMethod = exports.BlockType = exports.BalanceType = void 0;
|
|
3
|
+
exports.RPCEvent = exports.RPCMethod = exports.BlockType = exports.BalanceType = exports.AddressType = void 0;
|
|
4
|
+
var AddressType;
|
|
5
|
+
(function (AddressType) {
|
|
6
|
+
AddressType["Normal"] = "normal";
|
|
7
|
+
AddressType["Data"] = "data";
|
|
8
|
+
})(AddressType = exports.AddressType || (exports.AddressType = {}));
|
|
4
9
|
var BalanceType;
|
|
5
10
|
(function (BalanceType) {
|
|
6
11
|
BalanceType["Input"] = "input";
|
|
@@ -32,6 +37,10 @@ var RPCMethod;
|
|
|
32
37
|
RPCMethod["GetBlocksAtHeight"] = "get_blocks_at_height";
|
|
33
38
|
RPCMethod["GetBlockByHash"] = "get_block_by_hash";
|
|
34
39
|
RPCMethod["GetTopBlock"] = "get_top_block";
|
|
40
|
+
RPCMethod["GetBlockDifficultyByHash"] = "get_block_difficulty_by_hash";
|
|
41
|
+
RPCMethod["GetBlockBaseFeeByHash"] = "get_block_base_fee_by_hash";
|
|
42
|
+
RPCMethod["GetBlockSummaryAtTopoheight"] = "get_block_summary_at_topoheight";
|
|
43
|
+
RPCMethod["GetBlockSummaryByHash"] = "get_block_summary_by_hash";
|
|
35
44
|
RPCMethod["GetBalance"] = "get_balance";
|
|
36
45
|
RPCMethod["GetStableBalance"] = "get_stable_balance";
|
|
37
46
|
RPCMethod["HasBalance"] = "has_balance";
|
|
@@ -50,9 +59,11 @@ var RPCMethod;
|
|
|
50
59
|
RPCMethod["GetTransactionExecutor"] = "get_transaction_executor";
|
|
51
60
|
RPCMethod["GetTransaction"] = "get_transaction";
|
|
52
61
|
RPCMethod["GetTransactions"] = "get_transactions";
|
|
62
|
+
RPCMethod["GetTransactionsSummary"] = "get_transactions_summary";
|
|
53
63
|
RPCMethod["IsTxExecutedInBlock"] = "is_tx_executed_in_block";
|
|
54
64
|
RPCMethod["P2PStatus"] = "p2p_status";
|
|
55
65
|
RPCMethod["GetPeers"] = "get_peers";
|
|
66
|
+
RPCMethod["GetP2PBlockPropagation"] = "get_p2p_block_propagation";
|
|
56
67
|
RPCMethod["GetMempool"] = "get_mempool";
|
|
57
68
|
RPCMethod["GetMempoolSummary"] = "get_mempool_summary";
|
|
58
69
|
RPCMethod["GetMempoolCache"] = "get_mempool_cache";
|
|
@@ -69,6 +80,7 @@ var RPCMethod;
|
|
|
69
80
|
RPCMethod["ValidateAddress"] = "validate_address";
|
|
70
81
|
RPCMethod["SplitAddress"] = "split_address";
|
|
71
82
|
RPCMethod["ExtractKeyFromAddress"] = "extract_key_from_address";
|
|
83
|
+
RPCMethod["KeyToAddress"] = "key_to_address";
|
|
72
84
|
RPCMethod["MakeIntegratedAddress"] = "make_integrated_address";
|
|
73
85
|
RPCMethod["DecryptExtraData"] = "decrypt_extra_data";
|
|
74
86
|
RPCMethod["GetMultisigAtTopoheight"] = "get_multisig_at_topoheight";
|
|
@@ -78,6 +90,7 @@ var RPCMethod;
|
|
|
78
90
|
RPCMethod["GetContractLogs"] = "get_contract_logs";
|
|
79
91
|
RPCMethod["GetContractScheduledExecutionsAtTopoheight"] = "get_contract_scheduled_executions_at_topoheight";
|
|
80
92
|
RPCMethod["GetContractRegisteredExecutionsAtTopoheight"] = "get_contract_registered_executions_at_topoheight";
|
|
93
|
+
RPCMethod["GetContractsOutputs"] = "get_contracts_outputs";
|
|
81
94
|
RPCMethod["GetContractModule"] = "get_contract_module";
|
|
82
95
|
RPCMethod["GetContractData"] = "get_contract_data";
|
|
83
96
|
RPCMethod["GetContractDataAtTopoheight"] = "get_contract_data_at_topoheight";
|
|
@@ -86,7 +99,6 @@ var RPCMethod;
|
|
|
86
99
|
RPCMethod["GetContractAssets"] = "get_contract_assets";
|
|
87
100
|
RPCMethod["GetContracts"] = "get_contracts";
|
|
88
101
|
RPCMethod["GetContractDataEntries"] = "get_contract_data_entries";
|
|
89
|
-
RPCMethod["GetP2PBlockPropagation"] = "get_p2p_block_propagation";
|
|
90
102
|
RPCMethod["GetBlockTemplate"] = "get_block_template";
|
|
91
103
|
RPCMethod["GetMinerWork"] = "get_miner_work";
|
|
92
104
|
RPCMethod["SubmitBlock"] = "submit_block";
|
|
@@ -71,6 +71,18 @@ class DaemonMethods {
|
|
|
71
71
|
getTopBlock(params) {
|
|
72
72
|
return this.dataCall(types_1.RPCMethod.GetTopBlock, params);
|
|
73
73
|
}
|
|
74
|
+
getBlockDifficultyByHash(params) {
|
|
75
|
+
return this.dataCall(types_1.RPCMethod.GetBlockDifficultyByHash, params);
|
|
76
|
+
}
|
|
77
|
+
getBlockBaseFeeByHash(params) {
|
|
78
|
+
return this.dataCall(types_1.RPCMethod.GetBlockBaseFeeByHash, params);
|
|
79
|
+
}
|
|
80
|
+
getBlockSummaryAtTopoheight(params) {
|
|
81
|
+
return this.dataCall(types_1.RPCMethod.GetBlockSummaryAtTopoheight, params);
|
|
82
|
+
}
|
|
83
|
+
getBlockSummaryByHash(params) {
|
|
84
|
+
return this.dataCall(types_1.RPCMethod.GetBlockSummaryByHash, params);
|
|
85
|
+
}
|
|
74
86
|
getBalance(params) {
|
|
75
87
|
return this.dataCall(types_1.RPCMethod.GetBalance, params);
|
|
76
88
|
}
|
|
@@ -125,6 +137,9 @@ class DaemonMethods {
|
|
|
125
137
|
getTransactions(txHashes) {
|
|
126
138
|
return this.dataCall(types_1.RPCMethod.GetTransactions, { tx_hashes: txHashes });
|
|
127
139
|
}
|
|
140
|
+
getTransactionsSummary(params) {
|
|
141
|
+
return this.dataCall(types_1.RPCMethod.GetTransactionsSummary, params);
|
|
142
|
+
}
|
|
128
143
|
isTxExecutedInBlock(params) {
|
|
129
144
|
return this.dataCall(types_1.RPCMethod.IsTxExecutedInBlock, params);
|
|
130
145
|
}
|
|
@@ -182,6 +197,9 @@ class DaemonMethods {
|
|
|
182
197
|
extractKeyFromAddress(params) {
|
|
183
198
|
return this.dataCall(types_1.RPCMethod.ExtractKeyFromAddress, params);
|
|
184
199
|
}
|
|
200
|
+
keyToAddress(params) {
|
|
201
|
+
return this.dataCall(types_1.RPCMethod.KeyToAddress, params);
|
|
202
|
+
}
|
|
185
203
|
makeIntegratedAddress(params) {
|
|
186
204
|
return this.dataCall(types_1.RPCMethod.MakeIntegratedAddress, params);
|
|
187
205
|
}
|
|
@@ -209,6 +227,9 @@ class DaemonMethods {
|
|
|
209
227
|
getContractRegisteredExecutionsAtTopoheight(params) {
|
|
210
228
|
return this.dataCall(types_1.RPCMethod.GetContractRegisteredExecutionsAtTopoheight, params);
|
|
211
229
|
}
|
|
230
|
+
getContractsOutputs(params) {
|
|
231
|
+
return this.dataCall(types_1.RPCMethod.GetContractsOutputs);
|
|
232
|
+
}
|
|
212
233
|
getContractModule(params) {
|
|
213
234
|
return this.dataCall(types_1.RPCMethod.GetContractModule, params);
|
|
214
235
|
}
|
package/dist/esm/daemon/rpc.js
CHANGED
|
@@ -49,6 +49,18 @@ export class RPC extends HttpRPC {
|
|
|
49
49
|
getTopBlock(params) {
|
|
50
50
|
return this.request(RPCMethod.GetTopBlock, params);
|
|
51
51
|
}
|
|
52
|
+
getBlockDifficultyByHash(params) {
|
|
53
|
+
return this.request(RPCMethod.GetBlockDifficultyByHash, params);
|
|
54
|
+
}
|
|
55
|
+
getBlockBaseFeeByHash(params) {
|
|
56
|
+
return this.request(RPCMethod.GetBlockBaseFeeByHash, params);
|
|
57
|
+
}
|
|
58
|
+
getBlockSummaryAtTopoheight(params) {
|
|
59
|
+
return this.request(RPCMethod.GetBlockSummaryAtTopoheight, params);
|
|
60
|
+
}
|
|
61
|
+
getBlockSummaryByHash(params) {
|
|
62
|
+
return this.request(RPCMethod.GetBlockSummaryByHash, params);
|
|
63
|
+
}
|
|
52
64
|
getBalance(params) {
|
|
53
65
|
return this.request(RPCMethod.GetBalance, params);
|
|
54
66
|
}
|
|
@@ -103,6 +115,9 @@ export class RPC extends HttpRPC {
|
|
|
103
115
|
getTransactions(txHashes) {
|
|
104
116
|
return this.request(RPCMethod.GetTransactions, { tx_hashes: txHashes });
|
|
105
117
|
}
|
|
118
|
+
getTransactionsSummary(params) {
|
|
119
|
+
return this.request(RPCMethod.GetTransactionsSummary, params);
|
|
120
|
+
}
|
|
106
121
|
isTxExecutedInBlock(params) {
|
|
107
122
|
return this.request(RPCMethod.IsTxExecutedInBlock, params);
|
|
108
123
|
}
|
|
@@ -160,6 +175,9 @@ export class RPC extends HttpRPC {
|
|
|
160
175
|
extractKeyFromAddress(params) {
|
|
161
176
|
return this.request(RPCMethod.ExtractKeyFromAddress, params);
|
|
162
177
|
}
|
|
178
|
+
keyToAddress(params) {
|
|
179
|
+
return this.request(RPCMethod.KeyToAddress, params);
|
|
180
|
+
}
|
|
163
181
|
makeIntegratedAddress(params) {
|
|
164
182
|
return this.request(RPCMethod.MakeIntegratedAddress, params);
|
|
165
183
|
}
|
|
@@ -187,6 +205,9 @@ export class RPC extends HttpRPC {
|
|
|
187
205
|
getContractRegisteredExecutionsAtTopoheight(params) {
|
|
188
206
|
return this.request(RPCMethod.GetContractRegisteredExecutionsAtTopoheight, params);
|
|
189
207
|
}
|
|
208
|
+
getContractsOutputs(params) {
|
|
209
|
+
return this.request(RPCMethod.GetContractsOutputs);
|
|
210
|
+
}
|
|
190
211
|
getContractModule(params) {
|
|
191
212
|
return this.request(RPCMethod.GetContractModule, params);
|
|
192
213
|
}
|
package/dist/esm/daemon/types.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
export var AddressType;
|
|
2
|
+
(function (AddressType) {
|
|
3
|
+
AddressType["Normal"] = "normal";
|
|
4
|
+
AddressType["Data"] = "data";
|
|
5
|
+
})(AddressType || (AddressType = {}));
|
|
1
6
|
export var BalanceType;
|
|
2
7
|
(function (BalanceType) {
|
|
3
8
|
BalanceType["Input"] = "input";
|
|
@@ -29,6 +34,10 @@ export var RPCMethod;
|
|
|
29
34
|
RPCMethod["GetBlocksAtHeight"] = "get_blocks_at_height";
|
|
30
35
|
RPCMethod["GetBlockByHash"] = "get_block_by_hash";
|
|
31
36
|
RPCMethod["GetTopBlock"] = "get_top_block";
|
|
37
|
+
RPCMethod["GetBlockDifficultyByHash"] = "get_block_difficulty_by_hash";
|
|
38
|
+
RPCMethod["GetBlockBaseFeeByHash"] = "get_block_base_fee_by_hash";
|
|
39
|
+
RPCMethod["GetBlockSummaryAtTopoheight"] = "get_block_summary_at_topoheight";
|
|
40
|
+
RPCMethod["GetBlockSummaryByHash"] = "get_block_summary_by_hash";
|
|
32
41
|
RPCMethod["GetBalance"] = "get_balance";
|
|
33
42
|
RPCMethod["GetStableBalance"] = "get_stable_balance";
|
|
34
43
|
RPCMethod["HasBalance"] = "has_balance";
|
|
@@ -47,9 +56,11 @@ export var RPCMethod;
|
|
|
47
56
|
RPCMethod["GetTransactionExecutor"] = "get_transaction_executor";
|
|
48
57
|
RPCMethod["GetTransaction"] = "get_transaction";
|
|
49
58
|
RPCMethod["GetTransactions"] = "get_transactions";
|
|
59
|
+
RPCMethod["GetTransactionsSummary"] = "get_transactions_summary";
|
|
50
60
|
RPCMethod["IsTxExecutedInBlock"] = "is_tx_executed_in_block";
|
|
51
61
|
RPCMethod["P2PStatus"] = "p2p_status";
|
|
52
62
|
RPCMethod["GetPeers"] = "get_peers";
|
|
63
|
+
RPCMethod["GetP2PBlockPropagation"] = "get_p2p_block_propagation";
|
|
53
64
|
RPCMethod["GetMempool"] = "get_mempool";
|
|
54
65
|
RPCMethod["GetMempoolSummary"] = "get_mempool_summary";
|
|
55
66
|
RPCMethod["GetMempoolCache"] = "get_mempool_cache";
|
|
@@ -66,6 +77,7 @@ export var RPCMethod;
|
|
|
66
77
|
RPCMethod["ValidateAddress"] = "validate_address";
|
|
67
78
|
RPCMethod["SplitAddress"] = "split_address";
|
|
68
79
|
RPCMethod["ExtractKeyFromAddress"] = "extract_key_from_address";
|
|
80
|
+
RPCMethod["KeyToAddress"] = "key_to_address";
|
|
69
81
|
RPCMethod["MakeIntegratedAddress"] = "make_integrated_address";
|
|
70
82
|
RPCMethod["DecryptExtraData"] = "decrypt_extra_data";
|
|
71
83
|
RPCMethod["GetMultisigAtTopoheight"] = "get_multisig_at_topoheight";
|
|
@@ -75,6 +87,7 @@ export var RPCMethod;
|
|
|
75
87
|
RPCMethod["GetContractLogs"] = "get_contract_logs";
|
|
76
88
|
RPCMethod["GetContractScheduledExecutionsAtTopoheight"] = "get_contract_scheduled_executions_at_topoheight";
|
|
77
89
|
RPCMethod["GetContractRegisteredExecutionsAtTopoheight"] = "get_contract_registered_executions_at_topoheight";
|
|
90
|
+
RPCMethod["GetContractsOutputs"] = "get_contracts_outputs";
|
|
78
91
|
RPCMethod["GetContractModule"] = "get_contract_module";
|
|
79
92
|
RPCMethod["GetContractData"] = "get_contract_data";
|
|
80
93
|
RPCMethod["GetContractDataAtTopoheight"] = "get_contract_data_at_topoheight";
|
|
@@ -83,7 +96,6 @@ export var RPCMethod;
|
|
|
83
96
|
RPCMethod["GetContractAssets"] = "get_contract_assets";
|
|
84
97
|
RPCMethod["GetContracts"] = "get_contracts";
|
|
85
98
|
RPCMethod["GetContractDataEntries"] = "get_contract_data_entries";
|
|
86
|
-
RPCMethod["GetP2PBlockPropagation"] = "get_p2p_block_propagation";
|
|
87
99
|
RPCMethod["GetBlockTemplate"] = "get_block_template";
|
|
88
100
|
RPCMethod["GetMinerWork"] = "get_miner_work";
|
|
89
101
|
RPCMethod["SubmitBlock"] = "submit_block";
|
|
@@ -68,6 +68,18 @@ export class DaemonMethods {
|
|
|
68
68
|
getTopBlock(params) {
|
|
69
69
|
return this.dataCall(RPCMethod.GetTopBlock, params);
|
|
70
70
|
}
|
|
71
|
+
getBlockDifficultyByHash(params) {
|
|
72
|
+
return this.dataCall(RPCMethod.GetBlockDifficultyByHash, params);
|
|
73
|
+
}
|
|
74
|
+
getBlockBaseFeeByHash(params) {
|
|
75
|
+
return this.dataCall(RPCMethod.GetBlockBaseFeeByHash, params);
|
|
76
|
+
}
|
|
77
|
+
getBlockSummaryAtTopoheight(params) {
|
|
78
|
+
return this.dataCall(RPCMethod.GetBlockSummaryAtTopoheight, params);
|
|
79
|
+
}
|
|
80
|
+
getBlockSummaryByHash(params) {
|
|
81
|
+
return this.dataCall(RPCMethod.GetBlockSummaryByHash, params);
|
|
82
|
+
}
|
|
71
83
|
getBalance(params) {
|
|
72
84
|
return this.dataCall(RPCMethod.GetBalance, params);
|
|
73
85
|
}
|
|
@@ -122,6 +134,9 @@ export class DaemonMethods {
|
|
|
122
134
|
getTransactions(txHashes) {
|
|
123
135
|
return this.dataCall(RPCMethod.GetTransactions, { tx_hashes: txHashes });
|
|
124
136
|
}
|
|
137
|
+
getTransactionsSummary(params) {
|
|
138
|
+
return this.dataCall(RPCMethod.GetTransactionsSummary, params);
|
|
139
|
+
}
|
|
125
140
|
isTxExecutedInBlock(params) {
|
|
126
141
|
return this.dataCall(RPCMethod.IsTxExecutedInBlock, params);
|
|
127
142
|
}
|
|
@@ -179,6 +194,9 @@ export class DaemonMethods {
|
|
|
179
194
|
extractKeyFromAddress(params) {
|
|
180
195
|
return this.dataCall(RPCMethod.ExtractKeyFromAddress, params);
|
|
181
196
|
}
|
|
197
|
+
keyToAddress(params) {
|
|
198
|
+
return this.dataCall(RPCMethod.KeyToAddress, params);
|
|
199
|
+
}
|
|
182
200
|
makeIntegratedAddress(params) {
|
|
183
201
|
return this.dataCall(RPCMethod.MakeIntegratedAddress, params);
|
|
184
202
|
}
|
|
@@ -206,6 +224,9 @@ export class DaemonMethods {
|
|
|
206
224
|
getContractRegisteredExecutionsAtTopoheight(params) {
|
|
207
225
|
return this.dataCall(RPCMethod.GetContractRegisteredExecutionsAtTopoheight, params);
|
|
208
226
|
}
|
|
227
|
+
getContractsOutputs(params) {
|
|
228
|
+
return this.dataCall(RPCMethod.GetContractsOutputs);
|
|
229
|
+
}
|
|
209
230
|
getContractModule(params) {
|
|
210
231
|
return this.dataCall(RPCMethod.GetContractModule, params);
|
|
211
232
|
}
|
|
@@ -13,10 +13,14 @@ export declare class RPC extends HttpRPC {
|
|
|
13
13
|
getStableHeight(): Promise<number>;
|
|
14
14
|
getStableTopoheight(): Promise<number>;
|
|
15
15
|
getHardForks(): Promise<types.HardFork[]>;
|
|
16
|
-
getBlockAtTopoheight(params: types.
|
|
16
|
+
getBlockAtTopoheight(params: types.GetBlockAtTopoHeightParams): Promise<types.Block>;
|
|
17
17
|
getBlocksAtHeight(params: types.GetBlocksAtHeightParams): Promise<types.Block[]>;
|
|
18
18
|
getBlockByHash(params: types.GetBlockByHashParams): Promise<types.Block>;
|
|
19
19
|
getTopBlock(params?: types.GetTopBlockParams): Promise<types.Block>;
|
|
20
|
+
getBlockDifficultyByHash(params: types.GetBlockDifficultyByHashParams): Promise<types.GetDifficultyResult>;
|
|
21
|
+
getBlockBaseFeeByHash(params: types.GetBlockBaseFeeByHashParams): Promise<types.GetBlockBaseFeeByHashResult>;
|
|
22
|
+
getBlockSummaryAtTopoheight(params: types.GetBlockAtTopoHeightParams): Promise<types.GetBlockSummaryResult>;
|
|
23
|
+
getBlockSummaryByHash(params: types.GetBlockSummaryByHashParams): Promise<types.GetBlockSummaryResult>;
|
|
20
24
|
getBalance(params: types.GetBalanceParams): Promise<types.GetBalanceResult>;
|
|
21
25
|
getStableBalance(params: types.GetBalanceParams): Promise<types.GetStableBalanceResult>;
|
|
22
26
|
hasBalance(params: types.HasBalanceParams): Promise<types.HasBalanceResult>;
|
|
@@ -35,6 +39,7 @@ export declare class RPC extends HttpRPC {
|
|
|
35
39
|
getTransationExecutor(hash: string): Promise<types.GetTransactionExecutorResult>;
|
|
36
40
|
getTransaction(hash: string): Promise<types.TransactionResponse>;
|
|
37
41
|
getTransactions(txHashes: string[]): Promise<types.TransactionResponse[]>;
|
|
42
|
+
getTransactionsSummary(params: types.GetTransactionsParams): Promise<types.TransactionSummary[]>;
|
|
38
43
|
isTxExecutedInBlock(params: types.IsTxExecutedInBlockParams): Promise<boolean>;
|
|
39
44
|
p2pStatus(): Promise<types.P2PStatusResult>;
|
|
40
45
|
getPeers(): Promise<types.GetPeersResult>;
|
|
@@ -54,6 +59,7 @@ export declare class RPC extends HttpRPC {
|
|
|
54
59
|
validateAddress(params: types.ValidateAddressParams): Promise<types.ValidateAddressResult>;
|
|
55
60
|
splitAddress(params: types.SplitAddressParams): Promise<types.SplitAddressResult>;
|
|
56
61
|
extractKeyFromAddress(params: types.ExtractKeyFromAddressParams): Promise<string | number[]>;
|
|
62
|
+
keyToAddress(params: types.KeyToAddressParams): Promise<types.Address>;
|
|
57
63
|
makeIntegratedAddress(params: types.MakeIntegratedAddressParams): Promise<string>;
|
|
58
64
|
decryptExtraData(params: types.DecryptExtraDataParams): Promise<unknown>;
|
|
59
65
|
getMultisigAtTopoheight(params: types.GetMutilsigAtTopoheightParams): Promise<types.GetMutilsigAtTopoheightResult>;
|
|
@@ -63,6 +69,7 @@ export declare class RPC extends HttpRPC {
|
|
|
63
69
|
getContractLogs(params: types.GetContractLogsParams): Promise<types.ContractLog[]>;
|
|
64
70
|
getContractScheduledExecutionsAtTopoheight(params: types.GetContractScheduledExecutionsAtTopoheightParams): Promise<types.ScheduledExecution[]>;
|
|
65
71
|
getContractRegisteredExecutionsAtTopoheight(params: types.GetContractScheduledExecutionsAtTopoheightParams): Promise<[number, string][]>;
|
|
72
|
+
getContractsOutputs(params: types.GetContractOutputsParams): Promise<types.GetContractsOutputsResult>;
|
|
66
73
|
getContractModule(params: types.GetContractModuleParams): Promise<types.GetContractModuleResult>;
|
|
67
74
|
getContractData(params: types.GetContractDataParams): Promise<unknown>;
|
|
68
75
|
getContractDataAtTopoheight(params: types.GetContractDataAtTopoheightParams): Promise<unknown>;
|
|
@@ -40,6 +40,74 @@ export interface Block {
|
|
|
40
40
|
txs_hashes: string[];
|
|
41
41
|
transactions?: Transaction[];
|
|
42
42
|
}
|
|
43
|
+
export interface GetBlockDifficultyByHashParams {
|
|
44
|
+
block_hash: string;
|
|
45
|
+
}
|
|
46
|
+
export interface GetBlockBaseFeeByHashParams {
|
|
47
|
+
block_hash: string;
|
|
48
|
+
}
|
|
49
|
+
export interface GetBlockBaseFeeByHashResult {
|
|
50
|
+
fee_per_kb: number;
|
|
51
|
+
block_size_ema: number;
|
|
52
|
+
}
|
|
53
|
+
export interface TransactionSummary {
|
|
54
|
+
hash: string;
|
|
55
|
+
source: string;
|
|
56
|
+
fee: number;
|
|
57
|
+
size: number;
|
|
58
|
+
}
|
|
59
|
+
export interface GetBlockSummaryResult {
|
|
60
|
+
block_hash: string;
|
|
61
|
+
height: number;
|
|
62
|
+
miner: string;
|
|
63
|
+
timestamp: number;
|
|
64
|
+
block_type: BlockType;
|
|
65
|
+
cumulative_difficulty: string;
|
|
66
|
+
difficulty: string;
|
|
67
|
+
topoheight: number;
|
|
68
|
+
reward: number;
|
|
69
|
+
miner_reward: number;
|
|
70
|
+
dev_reward: number;
|
|
71
|
+
supply: number;
|
|
72
|
+
total_fees: number;
|
|
73
|
+
total_fees_burned: number;
|
|
74
|
+
transactions: TransactionSummary[];
|
|
75
|
+
}
|
|
76
|
+
export interface GetBlockSummaryByHashParams {
|
|
77
|
+
hash: string;
|
|
78
|
+
}
|
|
79
|
+
export interface GetTransactionsParams {
|
|
80
|
+
tx_hashes: string[];
|
|
81
|
+
}
|
|
82
|
+
export type KeyToAddressParams = string | number[];
|
|
83
|
+
export declare enum AddressType {
|
|
84
|
+
Normal = "normal",
|
|
85
|
+
Data = "data"
|
|
86
|
+
}
|
|
87
|
+
export interface Address {
|
|
88
|
+
mainnet: boolean;
|
|
89
|
+
addr_type: AddressType;
|
|
90
|
+
key: any;
|
|
91
|
+
}
|
|
92
|
+
export interface ContractTransfersEntryKey {
|
|
93
|
+
contract: string;
|
|
94
|
+
caller: string;
|
|
95
|
+
}
|
|
96
|
+
export interface ContractTransfersEntry {
|
|
97
|
+
transfers: {
|
|
98
|
+
[hash: string]: number;
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
export interface GetContractsOutputsResult {
|
|
102
|
+
executions: Array<{
|
|
103
|
+
key: ContractTransfersEntryKey;
|
|
104
|
+
value: ContractTransfersEntry;
|
|
105
|
+
}>;
|
|
106
|
+
}
|
|
107
|
+
export interface GetContractOutputsParams {
|
|
108
|
+
address: string;
|
|
109
|
+
topoheight: number;
|
|
110
|
+
}
|
|
43
111
|
export interface GetBalanceParams {
|
|
44
112
|
address: string;
|
|
45
113
|
asset: string;
|
|
@@ -265,7 +333,7 @@ export interface GetAccountAssetsParams {
|
|
|
265
333
|
skip?: number;
|
|
266
334
|
maximum?: number;
|
|
267
335
|
}
|
|
268
|
-
export interface
|
|
336
|
+
export interface GetBlockAtTopoHeightParams {
|
|
269
337
|
topoheight: number;
|
|
270
338
|
include_txs?: boolean;
|
|
271
339
|
}
|
|
@@ -322,6 +390,11 @@ export interface AccountHistory {
|
|
|
322
390
|
deploy_contract?: {
|
|
323
391
|
deposits?: string[];
|
|
324
392
|
};
|
|
393
|
+
from_contract?: {
|
|
394
|
+
contract: string;
|
|
395
|
+
asset: string;
|
|
396
|
+
amount: number;
|
|
397
|
+
};
|
|
325
398
|
}
|
|
326
399
|
export interface PeerPeerListUpdated {
|
|
327
400
|
peer_id: string;
|
|
@@ -359,7 +432,11 @@ export interface AssetData {
|
|
|
359
432
|
name: string;
|
|
360
433
|
ticker: string;
|
|
361
434
|
max_supply: "none" | MaxSupplyFixed | MaxSupplyMintable;
|
|
362
|
-
owner: "none" |
|
|
435
|
+
owner: "none" | {
|
|
436
|
+
creator: AssetCreator;
|
|
437
|
+
} | {
|
|
438
|
+
owner: AssetOwner;
|
|
439
|
+
};
|
|
363
440
|
topoheight: number;
|
|
364
441
|
}
|
|
365
442
|
export interface AssetWithData extends AssetData {
|
|
@@ -764,6 +841,10 @@ export declare enum RPCMethod {
|
|
|
764
841
|
GetBlocksAtHeight = "get_blocks_at_height",
|
|
765
842
|
GetBlockByHash = "get_block_by_hash",
|
|
766
843
|
GetTopBlock = "get_top_block",
|
|
844
|
+
GetBlockDifficultyByHash = "get_block_difficulty_by_hash",
|
|
845
|
+
GetBlockBaseFeeByHash = "get_block_base_fee_by_hash",
|
|
846
|
+
GetBlockSummaryAtTopoheight = "get_block_summary_at_topoheight",
|
|
847
|
+
GetBlockSummaryByHash = "get_block_summary_by_hash",
|
|
767
848
|
GetBalance = "get_balance",
|
|
768
849
|
GetStableBalance = "get_stable_balance",
|
|
769
850
|
HasBalance = "has_balance",
|
|
@@ -782,9 +863,11 @@ export declare enum RPCMethod {
|
|
|
782
863
|
GetTransactionExecutor = "get_transaction_executor",
|
|
783
864
|
GetTransaction = "get_transaction",
|
|
784
865
|
GetTransactions = "get_transactions",
|
|
866
|
+
GetTransactionsSummary = "get_transactions_summary",
|
|
785
867
|
IsTxExecutedInBlock = "is_tx_executed_in_block",
|
|
786
868
|
P2PStatus = "p2p_status",
|
|
787
869
|
GetPeers = "get_peers",
|
|
870
|
+
GetP2PBlockPropagation = "get_p2p_block_propagation",
|
|
788
871
|
GetMempool = "get_mempool",
|
|
789
872
|
GetMempoolSummary = "get_mempool_summary",
|
|
790
873
|
GetMempoolCache = "get_mempool_cache",
|
|
@@ -801,6 +884,7 @@ export declare enum RPCMethod {
|
|
|
801
884
|
ValidateAddress = "validate_address",
|
|
802
885
|
SplitAddress = "split_address",
|
|
803
886
|
ExtractKeyFromAddress = "extract_key_from_address",
|
|
887
|
+
KeyToAddress = "key_to_address",
|
|
804
888
|
MakeIntegratedAddress = "make_integrated_address",
|
|
805
889
|
DecryptExtraData = "decrypt_extra_data",
|
|
806
890
|
GetMultisigAtTopoheight = "get_multisig_at_topoheight",
|
|
@@ -810,6 +894,7 @@ export declare enum RPCMethod {
|
|
|
810
894
|
GetContractLogs = "get_contract_logs",
|
|
811
895
|
GetContractScheduledExecutionsAtTopoheight = "get_contract_scheduled_executions_at_topoheight",
|
|
812
896
|
GetContractRegisteredExecutionsAtTopoheight = "get_contract_registered_executions_at_topoheight",
|
|
897
|
+
GetContractsOutputs = "get_contracts_outputs",
|
|
813
898
|
GetContractModule = "get_contract_module",
|
|
814
899
|
GetContractData = "get_contract_data",
|
|
815
900
|
GetContractDataAtTopoheight = "get_contract_data_at_topoheight",
|
|
@@ -818,7 +903,6 @@ export declare enum RPCMethod {
|
|
|
818
903
|
GetContractAssets = "get_contract_assets",
|
|
819
904
|
GetContracts = "get_contracts",
|
|
820
905
|
GetContractDataEntries = "get_contract_data_entries",
|
|
821
|
-
GetP2PBlockPropagation = "get_p2p_block_propagation",
|
|
822
906
|
GetBlockTemplate = "get_block_template",
|
|
823
907
|
GetMinerWork = "get_miner_work",
|
|
824
908
|
SubmitBlock = "submit_block"
|
|
@@ -111,10 +111,14 @@ export declare class DaemonMethods {
|
|
|
111
111
|
getStableHeight(): Promise<number>;
|
|
112
112
|
getStableTopoheight(): Promise<number>;
|
|
113
113
|
getHardForks(): Promise<types.HardFork[]>;
|
|
114
|
-
getBlockAtTopoheight(params: types.
|
|
114
|
+
getBlockAtTopoheight(params: types.GetBlockAtTopoHeightParams): Promise<types.Block>;
|
|
115
115
|
getBlocksAtHeight(params: types.GetBlocksAtHeightParams): Promise<types.Block[]>;
|
|
116
116
|
getBlockByHash(params: types.GetBlockByHashParams): Promise<types.Block>;
|
|
117
117
|
getTopBlock(params: types.GetTopBlockParams): Promise<types.Block>;
|
|
118
|
+
getBlockDifficultyByHash(params: types.GetBlockDifficultyByHashParams): Promise<types.GetDifficultyResult>;
|
|
119
|
+
getBlockBaseFeeByHash(params: types.GetBlockBaseFeeByHashParams): Promise<types.GetBlockBaseFeeByHashResult>;
|
|
120
|
+
getBlockSummaryAtTopoheight(params: types.GetBlockAtTopoHeightParams): Promise<types.GetBlockSummaryResult>;
|
|
121
|
+
getBlockSummaryByHash(params: types.GetBlockSummaryByHashParams): Promise<types.GetBlockSummaryResult>;
|
|
118
122
|
getBalance(params: types.GetBalanceParams): Promise<types.GetBalanceResult>;
|
|
119
123
|
getStableBalance(params: types.GetBalanceParams): Promise<types.GetStableBalanceResult>;
|
|
120
124
|
hasBalance(params: types.HasBalanceParams): Promise<types.HasBalanceResult>;
|
|
@@ -133,6 +137,7 @@ export declare class DaemonMethods {
|
|
|
133
137
|
getTransactionExecutor(hash: string): Promise<types.GetTransactionExecutorResult>;
|
|
134
138
|
getTransaction(hash: string): Promise<types.TransactionResponse>;
|
|
135
139
|
getTransactions(txHashes: string[]): Promise<types.TransactionResponse[]>;
|
|
140
|
+
getTransactionsSummary(params: types.GetTransactionsParams): Promise<types.TransactionSummary[]>;
|
|
136
141
|
isTxExecutedInBlock(params: types.IsTxExecutedInBlockParams): Promise<boolean>;
|
|
137
142
|
p2pStatus(): Promise<types.P2PStatusResult>;
|
|
138
143
|
getPeers(): Promise<types.GetPeersResult>;
|
|
@@ -152,6 +157,7 @@ export declare class DaemonMethods {
|
|
|
152
157
|
validateAddress(params: types.ValidateAddressParams): Promise<types.ValidateAddressResult>;
|
|
153
158
|
splitAddress(params: types.SplitAddressParams): Promise<types.SplitAddressResult>;
|
|
154
159
|
extractKeyFromAddress(params: types.ExtractKeyFromAddressParams): Promise<string | number[]>;
|
|
160
|
+
keyToAddress(params: types.KeyToAddressParams): Promise<types.Address>;
|
|
155
161
|
makeIntegratedAddress(params: types.MakeIntegratedAddressParams): Promise<string>;
|
|
156
162
|
decryptExtraData(params: types.DecryptExtraDataParams): Promise<unknown>;
|
|
157
163
|
getMultisigAtTopoheight(params: types.GetMutilsigAtTopoheightParams): Promise<types.GetMutilsigAtTopoheightResult>;
|
|
@@ -161,6 +167,7 @@ export declare class DaemonMethods {
|
|
|
161
167
|
getContractLogs(params: types.GetContractLogsParams): Promise<types.ContractLog[]>;
|
|
162
168
|
getContractScheduledExecutionsAtTopoheight(params: types.GetContractScheduledExecutionsAtTopoheightParams): Promise<types.ScheduledExecution[]>;
|
|
163
169
|
getContractRegisteredExecutionsAtTopoheight(params: types.GetContractScheduledExecutionsAtTopoheightParams): Promise<[number, string][]>;
|
|
170
|
+
getContractsOutputs(params: types.GetContractOutputsParams): Promise<types.GetContractsOutputsResult>;
|
|
164
171
|
getContractModule(params: types.GetContractModuleParams): Promise<types.GetContractModuleResult>;
|
|
165
172
|
getContractData(params: types.GetContractDataParams): Promise<unknown>;
|
|
166
173
|
getContractDataAtTopoheight(params: types.GetContractDataAtTopoheightParams): Promise<unknown>;
|
package/package.json
CHANGED