@firmachain/firma-js 0.3.4 → 0.3.6-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.js +5 -1
- package/dist/sdk/FirmaAuthzService.d.ts +8 -7
- package/dist/sdk/FirmaAuthzService.js +12 -22
- package/dist/sdk/FirmaBankService.js +2 -2
- package/dist/sdk/FirmaChainService.js +1 -1
- package/dist/sdk/FirmaContractService.d.ts +1 -1
- package/dist/sdk/FirmaContractService.js +6 -6
- package/dist/sdk/FirmaCosmWasmCw20.d.ts +2 -2
- package/dist/sdk/FirmaCosmWasmCw20.js +8 -8
- package/dist/sdk/FirmaCosmWasmCw721.d.ts +2 -2
- package/dist/sdk/FirmaCosmWasmCw721.js +12 -12
- package/dist/sdk/FirmaCosmWasmCwBridge.d.ts +1 -1
- package/dist/sdk/FirmaCosmWasmCwBridge.js +8 -8
- package/dist/sdk/FirmaCosmWasmCwMarketplace.d.ts +1 -1
- package/dist/sdk/FirmaCosmWasmCwMarketplace.js +5 -5
- package/dist/sdk/FirmaCosmWasmService.d.ts +1 -1
- package/dist/sdk/FirmaCosmWasmService.js +13 -13
- package/dist/sdk/FirmaDistributionService.d.ts +1 -1
- package/dist/sdk/FirmaDistributionService.js +6 -6
- package/dist/sdk/FirmaFeeGrantService.d.ts +7 -6
- package/dist/sdk/FirmaFeeGrantService.js +9 -26
- package/dist/sdk/FirmaGovService.d.ts +1 -1
- package/dist/sdk/FirmaGovService.js +14 -14
- package/dist/sdk/FirmaIbcService.d.ts +3 -3
- package/dist/sdk/FirmaIbcService.js +11 -8
- package/dist/sdk/FirmaIpfsService.js +1 -1
- package/dist/sdk/FirmaMintService.js +1 -1
- package/dist/sdk/FirmaNftService.d.ts +1 -1
- package/dist/sdk/FirmaNftService.js +6 -6
- package/dist/sdk/FirmaSlashingService.js +1 -1
- package/dist/sdk/FirmaStakingService.d.ts +3 -3
- package/dist/sdk/FirmaStakingService.js +6 -6
- package/dist/sdk/FirmaTokenService.d.ts +1 -1
- package/dist/sdk/FirmaTokenService.js +5 -5
- package/dist/sdk/FirmaUtil.d.ts +26 -23
- package/dist/sdk/FirmaUtil.js +157 -137
- package/dist/sdk/FirmaWalletService.d.ts +5 -9
- package/dist/sdk/FirmaWalletService.js +86 -52
- package/dist/sdk/firmachain/authz/AuthzQueryClient.js +4 -4
- package/dist/sdk/firmachain/authz/AuthzTxTypes.d.ts +8 -11
- package/dist/sdk/firmachain/authz/AuthzTxTypes.js +6 -10
- package/dist/sdk/firmachain/authz/index.js +5 -1
- package/dist/sdk/firmachain/bank/BankQueryClient.js +5 -5
- package/dist/sdk/firmachain/bank/index.js +5 -1
- package/dist/sdk/firmachain/common/ITxClient.d.ts +3 -3
- package/dist/sdk/firmachain/common/ITxClient.js +25 -83
- package/dist/sdk/firmachain/common/LedgerWallet.d.ts +19 -3
- package/dist/sdk/firmachain/common/LedgerWallet.js +138 -68
- package/dist/sdk/firmachain/common/TendermintQueryClient.js +1 -1
- package/dist/sdk/firmachain/common/TxCommon.d.ts +14 -30
- package/dist/sdk/firmachain/common/accounts.d.ts +1 -1
- package/dist/sdk/firmachain/common/accounts.js +7 -7
- package/dist/sdk/firmachain/common/events.js +2 -2
- package/dist/sdk/firmachain/common/fee.d.ts +2 -2
- package/dist/sdk/firmachain/common/fee.js +4 -2
- package/dist/sdk/firmachain/common/index.d.ts +0 -1
- package/dist/sdk/firmachain/common/index.js +5 -4
- package/dist/sdk/firmachain/common/signing.d.ts +13 -9
- package/dist/sdk/firmachain/common/signing.js +81 -36
- package/dist/sdk/firmachain/common/signingprotobufstargateclient.d.ts +34 -0
- package/dist/sdk/firmachain/common/signingprotobufstargateclient.js +319 -0
- package/dist/sdk/firmachain/common/signingstargateclient.d.ts +21 -105
- package/dist/sdk/firmachain/common/signingstargateclient.js +120 -472
- package/dist/sdk/firmachain/common/{stargateclient.d.ts → stargateClient.d.ts} +11 -60
- package/dist/sdk/firmachain/common/{stargateclient.js → stargateClient.js} +109 -203
- package/dist/sdk/firmachain/{amino → common}/wallet.js +15 -11
- package/dist/sdk/firmachain/contract/ContractQueryClient.js +3 -3
- package/dist/sdk/firmachain/contract/ContractTxTypes.d.ts +6 -6
- package/dist/sdk/firmachain/contract/index.js +5 -1
- package/dist/sdk/firmachain/cosmwasm/CosmWasmQueryClient.js +9 -9
- package/dist/sdk/firmachain/cosmwasm/index.js +5 -1
- package/dist/sdk/firmachain/distribution/DistributionQueryClient.js +6 -6
- package/dist/sdk/firmachain/distribution/index.js +5 -1
- package/dist/sdk/firmachain/feegrant/FeeGrantQueryClient.js +3 -3
- package/dist/sdk/firmachain/feegrant/FeeGrantTxTypes.d.ts +4 -45
- package/dist/sdk/firmachain/feegrant/FeeGrantTxTypes.js +3 -82
- package/dist/sdk/firmachain/feegrant/index.js +5 -1
- package/dist/sdk/firmachain/google/protobuf/any.d.ts +3 -3
- package/dist/sdk/firmachain/google/protobuf/descriptor.d.ts +29 -29
- package/dist/sdk/firmachain/google/protobuf/duration.d.ts +3 -3
- package/dist/sdk/firmachain/gov/GovQueryClient.js +3 -3
- package/dist/sdk/firmachain/gov/index.js +5 -1
- package/dist/sdk/firmachain/ibc/IbcQueryClient.js +2 -2
- package/dist/sdk/firmachain/ibc/index.js +5 -1
- package/dist/sdk/firmachain/mint/MintQueryClient.js +1 -1
- package/dist/sdk/firmachain/mint/index.js +5 -1
- package/dist/sdk/firmachain/nft/NftQueryClient.js +1 -1
- package/dist/sdk/firmachain/nft/NftTxTypes.d.ts +8 -8
- package/dist/sdk/firmachain/nft/index.js +5 -1
- package/dist/sdk/firmachain/slashing/SlashingQueryClient.js +1 -1
- package/dist/sdk/firmachain/slashing/index.js +5 -1
- package/dist/sdk/firmachain/staking/StakingQueryClient.d.ts +2 -2
- package/dist/sdk/firmachain/staking/StakingQueryClient.js +10 -9
- package/dist/sdk/firmachain/staking/index.js +5 -1
- package/dist/sdk/firmachain/token/TokenQueryClient.js +1 -1
- package/dist/sdk/firmachain/token/TokenTxTypes.d.ts +11 -11
- package/dist/sdk/firmachain/token/TokenTxTypes.js +1 -1
- package/dist/sdk/firmachain/token/index.js +5 -1
- package/dist/test/00.wallet.test.js +4 -4
- package/dist/test/01.contract_tx.test.js +5 -5
- package/dist/test/02.contract_query.test.js +15 -15
- package/dist/test/03.contract_scenario.test.js +28 -28
- package/dist/test/04.bank_tx.test.js +4 -4
- package/dist/test/05.bank_query.test.js +9 -9
- package/dist/test/06.feegrant_tx.test.js +59 -35
- package/dist/test/07.feegrant_query.test.js +18 -15
- package/dist/test/08.gas_estimate.test.js +110 -70
- package/dist/test/09.ipfs.test.js +4 -4
- package/dist/test/10.nft_tx.test.js +7 -7
- package/dist/test/11.nft_query.test.js +9 -9
- package/dist/test/12.staking_tx.test.js +27 -15
- package/dist/test/13.staking_query.test.js +20 -20
- package/dist/test/14.distribution_tx.test.js +8 -8
- package/dist/test/15.distribution_query.test.js +15 -15
- package/dist/test/16.gov_tx.test.js +17 -17
- package/dist/test/17.gov_query.test.js +19 -19
- package/dist/test/18.util.test.js +105 -63
- package/dist/test/19.chain.test.js +38 -38
- package/dist/test/20.slashing_query.test.js +25 -25
- package/dist/test/21.token_tx.test.js +6 -6
- package/dist/test/22.token_query.test.js +4 -4
- package/dist/test/23.authz_tx.test.js +77 -47
- package/dist/test/24.authz_query.test.js +66 -67
- package/dist/test/25.cosmwasm_tx.test.js +7 -7
- package/dist/test/26.cosmwasm_query.test.js +127 -59
- package/dist/test/{27.arbitary_sign.test.js → 27.arbitrary_sign.test.js} +41 -40
- package/dist/test/28.ibc_tx.test.js +8 -8
- package/dist/test/29.mint_query.test.js +2 -2
- package/dist/test/30.cw20_tx.test.js +20 -20
- package/dist/test/31.cw20_query.test.js +24 -24
- package/dist/test/32.cw721_tx.test.js +19 -19
- package/dist/test/33.cw721_query.test.js +32 -32
- package/dist/test/34.cw_bridge_tx.test.js +19 -19
- package/dist/test/35.cw_bridge_tx_low.test.js +13 -13
- package/dist/test/36.cw_bridge_query.test.js +20 -20
- package/dist/test/37.cw_marketplace_tx.test.js +32 -32
- package/dist/test/38.cw_marketplace_query.test.js +2 -2
- package/dist/test/config_test.d.ts +2 -2
- package/dist/test/config_test.js +22 -5
- package/package.json +9 -10
- package/dist/sdk/firmachain/amino/addresses.d.ts +0 -5
- package/dist/sdk/firmachain/amino/addresses.js +0 -46
- package/dist/sdk/firmachain/amino/aminomsgs.d.ts +0 -291
- package/dist/sdk/firmachain/amino/aminomsgs.js +0 -81
- package/dist/sdk/firmachain/amino/aminotypes.d.ts +0 -22
- package/dist/sdk/firmachain/amino/aminotypes.js +0 -538
- package/dist/sdk/firmachain/amino/coins.d.ts +0 -42
- package/dist/sdk/firmachain/amino/coins.js +0 -90
- package/dist/sdk/firmachain/amino/encoding.d.ts +0 -33
- package/dist/sdk/firmachain/amino/encoding.js +0 -252
- package/dist/sdk/firmachain/amino/multisig.d.ts +0 -10
- package/dist/sdk/firmachain/amino/multisig.js +0 -42
- package/dist/sdk/firmachain/amino/pubkeys.d.ts +0 -47
- package/dist/sdk/firmachain/amino/pubkeys.js +0 -29
- package/dist/sdk/firmachain/amino/signature.d.ts +0 -16
- package/dist/sdk/firmachain/amino/signature.js +0 -36
- package/dist/sdk/firmachain/amino/signdoc.d.ts +0 -44
- package/dist/sdk/firmachain/amino/signdoc.js +0 -68
- package/dist/sdk/firmachain/amino/signer.d.ts +0 -33
- package/dist/sdk/firmachain/amino/signer.js +0 -2
- package/dist/sdk/firmachain/amino/stdtx.d.ts +0 -15
- package/dist/sdk/firmachain/amino/stdtx.js +0 -17
- package/dist/sdk/firmachain/common/LedgerSigningStargateClient.d.ts +0 -22
- package/dist/sdk/firmachain/common/LedgerSigningStargateClient.js +0 -170
- package/dist/sdk/firmachain/common/aminotypes.d.ts +0 -19
- package/dist/sdk/firmachain/common/aminotypes.js +0 -74
- package/dist/sdk/firmachain/common/modules/auth/queries.d.ts +0 -15
- package/dist/sdk/firmachain/common/modules/auth/queries.js +0 -64
- package/dist/sdk/firmachain/common/modules/authz/aminomessages.d.ts +0 -2
- package/dist/sdk/firmachain/common/modules/authz/aminomessages.js +0 -15
- package/dist/sdk/firmachain/common/modules/authz/messages.d.ts +0 -2
- package/dist/sdk/firmachain/common/modules/authz/messages.js +0 -9
- package/dist/sdk/firmachain/common/modules/authz/queries.d.ts +0 -10
- package/dist/sdk/firmachain/common/modules/authz/queries.js +0 -88
- package/dist/sdk/firmachain/common/modules/bank/aminomessages.d.ts +0 -35
- package/dist/sdk/firmachain/common/modules/bank/aminomessages.js +0 -85
- package/dist/sdk/firmachain/common/modules/bank/messages.d.ts +0 -8
- package/dist/sdk/firmachain/common/modules/bank/messages.js +0 -12
- package/dist/sdk/firmachain/common/modules/bank/queries.d.ts +0 -15
- package/dist/sdk/firmachain/common/modules/bank/queries.js +0 -128
- package/dist/sdk/firmachain/common/modules/crisis/aminomessages.d.ts +0 -14
- package/dist/sdk/firmachain/common/modules/crisis/aminomessages.js +0 -11
- package/dist/sdk/firmachain/common/modules/distribution/aminomessages.d.ts +0 -44
- package/dist/sdk/firmachain/common/modules/distribution/aminomessages.js +0 -113
- package/dist/sdk/firmachain/common/modules/distribution/messages.d.ts +0 -8
- package/dist/sdk/firmachain/common/modules/distribution/messages.js +0 -15
- package/dist/sdk/firmachain/common/modules/distribution/queries.d.ts +0 -16
- package/dist/sdk/firmachain/common/modules/distribution/queries.js +0 -171
- package/dist/sdk/firmachain/common/modules/evidence/aminomessages.d.ts +0 -18
- package/dist/sdk/firmachain/common/modules/evidence/aminomessages.js +0 -11
- package/dist/sdk/firmachain/common/modules/feegrant/aminomessages.d.ts +0 -2
- package/dist/sdk/firmachain/common/modules/feegrant/aminomessages.js +0 -14
- package/dist/sdk/firmachain/common/modules/feegrant/messages.d.ts +0 -2
- package/dist/sdk/firmachain/common/modules/feegrant/messages.js +0 -8
- package/dist/sdk/firmachain/common/modules/feegrant/queries.d.ts +0 -9
- package/dist/sdk/firmachain/common/modules/feegrant/queries.js +0 -81
- package/dist/sdk/firmachain/common/modules/gov/aminomessages.d.ts +0 -79
- package/dist/sdk/firmachain/common/modules/gov/aminomessages.js +0 -152
- package/dist/sdk/firmachain/common/modules/gov/messages.d.ts +0 -29
- package/dist/sdk/firmachain/common/modules/gov/messages.js +0 -39
- package/dist/sdk/firmachain/common/modules/gov/queries.d.ts +0 -19
- package/dist/sdk/firmachain/common/modules/gov/queries.js +0 -160
- package/dist/sdk/firmachain/common/modules/group/aminomessages.d.ts +0 -2
- package/dist/sdk/firmachain/common/modules/group/aminomessages.js +0 -8
- package/dist/sdk/firmachain/common/modules/group/messages.d.ts +0 -2
- package/dist/sdk/firmachain/common/modules/group/messages.js +0 -28
- package/dist/sdk/firmachain/common/modules/ibc/aminomessages.d.ts +0 -38
- package/dist/sdk/firmachain/common/modules/ibc/aminomessages.js +0 -55
- package/dist/sdk/firmachain/common/modules/ibc/messages.d.ts +0 -8
- package/dist/sdk/firmachain/common/modules/ibc/messages.js +0 -32
- package/dist/sdk/firmachain/common/modules/ibc/queries.d.ts +0 -58
- package/dist/sdk/firmachain/common/modules/ibc/queries.js +0 -576
- package/dist/sdk/firmachain/common/modules/index.d.ts +0 -32
- package/dist/sdk/firmachain/common/modules/index.js +0 -101
- package/dist/sdk/firmachain/common/modules/mint/queries.d.ts +0 -21
- package/dist/sdk/firmachain/common/modules/mint/queries.js +0 -95
- package/dist/sdk/firmachain/common/modules/slashing/aminomessages.d.ts +0 -12
- package/dist/sdk/firmachain/common/modules/slashing/aminomessages.js +0 -11
- package/dist/sdk/firmachain/common/modules/slashing/queries.d.ts +0 -10
- package/dist/sdk/firmachain/common/modules/slashing/queries.js +0 -88
- package/dist/sdk/firmachain/common/modules/staking/aminomessages.d.ts +0 -112
- package/dist/sdk/firmachain/common/modules/staking/aminomessages.js +0 -234
- package/dist/sdk/firmachain/common/modules/staking/messages.d.ts +0 -33
- package/dist/sdk/firmachain/common/modules/staking/messages.js +0 -37
- package/dist/sdk/firmachain/common/modules/staking/queries.d.ts +0 -23
- package/dist/sdk/firmachain/common/modules/staking/queries.js +0 -242
- package/dist/sdk/firmachain/common/modules/tx/queries.d.ts +0 -11
- package/dist/sdk/firmachain/common/modules/tx/queries.js +0 -103
- package/dist/sdk/firmachain/common/modules/vesting/aminomessages.d.ts +0 -16
- package/dist/sdk/firmachain/common/modules/vesting/aminomessages.js +0 -56
- package/dist/sdk/firmachain/common/modules/vesting/messages.d.ts +0 -2
- package/dist/sdk/firmachain/common/modules/vesting/messages.js +0 -7
- package/dist/sdk/firmachain/common/queryclient/index.d.ts +0 -2
- package/dist/sdk/firmachain/common/queryclient/index.js +0 -10
- package/dist/sdk/firmachain/common/queryclient/queryclient.d.ts +0 -75
- package/dist/sdk/firmachain/common/queryclient/queryclient.js +0 -157
- package/dist/sdk/firmachain/common/queryclient/utils.d.ts +0 -33
- package/dist/sdk/firmachain/common/queryclient/utils.js +0 -101
- package/dist/sdk/firmachain/common/search.d.ts +0 -10
- package/dist/sdk/firmachain/common/search.js +0 -7
- package/dist/sdk/firmachain/google/protobuf/timestamp.d.ts +0 -110
- package/dist/sdk/firmachain/google/protobuf/timestamp.js +0 -108
- /package/dist/sdk/firmachain/{amino → common}/paths.d.ts +0 -0
- /package/dist/sdk/firmachain/{amino → common}/paths.js +0 -0
- /package/dist/sdk/firmachain/{amino → common}/wallet.d.ts +0 -0
- /package/dist/test/{27.arbitary_sign.test.d.ts → 27.arbitrary_sign.test.d.ts} +0 -0
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
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
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -90,7 +90,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
90
90
|
return [4 /*yield*/, firma.Cw721.mint(aliceWallet, cw721ContractAddress, owner, new_token_id, new_token_uri, { gas: gas, fee: fee })];
|
|
91
91
|
case 2:
|
|
92
92
|
result = _a.sent();
|
|
93
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
93
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
94
94
|
// 2. REGISTER SALE FCT
|
|
95
95
|
console.log("2. REGISTER SALE FCT");
|
|
96
96
|
return [4 /*yield*/, firma.CwMarketplace.getGasEstimationRegisterSaleFCT(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, fctAmount)];
|
|
@@ -101,7 +101,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
101
101
|
return [4 /*yield*/, firma.CwMarketplace.registerSaleFCT(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, fctAmount, { gas: gas, fee: fee })];
|
|
102
102
|
case 4:
|
|
103
103
|
result = _a.sent();
|
|
104
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
104
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
105
105
|
// 3. GET SALE INFO
|
|
106
106
|
console.log("3. GET SALE INFO");
|
|
107
107
|
return [4 /*yield*/, firma.CwMarketplace.getRegisterList(marketplaceContractAddress)];
|
|
@@ -126,7 +126,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
126
126
|
return [4 /*yield*/, firma.CwMarketplace.purchaseSaleFCT(aliceWallet, marketplaceContractAddress, new_token_id, fctAmount, { gas: gas, fee: fee })];
|
|
127
127
|
case 9:
|
|
128
128
|
result = _a.sent();
|
|
129
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
129
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
130
130
|
return [2 /*return*/];
|
|
131
131
|
}
|
|
132
132
|
});
|
|
@@ -150,7 +150,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
150
150
|
return [4 /*yield*/, firma.Cw721.mint(aliceWallet, cw721ContractAddress, owner, new_token_id, new_token_uri, { gas: gas, fee: fee })];
|
|
151
151
|
case 2:
|
|
152
152
|
result = _a.sent();
|
|
153
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
153
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
154
154
|
// 2. REGISTER SALE CW20
|
|
155
155
|
console.log("2. REGISTER SALE CW20");
|
|
156
156
|
return [4 /*yield*/, firma.CwMarketplace.getGasEstimationRegisterSaleCw20(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, cw20ContractAddress, cw20Amount, cw20Decimal)];
|
|
@@ -161,7 +161,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
161
161
|
return [4 /*yield*/, firma.CwMarketplace.registerSaleCw20(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, cw20ContractAddress, cw20Amount, cw20Decimal, { gas: gas, fee: fee })];
|
|
162
162
|
case 4:
|
|
163
163
|
result = _a.sent();
|
|
164
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
164
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
165
165
|
// 3. GET SALE INFO
|
|
166
166
|
console.log("3. GET SALE INFO");
|
|
167
167
|
return [4 /*yield*/, firma.CwMarketplace.getRegisterList(marketplaceContractAddress)];
|
|
@@ -185,7 +185,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
185
185
|
return [4 /*yield*/, firma.CwMarketplace.purchaseSaleCw20(aliceWallet, marketplaceContractAddress, new_token_id, cw20ContractAddress, cw20Amount, cw20Decimal, { gas: gas, fee: fee })];
|
|
186
186
|
case 9:
|
|
187
187
|
result = _a.sent();
|
|
188
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
188
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
189
189
|
return [2 /*return*/];
|
|
190
190
|
}
|
|
191
191
|
});
|
|
@@ -208,7 +208,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
208
208
|
return [4 /*yield*/, firma.Cw721.mint(aliceWallet, cw721ContractAddress, owner, new_token_id, new_token_uri, { gas: gas, fee: fee })];
|
|
209
209
|
case 2:
|
|
210
210
|
result = _a.sent();
|
|
211
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
211
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
212
212
|
// 2. REGISTER SALE CW20
|
|
213
213
|
console.log("2. REGISTER SALE FCT");
|
|
214
214
|
return [4 /*yield*/, firma.CwMarketplace.getGasEstimationRegisterSaleFCT(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, fctAmount)];
|
|
@@ -218,7 +218,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
218
218
|
return [4 /*yield*/, firma.CwMarketplace.registerSaleFCT(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, fctAmount, { gas: gas, fee: fee })];
|
|
219
219
|
case 4:
|
|
220
220
|
result = _a.sent();
|
|
221
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
221
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
222
222
|
// 3. GET SALE INFO
|
|
223
223
|
console.log("3. GET SALE INFO");
|
|
224
224
|
return [4 /*yield*/, firma.CwMarketplace.getRegisterList(marketplaceContractAddress)];
|
|
@@ -238,7 +238,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
238
238
|
return [4 /*yield*/, firma.CwMarketplace.cancelSale(bobWallet, marketplaceContractAddress, new_token_id, { gas: gas, fee: fee })];
|
|
239
239
|
case 8:
|
|
240
240
|
result = _a.sent();
|
|
241
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
241
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
242
242
|
return [4 /*yield*/, firma.CwMarketplace.getRegisterListByAddress(marketplaceContractAddress, aliceAddress)];
|
|
243
243
|
case 9:
|
|
244
244
|
registerList2 = _a.sent();
|
|
@@ -266,7 +266,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
266
266
|
return [4 /*yield*/, firma.Cw721.mint(aliceWallet, cw721ContractAddress, owner, new_token_id, new_token_uri, { gas: gas, fee: fee })];
|
|
267
267
|
case 2:
|
|
268
268
|
result = _a.sent();
|
|
269
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
269
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
270
270
|
// 2. REGISTER SALE CW20
|
|
271
271
|
console.log("2. REGISTER SALE CW20");
|
|
272
272
|
return [4 /*yield*/, firma.CwMarketplace.getGasEstimationRegisterSaleCw20(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, cw20ContractAddress, cw20Amount, cw20Decimal)];
|
|
@@ -277,7 +277,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
277
277
|
return [4 /*yield*/, firma.CwMarketplace.registerSaleCw20(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, cw20ContractAddress, cw20Amount, cw20Decimal, { gas: gas, fee: fee })];
|
|
278
278
|
case 4:
|
|
279
279
|
result = _a.sent();
|
|
280
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
280
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
281
281
|
// 3. GET SALE INFO
|
|
282
282
|
console.log("3. GET SALE INFO");
|
|
283
283
|
return [4 /*yield*/, firma.CwMarketplace.getRegisterList(marketplaceContractAddress)];
|
|
@@ -297,7 +297,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
297
297
|
return [4 /*yield*/, firma.CwMarketplace.cancelSale(bobWallet, marketplaceContractAddress, new_token_id, { gas: gas, fee: fee })];
|
|
298
298
|
case 8:
|
|
299
299
|
result = _a.sent();
|
|
300
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
300
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
301
301
|
return [4 /*yield*/, firma.CwMarketplace.getRegisterListByAddress(marketplaceContractAddress, aliceAddress)];
|
|
302
302
|
case 9:
|
|
303
303
|
registerList2 = _a.sent();
|
|
@@ -325,7 +325,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
325
325
|
return [4 /*yield*/, firma.Cw721.mint(aliceWallet, cw721ContractAddress, owner, new_token_id, new_token_uri, { gas: gas, fee: fee })];
|
|
326
326
|
case 2:
|
|
327
327
|
result = _a.sent();
|
|
328
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
328
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
329
329
|
// 2. REGISTER SALE CW20
|
|
330
330
|
console.log("2. REGISTER SALE CW20");
|
|
331
331
|
return [4 /*yield*/, firma.CwMarketplace.getGasEstimationRegisterSaleCw20(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, cw20ContractAddress, cw20Amount, cw20Decimal)];
|
|
@@ -336,7 +336,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
336
336
|
return [4 /*yield*/, firma.CwMarketplace.registerSaleCw20(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, cw20ContractAddress, cw20Amount, cw20Decimal, { gas: gas, fee: fee })];
|
|
337
337
|
case 4:
|
|
338
338
|
result = _a.sent();
|
|
339
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
339
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
340
340
|
// 3. GET SALE INFO
|
|
341
341
|
console.log("3. GET SALE INFO");
|
|
342
342
|
return [4 /*yield*/, firma.CwMarketplace.getRegisterList(marketplaceContractAddress)];
|
|
@@ -356,7 +356,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
356
356
|
return [4 /*yield*/, firma.CwMarketplace.cancelSale(aliceWallet, marketplaceContractAddress, new_token_id, { gas: gas, fee: fee })];
|
|
357
357
|
case 8:
|
|
358
358
|
result = _a.sent();
|
|
359
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
359
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
360
360
|
return [4 /*yield*/, firma.CwMarketplace.getRegisterListByAddress(marketplaceContractAddress, aliceAddress)];
|
|
361
361
|
case 9:
|
|
362
362
|
registerList2 = _a.sent();
|
|
@@ -384,7 +384,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
384
384
|
return [4 /*yield*/, firma.Cw721.mint(aliceWallet, cw721ContractAddress, owner, new_token_id, new_token_uri, { gas: gas, fee: fee })];
|
|
385
385
|
case 2:
|
|
386
386
|
result = _a.sent();
|
|
387
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
387
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
388
388
|
// 2. REGISTER SALE CW20
|
|
389
389
|
console.log("2. REGISTER SALE CW20");
|
|
390
390
|
return [4 /*yield*/, firma.CwMarketplace.getGasEstimationRegisterSaleCw20(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, cw20ContractAddress, cw20Amount, cw20Decimal)];
|
|
@@ -395,7 +395,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
395
395
|
return [4 /*yield*/, firma.CwMarketplace.registerSaleCw20(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, cw20ContractAddress, cw20Amount, cw20Decimal, { gas: gas, fee: fee })];
|
|
396
396
|
case 4:
|
|
397
397
|
result = _a.sent();
|
|
398
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
398
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
399
399
|
// 3. GET SALE INFO
|
|
400
400
|
console.log("3. GET SALE INFO");
|
|
401
401
|
return [4 /*yield*/, firma.CwMarketplace.getRegisterList(marketplaceContractAddress)];
|
|
@@ -437,7 +437,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
437
437
|
return [4 /*yield*/, firma.Cw721.mint(aliceWallet, cw721ContractAddress, owner, new_token_id, new_token_uri, { gas: gas, fee: fee })];
|
|
438
438
|
case 2:
|
|
439
439
|
result = _a.sent();
|
|
440
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
440
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
441
441
|
// 2. REGISTER SALE FCT
|
|
442
442
|
console.log("2. REGISTER SALE FCT");
|
|
443
443
|
return [4 /*yield*/, firma.CwMarketplace.getGasEstimationRegisterSaleFCT(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, fctAmount)];
|
|
@@ -448,7 +448,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
448
448
|
return [4 /*yield*/, firma.CwMarketplace.registerSaleFCT(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, fctAmount, { gas: gas, fee: fee })];
|
|
449
449
|
case 4:
|
|
450
450
|
result = _a.sent();
|
|
451
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
451
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
452
452
|
// 3. GET SALE INFO
|
|
453
453
|
console.log("3. GET SALE INFO");
|
|
454
454
|
return [4 /*yield*/, firma.CwMarketplace.getRegisterList(marketplaceContractAddress)];
|
|
@@ -493,7 +493,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
493
493
|
return [4 /*yield*/, firma.Cw721.mint(aliceWallet, cw721ContractAddress, owner, new_token_id, new_token_uri, { gas: gas, fee: fee })];
|
|
494
494
|
case 2:
|
|
495
495
|
result = _a.sent();
|
|
496
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
496
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
497
497
|
// 2. REGISTER SALE CW20
|
|
498
498
|
console.log("2. REGISTER SALE CW20");
|
|
499
499
|
return [4 /*yield*/, firma.CwMarketplace.getGasEstimationRegisterSaleCw20(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, cw20ContractAddress, cw20Amount, cw20Decimal)];
|
|
@@ -504,7 +504,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
504
504
|
return [4 /*yield*/, firma.CwMarketplace.registerSaleCw20(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, cw20ContractAddress, cw20Amount, cw20Decimal, { gas: gas, fee: fee })];
|
|
505
505
|
case 4:
|
|
506
506
|
result = _a.sent();
|
|
507
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
507
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
508
508
|
// 3. GET SALE INFO
|
|
509
509
|
console.log("3. GET SALE INFO");
|
|
510
510
|
return [4 /*yield*/, firma.CwMarketplace.getRegisterList(marketplaceContractAddress)];
|
|
@@ -528,7 +528,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
528
528
|
return [4 /*yield*/, firma.CwMarketplace.purchaseSaleCw20(bobWallet, marketplaceContractAddress, new_token_id, cw20ContractAddress, cw20Amount, cw20Decimal, { gas: gas, fee: fee })];
|
|
529
529
|
case 9:
|
|
530
530
|
result = _a.sent();
|
|
531
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
531
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
532
532
|
// 5. NFT OWNER CHECK
|
|
533
533
|
console.log("5. NFT OWNER CHECK");
|
|
534
534
|
return [4 /*yield*/, firma.Cw721.getNFTIdListOfOwner(cw721ContractAddress, bobAddress)];
|
|
@@ -563,7 +563,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
563
563
|
return [4 /*yield*/, firma.Cw721.mint(aliceWallet, cw721ContractAddress, owner, new_token_id, new_token_uri, { gas: gas, fee: fee })];
|
|
564
564
|
case 2:
|
|
565
565
|
result = _a.sent();
|
|
566
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
566
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
567
567
|
// 2. REGISTER SALE FCT
|
|
568
568
|
console.log("2. REGISTER SALE FCT");
|
|
569
569
|
return [4 /*yield*/, firma.CwMarketplace.getGasEstimationRegisterSaleFCT(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, fctAmount)];
|
|
@@ -574,7 +574,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
574
574
|
return [4 /*yield*/, firma.CwMarketplace.registerSaleFCT(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, fctAmount, { gas: gas, fee: fee })];
|
|
575
575
|
case 4:
|
|
576
576
|
result = _a.sent();
|
|
577
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
577
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
578
578
|
// 3. GET SALE INFO
|
|
579
579
|
console.log("3. GET SALE INFO");
|
|
580
580
|
return [4 /*yield*/, firma.CwMarketplace.getRegisterList(marketplaceContractAddress)];
|
|
@@ -599,7 +599,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
599
599
|
return [4 /*yield*/, firma.CwMarketplace.purchaseSaleFCT(bobWallet, marketplaceContractAddress, new_token_id, fctAmount, { gas: gas, fee: fee })];
|
|
600
600
|
case 9:
|
|
601
601
|
result = _a.sent();
|
|
602
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
602
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
603
603
|
// 5. NFT OWNER CHECK
|
|
604
604
|
console.log("5. NFT OWNER CHECK");
|
|
605
605
|
return [4 /*yield*/, firma.Cw721.getNFTIdListOfOwner(cw721ContractAddress, bobAddress)];
|
|
@@ -631,7 +631,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
631
631
|
return [4 /*yield*/, firma.Cw721.mint(aliceWallet, cw721ContractAddress, owner, new_token_id, new_token_uri, { gas: gas, fee: fee })];
|
|
632
632
|
case 2:
|
|
633
633
|
result = _a.sent();
|
|
634
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
634
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
635
635
|
return [2 /*return*/];
|
|
636
636
|
}
|
|
637
637
|
});
|
|
@@ -675,7 +675,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
675
675
|
return [4 /*yield*/, firma.CwMarketplace.registerSaleFCT(aliceWallet, marketplaceContractAddress, cw721ContractAddress, token_id, fctAmount, { gas: gas, fee: fee })];
|
|
676
676
|
case 2:
|
|
677
677
|
result = _a.sent();
|
|
678
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
678
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
679
679
|
return [4 /*yield*/, firma.Cw721.getNFTIdListOfOwner(cw721ContractAddress, marketplaceContractAddress)];
|
|
680
680
|
case 3:
|
|
681
681
|
contractFCTBalance = _a.sent();
|
|
@@ -700,7 +700,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
700
700
|
return [4 /*yield*/, firma.CwMarketplace.registerSaleCw20(aliceWallet, marketplaceContractAddress, cw721ContractAddress, token_id, cw20ContractAddress, cw20Amount, cw20Decimal, { gas: gas, fee: fee })];
|
|
701
701
|
case 2:
|
|
702
702
|
result = _a.sent();
|
|
703
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
703
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
704
704
|
return [4 /*yield*/, firma.Cw721.getNFTIdListOfOwner(cw721ContractAddress, marketplaceContractAddress)];
|
|
705
705
|
case 3:
|
|
706
706
|
contractNFTBalance = _a.sent();
|
|
@@ -727,7 +727,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
727
727
|
return [4 /*yield*/, firma.CwMarketplace.purchaseSaleFCT(aliceWallet, marketplaceContractAddress, token_id, fctAmount, { gas: gas, fee: fee })];
|
|
728
728
|
case 3:
|
|
729
729
|
result = _a.sent();
|
|
730
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
730
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
731
731
|
return [4 /*yield*/, firma.Cw721.getNFTIdListOfOwner(cw721ContractAddress, marketplaceContractAddress)];
|
|
732
732
|
case 4:
|
|
733
733
|
nftBalance = _a.sent();
|
|
@@ -760,7 +760,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
760
760
|
return [4 /*yield*/, firma.CwMarketplace.purchaseSaleCw20(aliceWallet, marketplaceContractAddress, token_id, cw20ContractAddress, cw20Amount, cw20Decimal, { gas: gas, fee: fee })];
|
|
761
761
|
case 3:
|
|
762
762
|
result = _a.sent();
|
|
763
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
763
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
764
764
|
return [4 /*yield*/, firma.Cw20.getBalance(cw20ContractAddress, marketplaceContractAddress)];
|
|
765
765
|
case 4:
|
|
766
766
|
contractCw20Balance = _a.sent();
|
|
@@ -782,7 +782,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
|
|
|
782
782
|
return [4 /*yield*/, firma.CwMarketplace.changeOwner(bobWallet, marketplaceContractAddress, new_owner, { gas: gas, fee: fee })];
|
|
783
783
|
case 2:
|
|
784
784
|
result = _a.sent();
|
|
785
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
785
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
786
786
|
return [4 /*yield*/, firma.CwMarketplace.getOwner(marketplaceContractAddress)];
|
|
787
787
|
case 3:
|
|
788
788
|
data = _a.sent();
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
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
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -39,7 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
var FirmaSDK_1 = require("../sdk/FirmaSDK");
|
|
40
40
|
var FirmaConfig_1 = require("../sdk/FirmaConfig");
|
|
41
41
|
var config_test_1 = require("./config_test");
|
|
42
|
-
describe.skip('[
|
|
42
|
+
describe.skip('[38. Marketplace query Test]', function () {
|
|
43
43
|
var firma;
|
|
44
44
|
var aliceWallet;
|
|
45
45
|
var bobWallet;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FirmaConfig } from '../sdk/FirmaConfig';
|
|
2
2
|
export declare let TestChainConfig: FirmaConfig;
|
|
3
|
-
export declare const validatorMnemonic = "
|
|
4
|
-
export declare const aliceMnemonic = "
|
|
3
|
+
export declare const validatorMnemonic = "stadium lonely midnight okay meat rib awesome wealth phone leisure turn prosper notable label fruit define little also father silver half drill bargain antique";
|
|
4
|
+
export declare const aliceMnemonic = "uncle banana theme relax oak prosper volcano glad industry bicycle tower thrive jelly curious luggage frame that defy reason jewel figure begin nice moon";
|
|
5
5
|
export declare const bobMnemonic = "innocent enforce visit tilt job kitten actual glory flash feed wonder license rubber outer drum sun fuel relax roof universe enrich pulse fine grid";
|
|
6
6
|
export declare const feeMnemonic = "long shallow crumble clown truth book oval render seed canal buffalo assist sadness elbow afraid catalog brother trade food subject must luggage bread neither";
|
|
7
7
|
export declare const firmaFeeMnemonic = "arrest dynamic typical lunch original glare truth narrow stairs clip canyon space alley chat drive sudden music bubble time mesh color office minor draft";
|
package/dist/test/config_test.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
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
|
+
var config = FirmaConfig_1.FirmaConfig.TestNetConfig;
|
|
6
|
+
config.isShowLog = false;
|
|
4
7
|
// export let TestChainConfig: FirmaConfig = FirmaConfig.TestNetConfig;
|
|
5
8
|
exports.TestChainConfig = {
|
|
6
9
|
chainID: "roma-1",
|
|
@@ -16,24 +19,38 @@ exports.TestChainConfig = {
|
|
|
16
19
|
defaultGas: 200000,
|
|
17
20
|
isShowLog: false,
|
|
18
21
|
};
|
|
19
|
-
exports.validatorMnemonic = "angry water bunker where iron absurd cruise deliver clutch unique creek pyramid arch express flush pill lens concert absent enemy boring mom nuclear rose";
|
|
20
22
|
// DEVNET
|
|
21
|
-
|
|
23
|
+
// export const validatorMnemonic = "rebel engine situate catalog blood strong satisfy aerobic cupboard again vivid twice flag work taxi heart fruit island ribbon hungry cheap ordinary horse foam";
|
|
24
|
+
// VALIDATOR 2
|
|
25
|
+
exports.validatorMnemonic = "stadium lonely midnight okay meat rib awesome wealth phone leisure turn prosper notable label fruit define little also father silver half drill bargain antique";
|
|
26
|
+
exports.aliceMnemonic = "uncle banana theme relax oak prosper volcano glad industry bicycle tower thrive jelly curious luggage frame that defy reason jewel figure begin nice moon";
|
|
27
|
+
exports.bobMnemonic = "innocent enforce visit tilt job kitten actual glory flash feed wonder license rubber outer drum sun fuel relax roof universe enrich pulse fine grid";
|
|
28
|
+
// TESTNET
|
|
29
|
+
// export const validatorMnemonic = "owner pottery smile evolve pig base lady dismiss badge purchase divide royal medal buffalo miss carbon kiwi gate draft mouse yard reunion thank wage";
|
|
30
|
+
// export const validatorMnemonic = "main shallow liberty desk super palm remind throw track legal warrior client garbage type insect first token keen subway pony curtain pitch yellow arrive";
|
|
31
|
+
// export const aliceMnemonic = "harvest galaxy sniff include record undo width oven tired sad month text museum curious firm mountain flash assault oval sand ribbon blouse consider lens";
|
|
32
|
+
// export 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";
|
|
33
|
+
// testnet인데 임시로 바꿈
|
|
34
|
+
// export const bobMnemonic = "harvest galaxy sniff include record undo width oven tired sad month text museum curious firm mountain flash assault oval sand ribbon blouse consider lens";
|
|
35
|
+
// export const aliceMnemonic = "certain bean eager measure crawl cliff innocent practice gas ladder board aspect fish link sweet raccoon staff long crumble skin special width click plastic";
|
|
36
|
+
// DEVNET validator 4
|
|
37
|
+
// export const validatorMnemonic = "ladder damage art company shield glance cushion float need layer rare toast intact grief wet point write season correct access mix bomb accident estate";
|
|
38
|
+
// DEVNET validator 3
|
|
39
|
+
// export const validatorMnemonic = "rebel engine situate catalog blood strong satisfy aerobic cupboard again vivid twice flag work taxi heart fruit island ribbon hungry cheap ordinary horse foam";
|
|
40
|
+
// DEVNET
|
|
41
|
+
// export const aliceMnemonic = "immune flavor record sphere foam planet faint grid disorder flag minute eternal beef sea camp surge extra scorpion pistol plastic happy siren juice found";
|
|
22
42
|
// TESTNET
|
|
23
43
|
// export const aliceMnemonic = "harvest galaxy sniff include record undo width oven tired sad month text museum curious firm mountain flash assault oval sand ribbon blouse consider lens";
|
|
24
44
|
// VALIDATOR
|
|
25
45
|
// export const aliceMnemonic = "clump erupt type lucky mask pig soup runway wrestle suspect element involve stamp civil auction resource blame same journey start unaware crush ten draw";
|
|
26
46
|
// export const aliceMnemonic = "owner pottery smile evolve pig base lady dismiss badge purchase divide royal medal buffalo miss carbon kiwi gate draft mouse yard reunion thank wage";
|
|
27
47
|
// export const aliceMnemonic = "main shallow liberty desk super palm remind throw track legal warrior client garbage type insect first token keen subway pony curtain pitch yellow arrive";
|
|
28
|
-
// voting test
|
|
29
|
-
// export const aliceMnemonic = "long shallow crumble clown truth book oval render seed canal buffalo assist sadness elbow afraid catalog brother trade food subject must luggage bread neither";
|
|
30
48
|
// export const aliceMnemonic = "clump erupt type lucky mask pig soup runway wrestle suspect element involve stamp civil auction resource blame same journey start unaware crush ten draw";
|
|
31
49
|
// export const aliceMnemonic = "angry water bunker where iron absurd cruise deliver clutch unique creek pyramid arch express flush pill lens concert absent enemy boring mom nuclear rose";
|
|
32
50
|
// export const aliceMnemonic = "stadium lonely midnight okay meat rib awesome wealth phone leisure turn prosper notable label fruit define little also father silver half drill bargain antique";
|
|
33
51
|
// export const aliceMnemonic = "uncle banana theme relax oak prosper volcano glad industry bicycle tower thrive jelly curious luggage frame that defy reason jewel figure begin nice moon";
|
|
34
52
|
// export const aliceMnemonic = "rebel engine situate catalog blood strong satisfy aerobic cupboard again vivid twice flag work taxi heart fruit island ribbon hungry cheap ordinary horse foam";
|
|
35
53
|
// export const aliceMnemonic = "ladder damage art company shield glance cushion float need layer rare toast intact grief wet point write season correct access mix bomb accident estate";
|
|
36
|
-
exports.bobMnemonic = "innocent enforce visit tilt job kitten actual glory flash feed wonder license rubber outer drum sun fuel relax roof universe enrich pulse fine grid";
|
|
37
54
|
exports.feeMnemonic = "long shallow crumble clown truth book oval render seed canal buffalo assist sadness elbow afraid catalog brother trade food subject must luggage bread neither";
|
|
38
55
|
exports.firmaFeeMnemonic = "arrest dynamic typical lunch original glare truth narrow stairs clip canyon space alley chat drive sudden music bubble time mesh color office minor draft";
|
|
39
56
|
// export const firmaFeeMnemonic = "child material talent property foot sign talent congress cargo pistol suspect screen leader owner type style patch amused stable flame sure fluid april acoustic";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firmachain/firma-js",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6-beta1",
|
|
4
4
|
"description": "The Official FirmaChain Javascript SDK written in Typescript",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"lint": "eslint src test --ext .ts,.tsx",
|
|
13
13
|
"nodemon": "nodemon",
|
|
14
14
|
"dev": "ts-node ./test/test_index.ts",
|
|
15
|
-
"
|
|
15
|
+
"clean": "rm -rf dist",
|
|
16
|
+
"build": "npm run clean && tsc --module commonjs"
|
|
16
17
|
},
|
|
17
18
|
"repository": {
|
|
18
19
|
"type": "git",
|
|
@@ -31,16 +32,15 @@
|
|
|
31
32
|
},
|
|
32
33
|
"homepage": "https://firmachain.org",
|
|
33
34
|
"dependencies": {
|
|
34
|
-
"@cosmjs/amino": "0.
|
|
35
|
-
"@cosmjs/math": "0.
|
|
36
|
-
"@cosmjs/proto-signing": "0.
|
|
37
|
-
"@cosmjs/stargate": "0.
|
|
38
|
-
"@cosmjs/tendermint-rpc": "0.
|
|
35
|
+
"@cosmjs/amino": "0.34.0",
|
|
36
|
+
"@cosmjs/math": "0.34.0",
|
|
37
|
+
"@cosmjs/proto-signing": "0.34.0",
|
|
38
|
+
"@cosmjs/stargate": "0.34.0",
|
|
39
|
+
"@cosmjs/tendermint-rpc": "0.34.0",
|
|
39
40
|
"@kintsugi-tech/cosmjs-types": "^0.10.0",
|
|
40
41
|
"@tharsis/address-converter": "0.1.8",
|
|
41
42
|
"@types/pako": "2.0.0",
|
|
42
43
|
"axios": "0.27.2",
|
|
43
|
-
"big-number": "2.0.0",
|
|
44
44
|
"bignumber.js": "^9.3.0",
|
|
45
45
|
"cosmjs-types": "0.9.0",
|
|
46
46
|
"crypto-js": "4.1.1",
|
|
@@ -51,7 +51,6 @@
|
|
|
51
51
|
"readline-sync": "1.4.10"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@types/bignumber.js": "^4.0.0",
|
|
55
54
|
"@types/chai": "4.2.21",
|
|
56
55
|
"@types/mocha": "9.0.0",
|
|
57
56
|
"@types/node": "16.4.3",
|
|
@@ -59,6 +58,6 @@
|
|
|
59
58
|
"mocha": "9.1.1",
|
|
60
59
|
"nodemon": "2.0.12",
|
|
61
60
|
"ts-node": "10.2.1",
|
|
62
|
-
"typescript": "4.
|
|
61
|
+
"typescript": "^4.9.5"
|
|
63
62
|
}
|
|
64
63
|
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Pubkey } from "./pubkeys";
|
|
2
|
-
export declare function rawEd25519PubkeyToRawAddress(pubkeyData: Uint8Array): Uint8Array;
|
|
3
|
-
export declare function rawSecp256k1PubkeyToRawAddress(pubkeyData: Uint8Array): Uint8Array;
|
|
4
|
-
export declare function pubkeyToRawAddress(pubkey: Pubkey): Uint8Array;
|
|
5
|
-
export declare function pubkeyToAddress(pubkey: Pubkey, prefix: string): string;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// See https://github.com/tendermint/tendermint/blob/f2ada0a604b4c0763bda2f64fac53d506d3beca7/docs/spec/blockchain/encoding.md#public-key-cryptography
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.pubkeyToAddress = exports.pubkeyToRawAddress = exports.rawSecp256k1PubkeyToRawAddress = exports.rawEd25519PubkeyToRawAddress = void 0;
|
|
5
|
-
var crypto_1 = require("@cosmjs/crypto");
|
|
6
|
-
var encoding_1 = require("@cosmjs/encoding");
|
|
7
|
-
var encoding_2 = require("./encoding");
|
|
8
|
-
var pubkeys_1 = require("./pubkeys");
|
|
9
|
-
function rawEd25519PubkeyToRawAddress(pubkeyData) {
|
|
10
|
-
if (pubkeyData.length !== 32) {
|
|
11
|
-
throw new Error("Invalid Ed25519 pubkey length: " + pubkeyData.length);
|
|
12
|
-
}
|
|
13
|
-
return crypto_1.sha256(pubkeyData).slice(0, 20);
|
|
14
|
-
}
|
|
15
|
-
exports.rawEd25519PubkeyToRawAddress = rawEd25519PubkeyToRawAddress;
|
|
16
|
-
function rawSecp256k1PubkeyToRawAddress(pubkeyData) {
|
|
17
|
-
if (pubkeyData.length !== 33) {
|
|
18
|
-
throw new Error("Invalid Secp256k1 pubkey length (compressed): " + pubkeyData.length);
|
|
19
|
-
}
|
|
20
|
-
return crypto_1.ripemd160(crypto_1.sha256(pubkeyData));
|
|
21
|
-
}
|
|
22
|
-
exports.rawSecp256k1PubkeyToRawAddress = rawSecp256k1PubkeyToRawAddress;
|
|
23
|
-
// For secp256k1 this assumes we already have a compressed pubkey.
|
|
24
|
-
function pubkeyToRawAddress(pubkey) {
|
|
25
|
-
if (pubkeys_1.isSecp256k1Pubkey(pubkey)) {
|
|
26
|
-
var pubkeyData = encoding_1.fromBase64(pubkey.value);
|
|
27
|
-
return rawSecp256k1PubkeyToRawAddress(pubkeyData);
|
|
28
|
-
}
|
|
29
|
-
else if (pubkeys_1.isEd25519Pubkey(pubkey)) {
|
|
30
|
-
var pubkeyData = encoding_1.fromBase64(pubkey.value);
|
|
31
|
-
return rawEd25519PubkeyToRawAddress(pubkeyData);
|
|
32
|
-
}
|
|
33
|
-
else if (pubkeys_1.isMultisigThresholdPubkey(pubkey)) {
|
|
34
|
-
// https://github.com/tendermint/tendermint/blob/38b401657e4ad7a7eeb3c30a3cbf512037df3740/crypto/multisig/threshold_pubkey.go#L71-L74
|
|
35
|
-
var pubkeyData = encoding_2.encodeAminoPubkey(pubkey);
|
|
36
|
-
return crypto_1.sha256(pubkeyData).slice(0, 20);
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
throw new Error("Unsupported public key type");
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.pubkeyToRawAddress = pubkeyToRawAddress;
|
|
43
|
-
function pubkeyToAddress(pubkey, prefix) {
|
|
44
|
-
return encoding_1.toBech32(prefix, pubkeyToRawAddress(pubkey));
|
|
45
|
-
}
|
|
46
|
-
exports.pubkeyToAddress = pubkeyToAddress;
|