@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,240 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { Coin } from '../../base/v1beta1/coin.js';
|
|
3
|
-
import { BinaryReader, BinaryWriter } from '../../../binary.js';
|
|
4
|
-
import { isSet } from '../../../helpers.js';
|
|
5
|
-
import {} from '../../../json-safe.js';
|
|
6
|
-
/**
|
|
7
|
-
* AuthorizationType defines the type of staking module authorization type
|
|
8
|
-
*
|
|
9
|
-
* Since: cosmos-sdk 0.43
|
|
10
|
-
*/
|
|
11
|
-
export var AuthorizationType;
|
|
12
|
-
(function (AuthorizationType) {
|
|
13
|
-
/** AUTHORIZATION_TYPE_UNSPECIFIED - AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type */
|
|
14
|
-
AuthorizationType[AuthorizationType["AUTHORIZATION_TYPE_UNSPECIFIED"] = 0] = "AUTHORIZATION_TYPE_UNSPECIFIED";
|
|
15
|
-
/** AUTHORIZATION_TYPE_DELEGATE - AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate */
|
|
16
|
-
AuthorizationType[AuthorizationType["AUTHORIZATION_TYPE_DELEGATE"] = 1] = "AUTHORIZATION_TYPE_DELEGATE";
|
|
17
|
-
/** AUTHORIZATION_TYPE_UNDELEGATE - AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate */
|
|
18
|
-
AuthorizationType[AuthorizationType["AUTHORIZATION_TYPE_UNDELEGATE"] = 2] = "AUTHORIZATION_TYPE_UNDELEGATE";
|
|
19
|
-
/** AUTHORIZATION_TYPE_REDELEGATE - AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate */
|
|
20
|
-
AuthorizationType[AuthorizationType["AUTHORIZATION_TYPE_REDELEGATE"] = 3] = "AUTHORIZATION_TYPE_REDELEGATE";
|
|
21
|
-
AuthorizationType[AuthorizationType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
22
|
-
})(AuthorizationType || (AuthorizationType = {}));
|
|
23
|
-
export const AuthorizationTypeSDKType = AuthorizationType;
|
|
24
|
-
export function authorizationTypeFromJSON(object) {
|
|
25
|
-
switch (object) {
|
|
26
|
-
case 0:
|
|
27
|
-
case 'AUTHORIZATION_TYPE_UNSPECIFIED':
|
|
28
|
-
return AuthorizationType.AUTHORIZATION_TYPE_UNSPECIFIED;
|
|
29
|
-
case 1:
|
|
30
|
-
case 'AUTHORIZATION_TYPE_DELEGATE':
|
|
31
|
-
return AuthorizationType.AUTHORIZATION_TYPE_DELEGATE;
|
|
32
|
-
case 2:
|
|
33
|
-
case 'AUTHORIZATION_TYPE_UNDELEGATE':
|
|
34
|
-
return AuthorizationType.AUTHORIZATION_TYPE_UNDELEGATE;
|
|
35
|
-
case 3:
|
|
36
|
-
case 'AUTHORIZATION_TYPE_REDELEGATE':
|
|
37
|
-
return AuthorizationType.AUTHORIZATION_TYPE_REDELEGATE;
|
|
38
|
-
case -1:
|
|
39
|
-
case 'UNRECOGNIZED':
|
|
40
|
-
default:
|
|
41
|
-
return AuthorizationType.UNRECOGNIZED;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
export function authorizationTypeToJSON(object) {
|
|
45
|
-
switch (object) {
|
|
46
|
-
case AuthorizationType.AUTHORIZATION_TYPE_UNSPECIFIED:
|
|
47
|
-
return 'AUTHORIZATION_TYPE_UNSPECIFIED';
|
|
48
|
-
case AuthorizationType.AUTHORIZATION_TYPE_DELEGATE:
|
|
49
|
-
return 'AUTHORIZATION_TYPE_DELEGATE';
|
|
50
|
-
case AuthorizationType.AUTHORIZATION_TYPE_UNDELEGATE:
|
|
51
|
-
return 'AUTHORIZATION_TYPE_UNDELEGATE';
|
|
52
|
-
case AuthorizationType.AUTHORIZATION_TYPE_REDELEGATE:
|
|
53
|
-
return 'AUTHORIZATION_TYPE_REDELEGATE';
|
|
54
|
-
case AuthorizationType.UNRECOGNIZED:
|
|
55
|
-
default:
|
|
56
|
-
return 'UNRECOGNIZED';
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
function createBaseStakeAuthorization() {
|
|
60
|
-
return {
|
|
61
|
-
$typeUrl: '/cosmos.staking.v1beta1.StakeAuthorization',
|
|
62
|
-
maxTokens: undefined,
|
|
63
|
-
allowList: undefined,
|
|
64
|
-
denyList: undefined,
|
|
65
|
-
authorizationType: 0,
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
export const StakeAuthorization = {
|
|
69
|
-
typeUrl: '/cosmos.staking.v1beta1.StakeAuthorization',
|
|
70
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
71
|
-
if (message.maxTokens !== undefined) {
|
|
72
|
-
Coin.encode(message.maxTokens, writer.uint32(10).fork()).ldelim();
|
|
73
|
-
}
|
|
74
|
-
if (message.allowList !== undefined) {
|
|
75
|
-
StakeAuthorization_Validators.encode(message.allowList, writer.uint32(18).fork()).ldelim();
|
|
76
|
-
}
|
|
77
|
-
if (message.denyList !== undefined) {
|
|
78
|
-
StakeAuthorization_Validators.encode(message.denyList, writer.uint32(26).fork()).ldelim();
|
|
79
|
-
}
|
|
80
|
-
if (message.authorizationType !== 0) {
|
|
81
|
-
writer.uint32(32).int32(message.authorizationType);
|
|
82
|
-
}
|
|
83
|
-
return writer;
|
|
84
|
-
},
|
|
85
|
-
decode(input, length) {
|
|
86
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
87
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
88
|
-
const message = createBaseStakeAuthorization();
|
|
89
|
-
while (reader.pos < end) {
|
|
90
|
-
const tag = reader.uint32();
|
|
91
|
-
switch (tag >>> 3) {
|
|
92
|
-
case 1:
|
|
93
|
-
message.maxTokens = Coin.decode(reader, reader.uint32());
|
|
94
|
-
break;
|
|
95
|
-
case 2:
|
|
96
|
-
message.allowList = StakeAuthorization_Validators.decode(reader, reader.uint32());
|
|
97
|
-
break;
|
|
98
|
-
case 3:
|
|
99
|
-
message.denyList = StakeAuthorization_Validators.decode(reader, reader.uint32());
|
|
100
|
-
break;
|
|
101
|
-
case 4:
|
|
102
|
-
message.authorizationType = reader.int32();
|
|
103
|
-
break;
|
|
104
|
-
default:
|
|
105
|
-
reader.skipType(tag & 7);
|
|
106
|
-
break;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
return message;
|
|
110
|
-
},
|
|
111
|
-
fromJSON(object) {
|
|
112
|
-
return {
|
|
113
|
-
maxTokens: isSet(object.maxTokens)
|
|
114
|
-
? Coin.fromJSON(object.maxTokens)
|
|
115
|
-
: undefined,
|
|
116
|
-
allowList: isSet(object.allowList)
|
|
117
|
-
? StakeAuthorization_Validators.fromJSON(object.allowList)
|
|
118
|
-
: undefined,
|
|
119
|
-
denyList: isSet(object.denyList)
|
|
120
|
-
? StakeAuthorization_Validators.fromJSON(object.denyList)
|
|
121
|
-
: undefined,
|
|
122
|
-
authorizationType: isSet(object.authorizationType)
|
|
123
|
-
? authorizationTypeFromJSON(object.authorizationType)
|
|
124
|
-
: -1,
|
|
125
|
-
};
|
|
126
|
-
},
|
|
127
|
-
toJSON(message) {
|
|
128
|
-
const obj = {};
|
|
129
|
-
message.maxTokens !== undefined &&
|
|
130
|
-
(obj.maxTokens = message.maxTokens
|
|
131
|
-
? Coin.toJSON(message.maxTokens)
|
|
132
|
-
: undefined);
|
|
133
|
-
message.allowList !== undefined &&
|
|
134
|
-
(obj.allowList = message.allowList
|
|
135
|
-
? StakeAuthorization_Validators.toJSON(message.allowList)
|
|
136
|
-
: undefined);
|
|
137
|
-
message.denyList !== undefined &&
|
|
138
|
-
(obj.denyList = message.denyList
|
|
139
|
-
? StakeAuthorization_Validators.toJSON(message.denyList)
|
|
140
|
-
: undefined);
|
|
141
|
-
message.authorizationType !== undefined &&
|
|
142
|
-
(obj.authorizationType = authorizationTypeToJSON(message.authorizationType));
|
|
143
|
-
return obj;
|
|
144
|
-
},
|
|
145
|
-
fromPartial(object) {
|
|
146
|
-
const message = createBaseStakeAuthorization();
|
|
147
|
-
message.maxTokens =
|
|
148
|
-
object.maxTokens !== undefined && object.maxTokens !== null
|
|
149
|
-
? Coin.fromPartial(object.maxTokens)
|
|
150
|
-
: undefined;
|
|
151
|
-
message.allowList =
|
|
152
|
-
object.allowList !== undefined && object.allowList !== null
|
|
153
|
-
? StakeAuthorization_Validators.fromPartial(object.allowList)
|
|
154
|
-
: undefined;
|
|
155
|
-
message.denyList =
|
|
156
|
-
object.denyList !== undefined && object.denyList !== null
|
|
157
|
-
? StakeAuthorization_Validators.fromPartial(object.denyList)
|
|
158
|
-
: undefined;
|
|
159
|
-
message.authorizationType = object.authorizationType ?? 0;
|
|
160
|
-
return message;
|
|
161
|
-
},
|
|
162
|
-
fromProtoMsg(message) {
|
|
163
|
-
return StakeAuthorization.decode(message.value);
|
|
164
|
-
},
|
|
165
|
-
toProto(message) {
|
|
166
|
-
return StakeAuthorization.encode(message).finish();
|
|
167
|
-
},
|
|
168
|
-
toProtoMsg(message) {
|
|
169
|
-
return {
|
|
170
|
-
typeUrl: '/cosmos.staking.v1beta1.StakeAuthorization',
|
|
171
|
-
value: StakeAuthorization.encode(message).finish(),
|
|
172
|
-
};
|
|
173
|
-
},
|
|
174
|
-
};
|
|
175
|
-
function createBaseStakeAuthorization_Validators() {
|
|
176
|
-
return {
|
|
177
|
-
address: [],
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
export const StakeAuthorization_Validators = {
|
|
181
|
-
typeUrl: '/cosmos.staking.v1beta1.Validators',
|
|
182
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
183
|
-
for (const v of message.address) {
|
|
184
|
-
writer.uint32(10).string(v);
|
|
185
|
-
}
|
|
186
|
-
return writer;
|
|
187
|
-
},
|
|
188
|
-
decode(input, length) {
|
|
189
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
190
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
191
|
-
const message = createBaseStakeAuthorization_Validators();
|
|
192
|
-
while (reader.pos < end) {
|
|
193
|
-
const tag = reader.uint32();
|
|
194
|
-
switch (tag >>> 3) {
|
|
195
|
-
case 1:
|
|
196
|
-
message.address.push(reader.string());
|
|
197
|
-
break;
|
|
198
|
-
default:
|
|
199
|
-
reader.skipType(tag & 7);
|
|
200
|
-
break;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
return message;
|
|
204
|
-
},
|
|
205
|
-
fromJSON(object) {
|
|
206
|
-
return {
|
|
207
|
-
address: Array.isArray(object?.address)
|
|
208
|
-
? object.address.map((e) => String(e))
|
|
209
|
-
: [],
|
|
210
|
-
};
|
|
211
|
-
},
|
|
212
|
-
toJSON(message) {
|
|
213
|
-
const obj = {};
|
|
214
|
-
if (message.address) {
|
|
215
|
-
obj.address = message.address.map(e => e);
|
|
216
|
-
}
|
|
217
|
-
else {
|
|
218
|
-
obj.address = [];
|
|
219
|
-
}
|
|
220
|
-
return obj;
|
|
221
|
-
},
|
|
222
|
-
fromPartial(object) {
|
|
223
|
-
const message = createBaseStakeAuthorization_Validators();
|
|
224
|
-
message.address = object.address?.map(e => e) || [];
|
|
225
|
-
return message;
|
|
226
|
-
},
|
|
227
|
-
fromProtoMsg(message) {
|
|
228
|
-
return StakeAuthorization_Validators.decode(message.value);
|
|
229
|
-
},
|
|
230
|
-
toProto(message) {
|
|
231
|
-
return StakeAuthorization_Validators.encode(message).finish();
|
|
232
|
-
},
|
|
233
|
-
toProtoMsg(message) {
|
|
234
|
-
return {
|
|
235
|
-
typeUrl: '/cosmos.staking.v1beta1.Validators',
|
|
236
|
-
value: StakeAuthorization_Validators.encode(message).finish(),
|
|
237
|
-
};
|
|
238
|
-
},
|
|
239
|
-
};
|
|
240
|
-
//# sourceMappingURL=authz.js.map
|
|
1
|
+
import{Coin as o}from"../../base/v1beta1/coin.js";import{BinaryReader as t,BinaryWriter as i}from"../../../binary.js";import{isSet as a}from"../../../helpers.js";import{}from"../../../json-safe.js";export var AuthorizationType;!function(o){o[o.AUTHORIZATION_TYPE_UNSPECIFIED=0]="AUTHORIZATION_TYPE_UNSPECIFIED",o[o.AUTHORIZATION_TYPE_DELEGATE=1]="AUTHORIZATION_TYPE_DELEGATE",o[o.AUTHORIZATION_TYPE_UNDELEGATE=2]="AUTHORIZATION_TYPE_UNDELEGATE",o[o.AUTHORIZATION_TYPE_REDELEGATE=3]="AUTHORIZATION_TYPE_REDELEGATE",o[o.UNRECOGNIZED=-1]="UNRECOGNIZED"}(AuthorizationType||(AuthorizationType={}));export const AuthorizationTypeSDKType=AuthorizationType;export function authorizationTypeFromJSON(o){switch(o){case 0:case"AUTHORIZATION_TYPE_UNSPECIFIED":return AuthorizationType.AUTHORIZATION_TYPE_UNSPECIFIED;case 1:case"AUTHORIZATION_TYPE_DELEGATE":return AuthorizationType.AUTHORIZATION_TYPE_DELEGATE;case 2:case"AUTHORIZATION_TYPE_UNDELEGATE":return AuthorizationType.AUTHORIZATION_TYPE_UNDELEGATE;case 3:case"AUTHORIZATION_TYPE_REDELEGATE":return AuthorizationType.AUTHORIZATION_TYPE_REDELEGATE;default:return AuthorizationType.UNRECOGNIZED}}export function authorizationTypeToJSON(o){switch(o){case AuthorizationType.AUTHORIZATION_TYPE_UNSPECIFIED:return"AUTHORIZATION_TYPE_UNSPECIFIED";case AuthorizationType.AUTHORIZATION_TYPE_DELEGATE:return"AUTHORIZATION_TYPE_DELEGATE";case AuthorizationType.AUTHORIZATION_TYPE_UNDELEGATE:return"AUTHORIZATION_TYPE_UNDELEGATE";case AuthorizationType.AUTHORIZATION_TYPE_REDELEGATE:return"AUTHORIZATION_TYPE_REDELEGATE";case AuthorizationType.UNRECOGNIZED:default:return"UNRECOGNIZED"}}export const StakeAuthorization={typeUrl:"/cosmos.staking.v1beta1.StakeAuthorization",encode:(t,a=i.create())=>(void 0!==t.maxTokens&&o.encode(t.maxTokens,a.uint32(10).fork()).ldelim(),void 0!==t.allowList&&StakeAuthorization_Validators.encode(t.allowList,a.uint32(18).fork()).ldelim(),void 0!==t.denyList&&StakeAuthorization_Validators.encode(t.denyList,a.uint32(26).fork()).ldelim(),0!==t.authorizationType&&a.uint32(32).int32(t.authorizationType),a),decode(i,a){const e=i instanceof t?i:new t(i);let r=void 0===a?e.len:e.pos+a;const n={$typeUrl:"/cosmos.staking.v1beta1.StakeAuthorization",maxTokens:void 0,allowList:void 0,denyList:void 0,authorizationType:0};for(;e.pos<r;){const t=e.uint32();switch(t>>>3){case 1:n.maxTokens=o.decode(e,e.uint32());break;case 2:n.allowList=StakeAuthorization_Validators.decode(e,e.uint32());break;case 3:n.denyList=StakeAuthorization_Validators.decode(e,e.uint32());break;case 4:n.authorizationType=e.int32();break;default:e.skipType(7&t)}}return n},fromJSON:t=>({maxTokens:a(t.maxTokens)?o.fromJSON(t.maxTokens):void 0,allowList:a(t.allowList)?StakeAuthorization_Validators.fromJSON(t.allowList):void 0,denyList:a(t.denyList)?StakeAuthorization_Validators.fromJSON(t.denyList):void 0,authorizationType:a(t.authorizationType)?authorizationTypeFromJSON(t.authorizationType):-1}),toJSON(t){const i={};return void 0!==t.maxTokens&&(i.maxTokens=t.maxTokens?o.toJSON(t.maxTokens):void 0),void 0!==t.allowList&&(i.allowList=t.allowList?StakeAuthorization_Validators.toJSON(t.allowList):void 0),void 0!==t.denyList&&(i.denyList=t.denyList?StakeAuthorization_Validators.toJSON(t.denyList):void 0),void 0!==t.authorizationType&&(i.authorizationType=authorizationTypeToJSON(t.authorizationType)),i},fromPartial(t){const i={$typeUrl:"/cosmos.staking.v1beta1.StakeAuthorization",maxTokens:void 0,allowList:void 0,denyList:void 0,authorizationType:0};return i.maxTokens=void 0!==t.maxTokens&&null!==t.maxTokens?o.fromPartial(t.maxTokens):void 0,i.allowList=void 0!==t.allowList&&null!==t.allowList?StakeAuthorization_Validators.fromPartial(t.allowList):void 0,i.denyList=void 0!==t.denyList&&null!==t.denyList?StakeAuthorization_Validators.fromPartial(t.denyList):void 0,i.authorizationType=t.authorizationType??0,i},fromProtoMsg:o=>StakeAuthorization.decode(o.value),toProto:o=>StakeAuthorization.encode(o).finish(),toProtoMsg:o=>({typeUrl:"/cosmos.staking.v1beta1.StakeAuthorization",value:StakeAuthorization.encode(o).finish()})};export const StakeAuthorization_Validators={typeUrl:"/cosmos.staking.v1beta1.Validators",encode(o,t=i.create()){for(const i of o.address)t.uint32(10).string(i);return t},decode(o,i){const a=o instanceof t?o:new t(o);let e=void 0===i?a.len:a.pos+i;const r={address:[]};for(;a.pos<e;){const o=a.uint32();if(o>>>3==1)r.address.push(a.string());else a.skipType(7&o)}return r},fromJSON:o=>({address:Array.isArray(o?.address)?o.address.map((o=>String(o))):[]}),toJSON(o){const t={};return o.address?t.address=o.address.map((o=>o)):t.address=[],t},fromPartial(o){const t={address:[]};return t.address=o.address?.map((o=>o))||[],t},fromProtoMsg:o=>StakeAuthorization_Validators.decode(o.value),toProto:o=>StakeAuthorization_Validators.encode(o).finish(),toProtoMsg:o=>({typeUrl:"/cosmos.staking.v1beta1.Validators",value:StakeAuthorization_Validators.encode(o).finish()})};
|
|
@@ -1,256 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { Params, Validator, Delegation, UnbondingDelegation, Redelegation, } from './staking.js';
|
|
3
|
-
import { BinaryReader, BinaryWriter } from '../../../binary.js';
|
|
4
|
-
import { isSet, bytesFromBase64, base64FromBytes } from '../../../helpers.js';
|
|
5
|
-
import {} from '../../../json-safe.js';
|
|
6
|
-
function createBaseGenesisState() {
|
|
7
|
-
return {
|
|
8
|
-
params: Params.fromPartial({}),
|
|
9
|
-
lastTotalPower: new Uint8Array(),
|
|
10
|
-
lastValidatorPowers: [],
|
|
11
|
-
validators: [],
|
|
12
|
-
delegations: [],
|
|
13
|
-
unbondingDelegations: [],
|
|
14
|
-
redelegations: [],
|
|
15
|
-
exported: false,
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
export const GenesisState = {
|
|
19
|
-
typeUrl: '/cosmos.staking.v1beta1.GenesisState',
|
|
20
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
21
|
-
if (message.params !== undefined) {
|
|
22
|
-
Params.encode(message.params, writer.uint32(10).fork()).ldelim();
|
|
23
|
-
}
|
|
24
|
-
if (message.lastTotalPower.length !== 0) {
|
|
25
|
-
writer.uint32(18).bytes(message.lastTotalPower);
|
|
26
|
-
}
|
|
27
|
-
for (const v of message.lastValidatorPowers) {
|
|
28
|
-
LastValidatorPower.encode(v, writer.uint32(26).fork()).ldelim();
|
|
29
|
-
}
|
|
30
|
-
for (const v of message.validators) {
|
|
31
|
-
Validator.encode(v, writer.uint32(34).fork()).ldelim();
|
|
32
|
-
}
|
|
33
|
-
for (const v of message.delegations) {
|
|
34
|
-
Delegation.encode(v, writer.uint32(42).fork()).ldelim();
|
|
35
|
-
}
|
|
36
|
-
for (const v of message.unbondingDelegations) {
|
|
37
|
-
UnbondingDelegation.encode(v, writer.uint32(50).fork()).ldelim();
|
|
38
|
-
}
|
|
39
|
-
for (const v of message.redelegations) {
|
|
40
|
-
Redelegation.encode(v, writer.uint32(58).fork()).ldelim();
|
|
41
|
-
}
|
|
42
|
-
if (message.exported === true) {
|
|
43
|
-
writer.uint32(64).bool(message.exported);
|
|
44
|
-
}
|
|
45
|
-
return writer;
|
|
46
|
-
},
|
|
47
|
-
decode(input, length) {
|
|
48
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
49
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
50
|
-
const message = createBaseGenesisState();
|
|
51
|
-
while (reader.pos < end) {
|
|
52
|
-
const tag = reader.uint32();
|
|
53
|
-
switch (tag >>> 3) {
|
|
54
|
-
case 1:
|
|
55
|
-
message.params = Params.decode(reader, reader.uint32());
|
|
56
|
-
break;
|
|
57
|
-
case 2:
|
|
58
|
-
message.lastTotalPower = reader.bytes();
|
|
59
|
-
break;
|
|
60
|
-
case 3:
|
|
61
|
-
message.lastValidatorPowers.push(LastValidatorPower.decode(reader, reader.uint32()));
|
|
62
|
-
break;
|
|
63
|
-
case 4:
|
|
64
|
-
message.validators.push(Validator.decode(reader, reader.uint32()));
|
|
65
|
-
break;
|
|
66
|
-
case 5:
|
|
67
|
-
message.delegations.push(Delegation.decode(reader, reader.uint32()));
|
|
68
|
-
break;
|
|
69
|
-
case 6:
|
|
70
|
-
message.unbondingDelegations.push(UnbondingDelegation.decode(reader, reader.uint32()));
|
|
71
|
-
break;
|
|
72
|
-
case 7:
|
|
73
|
-
message.redelegations.push(Redelegation.decode(reader, reader.uint32()));
|
|
74
|
-
break;
|
|
75
|
-
case 8:
|
|
76
|
-
message.exported = reader.bool();
|
|
77
|
-
break;
|
|
78
|
-
default:
|
|
79
|
-
reader.skipType(tag & 7);
|
|
80
|
-
break;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
return message;
|
|
84
|
-
},
|
|
85
|
-
fromJSON(object) {
|
|
86
|
-
return {
|
|
87
|
-
params: isSet(object.params) ? Params.fromJSON(object.params) : undefined,
|
|
88
|
-
lastTotalPower: isSet(object.lastTotalPower)
|
|
89
|
-
? bytesFromBase64(object.lastTotalPower)
|
|
90
|
-
: new Uint8Array(),
|
|
91
|
-
lastValidatorPowers: Array.isArray(object?.lastValidatorPowers)
|
|
92
|
-
? object.lastValidatorPowers.map((e) => LastValidatorPower.fromJSON(e))
|
|
93
|
-
: [],
|
|
94
|
-
validators: Array.isArray(object?.validators)
|
|
95
|
-
? object.validators.map((e) => Validator.fromJSON(e))
|
|
96
|
-
: [],
|
|
97
|
-
delegations: Array.isArray(object?.delegations)
|
|
98
|
-
? object.delegations.map((e) => Delegation.fromJSON(e))
|
|
99
|
-
: [],
|
|
100
|
-
unbondingDelegations: Array.isArray(object?.unbondingDelegations)
|
|
101
|
-
? object.unbondingDelegations.map((e) => UnbondingDelegation.fromJSON(e))
|
|
102
|
-
: [],
|
|
103
|
-
redelegations: Array.isArray(object?.redelegations)
|
|
104
|
-
? object.redelegations.map((e) => Redelegation.fromJSON(e))
|
|
105
|
-
: [],
|
|
106
|
-
exported: isSet(object.exported) ? Boolean(object.exported) : false,
|
|
107
|
-
};
|
|
108
|
-
},
|
|
109
|
-
toJSON(message) {
|
|
110
|
-
const obj = {};
|
|
111
|
-
message.params !== undefined &&
|
|
112
|
-
(obj.params = message.params ? Params.toJSON(message.params) : undefined);
|
|
113
|
-
message.lastTotalPower !== undefined &&
|
|
114
|
-
(obj.lastTotalPower = base64FromBytes(message.lastTotalPower !== undefined
|
|
115
|
-
? message.lastTotalPower
|
|
116
|
-
: new Uint8Array()));
|
|
117
|
-
if (message.lastValidatorPowers) {
|
|
118
|
-
obj.lastValidatorPowers = message.lastValidatorPowers.map(e => e ? LastValidatorPower.toJSON(e) : undefined);
|
|
119
|
-
}
|
|
120
|
-
else {
|
|
121
|
-
obj.lastValidatorPowers = [];
|
|
122
|
-
}
|
|
123
|
-
if (message.validators) {
|
|
124
|
-
obj.validators = message.validators.map(e => e ? Validator.toJSON(e) : undefined);
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
obj.validators = [];
|
|
128
|
-
}
|
|
129
|
-
if (message.delegations) {
|
|
130
|
-
obj.delegations = message.delegations.map(e => e ? Delegation.toJSON(e) : undefined);
|
|
131
|
-
}
|
|
132
|
-
else {
|
|
133
|
-
obj.delegations = [];
|
|
134
|
-
}
|
|
135
|
-
if (message.unbondingDelegations) {
|
|
136
|
-
obj.unbondingDelegations = message.unbondingDelegations.map(e => e ? UnbondingDelegation.toJSON(e) : undefined);
|
|
137
|
-
}
|
|
138
|
-
else {
|
|
139
|
-
obj.unbondingDelegations = [];
|
|
140
|
-
}
|
|
141
|
-
if (message.redelegations) {
|
|
142
|
-
obj.redelegations = message.redelegations.map(e => e ? Redelegation.toJSON(e) : undefined);
|
|
143
|
-
}
|
|
144
|
-
else {
|
|
145
|
-
obj.redelegations = [];
|
|
146
|
-
}
|
|
147
|
-
message.exported !== undefined && (obj.exported = message.exported);
|
|
148
|
-
return obj;
|
|
149
|
-
},
|
|
150
|
-
fromPartial(object) {
|
|
151
|
-
const message = createBaseGenesisState();
|
|
152
|
-
message.params =
|
|
153
|
-
object.params !== undefined && object.params !== null
|
|
154
|
-
? Params.fromPartial(object.params)
|
|
155
|
-
: undefined;
|
|
156
|
-
message.lastTotalPower = object.lastTotalPower ?? new Uint8Array();
|
|
157
|
-
message.lastValidatorPowers =
|
|
158
|
-
object.lastValidatorPowers?.map(e => LastValidatorPower.fromPartial(e)) ||
|
|
159
|
-
[];
|
|
160
|
-
message.validators =
|
|
161
|
-
object.validators?.map(e => Validator.fromPartial(e)) || [];
|
|
162
|
-
message.delegations =
|
|
163
|
-
object.delegations?.map(e => Delegation.fromPartial(e)) || [];
|
|
164
|
-
message.unbondingDelegations =
|
|
165
|
-
object.unbondingDelegations?.map(e => UnbondingDelegation.fromPartial(e)) || [];
|
|
166
|
-
message.redelegations =
|
|
167
|
-
object.redelegations?.map(e => Redelegation.fromPartial(e)) || [];
|
|
168
|
-
message.exported = object.exported ?? false;
|
|
169
|
-
return message;
|
|
170
|
-
},
|
|
171
|
-
fromProtoMsg(message) {
|
|
172
|
-
return GenesisState.decode(message.value);
|
|
173
|
-
},
|
|
174
|
-
toProto(message) {
|
|
175
|
-
return GenesisState.encode(message).finish();
|
|
176
|
-
},
|
|
177
|
-
toProtoMsg(message) {
|
|
178
|
-
return {
|
|
179
|
-
typeUrl: '/cosmos.staking.v1beta1.GenesisState',
|
|
180
|
-
value: GenesisState.encode(message).finish(),
|
|
181
|
-
};
|
|
182
|
-
},
|
|
183
|
-
};
|
|
184
|
-
function createBaseLastValidatorPower() {
|
|
185
|
-
return {
|
|
186
|
-
address: '',
|
|
187
|
-
power: BigInt(0),
|
|
188
|
-
};
|
|
189
|
-
}
|
|
190
|
-
export const LastValidatorPower = {
|
|
191
|
-
typeUrl: '/cosmos.staking.v1beta1.LastValidatorPower',
|
|
192
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
193
|
-
if (message.address !== '') {
|
|
194
|
-
writer.uint32(10).string(message.address);
|
|
195
|
-
}
|
|
196
|
-
if (message.power !== BigInt(0)) {
|
|
197
|
-
writer.uint32(16).int64(message.power);
|
|
198
|
-
}
|
|
199
|
-
return writer;
|
|
200
|
-
},
|
|
201
|
-
decode(input, length) {
|
|
202
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
203
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
204
|
-
const message = createBaseLastValidatorPower();
|
|
205
|
-
while (reader.pos < end) {
|
|
206
|
-
const tag = reader.uint32();
|
|
207
|
-
switch (tag >>> 3) {
|
|
208
|
-
case 1:
|
|
209
|
-
message.address = reader.string();
|
|
210
|
-
break;
|
|
211
|
-
case 2:
|
|
212
|
-
message.power = reader.int64();
|
|
213
|
-
break;
|
|
214
|
-
default:
|
|
215
|
-
reader.skipType(tag & 7);
|
|
216
|
-
break;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
return message;
|
|
220
|
-
},
|
|
221
|
-
fromJSON(object) {
|
|
222
|
-
return {
|
|
223
|
-
address: isSet(object.address) ? String(object.address) : '',
|
|
224
|
-
power: isSet(object.power) ? BigInt(object.power.toString()) : BigInt(0),
|
|
225
|
-
};
|
|
226
|
-
},
|
|
227
|
-
toJSON(message) {
|
|
228
|
-
const obj = {};
|
|
229
|
-
message.address !== undefined && (obj.address = message.address);
|
|
230
|
-
message.power !== undefined &&
|
|
231
|
-
(obj.power = (message.power || BigInt(0)).toString());
|
|
232
|
-
return obj;
|
|
233
|
-
},
|
|
234
|
-
fromPartial(object) {
|
|
235
|
-
const message = createBaseLastValidatorPower();
|
|
236
|
-
message.address = object.address ?? '';
|
|
237
|
-
message.power =
|
|
238
|
-
object.power !== undefined && object.power !== null
|
|
239
|
-
? BigInt(object.power.toString())
|
|
240
|
-
: BigInt(0);
|
|
241
|
-
return message;
|
|
242
|
-
},
|
|
243
|
-
fromProtoMsg(message) {
|
|
244
|
-
return LastValidatorPower.decode(message.value);
|
|
245
|
-
},
|
|
246
|
-
toProto(message) {
|
|
247
|
-
return LastValidatorPower.encode(message).finish();
|
|
248
|
-
},
|
|
249
|
-
toProtoMsg(message) {
|
|
250
|
-
return {
|
|
251
|
-
typeUrl: '/cosmos.staking.v1beta1.LastValidatorPower',
|
|
252
|
-
value: LastValidatorPower.encode(message).finish(),
|
|
253
|
-
};
|
|
254
|
-
},
|
|
255
|
-
};
|
|
256
|
-
//# sourceMappingURL=genesis.js.map
|
|
1
|
+
import{Params as o,Validator as e,Delegation as a,UnbondingDelegation as t,Redelegation as r}from"./staking.js";import{BinaryReader as s,BinaryWriter as i}from"../../../binary.js";import{isSet as n,bytesFromBase64 as d,base64FromBytes as l}from"../../../helpers.js";import{}from"../../../json-safe.js";function p(){return{params:o.fromPartial({}),lastTotalPower:new Uint8Array,lastValidatorPowers:[],validators:[],delegations:[],unbondingDelegations:[],redelegations:[],exported:!1}}export const GenesisState={typeUrl:"/cosmos.staking.v1beta1.GenesisState",encode(s,n=i.create()){void 0!==s.params&&o.encode(s.params,n.uint32(10).fork()).ldelim(),0!==s.lastTotalPower.length&&n.uint32(18).bytes(s.lastTotalPower);for(const o of s.lastValidatorPowers)LastValidatorPower.encode(o,n.uint32(26).fork()).ldelim();for(const o of s.validators)e.encode(o,n.uint32(34).fork()).ldelim();for(const o of s.delegations)a.encode(o,n.uint32(42).fork()).ldelim();for(const o of s.unbondingDelegations)t.encode(o,n.uint32(50).fork()).ldelim();for(const o of s.redelegations)r.encode(o,n.uint32(58).fork()).ldelim();return!0===s.exported&&n.uint32(64).bool(s.exported),n},decode(i,n){const d=i instanceof s?i:new s(i);let l=void 0===n?d.len:d.pos+n;const g=p();for(;d.pos<l;){const s=d.uint32();switch(s>>>3){case 1:g.params=o.decode(d,d.uint32());break;case 2:g.lastTotalPower=d.bytes();break;case 3:g.lastValidatorPowers.push(LastValidatorPower.decode(d,d.uint32()));break;case 4:g.validators.push(e.decode(d,d.uint32()));break;case 5:g.delegations.push(a.decode(d,d.uint32()));break;case 6:g.unbondingDelegations.push(t.decode(d,d.uint32()));break;case 7:g.redelegations.push(r.decode(d,d.uint32()));break;case 8:g.exported=d.bool();break;default:d.skipType(7&s)}}return g},fromJSON:s=>({params:n(s.params)?o.fromJSON(s.params):void 0,lastTotalPower:n(s.lastTotalPower)?d(s.lastTotalPower):new Uint8Array,lastValidatorPowers:Array.isArray(s?.lastValidatorPowers)?s.lastValidatorPowers.map((o=>LastValidatorPower.fromJSON(o))):[],validators:Array.isArray(s?.validators)?s.validators.map((o=>e.fromJSON(o))):[],delegations:Array.isArray(s?.delegations)?s.delegations.map((o=>a.fromJSON(o))):[],unbondingDelegations:Array.isArray(s?.unbondingDelegations)?s.unbondingDelegations.map((o=>t.fromJSON(o))):[],redelegations:Array.isArray(s?.redelegations)?s.redelegations.map((o=>r.fromJSON(o))):[],exported:!!n(s.exported)&&Boolean(s.exported)}),toJSON(s){const i={};return void 0!==s.params&&(i.params=s.params?o.toJSON(s.params):void 0),void 0!==s.lastTotalPower&&(i.lastTotalPower=l(void 0!==s.lastTotalPower?s.lastTotalPower:new Uint8Array)),s.lastValidatorPowers?i.lastValidatorPowers=s.lastValidatorPowers.map((o=>o?LastValidatorPower.toJSON(o):void 0)):i.lastValidatorPowers=[],s.validators?i.validators=s.validators.map((o=>o?e.toJSON(o):void 0)):i.validators=[],s.delegations?i.delegations=s.delegations.map((o=>o?a.toJSON(o):void 0)):i.delegations=[],s.unbondingDelegations?i.unbondingDelegations=s.unbondingDelegations.map((o=>o?t.toJSON(o):void 0)):i.unbondingDelegations=[],s.redelegations?i.redelegations=s.redelegations.map((o=>o?r.toJSON(o):void 0)):i.redelegations=[],void 0!==s.exported&&(i.exported=s.exported),i},fromPartial(s){const i=p();return i.params=void 0!==s.params&&null!==s.params?o.fromPartial(s.params):void 0,i.lastTotalPower=s.lastTotalPower??new Uint8Array,i.lastValidatorPowers=s.lastValidatorPowers?.map((o=>LastValidatorPower.fromPartial(o)))||[],i.validators=s.validators?.map((o=>e.fromPartial(o)))||[],i.delegations=s.delegations?.map((o=>a.fromPartial(o)))||[],i.unbondingDelegations=s.unbondingDelegations?.map((o=>t.fromPartial(o)))||[],i.redelegations=s.redelegations?.map((o=>r.fromPartial(o)))||[],i.exported=s.exported??!1,i},fromProtoMsg:o=>GenesisState.decode(o.value),toProto:o=>GenesisState.encode(o).finish(),toProtoMsg:o=>({typeUrl:"/cosmos.staking.v1beta1.GenesisState",value:GenesisState.encode(o).finish()})};function g(){return{address:"",power:BigInt(0)}}export const LastValidatorPower={typeUrl:"/cosmos.staking.v1beta1.LastValidatorPower",encode:(o,e=i.create())=>(""!==o.address&&e.uint32(10).string(o.address),o.power!==BigInt(0)&&e.uint32(16).int64(o.power),e),decode(o,e){const a=o instanceof s?o:new s(o);let t=void 0===e?a.len:a.pos+e;const r=g();for(;a.pos<t;){const o=a.uint32();switch(o>>>3){case 1:r.address=a.string();break;case 2:r.power=a.int64();break;default:a.skipType(7&o)}}return r},fromJSON:o=>({address:n(o.address)?String(o.address):"",power:n(o.power)?BigInt(o.power.toString()):BigInt(0)}),toJSON(o){const e={};return void 0!==o.address&&(e.address=o.address),void 0!==o.power&&(e.power=(o.power||BigInt(0)).toString()),e},fromPartial(o){const e=g();return e.address=o.address??"",e.power=void 0!==o.power&&null!==o.power?BigInt(o.power.toString()):BigInt(0),e},fromProtoMsg:o=>LastValidatorPower.decode(o.value),toProto:o=>LastValidatorPower.encode(o).finish(),toProtoMsg:o=>({typeUrl:"/cosmos.staking.v1beta1.LastValidatorPower",value:LastValidatorPower.encode(o).finish()})};
|