@xelis/sdk 0.8.0 → 0.8.2

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.
@@ -16,128 +16,128 @@ var __extends = (this && this.__extends) || (function () {
16
16
  })();
17
17
  exports.__esModule = true;
18
18
  exports.RPC = void 0;
19
- var types_1 = require("./types");
20
- var rpc_1 = require("../lib/rpc");
19
+ var types_js_1 = require("./types.js");
20
+ var rpc_js_1 = require("../lib/rpc.js");
21
21
  var RPC = /** @class */ (function (_super) {
22
22
  __extends(RPC, _super);
23
23
  function RPC() {
24
24
  return _super !== null && _super.apply(this, arguments) || this;
25
25
  }
26
26
  RPC.prototype.getVersion = function () {
27
- return this.post(types_1.RPCMethod.GetVersion);
27
+ return this.post(types_js_1.RPCMethod.GetVersion);
28
28
  };
29
29
  RPC.prototype.getHeight = function () {
30
- return this.post(types_1.RPCMethod.GetHeight);
30
+ return this.post(types_js_1.RPCMethod.GetHeight);
31
31
  };
32
32
  RPC.prototype.getTopoHeight = function () {
33
- return this.post(types_1.RPCMethod.GetTopoHeight);
33
+ return this.post(types_js_1.RPCMethod.GetTopoHeight);
34
34
  };
35
35
  RPC.prototype.getStableHeight = function () {
36
- return this.post(types_1.RPCMethod.GetStableHeight);
36
+ return this.post(types_js_1.RPCMethod.GetStableHeight);
37
37
  };
38
38
  RPC.prototype.getBlockTemplate = function (address) {
39
- return this.post(types_1.RPCMethod.GetBlockTemplate, { address: address });
39
+ return this.post(types_js_1.RPCMethod.GetBlockTemplate, { address: address });
40
40
  };
41
41
  RPC.prototype.getBlockAtTopoHeight = function (params) {
42
- return this.post(types_1.RPCMethod.GetBlockAtTopoHeight, params);
42
+ return this.post(types_js_1.RPCMethod.GetBlockAtTopoHeight, params);
43
43
  };
44
44
  RPC.prototype.getBlocksAtHeight = function (params) {
45
- return this.post(types_1.RPCMethod.GetBlocksAtHeight, params);
45
+ return this.post(types_js_1.RPCMethod.GetBlocksAtHeight, params);
46
46
  };
47
47
  RPC.prototype.getBlockByHash = function (params) {
48
- return this.post(types_1.RPCMethod.GetBlockByHash, params);
48
+ return this.post(types_js_1.RPCMethod.GetBlockByHash, params);
49
49
  };
50
50
  RPC.prototype.getTopBlock = function (params) {
51
- return this.post(types_1.RPCMethod.GetTopBlock, params);
51
+ return this.post(types_js_1.RPCMethod.GetTopBlock, params);
52
52
  };
53
53
  RPC.prototype.submitBlock = function (blockTemplate) {
54
- return this.post(types_1.RPCMethod.SubmitBlock, { block_template: blockTemplate });
54
+ return this.post(types_js_1.RPCMethod.SubmitBlock, { block_template: blockTemplate });
55
55
  };
56
56
  RPC.prototype.getBalance = function (params) {
57
- return this.post(types_1.RPCMethod.GetBalance, params);
57
+ return this.post(types_js_1.RPCMethod.GetBalance, params);
58
58
  };
59
59
  RPC.prototype.hasBalance = function (params) {
60
- return this.post(types_1.RPCMethod.HasBalance, params);
60
+ return this.post(types_js_1.RPCMethod.HasBalance, params);
61
61
  };
62
62
  RPC.prototype.getBalanceAtTopoHeight = function (params) {
63
- return this.post(types_1.RPCMethod.GetBalanceAtTopoHeight, params);
63
+ return this.post(types_js_1.RPCMethod.GetBalanceAtTopoHeight, params);
64
64
  };
65
65
  RPC.prototype.getInfo = function () {
66
- return this.post(types_1.RPCMethod.GetInfo);
66
+ return this.post(types_js_1.RPCMethod.GetInfo);
67
67
  };
68
68
  RPC.prototype.getNonce = function (params) {
69
- return this.post(types_1.RPCMethod.GetNonce, params);
69
+ return this.post(types_js_1.RPCMethod.GetNonce, params);
70
70
  };
71
71
  RPC.prototype.hasNonce = function (params) {
72
- return this.post(types_1.RPCMethod.HasNonce, params);
72
+ return this.post(types_js_1.RPCMethod.HasNonce, params);
73
73
  };
74
74
  RPC.prototype.getNonceAtTopoheight = function (params) {
75
- return this.post(types_1.RPCMethod.GetNonceAtTopoheight, params);
75
+ return this.post(types_js_1.RPCMethod.GetNonceAtTopoheight, params);
76
76
  };
77
77
  RPC.prototype.getAsset = function (params) {
78
- return this.post(types_1.RPCMethod.GetAsset, params);
78
+ return this.post(types_js_1.RPCMethod.GetAsset, params);
79
79
  };
80
80
  RPC.prototype.getAssets = function () {
81
- return this.post(types_1.RPCMethod.GetAssets);
81
+ return this.post(types_js_1.RPCMethod.GetAssets);
82
82
  };
83
83
  RPC.prototype.countAssets = function () {
84
- return this.post(types_1.RPCMethod.CountAssets);
84
+ return this.post(types_js_1.RPCMethod.CountAssets);
85
85
  };
86
86
  RPC.prototype.countAccounts = function () {
87
- return this.post(types_1.RPCMethod.CountAccounts);
87
+ return this.post(types_js_1.RPCMethod.CountAccounts);
88
88
  };
89
89
  RPC.prototype.countTransactions = function () {
90
- return this.post(types_1.RPCMethod.CountTransactions);
90
+ return this.post(types_js_1.RPCMethod.CountTransactions);
91
91
  };
92
92
  RPC.prototype.submitTransaction = function (hexData) {
93
- return this.post(types_1.RPCMethod.SubmitTransaction, { data: hexData });
93
+ return this.post(types_js_1.RPCMethod.SubmitTransaction, { data: hexData });
94
94
  };
95
95
  RPC.prototype.getTransaction = function (hash) {
96
- return this.post(types_1.RPCMethod.GetTransaction, { hash: hash });
96
+ return this.post(types_js_1.RPCMethod.GetTransaction, { hash: hash });
97
97
  };
98
98
  RPC.prototype.p2pStatus = function () {
99
- return this.post(types_1.RPCMethod.P2PStatus);
99
+ return this.post(types_js_1.RPCMethod.P2PStatus);
100
100
  };
101
101
  RPC.prototype.getPeers = function () {
102
- return this.post(types_1.RPCMethod.GetPeers);
102
+ return this.post(types_js_1.RPCMethod.GetPeers);
103
103
  };
104
104
  RPC.prototype.getMemPool = function () {
105
- return this.post(types_1.RPCMethod.GetMempool);
105
+ return this.post(types_js_1.RPCMethod.GetMempool);
106
106
  };
107
107
  RPC.prototype.getTips = function () {
108
- return this.post(types_1.RPCMethod.GetTips);
108
+ return this.post(types_js_1.RPCMethod.GetTips);
109
109
  };
110
110
  RPC.prototype.getDAGOrder = function (params) {
111
- return this.post(types_1.RPCMethod.GetDAGOrder, params);
111
+ return this.post(types_js_1.RPCMethod.GetDAGOrder, params);
112
112
  };
113
113
  RPC.prototype.getBlocksRangeByTopoheight = function (params) {
114
- return this.post(types_1.RPCMethod.GetBlocksRangeByTopoheight, params);
114
+ return this.post(types_js_1.RPCMethod.GetBlocksRangeByTopoheight, params);
115
115
  };
116
116
  RPC.prototype.getBlocksRangeByHeight = function (params) {
117
- return this.post(types_1.RPCMethod.GetBlocksRangeByHeight, params);
117
+ return this.post(types_js_1.RPCMethod.GetBlocksRangeByHeight, params);
118
118
  };
119
119
  RPC.prototype.getTransactions = function (txHashes) {
120
- return this.post(types_1.RPCMethod.GetTransactions, { tx_hashes: txHashes });
120
+ return this.post(types_js_1.RPCMethod.GetTransactions, { tx_hashes: txHashes });
121
121
  };
122
122
  RPC.prototype.getAccountHistory = function (params) {
123
- return this.post(types_1.RPCMethod.GetAccountHistory, params);
123
+ return this.post(types_js_1.RPCMethod.GetAccountHistory, params);
124
124
  };
125
125
  RPC.prototype.getAccountAssets = function (address) {
126
- return this.post(types_1.RPCMethod.GetAccountAssets, { address: address });
126
+ return this.post(types_js_1.RPCMethod.GetAccountAssets, { address: address });
127
127
  };
128
128
  RPC.prototype.getAccounts = function (params) {
129
- return this.post(types_1.RPCMethod.GetAccounts, params);
129
+ return this.post(types_js_1.RPCMethod.GetAccounts, params);
130
130
  };
131
131
  RPC.prototype.isTxExecutedInBlock = function (params) {
132
- return this.post(types_1.RPCMethod.IsTxExecutedInBlock, params);
132
+ return this.post(types_js_1.RPCMethod.IsTxExecutedInBlock, params);
133
133
  };
134
134
  RPC.prototype.getDevFeeThresholds = function () {
135
- return this.post(types_1.RPCMethod.GetDevFeeThresholds);
135
+ return this.post(types_js_1.RPCMethod.GetDevFeeThresholds);
136
136
  };
137
137
  RPC.prototype.getSizeOnDisk = function () {
138
- return this.post(types_1.RPCMethod.GetSizeOnDisk);
138
+ return this.post(types_js_1.RPCMethod.GetSizeOnDisk);
139
139
  };
140
140
  return RPC;
141
- }(rpc_1.RPC));
141
+ }(rpc_js_1.RPC));
142
142
  exports.RPC = RPC;
