@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
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
3
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
4
|
-
if (!m) return o;
|
|
5
|
-
var i = m.call(o), r, ar = [], e;
|
|
6
|
-
try {
|
|
7
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
8
|
-
}
|
|
9
|
-
catch (error) { e = { error: error }; }
|
|
10
|
-
finally {
|
|
11
|
-
try {
|
|
12
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
13
|
-
}
|
|
14
|
-
finally { if (e) throw e.error; }
|
|
15
|
-
}
|
|
16
|
-
return ar;
|
|
17
|
-
};
|
|
18
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.createStakingAminoConverters = exports.isAminoMsgCancelUnbondingDelegation = exports.isAminoMsgUndelegate = exports.isAminoMsgBeginRedelegate = exports.isAminoMsgDelegate = exports.isAminoMsgEditValidator = exports.isAminoMsgCreateValidator = exports.protoDecimalToJson = void 0;
|
|
20
|
-
var math_1 = require("@cosmjs/math");
|
|
21
|
-
var proto_signing_1 = require("@cosmjs/proto-signing");
|
|
22
|
-
var utils_1 = require("@cosmjs/utils");
|
|
23
|
-
function protoDecimalToJson(decimal) {
|
|
24
|
-
var parsed = math_1.Decimal.fromAtomics(decimal, 18);
|
|
25
|
-
var _a = __read(parsed.toString().split("."), 2), whole = _a[0], fractional = _a[1];
|
|
26
|
-
return whole + "." + (fractional !== null && fractional !== void 0 ? fractional : "").padEnd(18, "0");
|
|
27
|
-
}
|
|
28
|
-
exports.protoDecimalToJson = protoDecimalToJson;
|
|
29
|
-
function jsonDecimalToProto(decimal) {
|
|
30
|
-
var parsed = math_1.Decimal.fromUserInput(decimal, 18);
|
|
31
|
-
return parsed.atomics;
|
|
32
|
-
}
|
|
33
|
-
function isAminoMsgCreateValidator(msg) {
|
|
34
|
-
return msg.type === "cosmos-sdk/MsgCreateValidator";
|
|
35
|
-
}
|
|
36
|
-
exports.isAminoMsgCreateValidator = isAminoMsgCreateValidator;
|
|
37
|
-
function isAminoMsgEditValidator(msg) {
|
|
38
|
-
return msg.type === "cosmos-sdk/MsgEditValidator";
|
|
39
|
-
}
|
|
40
|
-
exports.isAminoMsgEditValidator = isAminoMsgEditValidator;
|
|
41
|
-
function isAminoMsgDelegate(msg) {
|
|
42
|
-
return msg.type === "cosmos-sdk/MsgDelegate";
|
|
43
|
-
}
|
|
44
|
-
exports.isAminoMsgDelegate = isAminoMsgDelegate;
|
|
45
|
-
function isAminoMsgBeginRedelegate(msg) {
|
|
46
|
-
return msg.type === "cosmos-sdk/MsgBeginRedelegate";
|
|
47
|
-
}
|
|
48
|
-
exports.isAminoMsgBeginRedelegate = isAminoMsgBeginRedelegate;
|
|
49
|
-
function isAminoMsgUndelegate(msg) {
|
|
50
|
-
return msg.type === "cosmos-sdk/MsgUndelegate";
|
|
51
|
-
}
|
|
52
|
-
exports.isAminoMsgUndelegate = isAminoMsgUndelegate;
|
|
53
|
-
function isAminoMsgCancelUnbondingDelegation(msg) {
|
|
54
|
-
return msg.type === "cosmos-sdk/MsgCancelUnbondingDelegation";
|
|
55
|
-
}
|
|
56
|
-
exports.isAminoMsgCancelUnbondingDelegation = isAminoMsgCancelUnbondingDelegation;
|
|
57
|
-
function createStakingAminoConverters() {
|
|
58
|
-
return {
|
|
59
|
-
"/cosmos.staking.v1beta1.MsgBeginRedelegate": {
|
|
60
|
-
aminoType: "cosmos-sdk/MsgBeginRedelegate",
|
|
61
|
-
toAmino: function (_a) {
|
|
62
|
-
var delegatorAddress = _a.delegatorAddress, validatorSrcAddress = _a.validatorSrcAddress, validatorDstAddress = _a.validatorDstAddress, amount = _a.amount;
|
|
63
|
-
utils_1.assertDefinedAndNotNull(amount, "missing amount");
|
|
64
|
-
return {
|
|
65
|
-
delegator_address: delegatorAddress,
|
|
66
|
-
validator_src_address: validatorSrcAddress,
|
|
67
|
-
validator_dst_address: validatorDstAddress,
|
|
68
|
-
amount: amount,
|
|
69
|
-
};
|
|
70
|
-
},
|
|
71
|
-
fromAmino: function (_a) {
|
|
72
|
-
var delegator_address = _a.delegator_address, validator_src_address = _a.validator_src_address, validator_dst_address = _a.validator_dst_address, amount = _a.amount;
|
|
73
|
-
return ({
|
|
74
|
-
delegatorAddress: delegator_address,
|
|
75
|
-
validatorSrcAddress: validator_src_address,
|
|
76
|
-
validatorDstAddress: validator_dst_address,
|
|
77
|
-
amount: amount,
|
|
78
|
-
});
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
"/cosmos.staking.v1beta1.MsgCreateValidator": {
|
|
82
|
-
aminoType: "cosmos-sdk/MsgCreateValidator",
|
|
83
|
-
toAmino: function (_a) {
|
|
84
|
-
var description = _a.description, commission = _a.commission, minSelfDelegation = _a.minSelfDelegation, delegatorAddress = _a.delegatorAddress, validatorAddress = _a.validatorAddress, pubkey = _a.pubkey, value = _a.value;
|
|
85
|
-
utils_1.assertDefinedAndNotNull(description, "missing description");
|
|
86
|
-
utils_1.assertDefinedAndNotNull(commission, "missing commission");
|
|
87
|
-
utils_1.assertDefinedAndNotNull(pubkey, "missing pubkey");
|
|
88
|
-
utils_1.assertDefinedAndNotNull(value, "missing value");
|
|
89
|
-
return {
|
|
90
|
-
description: {
|
|
91
|
-
moniker: description.moniker,
|
|
92
|
-
identity: description.identity,
|
|
93
|
-
website: description.website,
|
|
94
|
-
security_contact: description.securityContact,
|
|
95
|
-
details: description.details,
|
|
96
|
-
},
|
|
97
|
-
commission: {
|
|
98
|
-
rate: protoDecimalToJson(commission.rate),
|
|
99
|
-
max_rate: protoDecimalToJson(commission.maxRate),
|
|
100
|
-
max_change_rate: protoDecimalToJson(commission.maxChangeRate),
|
|
101
|
-
},
|
|
102
|
-
min_self_delegation: minSelfDelegation,
|
|
103
|
-
delegator_address: delegatorAddress,
|
|
104
|
-
validator_address: validatorAddress,
|
|
105
|
-
pubkey: proto_signing_1.decodePubkey(pubkey),
|
|
106
|
-
value: value,
|
|
107
|
-
};
|
|
108
|
-
},
|
|
109
|
-
fromAmino: function (_a) {
|
|
110
|
-
var description = _a.description, commission = _a.commission, min_self_delegation = _a.min_self_delegation, delegator_address = _a.delegator_address, validator_address = _a.validator_address, pubkey = _a.pubkey, value = _a.value;
|
|
111
|
-
return {
|
|
112
|
-
description: {
|
|
113
|
-
moniker: description.moniker,
|
|
114
|
-
identity: description.identity,
|
|
115
|
-
website: description.website,
|
|
116
|
-
securityContact: description.security_contact,
|
|
117
|
-
details: description.details,
|
|
118
|
-
},
|
|
119
|
-
commission: {
|
|
120
|
-
rate: jsonDecimalToProto(commission.rate),
|
|
121
|
-
maxRate: jsonDecimalToProto(commission.max_rate),
|
|
122
|
-
maxChangeRate: jsonDecimalToProto(commission.max_change_rate),
|
|
123
|
-
},
|
|
124
|
-
minSelfDelegation: min_self_delegation,
|
|
125
|
-
delegatorAddress: delegator_address,
|
|
126
|
-
validatorAddress: validator_address,
|
|
127
|
-
pubkey: proto_signing_1.encodePubkey(pubkey),
|
|
128
|
-
value: value,
|
|
129
|
-
};
|
|
130
|
-
},
|
|
131
|
-
},
|
|
132
|
-
"/cosmos.staking.v1beta1.MsgDelegate": {
|
|
133
|
-
aminoType: "cosmos-sdk/MsgDelegate",
|
|
134
|
-
toAmino: function (_a) {
|
|
135
|
-
var delegatorAddress = _a.delegatorAddress, validatorAddress = _a.validatorAddress, amount = _a.amount;
|
|
136
|
-
utils_1.assertDefinedAndNotNull(amount, "missing amount");
|
|
137
|
-
return {
|
|
138
|
-
delegator_address: delegatorAddress,
|
|
139
|
-
validator_address: validatorAddress,
|
|
140
|
-
amount: amount,
|
|
141
|
-
};
|
|
142
|
-
},
|
|
143
|
-
fromAmino: function (_a) {
|
|
144
|
-
var delegator_address = _a.delegator_address, validator_address = _a.validator_address, amount = _a.amount;
|
|
145
|
-
return ({
|
|
146
|
-
delegatorAddress: delegator_address,
|
|
147
|
-
validatorAddress: validator_address,
|
|
148
|
-
amount: amount,
|
|
149
|
-
});
|
|
150
|
-
},
|
|
151
|
-
},
|
|
152
|
-
"/cosmos.staking.v1beta1.MsgEditValidator": {
|
|
153
|
-
aminoType: "cosmos-sdk/MsgEditValidator",
|
|
154
|
-
toAmino: function (_a) {
|
|
155
|
-
var description = _a.description, commissionRate = _a.commissionRate, minSelfDelegation = _a.minSelfDelegation, validatorAddress = _a.validatorAddress;
|
|
156
|
-
utils_1.assertDefinedAndNotNull(description, "missing description");
|
|
157
|
-
return {
|
|
158
|
-
description: {
|
|
159
|
-
moniker: description.moniker,
|
|
160
|
-
identity: description.identity,
|
|
161
|
-
website: description.website,
|
|
162
|
-
security_contact: description.securityContact,
|
|
163
|
-
details: description.details,
|
|
164
|
-
},
|
|
165
|
-
// empty string in the protobuf document means "do not change"
|
|
166
|
-
commission_rate: commissionRate ? protoDecimalToJson(commissionRate) : undefined,
|
|
167
|
-
// empty string in the protobuf document means "do not change"
|
|
168
|
-
min_self_delegation: minSelfDelegation ? minSelfDelegation : undefined,
|
|
169
|
-
validator_address: validatorAddress,
|
|
170
|
-
};
|
|
171
|
-
},
|
|
172
|
-
fromAmino: function (_a) {
|
|
173
|
-
var description = _a.description, commission_rate = _a.commission_rate, min_self_delegation = _a.min_self_delegation, validator_address = _a.validator_address;
|
|
174
|
-
return ({
|
|
175
|
-
description: {
|
|
176
|
-
moniker: description.moniker,
|
|
177
|
-
identity: description.identity,
|
|
178
|
-
website: description.website,
|
|
179
|
-
securityContact: description.security_contact,
|
|
180
|
-
details: description.details,
|
|
181
|
-
},
|
|
182
|
-
// empty string in the protobuf document means "do not change"
|
|
183
|
-
commissionRate: commission_rate ? jsonDecimalToProto(commission_rate) : "",
|
|
184
|
-
// empty string in the protobuf document means "do not change"
|
|
185
|
-
minSelfDelegation: min_self_delegation !== null && min_self_delegation !== void 0 ? min_self_delegation : "",
|
|
186
|
-
validatorAddress: validator_address,
|
|
187
|
-
});
|
|
188
|
-
},
|
|
189
|
-
},
|
|
190
|
-
"/cosmos.staking.v1beta1.MsgUndelegate": {
|
|
191
|
-
aminoType: "cosmos-sdk/MsgUndelegate",
|
|
192
|
-
toAmino: function (_a) {
|
|
193
|
-
var delegatorAddress = _a.delegatorAddress, validatorAddress = _a.validatorAddress, amount = _a.amount;
|
|
194
|
-
utils_1.assertDefinedAndNotNull(amount, "missing amount");
|
|
195
|
-
return {
|
|
196
|
-
delegator_address: delegatorAddress,
|
|
197
|
-
validator_address: validatorAddress,
|
|
198
|
-
amount: amount,
|
|
199
|
-
};
|
|
200
|
-
},
|
|
201
|
-
fromAmino: function (_a) {
|
|
202
|
-
var delegator_address = _a.delegator_address, validator_address = _a.validator_address, amount = _a.amount;
|
|
203
|
-
return ({
|
|
204
|
-
delegatorAddress: delegator_address,
|
|
205
|
-
validatorAddress: validator_address,
|
|
206
|
-
amount: amount,
|
|
207
|
-
});
|
|
208
|
-
},
|
|
209
|
-
},
|
|
210
|
-
"/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation": {
|
|
211
|
-
aminoType: "cosmos-sdk/MsgCancelUnbondingDelegation",
|
|
212
|
-
toAmino: function (_a) {
|
|
213
|
-
var delegatorAddress = _a.delegatorAddress, validatorAddress = _a.validatorAddress, amount = _a.amount, creationHeight = _a.creationHeight;
|
|
214
|
-
utils_1.assertDefinedAndNotNull(amount, "missing amount");
|
|
215
|
-
return {
|
|
216
|
-
delegator_address: delegatorAddress,
|
|
217
|
-
validator_address: validatorAddress,
|
|
218
|
-
amount: amount,
|
|
219
|
-
creation_height: creationHeight.toString(),
|
|
220
|
-
};
|
|
221
|
-
},
|
|
222
|
-
fromAmino: function (_a) {
|
|
223
|
-
var delegator_address = _a.delegator_address, validator_address = _a.validator_address, amount = _a.amount, creation_height = _a.creation_height;
|
|
224
|
-
return ({
|
|
225
|
-
delegatorAddress: delegator_address,
|
|
226
|
-
validatorAddress: validator_address,
|
|
227
|
-
amount: amount,
|
|
228
|
-
creationHeight: BigInt(creation_height),
|
|
229
|
-
});
|
|
230
|
-
},
|
|
231
|
-
},
|
|
232
|
-
};
|
|
233
|
-
}
|
|
234
|
-
exports.createStakingAminoConverters = createStakingAminoConverters;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { EncodeObject, GeneratedType } from "@cosmjs/proto-signing";
|
|
2
|
-
import { MsgBeginRedelegate, MsgCancelUnbondingDelegation, MsgCreateValidator, MsgDelegate, MsgEditValidator, MsgUndelegate } from "cosmjs-types/cosmos/staking/v1beta1/tx";
|
|
3
|
-
export declare const stakingTypes: ReadonlyArray<[string, GeneratedType]>;
|
|
4
|
-
export interface MsgBeginRedelegateEncodeObject extends EncodeObject {
|
|
5
|
-
readonly typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate";
|
|
6
|
-
readonly value: Partial<MsgBeginRedelegate>;
|
|
7
|
-
}
|
|
8
|
-
export declare function isMsgBeginRedelegateEncodeObject(o: EncodeObject): o is MsgBeginRedelegateEncodeObject;
|
|
9
|
-
export interface MsgCreateValidatorEncodeObject extends EncodeObject {
|
|
10
|
-
readonly typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator";
|
|
11
|
-
readonly value: Partial<MsgCreateValidator>;
|
|
12
|
-
}
|
|
13
|
-
export declare function isMsgCreateValidatorEncodeObject(o: EncodeObject): o is MsgCreateValidatorEncodeObject;
|
|
14
|
-
export interface MsgDelegateEncodeObject extends EncodeObject {
|
|
15
|
-
readonly typeUrl: "/cosmos.staking.v1beta1.MsgDelegate";
|
|
16
|
-
readonly value: Partial<MsgDelegate>;
|
|
17
|
-
}
|
|
18
|
-
export declare function isMsgDelegateEncodeObject(object: EncodeObject): object is MsgDelegateEncodeObject;
|
|
19
|
-
export interface MsgEditValidatorEncodeObject extends EncodeObject {
|
|
20
|
-
readonly typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator";
|
|
21
|
-
readonly value: Partial<MsgEditValidator>;
|
|
22
|
-
}
|
|
23
|
-
export declare function isMsgEditValidatorEncodeObject(o: EncodeObject): o is MsgEditValidatorEncodeObject;
|
|
24
|
-
export interface MsgUndelegateEncodeObject extends EncodeObject {
|
|
25
|
-
readonly typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate";
|
|
26
|
-
readonly value: Partial<MsgUndelegate>;
|
|
27
|
-
}
|
|
28
|
-
export declare function isMsgUndelegateEncodeObject(object: EncodeObject): object is MsgUndelegateEncodeObject;
|
|
29
|
-
export interface MsgCancelUnbondingDelegationEncodeObject extends EncodeObject {
|
|
30
|
-
readonly typeUrl: "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation";
|
|
31
|
-
readonly value: Partial<MsgCancelUnbondingDelegation>;
|
|
32
|
-
}
|
|
33
|
-
export declare function isMsgCancelUnbondingDelegationEncodeObject(object: EncodeObject): object is MsgCancelUnbondingDelegationEncodeObject;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isMsgCancelUnbondingDelegationEncodeObject = exports.isMsgUndelegateEncodeObject = exports.isMsgEditValidatorEncodeObject = exports.isMsgDelegateEncodeObject = exports.isMsgCreateValidatorEncodeObject = exports.isMsgBeginRedelegateEncodeObject = exports.stakingTypes = void 0;
|
|
4
|
-
var tx_1 = require("cosmjs-types/cosmos/staking/v1beta1/tx");
|
|
5
|
-
exports.stakingTypes = [
|
|
6
|
-
["/cosmos.staking.v1beta1.MsgBeginRedelegate", tx_1.MsgBeginRedelegate],
|
|
7
|
-
["/cosmos.staking.v1beta1.MsgCreateValidator", tx_1.MsgCreateValidator],
|
|
8
|
-
["/cosmos.staking.v1beta1.MsgDelegate", tx_1.MsgDelegate],
|
|
9
|
-
["/cosmos.staking.v1beta1.MsgEditValidator", tx_1.MsgEditValidator],
|
|
10
|
-
["/cosmos.staking.v1beta1.MsgUndelegate", tx_1.MsgUndelegate],
|
|
11
|
-
["/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", tx_1.MsgCancelUnbondingDelegation],
|
|
12
|
-
];
|
|
13
|
-
function isMsgBeginRedelegateEncodeObject(o) {
|
|
14
|
-
return o.typeUrl === "/cosmos.staking.v1beta1.MsgBeginRedelegate";
|
|
15
|
-
}
|
|
16
|
-
exports.isMsgBeginRedelegateEncodeObject = isMsgBeginRedelegateEncodeObject;
|
|
17
|
-
function isMsgCreateValidatorEncodeObject(o) {
|
|
18
|
-
return o.typeUrl === "/cosmos.staking.v1beta1.MsgCreateValidator";
|
|
19
|
-
}
|
|
20
|
-
exports.isMsgCreateValidatorEncodeObject = isMsgCreateValidatorEncodeObject;
|
|
21
|
-
function isMsgDelegateEncodeObject(object) {
|
|
22
|
-
return object.typeUrl === "/cosmos.staking.v1beta1.MsgDelegate";
|
|
23
|
-
}
|
|
24
|
-
exports.isMsgDelegateEncodeObject = isMsgDelegateEncodeObject;
|
|
25
|
-
function isMsgEditValidatorEncodeObject(o) {
|
|
26
|
-
return o.typeUrl === "/cosmos.staking.v1beta1.MsgEditValidator";
|
|
27
|
-
}
|
|
28
|
-
exports.isMsgEditValidatorEncodeObject = isMsgEditValidatorEncodeObject;
|
|
29
|
-
function isMsgUndelegateEncodeObject(object) {
|
|
30
|
-
return object.typeUrl === "/cosmos.staking.v1beta1.MsgUndelegate";
|
|
31
|
-
}
|
|
32
|
-
exports.isMsgUndelegateEncodeObject = isMsgUndelegateEncodeObject;
|
|
33
|
-
function isMsgCancelUnbondingDelegationEncodeObject(object) {
|
|
34
|
-
return (object.typeUrl ===
|
|
35
|
-
"/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation");
|
|
36
|
-
}
|
|
37
|
-
exports.isMsgCancelUnbondingDelegationEncodeObject = isMsgCancelUnbondingDelegationEncodeObject;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { QueryDelegationResponse, QueryDelegatorDelegationsResponse, QueryDelegatorUnbondingDelegationsResponse, QueryDelegatorValidatorResponse, QueryDelegatorValidatorsResponse, QueryHistoricalInfoResponse, QueryParamsResponse, QueryPoolResponse, QueryRedelegationsResponse, QueryUnbondingDelegationResponse, QueryValidatorDelegationsResponse, QueryValidatorResponse, QueryValidatorsResponse, QueryValidatorUnbondingDelegationsResponse } from "cosmjs-types/cosmos/staking/v1beta1/query";
|
|
2
|
-
import { BondStatus } from "cosmjs-types/cosmos/staking/v1beta1/staking";
|
|
3
|
-
import { QueryClient } from "../../queryclient";
|
|
4
|
-
export declare type BondStatusString = keyof Pick<typeof BondStatus, "BOND_STATUS_BONDED" | "BOND_STATUS_UNBONDED" | "BOND_STATUS_UNBONDING"> | "";
|
|
5
|
-
export interface StakingExtension {
|
|
6
|
-
readonly staking: {
|
|
7
|
-
delegation: (delegatorAddress: string, validatorAddress: string) => Promise<QueryDelegationResponse>;
|
|
8
|
-
delegatorDelegations: (delegatorAddress: string, paginationKey?: Uint8Array) => Promise<QueryDelegatorDelegationsResponse>;
|
|
9
|
-
delegatorUnbondingDelegations: (delegatorAddress: string, paginationKey?: Uint8Array) => Promise<QueryDelegatorUnbondingDelegationsResponse>;
|
|
10
|
-
delegatorValidator: (delegatorAddress: string, validatorAddress: string) => Promise<QueryDelegatorValidatorResponse>;
|
|
11
|
-
delegatorValidators: (delegatorAddress: string, paginationKey?: Uint8Array) => Promise<QueryDelegatorValidatorsResponse>;
|
|
12
|
-
historicalInfo: (height: number) => Promise<QueryHistoricalInfoResponse>;
|
|
13
|
-
params: () => Promise<QueryParamsResponse>;
|
|
14
|
-
pool: () => Promise<QueryPoolResponse>;
|
|
15
|
-
redelegations: (delegatorAddress: string, sourceValidatorAddress: string, destinationValidatorAddress: string, paginationKey?: Uint8Array) => Promise<QueryRedelegationsResponse>;
|
|
16
|
-
unbondingDelegation: (delegatorAddress: string, validatorAddress: string) => Promise<QueryUnbondingDelegationResponse>;
|
|
17
|
-
validator: (validatorAddress: string) => Promise<QueryValidatorResponse>;
|
|
18
|
-
validatorDelegations: (validatorAddress: string, paginationKey?: Uint8Array) => Promise<QueryValidatorDelegationsResponse>;
|
|
19
|
-
validators: (status: BondStatusString, paginationKey?: Uint8Array) => Promise<QueryValidatorsResponse>;
|
|
20
|
-
validatorUnbondingDelegations: (validatorAddress: string, paginationKey?: Uint8Array) => Promise<QueryValidatorUnbondingDelegationsResponse>;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
export declare function setupStakingExtension(base: QueryClient): StakingExtension;
|
|
@@ -1,242 +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 (_) 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
|
-
exports.setupStakingExtension = void 0;
|
|
40
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
41
|
-
var query_1 = require("cosmjs-types/cosmos/staking/v1beta1/query");
|
|
42
|
-
var queryclient_1 = require("../../queryclient");
|
|
43
|
-
function setupStakingExtension(base) {
|
|
44
|
-
var _this = this;
|
|
45
|
-
// Use this service to get easy typed access to query methods
|
|
46
|
-
// This cannot be used for proof verification
|
|
47
|
-
var rpc = queryclient_1.createProtobufRpcClient(base);
|
|
48
|
-
var queryService = new query_1.QueryClientImpl(rpc);
|
|
49
|
-
return {
|
|
50
|
-
staking: {
|
|
51
|
-
delegation: function (delegatorAddress, validatorAddress) { return __awaiter(_this, void 0, void 0, function () {
|
|
52
|
-
var response;
|
|
53
|
-
return __generator(this, function (_a) {
|
|
54
|
-
switch (_a.label) {
|
|
55
|
-
case 0: return [4 /*yield*/, queryService.Delegation({
|
|
56
|
-
delegatorAddr: delegatorAddress,
|
|
57
|
-
validatorAddr: validatorAddress,
|
|
58
|
-
})];
|
|
59
|
-
case 1:
|
|
60
|
-
response = _a.sent();
|
|
61
|
-
return [2 /*return*/, response];
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
}); },
|
|
65
|
-
delegatorDelegations: function (delegatorAddress, paginationKey) { return __awaiter(_this, void 0, void 0, function () {
|
|
66
|
-
var response;
|
|
67
|
-
return __generator(this, function (_a) {
|
|
68
|
-
switch (_a.label) {
|
|
69
|
-
case 0: return [4 /*yield*/, queryService.DelegatorDelegations({
|
|
70
|
-
delegatorAddr: delegatorAddress,
|
|
71
|
-
pagination: queryclient_1.createPagination(paginationKey),
|
|
72
|
-
})];
|
|
73
|
-
case 1:
|
|
74
|
-
response = _a.sent();
|
|
75
|
-
return [2 /*return*/, response];
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
}); },
|
|
79
|
-
delegatorUnbondingDelegations: function (delegatorAddress, paginationKey) { return __awaiter(_this, void 0, void 0, function () {
|
|
80
|
-
var response;
|
|
81
|
-
return __generator(this, function (_a) {
|
|
82
|
-
switch (_a.label) {
|
|
83
|
-
case 0: return [4 /*yield*/, queryService.DelegatorUnbondingDelegations({
|
|
84
|
-
delegatorAddr: delegatorAddress,
|
|
85
|
-
pagination: queryclient_1.createPagination(paginationKey),
|
|
86
|
-
})];
|
|
87
|
-
case 1:
|
|
88
|
-
response = _a.sent();
|
|
89
|
-
return [2 /*return*/, response];
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
}); },
|
|
93
|
-
delegatorValidator: function (delegatorAddress, validatorAddress) { return __awaiter(_this, void 0, void 0, function () {
|
|
94
|
-
var response;
|
|
95
|
-
return __generator(this, function (_a) {
|
|
96
|
-
switch (_a.label) {
|
|
97
|
-
case 0: return [4 /*yield*/, queryService.DelegatorValidator({
|
|
98
|
-
delegatorAddr: delegatorAddress,
|
|
99
|
-
validatorAddr: validatorAddress,
|
|
100
|
-
})];
|
|
101
|
-
case 1:
|
|
102
|
-
response = _a.sent();
|
|
103
|
-
return [2 /*return*/, response];
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
}); },
|
|
107
|
-
delegatorValidators: function (delegatorAddress, paginationKey) { return __awaiter(_this, void 0, void 0, function () {
|
|
108
|
-
var response;
|
|
109
|
-
return __generator(this, function (_a) {
|
|
110
|
-
switch (_a.label) {
|
|
111
|
-
case 0: return [4 /*yield*/, queryService.DelegatorValidators({
|
|
112
|
-
delegatorAddr: delegatorAddress,
|
|
113
|
-
pagination: queryclient_1.createPagination(paginationKey),
|
|
114
|
-
})];
|
|
115
|
-
case 1:
|
|
116
|
-
response = _a.sent();
|
|
117
|
-
return [2 /*return*/, response];
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
}); },
|
|
121
|
-
historicalInfo: function (height) { return __awaiter(_this, void 0, void 0, function () {
|
|
122
|
-
var response;
|
|
123
|
-
return __generator(this, function (_a) {
|
|
124
|
-
switch (_a.label) {
|
|
125
|
-
case 0: return [4 /*yield*/, queryService.HistoricalInfo({
|
|
126
|
-
height: BigInt(height),
|
|
127
|
-
})];
|
|
128
|
-
case 1:
|
|
129
|
-
response = _a.sent();
|
|
130
|
-
return [2 /*return*/, response];
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
}); },
|
|
134
|
-
params: function () { return __awaiter(_this, void 0, void 0, function () {
|
|
135
|
-
var response;
|
|
136
|
-
return __generator(this, function (_a) {
|
|
137
|
-
switch (_a.label) {
|
|
138
|
-
case 0: return [4 /*yield*/, queryService.Params({})];
|
|
139
|
-
case 1:
|
|
140
|
-
response = _a.sent();
|
|
141
|
-
return [2 /*return*/, response];
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
}); },
|
|
145
|
-
pool: function () { return __awaiter(_this, void 0, void 0, function () {
|
|
146
|
-
var response;
|
|
147
|
-
return __generator(this, function (_a) {
|
|
148
|
-
switch (_a.label) {
|
|
149
|
-
case 0: return [4 /*yield*/, queryService.Pool({})];
|
|
150
|
-
case 1:
|
|
151
|
-
response = _a.sent();
|
|
152
|
-
return [2 /*return*/, response];
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
}); },
|
|
156
|
-
redelegations: function (delegatorAddress, sourceValidatorAddress, destinationValidatorAddress, paginationKey) { return __awaiter(_this, void 0, void 0, function () {
|
|
157
|
-
var response;
|
|
158
|
-
return __generator(this, function (_a) {
|
|
159
|
-
switch (_a.label) {
|
|
160
|
-
case 0: return [4 /*yield*/, queryService.Redelegations({
|
|
161
|
-
delegatorAddr: delegatorAddress,
|
|
162
|
-
srcValidatorAddr: sourceValidatorAddress,
|
|
163
|
-
dstValidatorAddr: destinationValidatorAddress,
|
|
164
|
-
pagination: queryclient_1.createPagination(paginationKey),
|
|
165
|
-
})];
|
|
166
|
-
case 1:
|
|
167
|
-
response = _a.sent();
|
|
168
|
-
return [2 /*return*/, response];
|
|
169
|
-
}
|
|
170
|
-
});
|
|
171
|
-
}); },
|
|
172
|
-
unbondingDelegation: function (delegatorAddress, validatorAddress) { return __awaiter(_this, void 0, void 0, function () {
|
|
173
|
-
var response;
|
|
174
|
-
return __generator(this, function (_a) {
|
|
175
|
-
switch (_a.label) {
|
|
176
|
-
case 0: return [4 /*yield*/, queryService.UnbondingDelegation({
|
|
177
|
-
delegatorAddr: delegatorAddress,
|
|
178
|
-
validatorAddr: validatorAddress,
|
|
179
|
-
})];
|
|
180
|
-
case 1:
|
|
181
|
-
response = _a.sent();
|
|
182
|
-
return [2 /*return*/, response];
|
|
183
|
-
}
|
|
184
|
-
});
|
|
185
|
-
}); },
|
|
186
|
-
validator: function (validatorAddress) { return __awaiter(_this, void 0, void 0, function () {
|
|
187
|
-
var response;
|
|
188
|
-
return __generator(this, function (_a) {
|
|
189
|
-
switch (_a.label) {
|
|
190
|
-
case 0: return [4 /*yield*/, queryService.Validator({ validatorAddr: validatorAddress })];
|
|
191
|
-
case 1:
|
|
192
|
-
response = _a.sent();
|
|
193
|
-
return [2 /*return*/, response];
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
}); },
|
|
197
|
-
validatorDelegations: function (validatorAddress, paginationKey) { return __awaiter(_this, void 0, void 0, function () {
|
|
198
|
-
var response;
|
|
199
|
-
return __generator(this, function (_a) {
|
|
200
|
-
switch (_a.label) {
|
|
201
|
-
case 0: return [4 /*yield*/, queryService.ValidatorDelegations({
|
|
202
|
-
validatorAddr: validatorAddress,
|
|
203
|
-
pagination: queryclient_1.createPagination(paginationKey),
|
|
204
|
-
})];
|
|
205
|
-
case 1:
|
|
206
|
-
response = _a.sent();
|
|
207
|
-
return [2 /*return*/, response];
|
|
208
|
-
}
|
|
209
|
-
});
|
|
210
|
-
}); },
|
|
211
|
-
validators: function (status, paginationKey) { return __awaiter(_this, void 0, void 0, function () {
|
|
212
|
-
var response;
|
|
213
|
-
return __generator(this, function (_a) {
|
|
214
|
-
switch (_a.label) {
|
|
215
|
-
case 0: return [4 /*yield*/, queryService.Validators({
|
|
216
|
-
status: status,
|
|
217
|
-
pagination: queryclient_1.createPagination(paginationKey),
|
|
218
|
-
})];
|
|
219
|
-
case 1:
|
|
220
|
-
response = _a.sent();
|
|
221
|
-
return [2 /*return*/, response];
|
|
222
|
-
}
|
|
223
|
-
});
|
|
224
|
-
}); },
|
|
225
|
-
validatorUnbondingDelegations: function (validatorAddress, paginationKey) { return __awaiter(_this, void 0, void 0, function () {
|
|
226
|
-
var response;
|
|
227
|
-
return __generator(this, function (_a) {
|
|
228
|
-
switch (_a.label) {
|
|
229
|
-
case 0: return [4 /*yield*/, queryService.ValidatorUnbondingDelegations({
|
|
230
|
-
validatorAddr: validatorAddress,
|
|
231
|
-
pagination: queryclient_1.createPagination(paginationKey),
|
|
232
|
-
})];
|
|
233
|
-
case 1:
|
|
234
|
-
response = _a.sent();
|
|
235
|
-
return [2 /*return*/, response];
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
}); },
|
|
239
|
-
},
|
|
240
|
-
};
|
|
241
|
-
}
|
|
242
|
-
exports.setupStakingExtension = setupStakingExtension;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Pubkey } from "@cosmjs/amino";
|
|
2
|
-
import { GetTxResponse, SimulateResponse } from "cosmjs-types/cosmos/tx/v1beta1/service";
|
|
3
|
-
import { Any } from "cosmjs-types/google/protobuf/any";
|
|
4
|
-
import { QueryClient } from "../../queryclient";
|
|
5
|
-
export interface TxExtension {
|
|
6
|
-
readonly tx: {
|
|
7
|
-
getTx: (txId: string) => Promise<GetTxResponse>;
|
|
8
|
-
simulate: (messages: readonly Any[], memo: string | undefined, signer: Pubkey, sequence: number) => Promise<SimulateResponse>;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
export declare function setupTxExtension(base: QueryClient): TxExtension;
|