@xelis/sdk 0.11.14 → 0.11.16

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.
Files changed (51) hide show
  1. package/dist/cjs/address/bech32.js +47 -56
  2. package/dist/cjs/address/index.js +20 -21
  3. package/dist/cjs/config.js +26 -38
  4. package/dist/cjs/contract/contract.js +178 -0
  5. package/dist/cjs/contract/typed_contract.js +259 -0
  6. package/dist/cjs/contract/xvm_serializer.js +170 -0
  7. package/dist/cjs/daemon/rpc.js +157 -168
  8. package/dist/cjs/daemon/types.js +4 -1
  9. package/dist/cjs/daemon/websocket.js +170 -181
  10. package/dist/cjs/data/element.js +39 -41
  11. package/dist/cjs/data/value.js +106 -111
  12. package/dist/cjs/react/daemon.js +33 -43
  13. package/dist/cjs/rpc/http.js +75 -132
  14. package/dist/cjs/rpc/parse_json/parse_json.js +4 -4
  15. package/dist/cjs/rpc/types.js +1 -1
  16. package/dist/cjs/rpc/websocket.js +131 -201
  17. package/dist/cjs/wallet/rpc.js +98 -117
  18. package/dist/cjs/wallet/types.js +1 -1
  19. package/dist/cjs/wallet/websocket.js +105 -126
  20. package/dist/cjs/xswd/relayer/app.js +57 -36
  21. package/dist/cjs/xswd/relayer/index.js +25 -27
  22. package/dist/cjs/xswd/types.js +1 -1
  23. package/dist/cjs/xswd/websocket.js +15 -33
  24. package/dist/esm/address/bech32.js +46 -55
  25. package/dist/esm/address/index.js +16 -17
  26. package/dist/esm/config.js +25 -37
  27. package/dist/esm/contract/contract.js +172 -0
  28. package/dist/esm/contract/typed_contract.js +251 -0
  29. package/dist/esm/contract/xvm_serializer.js +163 -0
  30. package/dist/esm/daemon/rpc.js +153 -165
  31. package/dist/esm/daemon/types.js +3 -0
  32. package/dist/esm/daemon/websocket.js +166 -179
  33. package/dist/esm/data/element.js +37 -40
  34. package/dist/esm/data/value.js +104 -112
  35. package/dist/esm/react/daemon.js +30 -40
  36. package/dist/esm/rpc/http.js +73 -131
  37. package/dist/esm/rpc/parse_json/parse_json.js +1 -1
  38. package/dist/esm/rpc/websocket.js +126 -197
  39. package/dist/esm/wallet/rpc.js +93 -113
  40. package/dist/esm/wallet/websocket.js +101 -124
  41. package/dist/esm/xswd/relayer/app.js +54 -34
  42. package/dist/esm/xswd/relayer/index.js +22 -24
  43. package/dist/esm/xswd/websocket.js +10 -29
  44. package/dist/types/contract/contract.d.ts +80 -0
  45. package/dist/types/contract/typed_contract.d.ts +94 -0
  46. package/dist/types/contract/xvm_serializer.d.ts +69 -0
  47. package/dist/types/daemon/rpc.d.ts +5 -2
  48. package/dist/types/daemon/types.d.ts +99 -20
  49. package/dist/types/daemon/websocket.d.ts +5 -2
  50. package/dist/types/wallet/types.d.ts +1 -1
  51. package/package.json +1 -1
@@ -1,154 +1,135 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- exports.__esModule = true;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
18
3
  exports.RPC = void 0;