143
143
  exports["default"] = RPC;
@@ -52,8 +52,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
52
52
  };
53
53
  exports.__esModule = true;
54
54
  exports.WS = exports.DaemonMethods = void 0;
55
- var types_1 = require("./types");
56
- var websocket_1 = require("../lib/websocket");
55
+ var types_js_1 = require("./types.js");
56
+ var websocket_js_1 = require("../lib/websocket.js");
57
57
  var DaemonMethods = /** @class */ (function () {
58
58
  function DaemonMethods(ws, prefix) {
59
59
  if (prefix === void 0) { prefix = ""; }
@@ -71,154 +71,154 @@ var DaemonMethods = /** @class */ (function () {
71
71
  return this.ws.dataCall(this.prefix + method, params);
72
72
  };
73
73
  DaemonMethods.prototype.onNewBlock = function (onData) {
74
- return this.listenEvent(types_1.RPCEvent.NewBlock, onData);
74
+ return this.listenEvent(types_js_1.RPCEvent.NewBlock, onData);
75
75
  };
76
76
  DaemonMethods.prototype.onTransactionAddedInMempool = function (onData) {
77
- return this.listenEvent(types_1.RPCEvent.TransactionAddedInMempool, onData);
77
+ return this.listenEvent(types_js_1.RPCEvent.TransactionAddedInMempool, onData);
78
78
  };
79
79
  DaemonMethods.prototype.onTransactionExecuted = function (onData) {
80
- return this.listenEvent(types_1.RPCEvent.TransactionExecuted, onData);
80
+ return this.listenEvent(types_js_1.RPCEvent.TransactionExecuted, onData);
81
81
  };
82
82
  DaemonMethods.prototype.onBlockOrdered = function (onData) {
83
- return this.listenEvent(types_1.RPCEvent.BlockOrdered, onData);
83
+ return this.listenEvent(types_js_1.RPCEvent.BlockOrdered, onData);
84
84
  };
85
85
  DaemonMethods.prototype.onPeerConnected = function (onData) {
86
- return this.listenEvent(types_1.RPCEvent.PeerConnected, onData);
86
+ return this.listenEvent(types_js_1.RPCEvent.PeerConnected, onData);
87
87
  };
88
88
  DaemonMethods.prototype.onPeerDisconnected = function (onData) {
89
- return this.listenEvent(types_1.RPCEvent.PeerDisconnected, onData);
89
+ return this.listenEvent(types_js_1.RPCEvent.PeerDisconnected, onData);
90
90
  };
91
91
  DaemonMethods.prototype.onPeerPeerListUpdated = function (onData) {
92
- return this.listenEvent(types_1.RPCEvent.PeerPeerListUpdated, onData);
92
+ return this.listenEvent(types_js_1.RPCEvent.PeerPeerListUpdated, onData);
93
93
  };
94
94
  DaemonMethods.prototype.onPeerPeerDisconnected = function (onData) {
95
- return this.listenEvent(types_1.RPCEvent.PeerPeerDisconnected, onData);
95
+ return this.listenEvent(types_js_1.RPCEvent.PeerPeerDisconnected, onData);
96
96
  };
97
97
  DaemonMethods.prototype.onPeerStateUpdated = function (onData) {
98
- return this.listenEvent(types_1.RPCEvent.PeerStateUpdated, onData);
98
+ return this.listenEvent(types_js_1.RPCEvent.PeerStateUpdated, onData);
99
99
  };
100
100
  DaemonMethods.prototype.onNewAsset = function (onData) {
101
- return this.listenEvent(types_1.RPCEvent.NewAsset, onData);
101
+ return this.listenEvent(types_js_1.RPCEvent.NewAsset, onData);
102
102
  };
103
103
  DaemonMethods.prototype.onBlockOrphaned = function (onData) {
104
- return this.listenEvent(types_1.RPCEvent.BlockOrphaned, onData);
104
+ return this.listenEvent(types_js_1.RPCEvent.BlockOrphaned, onData);
105
105
  };
106
106
  DaemonMethods.prototype.onTransactionOrphaned = function (onData) {
107
- return this.listenEvent(types_1.RPCEvent.TransactionOrphaned, onData);
107
+ return this.listenEvent(types_js_1.RPCEvent.TransactionOrphaned, onData);
108
108
  };
109
109
  DaemonMethods.prototype.onStableHeightChanged = function (onData) {
110
- return this.listenEvent(types_1.RPCEvent.StableHeightChanged, onData);
110
+ return this.listenEvent(types_js_1.RPCEvent.StableHeightChanged, onData);
111
111
  };
112
112
  DaemonMethods.prototype.getVersion = function () {
113
- return this.dataCall(types_1.RPCMethod.GetVersion);
113
+ return this.dataCall(types_js_1.RPCMethod.GetVersion);
114
114
  };
115
115
  DaemonMethods.prototype.getHeight = function () {
116
- return this.dataCall(types_1.RPCMethod.GetHeight);
116
+ return this.dataCall(types_js_1.RPCMethod.GetHeight);
117
117
  };
118
118
  DaemonMethods.prototype.getTopoHeight = function () {
119
- return this.dataCall(types_1.RPCMethod.GetTopoHeight);
119
+ return this.dataCall(types_js_1.RPCMethod.GetTopoHeight);
120
120
  };
121
121
  DaemonMethods.prototype.getStableHeight = function () {
122
- return this.dataCall(types_1.RPCMethod.GetStableHeight);
122
+ return this.dataCall(types_js_1.RPCMethod.GetStableHeight);
123
123
  };
124
124
  DaemonMethods.prototype.getBlockTemplate = function (address) {
125
- return this.dataCall(types_1.RPCMethod.GetBlockTemplate, { address: address });
125
+ return this.dataCall(types_js_1.RPCMethod.GetBlockTemplate, { address: address });
126
126
  };
127
127
  DaemonMethods.prototype.getBlockAtTopoHeight = function (params) {
128
- return this.dataCall(types_1.RPCMethod.GetBlockAtTopoHeight, params);
128
+ return this.dataCall(types_js_1.RPCMethod.GetBlockAtTopoHeight, params);
129
129
  };
130
130
  DaemonMethods.prototype.getBlocksAtHeight = function (params) {
131
- return this.dataCall(types_1.RPCMethod.GetBlocksAtHeight, params);
131
+ return this.dataCall(types_js_1.RPCMethod.GetBlocksAtHeight, params);
132
132
  };
133
133
  DaemonMethods.prototype.getBlockByHash = function (params) {
134
- return this.dataCall(types_1.RPCMethod.GetBlockByHash, params);
134
+ return this.dataCall(types_js_1.RPCMethod.GetBlockByHash, params);
135
135
  };
136
136
  DaemonMethods.prototype.getTopBlock = function (params) {
137
- return this.dataCall(types_1.RPCMethod.GetTopBlock, params);
137
+ return this.dataCall(types_js_1.RPCMethod.GetTopBlock, params);
138
138
  };
139
139
  DaemonMethods.prototype.submitBlock = function (blockTemplate) {
140
- return this.dataCall(types_1.RPCMethod.SubmitBlock, { block_template: blockTemplate });
140
+ return this.dataCall(types_js_1.RPCMethod.SubmitBlock, { block_template: blockTemplate });
141
141
  };
142
142
  DaemonMethods.prototype.getBalance = function (params) {
143
- return this.dataCall(types_1.RPCMethod.GetBalance, params);
143
+ return this.dataCall(types_js_1.RPCMethod.GetBalance, params);
144
144
  };
145
145
  DaemonMethods.prototype.hasBalance = function (params) {
146
- return this.dataCall(types_1.RPCMethod.HasBalance, params);
146
+ return this.dataCall(types_js_1.RPCMethod.HasBalance, params);
147
147
  };
148
148
  DaemonMethods.prototype.getBalanceAtTopoHeight = function (params) {
149
- return this.dataCall(types_1.RPCMethod.GetBalanceAtTopoHeight, params);
149
+ return this.dataCall(types_js_1.RPCMethod.GetBalanceAtTopoHeight, params);
150
150
  };
151
151
  DaemonMethods.prototype.getInfo = function () {
152
- return this.dataCall(types_1.RPCMethod.GetInfo);
152
+ return this.dataCall(types_js_1.RPCMethod.GetInfo);
153
153
  };
154
154
  DaemonMethods.prototype.getNonce = function (params) {
155
- return this.dataCall(types_1.RPCMethod.GetNonce, params);
155
+ return this.dataCall(types_js_1.RPCMethod.GetNonce, params);
156
156
  };
157
157
  DaemonMethods.prototype.hasNonce = function (params) {
158
- return this.dataCall(types_1.RPCMethod.HasNonce, params);
158
+ return this.dataCall(types_js_1.RPCMethod.HasNonce, params);
159
159
  };
160
160
  DaemonMethods.prototype.getAsset = function (params) {
161
- return this.dataCall(types_1.RPCMethod.GetAsset, params);
161
+ return this.dataCall(types_js_1.RPCMethod.GetAsset, params);
162
162
  };
163
163
  DaemonMethods.prototype.getAssets = function () {
164
- return this.dataCall(types_1.RPCMethod.GetAssets);
164
+ return this.dataCall(types_js_1.RPCMethod.GetAssets);
165
165
  };
166
166
  DaemonMethods.prototype.countAssets = function () {
167
- return this.dataCall(types_1.RPCMethod.CountAssets);
167
+ return this.dataCall(types_js_1.RPCMethod.CountAssets);
168
168
  };
169
169
  DaemonMethods.prototype.countAccounts = function () {
170
- return this.dataCall(types_1.RPCMethod.CountAccounts);
170
+ return this.dataCall(types_js_1.RPCMethod.CountAccounts);
171
171
  };
172
172
  DaemonMethods.prototype.countTransactions = function () {
173
- return this.dataCall(types_1.RPCMethod.CountTransactions);
173
+ return this.dataCall(types_js_1.RPCMethod.CountTransactions);
174
174
  };
175
175
  DaemonMethods.prototype.submitTransaction = function (hexData) {
176
- return this.dataCall(types_1.RPCMethod.SubmitTransaction, { data: hexData });
176
+ return this.dataCall(types_js_1.RPCMethod.SubmitTransaction, { data: hexData });
177
177
  };
178
178
  DaemonMethods.prototype.getTransaction = function (hash) {
179
- return this.dataCall(types_1.RPCMethod.GetTransaction, { hash: hash });
179
+ return this.dataCall(types_js_1.RPCMethod.GetTransaction, { hash: hash });
180
180
  };
181
181
  DaemonMethods.prototype.p2pStatus = function () {
182
- return this.dataCall(types_1.RPCMethod.P2PStatus);
182
+ return this.dataCall(types_js_1.RPCMethod.P2PStatus);
183
183
  };
184
184
  DaemonMethods.prototype.getPeers = function () {
185
- return this.dataCall(types_1.RPCMethod.GetPeers);
185
+ return this.dataCall(types_js_1.RPCMethod.GetPeers);
186
186
  };
187
187
  DaemonMethods.prototype.getMemPool = function () {
188
- return this.dataCall(types_1.RPCMethod.GetMempool);
188
+ return this.dataCall(types_js_1.RPCMethod.GetMempool);
189
189
  };
190
190
  DaemonMethods.prototype.getTips = function () {
191
- return this.dataCall(types_1.RPCMethod.GetTips);
191
+ return this.dataCall(types_js_1.RPCMethod.GetTips);
192
192
  };
193
193
  DaemonMethods.prototype.getDAGOrder = function (params) {
194
- return this.dataCall(types_1.RPCMethod.GetDAGOrder, params);
194
+ return this.dataCall(types_js_1.RPCMethod.GetDAGOrder, params);
195
195
  };
196
196
  DaemonMethods.prototype.getBlocksRangeByTopoheight = function (params) {
197
- return this.dataCall(types_1.RPCMethod.GetBlocksRangeByTopoheight, params);
197
+ return this.dataCall(types_js_1.RPCMethod.GetBlocksRangeByTopoheight, params);
198
198
  };
199
199
  DaemonMethods.prototype.getBlocksRangeByHeight = function (params) {
200
- return this.dataCall(types_1.RPCMethod.GetBlocksRangeByHeight, params);
200
+ return this.dataCall(types_js_1.RPCMethod.GetBlocksRangeByHeight, params);
201
201
  };
202
202
  DaemonMethods.prototype.getTransactions = function (txHashes) {
203
- return this.dataCall(types_1.RPCMethod.GetTransactions, { tx_hashes: txHashes });
203
+ return this.dataCall(types_js_1.RPCMethod.GetTransactions, { tx_hashes: txHashes });
204
204
  };
205
205
  DaemonMethods.prototype.getAccountHistory = function (params) {
206
- return this.dataCall(types_1.RPCMethod.GetAccountHistory, params);
206
+ return this.dataCall(types_js_1.RPCMethod.GetAccountHistory, params);
207
207
  };
208
208
  DaemonMethods.prototype.getAccountAssets = function (address) {
209
- return this.dataCall(types_1.RPCMethod.GetAccountAssets, { address: address });
209
+ return this.dataCall(types_js_1.RPCMethod.GetAccountAssets, { address: address });
210
210
  };
211
211
  DaemonMethods.prototype.getAccounts = function (params) {
212
- return this.dataCall(types_1.RPCMethod.GetAccounts, params);
212
+ return this.dataCall(types_js_1.RPCMethod.GetAccounts, params);
213
213
  };
214
214
  DaemonMethods.prototype.isTxExecutedInBlock = function (params) {
215
- return this.dataCall(types_1.RPCMethod.IsTxExecutedInBlock, params);
215
+ return this.dataCall(types_js_1.RPCMethod.IsTxExecutedInBlock, params);
216
216
  };
217
217
  DaemonMethods.prototype.getDevFeeThresholds = function () {
218
- return this.dataCall(types_1.RPCMethod.GetDevFeeThresholds);
218
+ return this.dataCall(types_js_1.RPCMethod.GetDevFeeThresholds);
219
219
  };
220
220
  DaemonMethods.prototype.getSizeOnDisk = function () {
221
- return this.dataCall(types_1.RPCMethod.GetSizeOnDisk);
221
+ return this.dataCall(types_js_1.RPCMethod.GetSizeOnDisk);
222
222
  };
223
223
  return DaemonMethods;
224
224
  }());
@@ -231,6 +231,6 @@ var WS = /** @class */ (function (_super) {
231
231
  return _this;
232
232
  }
233
233
  return WS;
234
- }(websocket_1.WS));
234
+ }(websocket_js_1.WS));
235
235
  exports.WS = WS;
