@agoric/cosmic-proto 0.5.0-u19.2 → 0.5.0-u20.0
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/address-hooks.d.ts +4 -3
- package/dist/address-hooks.js +1 -217
- package/dist/address-hooks.js.map +1 -1
- package/dist/codegen/agoric/bundle.js +1 -51
- package/dist/codegen/agoric/lien/genesis.js +1 -143
- package/dist/codegen/agoric/lien/lien.js +1 -87
- package/dist/codegen/agoric/swingset/genesis.js +1 -181
- package/dist/codegen/agoric/swingset/msgs.js +1 -700
- package/dist/codegen/agoric/swingset/query.js +1 -356
- package/dist/codegen/agoric/swingset/swingset.js +1 -816
- package/dist/codegen/agoric/vbank/genesis.js +1 -82
- package/dist/codegen/agoric/vbank/msgs.js +1 -2
- package/dist/codegen/agoric/vbank/query.js +1 -222
- package/dist/codegen/agoric/vbank/vbank.js +1 -237
- package/dist/codegen/agoric/vibc/msgs.js +1 -127
- package/dist/codegen/agoric/vlocalchain/vlocalchain.js +1 -307
- package/dist/codegen/agoric/vstorage/genesis.js +1 -138
- package/dist/codegen/agoric/vstorage/query.js +1 -441
- package/dist/codegen/agoric/vstorage/vstorage.js +1 -128
- package/dist/codegen/agoric/vtransfer/genesis.js +1 -70
- package/dist/codegen/amino/amino.js +1 -2
- package/dist/codegen/amino/bundle.js +1 -6
- package/dist/codegen/binary.js +1 -367
- package/dist/codegen/circle/bundle.d.ts +0 -506
- package/dist/codegen/circle/bundle.js +1 -40
- package/dist/codegen/circle/cctp/v1/attester.js +1 -63
- package/dist/codegen/circle/cctp/v1/burn_message.js +1 -117
- package/dist/codegen/circle/cctp/v1/burning_and_minting_paused.js +1 -63
- package/dist/codegen/circle/cctp/v1/events.js +1 -1612
- package/dist/codegen/circle/cctp/v1/genesis.js +1 -295
- package/dist/codegen/circle/cctp/v1/max_message_body_size.js +1 -69
- package/dist/codegen/circle/cctp/v1/message.js +1 -160
- package/dist/codegen/circle/cctp/v1/nonce.js +1 -80
- package/dist/codegen/circle/cctp/v1/per_message_burn_limit.js +1 -73
- package/dist/codegen/circle/cctp/v1/query.js +1 -2421
- package/dist/codegen/circle/cctp/v1/remote_token_messenger.js +1 -77
- package/dist/codegen/circle/cctp/v1/sending_and_receiving_messages_paused.js +1 -63
- package/dist/codegen/circle/cctp/v1/signature_threshold.js +1 -63
- package/dist/codegen/circle/cctp/v1/token_pair.js +1 -91
- package/dist/codegen/circle/cctp/v1/tx.d.ts +0 -998
- package/dist/codegen/circle/cctp/v1/tx.js +1 -3264
- package/dist/codegen/circle/cctp/v1/tx.js.map +1 -1
- package/dist/codegen/cosmos/auth/v1beta1/auth.js +1 -337
- package/dist/codegen/cosmos/auth/v1beta1/genesis.js +1 -86
- package/dist/codegen/cosmos/auth/v1beta1/query.js +1 -1113
- package/dist/codegen/cosmos/authz/v1beta1/authz.js +1 -334
- package/dist/codegen/cosmos/authz/v1beta1/event.js +1 -161
- package/dist/codegen/cosmos/authz/v1beta1/genesis.js +1 -71
- package/dist/codegen/cosmos/authz/v1beta1/query.js +1 -506
- package/dist/codegen/cosmos/authz/v1beta1/tx.js +1 -415
- package/dist/codegen/cosmos/bank/v1beta1/authz.js +1 -71
- package/dist/codegen/cosmos/bank/v1beta1/bank.js +1 -592
- package/dist/codegen/cosmos/bank/v1beta1/genesis.js +1 -196
- package/dist/codegen/cosmos/bank/v1beta1/query.js +1 -1347
- package/dist/codegen/cosmos/bank/v1beta1/tx.js +1 -267
- package/dist/codegen/cosmos/base/abci/v1beta1/abci.js +1 -1012
- package/dist/codegen/cosmos/base/node/v1beta1/query.js +1 -112
- package/dist/codegen/cosmos/base/query/v1beta1/pagination.js +1 -189
- package/dist/codegen/cosmos/base/reflection/v2alpha1/reflection.js +1 -1755
- package/dist/codegen/cosmos/base/v1beta1/coin.js +1 -257
- package/dist/codegen/cosmos/bundle.js +1 -249
- package/dist/codegen/cosmos/crypto/ed25519/keys.js +1 -123
- package/dist/codegen/cosmos/crypto/hd/v1/hd.js +1 -109
- package/dist/codegen/cosmos/crypto/keyring/v1/record.js +1 -367
- package/dist/codegen/cosmos/crypto/multisig/keys.js +1 -82
- package/dist/codegen/cosmos/crypto/multisig/v1beta1/multisig.js +1 -144
- package/dist/codegen/cosmos/crypto/secp256k1/keys.js +1 -123
- package/dist/codegen/cosmos/crypto/secp256r1/keys.js +1 -125
- package/dist/codegen/cosmos/distribution/v1beta1/distribution.js +1 -978
- package/dist/codegen/cosmos/distribution/v1beta1/genesis.js +1 -837
- package/dist/codegen/cosmos/distribution/v1beta1/query.js +1 -1207
- package/dist/codegen/cosmos/distribution/v1beta1/tx.js +1 -512
- package/dist/codegen/cosmos/feegrant/v1beta1/feegrant.js +1 -412
- package/dist/codegen/cosmos/feegrant/v1beta1/genesis.js +1 -71
- package/dist/codegen/cosmos/feegrant/v1beta1/query.js +1 -461
- package/dist/codegen/cosmos/feegrant/v1beta1/tx.js +1 -267
- package/dist/codegen/cosmos/gov/v1/genesis.js +1 -177
- package/dist/codegen/cosmos/gov/v1/gov.js +1 -928
- package/dist/codegen/cosmos/gov/v1/query.js +1 -1216
- package/dist/codegen/cosmos/gov/v1/tx.js +1 -730
- package/dist/codegen/cosmos/gov/v1beta1/genesis.js +1 -177
- package/dist/codegen/cosmos/gov/v1beta1/gov.js +1 -1003
- package/dist/codegen/cosmos/gov/v1beta1/query.js +1 -1216
- package/dist/codegen/cosmos/gov/v1beta1/tx.js +1 -578
- package/dist/codegen/cosmos/group/v1/events.js +1 -696
- package/dist/codegen/cosmos/group/v1/genesis.js +1 -190
- package/dist/codegen/cosmos/group/v1/query.js +1 -2096
- package/dist/codegen/cosmos/group/v1/tx.js +1 -2073
- package/dist/codegen/cosmos/group/v1/types.js +1 -1387
- package/dist/codegen/cosmos/mint/v1beta1/genesis.js +1 -82
- package/dist/codegen/cosmos/mint/v1beta1/mint.js +1 -211
- package/dist/codegen/cosmos/mint/v1beta1/query.js +1 -330
- package/dist/codegen/cosmos/msg/v1/msg.js +1 -2
- package/dist/codegen/cosmos/params/v1beta1/params.js +1 -171
- package/dist/codegen/cosmos/params/v1beta1/query.js +1 -327
- package/dist/codegen/cosmos/staking/v1beta1/authz.js +1 -240
- package/dist/codegen/cosmos/staking/v1beta1/genesis.js +1 -256
- package/dist/codegen/cosmos/staking/v1beta1/query.js +1 -2069
- package/dist/codegen/cosmos/staking/v1beta1/staking.js +1 -1915
- package/dist/codegen/cosmos/staking/v1beta1/tx.js +1 -968
- package/dist/codegen/cosmos/tx/signing/v1beta1/signing.js +1 -516
- package/dist/codegen/cosmos/tx/v1beta1/service.js +1 -975
- package/dist/codegen/cosmos/tx/v1beta1/tx.js +1 -1256
- package/dist/codegen/cosmos/upgrade/v1beta1/query.js +1 -592
- package/dist/codegen/cosmos/upgrade/v1beta1/tx.js +1 -228
- package/dist/codegen/cosmos/upgrade/v1beta1/upgrade.js +1 -352
- package/dist/codegen/cosmos/vesting/v1beta1/tx.js +1 -865
- package/dist/codegen/cosmos/vesting/v1beta1/vesting.js +1 -674
- package/dist/codegen/cosmos_proto/bundle.js +1 -6
- package/dist/codegen/cosmos_proto/cosmos.js +1 -208
- package/dist/codegen/gogoproto/bundle.js +1 -6
- package/dist/codegen/gogoproto/gogo.js +1 -2
- package/dist/codegen/google/api/annotations.js +1 -2
- package/dist/codegen/google/api/http.js +1 -319
- package/dist/codegen/google/bundle.js +1 -17
- package/dist/codegen/google/protobuf/any.js +1 -77
- package/dist/codegen/google/protobuf/descriptor.js +1 -3421
- package/dist/codegen/google/protobuf/duration.js +1 -79
- package/dist/codegen/google/protobuf/empty.js +1 -50
- package/dist/codegen/google/protobuf/timestamp.js +1 -79
- package/dist/codegen/helpers.js +1 -196
- package/dist/codegen/ibc/applications/interchain_accounts/controller/v1/controller.js +1 -66
- package/dist/codegen/ibc/applications/interchain_accounts/controller/v1/query.js +1 -243
- package/dist/codegen/ibc/applications/interchain_accounts/controller/v1/tx.js +1 -314
- package/dist/codegen/ibc/applications/interchain_accounts/genesis/v1/genesis.js +1 -503
- package/dist/codegen/ibc/applications/interchain_accounts/host/v1/host.js +1 -83
- package/dist/codegen/ibc/applications/interchain_accounts/host/v1/query.js +1 -114
- package/dist/codegen/ibc/applications/interchain_accounts/v1/account.js +1 -86
- package/dist/codegen/ibc/applications/interchain_accounts/v1/metadata.js +1 -119
- package/dist/codegen/ibc/applications/interchain_accounts/v1/packet.js +1 -190
- package/dist/codegen/ibc/applications/transfer/v1/authz.js +1 -178
- package/dist/codegen/ibc/applications/transfer/v1/genesis.js +1 -96
- package/dist/codegen/ibc/applications/transfer/v1/query.js +1 -634
- package/dist/codegen/ibc/applications/transfer/v1/transfer.js +1 -147
- package/dist/codegen/ibc/applications/transfer/v1/tx.js +1 -220
- package/dist/codegen/ibc/applications/transfer/v2/packet.js +1 -103
- package/dist/codegen/ibc/bundle.js +1 -142
- package/dist/codegen/ibc/core/channel/v1/channel.js +1 -845
- package/dist/codegen/ibc/core/channel/v1/genesis.js +1 -281
- package/dist/codegen/ibc/core/channel/v1/query.js +1 -2344
- package/dist/codegen/ibc/core/channel/v1/tx.js +1 -1745
- package/dist/codegen/ibc/core/client/v1/client.js +1 -583
- package/dist/codegen/ibc/core/client/v1/genesis.js +1 -301
- package/dist/codegen/ibc/core/client/v1/query.js +1 -1283
- package/dist/codegen/ibc/core/client/v1/tx.js +1 -587
- package/dist/codegen/ibc/core/commitment/v1/commitment.js +1 -259
- package/dist/codegen/ibc/core/connection/v1/connection.js +1 -678
- package/dist/codegen/ibc/core/connection/v1/genesis.js +1 -122
- package/dist/codegen/ibc/core/connection/v1/query.js +1 -952
- package/dist/codegen/ibc/core/connection/v1/tx.js +1 -843
- package/dist/codegen/ibc/lightclients/localhost/v1/localhost.js +1 -78
- package/dist/codegen/ibc/lightclients/solomachine/v1/solomachine.js +1 -1520
- package/dist/codegen/ibc/lightclients/solomachine/v2/solomachine.js +1 -1514
- package/dist/codegen/ibc/lightclients/tendermint/v1/tendermint.js +1 -628
- package/dist/codegen/icq/bundle.js +1 -17
- package/dist/codegen/icq/v1/genesis.js +1 -78
- package/dist/codegen/icq/v1/icq.js +1 -83
- package/dist/codegen/icq/v1/packet.js +1 -270
- package/dist/codegen/icq/v1/query.js +1 -114
- package/dist/codegen/icq/v1/tx.js +1 -124
- package/dist/codegen/ics23/bundle.js +1 -6
- package/dist/codegen/index.js +1 -23
- package/dist/codegen/json-safe.js +1 -8
- package/dist/codegen/proofs.js +1 -1436
- package/dist/codegen/stride/bundle.js +1 -71
- package/dist/codegen/stride/epochs/genesis.js +1 -227
- package/dist/codegen/stride/epochs/query.js +1 -398
- package/dist/codegen/stride/records/callbacks.js +1 -136
- package/dist/codegen/stride/records/genesis.js +1 -186
- package/dist/codegen/stride/records/params.js +1 -50
- package/dist/codegen/stride/records/query.js +1 -1552
- package/dist/codegen/stride/records/records.js +1 -939
- package/dist/codegen/stride/stakedym/genesis.js +1 -312
- package/dist/codegen/stride/stakedym/query.js +1 -887
- package/dist/codegen/stride/stakedym/stakedym.js +1 -909
- package/dist/codegen/stride/stakedym/tx.js +1 -1661
- package/dist/codegen/stride/stakeibc/address_unbonding.js +1 -135
- package/dist/codegen/stride/stakeibc/callbacks.js +1 -1191
- package/dist/codegen/stride/stakeibc/epoch_tracker.js +1 -115
- package/dist/codegen/stride/stakeibc/genesis.js +1 -135
- package/dist/codegen/stride/stakeibc/gov.js +1 -212
- package/dist/codegen/stride/stakeibc/host_zone.js +1 -544
- package/dist/codegen/stride/stakeibc/ica_account.js +1 -165
- package/dist/codegen/stride/stakeibc/packet.js +1 -113
- package/dist/codegen/stride/stakeibc/params.js +1 -317
- package/dist/codegen/stride/stakeibc/query.js +1 -1372
- package/dist/codegen/stride/stakeibc/trade_route.js +1 -377
- package/dist/codegen/stride/stakeibc/tx.js +1 -3392
- package/dist/codegen/stride/stakeibc/validator.js +1 -170
- package/dist/codegen/stride/staketia/genesis.js +1 -312
- package/dist/codegen/stride/staketia/query.js +1 -887
- package/dist/codegen/stride/staketia/staketia.js +1 -819
- package/dist/codegen/stride/staketia/tx.js +1 -1671
- package/dist/codegen/tendermint/abci/types.d.ts +264 -692
- package/dist/codegen/tendermint/abci/types.js +1 -4434
- package/dist/codegen/tendermint/abci/types.js.map +1 -1
- package/dist/codegen/tendermint/bundle.d.ts +0 -272
- package/dist/codegen/tendermint/bundle.js +1 -42
- package/dist/codegen/tendermint/crypto/keys.js +1 -85
- package/dist/codegen/tendermint/crypto/proof.js +1 -409
- package/dist/codegen/tendermint/libs/bits/types.js +1 -94
- package/dist/codegen/tendermint/p2p/types.js +1 -506
- package/dist/codegen/tendermint/types/block.js +1 -119
- package/dist/codegen/tendermint/types/evidence.js +1 -415
- package/dist/codegen/tendermint/types/params.js +1 -529
- package/dist/codegen/tendermint/types/types.js +1 -1534
- package/dist/codegen/tendermint/types/validator.js +1 -299
- package/dist/codegen/tendermint/version/types.js +1 -155
- package/dist/codegen/utf8.js +1 -138
- package/dist/codegen/varint.js +1 -409
- package/dist/helpers.js +1 -22
- package/dist/index.js +1 -6
- package/package.json +12 -10
|
@@ -1,1915 +1 @@
|
|
|
1
|
-
//@ts-nocheck
|
|
2
|
-
import { Header } from '../../../tendermint/types/types.js';
|
|
3
|
-
import { Timestamp, } from '../../../google/protobuf/timestamp.js';
|
|
4
|
-
import { Any } from '../../../google/protobuf/any.js';
|
|
5
|
-
import { Duration, } from '../../../google/protobuf/duration.js';
|
|
6
|
-
import { Coin } from '../../base/v1beta1/coin.js';
|
|
7
|
-
import { BinaryReader, BinaryWriter } from '../../../binary.js';
|
|
8
|
-
import { isSet, Decimal, fromJsonTimestamp, fromTimestamp, } from '../../../helpers.js';
|
|
9
|
-
import {} from '../../../json-safe.js';
|
|
10
|
-
/** BondStatus is the status of a validator. */
|
|
11
|
-
export var BondStatus;
|
|
12
|
-
(function (BondStatus) {
|
|
13
|
-
/** BOND_STATUS_UNSPECIFIED - UNSPECIFIED defines an invalid validator status. */
|
|
14
|
-
BondStatus[BondStatus["BOND_STATUS_UNSPECIFIED"] = 0] = "BOND_STATUS_UNSPECIFIED";
|
|
15
|
-
/** BOND_STATUS_UNBONDED - UNBONDED defines a validator that is not bonded. */
|
|
16
|
-
BondStatus[BondStatus["BOND_STATUS_UNBONDED"] = 1] = "BOND_STATUS_UNBONDED";
|
|
17
|
-
/** BOND_STATUS_UNBONDING - UNBONDING defines a validator that is unbonding. */
|
|
18
|
-
BondStatus[BondStatus["BOND_STATUS_UNBONDING"] = 2] = "BOND_STATUS_UNBONDING";
|
|
19
|
-
/** BOND_STATUS_BONDED - BONDED defines a validator that is bonded. */
|
|
20
|
-
BondStatus[BondStatus["BOND_STATUS_BONDED"] = 3] = "BOND_STATUS_BONDED";
|
|
21
|
-
BondStatus[BondStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
22
|
-
})(BondStatus || (BondStatus = {}));
|
|
23
|
-
export const BondStatusSDKType = BondStatus;
|
|
24
|
-
export function bondStatusFromJSON(object) {
|
|
25
|
-
switch (object) {
|
|
26
|
-
case 0:
|
|
27
|
-
case 'BOND_STATUS_UNSPECIFIED':
|
|
28
|
-
return BondStatus.BOND_STATUS_UNSPECIFIED;
|
|
29
|
-
case 1:
|
|
30
|
-
case 'BOND_STATUS_UNBONDED':
|
|
31
|
-
return BondStatus.BOND_STATUS_UNBONDED;
|
|
32
|
-
case 2:
|
|
33
|
-
case 'BOND_STATUS_UNBONDING':
|
|
34
|
-
return BondStatus.BOND_STATUS_UNBONDING;
|
|
35
|
-
case 3:
|
|
36
|
-
case 'BOND_STATUS_BONDED':
|
|
37
|
-
return BondStatus.BOND_STATUS_BONDED;
|
|
38
|
-
case -1:
|
|
39
|
-
case 'UNRECOGNIZED':
|
|
40
|
-
default:
|
|
41
|
-
return BondStatus.UNRECOGNIZED;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
export function bondStatusToJSON(object) {
|
|
45
|
-
switch (object) {
|
|
46
|
-
case BondStatus.BOND_STATUS_UNSPECIFIED:
|
|
47
|
-
return 'BOND_STATUS_UNSPECIFIED';
|
|
48
|
-
case BondStatus.BOND_STATUS_UNBONDED:
|
|
49
|
-
return 'BOND_STATUS_UNBONDED';
|
|
50
|
-
case BondStatus.BOND_STATUS_UNBONDING:
|
|
51
|
-
return 'BOND_STATUS_UNBONDING';
|
|
52
|
-
case BondStatus.BOND_STATUS_BONDED:
|
|
53
|
-
return 'BOND_STATUS_BONDED';
|
|
54
|
-
case BondStatus.UNRECOGNIZED:
|
|
55
|
-
default:
|
|
56
|
-
return 'UNRECOGNIZED';
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
function createBaseHistoricalInfo() {
|
|
60
|
-
return {
|
|
61
|
-
header: Header.fromPartial({}),
|
|
62
|
-
valset: [],
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
export const HistoricalInfo = {
|
|
66
|
-
typeUrl: '/cosmos.staking.v1beta1.HistoricalInfo',
|
|
67
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
68
|
-
if (message.header !== undefined) {
|
|
69
|
-
Header.encode(message.header, writer.uint32(10).fork()).ldelim();
|
|
70
|
-
}
|
|
71
|
-
for (const v of message.valset) {
|
|
72
|
-
Validator.encode(v, writer.uint32(18).fork()).ldelim();
|
|
73
|
-
}
|
|
74
|
-
return writer;
|
|
75
|
-
},
|
|
76
|
-
decode(input, length) {
|
|
77
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
78
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
79
|
-
const message = createBaseHistoricalInfo();
|
|
80
|
-
while (reader.pos < end) {
|
|
81
|
-
const tag = reader.uint32();
|
|
82
|
-
switch (tag >>> 3) {
|
|
83
|
-
case 1:
|
|
84
|
-
message.header = Header.decode(reader, reader.uint32());
|
|
85
|
-
break;
|
|
86
|
-
case 2:
|
|
87
|
-
message.valset.push(Validator.decode(reader, reader.uint32()));
|
|
88
|
-
break;
|
|
89
|
-
default:
|
|
90
|
-
reader.skipType(tag & 7);
|
|
91
|
-
break;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return message;
|
|
95
|
-
},
|
|
96
|
-
fromJSON(object) {
|
|
97
|
-
return {
|
|
98
|
-
header: isSet(object.header) ? Header.fromJSON(object.header) : undefined,
|
|
99
|
-
valset: Array.isArray(object?.valset)
|
|
100
|
-
? object.valset.map((e) => Validator.fromJSON(e))
|
|
101
|
-
: [],
|
|
102
|
-
};
|
|
103
|
-
},
|
|
104
|
-
toJSON(message) {
|
|
105
|
-
const obj = {};
|
|
106
|
-
message.header !== undefined &&
|
|
107
|
-
(obj.header = message.header ? Header.toJSON(message.header) : undefined);
|
|
108
|
-
if (message.valset) {
|
|
109
|
-
obj.valset = message.valset.map(e => e ? Validator.toJSON(e) : undefined);
|
|
110
|
-
}
|
|
111
|
-
else {
|
|
112
|
-
obj.valset = [];
|
|
113
|
-
}
|
|
114
|
-
return obj;
|
|
115
|
-
},
|
|
116
|
-
fromPartial(object) {
|
|
117
|
-
const message = createBaseHistoricalInfo();
|
|
118
|
-
message.header =
|
|
119
|
-
object.header !== undefined && object.header !== null
|
|
120
|
-
? Header.fromPartial(object.header)
|
|
121
|
-
: undefined;
|
|
122
|
-
message.valset = object.valset?.map(e => Validator.fromPartial(e)) || [];
|
|
123
|
-
return message;
|
|
124
|
-
},
|
|
125
|
-
fromProtoMsg(message) {
|
|
126
|
-
return HistoricalInfo.decode(message.value);
|
|
127
|
-
},
|
|
128
|
-
toProto(message) {
|
|
129
|
-
return HistoricalInfo.encode(message).finish();
|
|
130
|
-
},
|
|
131
|
-
toProtoMsg(message) {
|
|
132
|
-
return {
|
|
133
|
-
typeUrl: '/cosmos.staking.v1beta1.HistoricalInfo',
|
|
134
|
-
value: HistoricalInfo.encode(message).finish(),
|
|
135
|
-
};
|
|
136
|
-
},
|
|
137
|
-
};
|
|
138
|
-
function createBaseCommissionRates() {
|
|
139
|
-
return {
|
|
140
|
-
rate: '',
|
|
141
|
-
maxRate: '',
|
|
142
|
-
maxChangeRate: '',
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
export const CommissionRates = {
|
|
146
|
-
typeUrl: '/cosmos.staking.v1beta1.CommissionRates',
|
|
147
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
148
|
-
if (message.rate !== '') {
|
|
149
|
-
writer.uint32(10).string(Decimal.fromUserInput(message.rate, 18).atomics);
|
|
150
|
-
}
|
|
151
|
-
if (message.maxRate !== '') {
|
|
152
|
-
writer
|
|
153
|
-
.uint32(18)
|
|
154
|
-
.string(Decimal.fromUserInput(message.maxRate, 18).atomics);
|
|
155
|
-
}
|
|
156
|
-
if (message.maxChangeRate !== '') {
|
|
157
|
-
writer
|
|
158
|
-
.uint32(26)
|
|
159
|
-
.string(Decimal.fromUserInput(message.maxChangeRate, 18).atomics);
|
|
160
|
-
}
|
|
161
|
-
return writer;
|
|
162
|
-
},
|
|
163
|
-
decode(input, length) {
|
|
164
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
165
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
166
|
-
const message = createBaseCommissionRates();
|
|
167
|
-
while (reader.pos < end) {
|
|
168
|
-
const tag = reader.uint32();
|
|
169
|
-
switch (tag >>> 3) {
|
|
170
|
-
case 1:
|
|
171
|
-
message.rate = Decimal.fromAtomics(reader.string(), 18).toString();
|
|
172
|
-
break;
|
|
173
|
-
case 2:
|
|
174
|
-
message.maxRate = Decimal.fromAtomics(reader.string(), 18).toString();
|
|
175
|
-
break;
|
|
176
|
-
case 3:
|
|
177
|
-
message.maxChangeRate = Decimal.fromAtomics(reader.string(), 18).toString();
|
|
178
|
-
break;
|
|
179
|
-
default:
|
|
180
|
-
reader.skipType(tag & 7);
|
|
181
|
-
break;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
return message;
|
|
185
|
-
},
|
|
186
|
-
fromJSON(object) {
|
|
187
|
-
return {
|
|
188
|
-
rate: isSet(object.rate) ? String(object.rate) : '',
|
|
189
|
-
maxRate: isSet(object.maxRate) ? String(object.maxRate) : '',
|
|
190
|
-
maxChangeRate: isSet(object.maxChangeRate)
|
|
191
|
-
? String(object.maxChangeRate)
|
|
192
|
-
: '',
|
|
193
|
-
};
|
|
194
|
-
},
|
|
195
|
-
toJSON(message) {
|
|
196
|
-
const obj = {};
|
|
197
|
-
message.rate !== undefined && (obj.rate = message.rate);
|
|
198
|
-
message.maxRate !== undefined && (obj.maxRate = message.maxRate);
|
|
199
|
-
message.maxChangeRate !== undefined &&
|
|
200
|
-
(obj.maxChangeRate = message.maxChangeRate);
|
|
201
|
-
return obj;
|
|
202
|
-
},
|
|
203
|
-
fromPartial(object) {
|
|
204
|
-
const message = createBaseCommissionRates();
|
|
205
|
-
message.rate = object.rate ?? '';
|
|
206
|
-
message.maxRate = object.maxRate ?? '';
|
|
207
|
-
message.maxChangeRate = object.maxChangeRate ?? '';
|
|
208
|
-
return message;
|
|
209
|
-
},
|
|
210
|
-
fromProtoMsg(message) {
|
|
211
|
-
return CommissionRates.decode(message.value);
|
|
212
|
-
},
|
|
213
|
-
toProto(message) {
|
|
214
|
-
return CommissionRates.encode(message).finish();
|
|
215
|
-
},
|
|
216
|
-
toProtoMsg(message) {
|
|
217
|
-
return {
|
|
218
|
-
typeUrl: '/cosmos.staking.v1beta1.CommissionRates',
|
|
219
|
-
value: CommissionRates.encode(message).finish(),
|
|
220
|
-
};
|
|
221
|
-
},
|
|
222
|
-
};
|
|
223
|
-
function createBaseCommission() {
|
|
224
|
-
return {
|
|
225
|
-
commissionRates: CommissionRates.fromPartial({}),
|
|
226
|
-
updateTime: Timestamp.fromPartial({}),
|
|
227
|
-
};
|
|
228
|
-
}
|
|
229
|
-
export const Commission = {
|
|
230
|
-
typeUrl: '/cosmos.staking.v1beta1.Commission',
|
|
231
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
232
|
-
if (message.commissionRates !== undefined) {
|
|
233
|
-
CommissionRates.encode(message.commissionRates, writer.uint32(10).fork()).ldelim();
|
|
234
|
-
}
|
|
235
|
-
if (message.updateTime !== undefined) {
|
|
236
|
-
Timestamp.encode(message.updateTime, writer.uint32(18).fork()).ldelim();
|
|
237
|
-
}
|
|
238
|
-
return writer;
|
|
239
|
-
},
|
|
240
|
-
decode(input, length) {
|
|
241
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
242
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
243
|
-
const message = createBaseCommission();
|
|
244
|
-
while (reader.pos < end) {
|
|
245
|
-
const tag = reader.uint32();
|
|
246
|
-
switch (tag >>> 3) {
|
|
247
|
-
case 1:
|
|
248
|
-
message.commissionRates = CommissionRates.decode(reader, reader.uint32());
|
|
249
|
-
break;
|
|
250
|
-
case 2:
|
|
251
|
-
message.updateTime = Timestamp.decode(reader, reader.uint32());
|
|
252
|
-
break;
|
|
253
|
-
default:
|
|
254
|
-
reader.skipType(tag & 7);
|
|
255
|
-
break;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
return message;
|
|
259
|
-
},
|
|
260
|
-
fromJSON(object) {
|
|
261
|
-
return {
|
|
262
|
-
commissionRates: isSet(object.commissionRates)
|
|
263
|
-
? CommissionRates.fromJSON(object.commissionRates)
|
|
264
|
-
: undefined,
|
|
265
|
-
updateTime: isSet(object.updateTime)
|
|
266
|
-
? fromJsonTimestamp(object.updateTime)
|
|
267
|
-
: undefined,
|
|
268
|
-
};
|
|
269
|
-
},
|
|
270
|
-
toJSON(message) {
|
|
271
|
-
const obj = {};
|
|
272
|
-
message.commissionRates !== undefined &&
|
|
273
|
-
(obj.commissionRates = message.commissionRates
|
|
274
|
-
? CommissionRates.toJSON(message.commissionRates)
|
|
275
|
-
: undefined);
|
|
276
|
-
message.updateTime !== undefined &&
|
|
277
|
-
(obj.updateTime = fromTimestamp(message.updateTime).toISOString());
|
|
278
|
-
return obj;
|
|
279
|
-
},
|
|
280
|
-
fromPartial(object) {
|
|
281
|
-
const message = createBaseCommission();
|
|
282
|
-
message.commissionRates =
|
|
283
|
-
object.commissionRates !== undefined && object.commissionRates !== null
|
|
284
|
-
? CommissionRates.fromPartial(object.commissionRates)
|
|
285
|
-
: undefined;
|
|
286
|
-
message.updateTime =
|
|
287
|
-
object.updateTime !== undefined && object.updateTime !== null
|
|
288
|
-
? Timestamp.fromPartial(object.updateTime)
|
|
289
|
-
: undefined;
|
|
290
|
-
return message;
|
|
291
|
-
},
|
|
292
|
-
fromProtoMsg(message) {
|
|
293
|
-
return Commission.decode(message.value);
|
|
294
|
-
},
|
|
295
|
-
toProto(message) {
|
|
296
|
-
return Commission.encode(message).finish();
|
|
297
|
-
},
|
|
298
|
-
toProtoMsg(message) {
|
|
299
|
-
return {
|
|
300
|
-
typeUrl: '/cosmos.staking.v1beta1.Commission',
|
|
301
|
-
value: Commission.encode(message).finish(),
|
|
302
|
-
};
|
|
303
|
-
},
|
|
304
|
-
};
|
|
305
|
-
function createBaseDescription() {
|
|
306
|
-
return {
|
|
307
|
-
moniker: '',
|
|
308
|
-
identity: '',
|
|
309
|
-
website: '',
|
|
310
|
-
securityContact: '',
|
|
311
|
-
details: '',
|
|
312
|
-
};
|
|
313
|
-
}
|
|
314
|
-
export const Description = {
|
|
315
|
-
typeUrl: '/cosmos.staking.v1beta1.Description',
|
|
316
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
317
|
-
if (message.moniker !== '') {
|
|
318
|
-
writer.uint32(10).string(message.moniker);
|
|
319
|
-
}
|
|
320
|
-
if (message.identity !== '') {
|
|
321
|
-
writer.uint32(18).string(message.identity);
|
|
322
|
-
}
|
|
323
|
-
if (message.website !== '') {
|
|
324
|
-
writer.uint32(26).string(message.website);
|
|
325
|
-
}
|
|
326
|
-
if (message.securityContact !== '') {
|
|
327
|
-
writer.uint32(34).string(message.securityContact);
|
|
328
|
-
}
|
|
329
|
-
if (message.details !== '') {
|
|
330
|
-
writer.uint32(42).string(message.details);
|
|
331
|
-
}
|
|
332
|
-
return writer;
|
|
333
|
-
},
|
|
334
|
-
decode(input, length) {
|
|
335
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
336
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
337
|
-
const message = createBaseDescription();
|
|
338
|
-
while (reader.pos < end) {
|
|
339
|
-
const tag = reader.uint32();
|
|
340
|
-
switch (tag >>> 3) {
|
|
341
|
-
case 1:
|
|
342
|
-
message.moniker = reader.string();
|
|
343
|
-
break;
|
|
344
|
-
case 2:
|
|
345
|
-
message.identity = reader.string();
|
|
346
|
-
break;
|
|
347
|
-
case 3:
|
|
348
|
-
message.website = reader.string();
|
|
349
|
-
break;
|
|
350
|
-
case 4:
|
|
351
|
-
message.securityContact = reader.string();
|
|
352
|
-
break;
|
|
353
|
-
case 5:
|
|
354
|
-
message.details = reader.string();
|
|
355
|
-
break;
|
|
356
|
-
default:
|
|
357
|
-
reader.skipType(tag & 7);
|
|
358
|
-
break;
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
return message;
|
|
362
|
-
},
|
|
363
|
-
fromJSON(object) {
|
|
364
|
-
return {
|
|
365
|
-
moniker: isSet(object.moniker) ? String(object.moniker) : '',
|
|
366
|
-
identity: isSet(object.identity) ? String(object.identity) : '',
|
|
367
|
-
website: isSet(object.website) ? String(object.website) : '',
|
|
368
|
-
securityContact: isSet(object.securityContact)
|
|
369
|
-
? String(object.securityContact)
|
|
370
|
-
: '',
|
|
371
|
-
details: isSet(object.details) ? String(object.details) : '',
|
|
372
|
-
};
|
|
373
|
-
},
|
|
374
|
-
toJSON(message) {
|
|
375
|
-
const obj = {};
|
|
376
|
-
message.moniker !== undefined && (obj.moniker = message.moniker);
|
|
377
|
-
message.identity !== undefined && (obj.identity = message.identity);
|
|
378
|
-
message.website !== undefined && (obj.website = message.website);
|
|
379
|
-
message.securityContact !== undefined &&
|
|
380
|
-
(obj.securityContact = message.securityContact);
|
|
381
|
-
message.details !== undefined && (obj.details = message.details);
|
|
382
|
-
return obj;
|
|
383
|
-
},
|
|
384
|
-
fromPartial(object) {
|
|
385
|
-
const message = createBaseDescription();
|
|
386
|
-
message.moniker = object.moniker ?? '';
|
|
387
|
-
message.identity = object.identity ?? '';
|
|
388
|
-
message.website = object.website ?? '';
|
|
389
|
-
message.securityContact = object.securityContact ?? '';
|
|
390
|
-
message.details = object.details ?? '';
|
|
391
|
-
return message;
|
|
392
|
-
},
|
|
393
|
-
fromProtoMsg(message) {
|
|
394
|
-
return Description.decode(message.value);
|
|
395
|
-
},
|
|
396
|
-
toProto(message) {
|
|
397
|
-
return Description.encode(message).finish();
|
|
398
|
-
},
|
|
399
|
-
toProtoMsg(message) {
|
|
400
|
-
return {
|
|
401
|
-
typeUrl: '/cosmos.staking.v1beta1.Description',
|
|
402
|
-
value: Description.encode(message).finish(),
|
|
403
|
-
};
|
|
404
|
-
},
|
|
405
|
-
};
|
|
406
|
-
function createBaseValidator() {
|
|
407
|
-
return {
|
|
408
|
-
operatorAddress: '',
|
|
409
|
-
consensusPubkey: undefined,
|
|
410
|
-
jailed: false,
|
|
411
|
-
status: 0,
|
|
412
|
-
tokens: '',
|
|
413
|
-
delegatorShares: '',
|
|
414
|
-
description: Description.fromPartial({}),
|
|
415
|
-
unbondingHeight: BigInt(0),
|
|
416
|
-
unbondingTime: Timestamp.fromPartial({}),
|
|
417
|
-
commission: Commission.fromPartial({}),
|
|
418
|
-
minSelfDelegation: '',
|
|
419
|
-
};
|
|
420
|
-
}
|
|
421
|
-
export const Validator = {
|
|
422
|
-
typeUrl: '/cosmos.staking.v1beta1.Validator',
|
|
423
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
424
|
-
if (message.operatorAddress !== '') {
|
|
425
|
-
writer.uint32(10).string(message.operatorAddress);
|
|
426
|
-
}
|
|
427
|
-
if (message.consensusPubkey !== undefined) {
|
|
428
|
-
Any.encode(message.consensusPubkey, writer.uint32(18).fork()).ldelim();
|
|
429
|
-
}
|
|
430
|
-
if (message.jailed === true) {
|
|
431
|
-
writer.uint32(24).bool(message.jailed);
|
|
432
|
-
}
|
|
433
|
-
if (message.status !== 0) {
|
|
434
|
-
writer.uint32(32).int32(message.status);
|
|
435
|
-
}
|
|
436
|
-
if (message.tokens !== '') {
|
|
437
|
-
writer.uint32(42).string(message.tokens);
|
|
438
|
-
}
|
|
439
|
-
if (message.delegatorShares !== '') {
|
|
440
|
-
writer
|
|
441
|
-
.uint32(50)
|
|
442
|
-
.string(Decimal.fromUserInput(message.delegatorShares, 18).atomics);
|
|
443
|
-
}
|
|
444
|
-
if (message.description !== undefined) {
|
|
445
|
-
Description.encode(message.description, writer.uint32(58).fork()).ldelim();
|
|
446
|
-
}
|
|
447
|
-
if (message.unbondingHeight !== BigInt(0)) {
|
|
448
|
-
writer.uint32(64).int64(message.unbondingHeight);
|
|
449
|
-
}
|
|
450
|
-
if (message.unbondingTime !== undefined) {
|
|
451
|
-
Timestamp.encode(message.unbondingTime, writer.uint32(74).fork()).ldelim();
|
|
452
|
-
}
|
|
453
|
-
if (message.commission !== undefined) {
|
|
454
|
-
Commission.encode(message.commission, writer.uint32(82).fork()).ldelim();
|
|
455
|
-
}
|
|
456
|
-
if (message.minSelfDelegation !== '') {
|
|
457
|
-
writer.uint32(90).string(message.minSelfDelegation);
|
|
458
|
-
}
|
|
459
|
-
return writer;
|
|
460
|
-
},
|
|
461
|
-
decode(input, length) {
|
|
462
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
463
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
464
|
-
const message = createBaseValidator();
|
|
465
|
-
while (reader.pos < end) {
|
|
466
|
-
const tag = reader.uint32();
|
|
467
|
-
switch (tag >>> 3) {
|
|
468
|
-
case 1:
|
|
469
|
-
message.operatorAddress = reader.string();
|
|
470
|
-
break;
|
|
471
|
-
case 2:
|
|
472
|
-
message.consensusPubkey = Cosmos_cryptoPubKey_InterfaceDecoder(reader);
|
|
473
|
-
break;
|
|
474
|
-
case 3:
|
|
475
|
-
message.jailed = reader.bool();
|
|
476
|
-
break;
|
|
477
|
-
case 4:
|
|
478
|
-
message.status = reader.int32();
|
|
479
|
-
break;
|
|
480
|
-
case 5:
|
|
481
|
-
message.tokens = reader.string();
|
|
482
|
-
break;
|
|
483
|
-
case 6:
|
|
484
|
-
message.delegatorShares = Decimal.fromAtomics(reader.string(), 18).toString();
|
|
485
|
-
break;
|
|
486
|
-
case 7:
|
|
487
|
-
message.description = Description.decode(reader, reader.uint32());
|
|
488
|
-
break;
|
|
489
|
-
case 8:
|
|
490
|
-
message.unbondingHeight = reader.int64();
|
|
491
|
-
break;
|
|
492
|
-
case 9:
|
|
493
|
-
message.unbondingTime = Timestamp.decode(reader, reader.uint32());
|
|
494
|
-
break;
|
|
495
|
-
case 10:
|
|
496
|
-
message.commission = Commission.decode(reader, reader.uint32());
|
|
497
|
-
break;
|
|
498
|
-
case 11:
|
|
499
|
-
message.minSelfDelegation = reader.string();
|
|
500
|
-
break;
|
|
501
|
-
default:
|
|
502
|
-
reader.skipType(tag & 7);
|
|
503
|
-
break;
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
return message;
|
|
507
|
-
},
|
|
508
|
-
fromJSON(object) {
|
|
509
|
-
return {
|
|
510
|
-
operatorAddress: isSet(object.operatorAddress)
|
|
511
|
-
? String(object.operatorAddress)
|
|
512
|
-
: '',
|
|
513
|
-
consensusPubkey: isSet(object.consensusPubkey)
|
|
514
|
-
? Any.fromJSON(object.consensusPubkey)
|
|
515
|
-
: undefined,
|
|
516
|
-
jailed: isSet(object.jailed) ? Boolean(object.jailed) : false,
|
|
517
|
-
status: isSet(object.status) ? bondStatusFromJSON(object.status) : -1,
|
|
518
|
-
tokens: isSet(object.tokens) ? String(object.tokens) : '',
|
|
519
|
-
delegatorShares: isSet(object.delegatorShares)
|
|
520
|
-
? String(object.delegatorShares)
|
|
521
|
-
: '',
|
|
522
|
-
description: isSet(object.description)
|
|
523
|
-
? Description.fromJSON(object.description)
|
|
524
|
-
: undefined,
|
|
525
|
-
unbondingHeight: isSet(object.unbondingHeight)
|
|
526
|
-
? BigInt(object.unbondingHeight.toString())
|
|
527
|
-
: BigInt(0),
|
|
528
|
-
unbondingTime: isSet(object.unbondingTime)
|
|
529
|
-
? fromJsonTimestamp(object.unbondingTime)
|
|
530
|
-
: undefined,
|
|
531
|
-
commission: isSet(object.commission)
|
|
532
|
-
? Commission.fromJSON(object.commission)
|
|
533
|
-
: undefined,
|
|
534
|
-
minSelfDelegation: isSet(object.minSelfDelegation)
|
|
535
|
-
? String(object.minSelfDelegation)
|
|
536
|
-
: '',
|
|
537
|
-
};
|
|
538
|
-
},
|
|
539
|
-
toJSON(message) {
|
|
540
|
-
const obj = {};
|
|
541
|
-
message.operatorAddress !== undefined &&
|
|
542
|
-
(obj.operatorAddress = message.operatorAddress);
|
|
543
|
-
message.consensusPubkey !== undefined &&
|
|
544
|
-
(obj.consensusPubkey = message.consensusPubkey
|
|
545
|
-
? Any.toJSON(message.consensusPubkey)
|
|
546
|
-
: undefined);
|
|
547
|
-
message.jailed !== undefined && (obj.jailed = message.jailed);
|
|
548
|
-
message.status !== undefined &&
|
|
549
|
-
(obj.status = bondStatusToJSON(message.status));
|
|
550
|
-
message.tokens !== undefined && (obj.tokens = message.tokens);
|
|
551
|
-
message.delegatorShares !== undefined &&
|
|
552
|
-
(obj.delegatorShares = message.delegatorShares);
|
|
553
|
-
message.description !== undefined &&
|
|
554
|
-
(obj.description = message.description
|
|
555
|
-
? Description.toJSON(message.description)
|
|
556
|
-
: undefined);
|
|
557
|
-
message.unbondingHeight !== undefined &&
|
|
558
|
-
(obj.unbondingHeight = (message.unbondingHeight || BigInt(0)).toString());
|
|
559
|
-
message.unbondingTime !== undefined &&
|
|
560
|
-
(obj.unbondingTime = fromTimestamp(message.unbondingTime).toISOString());
|
|
561
|
-
message.commission !== undefined &&
|
|
562
|
-
(obj.commission = message.commission
|
|
563
|
-
? Commission.toJSON(message.commission)
|
|
564
|
-
: undefined);
|
|
565
|
-
message.minSelfDelegation !== undefined &&
|
|
566
|
-
(obj.minSelfDelegation = message.minSelfDelegation);
|
|
567
|
-
return obj;
|
|
568
|
-
},
|
|
569
|
-
fromPartial(object) {
|
|
570
|
-
const message = createBaseValidator();
|
|
571
|
-
message.operatorAddress = object.operatorAddress ?? '';
|
|
572
|
-
message.consensusPubkey =
|
|
573
|
-
object.consensusPubkey !== undefined && object.consensusPubkey !== null
|
|
574
|
-
? Any.fromPartial(object.consensusPubkey)
|
|
575
|
-
: undefined;
|
|
576
|
-
message.jailed = object.jailed ?? false;
|
|
577
|
-
message.status = object.status ?? 0;
|
|
578
|
-
message.tokens = object.tokens ?? '';
|
|
579
|
-
message.delegatorShares = object.delegatorShares ?? '';
|
|
580
|
-
message.description =
|
|
581
|
-
object.description !== undefined && object.description !== null
|
|
582
|
-
? Description.fromPartial(object.description)
|
|
583
|
-
: undefined;
|
|
584
|
-
message.unbondingHeight =
|
|
585
|
-
object.unbondingHeight !== undefined && object.unbondingHeight !== null
|
|
586
|
-
? BigInt(object.unbondingHeight.toString())
|
|
587
|
-
: BigInt(0);
|
|
588
|
-
message.unbondingTime =
|
|
589
|
-
object.unbondingTime !== undefined && object.unbondingTime !== null
|
|
590
|
-
? Timestamp.fromPartial(object.unbondingTime)
|
|
591
|
-
: undefined;
|
|
592
|
-
message.commission =
|
|
593
|
-
object.commission !== undefined && object.commission !== null
|
|
594
|
-
? Commission.fromPartial(object.commission)
|
|
595
|
-
: undefined;
|
|
596
|
-
message.minSelfDelegation = object.minSelfDelegation ?? '';
|
|
597
|
-
return message;
|
|
598
|
-
},
|
|
599
|
-
fromProtoMsg(message) {
|
|
600
|
-
return Validator.decode(message.value);
|
|
601
|
-
},
|
|
602
|
-
toProto(message) {
|
|
603
|
-
return Validator.encode(message).finish();
|
|
604
|
-
},
|
|
605
|
-
toProtoMsg(message) {
|
|
606
|
-
return {
|
|
607
|
-
typeUrl: '/cosmos.staking.v1beta1.Validator',
|
|
608
|
-
value: Validator.encode(message).finish(),
|
|
609
|
-
};
|
|
610
|
-
},
|
|
611
|
-
};
|
|
612
|
-
function createBaseValAddresses() {
|
|
613
|
-
return {
|
|
614
|
-
addresses: [],
|
|
615
|
-
};
|
|
616
|
-
}
|
|
617
|
-
export const ValAddresses = {
|
|
618
|
-
typeUrl: '/cosmos.staking.v1beta1.ValAddresses',
|
|
619
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
620
|
-
for (const v of message.addresses) {
|
|
621
|
-
writer.uint32(10).string(v);
|
|
622
|
-
}
|
|
623
|
-
return writer;
|
|
624
|
-
},
|
|
625
|
-
decode(input, length) {
|
|
626
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
627
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
628
|
-
const message = createBaseValAddresses();
|
|
629
|
-
while (reader.pos < end) {
|
|
630
|
-
const tag = reader.uint32();
|
|
631
|
-
switch (tag >>> 3) {
|
|
632
|
-
case 1:
|
|
633
|
-
message.addresses.push(reader.string());
|
|
634
|
-
break;
|
|
635
|
-
default:
|
|
636
|
-
reader.skipType(tag & 7);
|
|
637
|
-
break;
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
return message;
|
|
641
|
-
},
|
|
642
|
-
fromJSON(object) {
|
|
643
|
-
return {
|
|
644
|
-
addresses: Array.isArray(object?.addresses)
|
|
645
|
-
? object.addresses.map((e) => String(e))
|
|
646
|
-
: [],
|
|
647
|
-
};
|
|
648
|
-
},
|
|
649
|
-
toJSON(message) {
|
|
650
|
-
const obj = {};
|
|
651
|
-
if (message.addresses) {
|
|
652
|
-
obj.addresses = message.addresses.map(e => e);
|
|
653
|
-
}
|
|
654
|
-
else {
|
|
655
|
-
obj.addresses = [];
|
|
656
|
-
}
|
|
657
|
-
return obj;
|
|
658
|
-
},
|
|
659
|
-
fromPartial(object) {
|
|
660
|
-
const message = createBaseValAddresses();
|
|
661
|
-
message.addresses = object.addresses?.map(e => e) || [];
|
|
662
|
-
return message;
|
|
663
|
-
},
|
|
664
|
-
fromProtoMsg(message) {
|
|
665
|
-
return ValAddresses.decode(message.value);
|
|
666
|
-
},
|
|
667
|
-
toProto(message) {
|
|
668
|
-
return ValAddresses.encode(message).finish();
|
|
669
|
-
},
|
|
670
|
-
toProtoMsg(message) {
|
|
671
|
-
return {
|
|
672
|
-
typeUrl: '/cosmos.staking.v1beta1.ValAddresses',
|
|
673
|
-
value: ValAddresses.encode(message).finish(),
|
|
674
|
-
};
|
|
675
|
-
},
|
|
676
|
-
};
|
|
677
|
-
function createBaseDVPair() {
|
|
678
|
-
return {
|
|
679
|
-
delegatorAddress: '',
|
|
680
|
-
validatorAddress: '',
|
|
681
|
-
};
|
|
682
|
-
}
|
|
683
|
-
export const DVPair = {
|
|
684
|
-
typeUrl: '/cosmos.staking.v1beta1.DVPair',
|
|
685
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
686
|
-
if (message.delegatorAddress !== '') {
|
|
687
|
-
writer.uint32(10).string(message.delegatorAddress);
|
|
688
|
-
}
|
|
689
|
-
if (message.validatorAddress !== '') {
|
|
690
|
-
writer.uint32(18).string(message.validatorAddress);
|
|
691
|
-
}
|
|
692
|
-
return writer;
|
|
693
|
-
},
|
|
694
|
-
decode(input, length) {
|
|
695
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
696
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
697
|
-
const message = createBaseDVPair();
|
|
698
|
-
while (reader.pos < end) {
|
|
699
|
-
const tag = reader.uint32();
|
|
700
|
-
switch (tag >>> 3) {
|
|
701
|
-
case 1:
|
|
702
|
-
message.delegatorAddress = reader.string();
|
|
703
|
-
break;
|
|
704
|
-
case 2:
|
|
705
|
-
message.validatorAddress = reader.string();
|
|
706
|
-
break;
|
|
707
|
-
default:
|
|
708
|
-
reader.skipType(tag & 7);
|
|
709
|
-
break;
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
return message;
|
|
713
|
-
},
|
|
714
|
-
fromJSON(object) {
|
|
715
|
-
return {
|
|
716
|
-
delegatorAddress: isSet(object.delegatorAddress)
|
|
717
|
-
? String(object.delegatorAddress)
|
|
718
|
-
: '',
|
|
719
|
-
validatorAddress: isSet(object.validatorAddress)
|
|
720
|
-
? String(object.validatorAddress)
|
|
721
|
-
: '',
|
|
722
|
-
};
|
|
723
|
-
},
|
|
724
|
-
toJSON(message) {
|
|
725
|
-
const obj = {};
|
|
726
|
-
message.delegatorAddress !== undefined &&
|
|
727
|
-
(obj.delegatorAddress = message.delegatorAddress);
|
|
728
|
-
message.validatorAddress !== undefined &&
|
|
729
|
-
(obj.validatorAddress = message.validatorAddress);
|
|
730
|
-
return obj;
|
|
731
|
-
},
|
|
732
|
-
fromPartial(object) {
|
|
733
|
-
const message = createBaseDVPair();
|
|
734
|
-
message.delegatorAddress = object.delegatorAddress ?? '';
|
|
735
|
-
message.validatorAddress = object.validatorAddress ?? '';
|
|
736
|
-
return message;
|
|
737
|
-
},
|
|
738
|
-
fromProtoMsg(message) {
|
|
739
|
-
return DVPair.decode(message.value);
|
|
740
|
-
},
|
|
741
|
-
toProto(message) {
|
|
742
|
-
return DVPair.encode(message).finish();
|
|
743
|
-
},
|
|
744
|
-
toProtoMsg(message) {
|
|
745
|
-
return {
|
|
746
|
-
typeUrl: '/cosmos.staking.v1beta1.DVPair',
|
|
747
|
-
value: DVPair.encode(message).finish(),
|
|
748
|
-
};
|
|
749
|
-
},
|
|
750
|
-
};
|
|
751
|
-
function createBaseDVPairs() {
|
|
752
|
-
return {
|
|
753
|
-
pairs: [],
|
|
754
|
-
};
|
|
755
|
-
}
|
|
756
|
-
export const DVPairs = {
|
|
757
|
-
typeUrl: '/cosmos.staking.v1beta1.DVPairs',
|
|
758
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
759
|
-
for (const v of message.pairs) {
|
|
760
|
-
DVPair.encode(v, writer.uint32(10).fork()).ldelim();
|
|
761
|
-
}
|
|
762
|
-
return writer;
|
|
763
|
-
},
|
|
764
|
-
decode(input, length) {
|
|
765
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
766
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
767
|
-
const message = createBaseDVPairs();
|
|
768
|
-
while (reader.pos < end) {
|
|
769
|
-
const tag = reader.uint32();
|
|
770
|
-
switch (tag >>> 3) {
|
|
771
|
-
case 1:
|
|
772
|
-
message.pairs.push(DVPair.decode(reader, reader.uint32()));
|
|
773
|
-
break;
|
|
774
|
-
default:
|
|
775
|
-
reader.skipType(tag & 7);
|
|
776
|
-
break;
|
|
777
|
-
}
|
|
778
|
-
}
|
|
779
|
-
return message;
|
|
780
|
-
},
|
|
781
|
-
fromJSON(object) {
|
|
782
|
-
return {
|
|
783
|
-
pairs: Array.isArray(object?.pairs)
|
|
784
|
-
? object.pairs.map((e) => DVPair.fromJSON(e))
|
|
785
|
-
: [],
|
|
786
|
-
};
|
|
787
|
-
},
|
|
788
|
-
toJSON(message) {
|
|
789
|
-
const obj = {};
|
|
790
|
-
if (message.pairs) {
|
|
791
|
-
obj.pairs = message.pairs.map(e => (e ? DVPair.toJSON(e) : undefined));
|
|
792
|
-
}
|
|
793
|
-
else {
|
|
794
|
-
obj.pairs = [];
|
|
795
|
-
}
|
|
796
|
-
return obj;
|
|
797
|
-
},
|
|
798
|
-
fromPartial(object) {
|
|
799
|
-
const message = createBaseDVPairs();
|
|
800
|
-
message.pairs = object.pairs?.map(e => DVPair.fromPartial(e)) || [];
|
|
801
|
-
return message;
|
|
802
|
-
},
|
|
803
|
-
fromProtoMsg(message) {
|
|
804
|
-
return DVPairs.decode(message.value);
|
|
805
|
-
},
|
|
806
|
-
toProto(message) {
|
|
807
|
-
return DVPairs.encode(message).finish();
|
|
808
|
-
},
|
|
809
|
-
toProtoMsg(message) {
|
|
810
|
-
return {
|
|
811
|
-
typeUrl: '/cosmos.staking.v1beta1.DVPairs',
|
|
812
|
-
value: DVPairs.encode(message).finish(),
|
|
813
|
-
};
|
|
814
|
-
},
|
|
815
|
-
};
|
|
816
|
-
function createBaseDVVTriplet() {
|
|
817
|
-
return {
|
|
818
|
-
delegatorAddress: '',
|
|
819
|
-
validatorSrcAddress: '',
|
|
820
|
-
validatorDstAddress: '',
|
|
821
|
-
};
|
|
822
|
-
}
|
|
823
|
-
export const DVVTriplet = {
|
|
824
|
-
typeUrl: '/cosmos.staking.v1beta1.DVVTriplet',
|
|
825
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
826
|
-
if (message.delegatorAddress !== '') {
|
|
827
|
-
writer.uint32(10).string(message.delegatorAddress);
|
|
828
|
-
}
|
|
829
|
-
if (message.validatorSrcAddress !== '') {
|
|
830
|
-
writer.uint32(18).string(message.validatorSrcAddress);
|
|
831
|
-
}
|
|
832
|
-
if (message.validatorDstAddress !== '') {
|
|
833
|
-
writer.uint32(26).string(message.validatorDstAddress);
|
|
834
|
-
}
|
|
835
|
-
return writer;
|
|
836
|
-
},
|
|
837
|
-
decode(input, length) {
|
|
838
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
839
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
840
|
-
const message = createBaseDVVTriplet();
|
|
841
|
-
while (reader.pos < end) {
|
|
842
|
-
const tag = reader.uint32();
|
|
843
|
-
switch (tag >>> 3) {
|
|
844
|
-
case 1:
|
|
845
|
-
message.delegatorAddress = reader.string();
|
|
846
|
-
break;
|
|
847
|
-
case 2:
|
|
848
|
-
message.validatorSrcAddress = reader.string();
|
|
849
|
-
break;
|
|
850
|
-
case 3:
|
|
851
|
-
message.validatorDstAddress = reader.string();
|
|
852
|
-
break;
|
|
853
|
-
default:
|
|
854
|
-
reader.skipType(tag & 7);
|
|
855
|
-
break;
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
return message;
|
|
859
|
-
},
|
|
860
|
-
fromJSON(object) {
|
|
861
|
-
return {
|
|
862
|
-
delegatorAddress: isSet(object.delegatorAddress)
|
|
863
|
-
? String(object.delegatorAddress)
|
|
864
|
-
: '',
|
|
865
|
-
validatorSrcAddress: isSet(object.validatorSrcAddress)
|
|
866
|
-
? String(object.validatorSrcAddress)
|
|
867
|
-
: '',
|
|
868
|
-
validatorDstAddress: isSet(object.validatorDstAddress)
|
|
869
|
-
? String(object.validatorDstAddress)
|
|
870
|
-
: '',
|
|
871
|
-
};
|
|
872
|
-
},
|
|
873
|
-
toJSON(message) {
|
|
874
|
-
const obj = {};
|
|
875
|
-
message.delegatorAddress !== undefined &&
|
|
876
|
-
(obj.delegatorAddress = message.delegatorAddress);
|
|
877
|
-
message.validatorSrcAddress !== undefined &&
|
|
878
|
-
(obj.validatorSrcAddress = message.validatorSrcAddress);
|
|
879
|
-
message.validatorDstAddress !== undefined &&
|
|
880
|
-
(obj.validatorDstAddress = message.validatorDstAddress);
|
|
881
|
-
return obj;
|
|
882
|
-
},
|
|
883
|
-
fromPartial(object) {
|
|
884
|
-
const message = createBaseDVVTriplet();
|
|
885
|
-
message.delegatorAddress = object.delegatorAddress ?? '';
|
|
886
|
-
message.validatorSrcAddress = object.validatorSrcAddress ?? '';
|
|
887
|
-
message.validatorDstAddress = object.validatorDstAddress ?? '';
|
|
888
|
-
return message;
|
|
889
|
-
},
|
|
890
|
-
fromProtoMsg(message) {
|
|
891
|
-
return DVVTriplet.decode(message.value);
|
|
892
|
-
},
|
|
893
|
-
toProto(message) {
|
|
894
|
-
return DVVTriplet.encode(message).finish();
|
|
895
|
-
},
|
|
896
|
-
toProtoMsg(message) {
|
|
897
|
-
return {
|
|
898
|
-
typeUrl: '/cosmos.staking.v1beta1.DVVTriplet',
|
|
899
|
-
value: DVVTriplet.encode(message).finish(),
|
|
900
|
-
};
|
|
901
|
-
},
|
|
902
|
-
};
|
|
903
|
-
function createBaseDVVTriplets() {
|
|
904
|
-
return {
|
|
905
|
-
triplets: [],
|
|
906
|
-
};
|
|
907
|
-
}
|
|
908
|
-
export const DVVTriplets = {
|
|
909
|
-
typeUrl: '/cosmos.staking.v1beta1.DVVTriplets',
|
|
910
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
911
|
-
for (const v of message.triplets) {
|
|
912
|
-
DVVTriplet.encode(v, writer.uint32(10).fork()).ldelim();
|
|
913
|
-
}
|
|
914
|
-
return writer;
|
|
915
|
-
},
|
|
916
|
-
decode(input, length) {
|
|
917
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
918
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
919
|
-
const message = createBaseDVVTriplets();
|
|
920
|
-
while (reader.pos < end) {
|
|
921
|
-
const tag = reader.uint32();
|
|
922
|
-
switch (tag >>> 3) {
|
|
923
|
-
case 1:
|
|
924
|
-
message.triplets.push(DVVTriplet.decode(reader, reader.uint32()));
|
|
925
|
-
break;
|
|
926
|
-
default:
|
|
927
|
-
reader.skipType(tag & 7);
|
|
928
|
-
break;
|
|
929
|
-
}
|
|
930
|
-
}
|
|
931
|
-
return message;
|
|
932
|
-
},
|
|
933
|
-
fromJSON(object) {
|
|
934
|
-
return {
|
|
935
|
-
triplets: Array.isArray(object?.triplets)
|
|
936
|
-
? object.triplets.map((e) => DVVTriplet.fromJSON(e))
|
|
937
|
-
: [],
|
|
938
|
-
};
|
|
939
|
-
},
|
|
940
|
-
toJSON(message) {
|
|
941
|
-
const obj = {};
|
|
942
|
-
if (message.triplets) {
|
|
943
|
-
obj.triplets = message.triplets.map(e => e ? DVVTriplet.toJSON(e) : undefined);
|
|
944
|
-
}
|
|
945
|
-
else {
|
|
946
|
-
obj.triplets = [];
|
|
947
|
-
}
|
|
948
|
-
return obj;
|
|
949
|
-
},
|
|
950
|
-
fromPartial(object) {
|
|
951
|
-
const message = createBaseDVVTriplets();
|
|
952
|
-
message.triplets =
|
|
953
|
-
object.triplets?.map(e => DVVTriplet.fromPartial(e)) || [];
|
|
954
|
-
return message;
|
|
955
|
-
},
|
|
956
|
-
fromProtoMsg(message) {
|
|
957
|
-
return DVVTriplets.decode(message.value);
|
|
958
|
-
},
|
|
959
|
-
toProto(message) {
|
|
960
|
-
return DVVTriplets.encode(message).finish();
|
|
961
|
-
},
|
|
962
|
-
toProtoMsg(message) {
|
|
963
|
-
return {
|
|
964
|
-
typeUrl: '/cosmos.staking.v1beta1.DVVTriplets',
|
|
965
|
-
value: DVVTriplets.encode(message).finish(),
|
|
966
|
-
};
|
|
967
|
-
},
|
|
968
|
-
};
|
|
969
|
-
function createBaseDelegation() {
|
|
970
|
-
return {
|
|
971
|
-
delegatorAddress: '',
|
|
972
|
-
validatorAddress: '',
|
|
973
|
-
shares: '',
|
|
974
|
-
};
|
|
975
|
-
}
|
|
976
|
-
export const Delegation = {
|
|
977
|
-
typeUrl: '/cosmos.staking.v1beta1.Delegation',
|
|
978
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
979
|
-
if (message.delegatorAddress !== '') {
|
|
980
|
-
writer.uint32(10).string(message.delegatorAddress);
|
|
981
|
-
}
|
|
982
|
-
if (message.validatorAddress !== '') {
|
|
983
|
-
writer.uint32(18).string(message.validatorAddress);
|
|
984
|
-
}
|
|
985
|
-
if (message.shares !== '') {
|
|
986
|
-
writer
|
|
987
|
-
.uint32(26)
|
|
988
|
-
.string(Decimal.fromUserInput(message.shares, 18).atomics);
|
|
989
|
-
}
|
|
990
|
-
return writer;
|
|
991
|
-
},
|
|
992
|
-
decode(input, length) {
|
|
993
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
994
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
995
|
-
const message = createBaseDelegation();
|
|
996
|
-
while (reader.pos < end) {
|
|
997
|
-
const tag = reader.uint32();
|
|
998
|
-
switch (tag >>> 3) {
|
|
999
|
-
case 1:
|
|
1000
|
-
message.delegatorAddress = reader.string();
|
|
1001
|
-
break;
|
|
1002
|
-
case 2:
|
|
1003
|
-
message.validatorAddress = reader.string();
|
|
1004
|
-
break;
|
|
1005
|
-
case 3:
|
|
1006
|
-
message.shares = Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1007
|
-
break;
|
|
1008
|
-
default:
|
|
1009
|
-
reader.skipType(tag & 7);
|
|
1010
|
-
break;
|
|
1011
|
-
}
|
|
1012
|
-
}
|
|
1013
|
-
return message;
|
|
1014
|
-
},
|
|
1015
|
-
fromJSON(object) {
|
|
1016
|
-
return {
|
|
1017
|
-
delegatorAddress: isSet(object.delegatorAddress)
|
|
1018
|
-
? String(object.delegatorAddress)
|
|
1019
|
-
: '',
|
|
1020
|
-
validatorAddress: isSet(object.validatorAddress)
|
|
1021
|
-
? String(object.validatorAddress)
|
|
1022
|
-
: '',
|
|
1023
|
-
shares: isSet(object.shares) ? String(object.shares) : '',
|
|
1024
|
-
};
|
|
1025
|
-
},
|
|
1026
|
-
toJSON(message) {
|
|
1027
|
-
const obj = {};
|
|
1028
|
-
message.delegatorAddress !== undefined &&
|
|
1029
|
-
(obj.delegatorAddress = message.delegatorAddress);
|
|
1030
|
-
message.validatorAddress !== undefined &&
|
|
1031
|
-
(obj.validatorAddress = message.validatorAddress);
|
|
1032
|
-
message.shares !== undefined && (obj.shares = message.shares);
|
|
1033
|
-
return obj;
|
|
1034
|
-
},
|
|
1035
|
-
fromPartial(object) {
|
|
1036
|
-
const message = createBaseDelegation();
|
|
1037
|
-
message.delegatorAddress = object.delegatorAddress ?? '';
|
|
1038
|
-
message.validatorAddress = object.validatorAddress ?? '';
|
|
1039
|
-
message.shares = object.shares ?? '';
|
|
1040
|
-
return message;
|
|
1041
|
-
},
|
|
1042
|
-
fromProtoMsg(message) {
|
|
1043
|
-
return Delegation.decode(message.value);
|
|
1044
|
-
},
|
|
1045
|
-
toProto(message) {
|
|
1046
|
-
return Delegation.encode(message).finish();
|
|
1047
|
-
},
|
|
1048
|
-
toProtoMsg(message) {
|
|
1049
|
-
return {
|
|
1050
|
-
typeUrl: '/cosmos.staking.v1beta1.Delegation',
|
|
1051
|
-
value: Delegation.encode(message).finish(),
|
|
1052
|
-
};
|
|
1053
|
-
},
|
|
1054
|
-
};
|
|
1055
|
-
function createBaseUnbondingDelegation() {
|
|
1056
|
-
return {
|
|
1057
|
-
delegatorAddress: '',
|
|
1058
|
-
validatorAddress: '',
|
|
1059
|
-
entries: [],
|
|
1060
|
-
};
|
|
1061
|
-
}
|
|
1062
|
-
export const UnbondingDelegation = {
|
|
1063
|
-
typeUrl: '/cosmos.staking.v1beta1.UnbondingDelegation',
|
|
1064
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
1065
|
-
if (message.delegatorAddress !== '') {
|
|
1066
|
-
writer.uint32(10).string(message.delegatorAddress);
|
|
1067
|
-
}
|
|
1068
|
-
if (message.validatorAddress !== '') {
|
|
1069
|
-
writer.uint32(18).string(message.validatorAddress);
|
|
1070
|
-
}
|
|
1071
|
-
for (const v of message.entries) {
|
|
1072
|
-
UnbondingDelegationEntry.encode(v, writer.uint32(26).fork()).ldelim();
|
|
1073
|
-
}
|
|
1074
|
-
return writer;
|
|
1075
|
-
},
|
|
1076
|
-
decode(input, length) {
|
|
1077
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1078
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1079
|
-
const message = createBaseUnbondingDelegation();
|
|
1080
|
-
while (reader.pos < end) {
|
|
1081
|
-
const tag = reader.uint32();
|
|
1082
|
-
switch (tag >>> 3) {
|
|
1083
|
-
case 1:
|
|
1084
|
-
message.delegatorAddress = reader.string();
|
|
1085
|
-
break;
|
|
1086
|
-
case 2:
|
|
1087
|
-
message.validatorAddress = reader.string();
|
|
1088
|
-
break;
|
|
1089
|
-
case 3:
|
|
1090
|
-
message.entries.push(UnbondingDelegationEntry.decode(reader, reader.uint32()));
|
|
1091
|
-
break;
|
|
1092
|
-
default:
|
|
1093
|
-
reader.skipType(tag & 7);
|
|
1094
|
-
break;
|
|
1095
|
-
}
|
|
1096
|
-
}
|
|
1097
|
-
return message;
|
|
1098
|
-
},
|
|
1099
|
-
fromJSON(object) {
|
|
1100
|
-
return {
|
|
1101
|
-
delegatorAddress: isSet(object.delegatorAddress)
|
|
1102
|
-
? String(object.delegatorAddress)
|
|
1103
|
-
: '',
|
|
1104
|
-
validatorAddress: isSet(object.validatorAddress)
|
|
1105
|
-
? String(object.validatorAddress)
|
|
1106
|
-
: '',
|
|
1107
|
-
entries: Array.isArray(object?.entries)
|
|
1108
|
-
? object.entries.map((e) => UnbondingDelegationEntry.fromJSON(e))
|
|
1109
|
-
: [],
|
|
1110
|
-
};
|
|
1111
|
-
},
|
|
1112
|
-
toJSON(message) {
|
|
1113
|
-
const obj = {};
|
|
1114
|
-
message.delegatorAddress !== undefined &&
|
|
1115
|
-
(obj.delegatorAddress = message.delegatorAddress);
|
|
1116
|
-
message.validatorAddress !== undefined &&
|
|
1117
|
-
(obj.validatorAddress = message.validatorAddress);
|
|
1118
|
-
if (message.entries) {
|
|
1119
|
-
obj.entries = message.entries.map(e => e ? UnbondingDelegationEntry.toJSON(e) : undefined);
|
|
1120
|
-
}
|
|
1121
|
-
else {
|
|
1122
|
-
obj.entries = [];
|
|
1123
|
-
}
|
|
1124
|
-
return obj;
|
|
1125
|
-
},
|
|
1126
|
-
fromPartial(object) {
|
|
1127
|
-
const message = createBaseUnbondingDelegation();
|
|
1128
|
-
message.delegatorAddress = object.delegatorAddress ?? '';
|
|
1129
|
-
message.validatorAddress = object.validatorAddress ?? '';
|
|
1130
|
-
message.entries =
|
|
1131
|
-
object.entries?.map(e => UnbondingDelegationEntry.fromPartial(e)) || [];
|
|
1132
|
-
return message;
|
|
1133
|
-
},
|
|
1134
|
-
fromProtoMsg(message) {
|
|
1135
|
-
return UnbondingDelegation.decode(message.value);
|
|
1136
|
-
},
|
|
1137
|
-
toProto(message) {
|
|
1138
|
-
return UnbondingDelegation.encode(message).finish();
|
|
1139
|
-
},
|
|
1140
|
-
toProtoMsg(message) {
|
|
1141
|
-
return {
|
|
1142
|
-
typeUrl: '/cosmos.staking.v1beta1.UnbondingDelegation',
|
|
1143
|
-
value: UnbondingDelegation.encode(message).finish(),
|
|
1144
|
-
};
|
|
1145
|
-
},
|
|
1146
|
-
};
|
|
1147
|
-
function createBaseUnbondingDelegationEntry() {
|
|
1148
|
-
return {
|
|
1149
|
-
creationHeight: BigInt(0),
|
|
1150
|
-
completionTime: Timestamp.fromPartial({}),
|
|
1151
|
-
initialBalance: '',
|
|
1152
|
-
balance: '',
|
|
1153
|
-
};
|
|
1154
|
-
}
|
|
1155
|
-
export const UnbondingDelegationEntry = {
|
|
1156
|
-
typeUrl: '/cosmos.staking.v1beta1.UnbondingDelegationEntry',
|
|
1157
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
1158
|
-
if (message.creationHeight !== BigInt(0)) {
|
|
1159
|
-
writer.uint32(8).int64(message.creationHeight);
|
|
1160
|
-
}
|
|
1161
|
-
if (message.completionTime !== undefined) {
|
|
1162
|
-
Timestamp.encode(message.completionTime, writer.uint32(18).fork()).ldelim();
|
|
1163
|
-
}
|
|
1164
|
-
if (message.initialBalance !== '') {
|
|
1165
|
-
writer.uint32(26).string(message.initialBalance);
|
|
1166
|
-
}
|
|
1167
|
-
if (message.balance !== '') {
|
|
1168
|
-
writer.uint32(34).string(message.balance);
|
|
1169
|
-
}
|
|
1170
|
-
return writer;
|
|
1171
|
-
},
|
|
1172
|
-
decode(input, length) {
|
|
1173
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1174
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1175
|
-
const message = createBaseUnbondingDelegationEntry();
|
|
1176
|
-
while (reader.pos < end) {
|
|
1177
|
-
const tag = reader.uint32();
|
|
1178
|
-
switch (tag >>> 3) {
|
|
1179
|
-
case 1:
|
|
1180
|
-
message.creationHeight = reader.int64();
|
|
1181
|
-
break;
|
|
1182
|
-
case 2:
|
|
1183
|
-
message.completionTime = Timestamp.decode(reader, reader.uint32());
|
|
1184
|
-
break;
|
|
1185
|
-
case 3:
|
|
1186
|
-
message.initialBalance = reader.string();
|
|
1187
|
-
break;
|
|
1188
|
-
case 4:
|
|
1189
|
-
message.balance = reader.string();
|
|
1190
|
-
break;
|
|
1191
|
-
default:
|
|
1192
|
-
reader.skipType(tag & 7);
|
|
1193
|
-
break;
|
|
1194
|
-
}
|
|
1195
|
-
}
|
|
1196
|
-
return message;
|
|
1197
|
-
},
|
|
1198
|
-
fromJSON(object) {
|
|
1199
|
-
return {
|
|
1200
|
-
creationHeight: isSet(object.creationHeight)
|
|
1201
|
-
? BigInt(object.creationHeight.toString())
|
|
1202
|
-
: BigInt(0),
|
|
1203
|
-
completionTime: isSet(object.completionTime)
|
|
1204
|
-
? fromJsonTimestamp(object.completionTime)
|
|
1205
|
-
: undefined,
|
|
1206
|
-
initialBalance: isSet(object.initialBalance)
|
|
1207
|
-
? String(object.initialBalance)
|
|
1208
|
-
: '',
|
|
1209
|
-
balance: isSet(object.balance) ? String(object.balance) : '',
|
|
1210
|
-
};
|
|
1211
|
-
},
|
|
1212
|
-
toJSON(message) {
|
|
1213
|
-
const obj = {};
|
|
1214
|
-
message.creationHeight !== undefined &&
|
|
1215
|
-
(obj.creationHeight = (message.creationHeight || BigInt(0)).toString());
|
|
1216
|
-
message.completionTime !== undefined &&
|
|
1217
|
-
(obj.completionTime = fromTimestamp(message.completionTime).toISOString());
|
|
1218
|
-
message.initialBalance !== undefined &&
|
|
1219
|
-
(obj.initialBalance = message.initialBalance);
|
|
1220
|
-
message.balance !== undefined && (obj.balance = message.balance);
|
|
1221
|
-
return obj;
|
|
1222
|
-
},
|
|
1223
|
-
fromPartial(object) {
|
|
1224
|
-
const message = createBaseUnbondingDelegationEntry();
|
|
1225
|
-
message.creationHeight =
|
|
1226
|
-
object.creationHeight !== undefined && object.creationHeight !== null
|
|
1227
|
-
? BigInt(object.creationHeight.toString())
|
|
1228
|
-
: BigInt(0);
|
|
1229
|
-
message.completionTime =
|
|
1230
|
-
object.completionTime !== undefined && object.completionTime !== null
|
|
1231
|
-
? Timestamp.fromPartial(object.completionTime)
|
|
1232
|
-
: undefined;
|
|
1233
|
-
message.initialBalance = object.initialBalance ?? '';
|
|
1234
|
-
message.balance = object.balance ?? '';
|
|
1235
|
-
return message;
|
|
1236
|
-
},
|
|
1237
|
-
fromProtoMsg(message) {
|
|
1238
|
-
return UnbondingDelegationEntry.decode(message.value);
|
|
1239
|
-
},
|
|
1240
|
-
toProto(message) {
|
|
1241
|
-
return UnbondingDelegationEntry.encode(message).finish();
|
|
1242
|
-
},
|
|
1243
|
-
toProtoMsg(message) {
|
|
1244
|
-
return {
|
|
1245
|
-
typeUrl: '/cosmos.staking.v1beta1.UnbondingDelegationEntry',
|
|
1246
|
-
value: UnbondingDelegationEntry.encode(message).finish(),
|
|
1247
|
-
};
|
|
1248
|
-
},
|
|
1249
|
-
};
|
|
1250
|
-
function createBaseRedelegationEntry() {
|
|
1251
|
-
return {
|
|
1252
|
-
creationHeight: BigInt(0),
|
|
1253
|
-
completionTime: Timestamp.fromPartial({}),
|
|
1254
|
-
initialBalance: '',
|
|
1255
|
-
sharesDst: '',
|
|
1256
|
-
};
|
|
1257
|
-
}
|
|
1258
|
-
export const RedelegationEntry = {
|
|
1259
|
-
typeUrl: '/cosmos.staking.v1beta1.RedelegationEntry',
|
|
1260
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
1261
|
-
if (message.creationHeight !== BigInt(0)) {
|
|
1262
|
-
writer.uint32(8).int64(message.creationHeight);
|
|
1263
|
-
}
|
|
1264
|
-
if (message.completionTime !== undefined) {
|
|
1265
|
-
Timestamp.encode(message.completionTime, writer.uint32(18).fork()).ldelim();
|
|
1266
|
-
}
|
|
1267
|
-
if (message.initialBalance !== '') {
|
|
1268
|
-
writer.uint32(26).string(message.initialBalance);
|
|
1269
|
-
}
|
|
1270
|
-
if (message.sharesDst !== '') {
|
|
1271
|
-
writer
|
|
1272
|
-
.uint32(34)
|
|
1273
|
-
.string(Decimal.fromUserInput(message.sharesDst, 18).atomics);
|
|
1274
|
-
}
|
|
1275
|
-
return writer;
|
|
1276
|
-
},
|
|
1277
|
-
decode(input, length) {
|
|
1278
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1279
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1280
|
-
const message = createBaseRedelegationEntry();
|
|
1281
|
-
while (reader.pos < end) {
|
|
1282
|
-
const tag = reader.uint32();
|
|
1283
|
-
switch (tag >>> 3) {
|
|
1284
|
-
case 1:
|
|
1285
|
-
message.creationHeight = reader.int64();
|
|
1286
|
-
break;
|
|
1287
|
-
case 2:
|
|
1288
|
-
message.completionTime = Timestamp.decode(reader, reader.uint32());
|
|
1289
|
-
break;
|
|
1290
|
-
case 3:
|
|
1291
|
-
message.initialBalance = reader.string();
|
|
1292
|
-
break;
|
|
1293
|
-
case 4:
|
|
1294
|
-
message.sharesDst = Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1295
|
-
break;
|
|
1296
|
-
default:
|
|
1297
|
-
reader.skipType(tag & 7);
|
|
1298
|
-
break;
|
|
1299
|
-
}
|
|
1300
|
-
}
|
|
1301
|
-
return message;
|
|
1302
|
-
},
|
|
1303
|
-
fromJSON(object) {
|
|
1304
|
-
return {
|
|
1305
|
-
creationHeight: isSet(object.creationHeight)
|
|
1306
|
-
? BigInt(object.creationHeight.toString())
|
|
1307
|
-
: BigInt(0),
|
|
1308
|
-
completionTime: isSet(object.completionTime)
|
|
1309
|
-
? fromJsonTimestamp(object.completionTime)
|
|
1310
|
-
: undefined,
|
|
1311
|
-
initialBalance: isSet(object.initialBalance)
|
|
1312
|
-
? String(object.initialBalance)
|
|
1313
|
-
: '',
|
|
1314
|
-
sharesDst: isSet(object.sharesDst) ? String(object.sharesDst) : '',
|
|
1315
|
-
};
|
|
1316
|
-
},
|
|
1317
|
-
toJSON(message) {
|
|
1318
|
-
const obj = {};
|
|
1319
|
-
message.creationHeight !== undefined &&
|
|
1320
|
-
(obj.creationHeight = (message.creationHeight || BigInt(0)).toString());
|
|
1321
|
-
message.completionTime !== undefined &&
|
|
1322
|
-
(obj.completionTime = fromTimestamp(message.completionTime).toISOString());
|
|
1323
|
-
message.initialBalance !== undefined &&
|
|
1324
|
-
(obj.initialBalance = message.initialBalance);
|
|
1325
|
-
message.sharesDst !== undefined && (obj.sharesDst = message.sharesDst);
|
|
1326
|
-
return obj;
|
|
1327
|
-
},
|
|
1328
|
-
fromPartial(object) {
|
|
1329
|
-
const message = createBaseRedelegationEntry();
|
|
1330
|
-
message.creationHeight =
|
|
1331
|
-
object.creationHeight !== undefined && object.creationHeight !== null
|
|
1332
|
-
? BigInt(object.creationHeight.toString())
|
|
1333
|
-
: BigInt(0);
|
|
1334
|
-
message.completionTime =
|
|
1335
|
-
object.completionTime !== undefined && object.completionTime !== null
|
|
1336
|
-
? Timestamp.fromPartial(object.completionTime)
|
|
1337
|
-
: undefined;
|
|
1338
|
-
message.initialBalance = object.initialBalance ?? '';
|
|
1339
|
-
message.sharesDst = object.sharesDst ?? '';
|
|
1340
|
-
return message;
|
|
1341
|
-
},
|
|
1342
|
-
fromProtoMsg(message) {
|
|
1343
|
-
return RedelegationEntry.decode(message.value);
|
|
1344
|
-
},
|
|
1345
|
-
toProto(message) {
|
|
1346
|
-
return RedelegationEntry.encode(message).finish();
|
|
1347
|
-
},
|
|
1348
|
-
toProtoMsg(message) {
|
|
1349
|
-
return {
|
|
1350
|
-
typeUrl: '/cosmos.staking.v1beta1.RedelegationEntry',
|
|
1351
|
-
value: RedelegationEntry.encode(message).finish(),
|
|
1352
|
-
};
|
|
1353
|
-
},
|
|
1354
|
-
};
|
|
1355
|
-
function createBaseRedelegation() {
|
|
1356
|
-
return {
|
|
1357
|
-
delegatorAddress: '',
|
|
1358
|
-
validatorSrcAddress: '',
|
|
1359
|
-
validatorDstAddress: '',
|
|
1360
|
-
entries: [],
|
|
1361
|
-
};
|
|
1362
|
-
}
|
|
1363
|
-
export const Redelegation = {
|
|
1364
|
-
typeUrl: '/cosmos.staking.v1beta1.Redelegation',
|
|
1365
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
1366
|
-
if (message.delegatorAddress !== '') {
|
|
1367
|
-
writer.uint32(10).string(message.delegatorAddress);
|
|
1368
|
-
}
|
|
1369
|
-
if (message.validatorSrcAddress !== '') {
|
|
1370
|
-
writer.uint32(18).string(message.validatorSrcAddress);
|
|
1371
|
-
}
|
|
1372
|
-
if (message.validatorDstAddress !== '') {
|
|
1373
|
-
writer.uint32(26).string(message.validatorDstAddress);
|
|
1374
|
-
}
|
|
1375
|
-
for (const v of message.entries) {
|
|
1376
|
-
RedelegationEntry.encode(v, writer.uint32(34).fork()).ldelim();
|
|
1377
|
-
}
|
|
1378
|
-
return writer;
|
|
1379
|
-
},
|
|
1380
|
-
decode(input, length) {
|
|
1381
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1382
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1383
|
-
const message = createBaseRedelegation();
|
|
1384
|
-
while (reader.pos < end) {
|
|
1385
|
-
const tag = reader.uint32();
|
|
1386
|
-
switch (tag >>> 3) {
|
|
1387
|
-
case 1:
|
|
1388
|
-
message.delegatorAddress = reader.string();
|
|
1389
|
-
break;
|
|
1390
|
-
case 2:
|
|
1391
|
-
message.validatorSrcAddress = reader.string();
|
|
1392
|
-
break;
|
|
1393
|
-
case 3:
|
|
1394
|
-
message.validatorDstAddress = reader.string();
|
|
1395
|
-
break;
|
|
1396
|
-
case 4:
|
|
1397
|
-
message.entries.push(RedelegationEntry.decode(reader, reader.uint32()));
|
|
1398
|
-
break;
|
|
1399
|
-
default:
|
|
1400
|
-
reader.skipType(tag & 7);
|
|
1401
|
-
break;
|
|
1402
|
-
}
|
|
1403
|
-
}
|
|
1404
|
-
return message;
|
|
1405
|
-
},
|
|
1406
|
-
fromJSON(object) {
|
|
1407
|
-
return {
|
|
1408
|
-
delegatorAddress: isSet(object.delegatorAddress)
|
|
1409
|
-
? String(object.delegatorAddress)
|
|
1410
|
-
: '',
|
|
1411
|
-
validatorSrcAddress: isSet(object.validatorSrcAddress)
|
|
1412
|
-
? String(object.validatorSrcAddress)
|
|
1413
|
-
: '',
|
|
1414
|
-
validatorDstAddress: isSet(object.validatorDstAddress)
|
|
1415
|
-
? String(object.validatorDstAddress)
|
|
1416
|
-
: '',
|
|
1417
|
-
entries: Array.isArray(object?.entries)
|
|
1418
|
-
? object.entries.map((e) => RedelegationEntry.fromJSON(e))
|
|
1419
|
-
: [],
|
|
1420
|
-
};
|
|
1421
|
-
},
|
|
1422
|
-
toJSON(message) {
|
|
1423
|
-
const obj = {};
|
|
1424
|
-
message.delegatorAddress !== undefined &&
|
|
1425
|
-
(obj.delegatorAddress = message.delegatorAddress);
|
|
1426
|
-
message.validatorSrcAddress !== undefined &&
|
|
1427
|
-
(obj.validatorSrcAddress = message.validatorSrcAddress);
|
|
1428
|
-
message.validatorDstAddress !== undefined &&
|
|
1429
|
-
(obj.validatorDstAddress = message.validatorDstAddress);
|
|
1430
|
-
if (message.entries) {
|
|
1431
|
-
obj.entries = message.entries.map(e => e ? RedelegationEntry.toJSON(e) : undefined);
|
|
1432
|
-
}
|
|
1433
|
-
else {
|
|
1434
|
-
obj.entries = [];
|
|
1435
|
-
}
|
|
1436
|
-
return obj;
|
|
1437
|
-
},
|
|
1438
|
-
fromPartial(object) {
|
|
1439
|
-
const message = createBaseRedelegation();
|
|
1440
|
-
message.delegatorAddress = object.delegatorAddress ?? '';
|
|
1441
|
-
message.validatorSrcAddress = object.validatorSrcAddress ?? '';
|
|
1442
|
-
message.validatorDstAddress = object.validatorDstAddress ?? '';
|
|
1443
|
-
message.entries =
|
|
1444
|
-
object.entries?.map(e => RedelegationEntry.fromPartial(e)) || [];
|
|
1445
|
-
return message;
|
|
1446
|
-
},
|
|
1447
|
-
fromProtoMsg(message) {
|
|
1448
|
-
return Redelegation.decode(message.value);
|
|
1449
|
-
},
|
|
1450
|
-
toProto(message) {
|
|
1451
|
-
return Redelegation.encode(message).finish();
|
|
1452
|
-
},
|
|
1453
|
-
toProtoMsg(message) {
|
|
1454
|
-
return {
|
|
1455
|
-
typeUrl: '/cosmos.staking.v1beta1.Redelegation',
|
|
1456
|
-
value: Redelegation.encode(message).finish(),
|
|
1457
|
-
};
|
|
1458
|
-
},
|
|
1459
|
-
};
|
|
1460
|
-
function createBaseParams() {
|
|
1461
|
-
return {
|
|
1462
|
-
unbondingTime: Duration.fromPartial({}),
|
|
1463
|
-
maxValidators: 0,
|
|
1464
|
-
maxEntries: 0,
|
|
1465
|
-
historicalEntries: 0,
|
|
1466
|
-
bondDenom: '',
|
|
1467
|
-
minCommissionRate: '',
|
|
1468
|
-
};
|
|
1469
|
-
}
|
|
1470
|
-
export const Params = {
|
|
1471
|
-
typeUrl: '/cosmos.staking.v1beta1.Params',
|
|
1472
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
1473
|
-
if (message.unbondingTime !== undefined) {
|
|
1474
|
-
Duration.encode(message.unbondingTime, writer.uint32(10).fork()).ldelim();
|
|
1475
|
-
}
|
|
1476
|
-
if (message.maxValidators !== 0) {
|
|
1477
|
-
writer.uint32(16).uint32(message.maxValidators);
|
|
1478
|
-
}
|
|
1479
|
-
if (message.maxEntries !== 0) {
|
|
1480
|
-
writer.uint32(24).uint32(message.maxEntries);
|
|
1481
|
-
}
|
|
1482
|
-
if (message.historicalEntries !== 0) {
|
|
1483
|
-
writer.uint32(32).uint32(message.historicalEntries);
|
|
1484
|
-
}
|
|
1485
|
-
if (message.bondDenom !== '') {
|
|
1486
|
-
writer.uint32(42).string(message.bondDenom);
|
|
1487
|
-
}
|
|
1488
|
-
if (message.minCommissionRate !== '') {
|
|
1489
|
-
writer
|
|
1490
|
-
.uint32(50)
|
|
1491
|
-
.string(Decimal.fromUserInput(message.minCommissionRate, 18).atomics);
|
|
1492
|
-
}
|
|
1493
|
-
return writer;
|
|
1494
|
-
},
|
|
1495
|
-
decode(input, length) {
|
|
1496
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1497
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1498
|
-
const message = createBaseParams();
|
|
1499
|
-
while (reader.pos < end) {
|
|
1500
|
-
const tag = reader.uint32();
|
|
1501
|
-
switch (tag >>> 3) {
|
|
1502
|
-
case 1:
|
|
1503
|
-
message.unbondingTime = Duration.decode(reader, reader.uint32());
|
|
1504
|
-
break;
|
|
1505
|
-
case 2:
|
|
1506
|
-
message.maxValidators = reader.uint32();
|
|
1507
|
-
break;
|
|
1508
|
-
case 3:
|
|
1509
|
-
message.maxEntries = reader.uint32();
|
|
1510
|
-
break;
|
|
1511
|
-
case 4:
|
|
1512
|
-
message.historicalEntries = reader.uint32();
|
|
1513
|
-
break;
|
|
1514
|
-
case 5:
|
|
1515
|
-
message.bondDenom = reader.string();
|
|
1516
|
-
break;
|
|
1517
|
-
case 6:
|
|
1518
|
-
message.minCommissionRate = Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1519
|
-
break;
|
|
1520
|
-
default:
|
|
1521
|
-
reader.skipType(tag & 7);
|
|
1522
|
-
break;
|
|
1523
|
-
}
|
|
1524
|
-
}
|
|
1525
|
-
return message;
|
|
1526
|
-
},
|
|
1527
|
-
fromJSON(object) {
|
|
1528
|
-
return {
|
|
1529
|
-
unbondingTime: isSet(object.unbondingTime)
|
|
1530
|
-
? Duration.fromJSON(object.unbondingTime)
|
|
1531
|
-
: undefined,
|
|
1532
|
-
maxValidators: isSet(object.maxValidators)
|
|
1533
|
-
? Number(object.maxValidators)
|
|
1534
|
-
: 0,
|
|
1535
|
-
maxEntries: isSet(object.maxEntries) ? Number(object.maxEntries) : 0,
|
|
1536
|
-
historicalEntries: isSet(object.historicalEntries)
|
|
1537
|
-
? Number(object.historicalEntries)
|
|
1538
|
-
: 0,
|
|
1539
|
-
bondDenom: isSet(object.bondDenom) ? String(object.bondDenom) : '',
|
|
1540
|
-
minCommissionRate: isSet(object.minCommissionRate)
|
|
1541
|
-
? String(object.minCommissionRate)
|
|
1542
|
-
: '',
|
|
1543
|
-
};
|
|
1544
|
-
},
|
|
1545
|
-
toJSON(message) {
|
|
1546
|
-
const obj = {};
|
|
1547
|
-
message.unbondingTime !== undefined &&
|
|
1548
|
-
(obj.unbondingTime = message.unbondingTime
|
|
1549
|
-
? Duration.toJSON(message.unbondingTime)
|
|
1550
|
-
: undefined);
|
|
1551
|
-
message.maxValidators !== undefined &&
|
|
1552
|
-
(obj.maxValidators = Math.round(message.maxValidators));
|
|
1553
|
-
message.maxEntries !== undefined &&
|
|
1554
|
-
(obj.maxEntries = Math.round(message.maxEntries));
|
|
1555
|
-
message.historicalEntries !== undefined &&
|
|
1556
|
-
(obj.historicalEntries = Math.round(message.historicalEntries));
|
|
1557
|
-
message.bondDenom !== undefined && (obj.bondDenom = message.bondDenom);
|
|
1558
|
-
message.minCommissionRate !== undefined &&
|
|
1559
|
-
(obj.minCommissionRate = message.minCommissionRate);
|
|
1560
|
-
return obj;
|
|
1561
|
-
},
|
|
1562
|
-
fromPartial(object) {
|
|
1563
|
-
const message = createBaseParams();
|
|
1564
|
-
message.unbondingTime =
|
|
1565
|
-
object.unbondingTime !== undefined && object.unbondingTime !== null
|
|
1566
|
-
? Duration.fromPartial(object.unbondingTime)
|
|
1567
|
-
: undefined;
|
|
1568
|
-
message.maxValidators = object.maxValidators ?? 0;
|
|
1569
|
-
message.maxEntries = object.maxEntries ?? 0;
|
|
1570
|
-
message.historicalEntries = object.historicalEntries ?? 0;
|
|
1571
|
-
message.bondDenom = object.bondDenom ?? '';
|
|
1572
|
-
message.minCommissionRate = object.minCommissionRate ?? '';
|
|
1573
|
-
return message;
|
|
1574
|
-
},
|
|
1575
|
-
fromProtoMsg(message) {
|
|
1576
|
-
return Params.decode(message.value);
|
|
1577
|
-
},
|
|
1578
|
-
toProto(message) {
|
|
1579
|
-
return Params.encode(message).finish();
|
|
1580
|
-
},
|
|
1581
|
-
toProtoMsg(message) {
|
|
1582
|
-
return {
|
|
1583
|
-
typeUrl: '/cosmos.staking.v1beta1.Params',
|
|
1584
|
-
value: Params.encode(message).finish(),
|
|
1585
|
-
};
|
|
1586
|
-
},
|
|
1587
|
-
};
|
|
1588
|
-
function createBaseDelegationResponse() {
|
|
1589
|
-
return {
|
|
1590
|
-
delegation: Delegation.fromPartial({}),
|
|
1591
|
-
balance: Coin.fromPartial({}),
|
|
1592
|
-
};
|
|
1593
|
-
}
|
|
1594
|
-
export const DelegationResponse = {
|
|
1595
|
-
typeUrl: '/cosmos.staking.v1beta1.DelegationResponse',
|
|
1596
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
1597
|
-
if (message.delegation !== undefined) {
|
|
1598
|
-
Delegation.encode(message.delegation, writer.uint32(10).fork()).ldelim();
|
|
1599
|
-
}
|
|
1600
|
-
if (message.balance !== undefined) {
|
|
1601
|
-
Coin.encode(message.balance, writer.uint32(18).fork()).ldelim();
|
|
1602
|
-
}
|
|
1603
|
-
return writer;
|
|
1604
|
-
},
|
|
1605
|
-
decode(input, length) {
|
|
1606
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1607
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1608
|
-
const message = createBaseDelegationResponse();
|
|
1609
|
-
while (reader.pos < end) {
|
|
1610
|
-
const tag = reader.uint32();
|
|
1611
|
-
switch (tag >>> 3) {
|
|
1612
|
-
case 1:
|
|
1613
|
-
message.delegation = Delegation.decode(reader, reader.uint32());
|
|
1614
|
-
break;
|
|
1615
|
-
case 2:
|
|
1616
|
-
message.balance = Coin.decode(reader, reader.uint32());
|
|
1617
|
-
break;
|
|
1618
|
-
default:
|
|
1619
|
-
reader.skipType(tag & 7);
|
|
1620
|
-
break;
|
|
1621
|
-
}
|
|
1622
|
-
}
|
|
1623
|
-
return message;
|
|
1624
|
-
},
|
|
1625
|
-
fromJSON(object) {
|
|
1626
|
-
return {
|
|
1627
|
-
delegation: isSet(object.delegation)
|
|
1628
|
-
? Delegation.fromJSON(object.delegation)
|
|
1629
|
-
: undefined,
|
|
1630
|
-
balance: isSet(object.balance)
|
|
1631
|
-
? Coin.fromJSON(object.balance)
|
|
1632
|
-
: undefined,
|
|
1633
|
-
};
|
|
1634
|
-
},
|
|
1635
|
-
toJSON(message) {
|
|
1636
|
-
const obj = {};
|
|
1637
|
-
message.delegation !== undefined &&
|
|
1638
|
-
(obj.delegation = message.delegation
|
|
1639
|
-
? Delegation.toJSON(message.delegation)
|
|
1640
|
-
: undefined);
|
|
1641
|
-
message.balance !== undefined &&
|
|
1642
|
-
(obj.balance = message.balance
|
|
1643
|
-
? Coin.toJSON(message.balance)
|
|
1644
|
-
: undefined);
|
|
1645
|
-
return obj;
|
|
1646
|
-
},
|
|
1647
|
-
fromPartial(object) {
|
|
1648
|
-
const message = createBaseDelegationResponse();
|
|
1649
|
-
message.delegation =
|
|
1650
|
-
object.delegation !== undefined && object.delegation !== null
|
|
1651
|
-
? Delegation.fromPartial(object.delegation)
|
|
1652
|
-
: undefined;
|
|
1653
|
-
message.balance =
|
|
1654
|
-
object.balance !== undefined && object.balance !== null
|
|
1655
|
-
? Coin.fromPartial(object.balance)
|
|
1656
|
-
: undefined;
|
|
1657
|
-
return message;
|
|
1658
|
-
},
|
|
1659
|
-
fromProtoMsg(message) {
|
|
1660
|
-
return DelegationResponse.decode(message.value);
|
|
1661
|
-
},
|
|
1662
|
-
toProto(message) {
|
|
1663
|
-
return DelegationResponse.encode(message).finish();
|
|
1664
|
-
},
|
|
1665
|
-
toProtoMsg(message) {
|
|
1666
|
-
return {
|
|
1667
|
-
typeUrl: '/cosmos.staking.v1beta1.DelegationResponse',
|
|
1668
|
-
value: DelegationResponse.encode(message).finish(),
|
|
1669
|
-
};
|
|
1670
|
-
},
|
|
1671
|
-
};
|
|
1672
|
-
function createBaseRedelegationEntryResponse() {
|
|
1673
|
-
return {
|
|
1674
|
-
redelegationEntry: RedelegationEntry.fromPartial({}),
|
|
1675
|
-
balance: '',
|
|
1676
|
-
};
|
|
1677
|
-
}
|
|
1678
|
-
export const RedelegationEntryResponse = {
|
|
1679
|
-
typeUrl: '/cosmos.staking.v1beta1.RedelegationEntryResponse',
|
|
1680
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
1681
|
-
if (message.redelegationEntry !== undefined) {
|
|
1682
|
-
RedelegationEntry.encode(message.redelegationEntry, writer.uint32(10).fork()).ldelim();
|
|
1683
|
-
}
|
|
1684
|
-
if (message.balance !== '') {
|
|
1685
|
-
writer.uint32(34).string(message.balance);
|
|
1686
|
-
}
|
|
1687
|
-
return writer;
|
|
1688
|
-
},
|
|
1689
|
-
decode(input, length) {
|
|
1690
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1691
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1692
|
-
const message = createBaseRedelegationEntryResponse();
|
|
1693
|
-
while (reader.pos < end) {
|
|
1694
|
-
const tag = reader.uint32();
|
|
1695
|
-
switch (tag >>> 3) {
|
|
1696
|
-
case 1:
|
|
1697
|
-
message.redelegationEntry = RedelegationEntry.decode(reader, reader.uint32());
|
|
1698
|
-
break;
|
|
1699
|
-
case 4:
|
|
1700
|
-
message.balance = reader.string();
|
|
1701
|
-
break;
|
|
1702
|
-
default:
|
|
1703
|
-
reader.skipType(tag & 7);
|
|
1704
|
-
break;
|
|
1705
|
-
}
|
|
1706
|
-
}
|
|
1707
|
-
return message;
|
|
1708
|
-
},
|
|
1709
|
-
fromJSON(object) {
|
|
1710
|
-
return {
|
|
1711
|
-
redelegationEntry: isSet(object.redelegationEntry)
|
|
1712
|
-
? RedelegationEntry.fromJSON(object.redelegationEntry)
|
|
1713
|
-
: undefined,
|
|
1714
|
-
balance: isSet(object.balance) ? String(object.balance) : '',
|
|
1715
|
-
};
|
|
1716
|
-
},
|
|
1717
|
-
toJSON(message) {
|
|
1718
|
-
const obj = {};
|
|
1719
|
-
message.redelegationEntry !== undefined &&
|
|
1720
|
-
(obj.redelegationEntry = message.redelegationEntry
|
|
1721
|
-
? RedelegationEntry.toJSON(message.redelegationEntry)
|
|
1722
|
-
: undefined);
|
|
1723
|
-
message.balance !== undefined && (obj.balance = message.balance);
|
|
1724
|
-
return obj;
|
|
1725
|
-
},
|
|
1726
|
-
fromPartial(object) {
|
|
1727
|
-
const message = createBaseRedelegationEntryResponse();
|
|
1728
|
-
message.redelegationEntry =
|
|
1729
|
-
object.redelegationEntry !== undefined &&
|
|
1730
|
-
object.redelegationEntry !== null
|
|
1731
|
-
? RedelegationEntry.fromPartial(object.redelegationEntry)
|
|
1732
|
-
: undefined;
|
|
1733
|
-
message.balance = object.balance ?? '';
|
|
1734
|
-
return message;
|
|
1735
|
-
},
|
|
1736
|
-
fromProtoMsg(message) {
|
|
1737
|
-
return RedelegationEntryResponse.decode(message.value);
|
|
1738
|
-
},
|
|
1739
|
-
toProto(message) {
|
|
1740
|
-
return RedelegationEntryResponse.encode(message).finish();
|
|
1741
|
-
},
|
|
1742
|
-
toProtoMsg(message) {
|
|
1743
|
-
return {
|
|
1744
|
-
typeUrl: '/cosmos.staking.v1beta1.RedelegationEntryResponse',
|
|
1745
|
-
value: RedelegationEntryResponse.encode(message).finish(),
|
|
1746
|
-
};
|
|
1747
|
-
},
|
|
1748
|
-
};
|
|
1749
|
-
function createBaseRedelegationResponse() {
|
|
1750
|
-
return {
|
|
1751
|
-
redelegation: Redelegation.fromPartial({}),
|
|
1752
|
-
entries: [],
|
|
1753
|
-
};
|
|
1754
|
-
}
|
|
1755
|
-
export const RedelegationResponse = {
|
|
1756
|
-
typeUrl: '/cosmos.staking.v1beta1.RedelegationResponse',
|
|
1757
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
1758
|
-
if (message.redelegation !== undefined) {
|
|
1759
|
-
Redelegation.encode(message.redelegation, writer.uint32(10).fork()).ldelim();
|
|
1760
|
-
}
|
|
1761
|
-
for (const v of message.entries) {
|
|
1762
|
-
RedelegationEntryResponse.encode(v, writer.uint32(18).fork()).ldelim();
|
|
1763
|
-
}
|
|
1764
|
-
return writer;
|
|
1765
|
-
},
|
|
1766
|
-
decode(input, length) {
|
|
1767
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1768
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1769
|
-
const message = createBaseRedelegationResponse();
|
|
1770
|
-
while (reader.pos < end) {
|
|
1771
|
-
const tag = reader.uint32();
|
|
1772
|
-
switch (tag >>> 3) {
|
|
1773
|
-
case 1:
|
|
1774
|
-
message.redelegation = Redelegation.decode(reader, reader.uint32());
|
|
1775
|
-
break;
|
|
1776
|
-
case 2:
|
|
1777
|
-
message.entries.push(RedelegationEntryResponse.decode(reader, reader.uint32()));
|
|
1778
|
-
break;
|
|
1779
|
-
default:
|
|
1780
|
-
reader.skipType(tag & 7);
|
|
1781
|
-
break;
|
|
1782
|
-
}
|
|
1783
|
-
}
|
|
1784
|
-
return message;
|
|
1785
|
-
},
|
|
1786
|
-
fromJSON(object) {
|
|
1787
|
-
return {
|
|
1788
|
-
redelegation: isSet(object.redelegation)
|
|
1789
|
-
? Redelegation.fromJSON(object.redelegation)
|
|
1790
|
-
: undefined,
|
|
1791
|
-
entries: Array.isArray(object?.entries)
|
|
1792
|
-
? object.entries.map((e) => RedelegationEntryResponse.fromJSON(e))
|
|
1793
|
-
: [],
|
|
1794
|
-
};
|
|
1795
|
-
},
|
|
1796
|
-
toJSON(message) {
|
|
1797
|
-
const obj = {};
|
|
1798
|
-
message.redelegation !== undefined &&
|
|
1799
|
-
(obj.redelegation = message.redelegation
|
|
1800
|
-
? Redelegation.toJSON(message.redelegation)
|
|
1801
|
-
: undefined);
|
|
1802
|
-
if (message.entries) {
|
|
1803
|
-
obj.entries = message.entries.map(e => e ? RedelegationEntryResponse.toJSON(e) : undefined);
|
|
1804
|
-
}
|
|
1805
|
-
else {
|
|
1806
|
-
obj.entries = [];
|
|
1807
|
-
}
|
|
1808
|
-
return obj;
|
|
1809
|
-
},
|
|
1810
|
-
fromPartial(object) {
|
|
1811
|
-
const message = createBaseRedelegationResponse();
|
|
1812
|
-
message.redelegation =
|
|
1813
|
-
object.redelegation !== undefined && object.redelegation !== null
|
|
1814
|
-
? Redelegation.fromPartial(object.redelegation)
|
|
1815
|
-
: undefined;
|
|
1816
|
-
message.entries =
|
|
1817
|
-
object.entries?.map(e => RedelegationEntryResponse.fromPartial(e)) || [];
|
|
1818
|
-
return message;
|
|
1819
|
-
},
|
|
1820
|
-
fromProtoMsg(message) {
|
|
1821
|
-
return RedelegationResponse.decode(message.value);
|
|
1822
|
-
},
|
|
1823
|
-
toProto(message) {
|
|
1824
|
-
return RedelegationResponse.encode(message).finish();
|
|
1825
|
-
},
|
|
1826
|
-
toProtoMsg(message) {
|
|
1827
|
-
return {
|
|
1828
|
-
typeUrl: '/cosmos.staking.v1beta1.RedelegationResponse',
|
|
1829
|
-
value: RedelegationResponse.encode(message).finish(),
|
|
1830
|
-
};
|
|
1831
|
-
},
|
|
1832
|
-
};
|
|
1833
|
-
function createBasePool() {
|
|
1834
|
-
return {
|
|
1835
|
-
notBondedTokens: '',
|
|
1836
|
-
bondedTokens: '',
|
|
1837
|
-
};
|
|
1838
|
-
}
|
|
1839
|
-
export const Pool = {
|
|
1840
|
-
typeUrl: '/cosmos.staking.v1beta1.Pool',
|
|
1841
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
1842
|
-
if (message.notBondedTokens !== '') {
|
|
1843
|
-
writer.uint32(10).string(message.notBondedTokens);
|
|
1844
|
-
}
|
|
1845
|
-
if (message.bondedTokens !== '') {
|
|
1846
|
-
writer.uint32(18).string(message.bondedTokens);
|
|
1847
|
-
}
|
|
1848
|
-
return writer;
|
|
1849
|
-
},
|
|
1850
|
-
decode(input, length) {
|
|
1851
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1852
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1853
|
-
const message = createBasePool();
|
|
1854
|
-
while (reader.pos < end) {
|
|
1855
|
-
const tag = reader.uint32();
|
|
1856
|
-
switch (tag >>> 3) {
|
|
1857
|
-
case 1:
|
|
1858
|
-
message.notBondedTokens = reader.string();
|
|
1859
|
-
break;
|
|
1860
|
-
case 2:
|
|
1861
|
-
message.bondedTokens = reader.string();
|
|
1862
|
-
break;
|
|
1863
|
-
default:
|
|
1864
|
-
reader.skipType(tag & 7);
|
|
1865
|
-
break;
|
|
1866
|
-
}
|
|
1867
|
-
}
|
|
1868
|
-
return message;
|
|
1869
|
-
},
|
|
1870
|
-
fromJSON(object) {
|
|
1871
|
-
return {
|
|
1872
|
-
notBondedTokens: isSet(object.notBondedTokens)
|
|
1873
|
-
? String(object.notBondedTokens)
|
|
1874
|
-
: '',
|
|
1875
|
-
bondedTokens: isSet(object.bondedTokens)
|
|
1876
|
-
? String(object.bondedTokens)
|
|
1877
|
-
: '',
|
|
1878
|
-
};
|
|
1879
|
-
},
|
|
1880
|
-
toJSON(message) {
|
|
1881
|
-
const obj = {};
|
|
1882
|
-
message.notBondedTokens !== undefined &&
|
|
1883
|
-
(obj.notBondedTokens = message.notBondedTokens);
|
|
1884
|
-
message.bondedTokens !== undefined &&
|
|
1885
|
-
(obj.bondedTokens = message.bondedTokens);
|
|
1886
|
-
return obj;
|
|
1887
|
-
},
|
|
1888
|
-
fromPartial(object) {
|
|
1889
|
-
const message = createBasePool();
|
|
1890
|
-
message.notBondedTokens = object.notBondedTokens ?? '';
|
|
1891
|
-
message.bondedTokens = object.bondedTokens ?? '';
|
|
1892
|
-
return message;
|
|
1893
|
-
},
|
|
1894
|
-
fromProtoMsg(message) {
|
|
1895
|
-
return Pool.decode(message.value);
|
|
1896
|
-
},
|
|
1897
|
-
toProto(message) {
|
|
1898
|
-
return Pool.encode(message).finish();
|
|
1899
|
-
},
|
|
1900
|
-
toProtoMsg(message) {
|
|
1901
|
-
return {
|
|
1902
|
-
typeUrl: '/cosmos.staking.v1beta1.Pool',
|
|
1903
|
-
value: Pool.encode(message).finish(),
|
|
1904
|
-
};
|
|
1905
|
-
},
|
|
1906
|
-
};
|
|
1907
|
-
export const Cosmos_cryptoPubKey_InterfaceDecoder = (input) => {
|
|
1908
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1909
|
-
const data = Any.decode(reader, reader.uint32());
|
|
1910
|
-
switch (data.typeUrl) {
|
|
1911
|
-
default:
|
|
1912
|
-
return data;
|
|
1913
|
-
}
|
|
1914
|
-
};
|
|
1915
|
-
//# sourceMappingURL=staking.js.map
|
|
1
|
+
import{Header as e}from"../../../tendermint/types/types.js";import{Timestamp as t}from"../../../google/protobuf/timestamp.js";import{Any as o}from"../../../google/protobuf/any.js";import{Duration as i}from"../../../google/protobuf/duration.js";import{Coin as n}from"../../base/v1beta1/coin.js";import{BinaryReader as s,BinaryWriter as r}from"../../../binary.js";import{isSet as a,Decimal as d,fromJsonTimestamp as l,fromTimestamp as c}from"../../../helpers.js";import{}from"../../../json-safe.js";export var BondStatus;!function(e){e[e.BOND_STATUS_UNSPECIFIED=0]="BOND_STATUS_UNSPECIFIED",e[e.BOND_STATUS_UNBONDED=1]="BOND_STATUS_UNBONDED",e[e.BOND_STATUS_UNBONDING=2]="BOND_STATUS_UNBONDING",e[e.BOND_STATUS_BONDED=3]="BOND_STATUS_BONDED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(BondStatus||(BondStatus={}));export const BondStatusSDKType=BondStatus;export function bondStatusFromJSON(e){switch(e){case 0:case"BOND_STATUS_UNSPECIFIED":return BondStatus.BOND_STATUS_UNSPECIFIED;case 1:case"BOND_STATUS_UNBONDED":return BondStatus.BOND_STATUS_UNBONDED;case 2:case"BOND_STATUS_UNBONDING":return BondStatus.BOND_STATUS_UNBONDING;case 3:case"BOND_STATUS_BONDED":return BondStatus.BOND_STATUS_BONDED;default:return BondStatus.UNRECOGNIZED}}export function bondStatusToJSON(e){switch(e){case BondStatus.BOND_STATUS_UNSPECIFIED:return"BOND_STATUS_UNSPECIFIED";case BondStatus.BOND_STATUS_UNBONDED:return"BOND_STATUS_UNBONDED";case BondStatus.BOND_STATUS_UNBONDING:return"BOND_STATUS_UNBONDING";case BondStatus.BOND_STATUS_BONDED:return"BOND_STATUS_BONDED";case BondStatus.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function m(){return{header:e.fromPartial({}),valset:[]}}export const HistoricalInfo={typeUrl:"/cosmos.staking.v1beta1.HistoricalInfo",encode(t,o=r.create()){void 0!==t.header&&e.encode(t.header,o.uint32(10).fork()).ldelim();for(const e of t.valset)Validator.encode(e,o.uint32(18).fork()).ldelim();return o},decode(t,o){const i=t instanceof s?t:new s(t);let n=void 0===o?i.len:i.pos+o;const r=m();for(;i.pos<n;){const t=i.uint32();switch(t>>>3){case 1:r.header=e.decode(i,i.uint32());break;case 2:r.valset.push(Validator.decode(i,i.uint32()));break;default:i.skipType(7&t)}}return r},fromJSON:t=>({header:a(t.header)?e.fromJSON(t.header):void 0,valset:Array.isArray(t?.valset)?t.valset.map((e=>Validator.fromJSON(e))):[]}),toJSON(t){const o={};return void 0!==t.header&&(o.header=t.header?e.toJSON(t.header):void 0),t.valset?o.valset=t.valset.map((e=>e?Validator.toJSON(e):void 0)):o.valset=[],o},fromPartial(t){const o=m();return o.header=void 0!==t.header&&null!==t.header?e.fromPartial(t.header):void 0,o.valset=t.valset?.map((e=>Validator.fromPartial(e)))||[],o},fromProtoMsg:e=>HistoricalInfo.decode(e.value),toProto:e=>HistoricalInfo.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/cosmos.staking.v1beta1.HistoricalInfo",value:HistoricalInfo.encode(e).finish()})};export const CommissionRates={typeUrl:"/cosmos.staking.v1beta1.CommissionRates",encode:(e,t=r.create())=>(""!==e.rate&&t.uint32(10).string(d.fromUserInput(e.rate,18).atomics),""!==e.maxRate&&t.uint32(18).string(d.fromUserInput(e.maxRate,18).atomics),""!==e.maxChangeRate&&t.uint32(26).string(d.fromUserInput(e.maxChangeRate,18).atomics),t),decode(e,t){const o=e instanceof s?e:new s(e);let i=void 0===t?o.len:o.pos+t;const n={rate:"",maxRate:"",maxChangeRate:""};for(;o.pos<i;){const e=o.uint32();switch(e>>>3){case 1:n.rate=d.fromAtomics(o.string(),18).toString();break;case 2:n.maxRate=d.fromAtomics(o.string(),18).toString();break;case 3:n.maxChangeRate=d.fromAtomics(o.string(),18).toString();break;default:o.skipType(7&e)}}return n},fromJSON:e=>({rate:a(e.rate)?String(e.rate):"",maxRate:a(e.maxRate)?String(e.maxRate):"",maxChangeRate:a(e.maxChangeRate)?String(e.maxChangeRate):""}),toJSON(e){const t={};return void 0!==e.rate&&(t.rate=e.rate),void 0!==e.maxRate&&(t.maxRate=e.maxRate),void 0!==e.maxChangeRate&&(t.maxChangeRate=e.maxChangeRate),t},fromPartial(e){const t={rate:"",maxRate:"",maxChangeRate:""};return t.rate=e.rate??"",t.maxRate=e.maxRate??"",t.maxChangeRate=e.maxChangeRate??"",t},fromProtoMsg:e=>CommissionRates.decode(e.value),toProto:e=>CommissionRates.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/cosmos.staking.v1beta1.CommissionRates",value:CommissionRates.encode(e).finish()})};function g(){return{commissionRates:CommissionRates.fromPartial({}),updateTime:t.fromPartial({})}}export const Commission={typeUrl:"/cosmos.staking.v1beta1.Commission",encode:(e,o=r.create())=>(void 0!==e.commissionRates&&CommissionRates.encode(e.commissionRates,o.uint32(10).fork()).ldelim(),void 0!==e.updateTime&&t.encode(e.updateTime,o.uint32(18).fork()).ldelim(),o),decode(e,o){const i=e instanceof s?e:new s(e);let n=void 0===o?i.len:i.pos+o;const r=g();for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:r.commissionRates=CommissionRates.decode(i,i.uint32());break;case 2:r.updateTime=t.decode(i,i.uint32());break;default:i.skipType(7&e)}}return r},fromJSON:e=>({commissionRates:a(e.commissionRates)?CommissionRates.fromJSON(e.commissionRates):void 0,updateTime:a(e.updateTime)?l(e.updateTime):void 0}),toJSON(e){const t={};return void 0!==e.commissionRates&&(t.commissionRates=e.commissionRates?CommissionRates.toJSON(e.commissionRates):void 0),void 0!==e.updateTime&&(t.updateTime=c(e.updateTime).toISOString()),t},fromPartial(e){const o=g();return o.commissionRates=void 0!==e.commissionRates&&null!==e.commissionRates?CommissionRates.fromPartial(e.commissionRates):void 0,o.updateTime=void 0!==e.updateTime&&null!==e.updateTime?t.fromPartial(e.updateTime):void 0,o},fromProtoMsg:e=>Commission.decode(e.value),toProto:e=>Commission.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/cosmos.staking.v1beta1.Commission",value:Commission.encode(e).finish()})};export const Description={typeUrl:"/cosmos.staking.v1beta1.Description",encode:(e,t=r.create())=>(""!==e.moniker&&t.uint32(10).string(e.moniker),""!==e.identity&&t.uint32(18).string(e.identity),""!==e.website&&t.uint32(26).string(e.website),""!==e.securityContact&&t.uint32(34).string(e.securityContact),""!==e.details&&t.uint32(42).string(e.details),t),decode(e,t){const o=e instanceof s?e:new s(e);let i=void 0===t?o.len:o.pos+t;const n={moniker:"",identity:"",website:"",securityContact:"",details:""};for(;o.pos<i;){const e=o.uint32();switch(e>>>3){case 1:n.moniker=o.string();break;case 2:n.identity=o.string();break;case 3:n.website=o.string();break;case 4:n.securityContact=o.string();break;case 5:n.details=o.string();break;default:o.skipType(7&e)}}return n},fromJSON:e=>({moniker:a(e.moniker)?String(e.moniker):"",identity:a(e.identity)?String(e.identity):"",website:a(e.website)?String(e.website):"",securityContact:a(e.securityContact)?String(e.securityContact):"",details:a(e.details)?String(e.details):""}),toJSON(e){const t={};return void 0!==e.moniker&&(t.moniker=e.moniker),void 0!==e.identity&&(t.identity=e.identity),void 0!==e.website&&(t.website=e.website),void 0!==e.securityContact&&(t.securityContact=e.securityContact),void 0!==e.details&&(t.details=e.details),t},fromPartial(e){const t={moniker:"",identity:"",website:"",securityContact:"",details:""};return t.moniker=e.moniker??"",t.identity=e.identity??"",t.website=e.website??"",t.securityContact=e.securityContact??"",t.details=e.details??"",t},fromProtoMsg:e=>Description.decode(e.value),toProto:e=>Description.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/cosmos.staking.v1beta1.Description",value:Description.encode(e).finish()})};function u(){return{operatorAddress:"",consensusPubkey:void 0,jailed:!1,status:0,tokens:"",delegatorShares:"",description:Description.fromPartial({}),unbondingHeight:BigInt(0),unbondingTime:t.fromPartial({}),commission:Commission.fromPartial({}),minSelfDelegation:""}}export const Validator={typeUrl:"/cosmos.staking.v1beta1.Validator",encode:(e,i=r.create())=>(""!==e.operatorAddress&&i.uint32(10).string(e.operatorAddress),void 0!==e.consensusPubkey&&o.encode(e.consensusPubkey,i.uint32(18).fork()).ldelim(),!0===e.jailed&&i.uint32(24).bool(e.jailed),0!==e.status&&i.uint32(32).int32(e.status),""!==e.tokens&&i.uint32(42).string(e.tokens),""!==e.delegatorShares&&i.uint32(50).string(d.fromUserInput(e.delegatorShares,18).atomics),void 0!==e.description&&Description.encode(e.description,i.uint32(58).fork()).ldelim(),e.unbondingHeight!==BigInt(0)&&i.uint32(64).int64(e.unbondingHeight),void 0!==e.unbondingTime&&t.encode(e.unbondingTime,i.uint32(74).fork()).ldelim(),void 0!==e.commission&&Commission.encode(e.commission,i.uint32(82).fork()).ldelim(),""!==e.minSelfDelegation&&i.uint32(90).string(e.minSelfDelegation),i),decode(e,o){const i=e instanceof s?e:new s(e);let n=void 0===o?i.len:i.pos+o;const r=u();for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:r.operatorAddress=i.string();break;case 2:r.consensusPubkey=Cosmos_cryptoPubKey_InterfaceDecoder(i);break;case 3:r.jailed=i.bool();break;case 4:r.status=i.int32();break;case 5:r.tokens=i.string();break;case 6:r.delegatorShares=d.fromAtomics(i.string(),18).toString();break;case 7:r.description=Description.decode(i,i.uint32());break;case 8:r.unbondingHeight=i.int64();break;case 9:r.unbondingTime=t.decode(i,i.uint32());break;case 10:r.commission=Commission.decode(i,i.uint32());break;case 11:r.minSelfDelegation=i.string();break;default:i.skipType(7&e)}}return r},fromJSON:e=>({operatorAddress:a(e.operatorAddress)?String(e.operatorAddress):"",consensusPubkey:a(e.consensusPubkey)?o.fromJSON(e.consensusPubkey):void 0,jailed:!!a(e.jailed)&&Boolean(e.jailed),status:a(e.status)?bondStatusFromJSON(e.status):-1,tokens:a(e.tokens)?String(e.tokens):"",delegatorShares:a(e.delegatorShares)?String(e.delegatorShares):"",description:a(e.description)?Description.fromJSON(e.description):void 0,unbondingHeight:a(e.unbondingHeight)?BigInt(e.unbondingHeight.toString()):BigInt(0),unbondingTime:a(e.unbondingTime)?l(e.unbondingTime):void 0,commission:a(e.commission)?Commission.fromJSON(e.commission):void 0,minSelfDelegation:a(e.minSelfDelegation)?String(e.minSelfDelegation):""}),toJSON(e){const t={};return void 0!==e.operatorAddress&&(t.operatorAddress=e.operatorAddress),void 0!==e.consensusPubkey&&(t.consensusPubkey=e.consensusPubkey?o.toJSON(e.consensusPubkey):void 0),void 0!==e.jailed&&(t.jailed=e.jailed),void 0!==e.status&&(t.status=bondStatusToJSON(e.status)),void 0!==e.tokens&&(t.tokens=e.tokens),void 0!==e.delegatorShares&&(t.delegatorShares=e.delegatorShares),void 0!==e.description&&(t.description=e.description?Description.toJSON(e.description):void 0),void 0!==e.unbondingHeight&&(t.unbondingHeight=(e.unbondingHeight||BigInt(0)).toString()),void 0!==e.unbondingTime&&(t.unbondingTime=c(e.unbondingTime).toISOString()),void 0!==e.commission&&(t.commission=e.commission?Commission.toJSON(e.commission):void 0),void 0!==e.minSelfDelegation&&(t.minSelfDelegation=e.minSelfDelegation),t},fromPartial(e){const i=u();return i.operatorAddress=e.operatorAddress??"",i.consensusPubkey=void 0!==e.consensusPubkey&&null!==e.consensusPubkey?o.fromPartial(e.consensusPubkey):void 0,i.jailed=e.jailed??!1,i.status=e.status??0,i.tokens=e.tokens??"",i.delegatorShares=e.delegatorShares??"",i.description=void 0!==e.description&&null!==e.description?Description.fromPartial(e.description):void 0,i.unbondingHeight=void 0!==e.unbondingHeight&&null!==e.unbondingHeight?BigInt(e.unbondingHeight.toString()):BigInt(0),i.unbondingTime=void 0!==e.unbondingTime&&null!==e.unbondingTime?t.fromPartial(e.unbondingTime):void 0,i.commission=void 0!==e.commission&&null!==e.commission?Commission.fromPartial(e.commission):void 0,i.minSelfDelegation=e.minSelfDelegation??"",i},fromProtoMsg:e=>Validator.decode(e.value),toProto:e=>Validator.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/cosmos.staking.v1beta1.Validator",value:Validator.encode(e).finish()})};export const ValAddresses={typeUrl:"/cosmos.staking.v1beta1.ValAddresses",encode(e,t=r.create()){for(const o of e.addresses)t.uint32(10).string(o);return t},decode(e,t){const o=e instanceof s?e:new s(e);let i=void 0===t?o.len:o.pos+t;const n={addresses:[]};for(;o.pos<i;){const e=o.uint32();if(e>>>3==1)n.addresses.push(o.string());else o.skipType(7&e)}return n},fromJSON:e=>({addresses:Array.isArray(e?.addresses)?e.addresses.map((e=>String(e))):[]}),toJSON(e){const t={};return e.addresses?t.addresses=e.addresses.map((e=>e)):t.addresses=[],t},fromPartial(e){const t={addresses:[]};return t.addresses=e.addresses?.map((e=>e))||[],t},fromProtoMsg:e=>ValAddresses.decode(e.value),toProto:e=>ValAddresses.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/cosmos.staking.v1beta1.ValAddresses",value:ValAddresses.encode(e).finish()})};export const DVPair={typeUrl:"/cosmos.staking.v1beta1.DVPair",encode:(e,t=r.create())=>(""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),t),decode(e,t){const o=e instanceof s?e:new s(e);let i=void 0===t?o.len:o.pos+t;const n={delegatorAddress:"",validatorAddress:""};for(;o.pos<i;){const e=o.uint32();switch(e>>>3){case 1:n.delegatorAddress=o.string();break;case 2:n.validatorAddress=o.string();break;default:o.skipType(7&e)}}return n},fromJSON:e=>({delegatorAddress:a(e.delegatorAddress)?String(e.delegatorAddress):"",validatorAddress:a(e.validatorAddress)?String(e.validatorAddress):""}),toJSON(e){const t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){const t={delegatorAddress:"",validatorAddress:""};return t.delegatorAddress=e.delegatorAddress??"",t.validatorAddress=e.validatorAddress??"",t},fromProtoMsg:e=>DVPair.decode(e.value),toProto:e=>DVPair.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/cosmos.staking.v1beta1.DVPair",value:DVPair.encode(e).finish()})};export const DVPairs={typeUrl:"/cosmos.staking.v1beta1.DVPairs",encode(e,t=r.create()){for(const o of e.pairs)DVPair.encode(o,t.uint32(10).fork()).ldelim();return t},decode(e,t){const o=e instanceof s?e:new s(e);let i=void 0===t?o.len:o.pos+t;const n={pairs:[]};for(;o.pos<i;){const e=o.uint32();if(e>>>3==1)n.pairs.push(DVPair.decode(o,o.uint32()));else o.skipType(7&e)}return n},fromJSON:e=>({pairs:Array.isArray(e?.pairs)?e.pairs.map((e=>DVPair.fromJSON(e))):[]}),toJSON(e){const t={};return e.pairs?t.pairs=e.pairs.map((e=>e?DVPair.toJSON(e):void 0)):t.pairs=[],t},fromPartial(e){const t={pairs:[]};return t.pairs=e.pairs?.map((e=>DVPair.fromPartial(e)))||[],t},fromProtoMsg:e=>DVPairs.decode(e.value),toProto:e=>DVPairs.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/cosmos.staking.v1beta1.DVPairs",value:DVPairs.encode(e).finish()})};export const DVVTriplet={typeUrl:"/cosmos.staking.v1beta1.DVVTriplet",encode:(e,t=r.create())=>(""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorSrcAddress&&t.uint32(18).string(e.validatorSrcAddress),""!==e.validatorDstAddress&&t.uint32(26).string(e.validatorDstAddress),t),decode(e,t){const o=e instanceof s?e:new s(e);let i=void 0===t?o.len:o.pos+t;const n={delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:""};for(;o.pos<i;){const e=o.uint32();switch(e>>>3){case 1:n.delegatorAddress=o.string();break;case 2:n.validatorSrcAddress=o.string();break;case 3:n.validatorDstAddress=o.string();break;default:o.skipType(7&e)}}return n},fromJSON:e=>({delegatorAddress:a(e.delegatorAddress)?String(e.delegatorAddress):"",validatorSrcAddress:a(e.validatorSrcAddress)?String(e.validatorSrcAddress):"",validatorDstAddress:a(e.validatorDstAddress)?String(e.validatorDstAddress):""}),toJSON(e){const t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorSrcAddress&&(t.validatorSrcAddress=e.validatorSrcAddress),void 0!==e.validatorDstAddress&&(t.validatorDstAddress=e.validatorDstAddress),t},fromPartial(e){const t={delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:""};return t.delegatorAddress=e.delegatorAddress??"",t.validatorSrcAddress=e.validatorSrcAddress??"",t.validatorDstAddress=e.validatorDstAddress??"",t},fromProtoMsg:e=>DVVTriplet.decode(e.value),toProto:e=>DVVTriplet.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/cosmos.staking.v1beta1.DVVTriplet",value:DVVTriplet.encode(e).finish()})};export const DVVTriplets={typeUrl:"/cosmos.staking.v1beta1.DVVTriplets",encode(e,t=r.create()){for(const o of e.triplets)DVVTriplet.encode(o,t.uint32(10).fork()).ldelim();return t},decode(e,t){const o=e instanceof s?e:new s(e);let i=void 0===t?o.len:o.pos+t;const n={triplets:[]};for(;o.pos<i;){const e=o.uint32();if(e>>>3==1)n.triplets.push(DVVTriplet.decode(o,o.uint32()));else o.skipType(7&e)}return n},fromJSON:e=>({triplets:Array.isArray(e?.triplets)?e.triplets.map((e=>DVVTriplet.fromJSON(e))):[]}),toJSON(e){const t={};return e.triplets?t.triplets=e.triplets.map((e=>e?DVVTriplet.toJSON(e):void 0)):t.triplets=[],t},fromPartial(e){const t={triplets:[]};return t.triplets=e.triplets?.map((e=>DVVTriplet.fromPartial(e)))||[],t},fromProtoMsg:e=>DVVTriplets.decode(e.value),toProto:e=>DVVTriplets.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/cosmos.staking.v1beta1.DVVTriplets",value:DVVTriplets.encode(e).finish()})};export const Delegation={typeUrl:"/cosmos.staking.v1beta1.Delegation",encode:(e,t=r.create())=>(""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),""!==e.shares&&t.uint32(26).string(d.fromUserInput(e.shares,18).atomics),t),decode(e,t){const o=e instanceof s?e:new s(e);let i=void 0===t?o.len:o.pos+t;const n={delegatorAddress:"",validatorAddress:"",shares:""};for(;o.pos<i;){const e=o.uint32();switch(e>>>3){case 1:n.delegatorAddress=o.string();break;case 2:n.validatorAddress=o.string();break;case 3:n.shares=d.fromAtomics(o.string(),18).toString();break;default:o.skipType(7&e)}}return n},fromJSON:e=>({delegatorAddress:a(e.delegatorAddress)?String(e.delegatorAddress):"",validatorAddress:a(e.validatorAddress)?String(e.validatorAddress):"",shares:a(e.shares)?String(e.shares):""}),toJSON(e){const t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.shares&&(t.shares=e.shares),t},fromPartial(e){const t={delegatorAddress:"",validatorAddress:"",shares:""};return t.delegatorAddress=e.delegatorAddress??"",t.validatorAddress=e.validatorAddress??"",t.shares=e.shares??"",t},fromProtoMsg:e=>Delegation.decode(e.value),toProto:e=>Delegation.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/cosmos.staking.v1beta1.Delegation",value:Delegation.encode(e).finish()})};export const UnbondingDelegation={typeUrl:"/cosmos.staking.v1beta1.UnbondingDelegation",encode(e,t=r.create()){""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress);for(const o of e.entries)UnbondingDelegationEntry.encode(o,t.uint32(26).fork()).ldelim();return t},decode(e,t){const o=e instanceof s?e:new s(e);let i=void 0===t?o.len:o.pos+t;const n={delegatorAddress:"",validatorAddress:"",entries:[]};for(;o.pos<i;){const e=o.uint32();switch(e>>>3){case 1:n.delegatorAddress=o.string();break;case 2:n.validatorAddress=o.string();break;case 3:n.entries.push(UnbondingDelegationEntry.decode(o,o.uint32()));break;default:o.skipType(7&e)}}return n},fromJSON:e=>({delegatorAddress:a(e.delegatorAddress)?String(e.delegatorAddress):"",validatorAddress:a(e.validatorAddress)?String(e.validatorAddress):"",entries:Array.isArray(e?.entries)?e.entries.map((e=>UnbondingDelegationEntry.fromJSON(e))):[]}),toJSON(e){const t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),e.entries?t.entries=e.entries.map((e=>e?UnbondingDelegationEntry.toJSON(e):void 0)):t.entries=[],t},fromPartial(e){const t={delegatorAddress:"",validatorAddress:"",entries:[]};return t.delegatorAddress=e.delegatorAddress??"",t.validatorAddress=e.validatorAddress??"",t.entries=e.entries?.map((e=>UnbondingDelegationEntry.fromPartial(e)))||[],t},fromProtoMsg:e=>UnbondingDelegation.decode(e.value),toProto:e=>UnbondingDelegation.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/cosmos.staking.v1beta1.UnbondingDelegation",value:UnbondingDelegation.encode(e).finish()})};function p(){return{creationHeight:BigInt(0),completionTime:t.fromPartial({}),initialBalance:"",balance:""}}export const UnbondingDelegationEntry={typeUrl:"/cosmos.staking.v1beta1.UnbondingDelegationEntry",encode:(e,o=r.create())=>(e.creationHeight!==BigInt(0)&&o.uint32(8).int64(e.creationHeight),void 0!==e.completionTime&&t.encode(e.completionTime,o.uint32(18).fork()).ldelim(),""!==e.initialBalance&&o.uint32(26).string(e.initialBalance),""!==e.balance&&o.uint32(34).string(e.balance),o),decode(e,o){const i=e instanceof s?e:new s(e);let n=void 0===o?i.len:i.pos+o;const r=p();for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:r.creationHeight=i.int64();break;case 2:r.completionTime=t.decode(i,i.uint32());break;case 3:r.initialBalance=i.string();break;case 4:r.balance=i.string();break;default:i.skipType(7&e)}}return r},fromJSON:e=>({creationHeight:a(e.creationHeight)?BigInt(e.creationHeight.toString()):BigInt(0),completionTime:a(e.completionTime)?l(e.completionTime):void 0,initialBalance:a(e.initialBalance)?String(e.initialBalance):"",balance:a(e.balance)?String(e.balance):""}),toJSON(e){const t={};return void 0!==e.creationHeight&&(t.creationHeight=(e.creationHeight||BigInt(0)).toString()),void 0!==e.completionTime&&(t.completionTime=c(e.completionTime).toISOString()),void 0!==e.initialBalance&&(t.initialBalance=e.initialBalance),void 0!==e.balance&&(t.balance=e.balance),t},fromPartial(e){const o=p();return o.creationHeight=void 0!==e.creationHeight&&null!==e.creationHeight?BigInt(e.creationHeight.toString()):BigInt(0),o.completionTime=void 0!==e.completionTime&&null!==e.completionTime?t.fromPartial(e.completionTime):void 0,o.initialBalance=e.initialBalance??"",o.balance=e.balance??"",o},fromProtoMsg:e=>UnbondingDelegationEntry.decode(e.value),toProto:e=>UnbondingDelegationEntry.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/cosmos.staking.v1beta1.UnbondingDelegationEntry",value:UnbondingDelegationEntry.encode(e).finish()})};function v(){return{creationHeight:BigInt(0),completionTime:t.fromPartial({}),initialBalance:"",sharesDst:""}}export const RedelegationEntry={typeUrl:"/cosmos.staking.v1beta1.RedelegationEntry",encode:(e,o=r.create())=>(e.creationHeight!==BigInt(0)&&o.uint32(8).int64(e.creationHeight),void 0!==e.completionTime&&t.encode(e.completionTime,o.uint32(18).fork()).ldelim(),""!==e.initialBalance&&o.uint32(26).string(e.initialBalance),""!==e.sharesDst&&o.uint32(34).string(d.fromUserInput(e.sharesDst,18).atomics),o),decode(e,o){const i=e instanceof s?e:new s(e);let n=void 0===o?i.len:i.pos+o;const r=v();for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:r.creationHeight=i.int64();break;case 2:r.completionTime=t.decode(i,i.uint32());break;case 3:r.initialBalance=i.string();break;case 4:r.sharesDst=d.fromAtomics(i.string(),18).toString();break;default:i.skipType(7&e)}}return r},fromJSON:e=>({creationHeight:a(e.creationHeight)?BigInt(e.creationHeight.toString()):BigInt(0),completionTime:a(e.completionTime)?l(e.completionTime):void 0,initialBalance:a(e.initialBalance)?String(e.initialBalance):"",sharesDst:a(e.sharesDst)?String(e.sharesDst):""}),toJSON(e){const t={};return void 0!==e.creationHeight&&(t.creationHeight=(e.creationHeight||BigInt(0)).toString()),void 0!==e.completionTime&&(t.completionTime=c(e.completionTime).toISOString()),void 0!==e.initialBalance&&(t.initialBalance=e.initialBalance),void 0!==e.sharesDst&&(t.sharesDst=e.sharesDst),t},fromPartial(e){const o=v();return o.creationHeight=void 0!==e.creationHeight&&null!==e.creationHeight?BigInt(e.creationHeight.toString()):BigInt(0),o.completionTime=void 0!==e.completionTime&&null!==e.completionTime?t.fromPartial(e.completionTime):void 0,o.initialBalance=e.initialBalance??"",o.sharesDst=e.sharesDst??"",o},fromProtoMsg:e=>RedelegationEntry.decode(e.value),toProto:e=>RedelegationEntry.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/cosmos.staking.v1beta1.RedelegationEntry",value:RedelegationEntry.encode(e).finish()})};export const Redelegation={typeUrl:"/cosmos.staking.v1beta1.Redelegation",encode(e,t=r.create()){""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorSrcAddress&&t.uint32(18).string(e.validatorSrcAddress),""!==e.validatorDstAddress&&t.uint32(26).string(e.validatorDstAddress);for(const o of e.entries)RedelegationEntry.encode(o,t.uint32(34).fork()).ldelim();return t},decode(e,t){const o=e instanceof s?e:new s(e);let i=void 0===t?o.len:o.pos+t;const n={delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:"",entries:[]};for(;o.pos<i;){const e=o.uint32();switch(e>>>3){case 1:n.delegatorAddress=o.string();break;case 2:n.validatorSrcAddress=o.string();break;case 3:n.validatorDstAddress=o.string();break;case 4:n.entries.push(RedelegationEntry.decode(o,o.uint32()));break;default:o.skipType(7&e)}}return n},fromJSON:e=>({delegatorAddress:a(e.delegatorAddress)?String(e.delegatorAddress):"",validatorSrcAddress:a(e.validatorSrcAddress)?String(e.validatorSrcAddress):"",validatorDstAddress:a(e.validatorDstAddress)?String(e.validatorDstAddress):"",entries:Array.isArray(e?.entries)?e.entries.map((e=>RedelegationEntry.fromJSON(e))):[]}),toJSON(e){const t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorSrcAddress&&(t.validatorSrcAddress=e.validatorSrcAddress),void 0!==e.validatorDstAddress&&(t.validatorDstAddress=e.validatorDstAddress),e.entries?t.entries=e.entries.map((e=>e?RedelegationEntry.toJSON(e):void 0)):t.entries=[],t},fromPartial(e){const t={delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:"",entries:[]};return t.delegatorAddress=e.delegatorAddress??"",t.validatorSrcAddress=e.validatorSrcAddress??"",t.validatorDstAddress=e.validatorDstAddress??"",t.entries=e.entries?.map((e=>RedelegationEntry.fromPartial(e)))||[],t},fromProtoMsg:e=>Redelegation.decode(e.value),toProto:e=>Redelegation.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/cosmos.staking.v1beta1.Redelegation",value:Redelegation.encode(e).finish()})};function f(){return{unbondingTime:i.fromPartial({}),maxValidators:0,maxEntries:0,historicalEntries:0,bondDenom:"",minCommissionRate:""}}export const Params={typeUrl:"/cosmos.staking.v1beta1.Params",encode:(e,t=r.create())=>(void 0!==e.unbondingTime&&i.encode(e.unbondingTime,t.uint32(10).fork()).ldelim(),0!==e.maxValidators&&t.uint32(16).uint32(e.maxValidators),0!==e.maxEntries&&t.uint32(24).uint32(e.maxEntries),0!==e.historicalEntries&&t.uint32(32).uint32(e.historicalEntries),""!==e.bondDenom&&t.uint32(42).string(e.bondDenom),""!==e.minCommissionRate&&t.uint32(50).string(d.fromUserInput(e.minCommissionRate,18).atomics),t),decode(e,t){const o=e instanceof s?e:new s(e);let n=void 0===t?o.len:o.pos+t;const r=f();for(;o.pos<n;){const e=o.uint32();switch(e>>>3){case 1:r.unbondingTime=i.decode(o,o.uint32());break;case 2:r.maxValidators=o.uint32();break;case 3:r.maxEntries=o.uint32();break;case 4:r.historicalEntries=o.uint32();break;case 5:r.bondDenom=o.string();break;case 6:r.minCommissionRate=d.fromAtomics(o.string(),18).toString();break;default:o.skipType(7&e)}}return r},fromJSON:e=>({unbondingTime:a(e.unbondingTime)?i.fromJSON(e.unbondingTime):void 0,maxValidators:a(e.maxValidators)?Number(e.maxValidators):0,maxEntries:a(e.maxEntries)?Number(e.maxEntries):0,historicalEntries:a(e.historicalEntries)?Number(e.historicalEntries):0,bondDenom:a(e.bondDenom)?String(e.bondDenom):"",minCommissionRate:a(e.minCommissionRate)?String(e.minCommissionRate):""}),toJSON(e){const t={};return void 0!==e.unbondingTime&&(t.unbondingTime=e.unbondingTime?i.toJSON(e.unbondingTime):void 0),void 0!==e.maxValidators&&(t.maxValidators=Math.round(e.maxValidators)),void 0!==e.maxEntries&&(t.maxEntries=Math.round(e.maxEntries)),void 0!==e.historicalEntries&&(t.historicalEntries=Math.round(e.historicalEntries)),void 0!==e.bondDenom&&(t.bondDenom=e.bondDenom),void 0!==e.minCommissionRate&&(t.minCommissionRate=e.minCommissionRate),t},fromPartial(e){const t=f();return t.unbondingTime=void 0!==e.unbondingTime&&null!==e.unbondingTime?i.fromPartial(e.unbondingTime):void 0,t.maxValidators=e.maxValidators??0,t.maxEntries=e.maxEntries??0,t.historicalEntries=e.historicalEntries??0,t.bondDenom=e.bondDenom??"",t.minCommissionRate=e.minCommissionRate??"",t},fromProtoMsg:e=>Params.decode(e.value),toProto:e=>Params.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/cosmos.staking.v1beta1.Params",value:Params.encode(e).finish()})};function b(){return{delegation:Delegation.fromPartial({}),balance:n.fromPartial({})}}export const DelegationResponse={typeUrl:"/cosmos.staking.v1beta1.DelegationResponse",encode:(e,t=r.create())=>(void 0!==e.delegation&&Delegation.encode(e.delegation,t.uint32(10).fork()).ldelim(),void 0!==e.balance&&n.encode(e.balance,t.uint32(18).fork()).ldelim(),t),decode(e,t){const o=e instanceof s?e:new s(e);let i=void 0===t?o.len:o.pos+t;const r=b();for(;o.pos<i;){const e=o.uint32();switch(e>>>3){case 1:r.delegation=Delegation.decode(o,o.uint32());break;case 2:r.balance=n.decode(o,o.uint32());break;default:o.skipType(7&e)}}return r},fromJSON:e=>({delegation:a(e.delegation)?Delegation.fromJSON(e.delegation):void 0,balance:a(e.balance)?n.fromJSON(e.balance):void 0}),toJSON(e){const t={};return void 0!==e.delegation&&(t.delegation=e.delegation?Delegation.toJSON(e.delegation):void 0),void 0!==e.balance&&(t.balance=e.balance?n.toJSON(e.balance):void 0),t},fromPartial(e){const t=b();return t.delegation=void 0!==e.delegation&&null!==e.delegation?Delegation.fromPartial(e.delegation):void 0,t.balance=void 0!==e.balance&&null!==e.balance?n.fromPartial(e.balance):void 0,t},fromProtoMsg:e=>DelegationResponse.decode(e.value),toProto:e=>DelegationResponse.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/cosmos.staking.v1beta1.DelegationResponse",value:DelegationResponse.encode(e).finish()})};function S(){return{redelegationEntry:RedelegationEntry.fromPartial({}),balance:""}}export const RedelegationEntryResponse={typeUrl:"/cosmos.staking.v1beta1.RedelegationEntryResponse",encode:(e,t=r.create())=>(void 0!==e.redelegationEntry&&RedelegationEntry.encode(e.redelegationEntry,t.uint32(10).fork()).ldelim(),""!==e.balance&&t.uint32(34).string(e.balance),t),decode(e,t){const o=e instanceof s?e:new s(e);let i=void 0===t?o.len:o.pos+t;const n=S();for(;o.pos<i;){const e=o.uint32();switch(e>>>3){case 1:n.redelegationEntry=RedelegationEntry.decode(o,o.uint32());break;case 4:n.balance=o.string();break;default:o.skipType(7&e)}}return n},fromJSON:e=>({redelegationEntry:a(e.redelegationEntry)?RedelegationEntry.fromJSON(e.redelegationEntry):void 0,balance:a(e.balance)?String(e.balance):""}),toJSON(e){const t={};return void 0!==e.redelegationEntry&&(t.redelegationEntry=e.redelegationEntry?RedelegationEntry.toJSON(e.redelegationEntry):void 0),void 0!==e.balance&&(t.balance=e.balance),t},fromPartial(e){const t=S();return t.redelegationEntry=void 0!==e.redelegationEntry&&null!==e.redelegationEntry?RedelegationEntry.fromPartial(e.redelegationEntry):void 0,t.balance=e.balance??"",t},fromProtoMsg:e=>RedelegationEntryResponse.decode(e.value),toProto:e=>RedelegationEntryResponse.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/cosmos.staking.v1beta1.RedelegationEntryResponse",value:RedelegationEntryResponse.encode(e).finish()})};function A(){return{redelegation:Redelegation.fromPartial({}),entries:[]}}export const RedelegationResponse={typeUrl:"/cosmos.staking.v1beta1.RedelegationResponse",encode(e,t=r.create()){void 0!==e.redelegation&&Redelegation.encode(e.redelegation,t.uint32(10).fork()).ldelim();for(const o of e.entries)RedelegationEntryResponse.encode(o,t.uint32(18).fork()).ldelim();return t},decode(e,t){const o=e instanceof s?e:new s(e);let i=void 0===t?o.len:o.pos+t;const n=A();for(;o.pos<i;){const e=o.uint32();switch(e>>>3){case 1:n.redelegation=Redelegation.decode(o,o.uint32());break;case 2:n.entries.push(RedelegationEntryResponse.decode(o,o.uint32()));break;default:o.skipType(7&e)}}return n},fromJSON:e=>({redelegation:a(e.redelegation)?Redelegation.fromJSON(e.redelegation):void 0,entries:Array.isArray(e?.entries)?e.entries.map((e=>RedelegationEntryResponse.fromJSON(e))):[]}),toJSON(e){const t={};return void 0!==e.redelegation&&(t.redelegation=e.redelegation?Redelegation.toJSON(e.redelegation):void 0),e.entries?t.entries=e.entries.map((e=>e?RedelegationEntryResponse.toJSON(e):void 0)):t.entries=[],t},fromPartial(e){const t=A();return t.redelegation=void 0!==e.redelegation&&null!==e.redelegation?Redelegation.fromPartial(e.redelegation):void 0,t.entries=e.entries?.map((e=>RedelegationEntryResponse.fromPartial(e)))||[],t},fromProtoMsg:e=>RedelegationResponse.decode(e.value),toProto:e=>RedelegationResponse.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/cosmos.staking.v1beta1.RedelegationResponse",value:RedelegationResponse.encode(e).finish()})};export const Pool={typeUrl:"/cosmos.staking.v1beta1.Pool",encode:(e,t=r.create())=>(""!==e.notBondedTokens&&t.uint32(10).string(e.notBondedTokens),""!==e.bondedTokens&&t.uint32(18).string(e.bondedTokens),t),decode(e,t){const o=e instanceof s?e:new s(e);let i=void 0===t?o.len:o.pos+t;const n={notBondedTokens:"",bondedTokens:""};for(;o.pos<i;){const e=o.uint32();switch(e>>>3){case 1:n.notBondedTokens=o.string();break;case 2:n.bondedTokens=o.string();break;default:o.skipType(7&e)}}return n},fromJSON:e=>({notBondedTokens:a(e.notBondedTokens)?String(e.notBondedTokens):"",bondedTokens:a(e.bondedTokens)?String(e.bondedTokens):""}),toJSON(e){const t={};return void 0!==e.notBondedTokens&&(t.notBondedTokens=e.notBondedTokens),void 0!==e.bondedTokens&&(t.bondedTokens=e.bondedTokens),t},fromPartial(e){const t={notBondedTokens:"",bondedTokens:""};return t.notBondedTokens=e.notBondedTokens??"",t.bondedTokens=e.bondedTokens??"",t},fromProtoMsg:e=>Pool.decode(e.value),toProto:e=>Pool.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/cosmos.staking.v1beta1.Pool",value:Pool.encode(e).finish()})};export const Cosmos_cryptoPubKey_InterfaceDecoder=e=>{const t=e instanceof s?e:new s(e),i=o.decode(t,t.uint32());return i.typeUrl,i};
|