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