236
236
  exports["default"] = WS;
@@ -74,9 +74,9 @@ exports.__esModule = true;
74
74
  exports.useNodeSocket = exports.useNodeSocketSubscribe = exports.NodeSocketProvider = exports.INITIATING = void 0;
75
75
  var react_1 = __importStar(require("react"));
76
76
  var await_to_js_1 = __importDefault(require("await-to-js"));
77
- var websocket_1 = __importDefault(require("../daemon/websocket"));
77
+ var websocket_js_1 = __importDefault(require("../daemon/websocket.js"));
78
78
  exports.INITIATING = -1;
79
- var daemon = new websocket_1["default"]();
79
+ var daemon = new websocket_js_1["default"]();
80
80
  var Context = (0, react_1.createContext)({
81
81
  err: undefined,
82
82
  daemon: daemon,
@@ -53,8 +53,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
53
53
  exports.__esModule = true;
54
54
  exports.RPC = void 0;
55
55
  var js_base64_1 = require("js-base64");
56
- var types_1 = require("./types");
57
- var rpc_1 = require("../lib/rpc");
56
+ var types_js_1 = require("./types.js");
57
+ var rpc_js_1 = require("../lib/rpc.js");
58
58
  var RPC = /** @class */ (function (_super) {
59
59
  __extends(RPC, _super);
60
60
  function RPC(endpoint, username, password) {
@@ -74,58 +74,58 @@ var RPC = /** @class */ (function (_super) {
74
74
  });
75
75
  };
76
76
  RPC.prototype.getVersion = function () {
77
- return this.post(types_1.RPCMethod.GetVersion);
77
+ return this.post(types_js_1.RPCMethod.GetVersion);
78
78
  };
79
79
  RPC.prototype.getNetwork = function () {
80
- return this.post(types_1.RPCMethod.GetNetwork);
80
+ return this.post(types_js_1.RPCMethod.GetNetwork);
81
81
  };
82
82
  RPC.prototype.getNonce = function () {
83
- return this.post(types_1.RPCMethod.GetNonce);
83
+ return this.post(types_js_1.RPCMethod.GetNonce);
84
84
  };
85
85
  RPC.prototype.getTopoheight = function () {
86
- return this.post(types_1.RPCMethod.GetTopoheight);
86
+ return this.post(types_js_1.RPCMethod.GetTopoheight);
87
87
  };
88
88
  RPC.prototype.getAddress = function (params) {
89
89
  if (params === void 0) { params = {}; }
90
- return this.post(types_1.RPCMethod.GetAddress, params);
90
+ return this.post(types_js_1.RPCMethod.GetAddress, params);
91
91
  };
92
92
  RPC.prototype.splitAddress = function (params) {
93
- return this.post(types_1.RPCMethod.SplitAddress, params);
93
+ return this.post(types_js_1.RPCMethod.SplitAddress, params);
94
94
  };
95
95
  RPC.prototype.rescan = function () {
96
- return this.post(types_1.RPCMethod.Rescan);
96
+ return this.post(types_js_1.RPCMethod.Rescan);
97
97
  };
98
98
  RPC.prototype.getBalance = function (asset) {
99
- return this.post(types_1.RPCMethod.GetBalance, { asset: asset });
99
+ return this.post(types_js_1.RPCMethod.GetBalance, { asset: asset });
100
100
  };
101
101
  RPC.prototype.hasBalance = function (asset) {
102
- return this.post(types_1.RPCMethod.HasBalance, { asset: asset });
102
+ return this.post(types_js_1.RPCMethod.HasBalance, { asset: asset });
103
103
  };
104
104
  RPC.prototype.getTrackedAssets = function () {
105
- return this.post(types_1.RPCMethod.GetTrackedAssets);
105
+ return this.post(types_js_1.RPCMethod.GetTrackedAssets);
106
106
  };
107
107
  RPC.prototype.getAssetPrecision = function (params) {
108
- return this.post(types_1.RPCMethod.GetAssetPrecision, params);
108
+ return this.post(types_js_1.RPCMethod.GetAssetPrecision, params);
109
109
  };
110
110
  RPC.prototype.getTransaction = function (hash) {
111
- return this.post(types_1.RPCMethod.GetTransaction, { hash: hash });
111
+ return this.post(types_js_1.RPCMethod.GetTransaction, { hash: hash });
112
112
  };
113
113
  RPC.prototype.buildTransaction = function (params) {
114
- return this.post(types_1.RPCMethod.BuildTransaction, params);
114
+ return this.post(types_js_1.RPCMethod.BuildTransaction, params);
115
115
  };
116
116
  RPC.prototype.listTransactions = function (params) {
117
- return this.post(types_1.RPCMethod.ListTransactions, params);
117
+ return this.post(types_js_1.RPCMethod.ListTransactions, params);
118
118
  };
119
119
  RPC.prototype.isOnline = function () {
120
- return this.post(types_1.RPCMethod.IsOnline);
120
+ return this.post(types_js_1.RPCMethod.IsOnline);
121
121
  };
122
122
  RPC.prototype.signData = function (data) {
123
- return this.post(types_1.RPCMethod.SignData, data);
123
+ return this.post(types_js_1.RPCMethod.SignData, data);
124
124
  };
125
125
  RPC.prototype.estimateFees = function (txData) {
126
- return this.post(types_1.RPCMethod.EstimateFees, { tx_type: txData });
126
+ return this.post(types_js_1.RPCMethod.EstimateFees, { tx_type: txData });
127
127
  };
128
128
  return RPC;
129
- }(rpc_1.RPC));
129
+ }(rpc_js_1.RPC));
130
130
  exports.RPC = RPC;
