@firmachain/firma-js 0.3.7 → 0.4.0-beta1

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 (128) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index.js +1 -0
  3. package/dist/sdk/FirmaAuthzService.js +20 -15
  4. package/dist/sdk/FirmaBankService.d.ts +1 -1
  5. package/dist/sdk/FirmaBankService.js +5 -4
  6. package/dist/sdk/FirmaConfig.js +4 -4
  7. package/dist/sdk/FirmaContractService.js +10 -8
  8. package/dist/sdk/FirmaDistributionService.js +37 -22
  9. package/dist/sdk/FirmaFeeGrantService.d.ts +0 -1
  10. package/dist/sdk/FirmaFeeGrantService.js +12 -14
  11. package/dist/sdk/FirmaGovService.d.ts +14 -0
  12. package/dist/sdk/FirmaGovService.js +74 -47
  13. package/dist/sdk/FirmaIbcService.js +4 -3
  14. package/dist/sdk/FirmaNftService.d.ts +3 -3
  15. package/dist/sdk/FirmaNftService.js +13 -10
  16. package/dist/sdk/FirmaStakingService.js +12 -9
  17. package/dist/sdk/FirmaTokenService.js +17 -14
  18. package/dist/sdk/FirmaUtil.js +1 -1
  19. package/dist/sdk/FirmaWalletService.d.ts +1 -1
  20. package/dist/sdk/FirmaWalletService.js +11 -23
  21. package/dist/sdk/firmachain/authz/AuthzTxClient.js +2 -0
  22. package/dist/sdk/firmachain/bank/BankTxClient.js +1 -1
  23. package/dist/sdk/firmachain/common/CommonTxClient.js +3 -1
  24. package/dist/sdk/firmachain/common/FirmaLedger.d.ts +49 -0
  25. package/dist/sdk/firmachain/common/FirmaLedger.js +301 -0
  26. package/dist/sdk/firmachain/common/ITxClient.d.ts +1 -1
  27. package/dist/sdk/firmachain/common/ITxClient.js +6 -4
  28. package/dist/sdk/firmachain/common/LedgerWallet.d.ts +5 -13
  29. package/dist/sdk/firmachain/common/LedgerWallet.js +1266 -124
  30. package/dist/sdk/firmachain/common/SigningProtobufStargateClient.js +3 -4
  31. package/dist/sdk/firmachain/common/SigningStargateClient.d.ts +2 -3
  32. package/dist/sdk/firmachain/common/SigningStargateClient.js +7 -10
  33. package/dist/sdk/firmachain/common/index.d.ts +1 -0
  34. package/dist/sdk/firmachain/common/index.js +1 -0
  35. package/dist/sdk/firmachain/common/signing.d.ts +4 -10
  36. package/dist/sdk/firmachain/common/signing.js +13 -60
  37. package/dist/sdk/firmachain/contract/ContractTxClient.js +1 -1
  38. package/dist/sdk/firmachain/contract/ContractTxTypes.js +54 -8
  39. package/dist/sdk/firmachain/distribution/DistributionTxClient.js +1 -1
  40. package/dist/sdk/firmachain/feegrant/FeeGrantTxClient.js +3 -1
  41. package/dist/sdk/firmachain/feegrant/FeeGrantTxTypes.d.ts +1 -2
  42. package/dist/sdk/firmachain/google/protobuf/any.js +0 -12
  43. package/dist/sdk/firmachain/gov/GovTxClient.js +3 -0
  44. package/dist/sdk/firmachain/nft/NftTxClient.js +1 -1
  45. package/dist/sdk/firmachain/token/TokenTxClient.js +1 -1
  46. package/package.json +16 -8
  47. package/dist/test/00.wallet.test.d.ts +0 -1
  48. package/dist/test/00.wallet.test.js +0 -96
  49. package/dist/test/01.contract_tx.test.d.ts +0 -1
  50. package/dist/test/01.contract_tx.test.js +0 -157
  51. package/dist/test/02.contract_query.test.d.ts +0 -1
  52. package/dist/test/02.contract_query.test.js +0 -245
  53. package/dist/test/03.contract_scenario.test.d.ts +0 -1
  54. package/dist/test/03.contract_scenario.test.js +0 -406
  55. package/dist/test/04.bank_tx.test.d.ts +0 -1
  56. package/dist/test/04.bank_tx.test.js +0 -126
  57. package/dist/test/05.bank_query.test.d.ts +0 -1
  58. package/dist/test/05.bank_query.test.js +0 -162
  59. package/dist/test/06.feegrant_tx.test.d.ts +0 -1
  60. package/dist/test/06.feegrant_tx.test.js +0 -185
  61. package/dist/test/07.feegrant_query.test.d.ts +0 -1
  62. package/dist/test/07.feegrant_query.test.js +0 -129
  63. package/dist/test/08.gas_estimate.test.d.ts +0 -1
  64. package/dist/test/08.gas_estimate.test.js +0 -728
  65. package/dist/test/09.ipfs.test.d.ts +0 -1
  66. package/dist/test/09.ipfs.test.js +0 -72
  67. package/dist/test/10.nft_tx.test.d.ts +0 -1
  68. package/dist/test/10.nft_tx.test.js +0 -209
  69. package/dist/test/11.nft_query.test.d.ts +0 -1
  70. package/dist/test/11.nft_query.test.js +0 -165
  71. package/dist/test/12.staking_tx.test.d.ts +0 -1
  72. package/dist/test/12.staking_tx.test.js +0 -211
  73. package/dist/test/13.staking_query.test.d.ts +0 -1
  74. package/dist/test/13.staking_query.test.js +0 -275
  75. package/dist/test/14.distribution_tx.test.d.ts +0 -1
  76. package/dist/test/14.distribution_tx.test.js +0 -170
  77. package/dist/test/15.distribution_query.test.d.ts +0 -1
  78. package/dist/test/15.distribution_query.test.js +0 -243
  79. package/dist/test/16.gov_tx.test.d.ts +0 -1
  80. package/dist/test/16.gov_tx.test.js +0 -396
  81. package/dist/test/17.gov_query.test.d.ts +0 -1
  82. package/dist/test/17.gov_query.test.js +0 -181
  83. package/dist/test/18.util.test.d.ts +0 -1
  84. package/dist/test/18.util.test.js +0 -354
  85. package/dist/test/19.chain.test.d.ts +0 -1
  86. package/dist/test/19.chain.test.js +0 -127
  87. package/dist/test/20.slashing_query.test.d.ts +0 -1
  88. package/dist/test/20.slashing_query.test.js +0 -111
  89. package/dist/test/21.token_tx.test.d.ts +0 -1
  90. package/dist/test/21.token_tx.test.js +0 -149
  91. package/dist/test/22.token_query.test.d.ts +0 -1
  92. package/dist/test/22.token_query.test.js +0 -103
  93. package/dist/test/23.authz_tx.test.d.ts +0 -1
  94. package/dist/test/23.authz_tx.test.js +0 -380
  95. package/dist/test/24.authz_query.test.d.ts +0 -1
  96. package/dist/test/24.authz_query.test.js +0 -202
  97. package/dist/test/25.cosmwasm_tx.test.d.ts +0 -1
  98. package/dist/test/25.cosmwasm_tx.test.js +0 -229
  99. package/dist/test/26.cosmwasm_query.test.d.ts +0 -1
  100. package/dist/test/26.cosmwasm_query.test.js +0 -275
  101. package/dist/test/27.arbitrary_sign.test.d.ts +0 -1
  102. package/dist/test/27.arbitrary_sign.test.js +0 -162
  103. package/dist/test/28.ibc_tx.test.d.ts +0 -1
  104. package/dist/test/28.ibc_tx.test.js +0 -98
  105. package/dist/test/29.mint_query.test.d.ts +0 -1
  106. package/dist/test/29.mint_query.test.js +0 -59
  107. package/dist/test/30.cw20_tx.test.d.ts +0 -1
  108. package/dist/test/30.cw20_tx.test.js +0 -450
  109. package/dist/test/31.cw20_query.test.d.ts +0 -1
  110. package/dist/test/31.cw20_query.test.js +0 -333
  111. package/dist/test/32.cw721_tx.test.d.ts +0 -1
  112. package/dist/test/32.cw721_tx.test.js +0 -431
  113. package/dist/test/33.cw721_query.test.d.ts +0 -1
  114. package/dist/test/33.cw721_query.test.js +0 -371
  115. package/dist/test/34.cw_bridge_tx.test.d.ts +0 -1
  116. package/dist/test/34.cw_bridge_tx.test.js +0 -476
  117. package/dist/test/35.cw_bridge_tx_low.test.d.ts +0 -1
  118. package/dist/test/35.cw_bridge_tx_low.test.js +0 -398
  119. package/dist/test/36.cw_bridge_query.test.d.ts +0 -1
  120. package/dist/test/36.cw_bridge_query.test.js +0 -318
  121. package/dist/test/37.cw_marketplace_tx.test.d.ts +0 -1
  122. package/dist/test/37.cw_marketplace_tx.test.js +0 -794
  123. package/dist/test/38.cw_marketplace_query.test.d.ts +0 -1
  124. package/dist/test/38.cw_marketplace_query.test.js +0 -128
  125. package/dist/test/config_test.d.ts +0 -11
  126. package/dist/test/config_test.js +0 -14
  127. package/dist/test/config_test.sample.d.ts +0 -11
  128. package/dist/test/config_test.sample.js +0 -14
