@firmachain/firma-js 0.2.21 → 0.2.22

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.
@@ -44,7 +44,7 @@ var FirmaBankService = /** @class */ (function () {
44
44
  this.config = config;
45
45
  }
46
46
  FirmaBankService.prototype.getGasEstimationSend = function (wallet, targetAddress, amount, txMisc) {
47
- if (txMisc === void 0) { txMisc = bank_1.DefaultTxMisc; }
47
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
48
48
  return __awaiter(this, void 0, void 0, function () {
49
49
  var txRaw, error_1;
50
50
  return __generator(this, function (_a) {
@@ -66,7 +66,7 @@ var FirmaBankService = /** @class */ (function () {
66
66
  });
67
67
  };
68
68
  FirmaBankService.prototype.sendToken = function (wallet, targetAddress, tokenID, amount, decimal, txMisc) {
69
- if (txMisc === void 0) { txMisc = bank_1.DefaultTxMisc; }
69
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
70
70
  return __awaiter(this, void 0, void 0, function () {
71
71
  var txRaw, bankTxClient, error_2;
72
72
  return __generator(this, function (_a) {
@@ -89,7 +89,7 @@ var FirmaBankService = /** @class */ (function () {
89
89
  });
90
90
  };
91
91
  FirmaBankService.prototype.send = function (wallet, targetAddress, amount, txMisc) {
92
- if (txMisc === void 0) { txMisc = bank_1.DefaultTxMisc; }
92
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
93
93
  return __awaiter(this, void 0, void 0, function () {
94
94
  var txRaw, bankTxClient, error_3;
95
95
  return __generator(this, function (_a) {
@@ -182,7 +182,7 @@ var FirmaBankService = /** @class */ (function () {
182
182
  });
183
183
  };
184
184
  FirmaBankService.prototype.getSignedTxSend = function (wallet, targetAddress, denom, amount, txMisc) {
185
- if (txMisc === void 0) { txMisc = bank_1.DefaultTxMisc; }
185
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
186
186
  return __awaiter(this, void 0, void 0, function () {
187
187
  var bankTxClient, address, sendAmount, message, error_7;
188
188
  return __generator(this, function (_a) {
@@ -195,7 +195,7 @@ var FirmaBankService = /** @class */ (function () {
195
195
  address = _a.sent();
196
196
  sendAmount = { denom: denom, amount: amount };
197
197
  message = bankTxClient.msgSend({ fromAddress: address, toAddress: targetAddress, amount: [sendAmount] });
198
- return [4 /*yield*/, bankTxClient.sign([message], bank_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
198
+ return [4 /*yield*/, bankTxClient.sign([message], FirmaUtil_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
199
199
  case 2: return [2 /*return*/, _a.sent()];
200
200
  case 3:
201
201
  error_7 = _a.sent();
@@ -8,8 +8,10 @@ export declare class FirmaConfig {
8
8
  hdPath: string;
9
9
  prefix: string;
10
10
  denom: string;
11
+ defaultFee: number;
12
+ defaultGas: number;
11
13
  isShowLog: boolean;
12
- constructor(chainID: string, rpcAddress: string, restApiAddress: string, ipfsNodeAddress: string, ipfsNodePort: number, ipfsWebApiAddress: string, hdPath: string, prefix: string, denom: string, isShowLog: boolean);
14
+ constructor(chainID: string, rpcAddress: string, restApiAddress: string, ipfsNodeAddress: string, ipfsNodePort: number, ipfsWebApiAddress: string, hdPath: string, prefix: string, denom: string, defaultFee: number, defaultGas: number, isShowLog: boolean);
13
15
  static readonly DevNetConfig: FirmaConfig;
14
16
  static readonly TestNetConfig: FirmaConfig;
15
17
  static readonly MainNetConfig: FirmaConfig;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FirmaConfig = void 0;
4
4
  var FirmaConfig = /** @class */ (function () {
5
- function FirmaConfig(chainID, rpcAddress, restApiAddress, ipfsNodeAddress, ipfsNodePort, ipfsWebApiAddress, hdPath, prefix, denom, isShowLog) {
5
+ function FirmaConfig(chainID, rpcAddress, restApiAddress, ipfsNodeAddress, ipfsNodePort, ipfsWebApiAddress, hdPath, prefix, denom, defaultFee, defaultGas, isShowLog) {
6
6
  this.chainID = chainID;
7
7
  this.rpcAddress = rpcAddress;
8
8
  this.restApiAddress = restApiAddress;
@@ -12,42 +12,50 @@ var FirmaConfig = /** @class */ (function () {
12
12
  this.hdPath = hdPath;
13
13
  this.prefix = prefix;
14
14
  this.denom = denom;
15
+ this.defaultFee = defaultFee;
16
+ this.defaultGas = defaultGas;
15
17
  this.isShowLog = isShowLog;
16
18
  }
17
19
  FirmaConfig.DevNetConfig = {
18
- chainID: "imperium-2",
19
- rpcAddress: "https://imperium-node1.firmachain.org:26657",
20
- restApiAddress: "https://imperium-node1.firmachain.org:1317",
21
- ipfsNodeAddress: "ipfs-api-firma-devnet.firmachain.org",
20
+ chainID: "roma-1",
21
+ rpcAddress: "http://192.168.20.113:26657",
22
+ restApiAddress: "http://192.168.20.113:1317",
23
+ ipfsNodeAddress: "http://192.168.20.120",
22
24
  ipfsNodePort: 5001,
23
- ipfsWebApiAddress: "https://ipfs-firma-devnet.firmachain.org",
25
+ ipfsWebApiAddress: "http://192.168.20.120:8080",
24
26
  hdPath: "m/44'/7777777'/",
25
27
  prefix: "firma",
26
28
  denom: "ufct",
29
+ defaultFee: 20000,
30
+ defaultGas: 200000,
27
31
  isShowLog: true,
28
32
  };
29
33
  FirmaConfig.TestNetConfig = {
30
- chainID: "colosseum-1",
31
- rpcAddress: "https://colosseum-lcd.firmachain.dev:26657",
32
- restApiAddress: "https://colosseum-lcd.firmachain.dev:1317",
33
- ipfsNodeAddress: "ipfs-api-firma-devnet.firmachain.org",
34
+ chainID: "imperium-3",
35
+ rpcAddress: "https://lcd-testnet.firmachain.dev:26657",
36
+ restApiAddress: "https://lcd-testnet.firmachain.dev:1317",
37
+ ipfsNodeAddress: "https://ipfs-dev.firmachain.dev",
34
38
  ipfsNodePort: 5001,
35
- ipfsWebApiAddress: "https://ipfs-firma-devnet.firmachain.org",
39
+ ipfsWebApiAddress: "https://ipfs-dev.firmachain.dev",
36
40
  hdPath: "m/44'/7777777'/",
37
41
  prefix: "firma",
38
42
  denom: "ufct",
43
+ defaultFee: 20000,
44
+ defaultGas: 200000,
39
45
  isShowLog: true,
40
46
  };
41
47
  FirmaConfig.MainNetConfig = {
42
- chainID: "augutus-2",
43
- rpcAddress: "https://imperium-node1.firmachain.org:26657",
44
- restApiAddress: "https://imperium-node1.firmachain.org:1317",
45
- ipfsNodeAddress: "ipfs-api-firma-devnet.firmachain.org",
48
+ chainID: "colosseum-1",
49
+ rpcAddress: "https://lcd-mainnet.firmachain.org:26657",
50
+ restApiAddress: "https://lcd-mainnet.firmachain.org:1317",
51
+ ipfsNodeAddress: "https://ipfs-dev.firmachain.dev",
46
52
  ipfsNodePort: 5001,
47
- ipfsWebApiAddress: "https://ipfs-firma-devnet.firmachain.org",
53
+ ipfsWebApiAddress: "https://ipfs-dev.firmachain.dev",
48
54
  hdPath: "m/44'/7777777'/",
49
55
  prefix: "firma",
50
56
  denom: "ufct",
57
+ defaultFee: 20000,
58
+ defaultGas: 200000,
51
59
  isShowLog: false,
52
60
  };
53
61
  return FirmaConfig;
@@ -160,7 +160,7 @@ var ContractService = /** @class */ (function () {
160
160
  });
161
161
  };
162
162
  ContractService.prototype.getGasEstimationFromUnSignedTxList = function (wallet, txList, txMisc) {
163
- if (txMisc === void 0) { txMisc = contract_1.DefaultTxMisc; }
163
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
164
164
  return __awaiter(this, void 0, void 0, function () {
165
165
  var contractTxClient, txRaw, error_7;
166
166
  return __generator(this, function (_a) {
@@ -168,7 +168,7 @@ var ContractService = /** @class */ (function () {
168
168
  case 0:
169
169
  _a.trys.push([0, 3, , 4]);
170
170
  contractTxClient = new contract_1.ContractTxClient(wallet, this.config.rpcAddress);
171
- return [4 /*yield*/, contractTxClient.sign(txList, contract_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
171
+ return [4 /*yield*/, contractTxClient.sign(txList, FirmaUtil_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
172
172
  case 1:
173
173
  txRaw = _a.sent();
174
174
  return [4 /*yield*/, FirmaUtil_1.FirmaUtil.estimateGas(txRaw)];
@@ -183,7 +183,7 @@ var ContractService = /** @class */ (function () {
183
183
  });
184
184
  };
185
185
  ContractService.prototype.getGasEstimationCreateContractFile = function (wallet, fileHash, timeStamp, ownerList, metaDataJsonString, txMisc) {
186
- if (txMisc === void 0) { txMisc = contract_1.DefaultTxMisc; }
186
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
187
187
  return __awaiter(this, void 0, void 0, function () {
188
188
  var txRaw, error_8;
189
189
  return __generator(this, function (_a) {
@@ -232,7 +232,7 @@ var ContractService = /** @class */ (function () {
232
232
  });
233
233
  };
234
234
  ContractService.prototype.getSignedTxCreateContractFile = function (wallet, fileHash, timeStamp, ownerList, metaDataJsonString, txMisc) {
235
- if (txMisc === void 0) { txMisc = contract_1.DefaultTxMisc; }
235
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
236
236
  return __awaiter(this, void 0, void 0, function () {
237
237
  var address, contractTxClient, message, error_10;
238
238
  return __generator(this, function (_a) {
@@ -250,7 +250,7 @@ var ContractService = /** @class */ (function () {
250
250
  ownerList: ownerList,
251
251
  metaDataJsonString: metaDataJsonString
252
252
  });
253
- return [4 /*yield*/, contractTxClient.sign([message], contract_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
253
+ return [4 /*yield*/, contractTxClient.sign([message], FirmaUtil_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
254
254
  case 2: return [2 /*return*/, _a.sent()];
255
255
  case 3:
256
256
  error_10 = _a.sent();
@@ -262,7 +262,7 @@ var ContractService = /** @class */ (function () {
262
262
  });
263
263
  };
264
264
  ContractService.prototype.createContractFile = function (wallet, fileHash, timeStamp, ownerList, metaDataJsonString, txMisc) {
265
- if (txMisc === void 0) { txMisc = contract_1.DefaultTxMisc; }
265
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
266
266
  return __awaiter(this, void 0, void 0, function () {
267
267
  var txRaw, contractTxClient, error_11;
268
268
  return __generator(this, function (_a) {
@@ -285,7 +285,7 @@ var ContractService = /** @class */ (function () {
285
285
  });
286
286
  };
287
287
  ContractService.prototype.getGasEstimationAddContractLog = function (wallet, contractHash, timeStamp, eventName, ownerAddress, jsonString, txMisc) {
288
- if (txMisc === void 0) { txMisc = contract_1.DefaultTxMisc; }
288
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
289
289
  return __awaiter(this, void 0, void 0, function () {
290
290
  var txRaw, error_12;
291
291
  return __generator(this, function (_a) {
@@ -307,7 +307,7 @@ var ContractService = /** @class */ (function () {
307
307
  });
308
308
  };
309
309
  ContractService.prototype.getSignedTxAddContractLog = function (wallet, contractHash, timeStamp, eventName, ownerAddress, jsonString, txMisc) {
310
- if (txMisc === void 0) { txMisc = contract_1.DefaultTxMisc; }
310
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
311
311
  return __awaiter(this, void 0, void 0, function () {
312
312
  var address, contractTxClient, message, error_13;
313
313
  return __generator(this, function (_a) {
@@ -326,7 +326,7 @@ var ContractService = /** @class */ (function () {
326
326
  ownerAddress: ownerAddress,
327
327
  jsonString: jsonString
328
328
  });
329
- return [4 /*yield*/, contractTxClient.sign([message], contract_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
329
+ return [4 /*yield*/, contractTxClient.sign([message], FirmaUtil_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
330
330
  case 2: return [2 /*return*/, _a.sent()];
331
331
  case 3:
332
332
  error_13 = _a.sent();
@@ -338,7 +338,7 @@ var ContractService = /** @class */ (function () {
338
338
  });
339
339
  };
340
340
  ContractService.prototype.addContractLog = function (wallet, contractHash, timeStamp, eventName, ownerAddress, jsonString, txMisc) {
341
- if (txMisc === void 0) { txMisc = contract_1.DefaultTxMisc; }
341
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
342
342
  return __awaiter(this, void 0, void 0, function () {
343
343
  var txRaw, contractTxClient, error_14;
344
344
  return __generator(this, function (_a) {
@@ -389,7 +389,7 @@ var ContractService = /** @class */ (function () {
389
389
  });
390
390
  };
391
391
  ContractService.prototype.signAndBroadcast = function (wallet, msgList, txMisc) {
392
- if (txMisc === void 0) { txMisc = contract_1.DefaultTxMisc; }
392
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
393
393
  return __awaiter(this, void 0, void 0, function () {
394
394
  var contractTxClient, error_16;
395
395
  return __generator(this, function (_a) {
@@ -397,7 +397,7 @@ var ContractService = /** @class */ (function () {
397
397
  case 0:
398
398
  _a.trys.push([0, 2, , 3]);
399
399
  contractTxClient = new contract_1.ContractTxClient(wallet, this.config.rpcAddress);
400
- return [4 /*yield*/, contractTxClient.signAndBroadcast(msgList, contract_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
400
+ return [4 /*yield*/, contractTxClient.signAndBroadcast(msgList, FirmaUtil_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
401
401
  case 1: return [2 /*return*/, _a.sent()];
402
402
  case 2:
403
403
  error_16 = _a.sent();
@@ -44,7 +44,7 @@ var FirmaDistributionService = /** @class */ (function () {
44
44
  this.config = config;
45
45
  }
46
46
  FirmaDistributionService.prototype.getGasEstimationSetWithdrawAddress = function (wallet, withdrawAddress, txMisc) {
47
- if (txMisc === void 0) { txMisc = distribution_1.DefaultTxMisc; }
47
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
48
48
  return __awaiter(this, void 0, void 0, function () {
49
49
  var txRaw, error_1;
50
50
  return __generator(this, function (_a) {
@@ -66,7 +66,7 @@ var FirmaDistributionService = /** @class */ (function () {
66
66
  });
67
67
  };
68
68
  FirmaDistributionService.prototype.getGasEstimationFundCommunityPool = function (wallet, amount, txMisc) {
69
- if (txMisc === void 0) { txMisc = distribution_1.DefaultTxMisc; }
69
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
70
70
  return __awaiter(this, void 0, void 0, function () {
71
71
  var txRaw, error_2;
72
72
  return __generator(this, function (_a) {
@@ -88,7 +88,7 @@ var FirmaDistributionService = /** @class */ (function () {
88
88
  });
89
89
  };
90
90
  FirmaDistributionService.prototype.getGasEstimationWithdrawValidatorCommission = function (wallet, validatorAddress, txMisc) {
91
- if (txMisc === void 0) { txMisc = distribution_1.DefaultTxMisc; }
91
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
92
92
  return __awaiter(this, void 0, void 0, function () {
93
93
  var txRaw, error_3;
94
94
  return __generator(this, function (_a) {
@@ -110,7 +110,7 @@ var FirmaDistributionService = /** @class */ (function () {
110
110
  });
111
111
  };
112
112
  FirmaDistributionService.prototype.getGasEstimationWithdrawAllRewardsFromAllValidator = function (wallet, delegationList, txMisc) {
113
- if (txMisc === void 0) { txMisc = distribution_1.DefaultTxMisc; }
113
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
114
114
  return __awaiter(this, void 0, void 0, function () {
115
115
  var txRaw, error_4;
116
116
  return __generator(this, function (_a) {
@@ -132,7 +132,7 @@ var FirmaDistributionService = /** @class */ (function () {
132
132
  });
133
133
  };
134
134
  FirmaDistributionService.prototype.getGasEstimationWithdrawAllRewards = function (wallet, validatorAddress, txMisc) {
135
- if (txMisc === void 0) { txMisc = distribution_1.DefaultTxMisc; }
135
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
136
136
  return __awaiter(this, void 0, void 0, function () {
137
137
  var txRaw, error_5;
138
138
  return __generator(this, function (_a) {
@@ -154,7 +154,7 @@ var FirmaDistributionService = /** @class */ (function () {
154
154
  });
155
155
  };
156
156
  FirmaDistributionService.prototype.getSignedTxWithdrawAllRewards = function (wallet, validatorAddress, txMisc) {
157
- if (txMisc === void 0) { txMisc = distribution_1.DefaultTxMisc; }
157
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
158
158
  return __awaiter(this, void 0, void 0, function () {
159
159
  var txClient, address, message, error_6;
160
160
  return __generator(this, function (_a) {
@@ -166,7 +166,7 @@ var FirmaDistributionService = /** @class */ (function () {
166
166
  case 1:
167
167
  address = _a.sent();
168
168
  message = txClient.msgWithdrawDelegatorReward({ delegatorAddress: address, validatorAddress: validatorAddress });
169
- return [4 /*yield*/, txClient.sign([message], distribution_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
169
+ return [4 /*yield*/, txClient.sign([message], FirmaUtil_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
170
170
  case 2: return [2 /*return*/, _a.sent()];
171
171
  case 3:
172
172
  error_6 = _a.sent();
@@ -178,7 +178,7 @@ var FirmaDistributionService = /** @class */ (function () {
178
178
  });
179
179
  };
180
180
  FirmaDistributionService.prototype.getSignedTxSetWithdrawAddress = function (wallet, withdrawAddress, txMisc) {
181
- if (txMisc === void 0) { txMisc = distribution_1.DefaultTxMisc; }
181
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
182
182
  return __awaiter(this, void 0, void 0, function () {
183
183
  var txClient, address, message, error_7;
184
184
  return __generator(this, function (_a) {
@@ -190,7 +190,7 @@ var FirmaDistributionService = /** @class */ (function () {
190
190
  case 1:
191
191
  address = _a.sent();
192
192
  message = txClient.msgSetWithdrawAddress({ delegatorAddress: address, withdrawAddress: withdrawAddress });
193
- return [4 /*yield*/, txClient.sign([message], distribution_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
193
+ return [4 /*yield*/, txClient.sign([message], FirmaUtil_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
194
194
  case 2: return [2 /*return*/, _a.sent()];
195
195
  case 3:
196
196
  error_7 = _a.sent();
@@ -202,7 +202,7 @@ var FirmaDistributionService = /** @class */ (function () {
202
202
  });
203
203
  };
204
204
  FirmaDistributionService.prototype.getSignedTxFundCommunityPool = function (wallet, amount, txMisc) {
205
- if (txMisc === void 0) { txMisc = distribution_1.DefaultTxMisc; }
205
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
206
206
  return __awaiter(this, void 0, void 0, function () {
207
207
  var txClient, address, sendAmount, message, error_8;
208
208
  return __generator(this, function (_a) {
@@ -215,7 +215,7 @@ var FirmaDistributionService = /** @class */ (function () {
215
215
  address = _a.sent();
216
216
  sendAmount = { denom: this.config.denom, amount: FirmaUtil_1.FirmaUtil.getUFCTStringFromFCT(amount) };
217
217
  message = txClient.msgFundCommunityPool({ depositor: address, amount: [sendAmount] });
218
- return [4 /*yield*/, txClient.sign([message], distribution_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
218
+ return [4 /*yield*/, txClient.sign([message], FirmaUtil_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
219
219
  case 2: return [2 /*return*/, _a.sent()];
220
220
  case 3:
221
221
  error_8 = _a.sent();
@@ -227,7 +227,7 @@ var FirmaDistributionService = /** @class */ (function () {
227
227
  });
228
228
  };
229
229
  FirmaDistributionService.prototype.getSignedTxWithdrawValidatorCommission = function (wallet, validatorAddres, txMisc) {
230
- if (txMisc === void 0) { txMisc = distribution_1.DefaultTxMisc; }
230
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
231
231
  return __awaiter(this, void 0, void 0, function () {
232
232
  var txClient, message, error_9;
233
233
  return __generator(this, function (_a) {
@@ -236,7 +236,7 @@ var FirmaDistributionService = /** @class */ (function () {
236
236
  _a.trys.push([0, 2, , 3]);
237
237
  txClient = new distribution_1.DistributionTxClient(wallet, this.config.rpcAddress);
238
238
  message = txClient.msgWithdrawValidatorCommission({ validatorAddress: validatorAddres });
239
- return [4 /*yield*/, txClient.sign([message], distribution_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
239
+ return [4 /*yield*/, txClient.sign([message], FirmaUtil_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
240
240
  case 1: return [2 /*return*/, _a.sent()];
241
241
  case 2:
242
242
  error_9 = _a.sent();
@@ -248,7 +248,7 @@ var FirmaDistributionService = /** @class */ (function () {
248
248
  });
249
249
  };
250
250
  FirmaDistributionService.prototype.setWithdrawAddress = function (wallet, withdrawAddress, txMisc) {
251
- if (txMisc === void 0) { txMisc = distribution_1.DefaultTxMisc; }
251
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
252
252
  return __awaiter(this, void 0, void 0, function () {
253
253
  var txRaw, txClient, error_10;
254
254
  return __generator(this, function (_a) {
@@ -271,7 +271,7 @@ var FirmaDistributionService = /** @class */ (function () {
271
271
  });
272
272
  };
273
273
  FirmaDistributionService.prototype.fundCommunityPool = function (wallet, amount, txMisc) {
274
- if (txMisc === void 0) { txMisc = distribution_1.DefaultTxMisc; }
274
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
275
275
  return __awaiter(this, void 0, void 0, function () {
276
276
  var txRaw, txClient, error_11;
277
277
  return __generator(this, function (_a) {
@@ -294,7 +294,7 @@ var FirmaDistributionService = /** @class */ (function () {
294
294
  });
295
295
  };
296
296
  FirmaDistributionService.prototype.withdrawValidatorCommission = function (wallet, validatorAddres, txMisc) {
297
- if (txMisc === void 0) { txMisc = distribution_1.DefaultTxMisc; }
297
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
298
298
  return __awaiter(this, void 0, void 0, function () {
299
299
  var txRaw, txClient, error_12;
300
300
  return __generator(this, function (_a) {
@@ -317,7 +317,7 @@ var FirmaDistributionService = /** @class */ (function () {
317
317
  });
318
318
  };
319
319
  FirmaDistributionService.prototype.getSignedTxwithdrawAllRewardsFromAllValidator = function (wallet, delegationList, txMisc) {
320
- if (txMisc === void 0) { txMisc = distribution_1.DefaultTxMisc; }
320
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
321
321
  return __awaiter(this, void 0, void 0, function () {
322
322
  var address, txClient, messageList, i, validatorAddress, message, error_13;
323
323
  return __generator(this, function (_a) {
@@ -334,7 +334,7 @@ var FirmaDistributionService = /** @class */ (function () {
334
334
  message = txClient.msgWithdrawDelegatorReward({ delegatorAddress: address, validatorAddress: validatorAddress });
335
335
  messageList.push(message);
336
336
  }
337
- return [4 /*yield*/, txClient.sign(messageList, distribution_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
337
+ return [4 /*yield*/, txClient.sign(messageList, FirmaUtil_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
338
338
  case 2: return [2 /*return*/, _a.sent()];
339
339
  case 3:
340
340
  error_13 = _a.sent();
@@ -346,7 +346,7 @@ var FirmaDistributionService = /** @class */ (function () {
346
346
  });
347
347
  };
348
348
  FirmaDistributionService.prototype.withdrawAllRewardsFromAllValidator = function (wallet, delegationList, txMisc) {
349
- if (txMisc === void 0) { txMisc = distribution_1.DefaultTxMisc; }
349
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
350
350
  return __awaiter(this, void 0, void 0, function () {
351
351
  var txRaw, txClient, error_14;
352
352
  return __generator(this, function (_a) {
@@ -369,7 +369,7 @@ var FirmaDistributionService = /** @class */ (function () {
369
369
  });
370
370
  };
371
371
  FirmaDistributionService.prototype.withdrawAllRewards = function (wallet, validatorAddress, txMisc) {
372
- if (txMisc === void 0) { txMisc = distribution_1.DefaultTxMisc; }
372
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
373
373
  return __awaiter(this, void 0, void 0, function () {
374
374
  var txRaw, txClient, error_15;
375
375
  return __generator(this, function (_a) {
@@ -47,7 +47,7 @@ var FirmaFeeGrantService = /** @class */ (function () {
47
47
  this.config = config;
48
48
  }
49
49
  FirmaFeeGrantService.prototype.getGasEstimationRevokeAllowance = function (wallet, granteeAddress, txMisc) {
50
- if (txMisc === void 0) { txMisc = feegrant_1.DefaultTxMisc; }
50
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
51
51
  return __awaiter(this, void 0, void 0, function () {
52
52
  var txRaw, error_1;
53
53
  return __generator(this, function (_a) {
@@ -69,7 +69,7 @@ var FirmaFeeGrantService = /** @class */ (function () {
69
69
  });
70
70
  };
71
71
  FirmaFeeGrantService.prototype.getSignedTxRevokeAllowance = function (wallet, granteeAddress, txMisc) {
72
- if (txMisc === void 0) { txMisc = feegrant_1.DefaultTxMisc; }
72
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
73
73
  return __awaiter(this, void 0, void 0, function () {
74
74
  var address, feeGrantTxClient, message, error_2;
75
75
  return __generator(this, function (_a) {
@@ -81,7 +81,7 @@ var FirmaFeeGrantService = /** @class */ (function () {
81
81
  address = _a.sent();
82
82
  feeGrantTxClient = new feegrant_1.FeeGrantTxClient(wallet, this.config.rpcAddress);
83
83
  message = feeGrantTxClient.msgRevokeAllowance({ granter: address, grantee: granteeAddress });
84
- return [4 /*yield*/, feeGrantTxClient.sign([message], feegrant_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
84
+ return [4 /*yield*/, feeGrantTxClient.sign([message], FirmaUtil_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
85
85
  case 2: return [2 /*return*/, _a.sent()];
86
86
  case 3:
87
87
  error_2 = _a.sent();
@@ -93,7 +93,7 @@ var FirmaFeeGrantService = /** @class */ (function () {
93
93
  });
94
94
  };
95
95
  FirmaFeeGrantService.prototype.revokeAllowance = function (wallet, granteeAddress, txMisc) {
96
- if (txMisc === void 0) { txMisc = feegrant_1.DefaultTxMisc; }
96
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
97
97
  return __awaiter(this, void 0, void 0, function () {
98
98
  var txRaw, feeGrantTxClient, error_3;
99
99
  return __generator(this, function (_a) {
@@ -121,7 +121,7 @@ var FirmaFeeGrantService = /** @class */ (function () {
121
121
  return [{ denom: this.config.denom, amount: amount.toString() }];
122
122
  };
123
123
  FirmaFeeGrantService.prototype.getGasEstimationGrantPeriodicAllowance = function (wallet, granteeAddress, feegrantOption, txMisc) {
124
- if (txMisc === void 0) { txMisc = feegrant_1.DefaultTxMisc; }
124
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
125
125
  return __awaiter(this, void 0, void 0, function () {
126
126
  var txRaw, error_4;
127
127
  return __generator(this, function (_a) {
@@ -143,7 +143,7 @@ var FirmaFeeGrantService = /** @class */ (function () {
143
143
  });
144
144
  };
145
145
  FirmaFeeGrantService.prototype.getSignedTxGrantPeriodicAllowance = function (wallet, granteeAddress, feegrantOption, txMisc) {
146
- if (txMisc === void 0) { txMisc = feegrant_1.DefaultTxMisc; }
146
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
147
147
  return __awaiter(this, void 0, void 0, function () {
148
148
  var address, feeGrantTxClient, periodicAllowanceData, bytes, allowanceAnyData, message, error_5;
149
149
  return __generator(this, function (_a) {
@@ -174,7 +174,7 @@ var FirmaFeeGrantService = /** @class */ (function () {
174
174
  grantee: granteeAddress,
175
175
  allowance: any_1.Any.fromJSON(allowanceAnyData)
176
176
  });
177
- return [4 /*yield*/, feeGrantTxClient.sign([message], feegrant_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
177
+ return [4 /*yield*/, feeGrantTxClient.sign([message], FirmaUtil_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
178
178
  case 2: return [2 /*return*/, _a.sent()];
179
179
  case 3:
180
180
  error_5 = _a.sent();
@@ -187,7 +187,7 @@ var FirmaFeeGrantService = /** @class */ (function () {
187
187
  };
188
188
  FirmaFeeGrantService.prototype.getGasEstimationGrantBasicAllowance = function (wallet, granteeAddress, feegrantOption, txMisc) {
189
189
  if (feegrantOption === void 0) { feegrantOption = feegrant_1.DefaultBasicFeeGrantOption; }
190
- if (txMisc === void 0) { txMisc = feegrant_1.DefaultTxMisc; }
190
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
191
191
  return __awaiter(this, void 0, void 0, function () {
192
192
  var txRaw, error_6;
193
193
  return __generator(this, function (_a) {
@@ -210,7 +210,7 @@ var FirmaFeeGrantService = /** @class */ (function () {
210
210
  };
211
211
  FirmaFeeGrantService.prototype.getSignedTxGrantBasicAllowance = function (wallet, granteeAddress, feegrantOption, txMisc) {
212
212
  if (feegrantOption === void 0) { feegrantOption = feegrant_1.DefaultBasicFeeGrantOption; }
213
- if (txMisc === void 0) { txMisc = feegrant_1.DefaultTxMisc; }
213
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
214
214
  return __awaiter(this, void 0, void 0, function () {
215
215
  var feeGrantTxClient, address, basicAllowanceData, bytes, allowanceAnyData, message, error_7;
216
216
  return __generator(this, function (_a) {
@@ -235,7 +235,7 @@ var FirmaFeeGrantService = /** @class */ (function () {
235
235
  grantee: granteeAddress,
236
236
  allowance: any_1.Any.fromJSON(allowanceAnyData)
237
237
  });
238
- return [4 /*yield*/, feeGrantTxClient.sign([message], feegrant_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
238
+ return [4 /*yield*/, feeGrantTxClient.sign([message], FirmaUtil_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
239
239
  case 2: return [2 /*return*/, _a.sent()];
240
240
  case 3:
241
241
  error_7 = _a.sent();
@@ -247,7 +247,7 @@ var FirmaFeeGrantService = /** @class */ (function () {
247
247
  });
248
248
  };
249
249
  FirmaFeeGrantService.prototype.grantPeriodicAllowance = function (wallet, granteeAddress, feegrantOption, txMisc) {
250
- if (txMisc === void 0) { txMisc = feegrant_1.DefaultTxMisc; }
250
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
251
251
  return __awaiter(this, void 0, void 0, function () {
252
252
  var txRaw, feeGrantTxClient, error_8;
253
253
  return __generator(this, function (_a) {
@@ -271,7 +271,7 @@ var FirmaFeeGrantService = /** @class */ (function () {
271
271
  };
272
272
  FirmaFeeGrantService.prototype.grantBasicAllowance = function (wallet, granteeAddress, feegrantOption, txMisc) {
273
273
  if (feegrantOption === void 0) { feegrantOption = feegrant_1.DefaultBasicFeeGrantOption; }
274
- if (txMisc === void 0) { txMisc = feegrant_1.DefaultTxMisc; }
274
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
275
275
  return __awaiter(this, void 0, void 0, function () {
276
276
  var txRaw, feeGrantTxClient, error_9;
277
277
  return __generator(this, function (_a) {