131
131
  exports["default"] = RPC;
@@ -16,8 +16,8 @@ var __extends = (this && this.__extends) || (function () {
16
16
  })();
17
17
  exports.__esModule = true;
18
18
  exports.WS = exports.WalletMethods = void 0;
19
- var websocket_1 = require("../lib/websocket");
20
- var types_1 = require("./types");
19
+ var websocket_js_1 = require("../lib/websocket.js");
20
+ var types_js_1 = require("./types.js");
21
21
  var WalletMethods = /** @class */ (function () {
22
22
  function WalletMethods(ws, prefix) {
23
23
  if (prefix === void 0) { prefix = ""; }
@@ -28,53 +28,53 @@ var WalletMethods = /** @class */ (function () {
28
28
  return this.ws.dataCall(this.prefix + method, params);
29
29
  };
30
30
  WalletMethods.prototype.getVersion = function () {
31
- return this.dataCall(types_1.RPCMethod.GetVersion);
31
+ return this.dataCall(types_js_1.RPCMethod.GetVersion);
32
32
  };
33
33
  WalletMethods.prototype.getNetwork = function () {
34
- return this.dataCall(types_1.RPCMethod.GetNetwork);
34
+ return this.dataCall(types_js_1.RPCMethod.GetNetwork);
35
35
  };
36
36
  WalletMethods.prototype.getNonce = function () {
37
- return this.dataCall(types_1.RPCMethod.GetNonce);
37
+ return this.dataCall(types_js_1.RPCMethod.GetNonce);
38
38
  };
39
39
  WalletMethods.prototype.getTopoheight = function () {
40
- return this.dataCall(types_1.RPCMethod.GetTopoheight);
40
+ return this.dataCall(types_js_1.RPCMethod.GetTopoheight);
41
41
  };
42
42
  WalletMethods.prototype.getAddress = function (params) {
43
43
  if (params === void 0) { params = {}; }
44
- return this.dataCall(types_1.RPCMethod.GetAddress, params);
44
+ return this.dataCall(types_js_1.RPCMethod.GetAddress, params);
45
45
  };
46
46
  WalletMethods.prototype.splitAddress = function (params) {
47
- return this.dataCall(types_1.RPCMethod.SplitAddress, params);
47
+ return this.dataCall(types_js_1.RPCMethod.SplitAddress, params);
48
48
  };
49
49
  WalletMethods.prototype.rescan = function () {
50
- return this.dataCall(types_1.RPCMethod.Rescan);
50
+ return this.dataCall(types_js_1.RPCMethod.Rescan);
51
51
  };
52
52
  WalletMethods.prototype.getBalance = function (asset) {
53
- return this.dataCall(types_1.RPCMethod.GetBalance, { asset: asset });
53
+ return this.dataCall(types_js_1.RPCMethod.GetBalance, { asset: asset });
54
54
  };
55
55
  WalletMethods.prototype.getTrackedAssets = function () {
56
- return this.dataCall(types_1.RPCMethod.GetTrackedAssets);
56
+ return this.dataCall(types_js_1.RPCMethod.GetTrackedAssets);
57
57
  };
58
58
  WalletMethods.prototype.getAssetPrecision = function (params) {
59
- return this.dataCall(types_1.RPCMethod.GetAssetPrecision, params);
59
+ return this.dataCall(types_js_1.RPCMethod.GetAssetPrecision, params);
60
60
  };
61
61
  WalletMethods.prototype.getTransaction = function (hash) {
62
- return this.dataCall(types_1.RPCMethod.GetTransaction, { hash: hash });
62
+ return this.dataCall(types_js_1.RPCMethod.GetTransaction, { hash: hash });
63
63
  };
64
64
  WalletMethods.prototype.buildTransaction = function (params) {
65
- return this.dataCall(types_1.RPCMethod.BuildTransaction, params);
65
+ return this.dataCall(types_js_1.RPCMethod.BuildTransaction, params);
66
66
  };
67
67
  WalletMethods.prototype.listTransactions = function (params) {
68
- return this.dataCall(types_1.RPCMethod.GetTransaction, params);
68
+ return this.dataCall(types_js_1.RPCMethod.GetTransaction, params);
69
69
  };
70
70
  WalletMethods.prototype.isOnline = function () {
71
- return this.dataCall(types_1.RPCMethod.IsOnline);
71
+ return this.dataCall(types_js_1.RPCMethod.IsOnline);
72
72
  };
73
73
  WalletMethods.prototype.signData = function (data) {
74
- return this.dataCall(types_1.RPCMethod.SignData, data);
74
+ return this.dataCall(types_js_1.RPCMethod.SignData, data);
75
75
  };
76
76
  WalletMethods.prototype.estimateFees = function (txData) {
77
- return this.dataCall(types_1.RPCMethod.EstimateFees, { tx_type: txData });
77
+ return this.dataCall(types_js_1.RPCMethod.EstimateFees, { tx_type: txData });
78
78
  };
79
79
  return WalletMethods;
80
80
  }());
@@ -87,6 +87,6 @@ var WS = /** @class */ (function (_super) {
87
87
  return _this;
88
88
  }
89
89
  return WS;
90
- }(websocket_1.WS));
90
+ }(websocket_js_1.WS));
91
91
  exports.WS = WS;