19
- var js_base64_1 = require("js-base64");
20
- var types_1 = require("./types");
21
- var http_1 = require("../rpc/http");
22
- var RPC = /** @class */ (function (_super) {
23
- __extends(RPC, _super);
24
- function RPC(endpoint, username, password) {
25
- var _this = _super.call(this, endpoint) || this;
26
- var authValue = js_base64_1.Base64.encode("".concat(username, ":").concat(password));
27
- _this.headers.set("Authorization", "Basic ".concat(authValue));
28
- return _this;
29
- }
30
- RPC.prototype.getVersion = function () {
4
+ const js_base64_1 = require("js-base64");
5
+ const types_1 = require("./types");
6
+ const http_1 = require("../rpc/http");
7
+ class RPC extends http_1.HttpRPC {
8
+ constructor(endpoint, username, password) {
9
+ super(endpoint);
10
+ const authValue = js_base64_1.Base64.encode(`${username}:${password}`);
11
+ this.headers.set("Authorization", `Basic ${authValue}`);
12
+ }
13
+ getVersion() {
31
14
  return this.request(types_1.RPCMethod.GetVersion);
32
- };
33
- RPC.prototype.getNetwork = function () {
15
+ }
16
+ getNetwork() {
34
17
  return this.request(types_1.RPCMethod.GetNetwork);
35
- };
36
- RPC.prototype.getNonce = function () {
18
+ }
19
+ getNonce() {
37
20
  return this.request(types_1.RPCMethod.GetNonce);
38
- };
39
- RPC.prototype.getTopoheight = function () {
21
+ }
22
+ getTopoheight() {
40
23
  return this.request(types_1.RPCMethod.GetTopoheight);
41
- };
42
- RPC.prototype.getAddress = function (params) {
43
- if (params === void 0) { params = {}; }
24
+ }
25
+ getAddress(params = {}) {
44
26
  return this.request(types_1.RPCMethod.GetAddress, params);
45
- };
46
- RPC.prototype.splitAddress = function (params) {
27
+ }
28
+ splitAddress(params) {
47
29
  return this.request(types_1.RPCMethod.SplitAddress, params);
48
- };
49
- RPC.prototype.rescan = function (params) {
30
+ }
31
+ rescan(params) {
50
32
  return this.request(types_1.RPCMethod.Rescan, params);
51
- };
52
- RPC.prototype.getBalance = function (asset) {
53
- return this.request(types_1.RPCMethod.GetBalance, { asset: asset });
54
- };
55
- RPC.prototype.hasBalance = function (asset) {
56
- return this.request(types_1.RPCMethod.HasBalance, { asset: asset });
57
- };
58
- RPC.prototype.getTrackedAssets = function () {
33
+ }
34
+ getBalance(asset) {
35
+ return this.request(types_1.RPCMethod.GetBalance, { asset });
36
+ }
37
+ hasBalance(asset) {
38
+ return this.request(types_1.RPCMethod.HasBalance, { asset });
39
+ }
40
+ getTrackedAssets() {
59
41
  return this.request(types_1.RPCMethod.GetTrackedAssets);
60
- };
61
- RPC.prototype.getAssetPrecision = function (params) {
42
+ }
43
+ getAssetPrecision(params) {
62
44
  return this.request(types_1.RPCMethod.GetAssetPrecision, params);
63
- };
64
- RPC.prototype.getAssets = function () {
45
+ }
46
+ getAssets() {
65
47
  return this.request(types_1.RPCMethod.GetAssets);
66
- };
67
- RPC.prototype.getAsset = function (params) {
48
+ }
49
+ getAsset(params) {
68
50
  return this.request(types_1.RPCMethod.GetAsset, params);
69
- };
70
- RPC.prototype.getTransaction = function (hash) {
71
- return this.request(types_1.RPCMethod.GetTransaction, { hash: hash });
72
- };
73
- RPC.prototype.searchTransaction = function (hash) {
74
- return this.request(types_1.RPCMethod.SearchTransaction, { hash: hash });
75
- };
76
- RPC.prototype.dumpTransaction = function (hash) {
77
- return this.request(types_1.RPCMethod.DumpTransaction, { hash: hash });
78
- };
79
- RPC.prototype.buildTransaction = function (params) {
51
+ }
52
+ getTransaction(hash) {
53
+ return this.request(types_1.RPCMethod.GetTransaction, { hash });
54
+ }
55
+ searchTransaction(hash) {
56
+ return this.request(types_1.RPCMethod.SearchTransaction, { hash });
57
+ }
58
+ dumpTransaction(hash) {
59
+ return this.request(types_1.RPCMethod.DumpTransaction, { hash });
60
+ }
61
+ buildTransaction(params) {
80
62
  return this.request(types_1.RPCMethod.BuildTransaction, params);
81
- };
82
- RPC.prototype.buildTransactionOffline = function (params) {
63
+ }
64
+ buildTransactionOffline(params) {
83
65
  return this.request(types_1.RPCMethod.BuildTransactionOffline, params);
84
- };
85
- RPC.prototype.buildUnsignedTransaction = function (params) {
66
+ }
67
+ buildUnsignedTransaction(params) {
86
68
  return this.request(types_1.RPCMethod.BuildUnsignedTransaction, params);
87
- };
88
- RPC.prototype.signUnsignedTransaction = function (params) {
69
+ }
70
+ signUnsignedTransaction(params) {
89
71
  return this.request(types_1.RPCMethod.SignUnsignedTransaction, params);
90
- };
91
- RPC.prototype.finalizeUnsignedTransaction = function (params) {
72
+ }
73
+ finalizeUnsignedTransaction(params) {
92
74
  return this.request(types_1.RPCMethod.FinalizeUnsignedTransaction, params);
93
- };
94
- RPC.prototype.clearTxCache = function () {
75
+ }
76
+ clearTxCache() {
95
77
  return this.request(types_1.RPCMethod.ClearTxCache);
96
- };
97
- RPC.prototype.listTransactions = function (params) {
78
+ }
79
+ listTransactions(params) {
98
80
  return this.request(types_1.RPCMethod.ListTransactions, params);
99
- };
100
- RPC.prototype.isOnline = function () {
81
+ }
82
+ isOnline() {
101
83
  return this.request(types_1.RPCMethod.IsOnline);
102
- };
103
- RPC.prototype.setOnlineMode = function (params) {
84
+ }
85
+ setOnlineMode(params) {
104
86
  return this.request(types_1.RPCMethod.SetOnlineMode, params);
105
- };
106
- RPC.prototype.setOfflineMode = function () {
87
+ }
88
+ setOfflineMode() {
107
89
  return this.request(types_1.RPCMethod.SetOfflineMode);
108
- };
109
- RPC.prototype.signData = function (data) {
90
+ }
91
+ signData(data) {
110
92
  return this.request(types_1.RPCMethod.SignData, data.toObject());
111
- };
112
- RPC.prototype.estimateFees = function (params) {
93
+ }
94
+ estimateFees(params) {
113
95
  return this.request(types_1.RPCMethod.EstimateFees, params);
114
- };
115
- RPC.prototype.estimateExtraDataSize = function (params) {
96
+ }
97
+ estimateExtraDataSize(params) {
116
98
  return this.request(types_1.RPCMethod.EstimateExtraDataSize, params);
117
- };
118
- RPC.prototype.networkInfo = function () {
99
+ }
100
+ networkInfo() {
119
101
  return this.request(types_1.RPCMethod.NetworkInfo);
120
- };
121
- RPC.prototype.decryptExtraData = function (params) {
102
+ }
103
+ decryptExtraData(params) {
122
104
  return this.request(types_1.RPCMethod.DecryptExtraData, params);
123
- };
124
- RPC.prototype.decryptCiphertext = function (params) {
105
+ }
106
+ decryptCiphertext(params) {
125
107
  return this.request(types_1.RPCMethod.DecryptCiphertext, params);
126
- };
127
- RPC.prototype.getMatchingKeys = function (params) {
108
+ }
109
+ getMatchingKeys(params) {
128
110
  return this.request(types_1.RPCMethod.GetMatchingKeys, params);
129
- };
130
- RPC.prototype.countMatchingEntries = function (params) {
111
+ }
112
+ countMatchingEntries(params) {
131
113
  return this.request(types_1.RPCMethod.CountMatchingEntries, params);
132
- };
133
- RPC.prototype.getValueFromKey = function (params) {
114
+ }
115
+ getValueFromKey(params) {
134
116
  return this.request(types_1.RPCMethod.GetValueFromKey, params);
135
- };
136
- RPC.prototype.store = function (params) {
117
+ }
118
+ store(params) {
137
119
  return this.request(types_1.RPCMethod.Store, params);
138
- };
139
- RPC.prototype["delete"] = function (params) {
120
+ }
121
+ delete(params) {
140
122
  return this.request(types_1.RPCMethod.Delete, params);
141
- };
142
- RPC.prototype.deleteTreeEntries = function (tree) {
143
- return this.request(types_1.RPCMethod.DeleteTreeEntries, { tree: tree });
144
- };
145
- RPC.prototype.hasKey = function (params) {
123
+ }
124
+ deleteTreeEntries(tree) {
125
+ return this.request(types_1.RPCMethod.DeleteTreeEntries, { tree });
126
+ }
127
+ hasKey(params) {
146
128
  return this.request(types_1.RPCMethod.HasKey, params);
147
- };
148
- RPC.prototype.queryDB = function (params) {
129
+ }
130
+ queryDB(params) {
149
131
  return this.request(types_1.RPCMethod.QueryDB, params);
150
- };
151
- return RPC;
152
- }(http_1.HttpRPC));
132
+ }
133
+ }
153
134
  exports.RPC = RPC;
