coreum-js 2.11.0 → 2.13.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 (243) hide show
  1. package/dist/main/client/index.d.ts +2 -1
  2. package/dist/main/coreum/asset/ft/v1/genesis.d.ts +1 -1
  3. package/dist/main/coreum/asset/ft/v1/genesis.js +25 -12
  4. package/dist/main/coreum/asset/ft/v1/params.d.ts +1 -1
  5. package/dist/main/coreum/asset/ft/v1/params.js +14 -6
  6. package/dist/main/coreum/asset/ft/v1/query.d.ts +2 -2
  7. package/dist/main/coreum/asset/ft/v1/query.js +116 -54
  8. package/dist/main/coreum/asset/ft/v1/token.d.ts +1 -0
  9. package/dist/main/coreum/asset/ft/v1/token.js +6 -0
  10. package/dist/main/coreum/asset/ft/v1/tx.d.ts +1 -1
  11. package/dist/main/coreum/asset/ft/v1/tx.js +1 -1
  12. package/dist/main/coreum/asset/nft/v1/genesis.d.ts +2 -2
  13. package/dist/main/coreum/asset/nft/v1/params.d.ts +1 -1
  14. package/dist/main/coreum/asset/nft/v1/params.js +14 -6
  15. package/dist/main/coreum/asset/nft/v1/query.d.ts +3 -3
  16. package/dist/main/coreum/asset/nft/v1/query.js +49 -22
  17. package/dist/main/coreum/feemodel/v1/genesis.d.ts +1 -1
  18. package/dist/main/coreum/feemodel/v1/genesis.js +17 -10
  19. package/dist/main/coreum/feemodel/v1/query.d.ts +1 -1
  20. package/dist/main/coreum/feemodel/v1/query.js +22 -11
  21. package/dist/main/coreum/nft/v1beta1/query.d.ts +1 -1
  22. package/dist/main/coreum/nft/v1beta1/query.js +83 -39
  23. package/dist/main/cosmos/extensions/bank.d.ts +8 -8
  24. package/dist/main/cosmos/extensions/bank.js +2 -2
  25. package/dist/main/cosmos/extensions/distribution.d.ts +11 -11
  26. package/dist/main/cosmos/extensions/distribution.js +1 -1
  27. package/dist/main/cosmos/extensions/gov.d.ts +21 -21
  28. package/dist/main/cosmos/extensions/gov.js +1 -1
  29. package/dist/main/cosmos/index.d.ts +12 -21
  30. package/dist/main/cosmos/index.js +50 -42
  31. package/dist/main/types/msgs.d.ts +4 -4
  32. package/dist/main/wasm/v1/authz.d.ts +1 -1
  33. package/dist/main/wasm/v1/authz.js +1 -1
  34. package/dist/main/wasm/v1/proposal.d.ts +1 -1
  35. package/dist/main/wasm/v1/proposal.js +1 -1
  36. package/dist/main/wasm/v1/tx.d.ts +1 -1
  37. package/dist/main/wasm/v1/tx.js +1 -1
  38. package/dist/module/client/index.d.ts +2 -1
  39. package/dist/module/coreum/asset/ft/v1/genesis.d.ts +1 -1
  40. package/dist/module/coreum/asset/ft/v1/genesis.js +25 -12
  41. package/dist/module/coreum/asset/ft/v1/params.d.ts +1 -1
  42. package/dist/module/coreum/asset/ft/v1/params.js +14 -6
  43. package/dist/module/coreum/asset/ft/v1/query.d.ts +2 -2
  44. package/dist/module/coreum/asset/ft/v1/query.js +116 -54
  45. package/dist/module/coreum/asset/ft/v1/token.d.ts +1 -0
  46. package/dist/module/coreum/asset/ft/v1/token.js +6 -0
  47. package/dist/module/coreum/asset/ft/v1/tx.d.ts +1 -1
  48. package/dist/module/coreum/asset/ft/v1/tx.js +1 -1
  49. package/dist/module/coreum/asset/nft/v1/genesis.d.ts +2 -2
  50. package/dist/module/coreum/asset/nft/v1/params.d.ts +1 -1
  51. package/dist/module/coreum/asset/nft/v1/params.js +14 -6
  52. package/dist/module/coreum/asset/nft/v1/query.d.ts +3 -3
  53. package/dist/module/coreum/asset/nft/v1/query.js +49 -22
  54. package/dist/module/coreum/feemodel/v1/genesis.d.ts +1 -1
  55. package/dist/module/coreum/feemodel/v1/genesis.js +17 -10
  56. package/dist/module/coreum/feemodel/v1/query.d.ts +1 -1
  57. package/dist/module/coreum/feemodel/v1/query.js +22 -11
  58. package/dist/module/coreum/nft/v1beta1/query.d.ts +1 -1
  59. package/dist/module/coreum/nft/v1beta1/query.js +83 -39
  60. package/dist/module/cosmos/extensions/bank.d.ts +8 -8
  61. package/dist/module/cosmos/extensions/bank.js +2 -2
  62. package/dist/module/cosmos/extensions/distribution.d.ts +11 -11
  63. package/dist/module/cosmos/extensions/distribution.js +1 -1
  64. package/dist/module/cosmos/extensions/gov.d.ts +21 -21
  65. package/dist/module/cosmos/extensions/gov.js +1 -1
  66. package/dist/module/cosmos/index.d.ts +12 -21
  67. package/dist/module/cosmos/index.js +29 -19
  68. package/dist/module/types/msgs.d.ts +4 -4
  69. package/dist/module/wasm/v1/authz.d.ts +1 -1
  70. package/dist/module/wasm/v1/authz.js +1 -1
  71. package/dist/module/wasm/v1/proposal.d.ts +1 -1
  72. package/dist/module/wasm/v1/proposal.js +1 -1
  73. package/dist/module/wasm/v1/tx.d.ts +1 -1
  74. package/dist/module/wasm/v1/tx.js +1 -1
  75. package/package.json +1 -1
  76. package/dist/main/cosmos/auth/v1beta1/auth.d.ts +0 -229
  77. package/dist/main/cosmos/auth/v1beta1/auth.js +0 -437
  78. package/dist/main/cosmos/authz/v1beta1/authz.d.ts +0 -167
  79. package/dist/main/cosmos/authz/v1beta1/authz.js +0 -319
  80. package/dist/main/cosmos/authz/v1beta1/event.d.ts +0 -80
  81. package/dist/main/cosmos/authz/v1beta1/event.js +0 -162
  82. package/dist/main/cosmos/authz/v1beta1/genesis.d.ts +0 -121
  83. package/dist/main/cosmos/authz/v1beta1/genesis.js +0 -68
  84. package/dist/main/cosmos/authz/v1beta1/pagination.d.ts +0 -128
  85. package/dist/main/cosmos/authz/v1beta1/pagination.js +0 -227
  86. package/dist/main/cosmos/authz/v1beta1/query.d.ts +0 -616
  87. package/dist/main/cosmos/authz/v1beta1/query.js +0 -512
  88. package/dist/main/cosmos/authz/v1beta1/tx.d.ts +0 -264
  89. package/dist/main/cosmos/authz/v1beta1/tx.js +0 -435
  90. package/dist/main/cosmos/bank/v1beta1/authz.d.ts +0 -80
  91. package/dist/main/cosmos/bank/v1beta1/authz.js +0 -83
  92. package/dist/main/cosmos/bank/v1beta1/bank.d.ts +0 -440
  93. package/dist/main/cosmos/bank/v1beta1/bank.js +0 -556
  94. package/dist/main/cosmos/bank/v1beta1/genesis.d.ts +0 -473
  95. package/dist/main/cosmos/bank/v1beta1/genesis.js +0 -207
  96. package/dist/main/cosmos/bank/v1beta1/pagination.d.ts +0 -128
  97. package/dist/main/cosmos/bank/v1beta1/pagination.js +0 -227
  98. package/dist/main/cosmos/bank/v1beta1/query.d.ts +0 -1633
  99. package/dist/main/cosmos/bank/v1beta1/query.js +0 -1595
  100. package/dist/main/cosmos/bank/v1beta1/tx.d.ts +0 -514
  101. package/dist/main/cosmos/bank/v1beta1/tx.js +0 -498
  102. package/dist/main/cosmos/base/query/v1beta1/pagination.d.ts +0 -470
  103. package/dist/main/cosmos/base/query/v1beta1/pagination.js +0 -241
  104. package/dist/main/cosmos/base/v1beta1/coin.d.ts +0 -114
  105. package/dist/main/cosmos/base/v1beta1/coin.js +0 -241
  106. package/dist/main/cosmos/crypto/multisig/v1beta1/multisig.d.ts +0 -67
  107. package/dist/main/cosmos/crypto/multisig/v1beta1/multisig.js +0 -172
  108. package/dist/main/cosmos/distribution/v1beta1/distribution.d.ts +0 -638
  109. package/dist/main/cosmos/distribution/v1beta1/distribution.js +0 -887
  110. package/dist/main/cosmos/distribution/v1beta1/genesis.d.ts +0 -1259
  111. package/dist/main/cosmos/distribution/v1beta1/genesis.js +0 -784
  112. package/dist/main/cosmos/distribution/v1beta1/pagination.d.ts +0 -128
  113. package/dist/main/cosmos/distribution/v1beta1/pagination.js +0 -227
  114. package/dist/main/cosmos/distribution/v1beta1/query.d.ts +0 -995
  115. package/dist/main/cosmos/distribution/v1beta1/query.js +0 -1335
  116. package/dist/main/cosmos/distribution/v1beta1/tx.d.ts +0 -593
  117. package/dist/main/cosmos/distribution/v1beta1/tx.js +0 -824
  118. package/dist/main/cosmos/feegrant/v1beta1/feegrant.d.ts +0 -367
  119. package/dist/main/cosmos/feegrant/v1beta1/feegrant.js +0 -412
  120. package/dist/main/cosmos/feegrant/v1beta1/genesis.d.ts +0 -111
  121. package/dist/main/cosmos/feegrant/v1beta1/genesis.js +0 -66
  122. package/dist/main/cosmos/feegrant/v1beta1/pagination.d.ts +0 -128
  123. package/dist/main/cosmos/feegrant/v1beta1/pagination.js +0 -227
  124. package/dist/main/cosmos/feegrant/v1beta1/query.d.ts +0 -512
  125. package/dist/main/cosmos/feegrant/v1beta1/query.js +0 -460
  126. package/dist/main/cosmos/feegrant/v1beta1/tx.d.ts +0 -143
  127. package/dist/main/cosmos/feegrant/v1beta1/tx.js +0 -252
  128. package/dist/main/cosmos/gov/v1beta1/genesis.d.ts +0 -639
  129. package/dist/main/cosmos/gov/v1beta1/genesis.js +0 -194
  130. package/dist/main/cosmos/gov/v1beta1/gov.d.ts +0 -620
  131. package/dist/main/cosmos/gov/v1beta1/gov.js +0 -1037
  132. package/dist/main/cosmos/gov/v1beta1/pagination.d.ts +0 -128
  133. package/dist/main/cosmos/gov/v1beta1/pagination.js +0 -227
  134. package/dist/main/cosmos/gov/v1beta1/query.d.ts +0 -1511
  135. package/dist/main/cosmos/gov/v1beta1/query.js +0 -1186
  136. package/dist/main/cosmos/gov/v1beta1/tx.d.ts +0 -350
  137. package/dist/main/cosmos/gov/v1beta1/tx.js +0 -566
  138. package/dist/main/cosmos/msg/v1/msg.d.ts +0 -1
  139. package/dist/main/cosmos/msg/v1/msg.js +0 -5
  140. package/dist/main/cosmos/staking/v1beta1/authz.d.ts +0 -145
  141. package/dist/main/cosmos/staking/v1beta1/authz.js +0 -224
  142. package/dist/main/cosmos/staking/v1beta1/genesis.d.ts +0 -899
  143. package/dist/main/cosmos/staking/v1beta1/genesis.js +0 -305
  144. package/dist/main/cosmos/staking/v1beta1/pagination.d.ts +0 -128
  145. package/dist/main/cosmos/staking/v1beta1/pagination.js +0 -227
  146. package/dist/main/cosmos/staking/v1beta1/query.d.ts +0 -4165
  147. package/dist/main/cosmos/staking/v1beta1/query.js +0 -2019
  148. package/dist/main/cosmos/staking/v1beta1/staking.d.ts +0 -2059
  149. package/dist/main/cosmos/staking/v1beta1/staking.js +0 -2127
  150. package/dist/main/cosmos/staking/v1beta1/tx.d.ts +0 -748
  151. package/dist/main/cosmos/staking/v1beta1/tx.js +0 -1141
  152. package/dist/main/cosmos/tx/signing/v1beta1/signing.d.ts +0 -1938
  153. package/dist/main/cosmos/tx/signing/v1beta1/signing.js +0 -546
  154. package/dist/main/cosmos/tx/v1beta1/tx.d.ts +0 -3468
  155. package/dist/main/cosmos/tx/v1beta1/tx.js +0 -1276
  156. package/dist/main/cosmos/vesting/v1beta1/tx.d.ts +0 -350
  157. package/dist/main/cosmos/vesting/v1beta1/tx.js +0 -454
  158. package/dist/main/cosmos/vesting/v1beta1/vesting.d.ts +0 -1305
  159. package/dist/main/cosmos/vesting/v1beta1/vesting.js +0 -498
  160. package/dist/module/cosmos/auth/v1beta1/auth.d.ts +0 -229
  161. package/dist/module/cosmos/auth/v1beta1/auth.js +0 -427
  162. package/dist/module/cosmos/authz/v1beta1/authz.d.ts +0 -167
  163. package/dist/module/cosmos/authz/v1beta1/authz.js +0 -309
  164. package/dist/module/cosmos/authz/v1beta1/event.d.ts +0 -80
  165. package/dist/module/cosmos/authz/v1beta1/event.js +0 -154
  166. package/dist/module/cosmos/authz/v1beta1/genesis.d.ts +0 -121
  167. package/dist/module/cosmos/authz/v1beta1/genesis.js +0 -61
  168. package/dist/module/cosmos/authz/v1beta1/pagination.d.ts +0 -128
  169. package/dist/module/cosmos/authz/v1beta1/pagination.js +0 -219
  170. package/dist/module/cosmos/authz/v1beta1/query.d.ts +0 -616
  171. package/dist/module/cosmos/authz/v1beta1/query.js +0 -501
  172. package/dist/module/cosmos/authz/v1beta1/tx.d.ts +0 -264
  173. package/dist/module/cosmos/authz/v1beta1/tx.js +0 -426
  174. package/dist/module/cosmos/bank/v1beta1/authz.d.ts +0 -80
  175. package/dist/module/cosmos/bank/v1beta1/authz.js +0 -76
  176. package/dist/module/cosmos/bank/v1beta1/bank.d.ts +0 -440
  177. package/dist/module/cosmos/bank/v1beta1/bank.js +0 -543
  178. package/dist/module/cosmos/bank/v1beta1/genesis.d.ts +0 -473
  179. package/dist/module/cosmos/bank/v1beta1/genesis.js +0 -199
  180. package/dist/module/cosmos/bank/v1beta1/pagination.d.ts +0 -128
  181. package/dist/module/cosmos/bank/v1beta1/pagination.js +0 -219
  182. package/dist/module/cosmos/bank/v1beta1/query.d.ts +0 -1633
  183. package/dist/module/cosmos/bank/v1beta1/query.js +0 -1575
  184. package/dist/module/cosmos/bank/v1beta1/tx.d.ts +0 -514
  185. package/dist/module/cosmos/bank/v1beta1/tx.js +0 -489
  186. package/dist/module/cosmos/base/query/v1beta1/pagination.d.ts +0 -470
  187. package/dist/module/cosmos/base/query/v1beta1/pagination.js +0 -233
  188. package/dist/module/cosmos/base/v1beta1/coin.d.ts +0 -114
  189. package/dist/module/cosmos/base/v1beta1/coin.js +0 -231
  190. package/dist/module/cosmos/crypto/multisig/v1beta1/multisig.d.ts +0 -67
  191. package/dist/module/cosmos/crypto/multisig/v1beta1/multisig.js +0 -164
  192. package/dist/module/cosmos/distribution/v1beta1/distribution.d.ts +0 -638
  193. package/dist/module/cosmos/distribution/v1beta1/distribution.js +0 -869
  194. package/dist/module/cosmos/distribution/v1beta1/genesis.d.ts +0 -1259
  195. package/dist/module/cosmos/distribution/v1beta1/genesis.js +0 -770
  196. package/dist/module/cosmos/distribution/v1beta1/pagination.d.ts +0 -128
  197. package/dist/module/cosmos/distribution/v1beta1/pagination.js +0 -219
  198. package/dist/module/cosmos/distribution/v1beta1/query.d.ts +0 -995
  199. package/dist/module/cosmos/distribution/v1beta1/query.js +0 -1315
  200. package/dist/module/cosmos/distribution/v1beta1/tx.d.ts +0 -593
  201. package/dist/module/cosmos/distribution/v1beta1/tx.js +0 -810
  202. package/dist/module/cosmos/feegrant/v1beta1/feegrant.d.ts +0 -367
  203. package/dist/module/cosmos/feegrant/v1beta1/feegrant.js +0 -402
  204. package/dist/module/cosmos/feegrant/v1beta1/genesis.d.ts +0 -111
  205. package/dist/module/cosmos/feegrant/v1beta1/genesis.js +0 -59
  206. package/dist/module/cosmos/feegrant/v1beta1/pagination.d.ts +0 -128
  207. package/dist/module/cosmos/feegrant/v1beta1/pagination.js +0 -219
  208. package/dist/module/cosmos/feegrant/v1beta1/query.d.ts +0 -512
  209. package/dist/module/cosmos/feegrant/v1beta1/query.js +0 -450
  210. package/dist/module/cosmos/feegrant/v1beta1/tx.d.ts +0 -143
  211. package/dist/module/cosmos/feegrant/v1beta1/tx.js +0 -245
  212. package/dist/module/cosmos/gov/v1beta1/genesis.d.ts +0 -639
  213. package/dist/module/cosmos/gov/v1beta1/genesis.js +0 -187
  214. package/dist/module/cosmos/gov/v1beta1/gov.d.ts +0 -620
  215. package/dist/module/cosmos/gov/v1beta1/gov.js +0 -1019
  216. package/dist/module/cosmos/gov/v1beta1/pagination.d.ts +0 -128
  217. package/dist/module/cosmos/gov/v1beta1/pagination.js +0 -219
  218. package/dist/module/cosmos/gov/v1beta1/query.d.ts +0 -1511
  219. package/dist/module/cosmos/gov/v1beta1/query.js +0 -1170
  220. package/dist/module/cosmos/gov/v1beta1/tx.d.ts +0 -350
  221. package/dist/module/cosmos/gov/v1beta1/tx.js +0 -556
  222. package/dist/module/cosmos/msg/v1/msg.d.ts +0 -1
  223. package/dist/module/cosmos/msg/v1/msg.js +0 -2
  224. package/dist/module/cosmos/staking/v1beta1/authz.d.ts +0 -145
  225. package/dist/module/cosmos/staking/v1beta1/authz.js +0 -214
  226. package/dist/module/cosmos/staking/v1beta1/genesis.d.ts +0 -899
  227. package/dist/module/cosmos/staking/v1beta1/genesis.js +0 -297
  228. package/dist/module/cosmos/staking/v1beta1/pagination.d.ts +0 -128
  229. package/dist/module/cosmos/staking/v1beta1/pagination.js +0 -219
  230. package/dist/module/cosmos/staking/v1beta1/query.d.ts +0 -4165
  231. package/dist/module/cosmos/staking/v1beta1/query.js +0 -1995
  232. package/dist/module/cosmos/staking/v1beta1/staking.d.ts +0 -2059
  233. package/dist/module/cosmos/staking/v1beta1/staking.js +0 -2097
  234. package/dist/module/cosmos/staking/v1beta1/tx.d.ts +0 -748
  235. package/dist/module/cosmos/staking/v1beta1/tx.js +0 -1127
  236. package/dist/module/cosmos/tx/signing/v1beta1/signing.d.ts +0 -1938
  237. package/dist/module/cosmos/tx/signing/v1beta1/signing.js +0 -534
  238. package/dist/module/cosmos/tx/v1beta1/tx.d.ts +0 -3468
  239. package/dist/module/cosmos/tx/v1beta1/tx.js +0 -1258
  240. package/dist/module/cosmos/vesting/v1beta1/tx.d.ts +0 -350
  241. package/dist/module/cosmos/vesting/v1beta1/tx.js +0 -446
  242. package/dist/module/cosmos/vesting/v1beta1/vesting.d.ts +0 -1305
  243. package/dist/module/cosmos/vesting/v1beta1/vesting.js +0 -488
