@firmachain/firma-js 0.2.56 → 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:
|
|
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:
|
|
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>;
|
|
@@ -67,7 +67,7 @@ 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<
|
|
70
|
+
getConfig(contractAddress: string): Promise<MarketplaceConfig>;
|
|
71
71
|
getOwner(contractAddress: string): Promise<string>;
|
|
72
72
|
getRegisterList(contractAddress: string, limit?: number, start_after?: string): Promise<MarketplaceRegisterData[]>;
|
|
73
73
|
getRegisterListByAddress(contractAddress: string, address: string, limit?: number, start_after?: string): Promise<MarketplaceRegisterData[]>;
|
|
@@ -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(
|
|
39
|
-
getContractHistory(
|
|
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(
|
|
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 (
|
|
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(
|
|
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 (
|
|
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(
|
|
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 (
|
|
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(
|
|
698
|
+
return [4 /*yield*/, queryClient.getContractState(contractAddress)];
|
|
699
699
|
case 1:
|
|
700
700
|
result = _a.sent();
|
|
701
701
|
return [2 /*return*/, result];
|