@firmachain/firma-js 0.2.55 → 0.2.57

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.
@@ -11,7 +11,9 @@ export interface Cw20Minter {
11
11
  export interface Cw20MarketingInfo {
12
12
  project: string;
13
13
  description: string;
14
- logo: string;
14
+ logo: {
15
+ url: string;
16
+ };
15
17
  marketing: string;
16
18
  }
17
19
  export interface Cw20TokenInfo {
@@ -24,7 +26,7 @@ export interface ExpiresAtHeight {
24
26
  at_height: number;
25
27
  }
26
28
  export interface ExpiresAtTime {
27
- at_time: number;
29
+ at_time: string;
28
30
  }
29
31
  export interface ExpiresNever {
30
32
  never: {};
@@ -102,7 +104,7 @@ export declare class FirmaCosmWasmCw20Service {
102
104
  getMinter(contractAddress: string): Promise<Cw20Minter>;
103
105
  getAllowance(contractAddress: string, owner: string, spender: string): Promise<Cw20Allowance>;
104
106
  getAllAllowances(contractAddress: string, owner: string, limit?: number, start_after?: string): Promise<Cw20SpenderAllowance[]>;
105
- getAllSpenderAllowances(contractAddress: string, spender: string, limit?: number, start_after?: string): Promise<Cw20SpenderAllowance>;
107
+ getAllSpenderAllowances(contractAddress: string, spender: string, limit?: number, start_after?: string): Promise<Cw20SpenderAllowance[]>;
106
108
  getAllAccounts(contractAddress: string, limit?: number, start_after?: string): Promise<string[]>;
107
109
  getMarketingInfo(contractAddress: string): Promise<Cw20MarketingInfo>;
108
110
  getDownloadLogo(contractAddress: string): Promise<string>;
@@ -8,7 +8,7 @@ export interface Cw721ExpiresAtHeight {
8
8
  at_height: number;
9
9
  }
10
10
  export interface Cw721ExpiresAtTime {
11
- at_time: number;
11
+ at_time: string;
12
12
  }
13
13
  export interface Cw721ExpiresNever {
14
14
  never: {};
@@ -69,9 +69,9 @@ export declare class FirmaCosmWasmCwBridgeService {
69
69
  getOwner(contractAddress: string): Promise<string>;
70
70
  getAuthorizedUsers(contractAddress: string): Promise<string[]>;
71
71
  getNftInfo(contractAddress: string, tokenId: string): Promise<NftInfo>;
72
- getOwnerNfts(contractAddress: string, ownerAddress: string): Promise<string[]>;
73
- getOwnerNftsInfo(contractAddress: string, ownerAddress: string): Promise<NftInfo[]>;
74
- getOwnerWithdrawableNfts(contractAddress: string, ownerAddress: string): Promise<NftInfo[]>;
75
- getOwnerUnlockableNfts(contractAddress: string, ownerAddress: string): Promise<NftInfo[]>;
72
+ getOwnerNfts(contractAddress: string, ownerAddress: string, limit?: number, start_after?: string): Promise<string[]>;
73
+ getOwnerNftsInfo(contractAddress: string, ownerAddress: string, limit?: number, start_after?: string): Promise<NftInfo[]>;
74
+ getOwnerWithdrawableNfts(contractAddress: string, ownerAddress: string, limit?: number, start_after?: string): Promise<NftInfo[]>;
75
+ getOwnerUnlockableNfts(contractAddress: string, ownerAddress: string, limit?: number, start_after?: string): Promise<NftInfo[]>;
76
76
  getGlobalTxCounts(contractAddress: string): Promise<BridgeGlobalTxCounts>;
77
77
  }
@@ -502,13 +502,15 @@ var FirmaCosmWasmCwBridgeService = /** @class */ (function () {
502
502
  });
503
503
  });
504
504
  };
505
- FirmaCosmWasmCwBridgeService.prototype.getOwnerNfts = function (contractAddress, ownerAddress) {
505
+ FirmaCosmWasmCwBridgeService.prototype.getOwnerNfts = function (contractAddress, ownerAddress, limit, start_after) {
506
+ if (limit === void 0) { limit = 10; }
507
+ if (start_after === void 0) { start_after = ""; }
506
508
  return __awaiter(this, void 0, void 0, function () {
507
509
  var query, result;
508
510
  return __generator(this, function (_a) {
509
511
  switch (_a.label) {
510
512
  case 0:
511
- query = "{\"owner_nfts\": { \"owner_addr\": \"" + ownerAddress + "\" }}";
513
+ query = "{\"owner_nfts\": { \"owner_addr\": \"" + ownerAddress + "\", \"limit\": " + limit + ", \"start_after\": \"" + start_after + "\" }}";
512
514
  return [4 /*yield*/, this.cosmwasmService.getContractSmartQueryData(contractAddress, query)];
513
515
  case 1:
514
516
  result = _a.sent();
@@ -517,13 +519,15 @@ var FirmaCosmWasmCwBridgeService = /** @class */ (function () {
517
519
  });
518
520
  });
519
521
  };
520
- FirmaCosmWasmCwBridgeService.prototype.getOwnerNftsInfo = function (contractAddress, ownerAddress) {
522
+ FirmaCosmWasmCwBridgeService.prototype.getOwnerNftsInfo = function (contractAddress, ownerAddress, limit, start_after) {
523
+ if (limit === void 0) { limit = 10; }
524
+ if (start_after === void 0) { start_after = ""; }
521
525
  return __awaiter(this, void 0, void 0, function () {
522
526
  var query, result;
523
527
  return __generator(this, function (_a) {
524
528
  switch (_a.label) {
525
529
  case 0:
526
- query = "{\"owner_nfts_info\": { \"owner_addr\": \"" + ownerAddress + "\" }}";
530
+ query = "{\"owner_nfts_info\": { \"owner_addr\": \"" + ownerAddress + "\", \"limit\": " + limit + ", \"start_after\": \"" + start_after + "\" }}";
527
531
  return [4 /*yield*/, this.cosmwasmService.getContractSmartQueryData(contractAddress, query)];
528
532
  case 1:
529
533
  result = _a.sent();
@@ -532,13 +536,15 @@ var FirmaCosmWasmCwBridgeService = /** @class */ (function () {
532
536
  });
533
537
  });
534
538
  };
535
- FirmaCosmWasmCwBridgeService.prototype.getOwnerWithdrawableNfts = function (contractAddress, ownerAddress) {
539
+ FirmaCosmWasmCwBridgeService.prototype.getOwnerWithdrawableNfts = function (contractAddress, ownerAddress, limit, start_after) {
540
+ if (limit === void 0) { limit = 10; }
541
+ if (start_after === void 0) { start_after = ""; }
536
542
  return __awaiter(this, void 0, void 0, function () {
537
543
  var query, result;
538
544
  return __generator(this, function (_a) {
539
545
  switch (_a.label) {
540
546
  case 0:
541
- query = "{\"owner_withdrawable_nfts\": { \"owner_addr\": \"" + ownerAddress + "\" }}";
547
+ query = "{\"owner_withdrawable_nfts\": { \"owner_addr\": \"" + ownerAddress + "\", \"limit\": " + limit + ", \"start_after\": \"" + start_after + "\" }}";
542
548
  return [4 /*yield*/, this.cosmwasmService.getContractSmartQueryData(contractAddress, query)];
543
549
  case 1:
544
550
  result = _a.sent();
@@ -547,13 +553,15 @@ var FirmaCosmWasmCwBridgeService = /** @class */ (function () {
547
553
  });
548
554
  });
549
555
  };
550
- FirmaCosmWasmCwBridgeService.prototype.getOwnerUnlockableNfts = function (contractAddress, ownerAddress) {
556
+ FirmaCosmWasmCwBridgeService.prototype.getOwnerUnlockableNfts = function (contractAddress, ownerAddress, limit, start_after) {
557
+ if (limit === void 0) { limit = 10; }
558
+ if (start_after === void 0) { start_after = ""; }
551
559
  return __awaiter(this, void 0, void 0, function () {
552
560
  var query, result;
553
561
  return __generator(this, function (_a) {
554
562
  switch (_a.label) {
555
563
  case 0:
556
- query = "{\"owner_unlockable_nfts\": { \"owner_addr\": \"" + ownerAddress + "\" }}";
564
+ query = "{\"owner_unlockable_nfts\": { \"owner_addr\": \"" + ownerAddress + "\", \"limit\": " + limit + ", \"start_after\": \"" + start_after + "\" }}";
557
565
  return [4 /*yield*/, this.cosmwasmService.getContractSmartQueryData(contractAddress, query)];
558
566
  case 1:
559
567
  result = _a.sent();
@@ -67,8 +67,8 @@ export declare class FirmaCosmWasmCwMarketplaceService {
67
67
  getGasEstimationPurchaseSaleFCT(wallet: FirmaWalletService, contractAddress: string, tokenId: string, fctAmount: number): Promise<number>;
68
68
  getGasEstimationPurchaseSaleCw20(wallet: FirmaWalletService, contractAddress: string, tokenId: string, cw20Address: string, cw20Amount: number, cw20Decimal: number): Promise<number>;
69
69
  getGasEstimationCancelSale(wallet: FirmaWalletService, contractAddress: string, tokenId: string): Promise<number>;
70
- getConfig(contractAddress: string): Promise<CwMarketplaceMsgData>;
70
+ getConfig(contractAddress: string): Promise<MarketplaceConfig>;
71
71
  getOwner(contractAddress: string): Promise<string>;
72
- getRegisterList(contractAddress: string): Promise<MarketplaceRegisterData[]>;
73
- getRegisterListByAddress(contractAddress: string, address: string): Promise<MarketplaceRegisterData[]>;
72
+ getRegisterList(contractAddress: string, limit?: number, start_after?: string): Promise<MarketplaceRegisterData[]>;
73
+ getRegisterListByAddress(contractAddress: string, address: string, limit?: number, start_after?: string): Promise<MarketplaceRegisterData[]>;
74
74
  }
@@ -418,13 +418,15 @@ var FirmaCosmWasmCwMarketplaceService = /** @class */ (function () {
418
418
  });
419
419
  });
420
420
  };
421
- FirmaCosmWasmCwMarketplaceService.prototype.getRegisterList = function (contractAddress) {
421
+ FirmaCosmWasmCwMarketplaceService.prototype.getRegisterList = function (contractAddress, limit, start_after) {
422
+ if (limit === void 0) { limit = 10; }
423
+ if (start_after === void 0) { start_after = ""; }
422
424
  return __awaiter(this, void 0, void 0, function () {
423
425
  var query, result;
424
426
  return __generator(this, function (_a) {
425
427
  switch (_a.label) {
426
428
  case 0:
427
- query = "{\"get_register_list\": {}}";
429
+ query = "{\"get_register_list\": { \"limit\": " + limit + ", \"start_after\": \"" + start_after + "\" }}";
428
430
  return [4 /*yield*/, this.cosmwasmService.getContractSmartQueryData(contractAddress, query)];
429
431
  case 1:
430
432
  result = _a.sent();
@@ -433,13 +435,15 @@ var FirmaCosmWasmCwMarketplaceService = /** @class */ (function () {
433
435
  });
434
436
  });
435
437
  };
436
- FirmaCosmWasmCwMarketplaceService.prototype.getRegisterListByAddress = function (contractAddress, address) {
438
+ FirmaCosmWasmCwMarketplaceService.prototype.getRegisterListByAddress = function (contractAddress, address, limit, start_after) {
439
+ if (limit === void 0) { limit = 10; }
440
+ if (start_after === void 0) { start_after = ""; }
437
441
  return __awaiter(this, void 0, void 0, function () {
438
442
  var query, result;
439
443
  return __generator(this, function (_a) {
440
444
  switch (_a.label) {
441
445
  case 0:
442
- query = "{\"get_register_list_by_address\": {\"address\": \"" + address + "\"}}";
446
+ query = "{\"get_register_list_by_address\": { \"address\": \"" + address + "\", \"limit\": " + limit + ", \"start_after\": \"" + start_after + "\" }}";
443
447
  return [4 /*yield*/, this.cosmwasmService.getContractSmartQueryData(contractAddress, query)];
444
448
  case 1:
445
449
  result = _a.sent();
@@ -35,10 +35,10 @@ export declare class FirmaCosmWasmService {
35
35
  getCodeList(): Promise<CodeInfo[]>;
36
36
  getCodeData(codeId: string): Promise<CodeData>;
37
37
  getContractListFromCodeId(codeId: string): Promise<string[]>;
38
- getContractInfo(codeId: string): Promise<ContractInfo>;
39
- getContractHistory(codeId: string): Promise<ContractHistoryInfo[]>;
38
+ getContractInfo(contractAddress: string): Promise<ContractInfo>;
39
+ getContractHistory(contractAddress: string): Promise<ContractHistoryInfo[]>;
40
40
  getContractRawQueryData(contractAddress: string, hexString: string): Promise<string>;
41
41
  getContractSmartQueryData(contractAddress: string, query: string): Promise<string>;
42
- getContractState(codeId: string): Promise<ContractStateInfo[]>;
42
+ getContractState(contractAddress: string): Promise<ContractStateInfo[]>;
43
43
  getPinnedCodeList(): Promise<string[]>;
44
44
  }
@@ -603,7 +603,7 @@ var FirmaCosmWasmService = /** @class */ (function () {
603
603
  });
604
604
  });
605
605
  };
606
- FirmaCosmWasmService.prototype.getContractInfo = function (codeId) {
606
+ FirmaCosmWasmService.prototype.getContractInfo = function (contractAddress) {
607
607
  return __awaiter(this, void 0, void 0, function () {
608
608
  var queryClient, result, error_25;
609
609
  return __generator(this, function (_a) {
@@ -611,7 +611,7 @@ var FirmaCosmWasmService = /** @class */ (function () {
611
611
  case 0:
612
612
  _a.trys.push([0, 2, , 3]);
613
613
  queryClient = new cosmwasm_1.CosmWasmQueryClient(this.config.restApiAddress);
614
- return [4 /*yield*/, queryClient.getContractInfo(codeId)];
614
+ return [4 /*yield*/, queryClient.getContractInfo(contractAddress)];
615
615
  case 1:
616
616
  result = _a.sent();
617
617
  return [2 /*return*/, result];
@@ -624,7 +624,7 @@ var FirmaCosmWasmService = /** @class */ (function () {
624
624
  });
625
625
  });
626
626
  };
627
- FirmaCosmWasmService.prototype.getContractHistory = function (codeId) {
627
+ FirmaCosmWasmService.prototype.getContractHistory = function (contractAddress) {
628
628
  return __awaiter(this, void 0, void 0, function () {
629
629
  var queryClient, result, error_26;
630
630
  return __generator(this, function (_a) {
@@ -632,7 +632,7 @@ var FirmaCosmWasmService = /** @class */ (function () {
632
632
  case 0:
633
633
  _a.trys.push([0, 2, , 3]);
634
634
  queryClient = new cosmwasm_1.CosmWasmQueryClient(this.config.restApiAddress);
635
- return [4 /*yield*/, queryClient.getContractHistory(codeId)];
635
+ return [4 /*yield*/, queryClient.getContractHistory(contractAddress)];
636
636
  case 1:
637
637
  result = _a.sent();
638
638
  return [2 /*return*/, result];
@@ -687,7 +687,7 @@ var FirmaCosmWasmService = /** @class */ (function () {
687
687
  });
688
688
  });
689
689
  };
690
- FirmaCosmWasmService.prototype.getContractState = function (codeId) {
690
+ FirmaCosmWasmService.prototype.getContractState = function (contractAddress) {
691
691
  return __awaiter(this, void 0, void 0, function () {
692
692
  var queryClient, result, error_29;
693
693
  return __generator(this, function (_a) {
@@ -695,7 +695,7 @@ var FirmaCosmWasmService = /** @class */ (function () {
695
695
  case 0:
696
696
  _a.trys.push([0, 2, , 3]);
697
697
  queryClient = new cosmwasm_1.CosmWasmQueryClient(this.config.restApiAddress);
698
- return [4 /*yield*/, queryClient.getContractState(codeId)];
698
+ return [4 /*yield*/, queryClient.getContractState(contractAddress)];
699
699
  case 1:
700
700
  result = _a.sent();
701
701
  return [2 /*return*/, result];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firmachain/firma-js",
3
- "version": "0.2.55",
3
+ "version": "0.2.57",
4
4
  "description": "The Official FirmaChain Javascript SDK written in Typescript",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",