@@ -1,770 +0,0 @@
1
- /* eslint-disable */
2
- import Long from "long";
3
- import _m0 from "protobufjs/minimal";
4
- import { DecCoin } from "../../base/v1beta1/coin";
5
- import { DelegatorStartingInfo, FeePool, Params, ValidatorAccumulatedCommission, ValidatorCurrentRewards, ValidatorHistoricalRewards, ValidatorSlashEvent, } from "./distribution";
6
- export const protobufPackage = "cosmos.distribution.v1beta1";
7
- function createBaseDelegatorWithdrawInfo() {
8
- return { delegatorAddress: "", withdrawAddress: "" };
9
- }
10
- export const DelegatorWithdrawInfo = {
11
- encode(message, writer = _m0.Writer.create()) {
12
- if (message.delegatorAddress !== "") {
13
- writer.uint32(10).string(message.delegatorAddress);
14
- }
15
- if (message.withdrawAddress !== "") {
16
- writer.uint32(18).string(message.withdrawAddress);
17
- }
18
- return writer;
19
- },
20
- decode(input, length) {
21
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
22
- let end = length === undefined ? reader.len : reader.pos + length;
23
- const message = createBaseDelegatorWithdrawInfo();
24
- while (reader.pos < end) {
25
- const tag = reader.uint32();
26
- switch (tag >>> 3) {
27
- case 1:
28
- if (tag !== 10) {
29
- break;
30
- }
31
- message.delegatorAddress = reader.string();
32
- continue;
33
- case 2:
34
- if (tag !== 18) {
35
- break;
36
- }
37
- message.withdrawAddress = reader.string();
38
- continue;
39
- }
40
- if ((tag & 7) === 4 || tag === 0) {
41
- break;
42
- }
43
- reader.skipType(tag & 7);
44
- }
45
- return message;
46
- },
47
- fromJSON(object) {
48
- return {
49
- delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "",
50
- withdrawAddress: isSet(object.withdrawAddress) ? String(object.withdrawAddress) : "",
51
- };
52
- },
53
- toJSON(message) {
54
- const obj = {};
55
- message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
56
- message.withdrawAddress !== undefined && (obj.withdrawAddress = message.withdrawAddress);
57
- return obj;
58
- },
59
- create(base) {
60
- return DelegatorWithdrawInfo.fromPartial(base ?? {});
61
- },
62
- fromPartial(object) {
63
- const message = createBaseDelegatorWithdrawInfo();
64
- message.delegatorAddress = object.delegatorAddress ?? "";
65
- message.withdrawAddress = object.withdrawAddress ?? "";
66
- return message;
67
- },
68
- };
69
- function createBaseValidatorOutstandingRewardsRecord() {
70
- return { validatorAddress: "", outstandingRewards: [] };
71
- }
72
- export const ValidatorOutstandingRewardsRecord = {
73
- encode(message, writer = _m0.Writer.create()) {
74
- if (message.validatorAddress !== "") {
75
- writer.uint32(10).string(message.validatorAddress);
76
- }
77
- for (const v of message.outstandingRewards) {
78
- DecCoin.encode(v, writer.uint32(18).fork()).ldelim();
79
- }
80
- return writer;
81
- },
82
- decode(input, length) {
83
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
84
- let end = length === undefined ? reader.len : reader.pos + length;
85
- const message = createBaseValidatorOutstandingRewardsRecord();
86
- while (reader.pos < end) {
87
- const tag = reader.uint32();
88
- switch (tag >>> 3) {
89
- case 1:
90
- if (tag !== 10) {
91
- break;
92
- }
93
- message.validatorAddress = reader.string();
94
- continue;
95
- case 2:
96
- if (tag !== 18) {
97
- break;
98
- }
99
- message.outstandingRewards.push(DecCoin.decode(reader, reader.uint32()));
100
- continue;
101
- }
102
- if ((tag & 7) === 4 || tag === 0) {
103
- break;
104
- }
105
- reader.skipType(tag & 7);
106
- }
107
- return message;
108
- },
109
- fromJSON(object) {
110
- return {
111
- validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "",
112
- outstandingRewards: Array.isArray(object?.outstandingRewards)
113
- ? object.outstandingRewards.map((e) => DecCoin.fromJSON(e))
114
- : [],
115
- };
116
- },
117
- toJSON(message) {
118
- const obj = {};
119
- message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
120
- if (message.outstandingRewards) {
121
- obj.outstandingRewards = message.outstandingRewards.map((e) => e ? DecCoin.toJSON(e) : undefined);
122
- }
123
- else {
124
- obj.outstandingRewards = [];
125
- }
126
- return obj;
127
- },
128
- create(base) {
129
- return ValidatorOutstandingRewardsRecord.fromPartial(base ?? {});
130
- },
131
- fromPartial(object) {
132
- const message = createBaseValidatorOutstandingRewardsRecord();
133
- message.validatorAddress = object.validatorAddress ?? "";
134
- message.outstandingRewards = object.outstandingRewards?.map((e) => DecCoin.fromPartial(e)) || [];
135
- return message;
136
- },
137
- };
138
- function createBaseValidatorAccumulatedCommissionRecord() {
139
- return { validatorAddress: "", accumulated: undefined };
140
- }
141
- export const ValidatorAccumulatedCommissionRecord = {
142
- encode(message, writer = _m0.Writer.create()) {
143
- if (message.validatorAddress !== "") {
144
- writer.uint32(10).string(message.validatorAddress);
145
- }
146
- if (message.accumulated !== undefined) {
147
- ValidatorAccumulatedCommission.encode(message.accumulated, writer.uint32(18).fork()).ldelim();
148
- }
149
- return writer;
150
- },
151
- decode(input, length) {
152
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
153
- let end = length === undefined ? reader.len : reader.pos + length;
154
- const message = createBaseValidatorAccumulatedCommissionRecord();
155
- while (reader.pos < end) {
156
- const tag = reader.uint32();
157
- switch (tag >>> 3) {
158
- case 1:
159
- if (tag !== 10) {
160
- break;
161
- }
162
- message.validatorAddress = reader.string();
163
- continue;
164
- case 2:
165
- if (tag !== 18) {
166
- break;
167
- }
168
- message.accumulated = ValidatorAccumulatedCommission.decode(reader, reader.uint32());
169
- continue;
170
- }
171
- if ((tag & 7) === 4 || tag === 0) {
172
- break;
173
- }
174
- reader.skipType(tag & 7);
175
- }
176
- return message;
177
- },
178
- fromJSON(object) {
179
- return {
180
- validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "",
181
- accumulated: isSet(object.accumulated) ? ValidatorAccumulatedCommission.fromJSON(object.accumulated) : undefined,
182
- };
183
- },
184
- toJSON(message) {
185
- const obj = {};
186
- message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
187
- message.accumulated !== undefined &&
188
- (obj.accumulated = message.accumulated ? ValidatorAccumulatedCommission.toJSON(message.accumulated) : undefined);
189
- return obj;
190
- },
191
- create(base) {
192
- return ValidatorAccumulatedCommissionRecord.fromPartial(base ?? {});
193
- },
194
- fromPartial(object) {
195
- const message = createBaseValidatorAccumulatedCommissionRecord();
196
- message.validatorAddress = object.validatorAddress ?? "";
197
- message.accumulated = (object.accumulated !== undefined && object.accumulated !== null)
198
- ? ValidatorAccumulatedCommission.fromPartial(object.accumulated)
199
- : undefined;
200
- return message;
201
- },
202
- };
203
- function createBaseValidatorHistoricalRewardsRecord() {
204
- return { validatorAddress: "", period: 0, rewards: undefined };
205
- }
206
- export const ValidatorHistoricalRewardsRecord = {
207
- encode(message, writer = _m0.Writer.create()) {
208
- if (message.validatorAddress !== "") {
209
- writer.uint32(10).string(message.validatorAddress);
210
- }
211
- if (message.period !== 0) {
212
- writer.uint32(16).uint64(message.period);
213
- }
214
- if (message.rewards !== undefined) {
215
- ValidatorHistoricalRewards.encode(message.rewards, writer.uint32(26).fork()).ldelim();
216
- }
217
- return writer;
218
- },
219
- decode(input, length) {
220
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
221
- let end = length === undefined ? reader.len : reader.pos + length;
222
- const message = createBaseValidatorHistoricalRewardsRecord();
223
- while (reader.pos < end) {
224
- const tag = reader.uint32();
225
- switch (tag >>> 3) {
226
- case 1:
227
- if (tag !== 10) {
228
- break;
229
- }
230
- message.validatorAddress = reader.string();
231
- continue;
232
- case 2:
233
- if (tag !== 16) {
234
- break;
235
- }
236
- message.period = longToNumber(reader.uint64());
237
- continue;
238
- case 3:
239
- if (tag !== 26) {
240
- break;
241
- }
242
- message.rewards = ValidatorHistoricalRewards.decode(reader, reader.uint32());
243
- continue;
244
- }
245
- if ((tag & 7) === 4 || tag === 0) {
246
- break;
247
- }
248
- reader.skipType(tag & 7);
249
- }
250
- return message;
251
- },
252
- fromJSON(object) {
253
- return {
254
- validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "",
255
- period: isSet(object.period) ? Number(object.period) : 0,
256
- rewards: isSet(object.rewards) ? ValidatorHistoricalRewards.fromJSON(object.rewards) : undefined,
257
- };
258
- },
259
- toJSON(message) {
260
- const obj = {};
261
- message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
262
- message.period !== undefined && (obj.period = Math.round(message.period));
263
- message.rewards !== undefined &&
264
- (obj.rewards = message.rewards ? ValidatorHistoricalRewards.toJSON(message.rewards) : undefined);
265
- return obj;
266
- },
267
- create(base) {
268
- return ValidatorHistoricalRewardsRecord.fromPartial(base ?? {});
269
- },
270
- fromPartial(object) {
271
- const message = createBaseValidatorHistoricalRewardsRecord();
272
- message.validatorAddress = object.validatorAddress ?? "";
273
- message.period = object.period ?? 0;
274
- message.rewards = (object.rewards !== undefined && object.rewards !== null)
275
- ? ValidatorHistoricalRewards.fromPartial(object.rewards)
276
- : undefined;
277
- return message;
278
- },
279
- };
280
- function createBaseValidatorCurrentRewardsRecord() {
281
- return { validatorAddress: "", rewards: undefined };
282
- }
283
- export const ValidatorCurrentRewardsRecord = {
284
- encode(message, writer = _m0.Writer.create()) {
285
- if (message.validatorAddress !== "") {
286
- writer.uint32(10).string(message.validatorAddress);
287
- }
288
- if (message.rewards !== undefined) {
289
- ValidatorCurrentRewards.encode(message.rewards, writer.uint32(18).fork()).ldelim();
290
- }
291
- return writer;
292
- },
293
- decode(input, length) {
294
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
295
- let end = length === undefined ? reader.len : reader.pos + length;
296
- const message = createBaseValidatorCurrentRewardsRecord();
297
- while (reader.pos < end) {
298
- const tag = reader.uint32();
299
- switch (tag >>> 3) {
300
- case 1:
301
- if (tag !== 10) {
302
- break;
303
- }
304
- message.validatorAddress = reader.string();
305
- continue;
306
- case 2:
307
- if (tag !== 18) {
308
- break;
309
- }
310
- message.rewards = ValidatorCurrentRewards.decode(reader, reader.uint32());
311
- continue;
312
- }
313
- if ((tag & 7) === 4 || tag === 0) {
314
- break;
315
- }
316
- reader.skipType(tag & 7);
317
- }
318
- return message;
319
- },
320
- fromJSON(object) {
321
- return {
322
- validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "",
323
- rewards: isSet(object.rewards) ? ValidatorCurrentRewards.fromJSON(object.rewards) : undefined,
324
- };
325
- },
326
- toJSON(message) {
327
- const obj = {};
328
- message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
329
- message.rewards !== undefined &&
330
- (obj.rewards = message.rewards ? ValidatorCurrentRewards.toJSON(message.rewards) : undefined);
331
- return obj;
332
- },
333
- create(base) {
334
- return ValidatorCurrentRewardsRecord.fromPartial(base ?? {});
335
- },
336
- fromPartial(object) {
337
- const message = createBaseValidatorCurrentRewardsRecord();
338
- message.validatorAddress = object.validatorAddress ?? "";
339
- message.rewards = (object.rewards !== undefined && object.rewards !== null)
340
- ? ValidatorCurrentRewards.fromPartial(object.rewards)
341
- : undefined;
342
- return message;
343
- },
344
- };
345
- function createBaseDelegatorStartingInfoRecord() {
346
- return { delegatorAddress: "", validatorAddress: "", startingInfo: undefined };
347
- }
348
- export const DelegatorStartingInfoRecord = {
349
- encode(message, writer = _m0.Writer.create()) {
350
- if (message.delegatorAddress !== "") {
351
- writer.uint32(10).string(message.delegatorAddress);
352
- }
353
- if (message.validatorAddress !== "") {
354
- writer.uint32(18).string(message.validatorAddress);
355
- }
356
- if (message.startingInfo !== undefined) {
357
- DelegatorStartingInfo.encode(message.startingInfo, writer.uint32(26).fork()).ldelim();
358
- }
359
- return writer;
360
- },
361
- decode(input, length) {
362
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
363
- let end = length === undefined ? reader.len : reader.pos + length;
364
- const message = createBaseDelegatorStartingInfoRecord();
365
- while (reader.pos < end) {
366
- const tag = reader.uint32();
367
- switch (tag >>> 3) {
368
- case 1:
369
- if (tag !== 10) {
370
- break;
371
- }
372
- message.delegatorAddress = reader.string();
373
- continue;
374
- case 2:
375
- if (tag !== 18) {
376
- break;
377
- }
378
- message.validatorAddress = reader.string();
379
- continue;
380
- case 3:
381
- if (tag !== 26) {
382
- break;
383
- }
384
- message.startingInfo = DelegatorStartingInfo.decode(reader, reader.uint32());
385
- continue;
386
- }
387
- if ((tag & 7) === 4 || tag === 0) {
388
- break;
389
- }
390
- reader.skipType(tag & 7);
391
- }
392
- return message;
393
- },
394
- fromJSON(object) {
395
- return {
396
- delegatorAddress: isSet(object.delegatorAddress) ? String(object.delegatorAddress) : "",
397
- validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "",
398
- startingInfo: isSet(object.startingInfo) ? DelegatorStartingInfo.fromJSON(object.startingInfo) : undefined,
399
- };
400
- },
401
- toJSON(message) {
402
- const obj = {};
403
- message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
404
- message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
405
- message.startingInfo !== undefined &&
406
- (obj.startingInfo = message.startingInfo ? DelegatorStartingInfo.toJSON(message.startingInfo) : undefined);
407
- return obj;
408
- },
409
- create(base) {
410
- return DelegatorStartingInfoRecord.fromPartial(base ?? {});
411
- },
412
- fromPartial(object) {
413
- const message = createBaseDelegatorStartingInfoRecord();
414
- message.delegatorAddress = object.delegatorAddress ?? "";
415
- message.validatorAddress = object.validatorAddress ?? "";
416
- message.startingInfo = (object.startingInfo !== undefined && object.startingInfo !== null)
417
- ? DelegatorStartingInfo.fromPartial(object.startingInfo)
418
- : undefined;
419
- return message;
420
- },
421
- };
422
- function createBaseValidatorSlashEventRecord() {
423
- return { validatorAddress: "", height: 0, period: 0, validatorSlashEvent: undefined };
424
- }
425
- export const ValidatorSlashEventRecord = {
426
- encode(message, writer = _m0.Writer.create()) {
427
- if (message.validatorAddress !== "") {
428
- writer.uint32(10).string(message.validatorAddress);
429
- }
430
- if (message.height !== 0) {
431
- writer.uint32(16).uint64(message.height);
432
- }
433
- if (message.period !== 0) {
434
- writer.uint32(24).uint64(message.period);
435
- }
436
- if (message.validatorSlashEvent !== undefined) {
437
- ValidatorSlashEvent.encode(message.validatorSlashEvent, writer.uint32(34).fork()).ldelim();
438
- }
439
- return writer;
440
- },
441
- decode(input, length) {
442
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
443
- let end = length === undefined ? reader.len : reader.pos + length;
444
- const message = createBaseValidatorSlashEventRecord();
445
- while (reader.pos < end) {
446
- const tag = reader.uint32();
447
- switch (tag >>> 3) {
448
- case 1:
449
- if (tag !== 10) {
450
- break;
451
- }
452
- message.validatorAddress = reader.string();
453
- continue;
454
- case 2:
455
- if (tag !== 16) {
456
- break;
457
- }
458
- message.height = longToNumber(reader.uint64());
459
- continue;
460
- case 3:
461
- if (tag !== 24) {
462
- break;
463
- }
464
- message.period = longToNumber(reader.uint64());
465
- continue;
466
- case 4:
467
- if (tag !== 34) {
468
- break;
469
- }
470
- message.validatorSlashEvent = ValidatorSlashEvent.decode(reader, reader.uint32());
471
- continue;
472
- }
473
- if ((tag & 7) === 4 || tag === 0) {
474
- break;
475
- }
476
- reader.skipType(tag & 7);
477
- }
478
- return message;
479
- },
480
- fromJSON(object) {
481
- return {
482
- validatorAddress: isSet(object.validatorAddress) ? String(object.validatorAddress) : "",
483
- height: isSet(object.height) ? Number(object.height) : 0,
484
- period: isSet(object.period) ? Number(object.period) : 0,
485
- validatorSlashEvent: isSet(object.validatorSlashEvent)
486
- ? ValidatorSlashEvent.fromJSON(object.validatorSlashEvent)
487
- : undefined,
488
- };
489
- },
490
- toJSON(message) {
491
- const obj = {};
492
- message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
493
- message.height !== undefined && (obj.height = Math.round(message.height));
494
- message.period !== undefined && (obj.period = Math.round(message.period));
495
- message.validatorSlashEvent !== undefined && (obj.validatorSlashEvent = message.validatorSlashEvent
496
- ? ValidatorSlashEvent.toJSON(message.validatorSlashEvent)
497
- : undefined);
498
- return obj;
499
- },
500
- create(base) {
501
- return ValidatorSlashEventRecord.fromPartial(base ?? {});
502
- },
503
- fromPartial(object) {
504
- const message = createBaseValidatorSlashEventRecord();
505
- message.validatorAddress = object.validatorAddress ?? "";
506
- message.height = object.height ?? 0;
507
- message.period = object.period ?? 0;
508
- message.validatorSlashEvent = (object.validatorSlashEvent !== undefined && object.validatorSlashEvent !== null)
509
- ? ValidatorSlashEvent.fromPartial(object.validatorSlashEvent)
510
- : undefined;
511
- return message;
512
- },
513
- };
514
- function createBaseGenesisState() {
515
- return {
516
- params: undefined,
517
- feePool: undefined,
518
- delegatorWithdrawInfos: [],
519
- previousProposer: "",
520
- outstandingRewards: [],
521
- validatorAccumulatedCommissions: [],
522
- validatorHistoricalRewards: [],
523
- validatorCurrentRewards: [],
524
- delegatorStartingInfos: [],
525
- validatorSlashEvents: [],
526
- };
527
- }
528
- export const GenesisState = {
529
- encode(message, writer = _m0.Writer.create()) {
530
- if (message.params !== undefined) {
531
- Params.encode(message.params, writer.uint32(10).fork()).ldelim();
532
- }
533
- if (message.feePool !== undefined) {
534
- FeePool.encode(message.feePool, writer.uint32(18).fork()).ldelim();
535
- }
536
- for (const v of message.delegatorWithdrawInfos) {
537
- DelegatorWithdrawInfo.encode(v, writer.uint32(26).fork()).ldelim();
538
- }
539
- if (message.previousProposer !== "") {
540
- writer.uint32(34).string(message.previousProposer);
541
- }
542
- for (const v of message.outstandingRewards) {
543
- ValidatorOutstandingRewardsRecord.encode(v, writer.uint32(42).fork()).ldelim();
544
- }
545
- for (const v of message.validatorAccumulatedCommissions) {
546
- ValidatorAccumulatedCommissionRecord.encode(v, writer.uint32(50).fork()).ldelim();
547
- }
548
- for (const v of message.validatorHistoricalRewards) {
549
- ValidatorHistoricalRewardsRecord.encode(v, writer.uint32(58).fork()).ldelim();
550
- }
551
- for (const v of message.validatorCurrentRewards) {
552
- ValidatorCurrentRewardsRecord.encode(v, writer.uint32(66).fork()).ldelim();
553
- }
554
- for (const v of message.delegatorStartingInfos) {
555
- DelegatorStartingInfoRecord.encode(v, writer.uint32(74).fork()).ldelim();
556
- }
557
- for (const v of message.validatorSlashEvents) {
558
- ValidatorSlashEventRecord.encode(v, writer.uint32(82).fork()).ldelim();
559
- }
560
- return writer;
561
- },
562
- decode(input, length) {
563
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
564
- let end = length === undefined ? reader.len : reader.pos + length;
565
- const message = createBaseGenesisState();
566
- while (reader.pos < end) {
567
- const tag = reader.uint32();
568
- switch (tag >>> 3) {
569
- case 1:
570
- if (tag !== 10) {
571
- break;
572
- }
573
- message.params = Params.decode(reader, reader.uint32());
574
- continue;
575
- case 2:
576
- if (tag !== 18) {
577
- break;
578
- }
579
- message.feePool = FeePool.decode(reader, reader.uint32());
580
- continue;
581
- case 3:
582
- if (tag !== 26) {
583
- break;
584
- }
585
- message.delegatorWithdrawInfos.push(DelegatorWithdrawInfo.decode(reader, reader.uint32()));
586
- continue;
587
- case 4:
588
- if (tag !== 34) {
589
- break;
590
- }
591
- message.previousProposer = reader.string();
592
- continue;
593
- case 5:
594
- if (tag !== 42) {
595
- break;
596
- }
597
- message.outstandingRewards.push(ValidatorOutstandingRewardsRecord.decode(reader, reader.uint32()));
598
- continue;
599
- case 6:
600
- if (tag !== 50) {
601
- break;
602
- }
603
- message.validatorAccumulatedCommissions.push(ValidatorAccumulatedCommissionRecord.decode(reader, reader.uint32()));
604
- continue;
605
- case 7:
606
- if (tag !== 58) {
607
- break;
608
- }
609
- message.validatorHistoricalRewards.push(ValidatorHistoricalRewardsRecord.decode(reader, reader.uint32()));
610
- continue;
611
- case 8:
612
- if (tag !== 66) {
613
- break;
614
- }
615
- message.validatorCurrentRewards.push(ValidatorCurrentRewardsRecord.decode(reader, reader.uint32()));
616
- continue;
617
- case 9:
618
- if (tag !== 74) {
619
- break;
620
- }
621
- message.delegatorStartingInfos.push(DelegatorStartingInfoRecord.decode(reader, reader.uint32()));
622
- continue;
623
- case 10:
624
- if (tag !== 82) {
625
- break;
626
- }
627
- message.validatorSlashEvents.push(ValidatorSlashEventRecord.decode(reader, reader.uint32()));
628
- continue;
629
- }
630
- if ((tag & 7) === 4 || tag === 0) {
631
- break;
632
- }
633
- reader.skipType(tag & 7);
634
- }
635
- return message;
636
- },
637
- fromJSON(object) {
638
- return {
639
- params: isSet(object.params) ? Params.fromJSON(object.params) : undefined,
640
- feePool: isSet(object.feePool) ? FeePool.fromJSON(object.feePool) : undefined,
641
- delegatorWithdrawInfos: Array.isArray(object?.delegatorWithdrawInfos)
642
- ? object.delegatorWithdrawInfos.map((e) => DelegatorWithdrawInfo.fromJSON(e))
643
- : [],
644
- previousProposer: isSet(object.previousProposer) ? String(object.previousProposer) : "",
645
- outstandingRewards: Array.isArray(object?.outstandingRewards)
646
- ? object.outstandingRewards.map((e) => ValidatorOutstandingRewardsRecord.fromJSON(e))
647
- : [],
648
- validatorAccumulatedCommissions: Array.isArray(object?.validatorAccumulatedCommissions)
649
- ? object.validatorAccumulatedCommissions.map((e) => ValidatorAccumulatedCommissionRecord.fromJSON(e))
650
- : [],
651
- validatorHistoricalRewards: Array.isArray(object?.validatorHistoricalRewards)
652
- ? object.validatorHistoricalRewards.map((e) => ValidatorHistoricalRewardsRecord.fromJSON(e))
653
- : [],
654
- validatorCurrentRewards: Array.isArray(object?.validatorCurrentRewards)
655
- ? object.validatorCurrentRewards.map((e) => ValidatorCurrentRewardsRecord.fromJSON(e))
656
- : [],
657
- delegatorStartingInfos: Array.isArray(object?.delegatorStartingInfos)
658
- ? object.delegatorStartingInfos.map((e) => DelegatorStartingInfoRecord.fromJSON(e))
659
- : [],
660
- validatorSlashEvents: Array.isArray(object?.validatorSlashEvents)
661
- ? object.validatorSlashEvents.map((e) => ValidatorSlashEventRecord.fromJSON(e))
662
- : [],
663
- };
664
- },
665
- toJSON(message) {
666
- const obj = {};
667
- message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined);
668
- message.feePool !== undefined && (obj.feePool = message.feePool ? FeePool.toJSON(message.feePool) : undefined);
669
- if (message.delegatorWithdrawInfos) {
670
- obj.delegatorWithdrawInfos = message.delegatorWithdrawInfos.map((e) => e ? DelegatorWithdrawInfo.toJSON(e) : undefined);
671
- }
672
- else {
673
- obj.delegatorWithdrawInfos = [];
674
- }
675
- message.previousProposer !== undefined && (obj.previousProposer = message.previousProposer);
676
- if (message.outstandingRewards) {
677
- obj.outstandingRewards = message.outstandingRewards.map((e) => e ? ValidatorOutstandingRewardsRecord.toJSON(e) : undefined);
678
- }
679
- else {
680
- obj.outstandingRewards = [];
681
- }
682
- if (message.validatorAccumulatedCommissions) {
683
- obj.validatorAccumulatedCommissions = message.validatorAccumulatedCommissions.map((e) => e ? ValidatorAccumulatedCommissionRecord.toJSON(e) : undefined);
684
- }
685
- else {
686
- obj.validatorAccumulatedCommissions = [];
687
- }
688
- if (message.validatorHistoricalRewards) {
689
- obj.validatorHistoricalRewards = message.validatorHistoricalRewards.map((e) => e ? ValidatorHistoricalRewardsRecord.toJSON(e) : undefined);
690
- }
691
- else {
692
- obj.validatorHistoricalRewards = [];
693
- }
694
- if (message.validatorCurrentRewards) {
695
- obj.validatorCurrentRewards = message.validatorCurrentRewards.map((e) => e ? ValidatorCurrentRewardsRecord.toJSON(e) : undefined);
696
- }
697
- else {
698
- obj.validatorCurrentRewards = [];
699
- }
700
- if (message.delegatorStartingInfos) {
701
- obj.delegatorStartingInfos = message.delegatorStartingInfos.map((e) => e ? DelegatorStartingInfoRecord.toJSON(e) : undefined);
702
- }
703
- else {
704
- obj.delegatorStartingInfos = [];
705
- }
706
- if (message.validatorSlashEvents) {
707
- obj.validatorSlashEvents = message.validatorSlashEvents.map((e) => e ? ValidatorSlashEventRecord.toJSON(e) : undefined);
708
- }
709
- else {
710
- obj.validatorSlashEvents = [];
711
- }
712
- return obj;
713
- },
714
- create(base) {
715
- return GenesisState.fromPartial(base ?? {});
716
- },
717
- fromPartial(object) {
718
- const message = createBaseGenesisState();
719
- message.params = (object.params !== undefined && object.params !== null)
720
- ? Params.fromPartial(object.params)
721
- : undefined;
722
- message.feePool = (object.feePool !== undefined && object.feePool !== null)
723
- ? FeePool.fromPartial(object.feePool)
724
- : undefined;
725
- message.delegatorWithdrawInfos = object.delegatorWithdrawInfos?.map((e) => DelegatorWithdrawInfo.fromPartial(e)) ||
726
- [];
727
- message.previousProposer = object.previousProposer ?? "";
728
- message.outstandingRewards =
729
- object.outstandingRewards?.map((e) => ValidatorOutstandingRewardsRecord.fromPartial(e)) || [];
730
- message.validatorAccumulatedCommissions =
731
- object.validatorAccumulatedCommissions?.map((e) => ValidatorAccumulatedCommissionRecord.fromPartial(e)) || [];
732
- message.validatorHistoricalRewards =
733
- object.validatorHistoricalRewards?.map((e) => ValidatorHistoricalRewardsRecord.fromPartial(e)) || [];
734
- message.validatorCurrentRewards =
735
- object.validatorCurrentRewards?.map((e) => ValidatorCurrentRewardsRecord.fromPartial(e)) || [];
736
- message.delegatorStartingInfos =
737
- object.delegatorStartingInfos?.map((e) => DelegatorStartingInfoRecord.fromPartial(e)) || [];
738
- message.validatorSlashEvents = object.validatorSlashEvents?.map((e) => ValidatorSlashEventRecord.fromPartial(e)) ||
739
- [];
740
- return message;
741
- },
742
- };
743
- var tsProtoGlobalThis = (() => {
744
- if (typeof globalThis !== "undefined") {
745
- return globalThis;
746
- }
747
- if (typeof self !== "undefined") {
748
- return self;
749
- }
750
- if (typeof window !== "undefined") {
751
- return window;
752
- }
753
- if (typeof global !== "undefined") {
754
- return global;
755
- }
756
- throw "Unable to locate global object";
757
- })();
758
- function longToNumber(long) {
759
- if (long.gt(Number.MAX_SAFE_INTEGER)) {
760
- throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
761
- }
762
- return long.toNumber();
763
- }
764
- if (_m0.util.Long !== Long) {
765
- _m0.util.Long = Long;
766
- _m0.configure();
767
- }
768
- function isSet(value) {
769
- return value !== null && value !== undefined;
770
- }