@@ -66,9 +66,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
66
66
  Object.defineProperty(exports, "__esModule", { value: true });
67
67
  exports.FirmaGovService = void 0;
68
68
  var gov_1 = require("./firmachain/gov");
69
- var any_1 = require("./firmachain/google/protobuf/any");
70
69
  var FirmaUtil_1 = require("./FirmaUtil");
71
- var gov_2 = require("cosmjs-types/cosmos/gov/v1beta1/gov");
72
70
  var tx_1 = require("cosmjs-types/cosmos/staking/v1beta1/tx");
73
71
  var fast_deep_equal_1 = __importDefault(require("fast-deep-equal"));
74
72
  // temporarly using kintsugi-tech/cosmjs-types - this will be returned to original cosmjs-types after the PR is merged
@@ -88,7 +86,7 @@ var FirmaGovService = /** @class */ (function () {
88
86
  case 0:
89
87
  _a.trys.push([0, 3, , 4]);
90
88
  bigIntId = BigInt(proposalId);
91
- return [4 /*yield*/, this.getSignedTxVote(wallet, bigIntId, option, txMisc)];
89
+ return [4 /*yield*/, this.getSignedTxVote(wallet, bigIntId, option, txMisc, true)];
92
90
  case 1:
93
91
  txRaw = _a.sent();
94
92
  return [4 /*yield*/, FirmaUtil_1.FirmaUtil.estimateGas(txRaw)];
@@ -111,7 +109,7 @@ var FirmaGovService = /** @class */ (function () {
111
109
  case 0:
112
110
  _a.trys.push([0, 3, , 4]);
113
111
  bigIntId = BigInt(proposalId);
114
- return [4 /*yield*/, this.getSignedTxDeposit(wallet, bigIntId, amount, txMisc)];
112
+ return [4 /*yield*/, this.getSignedTxDeposit(wallet, bigIntId, amount, txMisc, true)];
115
113
  case 1:
116
114
  txRaw = _a.sent();
117
115
  return [4 /*yield*/, FirmaUtil_1.FirmaUtil.estimateGas(txRaw)];
@@ -129,19 +127,22 @@ var FirmaGovService = /** @class */ (function () {
129
127
  if (metadata === void 0) { metadata = ""; }
130
128
  if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
131
129
  return __awaiter(this, void 0, void 0, function () {
132
- var message, txRaw, error_3;
130
+ var msgObj, message, txRaw, error_3;
133
131
  return __generator(this, function (_a) {
134
132
  switch (_a.label) {
135
133
  case 0:
136
134
  _a.trys.push([0, 3, , 4]);
135
+ msgObj = tx_3.MsgSoftwareUpgrade.fromPartial({
136
+ authority: FirmaGovService.GOV_AUTHORITY,
137
+ plan: plan
138
+ });
139
+ // Remove time field from the plan to avoid encoding deprecated field
140
+ delete msgObj.plan.time;
137
141
  message = {
138
142
  typeUrl: "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade",
139
- value: tx_3.MsgSoftwareUpgrade.encode(tx_3.MsgSoftwareUpgrade.fromPartial({
140
- authority: FirmaGovService.GOV_AUTHORITY,
141
- plan: plan
142
- })).finish()
143
+ value: tx_3.MsgSoftwareUpgrade.encode(msgObj).finish()
143
144
  };
144
- return [4 /*yield*/, this.getSignedTxSubmitSoftwareUpgradeProposal(wallet, title, summary, initialDepositFCT, [message], metadata, txMisc)];
145
+ return [4 /*yield*/, this.getSignedTxSubmitSoftwareUpgradeProposal(wallet, title, summary, initialDepositFCT, [message], metadata, txMisc, true)];
145
146
  case 1:
146
147
  txRaw = _a.sent();
147
148
  return [4 /*yield*/, FirmaUtil_1.FirmaUtil.estimateGas(txRaw)];
@@ -182,7 +183,7 @@ var FirmaGovService = /** @class */ (function () {
182
183
  params: params
183
184
  })).finish()
184
185
  };
185
- return [4 /*yield*/, this.getSignedTxSubmitStakingParamsUpdateProposal(wallet, title, summary, initialDepositFCT, [message], metadata, txMisc)];
186
+ return [4 /*yield*/, this.getSignedTxSubmitStakingParamsUpdateProposal(wallet, title, summary, initialDepositFCT, [message], metadata, txMisc, true)];
186
187
  case 1:
187
188
  txRaw = _a.sent();
188
189
  return [4 /*yield*/, FirmaUtil_1.FirmaUtil.estimateGas(txRaw)];
@@ -223,7 +224,7 @@ var FirmaGovService = /** @class */ (function () {
223
224
  params: params
224
225
  })).finish()
225
226
  };
226
- return [4 /*yield*/, this.getSignedTxSubmitGovParamsUpdateProposal(wallet, title, summary, initialDepositFCT, [message], metadata, txMisc)];
227
+ return [4 /*yield*/, this.getSignedTxSubmitGovParamsUpdateProposal(wallet, title, summary, initialDepositFCT, [message], metadata, txMisc, true)];
227
228
  case 1:
228
229
  txRaw = _a.sent();
229
230
  return [4 /*yield*/, FirmaUtil_1.FirmaUtil.estimateGas(txRaw)];
@@ -257,7 +258,7 @@ var FirmaGovService = /** @class */ (function () {
257
258
  }]
258
259
  })).finish())
259
260
  };
260
- return [4 /*yield*/, this.getSignedTxSubmitCommunityPoolSpendProposal(wallet, title, summary, initialDepositFCT, [message], recipient, txMisc)];
261
+ return [4 /*yield*/, this.getSignedTxSubmitCommunityPoolSpendProposal(wallet, title, summary, initialDepositFCT, [message], recipient, txMisc, true)];
261
262
  case 1:
262
263
  txRaw = _a.sent();
263
264
  return [4 /*yield*/, FirmaUtil_1.FirmaUtil.estimateGas(txRaw)];
@@ -279,7 +280,7 @@ var FirmaGovService = /** @class */ (function () {
279
280
  switch (_a.label) {
280
281
  case 0:
281
282
  _a.trys.push([0, 3, , 4]);
282
- return [4 /*yield*/, this.getSignedTxSubmitTextProposal(wallet, title, description, initialDepositFCT, txMisc)];
283
+ return [4 /*yield*/, this.getSignedTxSubmitTextProposal(wallet, title, description, initialDepositFCT, txMisc, true)];
283
284
  case 1:
284
285
  txRaw = _a.sent();
285
286
  return [4 /*yield*/, FirmaUtil_1.FirmaUtil.estimateGas(txRaw)];
@@ -301,7 +302,7 @@ var FirmaGovService = /** @class */ (function () {
301
302
  switch (_a.label) {
302
303
  case 0:
303
304
  _a.trys.push([0, 3, , 4]);
304
- return [4 /*yield*/, this.getSignedTxCancelProposal(wallet, proposalId, txMisc)];
305
+ return [4 /*yield*/, this.getSignedTxCancelProposal(wallet, proposalId, txMisc, true)];
305
306
  case 1:
306
307
  txRaw = _a.sent();
307
308
  return [4 /*yield*/, FirmaUtil_1.FirmaUtil.estimateGas(txRaw)];
@@ -315,29 +316,45 @@ var FirmaGovService = /** @class */ (function () {
315
316
  });
316
317
  });
317
318
  };
318
- FirmaGovService.prototype.getSignedTxSubmitTextProposal = function (wallet, title, description, initialDepositFCT, txMisc) {
319
+ /**
320
+ * Submits a text proposal (signaling proposal with no executable messages).
321
+ *
322
+ * Cosmos SDK gov v1 MsgSubmitProposal.ValidateBasic() enforces:
323
+ * if len(m.Messages) == 0 && len(m.Metadata) == 0 { return ErrNoProposalMsgs }
324
+ *
325
+ * Text proposals have messages: [], so metadata MUST be non-empty or the tx
326
+ * fails with "either metadata or Msgs length must be non-nil: no messages
327
+ * proposed" (x/gov ErrNoProposalMsgs, code 11). This does NOT apply to
328
+ * regular proposals with messages — empty metadata is valid there.
329
+ *
330
+ * @see https://github.com/cosmos/cosmos-sdk/blob/release/v0.46.x/x/gov/types/v1/msgs.go
331
+ * @see https://github.com/cosmos/cosmos-sdk/blob/release/v0.46.x/x/gov/types/errors.go
332
+ */
333
+ FirmaGovService.prototype.getSignedTxSubmitTextProposal = function (wallet, title, description, initialDepositFCT, txMisc, simulate, metadata) {
319
334
  if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
335
+ if (simulate === void 0) { simulate = false; }
336
+ if (metadata === void 0) { metadata = "ipfs://CID"; }
320
337
  return __awaiter(this, void 0, void 0, function () {
321
- var sendAmount, proposal, content, proposer, message, txClient, error_9;
338
+ var proposer, initialDeposit, txClient, message, error_9;
322
339
  return __generator(this, function (_a) {
323
340
  switch (_a.label) {
324
341
  case 0:
325
342
  _a.trys.push([0, 3, , 4]);
326
- sendAmount = { denom: this.config.denom, amount: FirmaUtil_1.FirmaUtil.getUFCTStringFromFCT(initialDepositFCT) };
327
- proposal = gov_2.TextProposal.fromPartial({
328
- title: title,
329
- description: description,
330
- });
331
- content = any_1.Any.fromPartial({
332
- typeUrl: "/cosmos.gov.v1beta1.TextProposal",
333
- value: Uint8Array.from(gov_2.TextProposal.encode(proposal).finish()),
334
- });
335
343
  return [4 /*yield*/, wallet.getAddress()];
336
344
  case 1:
337
345
  proposer = _a.sent();
338
- message = gov_1.GovTxClient.msgSubmitProposal({ content: content, initialDeposit: [sendAmount], proposer: proposer });
346
+ initialDeposit = [{ denom: this.config.denom, amount: FirmaUtil_1.FirmaUtil.getUFCTStringFromFCT(initialDepositFCT) }];
339
347
  txClient = new gov_1.GovTxClient(wallet, this.config.rpcAddress);
340
- return [4 /*yield*/, txClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc))];
348
+ message = gov_1.GovTxClient.v1MsgSubmitProposal({
349
+ title: title,
350
+ summary: description,
351
+ metadata: metadata,
352
+ messages: [],
353
+ proposer: proposer,
354
+ initialDeposit: initialDeposit,
355
+ expedited: false
356
+ });
357
+ return [4 /*yield*/, txClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc), simulate)];
341
358
  case 2: return [2 /*return*/, _a.sent()];
342
359
  case 3:
343
360
  error_9 = _a.sent();
@@ -348,9 +365,10 @@ var FirmaGovService = /** @class */ (function () {
348
365
  });
349
366
  });
350
367
  };
351
- FirmaGovService.prototype.getSignedTxSubmitSoftwareUpgradeProposal = function (wallet, title, summary, initialDepositFCT, messages, metadata, txMisc) {
368
+ FirmaGovService.prototype.getSignedTxSubmitSoftwareUpgradeProposal = function (wallet, title, summary, initialDepositFCT, messages, metadata, txMisc, simulate) {
352
369
  if (metadata === void 0) { metadata = ""; }
353
370
  if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
371
+ if (simulate === void 0) { simulate = false; }
354
372
  return __awaiter(this, void 0, void 0, function () {
355
373
  var proposer, initialDeposit, txClient, message, error_10;
356
374
  return __generator(this, function (_a) {
@@ -371,7 +389,7 @@ var FirmaGovService = /** @class */ (function () {
371
389
  initialDeposit: initialDeposit,
372
390
  expedited: false
373
391
  });
374
- return [4 /*yield*/, txClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc))];
392
+ return [4 /*yield*/, txClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc), simulate)];
375
393
  case 2: return [2 /*return*/, _a.sent()];
376
394
  case 3:
377
395
  error_10 = _a.sent();
@@ -382,9 +400,10 @@ var FirmaGovService = /** @class */ (function () {
382
400
  });
383
401
  });
384
402
  };
385
- FirmaGovService.prototype.getSignedTxSubmitStakingParamsUpdateProposal = function (wallet, title, summary, initialDepositFCT, messages, metadata, txMisc) {
403
+ FirmaGovService.prototype.getSignedTxSubmitStakingParamsUpdateProposal = function (wallet, title, summary, initialDepositFCT, messages, metadata, txMisc, simulate) {
386
404
  if (metadata === void 0) { metadata = ""; }
387
405
  if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
406
+ if (simulate === void 0) { simulate = false; }
388
407
  return __awaiter(this, void 0, void 0, function () {
389
408
  var proposer, initialDeposit, txClient, message, error_11;
390
409
  return __generator(this, function (_a) {
@@ -405,7 +424,7 @@ var FirmaGovService = /** @class */ (function () {
405
424
  initialDeposit: initialDeposit,
406
425
  expedited: false
407
426
  });
408
- return [4 /*yield*/, txClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc))];
427
+ return [4 /*yield*/, txClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc), simulate)];
409
428
  case 2: return [2 /*return*/, _a.sent()];
410
429
  case 3:
411
430
  error_11 = _a.sent();
@@ -416,9 +435,10 @@ var FirmaGovService = /** @class */ (function () {
416
435
  });
417
436
  });
418
437
  };
419
- FirmaGovService.prototype.getSignedTxSubmitGovParamsUpdateProposal = function (wallet, title, summary, initialDepositFCT, messages, metadata, txMisc) {
438
+ FirmaGovService.prototype.getSignedTxSubmitGovParamsUpdateProposal = function (wallet, title, summary, initialDepositFCT, messages, metadata, txMisc, simulate) {
420
439
  if (metadata === void 0) { metadata = ""; }
421
440
  if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
441
+ if (simulate === void 0) { simulate = false; }
422
442
  return __awaiter(this, void 0, void 0, function () {
423
443
  var proposer, initialDeposit, txClient, message, error_12;
424
444
  return __generator(this, function (_a) {
@@ -439,7 +459,7 @@ var FirmaGovService = /** @class */ (function () {
439
459
  initialDeposit: initialDeposit,
440
460
  expedited: false
441
461
  });
442
- return [4 /*yield*/, txClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc))];
462
+ return [4 /*yield*/, txClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc), simulate)];
443
463
  case 2: return [2 /*return*/, _a.sent()];
444
464
  case 3:
445
465
  error_12 = _a.sent();
@@ -450,9 +470,10 @@ var FirmaGovService = /** @class */ (function () {
450
470
  });
451
471
  });
452
472
  };
453
- FirmaGovService.prototype.getSignedTxSubmitCommunityPoolSpendProposal = function (wallet, title, summary, initialDepositFCT, messages, metadata, txMisc) {
473
+ FirmaGovService.prototype.getSignedTxSubmitCommunityPoolSpendProposal = function (wallet, title, summary, initialDepositFCT, messages, metadata, txMisc, simulate) {
454
474
  if (metadata === void 0) { metadata = ""; }
455
475
  if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
476
+ if (simulate === void 0) { simulate = false; }
456
477
  return __awaiter(this, void 0, void 0, function () {
457
478
  var proposer, initialDeposit, txClient, message, error_13;
458
479
  return __generator(this, function (_a) {
@@ -473,7 +494,7 @@ var FirmaGovService = /** @class */ (function () {
473
494
  initialDeposit: initialDeposit,
474
495
  expedited: false
475
496
  });
476
- return [4 /*yield*/, txClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc))];
497
+ return [4 /*yield*/, txClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc), simulate)];
477
498
  case 2: return [2 /*return*/, _a.sent()];
478
499
  case 3:
479
500
  error_13 = _a.sent();
@@ -484,8 +505,9 @@ var FirmaGovService = /** @class */ (function () {
484
505
  });
485
506
  });
486
507
  };
487
- FirmaGovService.prototype.getSignedTxCancelProposal = function (wallet, proposalId, txMisc) {
508
+ FirmaGovService.prototype.getSignedTxCancelProposal = function (wallet, proposalId, txMisc, simulate) {
488
509
  if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
510
+ if (simulate === void 0) { simulate = false; }
489
511
  return __awaiter(this, void 0, void 0, function () {
490
512
  var proposer, txClient, message;
491
513
  return __generator(this, function (_a) {
@@ -495,7 +517,7 @@ var FirmaGovService = /** @class */ (function () {
495
517
  proposer = _a.sent();
496
518
  txClient = new gov_1.GovTxClient(wallet, this.config.rpcAddress);
497
519
  message = gov_1.GovTxClient.v1MsgCancelProposal({ proposalId: BigInt(proposalId), proposer: proposer });
498
- return [4 /*yield*/, txClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc))];
520
+ return [4 /*yield*/, txClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc), simulate)];
499
521
  case 2: return [2 /*return*/, _a.sent()];
500
522
  }
501
523
  });
@@ -505,17 +527,20 @@ var FirmaGovService = /** @class */ (function () {
505
527
  if (metadata === void 0) { metadata = ""; }
506
528
  if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
507
529
  return __awaiter(this, void 0, void 0, function () {
508
- var message, txRaw, txClient, error_14;
530
+ var msgObj, message, txRaw, txClient, error_14;
509
531
  return __generator(this, function (_a) {
510
532
  switch (_a.label) {
511
533
  case 0:
512
534
  _a.trys.push([0, 3, , 4]);
535
+ msgObj = tx_3.MsgSoftwareUpgrade.fromPartial({
536
+ authority: FirmaGovService.GOV_AUTHORITY,
537
+ plan: plan
538
+ });
539
+ // Remove time field from the plan to avoid encoding deprecated field
540
+ delete msgObj.plan.time;
513
541
  message = {
514
542
  typeUrl: "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade",
515
- value: tx_3.MsgSoftwareUpgrade.encode(tx_3.MsgSoftwareUpgrade.fromPartial({
516
- authority: FirmaGovService.GOV_AUTHORITY,
517
- plan: plan
518
- })).finish()
543
+ value: tx_3.MsgSoftwareUpgrade.encode(msgObj).finish()
519
544
  };
520
545
  return [4 /*yield*/, this.getSignedTxSubmitSoftwareUpgradeProposal(wallet, title, summary, initialDepositFCT, [message], metadata, txMisc)];
521
546
  case 1:
@@ -735,8 +760,9 @@ var FirmaGovService = /** @class */ (function () {
735
760
  });
736
761
  });
737
762
  };
738
- FirmaGovService.prototype.getSignedTxVote = function (wallet, proposalId, option, txMisc) {
763
+ FirmaGovService.prototype.getSignedTxVote = function (wallet, proposalId, option, txMisc, simulate) {
739
764
  if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
765
+ if (simulate === void 0) { simulate = false; }
740
766
  return __awaiter(this, void 0, void 0, function () {
741
767
  var voter, txClient, message, error_21;
742
768
  return __generator(this, function (_a) {
@@ -748,7 +774,7 @@ var FirmaGovService = /** @class */ (function () {
748
774
  voter = _a.sent();
749
775
  txClient = new gov_1.GovTxClient(wallet, this.config.rpcAddress);
750
776
  message = gov_1.GovTxClient.v1MsgVote({ proposalId: proposalId, voter: voter, option: option, metadata: "" });
751
- return [4 /*yield*/, txClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc))];
777
+ return [4 /*yield*/, txClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc), simulate)];
752
778
  case 2: return [2 /*return*/, _a.sent()];
753
779
  case 3:
754
780
  error_21 = _a.sent();
@@ -783,8 +809,9 @@ var FirmaGovService = /** @class */ (function () {
783
809
  });
784
810
  });
785
811
  };
786
- FirmaGovService.prototype.getSignedTxDeposit = function (wallet, proposalId, amount, txMisc) {
812
+ FirmaGovService.prototype.getSignedTxDeposit = function (wallet, proposalId, amount, txMisc, simulate) {
787
813
  if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
814
+ if (simulate === void 0) { simulate = false; }
788
815
  return __awaiter(this, void 0, void 0, function () {
789
816
  var depositor, sendAmount, message, txClient, error_23;
790
817
  return __generator(this, function (_a) {
@@ -797,7 +824,7 @@ var FirmaGovService = /** @class */ (function () {
797
824
  sendAmount = { denom: this.config.denom, amount: FirmaUtil_1.FirmaUtil.getUFCTStringFromFCT(amount) };
798
825
  message = gov_1.GovTxClient.v1MsgDeposit({ proposalId: proposalId, depositor: depositor, amount: [sendAmount] });
799
826
  txClient = new gov_1.GovTxClient(wallet, this.config.rpcAddress);
800
- return [4 /*yield*/, txClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc))];
827
+ return [4 /*yield*/, txClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc), simulate)];
801
828
  case 2: return [2 /*return*/, _a.sent()];
802
829
  case 3:
803
830
  error_23 = _a.sent();
@@ -55,7 +55,7 @@ var FirmaIbcService = /** @class */ (function () {
55
55
  switch (_a.label) {
56
56
  case 0:
57
57
  _a.trys.push([0, 3, , 4]);
58
- return [4 /*yield*/, this.getSignedTxTransfer(wallet, sourcePort, sourceChannel, denom, amount, receiver, timeoutHeight, timeoutTimestamp, memo, txMisc)];
58
+ return [4 /*yield*/, this.getSignedTxTransfer(wallet, sourcePort, sourceChannel, denom, amount, receiver, timeoutHeight, timeoutTimestamp, memo, txMisc, true)];
59
59
  case 1:
60
60
  txRaw = _a.sent();
61
61
  return [4 /*yield*/, FirmaUtil_1.FirmaUtil.estimateGas(txRaw)];
@@ -93,9 +93,10 @@ var FirmaIbcService = /** @class */ (function () {
93
93
  });
94
94
  });
95
95
  };
96
- FirmaIbcService.prototype.getSignedTxTransfer = function (wallet, sourcePort, sourceChannel, denom, amount, receiver, timeoutHeight, timeoutTimestamp, memo, txMisc) {
96
+ FirmaIbcService.prototype.getSignedTxTransfer = function (wallet, sourcePort, sourceChannel, denom, amount, receiver, timeoutHeight, timeoutTimestamp, memo, txMisc, simulate) {
97
97
  if (memo === void 0) { memo = ""; }
98
98
  if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
99
+ if (simulate === void 0) { simulate = false; }
99
100
  return __awaiter(this, void 0, void 0, function () {
100
101
  var address, message, ibcTxClient, error_3;
101
102
  return __generator(this, function (_a) {
@@ -112,7 +113,7 @@ var FirmaIbcService = /** @class */ (function () {
112
113
  memo: memo
113
114
  });
114
115
  ibcTxClient = new ibc_1.IbcTxClient(wallet, this.config.rpcAddress);
115
- return [4 /*yield*/, ibcTxClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc))];
116
+ return [4 /*yield*/, ibcTxClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc), simulate)];
116
117
  case 2: return [2 /*return*/, _a.sent()];
117
118
  case 3:
118
119
  error_3 = _a.sent();
@@ -23,15 +23,15 @@ export declare class NftService {
23
23
  getBalanceOf(ownerAddress: string): Promise<number>;
24
24
  getGasEstimationTransfer(wallet: FirmaWalletService, toAddress: string, nftID: string, txMisc?: TxMisc): Promise<number>;
25
25
  getUnsignedTxTransfer(wallet: FirmaWalletService, toAddress: string, nftID: string): Promise<EncodeObject>;
26
- getSignedTxTransfer(wallet: FirmaWalletService, toAddress: string, nftID: string, txMisc?: TxMisc): Promise<TxRaw>;
26
+ getSignedTxTransfer(wallet: FirmaWalletService, toAddress: string, nftID: string, txMisc?: TxMisc, simulate?: boolean): Promise<TxRaw>;
27
27
  transfer(wallet: FirmaWalletService, toAddress: string, nftID: string, txMisc?: TxMisc): Promise<DeliverTxResponse>;
28
28
  getGasEstimationBurn(wallet: FirmaWalletService, nftID: string, txMisc?: TxMisc): Promise<number>;
29
29
  getUnsignedTxBurn(wallet: FirmaWalletService, nftID: string): Promise<EncodeObject>;
30
- getSignedTxBurn(wallet: FirmaWalletService, nftID: string, txMisc?: TxMisc): Promise<TxRaw>;
30
+ getSignedTxBurn(wallet: FirmaWalletService, nftID: string, txMisc?: TxMisc, simulate?: boolean): Promise<TxRaw>;
31
31
  burn(wallet: FirmaWalletService, nftID: string, txMisc?: TxMisc): Promise<DeliverTxResponse>;
32
32
  getGasEstimationFromEncodeObject(wallet: FirmaWalletService, msgList: EncodeObject[], txMisc?: TxMisc): Promise<number>;
33
33
  getGasEstimationMint(wallet: FirmaWalletService, tokenURI: string, txMisc?: TxMisc): Promise<number>;
34
- getSignedTxMint(wallet: FirmaWalletService, tokenURI: string, txMisc?: TxMisc): Promise<TxRaw>;
34
+ getSignedTxMint(wallet: FirmaWalletService, tokenURI: string, txMisc?: TxMisc, simulate?: boolean): Promise<TxRaw>;
35
35
  getUnsignedTxMint(wallet: FirmaWalletService, tokenURI: string): Promise<EncodeObject>;
36
36
  mint(wallet: FirmaWalletService, tokenURI: string, txMisc?: TxMisc): Promise<DeliverTxResponse>;
37
37
  signAndBroadcast(wallet: FirmaWalletService, msgList: EncodeObject[], txMisc?: TxMisc): Promise<DeliverTxResponse>;
@@ -168,7 +168,7 @@ var NftService = /** @class */ (function () {
168
168
  switch (_a.label) {
169
169
  case 0:
170
170
  _a.trys.push([0, 3, , 4]);
171
- return [4 /*yield*/, this.getSignedTxTransfer(wallet, toAddress, nftID, txMisc)];
171
+ return [4 /*yield*/, this.getSignedTxTransfer(wallet, toAddress, nftID, txMisc, true)];
172
172
  case 1:
173
173
  txRaw = _a.sent();
174
174
  return [4 /*yield*/, FirmaUtil_1.FirmaUtil.estimateGas(txRaw)];
@@ -203,8 +203,9 @@ var NftService = /** @class */ (function () {
203
203
  });
204
204
  });
205
205
  };
206
- NftService.prototype.getSignedTxTransfer = function (wallet, toAddress, nftID, txMisc) {
206
+ NftService.prototype.getSignedTxTransfer = function (wallet, toAddress, nftID, txMisc, simulate) {
207
207
  if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
208
+ if (simulate === void 0) { simulate = false; }
208
209
  return __awaiter(this, void 0, void 0, function () {
209
210
  var message, nftTxClient, error_8;
210
211
  return __generator(this, function (_a) {
@@ -215,7 +216,7 @@ var NftService = /** @class */ (function () {
215
216
  case 1:
216
217
  message = _a.sent();
217
218
  nftTxClient = new nft_1.NftTxClient(wallet, this.config.rpcAddress);
218
- return [4 /*yield*/, nftTxClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc))];
219
+ return [4 /*yield*/, nftTxClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc), simulate)];
219
220
  case 2: return [2 /*return*/, _a.sent()];
220
221
  case 3:
221
222
  error_8 = _a.sent();
@@ -257,7 +258,7 @@ var NftService = /** @class */ (function () {
257
258
  switch (_a.label) {
258
259
  case 0:
259
260
  _a.trys.push([0, 3, , 4]);
260
- return [4 /*yield*/, this.getSignedTxBurn(wallet, nftID, txMisc)];
261
+ return [4 /*yield*/, this.getSignedTxBurn(wallet, nftID, txMisc, true)];
261
262
  case 1:
262
263
  txRaw = _a.sent();
263
264
  return [4 /*yield*/, FirmaUtil_1.FirmaUtil.estimateGas(txRaw)];
@@ -292,8 +293,9 @@ var NftService = /** @class */ (function () {
292
293
  });
293
294
  });
294
295
  };
295
- NftService.prototype.getSignedTxBurn = function (wallet, nftID, txMisc) {
296
+ NftService.prototype.getSignedTxBurn = function (wallet, nftID, txMisc, simulate) {
296
297
  if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
298
+ if (simulate === void 0) { simulate = false; }
297
299
  return __awaiter(this, void 0, void 0, function () {
298
300
  var message, nftTxClient, error_12;
299
301
  return __generator(this, function (_a) {
@@ -304,7 +306,7 @@ var NftService = /** @class */ (function () {
304
306
  case 1:
305
307
  message = _a.sent();
306
308
  nftTxClient = new nft_1.NftTxClient(wallet, this.config.rpcAddress);
307
- return [4 /*yield*/, nftTxClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc))];
309
+ return [4 /*yield*/, nftTxClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc), simulate)];
308
310
  case 2: return [2 /*return*/, _a.sent()];
309
311
  case 3:
310
312
  error_12 = _a.sent();
@@ -347,7 +349,7 @@ var NftService = /** @class */ (function () {
347
349
  case 0:
348
350
  _a.trys.push([0, 3, , 4]);
349
351
  nftTxClient = new nft_1.NftTxClient(wallet, this.config.rpcAddress);
350
- return [4 /*yield*/, nftTxClient.sign(msgList, (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc))];
352
+ return [4 /*yield*/, nftTxClient.sign(msgList, (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc), true)];
351
353
  case 1:
352
354
  txRaw = _a.sent();
353
355
  return [4 /*yield*/, FirmaUtil_1.FirmaUtil.estimateGas(txRaw)];
@@ -369,7 +371,7 @@ var NftService = /** @class */ (function () {
369
371
  switch (_a.label) {
370
372
  case 0:
371
373
  _a.trys.push([0, 3, , 4]);
372
- return [4 /*yield*/, this.getSignedTxMint(wallet, tokenURI, txMisc)];
374
+ return [4 /*yield*/, this.getSignedTxMint(wallet, tokenURI, txMisc, true)];
373
375
  case 1:
374
376
  txRaw = _a.sent();
375
377
  return [4 /*yield*/, FirmaUtil_1.FirmaUtil.estimateGas(txRaw)];
@@ -383,8 +385,9 @@ var NftService = /** @class */ (function () {
383
385
  });
384
386
  });
385
387
  };
386
- NftService.prototype.getSignedTxMint = function (wallet, tokenURI, txMisc) {
388
+ NftService.prototype.getSignedTxMint = function (wallet, tokenURI, txMisc, simulate) {
387
389
  if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
390
+ if (simulate === void 0) { simulate = false; }
388
391
  return __awaiter(this, void 0, void 0, function () {
389
392
  var message, nftTxClient, error_16;
390
393
  return __generator(this, function (_a) {
@@ -395,7 +398,7 @@ var NftService = /** @class */ (function () {
395
398
  case 1:
396
399
  message = _a.sent();
397
400
  nftTxClient = new nft_1.NftTxClient(wallet, this.config.rpcAddress);
398
- return [4 /*yield*/, nftTxClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc))];
401
+ return [4 /*yield*/, nftTxClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc), simulate)];
399
402
  case 2: return [2 /*return*/, _a.sent()];
400
403
  case 3:
401
404
  error_16 = _a.sent();
@@ -61,7 +61,7 @@ var FirmaStakingService = /** @class */ (function () {
61
61
  switch (_a.label) {
62
62
  case 0:
63
63
  _a.trys.push([0, 3, , 4]);
64
- return [4 /*yield*/, this.getSignedTxDelegate(wallet, validatorAddres, amount, txMisc)];
64
+ return [4 /*yield*/, this.getSignedTxDelegate(wallet, validatorAddres, amount, txMisc, true)];
65
65
  case 1:
66
66
  txRaw = _a.sent();
67
67
  return [4 /*yield*/, FirmaUtil_1.FirmaUtil.estimateGas(txRaw)];
@@ -83,7 +83,7 @@ var FirmaStakingService = /** @class */ (function () {
83
83
  switch (_a.label) {
84
84
  case 0:
85
85
  _a.trys.push([0, 3, , 4]);
86
- return [4 /*yield*/, this.getSignedTxUndelegate(wallet, validatorAddres, amount, txMisc)];
86
+ return [4 /*yield*/, this.getSignedTxUndelegate(wallet, validatorAddres, amount, txMisc, true)];
87
87
  case 1:
88
88
  txRaw = _a.sent();
89
89
  return [4 /*yield*/, FirmaUtil_1.FirmaUtil.estimateGas(txRaw)];
@@ -105,7 +105,7 @@ var FirmaStakingService = /** @class */ (function () {
105
105
  switch (_a.label) {
106
106
  case 0:
107
107
  _a.trys.push([0, 3, , 4]);
108
- return [4 /*yield*/, this.getSignedTxRedelegate(wallet, validatorSrcAddress, validatorDstAddress, amount, txMisc)];
108
+ return [4 /*yield*/, this.getSignedTxRedelegate(wallet, validatorSrcAddress, validatorDstAddress, amount, txMisc, true)];
109
109
  case 1:
110
110
  txRaw = _a.sent();
111
111
  return [4 /*yield*/, FirmaUtil_1.FirmaUtil.estimateGas(txRaw)];
@@ -119,8 +119,9 @@ var FirmaStakingService = /** @class */ (function () {
119
119
  });
120
120
  });
121
121
  };
122
- FirmaStakingService.prototype.getSignedTxDelegate = function (wallet, validatorAddres, amount, txMisc) {
122
+ FirmaStakingService.prototype.getSignedTxDelegate = function (wallet, validatorAddres, amount, txMisc, simulate) {
123
123
  if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
124
+ if (simulate === void 0) { simulate = false; }
124
125
  return __awaiter(this, void 0, void 0, function () {
125
126
  var txClient, address, sendAmount, message, error_4;
126
127
  return __generator(this, function (_a) {
@@ -137,7 +138,7 @@ var FirmaStakingService = /** @class */ (function () {
137
138
  validatorAddress: validatorAddres,
138
139
  amount: sendAmount
139
140
  });
140
- return [4 /*yield*/, txClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc))];
141
+ return [4 /*yield*/, txClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc), simulate)];
141
142
  case 2: return [2 /*return*/, _a.sent()];
142
143
  case 3:
143
144
  error_4 = _a.sent();
@@ -148,8 +149,9 @@ var FirmaStakingService = /** @class */ (function () {
148
149
  });
149
150
  });
150
151
  };
151
- FirmaStakingService.prototype.getSignedTxUndelegate = function (wallet, validatorAddres, amount, txMisc) {
152
+ FirmaStakingService.prototype.getSignedTxUndelegate = function (wallet, validatorAddres, amount, txMisc, simulate) {
152
153
  if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
154
+ if (simulate === void 0) { simulate = false; }
153
155
  return __awaiter(this, void 0, void 0, function () {
154
156
  var txClient, address, sendAmount, message, error_5;
155
157
  return __generator(this, function (_a) {
@@ -166,7 +168,7 @@ var FirmaStakingService = /** @class */ (function () {
166
168
  validatorAddress: validatorAddres,
167
169
  amount: sendAmount
168
170
  });
169
- return [4 /*yield*/, txClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc))];
171
+ return [4 /*yield*/, txClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc), simulate)];
170
172
  case 2: return [2 /*return*/, _a.sent()];
171
173
  case 3:
172
174
  error_5 = _a.sent();
@@ -177,8 +179,9 @@ var FirmaStakingService = /** @class */ (function () {
177
179
  });
178
180
  });
179
181
  };
180
- FirmaStakingService.prototype.getSignedTxRedelegate = function (wallet, validatorSrcAddress, validatorDstAddress, amount, txMisc) {
182
+ FirmaStakingService.prototype.getSignedTxRedelegate = function (wallet, validatorSrcAddress, validatorDstAddress, amount, txMisc, simulate) {
181
183
  if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
184
+ if (simulate === void 0) { simulate = false; }
182
185
  return __awaiter(this, void 0, void 0, function () {
183
186
  var txClient, address, sendAmount, message, error_6;
184
187
  return __generator(this, function (_a) {
@@ -196,7 +199,7 @@ var FirmaStakingService = /** @class */ (function () {
196
199
  validatorDstAddress: validatorDstAddress,
197
200
  amount: sendAmount
198
201
  });
199
- return [4 /*yield*/, txClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc))];
202
+ return [4 /*yield*/, txClient.sign([message], (0, FirmaUtil_1.getSignAndBroadcastOption)(this.config.denom, txMisc), simulate)];
200
203
  case 2: return [2 /*return*/, _a.sent()];
201
204
  case 3:
202
205
  error_6 = _a.sent();