154
- exports["default"] = RPC;
135
+ exports.default = RPC;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- exports.__esModule = true;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RPCEvent = exports.RPCMethod = exports.ElementType = exports.ValueType = exports.TxRole = void 0;
4
4
  var TxRole;
5
5
  (function (TxRole) {
@@ -1,170 +1,149 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- exports.__esModule = true;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
18
3
  exports.WS = exports.WalletMethods = void 0;
19
- var websocket_1 = require("../rpc/websocket");
20
- var types_1 = require("./types");
21
- var WalletMethods = /** @class */ (function () {
22
- function WalletMethods(ws, prefix) {
23
- if (prefix === void 0) { prefix = ""; }
4
+ const websocket_1 = require("../rpc/websocket");
5
+ const types_1 = require("./types");
6
+ class WalletMethods {
7
+ constructor(ws, prefix = "") {
24
8
  this.ws = ws;
25
9
  this.prefix = prefix;
26
10
  }
27
- WalletMethods.prototype.dataCall = function (method, params) {
11
+ dataCall(method, params) {
28
12
  return this.ws.dataCall(this.prefix + method, params);
29
- };
30
- WalletMethods.prototype.closeListener = function (event, listener) {
13
+ }
14
+ closeListener(event, listener) {
31
15
  this.ws.closeListener(event, listener);
32
- };
33
- WalletMethods.prototype.listen = function (event, listener) {
16
+ }
17
+ listen(event, listener) {
34
18
  this.ws.listen(this.prefix + event, listener);
35
- };
36
- WalletMethods.prototype.getVersion = function () {
19
+ }
20
+ getVersion() {
37
21
  return this.dataCall(types_1.RPCMethod.GetVersion);
38
- };
39
- WalletMethods.prototype.getNetwork = function () {
22
+ }
23
+ getNetwork() {
40
24
  return this.dataCall(types_1.RPCMethod.GetNetwork);
41
- };
42
- WalletMethods.prototype.getNonce = function () {
25
+ }
26
+ getNonce() {
43
27
  return this.dataCall(types_1.RPCMethod.GetNonce);
44
- };
45
- WalletMethods.prototype.getTopoheight = function () {
28
+ }
29
+ getTopoheight() {
46
30
  return this.dataCall(types_1.RPCMethod.GetTopoheight);
47
- };
48
- WalletMethods.prototype.getAddress = function (params) {
49
- if (params === void 0) { params = {}; }
31
+ }
32
+ getAddress(params = {}) {
50
33
  return this.dataCall(types_1.RPCMethod.GetAddress, params);
51
- };
52
- WalletMethods.prototype.splitAddress = function (params) {
34
+ }
35
+ splitAddress(params) {
53
36
  return this.dataCall(types_1.RPCMethod.SplitAddress, params);
54
- };
55
- WalletMethods.prototype.rescan = function (params) {
37
+ }
38
+ rescan(params) {
56
39
  return this.dataCall(types_1.RPCMethod.Rescan, params);
57
- };
58
- WalletMethods.prototype.getBalance = function (asset) {
59
- return this.dataCall(types_1.RPCMethod.GetBalance, { asset: asset });
60
- };
61
- WalletMethods.prototype.hasBalance = function (asset) {
62
- return this.dataCall(types_1.RPCMethod.HasBalance, { asset: asset });
63
- };
64
- WalletMethods.prototype.getTrackedAssets = function () {
40
+ }
41
+ getBalance(asset) {
42
+ return this.dataCall(types_1.RPCMethod.GetBalance, { asset });
43
+ }
44
+ hasBalance(asset) {
45
+ return this.dataCall(types_1.RPCMethod.HasBalance, { asset });
46
+ }
47
+ getTrackedAssets() {
65
48
  return this.dataCall(types_1.RPCMethod.GetTrackedAssets);
66
- };
67
- WalletMethods.prototype.getAssetPrecision = function (params) {
49
+ }
50
+ getAssetPrecision(params) {
68
51
  return this.dataCall(types_1.RPCMethod.GetAssetPrecision, params);
69
- };
70
- WalletMethods.prototype.getAssets = function () {
52
+ }
53
+ getAssets() {
71
54
  return this.dataCall(types_1.RPCMethod.GetAssets);
72
- };
73
- WalletMethods.prototype.getAsset = function (params) {
55
+ }
56
+ getAsset(params) {
74
57
  return this.dataCall(types_1.RPCMethod.GetAsset, params);
75
- };
76
- WalletMethods.prototype.getTransaction = function (hash) {
77
- return this.dataCall(types_1.RPCMethod.GetTransaction, { hash: hash });
78
- };
79
- WalletMethods.prototype.searchTransaction = function (hash) {
80
- return this.dataCall(types_1.RPCMethod.SearchTransaction, { hash: hash });
81
- };
82
- WalletMethods.prototype.dumpTransaction = function (hash) {
83
- return this.dataCall(types_1.RPCMethod.DumpTransaction, { hash: hash });
84
- };
85
- WalletMethods.prototype.buildTransaction = function (params) {
58
+ }
59
+ getTransaction(hash) {
60
+ return this.dataCall(types_1.RPCMethod.GetTransaction, { hash });
61
+ }
62
+ searchTransaction(hash) {
63
+ return this.dataCall(types_1.RPCMethod.SearchTransaction, { hash });
64
+ }
65
+ dumpTransaction(hash) {
66
+ return this.dataCall(types_1.RPCMethod.DumpTransaction, { hash });
67
+ }
68
+ buildTransaction(params) {
86
69
  return this.dataCall(types_1.RPCMethod.BuildTransaction, params);
87
- };
88
- WalletMethods.prototype.buildTransactionOffline = function (params) {
70
+ }
71
+ buildTransactionOffline(params) {
89
72
  return this.dataCall(types_1.RPCMethod.BuildTransactionOffline, params);
90
- };
91
- WalletMethods.prototype.buildUnsignedTransaction = function (params) {
73
+ }
74
+ buildUnsignedTransaction(params) {
92
75
  return this.dataCall(types_1.RPCMethod.BuildUnsignedTransaction, params);
93
- };
94
- WalletMethods.prototype.signUnsignedTransaction = function (params) {
76
+ }
77
+ signUnsignedTransaction(params) {
95
78
  return this.dataCall(types_1.RPCMethod.SignUnsignedTransaction, params);
96
- };
97
- WalletMethods.prototype.finalizeUnsignedTransaction = function (params) {
79
+ }
80
+ finalizeUnsignedTransaction(params) {
98
81
  return this.dataCall(types_1.RPCMethod.FinalizeUnsignedTransaction, params);
99
- };
100
- WalletMethods.prototype.clearTxCache = function () {
82
+ }
83
+ clearTxCache() {
101
84
  return this.dataCall(types_1.RPCMethod.ClearTxCache);
102
- };
103
- WalletMethods.prototype.listTransactions = function (params) {
85
+ }
86
+ listTransactions(params) {
104
87
  return this.dataCall(types_1.RPCMethod.GetTransaction, params);
105
- };
106
- WalletMethods.prototype.isOnline = function () {
88
+ }
89
+ isOnline() {
107
90
  return this.dataCall(types_1.RPCMethod.IsOnline);
108
- };
109
- WalletMethods.prototype.setOnlineMode = function (params) {
91
+ }
92
+ setOnlineMode(params) {
110
93
  return this.dataCall(types_1.RPCMethod.SetOfflineMode, params);
111
- };
112
- WalletMethods.prototype.setOfflineMode = function () {
94
+ }
95
+ setOfflineMode() {
113
96
  return this.dataCall(types_1.RPCMethod.SetOfflineMode);
114
- };
115
- WalletMethods.prototype.signData = function (data) {
97
+ }
98
+ signData(data) {
116
99
  return this.dataCall(types_1.RPCMethod.SignData, data.toObject());
117
- };
118
- WalletMethods.prototype.estimateFees = function (params) {
100
+ }
101
+ estimateFees(params) {
119
102
  return this.dataCall(types_1.RPCMethod.EstimateFees, params);
120
- };
121
- WalletMethods.prototype.estimateExtraDataSize = function (params) {
103
+ }
104
+ estimateExtraDataSize(params) {
122
105
  return this.dataCall(types_1.RPCMethod.EstimateExtraDataSize, params);
123
- };
124
- WalletMethods.prototype.networkInfo = function () {
106
+ }
107
+ networkInfo() {
125
108
  return this.dataCall(types_1.RPCMethod.NetworkInfo);
126
- };
127
- WalletMethods.prototype.decryptExtraData = function (params) {
109
+ }
110
+ decryptExtraData(params) {
128
111
  return this.dataCall(types_1.RPCMethod.DecryptExtraData, params);
129
- };
130
- WalletMethods.prototype.decryptCiphertext = function (params) {
112
+ }
113
+ decryptCiphertext(params) {
131
114
  return this.dataCall(types_1.RPCMethod.DecryptCiphertext, params);
132
- };
133
- WalletMethods.prototype.getMatchingKeys = function (params) {
115
+ }
116
+ getMatchingKeys(params) {
134
117
  return this.dataCall(types_1.RPCMethod.GetMatchingKeys, params);
135
- };
136
- WalletMethods.prototype.countMatchingEntries = function (params) {
118
+ }
119
+ countMatchingEntries(params) {
137
120
  return this.dataCall(types_1.RPCMethod.CountMatchingEntries, params);
138
- };
139
- WalletMethods.prototype.getValueFromKey = function (params) {
121
+ }
122
+ getValueFromKey(params) {
140
123
  return this.dataCall(types_1.RPCMethod.GetValueFromKey, params);
141
- };
142
- WalletMethods.prototype.store = function (params) {
124
+ }
125
+ store(params) {
143
126
  return this.dataCall(types_1.RPCMethod.Store, params);
144
- };
145
- WalletMethods.prototype["delete"] = function (params) {
127
+ }
128
+ delete(params) {
146
129
  return this.dataCall(types_1.RPCMethod.Delete, params);
147
- };
148
- WalletMethods.prototype.deleteTreeEntries = function (tree) {
149
- return this.dataCall(types_1.RPCMethod.DeleteTreeEntries, { tree: tree });
150
- };
151
- WalletMethods.prototype.hasKey = function (params) {
130
+ }
131
+ deleteTreeEntries(tree) {
132
+ return this.dataCall(types_1.RPCMethod.DeleteTreeEntries, { tree });
133
+ }
134
+ hasKey(params) {
152
135
  return this.dataCall(types_1.RPCMethod.HasKey, params);
153
- };
154
- WalletMethods.prototype.queryDB = function (params) {
136
+ }
137
+ queryDB(params) {
155
138
  return this.dataCall(types_1.RPCMethod.QueryDB, params);
156
- };
157
- return WalletMethods;
158
- }());
139
+ }
140
+ }
159
141
  exports.WalletMethods = WalletMethods;
160
- var WS = /** @class */ (function (_super) {
161
- __extends(WS, _super);
162
- function WS(endpoint, username, password) {
163
- var _this = _super.call(this, endpoint, { auth: "".concat(username, ":").concat(password) }) || this;
164
- _this.methods = new WalletMethods(_this);
165
- return _this;
166
- }
167
- return WS;
168
- }(websocket_1.WSRPC));
142
+ class WS extends websocket_1.WSRPC {
143
+ constructor(endpoint, username, password) {
144
+ super(endpoint, { auth: `${username}:${password}` });
145
+ this.methods = new WalletMethods(this);
146
+ }
147
+ }
169
148
  exports.WS = WS;
170
- exports["default"] = WS;
149
+ exports.default = WS;