92
92
  exports["default"] = WS;
@@ -16,16 +16,16 @@ var __extends = (this && this.__extends) || (function () {
16
16
  })();
17
17
  exports.__esModule = true;
18
18
  exports.WS = void 0;
19
- var websocket_1 = require("../lib/websocket");
20
- var websocket_2 = require("../daemon/websocket");
21
- var websocket_3 = require("../wallet/websocket");
19
+ var websocket_js_1 = require("../lib/websocket.js");
20
+ var websocket_js_2 = require("../daemon/websocket.js");
21
+ var websocket_js_3 = require("../wallet/websocket.js");
22
22
  var WS = /** @class */ (function (_super) {
23
23
  __extends(WS, _super);
24
24
  function WS() {
25
25
  var _this = _super.call(this) || this;
26
26
  _this.timeout = 0;
27
- _this.daemon = new websocket_2.DaemonMethods(_this, "node.");
28
- _this.wallet = new websocket_3.WalletMethods(_this, "wallet.");
27
+ _this.daemon = new websocket_js_2.DaemonMethods(_this, "node.");
28
+ _this.wallet = new websocket_js_3.WalletMethods(_this, "wallet.");
29
29
  return _this;
30
30
  }
31
31
  WS.prototype.authorize = function (app) {
@@ -33,6 +33,6 @@ var WS = /** @class */ (function (_super) {
33
33
  return this.call("", {}, data);
34
34
  };
35
35
  return WS;
36
- }(websocket_1.WS));
36
+ }(websocket_js_1.WS));
37
37
  exports.WS = WS;
