@firmachain/firma-js 0.2.51 → 0.2.53
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.
- package/dist/index.d.ts +19 -0
- package/dist/index.js +19 -0
- package/dist/sdk/FirmaBankService.d.ts +2 -1
- package/dist/sdk/FirmaCosmWasmCw20.d.ts +92 -6
- package/dist/sdk/FirmaCosmWasmCw20.js +683 -39
- package/dist/sdk/FirmaCosmWasmCw721.d.ts +74 -9
- package/dist/sdk/FirmaCosmWasmCw721.js +689 -54
- package/dist/sdk/FirmaCosmWasmCwBridge.d.ts +63 -0
- package/dist/sdk/FirmaCosmWasmCwBridge.js +407 -0
- package/dist/sdk/FirmaCosmWasmService.d.ts +7 -1
- package/dist/sdk/FirmaCosmWasmService.js +136 -69
- package/dist/sdk/FirmaNftService.d.ts +5 -2
- package/dist/sdk/FirmaNftService.js +109 -49
- package/dist/sdk/FirmaSDK.d.ts +3 -1
- package/dist/sdk/FirmaSDK.js +4 -1
- package/dist/sdk/firmachain/common/accounts.js +5 -0
- package/package.json +1 -1
|
@@ -182,25 +182,45 @@ var NftService = /** @class */ (function () {
|
|
|
182
182
|
});
|
|
183
183
|
});
|
|
184
184
|
};
|
|
185
|
-
NftService.prototype.
|
|
186
|
-
if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
|
|
185
|
+
NftService.prototype.getUnsignedTxTransfer = function (wallet, toAddress, nftID) {
|
|
187
186
|
return __awaiter(this, void 0, void 0, function () {
|
|
188
|
-
var address, message,
|
|
187
|
+
var address, message, error_7;
|
|
189
188
|
return __generator(this, function (_a) {
|
|
190
189
|
switch (_a.label) {
|
|
191
190
|
case 0:
|
|
192
|
-
_a.trys.push([0,
|
|
191
|
+
_a.trys.push([0, 2, , 3]);
|
|
193
192
|
return [4 /*yield*/, wallet.getAddress()];
|
|
194
193
|
case 1:
|
|
195
194
|
address = _a.sent();
|
|
196
195
|
message = nft_1.NftTxClient.msgTransfer({ owner: address, toAddress: toAddress, nftId: parseInt(nftID) });
|
|
196
|
+
return [2 /*return*/, message];
|
|
197
|
+
case 2:
|
|
198
|
+
error_7 = _a.sent();
|
|
199
|
+
FirmaUtil_1.FirmaUtil.printLog(error_7);
|
|
200
|
+
throw error_7;
|
|
201
|
+
case 3: return [2 /*return*/];
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
};
|
|
206
|
+
NftService.prototype.getSignedTxTransfer = function (wallet, toAddress, nftID, txMisc) {
|
|
207
|
+
if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
|
|
208
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
209
|
+
var message, nftTxClient, error_8;
|
|
210
|
+
return __generator(this, function (_a) {
|
|
211
|
+
switch (_a.label) {
|
|
212
|
+
case 0:
|
|
213
|
+
_a.trys.push([0, 3, , 4]);
|
|
214
|
+
return [4 /*yield*/, this.getUnsignedTxTransfer(wallet, toAddress, nftID)];
|
|
215
|
+
case 1:
|
|
216
|
+
message = _a.sent();
|
|
197
217
|
nftTxClient = new nft_1.NftTxClient(wallet, this.config.rpcAddress);
|
|
198
218
|
return [4 /*yield*/, nftTxClient.sign([message], FirmaUtil_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
|
|
199
219
|
case 2: return [2 /*return*/, _a.sent()];
|
|
200
220
|
case 3:
|
|
201
|
-
|
|
202
|
-
FirmaUtil_1.FirmaUtil.printLog(
|
|
203
|
-
throw
|
|
221
|
+
error_8 = _a.sent();
|
|
222
|
+
FirmaUtil_1.FirmaUtil.printLog(error_8);
|
|
223
|
+
throw error_8;
|
|
204
224
|
case 4: return [2 /*return*/];
|
|
205
225
|
}
|
|
206
226
|
});
|
|
@@ -209,7 +229,7 @@ var NftService = /** @class */ (function () {
|
|
|
209
229
|
NftService.prototype.transfer = function (wallet, toAddress, nftID, txMisc) {
|
|
210
230
|
if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
|
|
211
231
|
return __awaiter(this, void 0, void 0, function () {
|
|
212
|
-
var txRaw, nftTxClient,
|
|
232
|
+
var txRaw, nftTxClient, error_9;
|
|
213
233
|
return __generator(this, function (_a) {
|
|
214
234
|
switch (_a.label) {
|
|
215
235
|
case 0:
|
|
@@ -221,9 +241,9 @@ var NftService = /** @class */ (function () {
|
|
|
221
241
|
return [4 /*yield*/, nftTxClient.broadcast(txRaw)];
|
|
222
242
|
case 2: return [2 /*return*/, _a.sent()];
|
|
223
243
|
case 3:
|
|
224
|
-
|
|
225
|
-
FirmaUtil_1.FirmaUtil.printLog(
|
|
226
|
-
throw
|
|
244
|
+
error_9 = _a.sent();
|
|
245
|
+
FirmaUtil_1.FirmaUtil.printLog(error_9);
|
|
246
|
+
throw error_9;
|
|
227
247
|
case 4: return [2 /*return*/];
|
|
228
248
|
}
|
|
229
249
|
});
|
|
@@ -232,7 +252,7 @@ var NftService = /** @class */ (function () {
|
|
|
232
252
|
NftService.prototype.getGasEstimationBurn = function (wallet, nftID, txMisc) {
|
|
233
253
|
if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
|
|
234
254
|
return __awaiter(this, void 0, void 0, function () {
|
|
235
|
-
var txRaw,
|
|
255
|
+
var txRaw, error_10;
|
|
236
256
|
return __generator(this, function (_a) {
|
|
237
257
|
switch (_a.label) {
|
|
238
258
|
case 0:
|
|
@@ -243,33 +263,53 @@ var NftService = /** @class */ (function () {
|
|
|
243
263
|
return [4 /*yield*/, FirmaUtil_1.FirmaUtil.estimateGas(txRaw)];
|
|
244
264
|
case 2: return [2 /*return*/, _a.sent()];
|
|
245
265
|
case 3:
|
|
246
|
-
|
|
247
|
-
FirmaUtil_1.FirmaUtil.printLog(
|
|
248
|
-
throw
|
|
266
|
+
error_10 = _a.sent();
|
|
267
|
+
FirmaUtil_1.FirmaUtil.printLog(error_10);
|
|
268
|
+
throw error_10;
|
|
249
269
|
case 4: return [2 /*return*/];
|
|
250
270
|
}
|
|
251
271
|
});
|
|
252
272
|
});
|
|
253
273
|
};
|
|
254
|
-
NftService.prototype.
|
|
255
|
-
if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
|
|
274
|
+
NftService.prototype.getUnsignedTxBurn = function (wallet, nftID) {
|
|
256
275
|
return __awaiter(this, void 0, void 0, function () {
|
|
257
|
-
var address, message,
|
|
276
|
+
var address, message, error_11;
|
|
258
277
|
return __generator(this, function (_a) {
|
|
259
278
|
switch (_a.label) {
|
|
260
279
|
case 0:
|
|
261
|
-
_a.trys.push([0,
|
|
280
|
+
_a.trys.push([0, 2, , 3]);
|
|
262
281
|
return [4 /*yield*/, wallet.getAddress()];
|
|
263
282
|
case 1:
|
|
264
283
|
address = _a.sent();
|
|
265
284
|
message = nft_1.NftTxClient.msgBurn({ owner: address, nftId: parseInt(nftID) });
|
|
285
|
+
return [2 /*return*/, message];
|
|
286
|
+
case 2:
|
|
287
|
+
error_11 = _a.sent();
|
|
288
|
+
FirmaUtil_1.FirmaUtil.printLog(error_11);
|
|
289
|
+
throw error_11;
|
|
290
|
+
case 3: return [2 /*return*/];
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
});
|
|
294
|
+
};
|
|
295
|
+
NftService.prototype.getSignedTxBurn = function (wallet, nftID, txMisc) {
|
|
296
|
+
if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
|
|
297
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
298
|
+
var message, nftTxClient, error_12;
|
|
299
|
+
return __generator(this, function (_a) {
|
|
300
|
+
switch (_a.label) {
|
|
301
|
+
case 0:
|
|
302
|
+
_a.trys.push([0, 3, , 4]);
|
|
303
|
+
return [4 /*yield*/, this.getUnsignedTxBurn(wallet, nftID)];
|
|
304
|
+
case 1:
|
|
305
|
+
message = _a.sent();
|
|
266
306
|
nftTxClient = new nft_1.NftTxClient(wallet, this.config.rpcAddress);
|
|
267
307
|
return [4 /*yield*/, nftTxClient.sign([message], FirmaUtil_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
|
|
268
308
|
case 2: return [2 /*return*/, _a.sent()];
|
|
269
309
|
case 3:
|
|
270
|
-
|
|
271
|
-
FirmaUtil_1.FirmaUtil.printLog(
|
|
272
|
-
throw
|
|
310
|
+
error_12 = _a.sent();
|
|
311
|
+
FirmaUtil_1.FirmaUtil.printLog(error_12);
|
|
312
|
+
throw error_12;
|
|
273
313
|
case 4: return [2 /*return*/];
|
|
274
314
|
}
|
|
275
315
|
});
|
|
@@ -278,7 +318,7 @@ var NftService = /** @class */ (function () {
|
|
|
278
318
|
NftService.prototype.burn = function (wallet, nftID, txMisc) {
|
|
279
319
|
if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
|
|
280
320
|
return __awaiter(this, void 0, void 0, function () {
|
|
281
|
-
var txRaw, nftTxClient,
|
|
321
|
+
var txRaw, nftTxClient, error_13;
|
|
282
322
|
return __generator(this, function (_a) {
|
|
283
323
|
switch (_a.label) {
|
|
284
324
|
case 0:
|
|
@@ -290,9 +330,9 @@ var NftService = /** @class */ (function () {
|
|
|
290
330
|
return [4 /*yield*/, nftTxClient.broadcast(txRaw)];
|
|
291
331
|
case 2: return [2 /*return*/, _a.sent()];
|
|
292
332
|
case 3:
|
|
293
|
-
|
|
294
|
-
FirmaUtil_1.FirmaUtil.printLog(
|
|
295
|
-
throw
|
|
333
|
+
error_13 = _a.sent();
|
|
334
|
+
FirmaUtil_1.FirmaUtil.printLog(error_13);
|
|
335
|
+
throw error_13;
|
|
296
336
|
case 4: return [2 /*return*/];
|
|
297
337
|
}
|
|
298
338
|
});
|
|
@@ -301,7 +341,7 @@ var NftService = /** @class */ (function () {
|
|
|
301
341
|
NftService.prototype.getGasEstimationFromEncodeObject = function (wallet, msgList, txMisc) {
|
|
302
342
|
if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
|
|
303
343
|
return __awaiter(this, void 0, void 0, function () {
|
|
304
|
-
var nftTxClient, txRaw,
|
|
344
|
+
var nftTxClient, txRaw, error_14;
|
|
305
345
|
return __generator(this, function (_a) {
|
|
306
346
|
switch (_a.label) {
|
|
307
347
|
case 0:
|
|
@@ -313,9 +353,9 @@ var NftService = /** @class */ (function () {
|
|
|
313
353
|
return [4 /*yield*/, FirmaUtil_1.FirmaUtil.estimateGas(txRaw)];
|
|
314
354
|
case 2: return [2 /*return*/, _a.sent()];
|
|
315
355
|
case 3:
|
|
316
|
-
|
|
317
|
-
FirmaUtil_1.FirmaUtil.printLog(
|
|
318
|
-
throw
|
|
356
|
+
error_14 = _a.sent();
|
|
357
|
+
FirmaUtil_1.FirmaUtil.printLog(error_14);
|
|
358
|
+
throw error_14;
|
|
319
359
|
case 4: return [2 /*return*/];
|
|
320
360
|
}
|
|
321
361
|
});
|
|
@@ -324,7 +364,7 @@ var NftService = /** @class */ (function () {
|
|
|
324
364
|
NftService.prototype.getGasEstimationMint = function (wallet, tokenURI, txMisc) {
|
|
325
365
|
if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
|
|
326
366
|
return __awaiter(this, void 0, void 0, function () {
|
|
327
|
-
var txRaw,
|
|
367
|
+
var txRaw, error_15;
|
|
328
368
|
return __generator(this, function (_a) {
|
|
329
369
|
switch (_a.label) {
|
|
330
370
|
case 0:
|
|
@@ -335,9 +375,9 @@ var NftService = /** @class */ (function () {
|
|
|
335
375
|
return [4 /*yield*/, FirmaUtil_1.FirmaUtil.estimateGas(txRaw)];
|
|
336
376
|
case 2: return [2 /*return*/, _a.sent()];
|
|
337
377
|
case 3:
|
|
338
|
-
|
|
339
|
-
FirmaUtil_1.FirmaUtil.printLog(
|
|
340
|
-
throw
|
|
378
|
+
error_15 = _a.sent();
|
|
379
|
+
FirmaUtil_1.FirmaUtil.printLog(error_15);
|
|
380
|
+
throw error_15;
|
|
341
381
|
case 4: return [2 /*return*/];
|
|
342
382
|
}
|
|
343
383
|
});
|
|
@@ -346,31 +386,51 @@ var NftService = /** @class */ (function () {
|
|
|
346
386
|
NftService.prototype.getSignedTxMint = function (wallet, tokenURI, txMisc) {
|
|
347
387
|
if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
|
|
348
388
|
return __awaiter(this, void 0, void 0, function () {
|
|
349
|
-
var
|
|
389
|
+
var message, nftTxClient, error_16;
|
|
350
390
|
return __generator(this, function (_a) {
|
|
351
391
|
switch (_a.label) {
|
|
352
392
|
case 0:
|
|
353
393
|
_a.trys.push([0, 3, , 4]);
|
|
354
|
-
return [4 /*yield*/,
|
|
394
|
+
return [4 /*yield*/, this.getUnsignedTxMint(wallet, tokenURI)];
|
|
355
395
|
case 1:
|
|
356
|
-
|
|
357
|
-
message = nft_1.NftTxClient.msgMint({ owner: address, tokenURI: tokenURI });
|
|
396
|
+
message = _a.sent();
|
|
358
397
|
nftTxClient = new nft_1.NftTxClient(wallet, this.config.rpcAddress);
|
|
359
398
|
return [4 /*yield*/, nftTxClient.sign([message], FirmaUtil_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
|
|
360
399
|
case 2: return [2 /*return*/, _a.sent()];
|
|
361
400
|
case 3:
|
|
362
|
-
|
|
363
|
-
FirmaUtil_1.FirmaUtil.printLog(
|
|
364
|
-
throw
|
|
401
|
+
error_16 = _a.sent();
|
|
402
|
+
FirmaUtil_1.FirmaUtil.printLog(error_16);
|
|
403
|
+
throw error_16;
|
|
365
404
|
case 4: return [2 /*return*/];
|
|
366
405
|
}
|
|
367
406
|
});
|
|
368
407
|
});
|
|
369
408
|
};
|
|
409
|
+
NftService.prototype.getUnsignedTxMint = function (wallet, tokenURI) {
|
|
410
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
411
|
+
var address, message, error_17;
|
|
412
|
+
return __generator(this, function (_a) {
|
|
413
|
+
switch (_a.label) {
|
|
414
|
+
case 0:
|
|
415
|
+
_a.trys.push([0, 2, , 3]);
|
|
416
|
+
return [4 /*yield*/, wallet.getAddress()];
|
|
417
|
+
case 1:
|
|
418
|
+
address = _a.sent();
|
|
419
|
+
message = nft_1.NftTxClient.msgMint({ owner: address, tokenURI: tokenURI });
|
|
420
|
+
return [2 /*return*/, message];
|
|
421
|
+
case 2:
|
|
422
|
+
error_17 = _a.sent();
|
|
423
|
+
FirmaUtil_1.FirmaUtil.printLog(error_17);
|
|
424
|
+
throw error_17;
|
|
425
|
+
case 3: return [2 /*return*/];
|
|
426
|
+
}
|
|
427
|
+
});
|
|
428
|
+
});
|
|
429
|
+
};
|
|
370
430
|
NftService.prototype.mint = function (wallet, tokenURI, txMisc) {
|
|
371
431
|
if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
|
|
372
432
|
return __awaiter(this, void 0, void 0, function () {
|
|
373
|
-
var txRaw, nftTxClient,
|
|
433
|
+
var txRaw, nftTxClient, error_18;
|
|
374
434
|
return __generator(this, function (_a) {
|
|
375
435
|
switch (_a.label) {
|
|
376
436
|
case 0:
|
|
@@ -382,9 +442,9 @@ var NftService = /** @class */ (function () {
|
|
|
382
442
|
return [4 /*yield*/, nftTxClient.broadcast(txRaw)];
|
|
383
443
|
case 2: return [2 /*return*/, _a.sent()];
|
|
384
444
|
case 3:
|
|
385
|
-
|
|
386
|
-
FirmaUtil_1.FirmaUtil.printLog(
|
|
387
|
-
throw
|
|
445
|
+
error_18 = _a.sent();
|
|
446
|
+
FirmaUtil_1.FirmaUtil.printLog(error_18);
|
|
447
|
+
throw error_18;
|
|
388
448
|
case 4: return [2 /*return*/];
|
|
389
449
|
}
|
|
390
450
|
});
|
|
@@ -393,7 +453,7 @@ var NftService = /** @class */ (function () {
|
|
|
393
453
|
NftService.prototype.signAndBroadcast = function (wallet, msgList, txMisc) {
|
|
394
454
|
if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
|
|
395
455
|
return __awaiter(this, void 0, void 0, function () {
|
|
396
|
-
var contractTxClient,
|
|
456
|
+
var contractTxClient, error_19;
|
|
397
457
|
return __generator(this, function (_a) {
|
|
398
458
|
switch (_a.label) {
|
|
399
459
|
case 0:
|
|
@@ -402,9 +462,9 @@ var NftService = /** @class */ (function () {
|
|
|
402
462
|
return [4 /*yield*/, contractTxClient.signAndBroadcast(msgList, FirmaUtil_1.getSignAndBroadcastOption(this.config.denom, txMisc))];
|
|
403
463
|
case 1: return [2 /*return*/, _a.sent()];
|
|
404
464
|
case 2:
|
|
405
|
-
|
|
406
|
-
FirmaUtil_1.FirmaUtil.printLog(
|
|
407
|
-
throw
|
|
465
|
+
error_19 = _a.sent();
|
|
466
|
+
FirmaUtil_1.FirmaUtil.printLog(error_19);
|
|
467
|
+
throw error_19;
|
|
408
468
|
case 3: return [2 /*return*/];
|
|
409
469
|
}
|
|
410
470
|
});
|
package/dist/sdk/FirmaSDK.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ import { FirmaCosmWasmService } from "./FirmaCosmWasmService";
|
|
|
17
17
|
import { FirmaIbcService } from "./FirmaIbcService";
|
|
18
18
|
import { FirmaMintService } from "./FirmaMintService";
|
|
19
19
|
import { FirmaCosmWasmCw721Service } from "./FirmaCosmWasmCw721";
|
|
20
|
+
import { FirmaCosmWasmCwBridgeService } from "./FirmaCosmWasmCwBridge";
|
|
20
21
|
export declare class FirmaSDK {
|
|
21
22
|
Config: FirmaConfig;
|
|
22
23
|
Wallet: FirmaWalletService;
|
|
@@ -37,5 +38,6 @@ export declare class FirmaSDK {
|
|
|
37
38
|
Mint: FirmaMintService;
|
|
38
39
|
Cw20: FirmaCosmWasmCw20Service;
|
|
39
40
|
Cw721: FirmaCosmWasmCw721Service;
|
|
40
|
-
|
|
41
|
+
CwBridge: FirmaCosmWasmCwBridgeService;
|
|
42
|
+
constructor(Config: FirmaConfig, Wallet?: FirmaWalletService, Bank?: FirmaBankService, FeeGrant?: FirmaFeeGrantService, Staking?: FirmaStakingService, Distribution?: FirmaDistributionService, Gov?: FirmaGovService, Nft?: NftService, Token?: TokenService, Contract?: ContractService, Ipfs?: IpfsService, BlockChain?: ChainService, Slashing?: SlashingService, Authz?: FirmaAuthzService, CosmWasm?: FirmaCosmWasmService, Ibc?: FirmaIbcService, Mint?: FirmaMintService, Cw20?: FirmaCosmWasmCw20Service, Cw721?: FirmaCosmWasmCw721Service, CwBridge?: FirmaCosmWasmCwBridgeService);
|
|
41
43
|
}
|
package/dist/sdk/FirmaSDK.js
CHANGED
|
@@ -20,8 +20,9 @@ var FirmaCosmWasmService_1 = require("./FirmaCosmWasmService");
|
|
|
20
20
|
var FirmaIbcService_1 = require("./FirmaIbcService");
|
|
21
21
|
var FirmaMintService_1 = require("./FirmaMintService");
|
|
22
22
|
var FirmaCosmWasmCw721_1 = require("./FirmaCosmWasmCw721");
|
|
23
|
+
var FirmaCosmWasmCwBridge_1 = require("./FirmaCosmWasmCwBridge");
|
|
23
24
|
var FirmaSDK = /** @class */ (function () {
|
|
24
|
-
function FirmaSDK(Config, Wallet, Bank, FeeGrant, Staking, Distribution, Gov, Nft, Token, Contract, Ipfs, BlockChain, Slashing, Authz, CosmWasm, Ibc, Mint, Cw20, Cw721) {
|
|
25
|
+
function FirmaSDK(Config, Wallet, Bank, FeeGrant, Staking, Distribution, Gov, Nft, Token, Contract, Ipfs, BlockChain, Slashing, Authz, CosmWasm, Ibc, Mint, Cw20, Cw721, CwBridge) {
|
|
25
26
|
if (Wallet === void 0) { Wallet = new FirmaWalletService_1.FirmaWalletService(Config); }
|
|
26
27
|
if (Bank === void 0) { Bank = new FirmaBankService_1.FirmaBankService(Config); }
|
|
27
28
|
if (FeeGrant === void 0) { FeeGrant = new FirmaFeeGrantService_1.FirmaFeeGrantService(Config); }
|
|
@@ -40,6 +41,7 @@ var FirmaSDK = /** @class */ (function () {
|
|
|
40
41
|
if (Mint === void 0) { Mint = new FirmaMintService_1.FirmaMintService(Config); }
|
|
41
42
|
if (Cw20 === void 0) { Cw20 = new FirmaCosmWasmCw20_1.FirmaCosmWasmCw20Service(Config, CosmWasm); }
|
|
42
43
|
if (Cw721 === void 0) { Cw721 = new FirmaCosmWasmCw721_1.FirmaCosmWasmCw721Service(Config, CosmWasm); }
|
|
44
|
+
if (CwBridge === void 0) { CwBridge = new FirmaCosmWasmCwBridge_1.FirmaCosmWasmCwBridgeService(Config, CosmWasm, Cw721); }
|
|
43
45
|
this.Config = Config;
|
|
44
46
|
this.Wallet = Wallet;
|
|
45
47
|
this.Bank = Bank;
|
|
@@ -59,6 +61,7 @@ var FirmaSDK = /** @class */ (function () {
|
|
|
59
61
|
this.Mint = Mint;
|
|
60
62
|
this.Cw20 = Cw20;
|
|
61
63
|
this.Cw721 = Cw721;
|
|
64
|
+
this.CwBridge = CwBridge;
|
|
62
65
|
FirmaUtil_1.FirmaUtil.config = Config;
|
|
63
66
|
}
|
|
64
67
|
return FirmaSDK;
|
|
@@ -57,6 +57,11 @@ function accountFromAny(input) {
|
|
|
57
57
|
var baseAccount = (_g = (_f = vesting_1.PeriodicVestingAccount.decode(value)) === null || _f === void 0 ? void 0 : _f.baseVestingAccount) === null || _g === void 0 ? void 0 : _g.baseAccount;
|
|
58
58
|
return accountFromBaseAccount(baseAccount);
|
|
59
59
|
}
|
|
60
|
+
case "/ethermint.types.v1.EthAccount":
|
|
61
|
+
{
|
|
62
|
+
var baseAccount = auth_1.ModuleAccount.decode(value).baseAccount;
|
|
63
|
+
return accountFromBaseAccount(baseAccount);
|
|
64
|
+
}
|
|
60
65
|
default:
|
|
61
66
|
throw new Error("Unsupported type: '" + typeUrl + "'");
|
|
62
67
|
}
|