@firmachain/firma-js 0.2.52 → 0.2.54

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.
@@ -1,9 +1,12 @@
1
1
  import { CosmWasmTxClient, TxMisc, CodeInfo, CodeData, ContractInfo, ContractHistoryInfo, ContractStateInfo } from "./firmachain/cosmwasm";
2
+ import { TxRaw } from "cosmjs-types/cosmos/tx/v1beta1/tx";
2
3
  import { FirmaWalletService } from "./FirmaWalletService";
3
4
  import { FirmaConfig } from "./FirmaConfig";
4
5
  import { BroadcastTxResponse } from "./firmachain/common/stargateclient";
5
6
  import { Coin } from "cosmjs-types/cosmos/base/v1beta1/coin";
6
7
  import { AccessConfig } from "cosmjs-types/cosmwasm/wasm/v1/types";
8
+ import { EncodeObject } from "@cosmjs/proto-signing";
9
+ export { AccessConfig, AccessType } from "cosmjs-types/cosmwasm/wasm/v1/types";
7
10
  export declare class FirmaCosmWasmService {
8
11
  private readonly config;
9
12
  constructor(config: FirmaConfig);
@@ -18,13 +21,16 @@ export declare class FirmaCosmWasmService {
18
21
  migrateContract(wallet: FirmaWalletService, contractAddress: string, codeId: string, msg: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
19
22
  getGasEstimationExecuteContract(wallet: FirmaWalletService, contractAddress: string, msg: string, funds?: Coin[], txMisc?: TxMisc): Promise<number>;
20
23
  executeContract(wallet: FirmaWalletService, contractAddress: string, msg: string, funds?: Coin[], txMisc?: TxMisc): Promise<BroadcastTxResponse>;
24
+ signAndBroadcast(wallet: FirmaWalletService, msgList: EncodeObject[], txMisc?: TxMisc): Promise<BroadcastTxResponse>;
25
+ getGasEstimationSignAndBroadcast(wallet: FirmaWalletService, msgList: EncodeObject[], txMisc?: TxMisc): Promise<number>;
21
26
  getGasEstimationInstantiateContract(wallet: FirmaWalletService, admin: string, codeId: string, label: string, msg: string, funds: Coin[], txMisc?: TxMisc): Promise<number>;
22
27
  instantiateContract(wallet: FirmaWalletService, admin: string, codeId: string, label: string, msg: string, funds: Coin[], txMisc?: TxMisc): Promise<BroadcastTxResponse>;
23
28
  private getSignedTxInstantiateContract;
24
29
  private getSignedTxUpdateAdmin;
25
30
  private getSignedTxClearAdmin;
26
31
  private getSignedTxMigrateContract;
27
- private getSignedTxExecuteContract;
32
+ getUnsignedTxExecuteContract(wallet: FirmaWalletService, contractAddress: string, msg: string, funds: Coin[]): Promise<EncodeObject>;
33
+ getSignedTxExecuteContract(wallet: FirmaWalletService, contractAddress: string, msg: string, funds: Coin[], txMisc?: TxMisc): Promise<TxRaw>;
28
34
  private getSignedTxStoreCode;
29
35
  getCodeList(): Promise<CodeInfo[]>;
30
36
  getCodeData(codeId: string): Promise<CodeData>;
@@ -39,12 +39,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
39
39
  return (mod && mod.__esModule) ? mod : { "default": mod };
40
40
  };
41
41
  Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.FirmaCosmWasmService = void 0;
42
+ exports.FirmaCosmWasmService = exports.AccessType = exports.AccessConfig = void 0;
43
43
  var cosmwasm_1 = require("./firmachain/cosmwasm");
44
44
  var encoding_1 = require("@cosmjs/encoding");
45
45
  var FirmaUtil_1 = require("./FirmaUtil");
46
46
  var pako_1 = __importDefault(require("pako"));
47
47
  var long_1 = __importDefault(require("long"));
48
+ var types_1 = require("cosmjs-types/cosmwasm/wasm/v1/types");
49
+ Object.defineProperty(exports, "AccessConfig", { enumerable: true, get: function () { return types_1.AccessConfig; } });
50
+ Object.defineProperty(exports, "AccessType", { enumerable: true, get: function () { return types_1.AccessType; } });
48
51
  var FirmaCosmWasmService = /** @class */ (function () {
49
52
  function FirmaCosmWasmService(config) {
50
53
  this.config = config;
@@ -279,10 +282,53 @@ var FirmaCosmWasmService = /** @class */ (function () {
279
282
  });
280
283
  });
281
284
  };
285
+ FirmaCosmWasmService.prototype.signAndBroadcast = function (wallet, msgList, txMisc) {
286
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
287
+ return __awaiter(this, void 0, void 0, function () {
288
+ var txClient, error_11;
289
+ return __generator(this, function (_a) {
290
+ switch (_a.label) {
291
+ case 0:
292
+ _a.trys.push([0, 2, , 3]);
293
+ txClient = new cosmwasm_1.CosmWasmTxClient(wallet, this.config.rpcAddress);
294
+ return [4 /*yield*/, txClient.signAndBroadcast(msgList, FirmaUtil_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
295
+ case 1: return [2 /*return*/, _a.sent()];
296
+ case 2:
297
+ error_11 = _a.sent();
298
+ FirmaUtil_1.FirmaUtil.printLog(error_11);
299
+ throw error_11;
300
+ case 3: return [2 /*return*/];
301
+ }
302
+ });
303
+ });
304
+ };
305
+ FirmaCosmWasmService.prototype.getGasEstimationSignAndBroadcast = function (wallet, msgList, txMisc) {
306
+ if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
307
+ return __awaiter(this, void 0, void 0, function () {
308
+ var txClient, txRaw, error_12;
309
+ return __generator(this, function (_a) {
310
+ switch (_a.label) {
311
+ case 0:
312
+ _a.trys.push([0, 3, , 4]);
313
+ txClient = new cosmwasm_1.CosmWasmTxClient(wallet, this.config.rpcAddress);
314
+ return [4 /*yield*/, txClient.sign(msgList, FirmaUtil_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
315
+ case 1:
316
+ txRaw = _a.sent();
317
+ return [4 /*yield*/, FirmaUtil_1.FirmaUtil.estimateGas(txRaw)];
318
+ case 2: return [2 /*return*/, _a.sent()];
319
+ case 3:
320
+ error_12 = _a.sent();
321
+ FirmaUtil_1.FirmaUtil.printLog(error_12);
322
+ throw error_12;
323
+ case 4: return [2 /*return*/];
324
+ }
325
+ });
326
+ });
327
+ };
282
328
  FirmaCosmWasmService.prototype.getGasEstimationInstantiateContract = function (wallet, admin, codeId, label, msg, funds, txMisc) {
283
329
  if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
284
330
  return __awaiter(this, void 0, void 0, function () {
285
- var txRaw, error_11;
331
+ var txRaw, error_13;
286
332
  return __generator(this, function (_a) {
287
333
  switch (_a.label) {
288
334
  case 0:
@@ -293,9 +339,9 @@ var FirmaCosmWasmService = /** @class */ (function () {
293
339
  return [4 /*yield*/, FirmaUtil_1.FirmaUtil.estimateGas(txRaw)];
294
340
  case 2: return [2 /*return*/, _a.sent()];
295
341
  case 3:
296
- error_11 = _a.sent();
297
- FirmaUtil_1.FirmaUtil.printLog(error_11);
298
- throw error_11;
342
+ error_13 = _a.sent();
343
+ FirmaUtil_1.FirmaUtil.printLog(error_13);
344
+ throw error_13;
299
345
  case 4: return [2 /*return*/];
300
346
  }
301
347
  });
@@ -304,7 +350,7 @@ var FirmaCosmWasmService = /** @class */ (function () {
304
350
  FirmaCosmWasmService.prototype.instantiateContract = function (wallet, admin, codeId, label, msg, funds, txMisc) {
305
351
  if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
306
352
  return __awaiter(this, void 0, void 0, function () {
307
- var txRaw, bankTxClient, error_12;
353
+ var txRaw, bankTxClient, error_14;
308
354
  return __generator(this, function (_a) {
309
355
  switch (_a.label) {
310
356
  case 0:
@@ -316,9 +362,9 @@ var FirmaCosmWasmService = /** @class */ (function () {
316
362
  return [4 /*yield*/, bankTxClient.broadcast(txRaw)];
317
363
  case 2: return [2 /*return*/, _a.sent()];
318
364
  case 3:
319
- error_12 = _a.sent();
320
- FirmaUtil_1.FirmaUtil.printLog(error_12);
321
- throw error_12;
365
+ error_14 = _a.sent();
366
+ FirmaUtil_1.FirmaUtil.printLog(error_14);
367
+ throw error_14;
322
368
  case 4: return [2 /*return*/];
323
369
  }
324
370
  });
@@ -327,7 +373,7 @@ var FirmaCosmWasmService = /** @class */ (function () {
327
373
  FirmaCosmWasmService.prototype.getSignedTxInstantiateContract = function (wallet, admin, codeId, label, msg, funds, txMisc) {
328
374
  if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
329
375
  return __awaiter(this, void 0, void 0, function () {
330
- var address, utfMsg, message, txClient, error_13;
376
+ var address, utfMsg, message, txClient, error_15;
331
377
  return __generator(this, function (_a) {
332
378
  switch (_a.label) {
333
379
  case 0:
@@ -341,9 +387,9 @@ var FirmaCosmWasmService = /** @class */ (function () {
341
387
  return [4 /*yield*/, txClient.sign([message], FirmaUtil_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
342
388
  case 2: return [2 /*return*/, _a.sent()];
343
389
  case 3:
344
- error_13 = _a.sent();
345
- FirmaUtil_1.FirmaUtil.printLog(error_13);
346
- throw error_13;
390
+ error_15 = _a.sent();
391
+ FirmaUtil_1.FirmaUtil.printLog(error_15);
392
+ throw error_15;
347
393
  case 4: return [2 /*return*/];
348
394
  }
349
395
  });
@@ -352,7 +398,7 @@ var FirmaCosmWasmService = /** @class */ (function () {
352
398
  FirmaCosmWasmService.prototype.getSignedTxUpdateAdmin = function (wallet, contractAddress, adminAddress, txMisc) {
353
399
  if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
354
400
  return __awaiter(this, void 0, void 0, function () {
355
- var address, message, txClient, error_14;
401
+ var address, message, txClient, error_16;
356
402
  return __generator(this, function (_a) {
357
403
  switch (_a.label) {
358
404
  case 0:
@@ -365,9 +411,9 @@ var FirmaCosmWasmService = /** @class */ (function () {
365
411
  return [4 /*yield*/, txClient.sign([message], FirmaUtil_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
366
412
  case 2: return [2 /*return*/, _a.sent()];
367
413
  case 3:
368
- error_14 = _a.sent();
369
- FirmaUtil_1.FirmaUtil.printLog(error_14);
370
- throw error_14;
414
+ error_16 = _a.sent();
415
+ FirmaUtil_1.FirmaUtil.printLog(error_16);
416
+ throw error_16;
371
417
  case 4: return [2 /*return*/];
372
418
  }
373
419
  });
@@ -376,7 +422,7 @@ var FirmaCosmWasmService = /** @class */ (function () {
376
422
  FirmaCosmWasmService.prototype.getSignedTxClearAdmin = function (wallet, contractAddress, txMisc) {
377
423
  if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
378
424
  return __awaiter(this, void 0, void 0, function () {
379
- var address, message, txClient, error_15;
425
+ var address, message, txClient, error_17;
380
426
  return __generator(this, function (_a) {
381
427
  switch (_a.label) {
382
428
  case 0:
@@ -389,9 +435,9 @@ var FirmaCosmWasmService = /** @class */ (function () {
389
435
  return [4 /*yield*/, txClient.sign([message], FirmaUtil_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
390
436
  case 2: return [2 /*return*/, _a.sent()];
391
437
  case 3:
392
- error_15 = _a.sent();
393
- FirmaUtil_1.FirmaUtil.printLog(error_15);
394
- throw error_15;
438
+ error_17 = _a.sent();
439
+ FirmaUtil_1.FirmaUtil.printLog(error_17);
440
+ throw error_17;
395
441
  case 4: return [2 /*return*/];
396
442
  }
397
443
  });
@@ -400,7 +446,7 @@ var FirmaCosmWasmService = /** @class */ (function () {
400
446
  FirmaCosmWasmService.prototype.getSignedTxMigrateContract = function (wallet, contractAddress, codeId, msg, txMisc) {
401
447
  if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
402
448
  return __awaiter(this, void 0, void 0, function () {
403
- var address, utfMsg, message, txClient, error_16;
449
+ var address, utfMsg, message, txClient, error_18;
404
450
  return __generator(this, function (_a) {
405
451
  switch (_a.label) {
406
452
  case 0:
@@ -414,18 +460,39 @@ var FirmaCosmWasmService = /** @class */ (function () {
414
460
  return [4 /*yield*/, txClient.sign([message], FirmaUtil_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
415
461
  case 2: return [2 /*return*/, _a.sent()];
416
462
  case 3:
417
- error_16 = _a.sent();
418
- FirmaUtil_1.FirmaUtil.printLog(error_16);
419
- throw error_16;
463
+ error_18 = _a.sent();
464
+ FirmaUtil_1.FirmaUtil.printLog(error_18);
465
+ throw error_18;
420
466
  case 4: return [2 /*return*/];
421
467
  }
422
468
  });
423
469
  });
424
470
  };
471
+ FirmaCosmWasmService.prototype.getUnsignedTxExecuteContract = function (wallet, contractAddress, msg, funds) {
472
+ return __awaiter(this, void 0, void 0, function () {
473
+ var address, utfMsg, error_19;
474
+ return __generator(this, function (_a) {
475
+ switch (_a.label) {
476
+ case 0:
477
+ _a.trys.push([0, 2, , 3]);
478
+ return [4 /*yield*/, wallet.getAddress()];
479
+ case 1:
480
+ address = _a.sent();
481
+ utfMsg = encoding_1.toUtf8(msg);
482
+ return [2 /*return*/, cosmwasm_1.CosmWasmTxClient.msgExecuteContract({ sender: address, contract: contractAddress, msg: utfMsg, funds: funds })];
483
+ case 2:
484
+ error_19 = _a.sent();
485
+ FirmaUtil_1.FirmaUtil.printLog(error_19);
486
+ throw error_19;
487
+ case 3: return [2 /*return*/];
488
+ }
489
+ });
490
+ });
491
+ };
425
492
  FirmaCosmWasmService.prototype.getSignedTxExecuteContract = function (wallet, contractAddress, msg, funds, txMisc) {
426
493
  if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
427
494
  return __awaiter(this, void 0, void 0, function () {
428
- var address, utfMsg, message, txClient, error_17;
495
+ var address, utfMsg, message, txClient, error_20;
429
496
  return __generator(this, function (_a) {
430
497
  switch (_a.label) {
431
498
  case 0:
@@ -439,9 +506,9 @@ var FirmaCosmWasmService = /** @class */ (function () {
439
506
  return [4 /*yield*/, txClient.sign([message], FirmaUtil_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
440
507
  case 2: return [2 /*return*/, _a.sent()];
441
508
  case 3:
442
- error_17 = _a.sent();
443
- FirmaUtil_1.FirmaUtil.printLog(error_17);
444
- throw error_17;
509
+ error_20 = _a.sent();
510
+ FirmaUtil_1.FirmaUtil.printLog(error_20);
511
+ throw error_20;
445
512
  case 4: return [2 /*return*/];
446
513
  }
447
514
  });
@@ -450,7 +517,7 @@ var FirmaCosmWasmService = /** @class */ (function () {
450
517
  FirmaCosmWasmService.prototype.getSignedTxStoreCode = function (wallet, wasmCode, accessConfig, txMisc) {
451
518
  if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
452
519
  return __awaiter(this, void 0, void 0, function () {
453
- var address, compressed, message, txClient, error_18;
520
+ var address, compressed, message, txClient, error_21;
454
521
  return __generator(this, function (_a) {
455
522
  switch (_a.label) {
456
523
  case 0:
@@ -464,9 +531,9 @@ var FirmaCosmWasmService = /** @class */ (function () {
464
531
  return [4 /*yield*/, txClient.sign([message], FirmaUtil_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
465
532
  case 2: return [2 /*return*/, _a.sent()];
466
533
  case 3:
467
- error_18 = _a.sent();
468
- FirmaUtil_1.FirmaUtil.printLog(error_18);
469
- throw error_18;
534
+ error_21 = _a.sent();
535
+ FirmaUtil_1.FirmaUtil.printLog(error_21);
536
+ throw error_21;
470
537
  case 4: return [2 /*return*/];
471
538
  }
472
539
  });
@@ -475,7 +542,7 @@ var FirmaCosmWasmService = /** @class */ (function () {
475
542
  // query
476
543
  FirmaCosmWasmService.prototype.getCodeList = function () {
477
544
  return __awaiter(this, void 0, void 0, function () {
478
- var queryClient, result, error_19;
545
+ var queryClient, result, error_22;
479
546
  return __generator(this, function (_a) {
480
547
  switch (_a.label) {
481
548
  case 0:
@@ -486,9 +553,9 @@ var FirmaCosmWasmService = /** @class */ (function () {
486
553
  result = _a.sent();
487
554
  return [2 /*return*/, result];
488
555
  case 2:
489
- error_19 = _a.sent();
490
- FirmaUtil_1.FirmaUtil.printLog(error_19);
491
- throw error_19;
556
+ error_22 = _a.sent();
557
+ FirmaUtil_1.FirmaUtil.printLog(error_22);
558
+ throw error_22;
492
559
  case 3: return [2 /*return*/];
493
560
  }
494
561
  });
@@ -496,7 +563,7 @@ var FirmaCosmWasmService = /** @class */ (function () {
496
563
  };
497
564
  FirmaCosmWasmService.prototype.getCodeData = function (codeId) {
498
565
  return __awaiter(this, void 0, void 0, function () {
499
- var queryClient, result, error_20;
566
+ var queryClient, result, error_23;
500
567
  return __generator(this, function (_a) {
501
568
  switch (_a.label) {
502
569
  case 0:
@@ -507,9 +574,9 @@ var FirmaCosmWasmService = /** @class */ (function () {
507
574
  result = _a.sent();
508
575
  return [2 /*return*/, result];
509
576
  case 2:
510
- error_20 = _a.sent();
511
- FirmaUtil_1.FirmaUtil.printLog(error_20);
512
- throw error_20;
577
+ error_23 = _a.sent();
578
+ FirmaUtil_1.FirmaUtil.printLog(error_23);
579
+ throw error_23;
513
580
  case 3: return [2 /*return*/];
514
581
  }
515
582
  });
@@ -517,7 +584,7 @@ var FirmaCosmWasmService = /** @class */ (function () {
517
584
  };
518
585
  FirmaCosmWasmService.prototype.getContractListFromCodeId = function (codeId) {
519
586
  return __awaiter(this, void 0, void 0, function () {
520
- var queryClient, result, error_21;
587
+ var queryClient, result, error_24;
521
588
  return __generator(this, function (_a) {
522
589
  switch (_a.label) {
523
590
  case 0:
@@ -528,9 +595,9 @@ var FirmaCosmWasmService = /** @class */ (function () {
528
595
  result = _a.sent();
529
596
  return [2 /*return*/, result];
530
597
  case 2:
531
- error_21 = _a.sent();
532
- FirmaUtil_1.FirmaUtil.printLog(error_21);
533
- throw error_21;
598
+ error_24 = _a.sent();
599
+ FirmaUtil_1.FirmaUtil.printLog(error_24);
600
+ throw error_24;
534
601
  case 3: return [2 /*return*/];
535
602
  }
536
603
  });
@@ -538,7 +605,7 @@ var FirmaCosmWasmService = /** @class */ (function () {
538
605
  };
539
606
  FirmaCosmWasmService.prototype.getContractInfo = function (codeId) {
540
607
  return __awaiter(this, void 0, void 0, function () {
541
- var queryClient, result, error_22;
608
+ var queryClient, result, error_25;
542
609
  return __generator(this, function (_a) {
543
610
  switch (_a.label) {
544
611
  case 0:
@@ -549,9 +616,9 @@ var FirmaCosmWasmService = /** @class */ (function () {
549
616
  result = _a.sent();
550
617
  return [2 /*return*/, result];
551
618
  case 2:
552
- error_22 = _a.sent();
553
- FirmaUtil_1.FirmaUtil.printLog(error_22);
554
- throw error_22;
619
+ error_25 = _a.sent();
620
+ FirmaUtil_1.FirmaUtil.printLog(error_25);
621
+ throw error_25;
555
622
  case 3: return [2 /*return*/];
556
623
  }
557
624
  });
@@ -559,7 +626,7 @@ var FirmaCosmWasmService = /** @class */ (function () {
559
626
  };
560
627
  FirmaCosmWasmService.prototype.getContractHistory = function (codeId) {
561
628
  return __awaiter(this, void 0, void 0, function () {
562
- var queryClient, result, error_23;
629
+ var queryClient, result, error_26;
563
630
  return __generator(this, function (_a) {
564
631
  switch (_a.label) {
565
632
  case 0:
@@ -570,9 +637,9 @@ var FirmaCosmWasmService = /** @class */ (function () {
570
637
  result = _a.sent();
571
638
  return [2 /*return*/, result];
572
639
  case 2:
573
- error_23 = _a.sent();
574
- FirmaUtil_1.FirmaUtil.printLog(error_23);
575
- throw error_23;
640
+ error_26 = _a.sent();
641
+ FirmaUtil_1.FirmaUtil.printLog(error_26);
642
+ throw error_26;
576
643
  case 3: return [2 /*return*/];
577
644
  }
578
645
  });
@@ -580,7 +647,7 @@ var FirmaCosmWasmService = /** @class */ (function () {
580
647
  };
581
648
  FirmaCosmWasmService.prototype.getContractRawQueryData = function (contractAddress, hexString) {
582
649
  return __awaiter(this, void 0, void 0, function () {
583
- var queryClient, result, error_24;
650
+ var queryClient, result, error_27;
584
651
  return __generator(this, function (_a) {
585
652
  switch (_a.label) {
586
653
  case 0:
@@ -591,9 +658,9 @@ var FirmaCosmWasmService = /** @class */ (function () {
591
658
  result = _a.sent();
592
659
  return [2 /*return*/, result];
593
660
  case 2:
594
- error_24 = _a.sent();
595
- FirmaUtil_1.FirmaUtil.printLog(error_24);
596
- throw error_24;
661
+ error_27 = _a.sent();
662
+ FirmaUtil_1.FirmaUtil.printLog(error_27);
663
+ throw error_27;
597
664
  case 3: return [2 /*return*/];
598
665
  }
599
666
  });
@@ -601,7 +668,7 @@ var FirmaCosmWasmService = /** @class */ (function () {
601
668
  };
602
669
  FirmaCosmWasmService.prototype.getContractSmartQueryData = function (contractAddress, query) {
603
670
  return __awaiter(this, void 0, void 0, function () {
604
- var queryClient, result, error_25;
671
+ var queryClient, result, error_28;
605
672
  return __generator(this, function (_a) {
606
673
  switch (_a.label) {
607
674
  case 0:
@@ -612,9 +679,9 @@ var FirmaCosmWasmService = /** @class */ (function () {
612
679
  result = _a.sent();
613
680
  return [2 /*return*/, result];
614
681
  case 2:
615
- error_25 = _a.sent();
616
- FirmaUtil_1.FirmaUtil.printLog(error_25);
617
- throw error_25;
682
+ error_28 = _a.sent();
683
+ FirmaUtil_1.FirmaUtil.printLog(error_28);
684
+ throw error_28;
618
685
  case 3: return [2 /*return*/];
619
686
  }
620
687
  });
@@ -622,7 +689,7 @@ var FirmaCosmWasmService = /** @class */ (function () {
622
689
  };
623
690
  FirmaCosmWasmService.prototype.getContractState = function (codeId) {
624
691
  return __awaiter(this, void 0, void 0, function () {
625
- var queryClient, result, error_26;
692
+ var queryClient, result, error_29;
626
693
  return __generator(this, function (_a) {
627
694
  switch (_a.label) {
628
695
  case 0:
@@ -633,9 +700,9 @@ var FirmaCosmWasmService = /** @class */ (function () {
633
700
  result = _a.sent();
634
701
  return [2 /*return*/, result];
635
702
  case 2:
636
- error_26 = _a.sent();
637
- FirmaUtil_1.FirmaUtil.printLog(error_26);
638
- throw error_26;
703
+ error_29 = _a.sent();
704
+ FirmaUtil_1.FirmaUtil.printLog(error_29);
705
+ throw error_29;
639
706
  case 3: return [2 /*return*/];
640
707
  }
641
708
  });
@@ -643,7 +710,7 @@ var FirmaCosmWasmService = /** @class */ (function () {
643
710
  };
644
711
  FirmaCosmWasmService.prototype.getPinnedCodeList = function () {
645
712
  return __awaiter(this, void 0, void 0, function () {
646
- var queryClient, result, error_27;
713
+ var queryClient, result, error_30;
647
714
  return __generator(this, function (_a) {
648
715
  switch (_a.label) {
649
716
  case 0:
@@ -654,9 +721,9 @@ var FirmaCosmWasmService = /** @class */ (function () {
654
721
  result = _a.sent();
655
722
  return [2 /*return*/, result];
656
723
  case 2:
657
- error_27 = _a.sent();
658
- FirmaUtil_1.FirmaUtil.printLog(error_27);
659
- throw error_27;
724
+ error_30 = _a.sent();
725
+ FirmaUtil_1.FirmaUtil.printLog(error_30);
726
+ throw error_30;
660
727
  case 3: return [2 /*return*/];
661
728
  }
662
729
  });
@@ -22,14 +22,17 @@ export declare class NftService {
22
22
  }>;
23
23
  getBalanceOf(ownerAddress: string): Promise<number>;
24
24
  getGasEstimationTransfer(wallet: FirmaWalletService, toAddress: string, nftID: string, txMisc?: TxMisc): Promise<number>;
25
- private getSignedTxTransfer;
25
+ getUnsignedTxTransfer(wallet: FirmaWalletService, toAddress: string, nftID: string): Promise<EncodeObject>;
26
+ getSignedTxTransfer(wallet: FirmaWalletService, toAddress: string, nftID: string, txMisc?: TxMisc): Promise<TxRaw>;
26
27
  transfer(wallet: FirmaWalletService, toAddress: string, nftID: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
27
28
  getGasEstimationBurn(wallet: FirmaWalletService, nftID: string, txMisc?: TxMisc): Promise<number>;
29
+ getUnsignedTxBurn(wallet: FirmaWalletService, nftID: string): Promise<EncodeObject>;
28
30
  getSignedTxBurn(wallet: FirmaWalletService, nftID: string, txMisc?: TxMisc): Promise<TxRaw>;
29
31
  burn(wallet: FirmaWalletService, nftID: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
30
32
  getGasEstimationFromEncodeObject(wallet: FirmaWalletService, msgList: EncodeObject[], txMisc?: TxMisc): Promise<number>;
31
33
  getGasEstimationMint(wallet: FirmaWalletService, tokenURI: string, txMisc?: TxMisc): Promise<number>;
32
- private getSignedTxMint;
34
+ getSignedTxMint(wallet: FirmaWalletService, tokenURI: string, txMisc?: TxMisc): Promise<TxRaw>;
35
+ getUnsignedTxMint(wallet: FirmaWalletService, tokenURI: string): Promise<EncodeObject>;
33
36
  mint(wallet: FirmaWalletService, tokenURI: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
34
37
  signAndBroadcast(wallet: FirmaWalletService, msgList: EncodeObject[], txMisc?: TxMisc): Promise<BroadcastTxResponse>;
35
38
  }