@firmachain/firma-js 0.3.8 → 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.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/sdk/FirmaAuthzService.js +20 -15
- package/dist/sdk/FirmaBankService.d.ts +1 -1
- package/dist/sdk/FirmaBankService.js +5 -4
- package/dist/sdk/FirmaConfig.js +4 -4
- package/dist/sdk/FirmaContractService.js +10 -8
- package/dist/sdk/FirmaDistributionService.js +20 -15
- package/dist/sdk/FirmaFeeGrantService.d.ts +0 -1
- package/dist/sdk/FirmaFeeGrantService.js +12 -14
- package/dist/sdk/FirmaGovService.d.ts +14 -0
- package/dist/sdk/FirmaGovService.js +58 -37
- package/dist/sdk/FirmaIbcService.js +4 -3
- package/dist/sdk/FirmaNftService.d.ts +3 -3
- package/dist/sdk/FirmaNftService.js +13 -10
- package/dist/sdk/FirmaStakingService.js +12 -9
- package/dist/sdk/FirmaTokenService.js +17 -14
- package/dist/sdk/FirmaUtil.js +1 -1
- package/dist/sdk/FirmaWalletService.d.ts +1 -1
- package/dist/sdk/FirmaWalletService.js +11 -23
- package/dist/sdk/firmachain/authz/AuthzTxClient.js +2 -0
- package/dist/sdk/firmachain/bank/BankTxClient.js +1 -1
- package/dist/sdk/firmachain/common/CommonTxClient.js +3 -1
- package/dist/sdk/firmachain/common/FirmaLedger.d.ts +49 -0
- package/dist/sdk/firmachain/common/FirmaLedger.js +301 -0
- package/dist/sdk/firmachain/common/ITxClient.d.ts +1 -1
- package/dist/sdk/firmachain/common/ITxClient.js +6 -4
- package/dist/sdk/firmachain/common/LedgerWallet.d.ts +5 -13
- package/dist/sdk/firmachain/common/LedgerWallet.js +1266 -124
- package/dist/sdk/firmachain/common/SigningProtobufStargateClient.js +3 -4
- package/dist/sdk/firmachain/common/SigningStargateClient.d.ts +2 -3
- package/dist/sdk/firmachain/common/SigningStargateClient.js +7 -10
- package/dist/sdk/firmachain/common/index.d.ts +1 -0
- package/dist/sdk/firmachain/common/index.js +1 -0
- package/dist/sdk/firmachain/common/signing.d.ts +4 -10
- package/dist/sdk/firmachain/common/signing.js +13 -60
- package/dist/sdk/firmachain/contract/ContractTxClient.js +1 -1
- package/dist/sdk/firmachain/contract/ContractTxTypes.js +54 -8
- package/dist/sdk/firmachain/distribution/DistributionTxClient.js +1 -1
- package/dist/sdk/firmachain/feegrant/FeeGrantTxClient.js +3 -1
- package/dist/sdk/firmachain/feegrant/FeeGrantTxTypes.d.ts +1 -2
- package/dist/sdk/firmachain/google/protobuf/any.js +0 -12
- package/dist/sdk/firmachain/gov/GovTxClient.js +3 -0
- package/dist/sdk/firmachain/nft/NftTxClient.js +1 -1
- package/dist/sdk/firmachain/token/TokenTxClient.js +1 -1
- package/package.json +16 -8
- package/dist/test/00.wallet.test.d.ts +0 -1
- package/dist/test/00.wallet.test.js +0 -96
- package/dist/test/01.contract_tx.test.d.ts +0 -1
- package/dist/test/01.contract_tx.test.js +0 -157
- package/dist/test/02.contract_query.test.d.ts +0 -1
- package/dist/test/02.contract_query.test.js +0 -245
- package/dist/test/03.contract_scenario.test.d.ts +0 -1
- package/dist/test/03.contract_scenario.test.js +0 -406
- package/dist/test/04.bank_tx.test.d.ts +0 -1
- package/dist/test/04.bank_tx.test.js +0 -126
- package/dist/test/05.bank_query.test.d.ts +0 -1
- package/dist/test/05.bank_query.test.js +0 -162
- package/dist/test/06.feegrant_tx.test.d.ts +0 -1
- package/dist/test/06.feegrant_tx.test.js +0 -185
- package/dist/test/07.feegrant_query.test.d.ts +0 -1
- package/dist/test/07.feegrant_query.test.js +0 -129
- package/dist/test/08.gas_estimate.test.d.ts +0 -1
- package/dist/test/08.gas_estimate.test.js +0 -728
- package/dist/test/09.ipfs.test.d.ts +0 -1
- package/dist/test/09.ipfs.test.js +0 -72
- package/dist/test/10.nft_tx.test.d.ts +0 -1
- package/dist/test/10.nft_tx.test.js +0 -209
- package/dist/test/11.nft_query.test.d.ts +0 -1
- package/dist/test/11.nft_query.test.js +0 -165
- package/dist/test/12.staking_tx.test.d.ts +0 -1
- package/dist/test/12.staking_tx.test.js +0 -211
- package/dist/test/13.staking_query.test.d.ts +0 -1
- package/dist/test/13.staking_query.test.js +0 -275
- package/dist/test/14.distribution_tx.test.d.ts +0 -1
- package/dist/test/14.distribution_tx.test.js +0 -170
- package/dist/test/15.distribution_query.test.d.ts +0 -1
- package/dist/test/15.distribution_query.test.js +0 -243
- package/dist/test/16.gov_tx.test.d.ts +0 -1
- package/dist/test/16.gov_tx.test.js +0 -394
- package/dist/test/17.gov_query.test.d.ts +0 -1
- package/dist/test/17.gov_query.test.js +0 -181
- package/dist/test/18.util.test.d.ts +0 -1
- package/dist/test/18.util.test.js +0 -354
- package/dist/test/19.chain.test.d.ts +0 -1
- package/dist/test/19.chain.test.js +0 -127
- package/dist/test/20.slashing_query.test.d.ts +0 -1
- package/dist/test/20.slashing_query.test.js +0 -111
- package/dist/test/21.token_tx.test.d.ts +0 -1
- package/dist/test/21.token_tx.test.js +0 -149
- package/dist/test/22.token_query.test.d.ts +0 -1
- package/dist/test/22.token_query.test.js +0 -103
- package/dist/test/23.authz_tx.test.d.ts +0 -1
- package/dist/test/23.authz_tx.test.js +0 -380
- package/dist/test/24.authz_query.test.d.ts +0 -1
- package/dist/test/24.authz_query.test.js +0 -202
- package/dist/test/25.cosmwasm_tx.test.d.ts +0 -1
- package/dist/test/25.cosmwasm_tx.test.js +0 -229
- package/dist/test/26.cosmwasm_query.test.d.ts +0 -1
- package/dist/test/26.cosmwasm_query.test.js +0 -275
- package/dist/test/27.arbitrary_sign.test.d.ts +0 -1
- package/dist/test/27.arbitrary_sign.test.js +0 -162
- package/dist/test/28.ibc_tx.test.d.ts +0 -1
- package/dist/test/28.ibc_tx.test.js +0 -98
- package/dist/test/29.mint_query.test.d.ts +0 -1
- package/dist/test/29.mint_query.test.js +0 -59
- package/dist/test/30.cw20_tx.test.d.ts +0 -1
- package/dist/test/30.cw20_tx.test.js +0 -450
- package/dist/test/31.cw20_query.test.d.ts +0 -1
- package/dist/test/31.cw20_query.test.js +0 -333
- package/dist/test/32.cw721_tx.test.d.ts +0 -1
- package/dist/test/32.cw721_tx.test.js +0 -431
- package/dist/test/33.cw721_query.test.d.ts +0 -1
- package/dist/test/33.cw721_query.test.js +0 -371
- package/dist/test/34.cw_bridge_tx.test.d.ts +0 -1
- package/dist/test/34.cw_bridge_tx.test.js +0 -476
- package/dist/test/35.cw_bridge_tx_low.test.d.ts +0 -1
- package/dist/test/35.cw_bridge_tx_low.test.js +0 -398
- package/dist/test/36.cw_bridge_query.test.d.ts +0 -1
- package/dist/test/36.cw_bridge_query.test.js +0 -318
- package/dist/test/37.cw_marketplace_tx.test.d.ts +0 -1
- package/dist/test/37.cw_marketplace_tx.test.js +0 -794
- package/dist/test/38.cw_marketplace_query.test.d.ts +0 -1
- package/dist/test/38.cw_marketplace_query.test.js +0 -128
- package/dist/test/config_test.d.ts +0 -11
- package/dist/test/config_test.js +0 -26
- package/dist/test/config_test.sample.d.ts +0 -11
- package/dist/test/config_test.sample.js +0 -14
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
var FirmaSDK_1 = require("../sdk/FirmaSDK");
|
|
40
|
-
var FirmaConfig_1 = require("../sdk/FirmaConfig");
|
|
41
|
-
var config_test_1 = require("./config_test");
|
|
42
|
-
describe.skip('[38. Marketplace query Test]', function () {
|
|
43
|
-
var firma;
|
|
44
|
-
var aliceWallet;
|
|
45
|
-
var bobWallet;
|
|
46
|
-
var aliceAddress;
|
|
47
|
-
var bobAddress;
|
|
48
|
-
beforeEach(function () {
|
|
49
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
50
|
-
return __generator(this, function (_a) {
|
|
51
|
-
switch (_a.label) {
|
|
52
|
-
case 0:
|
|
53
|
-
firma = new FirmaSDK_1.FirmaSDK(FirmaConfig_1.FirmaConfig.TestNetConfig);
|
|
54
|
-
return [4 /*yield*/, firma.Wallet.fromMnemonic(config_test_1.aliceMnemonic)];
|
|
55
|
-
case 1:
|
|
56
|
-
aliceWallet = _a.sent();
|
|
57
|
-
return [4 /*yield*/, firma.Wallet.fromMnemonic(config_test_1.bobMnemonic)];
|
|
58
|
-
case 2:
|
|
59
|
-
bobWallet = _a.sent();
|
|
60
|
-
return [4 /*yield*/, aliceWallet.getAddress()];
|
|
61
|
-
case 3:
|
|
62
|
-
aliceAddress = _a.sent();
|
|
63
|
-
return [4 /*yield*/, bobWallet.getAddress()];
|
|
64
|
-
case 4:
|
|
65
|
-
bobAddress = _a.sent();
|
|
66
|
-
return [2 /*return*/];
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
var cw721ContractAddress = "";
|
|
72
|
-
var cw20ContractAddress = "";
|
|
73
|
-
var marketplaceContractAddress = "";
|
|
74
|
-
it('Cw marketplace get config', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
75
|
-
var data;
|
|
76
|
-
return __generator(this, function (_a) {
|
|
77
|
-
switch (_a.label) {
|
|
78
|
-
case 0: return [4 /*yield*/, firma.CwMarketplace.getConfig(marketplaceContractAddress)];
|
|
79
|
-
case 1:
|
|
80
|
-
data = _a.sent();
|
|
81
|
-
console.log(data);
|
|
82
|
-
return [2 /*return*/];
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
}); }),
|
|
86
|
-
it('Cw marketplace get owner', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
87
|
-
var data;
|
|
88
|
-
return __generator(this, function (_a) {
|
|
89
|
-
switch (_a.label) {
|
|
90
|
-
case 0: return [4 /*yield*/, firma.CwMarketplace.getOwner(marketplaceContractAddress)];
|
|
91
|
-
case 1:
|
|
92
|
-
data = _a.sent();
|
|
93
|
-
console.log(data);
|
|
94
|
-
return [2 /*return*/];
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
}); }),
|
|
98
|
-
it('Cw marketplace get register list', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
99
|
-
var limit, start_after, data;
|
|
100
|
-
return __generator(this, function (_a) {
|
|
101
|
-
switch (_a.label) {
|
|
102
|
-
case 0:
|
|
103
|
-
limit = 10;
|
|
104
|
-
start_after = "59";
|
|
105
|
-
return [4 /*yield*/, firma.CwMarketplace.getRegisterList(marketplaceContractAddress, limit, start_after)];
|
|
106
|
-
case 1:
|
|
107
|
-
data = _a.sent();
|
|
108
|
-
console.log(data);
|
|
109
|
-
return [2 /*return*/];
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
}); }),
|
|
113
|
-
it('Cw marketplace get item', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
114
|
-
var limit, start_after, data;
|
|
115
|
-
return __generator(this, function (_a) {
|
|
116
|
-
switch (_a.label) {
|
|
117
|
-
case 0:
|
|
118
|
-
limit = 10;
|
|
119
|
-
start_after = "59";
|
|
120
|
-
return [4 /*yield*/, firma.CwMarketplace.getRegisterListByAddress(marketplaceContractAddress, aliceAddress, limit, start_after)];
|
|
121
|
-
case 1:
|
|
122
|
-
data = _a.sent();
|
|
123
|
-
console.log(data);
|
|
124
|
-
return [2 /*return*/];
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
}); });
|
|
128
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { FirmaConfig } from '../sdk/FirmaConfig';
|
|
2
|
-
export declare let TestChainConfig: FirmaConfig;
|
|
3
|
-
export declare const validatorMnemonic = "";
|
|
4
|
-
export declare const aliceMnemonic = "ribbon cross anchor sudden smile shrug enact tourist door found farm injury mango cancel wine supreme toy breeze spread type lyrics broom latin apple";
|
|
5
|
-
export declare const bobMnemonic = "certain bean eager measure crawl cliff innocent practice gas ladder board aspect fish link sweet raccoon staff long crumble skin special width click plastic";
|
|
6
|
-
export declare const feeMnemonic = "";
|
|
7
|
-
export declare const firmaFeeMnemonic = "";
|
|
8
|
-
export declare const signerMnemonic1 = "";
|
|
9
|
-
export declare const signerMnemonic2 = "";
|
|
10
|
-
export declare const signerMnemonic3 = "";
|
|
11
|
-
export declare const signerMnemonic4 = "";
|
package/dist/test/config_test.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.signerMnemonic4 = exports.signerMnemonic3 = exports.signerMnemonic2 = exports.signerMnemonic1 = exports.firmaFeeMnemonic = exports.feeMnemonic = exports.bobMnemonic = exports.aliceMnemonic = exports.validatorMnemonic = exports.TestChainConfig = void 0;
|
|
4
|
-
exports.TestChainConfig = {
|
|
5
|
-
chainID: "roma-1",
|
|
6
|
-
rpcAddress: "http://192.168.30.45:26657",
|
|
7
|
-
restApiAddress: "http://192.168.30.47:1317",
|
|
8
|
-
ipfsNodeAddress: "http://192.168.30.47:5001",
|
|
9
|
-
ipfsNodePort: 5001,
|
|
10
|
-
ipfsWebApiAddress: "http://192.168.30.45:8080",
|
|
11
|
-
hdPath: "m/44'/7777777'/",
|
|
12
|
-
prefix: "firma",
|
|
13
|
-
denom: "ufct",
|
|
14
|
-
defaultFee: 30000,
|
|
15
|
-
defaultGas: 300000,
|
|
16
|
-
isShowLog: false,
|
|
17
|
-
};
|
|
18
|
-
exports.validatorMnemonic = "";
|
|
19
|
-
exports.aliceMnemonic = "ribbon cross anchor sudden smile shrug enact tourist door found farm injury mango cancel wine supreme toy breeze spread type lyrics broom latin apple";
|
|
20
|
-
exports.bobMnemonic = "certain bean eager measure crawl cliff innocent practice gas ladder board aspect fish link sweet raccoon staff long crumble skin special width click plastic";
|
|
21
|
-
exports.feeMnemonic = "";
|
|
22
|
-
exports.firmaFeeMnemonic = "";
|
|
23
|
-
exports.signerMnemonic1 = "";
|
|
24
|
-
exports.signerMnemonic2 = "";
|
|
25
|
-
exports.signerMnemonic3 = "";
|
|
26
|
-
exports.signerMnemonic4 = "";
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { FirmaConfig } from '../sdk/FirmaConfig';
|
|
2
|
-
export declare let TestChainConfig: FirmaConfig;
|
|
3
|
-
export declare const validatorMnemonic = "";
|
|
4
|
-
export declare const aliceMnemonic = "";
|
|
5
|
-
export declare const bobMnemonic = "";
|
|
6
|
-
export declare const feeMnemonic = "";
|
|
7
|
-
export declare const firmaFeeMnemonic = "";
|
|
8
|
-
export declare const signerMnemonic1 = "";
|
|
9
|
-
export declare const signerMnemonic2 = "";
|
|
10
|
-
export declare const signerMnemonic3 = "";
|
|
11
|
-
export declare const signerMnemonic4 = "";
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.signerMnemonic4 = exports.signerMnemonic3 = exports.signerMnemonic2 = exports.signerMnemonic1 = exports.firmaFeeMnemonic = exports.feeMnemonic = exports.bobMnemonic = exports.aliceMnemonic = exports.validatorMnemonic = exports.TestChainConfig = void 0;
|
|
4
|
-
var FirmaConfig_1 = require("../sdk/FirmaConfig");
|
|
5
|
-
exports.TestChainConfig = FirmaConfig_1.FirmaConfig.TestNetConfig;
|
|
6
|
-
exports.validatorMnemonic = "";
|
|
7
|
-
exports.aliceMnemonic = "";
|
|
8
|
-
exports.bobMnemonic = "";
|
|
9
|
-
exports.feeMnemonic = "";
|
|
10
|
-
exports.firmaFeeMnemonic = "";
|
|
11
|
-
exports.signerMnemonic1 = "";
|
|
12
|
-
exports.signerMnemonic2 = "";
|
|
13
|
-
exports.signerMnemonic3 = "";
|
|
14
|
-
exports.signerMnemonic4 = "";
|