38
38
  exports["default"] = WS;
@@ -13,8 +13,8 @@ var __extends = (this && this.__extends) || (function () {
13
13
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
14
  };
15
15
  })();
16
- import { RPCMethod } from './types';
17
- import { RPC as BaseRPC } from '../lib/rpc';
16
+ import { RPCMethod } from './types.js';
17
+ import { RPC as BaseRPC } from '../lib/rpc.js';
18
18
  var RPC = /** @class */ (function (_super) {
19
19
  __extends(RPC, _super);
20
20
  function RPC() {
@@ -49,8 +49,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
49
49
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
50
50
  }
51
51
  };
52
- import { RPCEvent, RPCMethod } from './types';
53
- import { WS as BaseWS } from '../lib/websocket';
52
+ import { RPCEvent, RPCMethod } from './types.js';
53
+ import { WS as BaseWS } from '../lib/websocket.js';
54
54
  var DaemonMethods = /** @class */ (function () {
55
55
  function DaemonMethods(ws, prefix) {
56
56
  if (prefix === void 0) { prefix = ""; }
@@ -45,7 +45,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
45
45
  };
46
46
  import React, { createContext, useContext, useEffect, useState } from 'react';
47
47
  import to from 'await-to-js';
48
- import DaemonWS from '../daemon/websocket';
48
+ import DaemonWS from '../daemon/websocket.js';
49
49
  export var INITIATING = -1;
50
50
  var daemon = new DaemonWS();
51
51
  var Context = createContext({
@@ -50,8 +50,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
50
50
  }
51
51
  };
52
52
  import { Base64 } from 'js-base64';
53
- import { RPCMethod } from './types';
54
- import { RPC as BaseRPC } from '../lib/rpc';
53
+ import { RPCMethod } from './types.js';
54
+ import { RPC as BaseRPC } from '../lib/rpc.js';
55
55
  var RPC = /** @class */ (function (_super) {
56
56
  __extends(RPC, _super);
57
57
  function RPC(endpoint, username, password) {
@@ -13,8 +13,8 @@ var __extends = (this && this.__extends) || (function () {
13
13
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
14
  };
15
15
  })();
16
- import { WS as BaseWS } from '../lib/websocket';
17
- import { RPCMethod } from './types';
16
+ import { WS as BaseWS } from '../lib/websocket.js';
17
+ import { RPCMethod } from './types.js';
18
18
  var WalletMethods = /** @class */ (function () {
19
19
  function WalletMethods(ws, prefix) {
20
20
  if (prefix === void 0) { prefix = ""; }
@@ -13,9 +13,9 @@ var __extends = (this && this.__extends) || (function () {
13
13
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
14
  };
15
15
  })();
16
- import { WS as BaseWS } from '../lib/websocket';
17
- import { DaemonMethods } from '../daemon/websocket';
18
- import { WalletMethods } from '../wallet/websocket';
16
+ import { WS as BaseWS } from '../lib/websocket.js';
17
+ import { DaemonMethods } from '../daemon/websocket.js';
18
+ import { WalletMethods } from '../wallet/websocket.js';
19
19
  var WS = /** @class */ (function (_super) {
20
20
  __extends(WS, _super);
21
21
  function WS() {
@@ -1,43 +1,43 @@
1
- import { Block, TopoHeightRangeParams, GetInfoResult, HeightRangeParams, GetBalanceResult, P2PStatusResult, GetBalanceParams, GetBalanceAtTopoHeightParams, GetAccountsParams, GetBlockAtTopoHeightParams, GetBlockByHashParams, GetBlocksAtHeightParams, GetTopBlockParams, GetNonceResult, GetNonceParams, GetAccountHistoryParams, AccounHistory, DevFee, DiskSize, HasBalanceParams, HasBalanceResult, AssetData, IsTxExecutedInBlockParams, GetAssetParams, GetPeersResult, GetBlockTemplateResult, VersionedBalance, VersionedNonce, GetNonceAtTopoheightParams, HasNonceParams, HasNonceResult, TransactionResponse } from './types';
2
- import { RPC as BaseRPC } from '../lib/rpc';
1
+ import { Block, TopoHeightRangeParams, GetInfoResult, HeightRangeParams, GetBalanceResult, P2PStatusResult, GetBalanceParams, GetBalanceAtTopoHeightParams, GetAccountsParams, GetBlockAtTopoHeightParams, GetBlockByHashParams, GetBlocksAtHeightParams, GetTopBlockParams, GetNonceResult, GetNonceParams, GetAccountHistoryParams, AccounHistory, DevFee, DiskSize, HasBalanceParams, HasBalanceResult, AssetData, IsTxExecutedInBlockParams, GetAssetParams, GetPeersResult, GetBlockTemplateResult, VersionedBalance, VersionedNonce, GetNonceAtTopoheightParams, HasNonceParams, HasNonceResult, TransactionResponse } from './types.js';
2
+ import { RPC as BaseRPC } from '../lib/rpc.js';
3
3
  export declare class RPC extends BaseRPC {
4
- getVersion(): Promise<import("../lib/types").RPCResponse<string>>;
5
- getHeight(): Promise<import("../lib/types").RPCResponse<number>>;
6
- getTopoHeight(): Promise<import("../lib/types").RPCResponse<number>>;
7
- getStableHeight(): Promise<import("../lib/types").RPCResponse<number>>;
8
- getBlockTemplate(address: string): Promise<import("../lib/types").RPCResponse<GetBlockTemplateResult>>;
9
- getBlockAtTopoHeight(params: GetBlockAtTopoHeightParams): Promise<import("../lib/types").RPCResponse<Block>>;
10
- getBlocksAtHeight(params: GetBlocksAtHeightParams): Promise<import("../lib/types").RPCResponse<Block[]>>;
11
- getBlockByHash(params: GetBlockByHashParams): Promise<import("../lib/types").RPCResponse<Block>>;
12
- getTopBlock(params: GetTopBlockParams): Promise<import("../lib/types").RPCResponse<Block>>;
13
- submitBlock(blockTemplate: string): Promise<import("../lib/types").RPCResponse<boolean>>;
14
- getBalance(params: GetBalanceParams): Promise<import("../lib/types").RPCResponse<GetBalanceResult>>;
15
- hasBalance(params: HasBalanceParams): Promise<import("../lib/types").RPCResponse<HasBalanceResult>>;
16
- getBalanceAtTopoHeight(params: GetBalanceAtTopoHeightParams): Promise<import("../lib/types").RPCResponse<VersionedBalance>>;
17
- getInfo(): Promise<import("../lib/types").RPCResponse<GetInfoResult>>;
18
- getNonce(params: GetNonceParams): Promise<import("../lib/types").RPCResponse<GetNonceResult>>;
19
- hasNonce(params: HasNonceParams): Promise<import("../lib/types").RPCResponse<HasNonceResult>>;
20
- getNonceAtTopoheight(params: GetNonceAtTopoheightParams): Promise<import("../lib/types").RPCResponse<VersionedNonce>>;
21
- getAsset(params: GetAssetParams): Promise<import("../lib/types").RPCResponse<AssetData>>;
22
- getAssets(): Promise<import("../lib/types").RPCResponse<string[]>>;
23
- countAssets(): Promise<import("../lib/types").RPCResponse<number>>;
24
- countAccounts(): Promise<import("../lib/types").RPCResponse<number>>;
25
- countTransactions(): Promise<import("../lib/types").RPCResponse<number>>;
26
- submitTransaction(hexData: string): Promise<import("../lib/types").RPCResponse<boolean>>;
27
- getTransaction(hash: string): Promise<import("../lib/types").RPCResponse<TransactionResponse>>;
28
- p2pStatus(): Promise<import("../lib/types").RPCResponse<P2PStatusResult>>;
29
- getPeers(): Promise<import("../lib/types").RPCResponse<GetPeersResult>>;
30
- getMemPool(): Promise<import("../lib/types").RPCResponse<TransactionResponse[]>>;
31
- getTips(): Promise<import("../lib/types").RPCResponse<string[]>>;
32
- getDAGOrder(params: TopoHeightRangeParams): Promise<import("../lib/types").RPCResponse<string[]>>;
33
- getBlocksRangeByTopoheight(params: TopoHeightRangeParams): Promise<import("../lib/types").RPCResponse<Block[]>>;
34
- getBlocksRangeByHeight(params: HeightRangeParams): Promise<import("../lib/types").RPCResponse<Block[]>>;
35
- getTransactions(txHashes: string[]): Promise<import("../lib/types").RPCResponse<TransactionResponse[]>>;
36
- getAccountHistory(params: GetAccountHistoryParams): Promise<import("../lib/types").RPCResponse<AccounHistory[]>>;
37
- getAccountAssets(address: string): Promise<import("../lib/types").RPCResponse<string[]>>;
38
- getAccounts(params: GetAccountsParams): Promise<import("../lib/types").RPCResponse<string[]>>;
39
- isTxExecutedInBlock(params: IsTxExecutedInBlockParams): Promise<import("../lib/types").RPCResponse<boolean>>;
40
- getDevFeeThresholds(): Promise<import("../lib/types").RPCResponse<DevFee[]>>;
41
- getSizeOnDisk(): Promise<import("../lib/types").RPCResponse<DiskSize>>;
4
+ getVersion(): Promise<import("../lib/types.js").RPCResponse<string>>;
5
+ getHeight(): Promise<import("../lib/types.js").RPCResponse<number>>;
6
+ getTopoHeight(): Promise<import("../lib/types.js").RPCResponse<number>>;
7
+ getStableHeight(): Promise<import("../lib/types.js").RPCResponse<number>>;
8
+ getBlockTemplate(address: string): Promise<import("../lib/types.js").RPCResponse<GetBlockTemplateResult>>;
9
+ getBlockAtTopoHeight(params: GetBlockAtTopoHeightParams): Promise<import("../lib/types.js").RPCResponse<Block>>;
10
+ getBlocksAtHeight(params: GetBlocksAtHeightParams): Promise<import("../lib/types.js").RPCResponse<Block[]>>;
11
+ getBlockByHash(params: GetBlockByHashParams): Promise<import("../lib/types.js").RPCResponse<Block>>;
12
+ getTopBlock(params: GetTopBlockParams): Promise<import("../lib/types.js").RPCResponse<Block>>;
13
+ submitBlock(blockTemplate: string): Promise<import("../lib/types.js").RPCResponse<boolean>>;
14
+ getBalance(params: GetBalanceParams): Promise<import("../lib/types.js").RPCResponse<GetBalanceResult>>;
15
+ hasBalance(params: HasBalanceParams): Promise<import("../lib/types.js").RPCResponse<HasBalanceResult>>;
16
+ getBalanceAtTopoHeight(params: GetBalanceAtTopoHeightParams): Promise<import("../lib/types.js").RPCResponse<VersionedBalance>>;
17
+ getInfo(): Promise<import("../lib/types.js").RPCResponse<GetInfoResult>>;
18
+ getNonce(params: GetNonceParams): Promise<import("../lib/types.js").RPCResponse<GetNonceResult>>;
19
+ hasNonce(params: HasNonceParams): Promise<import("../lib/types.js").RPCResponse<HasNonceResult>>;
20
+ getNonceAtTopoheight(params: GetNonceAtTopoheightParams): Promise<import("../lib/types.js").RPCResponse<VersionedNonce>>;
21
+ getAsset(params: GetAssetParams): Promise<import("../lib/types.js").RPCResponse<AssetData>>;
22
+ getAssets(): Promise<import("../lib/types.js").RPCResponse<string[]>>;
23
+ countAssets(): Promise<import("../lib/types.js").RPCResponse<number>>;
24
+ countAccounts(): Promise<import("../lib/types.js").RPCResponse<number>>;
25
+ countTransactions(): Promise<import("../lib/types.js").RPCResponse<number>>;
26
+ submitTransaction(hexData: string): Promise<import("../lib/types.js").RPCResponse<boolean>>;
27
+ getTransaction(hash: string): Promise<import("../lib/types.js").RPCResponse<TransactionResponse>>;
28
+ p2pStatus(): Promise<import("../lib/types.js").RPCResponse<P2PStatusResult>>;
29
+ getPeers(): Promise<import("../lib/types.js").RPCResponse<GetPeersResult>>;
30
+ getMemPool(): Promise<import("../lib/types.js").RPCResponse<TransactionResponse[]>>;
31
+ getTips(): Promise<import("../lib/types.js").RPCResponse<string[]>>;
32
+ getDAGOrder(params: TopoHeightRangeParams): Promise<import("../lib/types.js").RPCResponse<string[]>>;
33
+ getBlocksRangeByTopoheight(params: TopoHeightRangeParams): Promise<import("../lib/types.js").RPCResponse<Block[]>>;
34
+ getBlocksRangeByHeight(params: HeightRangeParams): Promise<import("../lib/types.js").RPCResponse<Block[]>>;
35
+ getTransactions(txHashes: string[]): Promise<import("../lib/types.js").RPCResponse<TransactionResponse[]>>;
36
+ getAccountHistory(params: GetAccountHistoryParams): Promise<import("../lib/types.js").RPCResponse<AccounHistory[]>>;
37
+ getAccountAssets(address: string): Promise<import("../lib/types.js").RPCResponse<string[]>>;
38
+ getAccounts(params: GetAccountsParams): Promise<import("../lib/types.js").RPCResponse<string[]>>;
39
+ isTxExecutedInBlock(params: IsTxExecutedInBlockParams): Promise<import("../lib/types.js").RPCResponse<boolean>>;
40
+ getDevFeeThresholds(): Promise<import("../lib/types.js").RPCResponse<DevFee[]>>;
41
+ getSizeOnDisk(): Promise<import("../lib/types.js").RPCResponse<DiskSize>>;
42
42
  }
43
43
  export default RPC;
@@ -1,6 +1,6 @@
1
1
  import { MessageEvent } from 'ws';
2
- import { Block, GetInfoResult, GetPeersResult, RPCEventResult, TopoHeightRangeParams, P2PStatusResult, GetBalanceAtTopoHeightParams, GetBalanceResult, HeightRangeParams, BlockOrdered, GetBalanceParams, GetAccountsParams, GetBlockAtTopoHeightParams, GetBlockByHashParams, GetBlocksAtHeightParams, GetTopBlockParams, GetNonceParams, GetNonceResult, GetAccountHistoryParams, AccounHistory, Peer, PeerPeerListUpdated, PeerPeerDisconnected, DevFee, DiskSize, AssetWithData, AssetData, GetAssetParams, HasBalanceParams, HasBalanceResult, IsTxExecutedInBlockParams, BlockOrphaned, VersionedBalance, StableHeightChanged, HasNonceResult, HasNonceParams, TransactionResponse } from './types';
3
- import { WS as BaseWS } from '../lib/websocket';
2
+ import { Block, GetInfoResult, GetPeersResult, RPCEventResult, TopoHeightRangeParams, P2PStatusResult, GetBalanceAtTopoHeightParams, GetBalanceResult, HeightRangeParams, BlockOrdered, GetBalanceParams, GetAccountsParams, GetBlockAtTopoHeightParams, GetBlockByHashParams, GetBlocksAtHeightParams, GetTopBlockParams, GetNonceParams, GetNonceResult, GetAccountHistoryParams, AccounHistory, Peer, PeerPeerListUpdated, PeerPeerDisconnected, DevFee, DiskSize, AssetWithData, AssetData, GetAssetParams, HasBalanceParams, HasBalanceResult, IsTxExecutedInBlockParams, BlockOrphaned, VersionedBalance, StableHeightChanged, HasNonceResult, HasNonceParams, TransactionResponse } from './types.js';
3
+ import { WS as BaseWS } from '../lib/websocket.js';
4
4
  export declare class DaemonMethods {
5
5
  ws: BaseWS;
6
6
  prefix: string;
@@ -1,4 +1,4 @@
1
- import { RPCResponse } from './types';
1
+ import { RPCResponse } from './types.js';
2
2
  export declare class RPC {
3
3
  endpoint: string;
4
4
  timeout: number;
@@ -2,7 +2,7 @@
2
2
  import { ClientOptions, MessageEvent } from 'ws';
3
3
  import WebSocket from 'isomorphic-ws';
4
4
  import { ClientRequestArgs } from 'http';
5
- import { RPCResponse } from './types';
5
+ import { RPCResponse } from './types.js';
6
6
  export declare class WS {
7
7
  endpoint: string;
8
8
  socket?: WebSocket;
@@ -1,7 +1,7 @@
1
1
  import React, { PropsWithChildren } from 'react';
2
2
  import { MessageEvent } from 'ws';
3
- import DaemonWS from '../daemon/websocket';
4
- import { RPCEvent } from '../daemon/types';
3
+ import DaemonWS from '../daemon/websocket.js';
4
+ import { RPCEvent } from '../daemon/types.js';
5
5
  export declare const INITIATING = -1;
6
6
  interface NodeSocket {
7
7
  daemon: DaemonWS;
@@ -1,7 +1,7 @@
1
- import { GetAssetParams, HasBalanceResult, TransactionData } from '../daemon/types';
2
- import { GetAddressParams, SplitAddressParams, SplitAddressResult, BuildTransactionParams, BuildTransactionResult, ListTransactionParams, Signature, TransactionEntry } from './types';
3
- import { RPC as BaseRPC } from '../lib/rpc';
4
- import { RPCResponse } from '../lib/types';
1
+ import { GetAssetParams, HasBalanceResult, TransactionData } from '../daemon/types.js';
2
+ import { GetAddressParams, SplitAddressParams, SplitAddressResult, BuildTransactionParams, BuildTransactionResult, ListTransactionParams, Signature, TransactionEntry } from './types.js';
3
+ import { RPC as BaseRPC } from '../lib/rpc.js';
4
+ import { RPCResponse } from '../lib/types.js';
5
5
  export declare class RPC extends BaseRPC {
6
6
  auth: string;
7
7
  constructor(endpoint: string, username: string, password: string);
@@ -1,4 +1,4 @@
1
- import { TransactionData, Transaction } from '../daemon/types';
1
+ import { TransactionData, Transaction } from '../daemon/types.js';
2
2
  export interface GetAddressParams {
3
3
  integrated_data?: string;
4
4
  }
@@ -1,6 +1,6 @@
1
- import { WS as BaseWS } from '../lib/websocket';
2
- import { GetAssetParams, TransactionData } from '../daemon/types';
3
- import { BuildTransactionParams, BuildTransactionResult, GetAddressParams, ListTransactionParams, SplitAddressParams, SplitAddressResult, Signature, TransactionEntry } from './types';
1
+ import { WS as BaseWS } from '../lib/websocket.js';
2
+ import { GetAssetParams, TransactionData } from '../daemon/types.js';
3
+ import { BuildTransactionParams, BuildTransactionResult, GetAddressParams, ListTransactionParams, SplitAddressParams, SplitAddressResult, Signature, TransactionEntry } from './types.js';
4
4
  export declare class WalletMethods {
5
5
  ws: BaseWS;
6
6
  prefix: string;
@@ -1,11 +1,11 @@
1
- import { WS as BaseWS } from '../lib/websocket';
2
- import { ApplicationData } from '../wallet/types';
3
- import { DaemonMethods } from '../daemon/websocket';
4
- import { WalletMethods } from '../wallet/websocket';
1
+ import { WS as BaseWS } from '../lib/websocket.js';
2
+ import { ApplicationData } from '../wallet/types.js';
3
+ import { DaemonMethods } from '../daemon/websocket.js';
4
+ import { WalletMethods } from '../wallet/websocket.js';
5
5
  export declare class WS extends BaseWS {
6
6
  daemon: DaemonMethods;
7
7
  wallet: WalletMethods;
8
8
  constructor();
9
- authorize(app: ApplicationData): Promise<import("../lib/types").RPCResponse<unknown>>;
9
+ authorize(app: ApplicationData): Promise<import("../lib/types.js").RPCResponse<unknown>>;
10
10
  }
11
11
  export default WS;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.8.0",
2
+ "version": "0.8.2",
3
3
  "name": "@xelis/sdk",
4
4
  "description": "Xelis software development kit for JS",
5
5
  "exports": {
package/tsconfig.esm.json CHANGED
@@ -2,6 +2,6 @@
2
2
  "extends": "./tsconfig.json",
3
3
  "compilerOptions": {
4
4
  "outDir": "./dist/esm",
5
- "module": "ES2015"
5
+ "module": "ESNext"
6
6
  }
7
7
  }
package/tsconfig.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "outDir": "./dist",
6
6
  "strict": true,
7
7
  "esModuleInterop": true,
8
- "skipLibCheck": true
8
+ "skipLibCheck": true,
9
9
  },
10
10
  "include": [
11
11
  "./src/**/*"