decentralcardgame-cardchain-client-ts 0.0.31 → 0.0.32

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 (390) hide show
  1. package/lib/index.d.ts +78 -78
  2. package/lib/index.js +23 -23
  3. package/package.json +5 -2
  4. package/cardchain.cardchain/index.ts +0 -6
  5. package/cardchain.cardchain/module.ts +0 -1869
  6. package/cardchain.cardchain/registry.ts +0 -111
  7. package/cardchain.cardchain/rest.ts +0 -655
  8. package/cardchain.cardchain/types.ts +0 -63
  9. package/cardchain.featureflag/index.ts +0 -6
  10. package/cardchain.featureflag/module.ts +0 -165
  11. package/cardchain.featureflag/registry.ts +0 -11
  12. package/cardchain.featureflag/rest.ts +0 -256
  13. package/cardchain.featureflag/types.ts +0 -9
  14. package/client.ts +0 -164
  15. package/cosmos.auth.v1beta1/index.ts +0 -6
  16. package/cosmos.auth.v1beta1/module.ts +0 -136
  17. package/cosmos.auth.v1beta1/registry.ts +0 -9
  18. package/cosmos.auth.v1beta1/rest.ts +0 -403
  19. package/cosmos.auth.v1beta1/types.ts +0 -13
  20. package/cosmos.authz.v1beta1/index.ts +0 -6
  21. package/cosmos.authz.v1beta1/module.ts +0 -206
  22. package/cosmos.authz.v1beta1/registry.ts +0 -13
  23. package/cosmos.authz.v1beta1/rest.ts +0 -256
  24. package/cosmos.authz.v1beta1/types.ts +0 -17
  25. package/cosmos.bank.v1beta1/index.ts +0 -6
  26. package/cosmos.bank.v1beta1/module.ts +0 -247
  27. package/cosmos.bank.v1beta1/registry.ts +0 -15
  28. package/cosmos.bank.v1beta1/rest.ts +0 -466
  29. package/cosmos.bank.v1beta1/types.ts +0 -25
  30. package/cosmos.base.node.v1beta1/index.ts +0 -6
  31. package/cosmos.base.node.v1beta1/module.ts +0 -95
  32. package/cosmos.base.node.v1beta1/registry.ts +0 -7
  33. package/cosmos.base.node.v1beta1/rest.ts +0 -235
  34. package/cosmos.base.node.v1beta1/types.ts +0 -5
  35. package/cosmos.base.tendermint.v1beta1/index.ts +0 -6
  36. package/cosmos.base.tendermint.v1beta1/module.ts +0 -109
  37. package/cosmos.base.tendermint.v1beta1/registry.ts +0 -7
  38. package/cosmos.base.tendermint.v1beta1/rest.ts +0 -340
  39. package/cosmos.base.tendermint.v1beta1/types.ts +0 -19
  40. package/cosmos.circuit.v1/index.ts +0 -6
  41. package/cosmos.circuit.v1/module.ts +0 -198
  42. package/cosmos.circuit.v1/registry.ts +0 -13
  43. package/cosmos.circuit.v1/rest.ts +0 -256
  44. package/cosmos.circuit.v1/types.ts +0 -9
  45. package/cosmos.consensus.v1/index.ts +0 -6
  46. package/cosmos.consensus.v1/module.ts +0 -128
  47. package/cosmos.consensus.v1/registry.ts +0 -9
  48. package/cosmos.consensus.v1/rest.ts +0 -214
  49. package/cosmos.consensus.v1/types.ts +0 -5
  50. package/cosmos.crisis.v1beta1/index.ts +0 -6
  51. package/cosmos.crisis.v1beta1/module.ts +0 -161
  52. package/cosmos.crisis.v1beta1/registry.ts +0 -11
  53. package/cosmos.crisis.v1beta1/rest.ts +0 -193
  54. package/cosmos.crisis.v1beta1/types.ts +0 -5
  55. package/cosmos.distribution.v1beta1/index.ts +0 -6
  56. package/cosmos.distribution.v1beta1/module.ts +0 -364
  57. package/cosmos.distribution.v1beta1/registry.ts +0 -21
  58. package/cosmos.distribution.v1beta1/rest.ts +0 -403
  59. package/cosmos.distribution.v1beta1/types.ts +0 -43
  60. package/cosmos.evidence.v1beta1/index.ts +0 -6
  61. package/cosmos.evidence.v1beta1/module.ts +0 -130
  62. package/cosmos.evidence.v1beta1/registry.ts +0 -9
  63. package/cosmos.evidence.v1beta1/rest.ts +0 -235
  64. package/cosmos.evidence.v1beta1/types.ts +0 -7
  65. package/cosmos.feegrant.v1beta1/index.ts +0 -6
  66. package/cosmos.feegrant.v1beta1/module.ts +0 -202
  67. package/cosmos.feegrant.v1beta1/registry.ts +0 -13
  68. package/cosmos.feegrant.v1beta1/rest.ts +0 -256
  69. package/cosmos.feegrant.v1beta1/types.ts +0 -13
  70. package/cosmos.gov.v1/index.ts +0 -6
  71. package/cosmos.gov.v1/module.ts +0 -344
  72. package/cosmos.gov.v1/registry.ts +0 -21
  73. package/cosmos.gov.v1/rest.ts +0 -382
  74. package/cosmos.gov.v1/types.ts +0 -23
  75. package/cosmos.gov.v1beta1/index.ts +0 -6
  76. package/cosmos.gov.v1beta1/module.ts +0 -245
  77. package/cosmos.gov.v1beta1/registry.ts +0 -15
  78. package/cosmos.gov.v1beta1/rest.ts +0 -361
  79. package/cosmos.gov.v1beta1/types.ts +0 -23
  80. package/cosmos.group.v1/index.ts +0 -6
  81. package/cosmos.group.v1/module.ts +0 -599
  82. package/cosmos.group.v1/registry.ts +0 -35
  83. package/cosmos.group.v1/rest.ts +0 -487
  84. package/cosmos.group.v1/types.ts +0 -47
  85. package/cosmos.mint.v1beta1/index.ts +0 -6
  86. package/cosmos.mint.v1beta1/module.ts +0 -132
  87. package/cosmos.mint.v1beta1/registry.ts +0 -9
  88. package/cosmos.mint.v1beta1/rest.ts +0 -256
  89. package/cosmos.mint.v1beta1/types.ts +0 -9
  90. package/cosmos.nft.v1beta1/index.ts +0 -6
  91. package/cosmos.nft.v1beta1/module.ts +0 -140
  92. package/cosmos.nft.v1beta1/registry.ts +0 -9
  93. package/cosmos.nft.v1beta1/rest.ts +0 -340
  94. package/cosmos.nft.v1beta1/types.ts +0 -17
  95. package/cosmos.params.v1beta1/index.ts +0 -6
  96. package/cosmos.params.v1beta1/module.ts +0 -101
  97. package/cosmos.params.v1beta1/registry.ts +0 -7
  98. package/cosmos.params.v1beta1/rest.ts +0 -235
  99. package/cosmos.params.v1beta1/types.ts +0 -11
  100. package/cosmos.slashing.v1beta1/index.ts +0 -6
  101. package/cosmos.slashing.v1beta1/module.ts +0 -171
  102. package/cosmos.slashing.v1beta1/registry.ts +0 -11
  103. package/cosmos.slashing.v1beta1/rest.ts +0 -256
  104. package/cosmos.slashing.v1beta1/types.ts +0 -15
  105. package/cosmos.staking.v1beta1/index.ts +0 -6
  106. package/cosmos.staking.v1beta1/module.ts +0 -374
  107. package/cosmos.staking.v1beta1/registry.ts +0 -21
  108. package/cosmos.staking.v1beta1/rest.ts +0 -487
  109. package/cosmos.staking.v1beta1/types.ts +0 -53
  110. package/cosmos.tx.v1beta1/index.ts +0 -6
  111. package/cosmos.tx.v1beta1/module.ts +0 -121
  112. package/cosmos.tx.v1beta1/registry.ts +0 -7
  113. package/cosmos.tx.v1beta1/rest.ts +0 -382
  114. package/cosmos.tx.v1beta1/types.ts +0 -31
  115. package/cosmos.upgrade.v1beta1/index.ts +0 -6
  116. package/cosmos.upgrade.v1beta1/module.ts +0 -169
  117. package/cosmos.upgrade.v1beta1/registry.ts +0 -11
  118. package/cosmos.upgrade.v1beta1/rest.ts +0 -298
  119. package/cosmos.upgrade.v1beta1/types.ts +0 -13
  120. package/cosmos.vesting.v1beta1/index.ts +0 -6
  121. package/cosmos.vesting.v1beta1/module.ts +0 -206
  122. package/cosmos.vesting.v1beta1/registry.ts +0 -13
  123. package/cosmos.vesting.v1beta1/rest.ts +0 -193
  124. package/cosmos.vesting.v1beta1/types.ts +0 -17
  125. package/env.ts +0 -7
  126. package/helpers.ts +0 -32
  127. package/ibc.applications.fee.v1/index.ts +0 -6
  128. package/ibc.applications.fee.v1/module.ts +0 -247
  129. package/ibc.applications.fee.v1/registry.ts +0 -15
  130. package/ibc.applications.fee.v1/rest.ts +0 -403
  131. package/ibc.applications.fee.v1/types.ts +0 -25
  132. package/ibc.applications.interchain_accounts.controller.v1/index.ts +0 -6
  133. package/ibc.applications.interchain_accounts.controller.v1/module.ts +0 -196
  134. package/ibc.applications.interchain_accounts.controller.v1/registry.ts +0 -13
  135. package/ibc.applications.interchain_accounts.controller.v1/rest.ts +0 -235
  136. package/ibc.applications.interchain_accounts.controller.v1/types.ts +0 -7
  137. package/ibc.applications.interchain_accounts.host.v1/index.ts +0 -6
  138. package/ibc.applications.interchain_accounts.host.v1/module.ts +0 -165
  139. package/ibc.applications.interchain_accounts.host.v1/registry.ts +0 -11
  140. package/ibc.applications.interchain_accounts.host.v1/rest.ts +0 -214
  141. package/ibc.applications.interchain_accounts.host.v1/types.ts +0 -9
  142. package/ibc.applications.transfer.v1/index.ts +0 -6
  143. package/ibc.applications.transfer.v1/module.ts +0 -169
  144. package/ibc.applications.transfer.v1/registry.ts +0 -11
  145. package/ibc.applications.transfer.v1/rest.ts +0 -319
  146. package/ibc.applications.transfer.v1/types.ts +0 -13
  147. package/ibc.core.channel.v1/index.ts +0 -6
  148. package/ibc.core.channel.v1/module.ts +0 -748
  149. package/ibc.core.channel.v1/registry.ts +0 -45
  150. package/ibc.core.channel.v1/rest.ts +0 -550
  151. package/ibc.core.channel.v1/types.ts +0 -31
  152. package/ibc.core.client.v1/index.ts +0 -6
  153. package/ibc.core.client.v1/module.ts +0 -344
  154. package/ibc.core.client.v1/registry.ts +0 -21
  155. package/ibc.core.client.v1/rest.ts +0 -403
  156. package/ibc.core.client.v1/types.ts +0 -23
  157. package/ibc.core.connection.v1/index.ts +0 -6
  158. package/ibc.core.connection.v1/module.ts +0 -274
  159. package/ibc.core.connection.v1/registry.ts +0 -17
  160. package/ibc.core.connection.v1/rest.ts +0 -319
  161. package/ibc.core.connection.v1/types.ts +0 -19
  162. package/index.ts +0 -81
  163. package/modules.ts +0 -5
  164. package/tsconfig.json +0 -13
  165. package/types/amino/amino.ts +0 -9
  166. package/types/capability/v1/capability.ts +0 -263
  167. package/types/capability/v1/genesis.ts +0 -220
  168. package/types/cardchain/cardchain/card.ts +0 -712
  169. package/types/cardchain/cardchain/card_content.ts +0 -116
  170. package/types/cardchain/cardchain/card_with_image.ts +0 -134
  171. package/types/cardchain/cardchain/council.ts +0 -502
  172. package/types/cardchain/cardchain/encounter.ts +0 -307
  173. package/types/cardchain/cardchain/encounter_with_image.ts +0 -119
  174. package/types/cardchain/cardchain/genesis.ts +0 -403
  175. package/types/cardchain/cardchain/image.ts +0 -122
  176. package/types/cardchain/cardchain/match.ts +0 -453
  177. package/types/cardchain/cardchain/module/module.ts +0 -99
  178. package/types/cardchain/cardchain/params.ts +0 -544
  179. package/types/cardchain/cardchain/query.ts +0 -3786
  180. package/types/cardchain/cardchain/running_average.ts +0 -116
  181. package/types/cardchain/cardchain/sell_offer.ts +0 -224
  182. package/types/cardchain/cardchain/server.ts +0 -144
  183. package/types/cardchain/cardchain/set.ts +0 -537
  184. package/types/cardchain/cardchain/set_with_artwork.ts +0 -142
  185. package/types/cardchain/cardchain/tx.ts +0 -8053
  186. package/types/cardchain/cardchain/user.ts +0 -955
  187. package/types/cardchain/cardchain/voting.ts +0 -328
  188. package/types/cardchain/cardchain/voting_results.ts +0 -227
  189. package/types/cardchain/cardchain/zealy.ts +0 -116
  190. package/types/cardchain/featureflag/flag.ts +0 -133
  191. package/types/cardchain/featureflag/genesis.ts +0 -226
  192. package/types/cardchain/featureflag/module/module.ts +0 -99
  193. package/types/cardchain/featureflag/params.ts +0 -78
  194. package/types/cardchain/featureflag/query.ts +0 -445
  195. package/types/cardchain/featureflag/tx.ts +0 -373
  196. package/types/cosmos/app/runtime/v1alpha1/module.ts +0 -389
  197. package/types/cosmos/app/v1alpha1/config.ts +0 -346
  198. package/types/cosmos/app/v1alpha1/module.ts +0 -348
  199. package/types/cosmos/app/v1alpha1/query.ts +0 -175
  200. package/types/cosmos/auth/module/v1/module.ts +0 -229
  201. package/types/cosmos/auth/v1beta1/auth.ts +0 -531
  202. package/types/cosmos/auth/v1beta1/genesis.ts +0 -125
  203. package/types/cosmos/auth/v1beta1/query.ts +0 -1564
  204. package/types/cosmos/auth/v1beta1/tx.ts +0 -213
  205. package/types/cosmos/authz/module/v1/module.ts +0 -78
  206. package/types/cosmos/authz/v1beta1/authz.ts +0 -411
  207. package/types/cosmos/authz/v1beta1/event.ts +0 -241
  208. package/types/cosmos/authz/v1beta1/genesis.ts +0 -101
  209. package/types/cosmos/authz/v1beta1/query.ts +0 -643
  210. package/types/cosmos/authz/v1beta1/tx.ts +0 -574
  211. package/types/cosmos/autocli/v1/options.ts +0 -1049
  212. package/types/cosmos/autocli/v1/query.ts +0 -291
  213. package/types/cosmos/bank/module/v1/module.ts +0 -150
  214. package/types/cosmos/bank/v1beta1/authz.ts +0 -129
  215. package/types/cosmos/bank/v1beta1/bank.ts +0 -775
  216. package/types/cosmos/bank/v1beta1/genesis.ts +0 -277
  217. package/types/cosmos/bank/v1beta1/query.ts +0 -2424
  218. package/types/cosmos/bank/v1beta1/tx.ts +0 -697
  219. package/types/cosmos/base/abci/v1beta1/abci.ts +0 -1469
  220. package/types/cosmos/base/node/v1beta1/query.ts +0 -485
  221. package/types/cosmos/base/query/v1beta1/pagination.ts +0 -336
  222. package/types/cosmos/base/reflection/v1beta1/reflection.ts +0 -328
  223. package/types/cosmos/base/reflection/v2alpha1/reflection.ts +0 -2092
  224. package/types/cosmos/base/tendermint/v1beta1/query.ts +0 -2025
  225. package/types/cosmos/base/tendermint/v1beta1/types.ts +0 -548
  226. package/types/cosmos/base/v1beta1/coin.ts +0 -209
  227. package/types/cosmos/circuit/module/v1/module.ts +0 -99
  228. package/types/cosmos/circuit/v1/query.ts +0 -476
  229. package/types/cosmos/circuit/v1/tx.ts +0 -576
  230. package/types/cosmos/circuit/v1/types.ts +0 -362
  231. package/types/cosmos/consensus/module/v1/module.ts +0 -99
  232. package/types/cosmos/consensus/v1/query.ts +0 -181
  233. package/types/cosmos/consensus/v1/tx.ts +0 -271
  234. package/types/cosmos/crisis/module/v1/module.ts +0 -119
  235. package/types/cosmos/crisis/v1beta1/genesis.ts +0 -105
  236. package/types/cosmos/crisis/v1beta1/tx.ts +0 -367
  237. package/types/cosmos/crypto/ed25519/keys.ts +0 -195
  238. package/types/cosmos/crypto/hd/v1/hd.ts +0 -178
  239. package/types/cosmos/crypto/keyring/v1/record.ts +0 -440
  240. package/types/cosmos/crypto/multisig/keys.ts +0 -124
  241. package/types/cosmos/crypto/multisig/v1beta1/multisig.ts +0 -218
  242. package/types/cosmos/crypto/secp256k1/keys.ts +0 -192
  243. package/types/cosmos/crypto/secp256r1/keys.ts +0 -193
  244. package/types/cosmos/distribution/module/v1/module.ts +0 -118
  245. package/types/cosmos/distribution/v1beta1/distribution.ts +0 -1177
  246. package/types/cosmos/distribution/v1beta1/genesis.ts +0 -1028
  247. package/types/cosmos/distribution/v1beta1/query.ts +0 -1700
  248. package/types/cosmos/distribution/v1beta1/tx.ts +0 -1178
  249. package/types/cosmos/evidence/module/v1/module.ts +0 -78
  250. package/types/cosmos/evidence/v1beta1/evidence.ts +0 -194
  251. package/types/cosmos/evidence/v1beta1/genesis.ts +0 -98
  252. package/types/cosmos/evidence/v1beta1/query.ts +0 -414
  253. package/types/cosmos/evidence/v1beta1/tx.ts +0 -243
  254. package/types/cosmos/feegrant/module/v1/module.ts +0 -78
  255. package/types/cosmos/feegrant/v1beta1/feegrant.ts +0 -513
  256. package/types/cosmos/feegrant/v1beta1/genesis.ts +0 -101
  257. package/types/cosmos/feegrant/v1beta1/query.ts +0 -597
  258. package/types/cosmos/feegrant/v1beta1/tx.ts +0 -496
  259. package/types/cosmos/genutil/module/v1/module.ts +0 -78
  260. package/types/cosmos/genutil/v1beta1/genesis.ts +0 -122
  261. package/types/cosmos/gov/module/v1/module.ts +0 -133
  262. package/types/cosmos/gov/v1/genesis.ts +0 -313
  263. package/types/cosmos/gov/v1/gov.ts +0 -1712
  264. package/types/cosmos/gov/v1/query.ts +0 -1605
  265. package/types/cosmos/gov/v1/tx.ts +0 -1387
  266. package/types/cosmos/gov/v1beta1/genesis.ts +0 -241
  267. package/types/cosmos/gov/v1beta1/gov.ts +0 -1273
  268. package/types/cosmos/gov/v1beta1/query.ts +0 -1441
  269. package/types/cosmos/gov/v1beta1/tx.ts +0 -738
  270. package/types/cosmos/group/module/v1/module.ts +0 -141
  271. package/types/cosmos/group/v1/events.ts +0 -795
  272. package/types/cosmos/group/v1/genesis.ts +0 -265
  273. package/types/cosmos/group/v1/query.ts +0 -2441
  274. package/types/cosmos/group/v1/tx.ts +0 -2631
  275. package/types/cosmos/group/v1/types.ts +0 -1850
  276. package/types/cosmos/ics23/v1/proofs.ts +0 -1731
  277. package/types/cosmos/mint/module/v1/module.ts +0 -118
  278. package/types/cosmos/mint/v1beta1/genesis.ts +0 -126
  279. package/types/cosmos/mint/v1beta1/mint.ts +0 -293
  280. package/types/cosmos/mint/v1beta1/query.ts +0 -453
  281. package/types/cosmos/mint/v1beta1/tx.ts +0 -213
  282. package/types/cosmos/msg/textual/v1/textual.ts +0 -9
  283. package/types/cosmos/msg/v1/msg.ts +0 -9
  284. package/types/cosmos/nft/module/v1/module.ts +0 -78
  285. package/types/cosmos/nft/v1beta1/event.ts +0 -359
  286. package/types/cosmos/nft/v1beta1/genesis.ts +0 -204
  287. package/types/cosmos/nft/v1beta1/nft.ts +0 -348
  288. package/types/cosmos/nft/v1beta1/query.ts +0 -1173
  289. package/types/cosmos/nft/v1beta1/tx.ts +0 -228
  290. package/types/cosmos/orm/module/v1alpha1/module.ts +0 -82
  291. package/types/cosmos/orm/query/v1alpha1/query.ts +0 -933
  292. package/types/cosmos/orm/v1/orm.ts +0 -453
  293. package/types/cosmos/orm/v1alpha1/schema.ts +0 -321
  294. package/types/cosmos/params/module/v1/module.ts +0 -78
  295. package/types/cosmos/params/v1beta1/params.ts +0 -236
  296. package/types/cosmos/params/v1beta1/query.ts +0 -439
  297. package/types/cosmos/query/v1/query.ts +0 -9
  298. package/types/cosmos/reflection/v1/reflection.ts +0 -179
  299. package/types/cosmos/slashing/module/v1/module.ts +0 -99
  300. package/types/cosmos/slashing/v1beta1/genesis.ts +0 -424
  301. package/types/cosmos/slashing/v1beta1/query.ts +0 -487
  302. package/types/cosmos/slashing/v1beta1/slashing.ts +0 -422
  303. package/types/cosmos/slashing/v1beta1/tx.ts +0 -336
  304. package/types/cosmos/staking/module/v1/module.ts +0 -161
  305. package/types/cosmos/staking/v1beta1/authz.ts +0 -306
  306. package/types/cosmos/staking/v1beta1/genesis.ts +0 -377
  307. package/types/cosmos/staking/v1beta1/query.ts +0 -2540
  308. package/types/cosmos/staking/v1beta1/staking.ts +0 -2576
  309. package/types/cosmos/staking/v1beta1/tx.ts +0 -1433
  310. package/types/cosmos/store/internal/kv/v1beta1/kv.ts +0 -205
  311. package/types/cosmos/store/snapshots/v1/snapshot.ts +0 -746
  312. package/types/cosmos/store/streaming/abci/grpc.ts +0 -367
  313. package/types/cosmos/store/v1beta1/commit_info.ts +0 -370
  314. package/types/cosmos/store/v1beta1/listening.ts +0 -301
  315. package/types/cosmos/tx/config/v1/config.ts +0 -125
  316. package/types/cosmos/tx/signing/v1beta1/signing.ts +0 -630
  317. package/types/cosmos/tx/v1beta1/service.ts +0 -1889
  318. package/types/cosmos/tx/v1beta1/tx.ts +0 -1657
  319. package/types/cosmos/upgrade/module/v1/module.ts +0 -99
  320. package/types/cosmos/upgrade/v1beta1/query.ts +0 -819
  321. package/types/cosmos/upgrade/v1beta1/tx.ts +0 -340
  322. package/types/cosmos/upgrade/v1beta1/upgrade.ts +0 -525
  323. package/types/cosmos/vesting/module/v1/module.ts +0 -78
  324. package/types/cosmos/vesting/v1beta1/tx.ts +0 -640
  325. package/types/cosmos/vesting/v1beta1/vesting.ts +0 -624
  326. package/types/cosmos_proto/cosmos.ts +0 -307
  327. package/types/gogoproto/gogo.ts +0 -9
  328. package/types/google/api/annotations.ts +0 -9
  329. package/types/google/api/http.ts +0 -770
  330. package/types/google/protobuf/any.ts +0 -259
  331. package/types/google/protobuf/descriptor.ts +0 -6642
  332. package/types/google/protobuf/duration.ts +0 -200
  333. package/types/google/protobuf/timestamp.ts +0 -229
  334. package/types/ibc/applications/fee/v1/ack.ts +0 -166
  335. package/types/ibc/applications/fee/v1/fee.ts +0 -403
  336. package/types/ibc/applications/fee/v1/genesis.ts +0 -571
  337. package/types/ibc/applications/fee/v1/metadata.ts +0 -122
  338. package/types/ibc/applications/fee/v1/query.ts +0 -1757
  339. package/types/ibc/applications/fee/v1/tx.ts +0 -781
  340. package/types/ibc/applications/interchain_accounts/controller/v1/controller.ts +0 -104
  341. package/types/ibc/applications/interchain_accounts/controller/v1/query.ts +0 -333
  342. package/types/ibc/applications/interchain_accounts/controller/v1/tx.ts +0 -619
  343. package/types/ibc/applications/interchain_accounts/genesis/v1/genesis.ts +0 -590
  344. package/types/ibc/applications/interchain_accounts/host/v1/host.ts +0 -242
  345. package/types/ibc/applications/interchain_accounts/host/v1/query.ts +0 -175
  346. package/types/ibc/applications/interchain_accounts/host/v1/tx.ts +0 -416
  347. package/types/ibc/applications/interchain_accounts/v1/account.ts +0 -120
  348. package/types/ibc/applications/interchain_accounts/v1/metadata.ts +0 -199
  349. package/types/ibc/applications/interchain_accounts/v1/packet.ts +0 -264
  350. package/types/ibc/applications/transfer/v1/authz.ts +0 -254
  351. package/types/ibc/applications/transfer/v1/genesis.ts +0 -165
  352. package/types/ibc/applications/transfer/v1/query.ts +0 -934
  353. package/types/ibc/applications/transfer/v1/transfer.ts +0 -220
  354. package/types/ibc/applications/transfer/v1/tx.ts +0 -505
  355. package/types/ibc/applications/transfer/v2/packet.ts +0 -177
  356. package/types/ibc/core/channel/v1/channel.ts +0 -1358
  357. package/types/ibc/core/channel/v1/genesis.ts +0 -377
  358. package/types/ibc/core/channel/v1/query.ts +0 -3781
  359. package/types/ibc/core/channel/v1/tx.ts +0 -4424
  360. package/types/ibc/core/channel/v1/upgrade.ts +0 -348
  361. package/types/ibc/core/client/v1/client.ts +0 -753
  362. package/types/ibc/core/client/v1/genesis.ts +0 -423
  363. package/types/ibc/core/client/v1/query.ts +0 -1898
  364. package/types/ibc/core/client/v1/tx.ts +0 -1301
  365. package/types/ibc/core/commitment/v1/commitment.ts +0 -336
  366. package/types/ibc/core/connection/v1/connection.ts +0 -840
  367. package/types/ibc/core/connection/v1/genesis.ts +0 -172
  368. package/types/ibc/core/connection/v1/query.ts +0 -1243
  369. package/types/ibc/core/connection/v1/tx.ts +0 -1352
  370. package/types/ibc/core/types/v1/genesis.ts +0 -150
  371. package/types/ibc/lightclients/localhost/v2/localhost.ts +0 -102
  372. package/types/ibc/lightclients/solomachine/v2/solomachine.ts +0 -1765
  373. package/types/ibc/lightclients/solomachine/v3/solomachine.ts +0 -945
  374. package/types/ibc/lightclients/tendermint/v1/tendermint.ts +0 -853
  375. package/types/ibc/lightclients/wasm/v1/genesis.ts +0 -192
  376. package/types/ibc/lightclients/wasm/v1/query.ts +0 -377
  377. package/types/ibc/lightclients/wasm/v1/tx.ts +0 -550
  378. package/types/ibc/lightclients/wasm/v1/wasm.ts +0 -370
  379. package/types/tendermint/abci/types.ts +0 -6103
  380. package/types/tendermint/crypto/keys.ts +0 -142
  381. package/types/tendermint/crypto/proof.ts +0 -533
  382. package/types/tendermint/libs/bits/types.ts +0 -139
  383. package/types/tendermint/p2p/types.ts +0 -544
  384. package/types/tendermint/types/block.ts +0 -158
  385. package/types/tendermint/types/evidence.ts +0 -502
  386. package/types/tendermint/types/params.ts +0 -701
  387. package/types/tendermint/types/types.ts +0 -2133
  388. package/types/tendermint/types/validator.ts +0 -424
  389. package/types/tendermint/version/types.ts +0 -218
  390. package/types.d.ts +0 -21
@@ -1,2576 +0,0 @@
1
- // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
- // versions:
3
- // protoc-gen-ts_proto v2.6.1
4
- // protoc unknown
5
- // source: cosmos/staking/v1beta1/staking.proto
6
-
7
- /* eslint-disable */
8
- import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
9
- import { Any } from "../../../google/protobuf/any";
10
- import { Duration } from "../../../google/protobuf/duration";
11
- import { Timestamp } from "../../../google/protobuf/timestamp";
12
- import { ValidatorUpdate } from "../../../tendermint/abci/types";
13
- import { Header } from "../../../tendermint/types/types";
14
- import { Coin } from "../../base/v1beta1/coin";
15
-
16
- export const protobufPackage = "cosmos.staking.v1beta1";
17
-
18
- /** BondStatus is the status of a validator. */
19
- export enum BondStatus {
20
- /** BOND_STATUS_UNSPECIFIED - UNSPECIFIED defines an invalid validator status. */
21
- BOND_STATUS_UNSPECIFIED = 0,
22
- /** BOND_STATUS_UNBONDED - UNBONDED defines a validator that is not bonded. */
23
- BOND_STATUS_UNBONDED = 1,
24
- /** BOND_STATUS_UNBONDING - UNBONDING defines a validator that is unbonding. */
25
- BOND_STATUS_UNBONDING = 2,
26
- /** BOND_STATUS_BONDED - BONDED defines a validator that is bonded. */
27
- BOND_STATUS_BONDED = 3,
28
- UNRECOGNIZED = -1,
29
- }
30
-
31
- export function bondStatusFromJSON(object: any): BondStatus {
32
- switch (object) {
33
- case 0:
34
- case "BOND_STATUS_UNSPECIFIED":
35
- return BondStatus.BOND_STATUS_UNSPECIFIED;
36
- case 1:
37
- case "BOND_STATUS_UNBONDED":
38
- return BondStatus.BOND_STATUS_UNBONDED;
39
- case 2:
40
- case "BOND_STATUS_UNBONDING":
41
- return BondStatus.BOND_STATUS_UNBONDING;
42
- case 3:
43
- case "BOND_STATUS_BONDED":
44
- return BondStatus.BOND_STATUS_BONDED;
45
- case -1:
46
- case "UNRECOGNIZED":
47
- default:
48
- return BondStatus.UNRECOGNIZED;
49
- }
50
- }
51
-
52
- export function bondStatusToJSON(object: BondStatus): string {
53
- switch (object) {
54
- case BondStatus.BOND_STATUS_UNSPECIFIED:
55
- return "BOND_STATUS_UNSPECIFIED";
56
- case BondStatus.BOND_STATUS_UNBONDED:
57
- return "BOND_STATUS_UNBONDED";
58
- case BondStatus.BOND_STATUS_UNBONDING:
59
- return "BOND_STATUS_UNBONDING";
60
- case BondStatus.BOND_STATUS_BONDED:
61
- return "BOND_STATUS_BONDED";
62
- case BondStatus.UNRECOGNIZED:
63
- default:
64
- return "UNRECOGNIZED";
65
- }
66
- }
67
-
68
- /** Infraction indicates the infraction a validator commited. */
69
- export enum Infraction {
70
- /** INFRACTION_UNSPECIFIED - UNSPECIFIED defines an empty infraction. */
71
- INFRACTION_UNSPECIFIED = 0,
72
- /** INFRACTION_DOUBLE_SIGN - DOUBLE_SIGN defines a validator that double-signs a block. */
73
- INFRACTION_DOUBLE_SIGN = 1,
74
- /** INFRACTION_DOWNTIME - DOWNTIME defines a validator that missed signing too many blocks. */
75
- INFRACTION_DOWNTIME = 2,
76
- UNRECOGNIZED = -1,
77
- }
78
-
79
- export function infractionFromJSON(object: any): Infraction {
80
- switch (object) {
81
- case 0:
82
- case "INFRACTION_UNSPECIFIED":
83
- return Infraction.INFRACTION_UNSPECIFIED;
84
- case 1:
85
- case "INFRACTION_DOUBLE_SIGN":
86
- return Infraction.INFRACTION_DOUBLE_SIGN;
87
- case 2:
88
- case "INFRACTION_DOWNTIME":
89
- return Infraction.INFRACTION_DOWNTIME;
90
- case -1:
91
- case "UNRECOGNIZED":
92
- default:
93
- return Infraction.UNRECOGNIZED;
94
- }
95
- }
96
-
97
- export function infractionToJSON(object: Infraction): string {
98
- switch (object) {
99
- case Infraction.INFRACTION_UNSPECIFIED:
100
- return "INFRACTION_UNSPECIFIED";
101
- case Infraction.INFRACTION_DOUBLE_SIGN:
102
- return "INFRACTION_DOUBLE_SIGN";
103
- case Infraction.INFRACTION_DOWNTIME:
104
- return "INFRACTION_DOWNTIME";
105
- case Infraction.UNRECOGNIZED:
106
- default:
107
- return "UNRECOGNIZED";
108
- }
109
- }
110
-
111
- /**
112
- * HistoricalInfo contains header and validator information for a given block.
113
- * It is stored as part of staking module's state, which persists the `n` most
114
- * recent HistoricalInfo
115
- * (`n` is set by the staking module's `historical_entries` parameter).
116
- */
117
- export interface HistoricalInfo {
118
- header: Header | undefined;
119
- valset: Validator[];
120
- }
121
-
122
- /**
123
- * CommissionRates defines the initial commission rates to be used for creating
124
- * a validator.
125
- */
126
- export interface CommissionRates {
127
- /** rate is the commission rate charged to delegators, as a fraction. */
128
- rate: string;
129
- /** max_rate defines the maximum commission rate which validator can ever charge, as a fraction. */
130
- maxRate: string;
131
- /** max_change_rate defines the maximum daily increase of the validator commission, as a fraction. */
132
- maxChangeRate: string;
133
- }
134
-
135
- /** Commission defines commission parameters for a given validator. */
136
- export interface Commission {
137
- /** commission_rates defines the initial commission rates to be used for creating a validator. */
138
- commissionRates:
139
- | CommissionRates
140
- | undefined;
141
- /** update_time is the last time the commission rate was changed. */
142
- updateTime: Date | undefined;
143
- }
144
-
145
- /** Description defines a validator description. */
146
- export interface Description {
147
- /** moniker defines a human-readable name for the validator. */
148
- moniker: string;
149
- /** identity defines an optional identity signature (ex. UPort or Keybase). */
150
- identity: string;
151
- /** website defines an optional website link. */
152
- website: string;
153
- /** security_contact defines an optional email for security contact. */
154
- securityContact: string;
155
- /** details define other optional details. */
156
- details: string;
157
- }
158
-
159
- /**
160
- * Validator defines a validator, together with the total amount of the
161
- * Validator's bond shares and their exchange rate to coins. Slashing results in
162
- * a decrease in the exchange rate, allowing correct calculation of future
163
- * undelegations without iterating over delegators. When coins are delegated to
164
- * this validator, the validator is credited with a delegation whose number of
165
- * bond shares is based on the amount of coins delegated divided by the current
166
- * exchange rate. Voting power can be calculated as total bonded shares
167
- * multiplied by exchange rate.
168
- */
169
- export interface Validator {
170
- /** operator_address defines the address of the validator's operator; bech encoded in JSON. */
171
- operatorAddress: string;
172
- /** consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. */
173
- consensusPubkey:
174
- | Any
175
- | undefined;
176
- /** jailed defined whether the validator has been jailed from bonded status or not. */
177
- jailed: boolean;
178
- /** status is the validator status (bonded/unbonding/unbonded). */
179
- status: BondStatus;
180
- /** tokens define the delegated tokens (incl. self-delegation). */
181
- tokens: string;
182
- /** delegator_shares defines total shares issued to a validator's delegators. */
183
- delegatorShares: string;
184
- /** description defines the description terms for the validator. */
185
- description:
186
- | Description
187
- | undefined;
188
- /** unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. */
189
- unbondingHeight: number;
190
- /** unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. */
191
- unbondingTime:
192
- | Date
193
- | undefined;
194
- /** commission defines the commission parameters. */
195
- commission:
196
- | Commission
197
- | undefined;
198
- /**
199
- * min_self_delegation is the validator's self declared minimum self delegation.
200
- *
201
- * Since: cosmos-sdk 0.46
202
- */
203
- minSelfDelegation: string;
204
- /** strictly positive if this validator's unbonding has been stopped by external modules */
205
- unbondingOnHoldRefCount: number;
206
- /** list of unbonding ids, each uniquely identifing an unbonding of this validator */
207
- unbondingIds: number[];
208
- }
209
-
210
- /** ValAddresses defines a repeated set of validator addresses. */
211
- export interface ValAddresses {
212
- addresses: string[];
213
- }
214
-
215
- /**
216
- * DVPair is struct that just has a delegator-validator pair with no other data.
217
- * It is intended to be used as a marshalable pointer. For example, a DVPair can
218
- * be used to construct the key to getting an UnbondingDelegation from state.
219
- */
220
- export interface DVPair {
221
- delegatorAddress: string;
222
- validatorAddress: string;
223
- }
224
-
225
- /** DVPairs defines an array of DVPair objects. */
226
- export interface DVPairs {
227
- pairs: DVPair[];
228
- }
229
-
230
- /**
231
- * DVVTriplet is struct that just has a delegator-validator-validator triplet
232
- * with no other data. It is intended to be used as a marshalable pointer. For
233
- * example, a DVVTriplet can be used to construct the key to getting a
234
- * Redelegation from state.
235
- */
236
- export interface DVVTriplet {
237
- delegatorAddress: string;
238
- validatorSrcAddress: string;
239
- validatorDstAddress: string;
240
- }
241
-
242
- /** DVVTriplets defines an array of DVVTriplet objects. */
243
- export interface DVVTriplets {
244
- triplets: DVVTriplet[];
245
- }
246
-
247
- /**
248
- * Delegation represents the bond with tokens held by an account. It is
249
- * owned by one delegator, and is associated with the voting power of one
250
- * validator.
251
- */
252
- export interface Delegation {
253
- /** delegator_address is the encoded address of the delegator. */
254
- delegatorAddress: string;
255
- /** validator_address is the encoded address of the validator. */
256
- validatorAddress: string;
257
- /** shares define the delegation shares received. */
258
- shares: string;
259
- }
260
-
261
- /**
262
- * UnbondingDelegation stores all of a single delegator's unbonding bonds
263
- * for a single validator in an time-ordered list.
264
- */
265
- export interface UnbondingDelegation {
266
- /** delegator_address is the encoded address of the delegator. */
267
- delegatorAddress: string;
268
- /** validator_address is the encoded address of the validator. */
269
- validatorAddress: string;
270
- /** entries are the unbonding delegation entries. */
271
- entries: UnbondingDelegationEntry[];
272
- }
273
-
274
- /** UnbondingDelegationEntry defines an unbonding object with relevant metadata. */
275
- export interface UnbondingDelegationEntry {
276
- /** creation_height is the height which the unbonding took place. */
277
- creationHeight: number;
278
- /** completion_time is the unix time for unbonding completion. */
279
- completionTime:
280
- | Date
281
- | undefined;
282
- /** initial_balance defines the tokens initially scheduled to receive at completion. */
283
- initialBalance: string;
284
- /** balance defines the tokens to receive at completion. */
285
- balance: string;
286
- /** Incrementing id that uniquely identifies this entry */
287
- unbondingId: number;
288
- /** Strictly positive if this entry's unbonding has been stopped by external modules */
289
- unbondingOnHoldRefCount: number;
290
- }
291
-
292
- /** RedelegationEntry defines a redelegation object with relevant metadata. */
293
- export interface RedelegationEntry {
294
- /** creation_height defines the height which the redelegation took place. */
295
- creationHeight: number;
296
- /** completion_time defines the unix time for redelegation completion. */
297
- completionTime:
298
- | Date
299
- | undefined;
300
- /** initial_balance defines the initial balance when redelegation started. */
301
- initialBalance: string;
302
- /** shares_dst is the amount of destination-validator shares created by redelegation. */
303
- sharesDst: string;
304
- /** Incrementing id that uniquely identifies this entry */
305
- unbondingId: number;
306
- /** Strictly positive if this entry's unbonding has been stopped by external modules */
307
- unbondingOnHoldRefCount: number;
308
- }
309
-
310
- /**
311
- * Redelegation contains the list of a particular delegator's redelegating bonds
312
- * from a particular source validator to a particular destination validator.
313
- */
314
- export interface Redelegation {
315
- /** delegator_address is the bech32-encoded address of the delegator. */
316
- delegatorAddress: string;
317
- /** validator_src_address is the validator redelegation source operator address. */
318
- validatorSrcAddress: string;
319
- /** validator_dst_address is the validator redelegation destination operator address. */
320
- validatorDstAddress: string;
321
- /** entries are the redelegation entries. */
322
- entries: RedelegationEntry[];
323
- }
324
-
325
- /** Params defines the parameters for the x/staking module. */
326
- export interface Params {
327
- /** unbonding_time is the time duration of unbonding. */
328
- unbondingTime:
329
- | Duration
330
- | undefined;
331
- /** max_validators is the maximum number of validators. */
332
- maxValidators: number;
333
- /** max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). */
334
- maxEntries: number;
335
- /** historical_entries is the number of historical entries to persist. */
336
- historicalEntries: number;
337
- /** bond_denom defines the bondable coin denomination. */
338
- bondDenom: string;
339
- /** min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators */
340
- minCommissionRate: string;
341
- }
342
-
343
- /**
344
- * DelegationResponse is equivalent to Delegation except that it contains a
345
- * balance in addition to shares which is more suitable for client responses.
346
- */
347
- export interface DelegationResponse {
348
- delegation: Delegation | undefined;
349
- balance: Coin | undefined;
350
- }
351
-
352
- /**
353
- * RedelegationEntryResponse is equivalent to a RedelegationEntry except that it
354
- * contains a balance in addition to shares which is more suitable for client
355
- * responses.
356
- */
357
- export interface RedelegationEntryResponse {
358
- redelegationEntry: RedelegationEntry | undefined;
359
- balance: string;
360
- }
361
-
362
- /**
363
- * RedelegationResponse is equivalent to a Redelegation except that its entries
364
- * contain a balance in addition to shares which is more suitable for client
365
- * responses.
366
- */
367
- export interface RedelegationResponse {
368
- redelegation: Redelegation | undefined;
369
- entries: RedelegationEntryResponse[];
370
- }
371
-
372
- /**
373
- * Pool is used for tracking bonded and not-bonded token supply of the bond
374
- * denomination.
375
- */
376
- export interface Pool {
377
- notBondedTokens: string;
378
- bondedTokens: string;
379
- }
380
-
381
- /**
382
- * ValidatorUpdates defines an array of abci.ValidatorUpdate objects.
383
- * TODO: explore moving this to proto/cosmos/base to separate modules from tendermint dependence
384
- */
385
- export interface ValidatorUpdates {
386
- updates: ValidatorUpdate[];
387
- }
388
-
389
- function createBaseHistoricalInfo(): HistoricalInfo {
390
- return { header: undefined, valset: [] };
391
- }
392
-
393
- export const HistoricalInfo: MessageFns<HistoricalInfo> = {
394
- encode(message: HistoricalInfo, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
395
- if (message.header !== undefined) {
396
- Header.encode(message.header, writer.uint32(10).fork()).join();
397
- }
398
- for (const v of message.valset) {
399
- Validator.encode(v!, writer.uint32(18).fork()).join();
400
- }
401
- return writer;
402
- },
403
-
404
- decode(input: BinaryReader | Uint8Array, length?: number): HistoricalInfo {
405
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
406
- let end = length === undefined ? reader.len : reader.pos + length;
407
- const message = createBaseHistoricalInfo();
408
- while (reader.pos < end) {
409
- const tag = reader.uint32();
410
- switch (tag >>> 3) {
411
- case 1: {
412
- if (tag !== 10) {
413
- break;
414
- }
415
-
416
- message.header = Header.decode(reader, reader.uint32());
417
- continue;
418
- }
419
- case 2: {
420
- if (tag !== 18) {
421
- break;
422
- }
423
-
424
- message.valset.push(Validator.decode(reader, reader.uint32()));
425
- continue;
426
- }
427
- }
428
- if ((tag & 7) === 4 || tag === 0) {
429
- break;
430
- }
431
- reader.skip(tag & 7);
432
- }
433
- return message;
434
- },
435
-
436
- fromJSON(object: any): HistoricalInfo {
437
- return {
438
- header: isSet(object.header) ? Header.fromJSON(object.header) : undefined,
439
- valset: globalThis.Array.isArray(object?.valset) ? object.valset.map((e: any) => Validator.fromJSON(e)) : [],
440
- };
441
- },
442
-
443
- toJSON(message: HistoricalInfo): unknown {
444
- const obj: any = {};
445
- if (message.header !== undefined) {
446
- obj.header = Header.toJSON(message.header);
447
- }
448
- if (message.valset?.length) {
449
- obj.valset = message.valset.map((e) => Validator.toJSON(e));
450
- }
451
- return obj;
452
- },
453
-
454
- create<I extends Exact<DeepPartial<HistoricalInfo>, I>>(base?: I): HistoricalInfo {
455
- return HistoricalInfo.fromPartial(base ?? ({} as any));
456
- },
457
- fromPartial<I extends Exact<DeepPartial<HistoricalInfo>, I>>(object: I): HistoricalInfo {
458
- const message = createBaseHistoricalInfo();
459
- message.header = (object.header !== undefined && object.header !== null)
460
- ? Header.fromPartial(object.header)
461
- : undefined;
462
- message.valset = object.valset?.map((e) => Validator.fromPartial(e)) || [];
463
- return message;
464
- },
465
- };
466
-
467
- function createBaseCommissionRates(): CommissionRates {
468
- return { rate: "", maxRate: "", maxChangeRate: "" };
469
- }
470
-
471
- export const CommissionRates: MessageFns<CommissionRates> = {
472
- encode(message: CommissionRates, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
473
- if (message.rate !== "") {
474
- writer.uint32(10).string(message.rate);
475
- }
476
- if (message.maxRate !== "") {
477
- writer.uint32(18).string(message.maxRate);
478
- }
479
- if (message.maxChangeRate !== "") {
480
- writer.uint32(26).string(message.maxChangeRate);
481
- }
482
- return writer;
483
- },
484
-
485
- decode(input: BinaryReader | Uint8Array, length?: number): CommissionRates {
486
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
487
- let end = length === undefined ? reader.len : reader.pos + length;
488
- const message = createBaseCommissionRates();
489
- while (reader.pos < end) {
490
- const tag = reader.uint32();
491
- switch (tag >>> 3) {
492
- case 1: {
493
- if (tag !== 10) {
494
- break;
495
- }
496
-
497
- message.rate = reader.string();
498
- continue;
499
- }
500
- case 2: {
501
- if (tag !== 18) {
502
- break;
503
- }
504
-
505
- message.maxRate = reader.string();
506
- continue;
507
- }
508
- case 3: {
509
- if (tag !== 26) {
510
- break;
511
- }
512
-
513
- message.maxChangeRate = reader.string();
514
- continue;
515
- }
516
- }
517
- if ((tag & 7) === 4 || tag === 0) {
518
- break;
519
- }
520
- reader.skip(tag & 7);
521
- }
522
- return message;
523
- },
524
-
525
- fromJSON(object: any): CommissionRates {
526
- return {
527
- rate: isSet(object.rate) ? globalThis.String(object.rate) : "",
528
- maxRate: isSet(object.maxRate) ? globalThis.String(object.maxRate) : "",
529
- maxChangeRate: isSet(object.maxChangeRate) ? globalThis.String(object.maxChangeRate) : "",
530
- };
531
- },
532
-
533
- toJSON(message: CommissionRates): unknown {
534
- const obj: any = {};
535
- if (message.rate !== "") {
536
- obj.rate = message.rate;
537
- }
538
- if (message.maxRate !== "") {
539
- obj.maxRate = message.maxRate;
540
- }
541
- if (message.maxChangeRate !== "") {
542
- obj.maxChangeRate = message.maxChangeRate;
543
- }
544
- return obj;
545
- },
546
-
547
- create<I extends Exact<DeepPartial<CommissionRates>, I>>(base?: I): CommissionRates {
548
- return CommissionRates.fromPartial(base ?? ({} as any));
549
- },
550
- fromPartial<I extends Exact<DeepPartial<CommissionRates>, I>>(object: I): CommissionRates {
551
- const message = createBaseCommissionRates();
552
- message.rate = object.rate ?? "";
553
- message.maxRate = object.maxRate ?? "";
554
- message.maxChangeRate = object.maxChangeRate ?? "";
555
- return message;
556
- },
557
- };
558
-
559
- function createBaseCommission(): Commission {
560
- return { commissionRates: undefined, updateTime: undefined };
561
- }
562
-
563
- export const Commission: MessageFns<Commission> = {
564
- encode(message: Commission, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
565
- if (message.commissionRates !== undefined) {
566
- CommissionRates.encode(message.commissionRates, writer.uint32(10).fork()).join();
567
- }
568
- if (message.updateTime !== undefined) {
569
- Timestamp.encode(toTimestamp(message.updateTime), writer.uint32(18).fork()).join();
570
- }
571
- return writer;
572
- },
573
-
574
- decode(input: BinaryReader | Uint8Array, length?: number): Commission {
575
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
576
- let end = length === undefined ? reader.len : reader.pos + length;
577
- const message = createBaseCommission();
578
- while (reader.pos < end) {
579
- const tag = reader.uint32();
580
- switch (tag >>> 3) {
581
- case 1: {
582
- if (tag !== 10) {
583
- break;
584
- }
585
-
586
- message.commissionRates = CommissionRates.decode(reader, reader.uint32());
587
- continue;
588
- }
589
- case 2: {
590
- if (tag !== 18) {
591
- break;
592
- }
593
-
594
- message.updateTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
595
- continue;
596
- }
597
- }
598
- if ((tag & 7) === 4 || tag === 0) {
599
- break;
600
- }
601
- reader.skip(tag & 7);
602
- }
603
- return message;
604
- },
605
-
606
- fromJSON(object: any): Commission {
607
- return {
608
- commissionRates: isSet(object.commissionRates) ? CommissionRates.fromJSON(object.commissionRates) : undefined,
609
- updateTime: isSet(object.updateTime) ? fromJsonTimestamp(object.updateTime) : undefined,
610
- };
611
- },
612
-
613
- toJSON(message: Commission): unknown {
614
- const obj: any = {};
615
- if (message.commissionRates !== undefined) {
616
- obj.commissionRates = CommissionRates.toJSON(message.commissionRates);
617
- }
618
- if (message.updateTime !== undefined) {
619
- obj.updateTime = message.updateTime.toISOString();
620
- }
621
- return obj;
622
- },
623
-
624
- create<I extends Exact<DeepPartial<Commission>, I>>(base?: I): Commission {
625
- return Commission.fromPartial(base ?? ({} as any));
626
- },
627
- fromPartial<I extends Exact<DeepPartial<Commission>, I>>(object: I): Commission {
628
- const message = createBaseCommission();
629
- message.commissionRates = (object.commissionRates !== undefined && object.commissionRates !== null)
630
- ? CommissionRates.fromPartial(object.commissionRates)
631
- : undefined;
632
- message.updateTime = object.updateTime ?? undefined;
633
- return message;
634
- },
635
- };
636
-
637
- function createBaseDescription(): Description {
638
- return { moniker: "", identity: "", website: "", securityContact: "", details: "" };
639
- }
640
-
641
- export const Description: MessageFns<Description> = {
642
- encode(message: Description, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
643
- if (message.moniker !== "") {
644
- writer.uint32(10).string(message.moniker);
645
- }
646
- if (message.identity !== "") {
647
- writer.uint32(18).string(message.identity);
648
- }
649
- if (message.website !== "") {
650
- writer.uint32(26).string(message.website);
651
- }
652
- if (message.securityContact !== "") {
653
- writer.uint32(34).string(message.securityContact);
654
- }
655
- if (message.details !== "") {
656
- writer.uint32(42).string(message.details);
657
- }
658
- return writer;
659
- },
660
-
661
- decode(input: BinaryReader | Uint8Array, length?: number): Description {
662
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
663
- let end = length === undefined ? reader.len : reader.pos + length;
664
- const message = createBaseDescription();
665
- while (reader.pos < end) {
666
- const tag = reader.uint32();
667
- switch (tag >>> 3) {
668
- case 1: {
669
- if (tag !== 10) {
670
- break;
671
- }
672
-
673
- message.moniker = reader.string();
674
- continue;
675
- }
676
- case 2: {
677
- if (tag !== 18) {
678
- break;
679
- }
680
-
681
- message.identity = reader.string();
682
- continue;
683
- }
684
- case 3: {
685
- if (tag !== 26) {
686
- break;
687
- }
688
-
689
- message.website = reader.string();
690
- continue;
691
- }
692
- case 4: {
693
- if (tag !== 34) {
694
- break;
695
- }
696
-
697
- message.securityContact = reader.string();
698
- continue;
699
- }
700
- case 5: {
701
- if (tag !== 42) {
702
- break;
703
- }
704
-
705
- message.details = reader.string();
706
- continue;
707
- }
708
- }
709
- if ((tag & 7) === 4 || tag === 0) {
710
- break;
711
- }
712
- reader.skip(tag & 7);
713
- }
714
- return message;
715
- },
716
-
717
- fromJSON(object: any): Description {
718
- return {
719
- moniker: isSet(object.moniker) ? globalThis.String(object.moniker) : "",
720
- identity: isSet(object.identity) ? globalThis.String(object.identity) : "",
721
- website: isSet(object.website) ? globalThis.String(object.website) : "",
722
- securityContact: isSet(object.securityContact) ? globalThis.String(object.securityContact) : "",
723
- details: isSet(object.details) ? globalThis.String(object.details) : "",
724
- };
725
- },
726
-
727
- toJSON(message: Description): unknown {
728
- const obj: any = {};
729
- if (message.moniker !== "") {
730
- obj.moniker = message.moniker;
731
- }
732
- if (message.identity !== "") {
733
- obj.identity = message.identity;
734
- }
735
- if (message.website !== "") {
736
- obj.website = message.website;
737
- }
738
- if (message.securityContact !== "") {
739
- obj.securityContact = message.securityContact;
740
- }
741
- if (message.details !== "") {
742
- obj.details = message.details;
743
- }
744
- return obj;
745
- },
746
-
747
- create<I extends Exact<DeepPartial<Description>, I>>(base?: I): Description {
748
- return Description.fromPartial(base ?? ({} as any));
749
- },
750
- fromPartial<I extends Exact<DeepPartial<Description>, I>>(object: I): Description {
751
- const message = createBaseDescription();
752
- message.moniker = object.moniker ?? "";
753
- message.identity = object.identity ?? "";
754
- message.website = object.website ?? "";
755
- message.securityContact = object.securityContact ?? "";
756
- message.details = object.details ?? "";
757
- return message;
758
- },
759
- };
760
-
761
- function createBaseValidator(): Validator {
762
- return {
763
- operatorAddress: "",
764
- consensusPubkey: undefined,
765
- jailed: false,
766
- status: 0,
767
- tokens: "",
768
- delegatorShares: "",
769
- description: undefined,
770
- unbondingHeight: 0,
771
- unbondingTime: undefined,
772
- commission: undefined,
773
- minSelfDelegation: "",
774
- unbondingOnHoldRefCount: 0,
775
- unbondingIds: [],
776
- };
777
- }
778
-
779
- export const Validator: MessageFns<Validator> = {
780
- encode(message: Validator, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
781
- if (message.operatorAddress !== "") {
782
- writer.uint32(10).string(message.operatorAddress);
783
- }
784
- if (message.consensusPubkey !== undefined) {
785
- Any.encode(message.consensusPubkey, writer.uint32(18).fork()).join();
786
- }
787
- if (message.jailed !== false) {
788
- writer.uint32(24).bool(message.jailed);
789
- }
790
- if (message.status !== 0) {
791
- writer.uint32(32).int32(message.status);
792
- }
793
- if (message.tokens !== "") {
794
- writer.uint32(42).string(message.tokens);
795
- }
796
- if (message.delegatorShares !== "") {
797
- writer.uint32(50).string(message.delegatorShares);
798
- }
799
- if (message.description !== undefined) {
800
- Description.encode(message.description, writer.uint32(58).fork()).join();
801
- }
802
- if (message.unbondingHeight !== 0) {
803
- writer.uint32(64).int64(message.unbondingHeight);
804
- }
805
- if (message.unbondingTime !== undefined) {
806
- Timestamp.encode(toTimestamp(message.unbondingTime), writer.uint32(74).fork()).join();
807
- }
808
- if (message.commission !== undefined) {
809
- Commission.encode(message.commission, writer.uint32(82).fork()).join();
810
- }
811
- if (message.minSelfDelegation !== "") {
812
- writer.uint32(90).string(message.minSelfDelegation);
813
- }
814
- if (message.unbondingOnHoldRefCount !== 0) {
815
- writer.uint32(96).int64(message.unbondingOnHoldRefCount);
816
- }
817
- writer.uint32(106).fork();
818
- for (const v of message.unbondingIds) {
819
- writer.uint64(v);
820
- }
821
- writer.join();
822
- return writer;
823
- },
824
-
825
- decode(input: BinaryReader | Uint8Array, length?: number): Validator {
826
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
827
- let end = length === undefined ? reader.len : reader.pos + length;
828
- const message = createBaseValidator();
829
- while (reader.pos < end) {
830
- const tag = reader.uint32();
831
- switch (tag >>> 3) {
832
- case 1: {
833
- if (tag !== 10) {
834
- break;
835
- }
836
-
837
- message.operatorAddress = reader.string();
838
- continue;
839
- }
840
- case 2: {
841
- if (tag !== 18) {
842
- break;
843
- }
844
-
845
- message.consensusPubkey = Any.decode(reader, reader.uint32());
846
- continue;
847
- }
848
- case 3: {
849
- if (tag !== 24) {
850
- break;
851
- }
852
-
853
- message.jailed = reader.bool();
854
- continue;
855
- }
856
- case 4: {
857
- if (tag !== 32) {
858
- break;
859
- }
860
-
861
- message.status = reader.int32() as any;
862
- continue;
863
- }
864
- case 5: {
865
- if (tag !== 42) {
866
- break;
867
- }
868
-
869
- message.tokens = reader.string();
870
- continue;
871
- }
872
- case 6: {
873
- if (tag !== 50) {
874
- break;
875
- }
876
-
877
- message.delegatorShares = reader.string();
878
- continue;
879
- }
880
- case 7: {
881
- if (tag !== 58) {
882
- break;
883
- }
884
-
885
- message.description = Description.decode(reader, reader.uint32());
886
- continue;
887
- }
888
- case 8: {
889
- if (tag !== 64) {
890
- break;
891
- }
892
-
893
- message.unbondingHeight = longToNumber(reader.int64());
894
- continue;
895
- }
896
- case 9: {
897
- if (tag !== 74) {
898
- break;
899
- }
900
-
901
- message.unbondingTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
902
- continue;
903
- }
904
- case 10: {
905
- if (tag !== 82) {
906
- break;
907
- }
908
-
909
- message.commission = Commission.decode(reader, reader.uint32());
910
- continue;
911
- }
912
- case 11: {
913
- if (tag !== 90) {
914
- break;
915
- }
916
-
917
- message.minSelfDelegation = reader.string();
918
- continue;
919
- }
920
- case 12: {
921
- if (tag !== 96) {
922
- break;
923
- }
924
-
925
- message.unbondingOnHoldRefCount = longToNumber(reader.int64());
926
- continue;
927
- }
928
- case 13: {
929
- if (tag === 104) {
930
- message.unbondingIds.push(longToNumber(reader.uint64()));
931
-
932
- continue;
933
- }
934
-
935
- if (tag === 106) {
936
- const end2 = reader.uint32() + reader.pos;
937
- while (reader.pos < end2) {
938
- message.unbondingIds.push(longToNumber(reader.uint64()));
939
- }
940
-
941
- continue;
942
- }
943
-
944
- break;
945
- }
946
- }
947
- if ((tag & 7) === 4 || tag === 0) {
948
- break;
949
- }
950
- reader.skip(tag & 7);
951
- }
952
- return message;
953
- },
954
-
955
- fromJSON(object: any): Validator {
956
- return {
957
- operatorAddress: isSet(object.operatorAddress) ? globalThis.String(object.operatorAddress) : "",
958
- consensusPubkey: isSet(object.consensusPubkey) ? Any.fromJSON(object.consensusPubkey) : undefined,
959
- jailed: isSet(object.jailed) ? globalThis.Boolean(object.jailed) : false,
960
- status: isSet(object.status) ? bondStatusFromJSON(object.status) : 0,
961
- tokens: isSet(object.tokens) ? globalThis.String(object.tokens) : "",
962
- delegatorShares: isSet(object.delegatorShares) ? globalThis.String(object.delegatorShares) : "",
963
- description: isSet(object.description) ? Description.fromJSON(object.description) : undefined,
964
- unbondingHeight: isSet(object.unbondingHeight) ? globalThis.Number(object.unbondingHeight) : 0,
965
- unbondingTime: isSet(object.unbondingTime) ? fromJsonTimestamp(object.unbondingTime) : undefined,
966
- commission: isSet(object.commission) ? Commission.fromJSON(object.commission) : undefined,
967
- minSelfDelegation: isSet(object.minSelfDelegation) ? globalThis.String(object.minSelfDelegation) : "",
968
- unbondingOnHoldRefCount: isSet(object.unbondingOnHoldRefCount)
969
- ? globalThis.Number(object.unbondingOnHoldRefCount)
970
- : 0,
971
- unbondingIds: globalThis.Array.isArray(object?.unbondingIds)
972
- ? object.unbondingIds.map((e: any) => globalThis.Number(e))
973
- : [],
974
- };
975
- },
976
-
977
- toJSON(message: Validator): unknown {
978
- const obj: any = {};
979
- if (message.operatorAddress !== "") {
980
- obj.operatorAddress = message.operatorAddress;
981
- }
982
- if (message.consensusPubkey !== undefined) {
983
- obj.consensusPubkey = Any.toJSON(message.consensusPubkey);
984
- }
985
- if (message.jailed !== false) {
986
- obj.jailed = message.jailed;
987
- }
988
- if (message.status !== 0) {
989
- obj.status = bondStatusToJSON(message.status);
990
- }
991
- if (message.tokens !== "") {
992
- obj.tokens = message.tokens;
993
- }
994
- if (message.delegatorShares !== "") {
995
- obj.delegatorShares = message.delegatorShares;
996
- }
997
- if (message.description !== undefined) {
998
- obj.description = Description.toJSON(message.description);
999
- }
1000
- if (message.unbondingHeight !== 0) {
1001
- obj.unbondingHeight = Math.round(message.unbondingHeight);
1002
- }
1003
- if (message.unbondingTime !== undefined) {
1004
- obj.unbondingTime = message.unbondingTime.toISOString();
1005
- }
1006
- if (message.commission !== undefined) {
1007
- obj.commission = Commission.toJSON(message.commission);
1008
- }
1009
- if (message.minSelfDelegation !== "") {
1010
- obj.minSelfDelegation = message.minSelfDelegation;
1011
- }
1012
- if (message.unbondingOnHoldRefCount !== 0) {
1013
- obj.unbondingOnHoldRefCount = Math.round(message.unbondingOnHoldRefCount);
1014
- }
1015
- if (message.unbondingIds?.length) {
1016
- obj.unbondingIds = message.unbondingIds.map((e) => Math.round(e));
1017
- }
1018
- return obj;
1019
- },
1020
-
1021
- create<I extends Exact<DeepPartial<Validator>, I>>(base?: I): Validator {
1022
- return Validator.fromPartial(base ?? ({} as any));
1023
- },
1024
- fromPartial<I extends Exact<DeepPartial<Validator>, I>>(object: I): Validator {
1025
- const message = createBaseValidator();
1026
- message.operatorAddress = object.operatorAddress ?? "";
1027
- message.consensusPubkey = (object.consensusPubkey !== undefined && object.consensusPubkey !== null)
1028
- ? Any.fromPartial(object.consensusPubkey)
1029
- : undefined;
1030
- message.jailed = object.jailed ?? false;
1031
- message.status = object.status ?? 0;
1032
- message.tokens = object.tokens ?? "";
1033
- message.delegatorShares = object.delegatorShares ?? "";
1034
- message.description = (object.description !== undefined && object.description !== null)
1035
- ? Description.fromPartial(object.description)
1036
- : undefined;
1037
- message.unbondingHeight = object.unbondingHeight ?? 0;
1038
- message.unbondingTime = object.unbondingTime ?? undefined;
1039
- message.commission = (object.commission !== undefined && object.commission !== null)
1040
- ? Commission.fromPartial(object.commission)
1041
- : undefined;
1042
- message.minSelfDelegation = object.minSelfDelegation ?? "";
1043
- message.unbondingOnHoldRefCount = object.unbondingOnHoldRefCount ?? 0;
1044
- message.unbondingIds = object.unbondingIds?.map((e) => e) || [];
1045
- return message;
1046
- },
1047
- };
1048
-
1049
- function createBaseValAddresses(): ValAddresses {
1050
- return { addresses: [] };
1051
- }
1052
-
1053
- export const ValAddresses: MessageFns<ValAddresses> = {
1054
- encode(message: ValAddresses, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1055
- for (const v of message.addresses) {
1056
- writer.uint32(10).string(v!);
1057
- }
1058
- return writer;
1059
- },
1060
-
1061
- decode(input: BinaryReader | Uint8Array, length?: number): ValAddresses {
1062
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1063
- let end = length === undefined ? reader.len : reader.pos + length;
1064
- const message = createBaseValAddresses();
1065
- while (reader.pos < end) {
1066
- const tag = reader.uint32();
1067
- switch (tag >>> 3) {
1068
- case 1: {
1069
- if (tag !== 10) {
1070
- break;
1071
- }
1072
-
1073
- message.addresses.push(reader.string());
1074
- continue;
1075
- }
1076
- }
1077
- if ((tag & 7) === 4 || tag === 0) {
1078
- break;
1079
- }
1080
- reader.skip(tag & 7);
1081
- }
1082
- return message;
1083
- },
1084
-
1085
- fromJSON(object: any): ValAddresses {
1086
- return {
1087
- addresses: globalThis.Array.isArray(object?.addresses)
1088
- ? object.addresses.map((e: any) => globalThis.String(e))
1089
- : [],
1090
- };
1091
- },
1092
-
1093
- toJSON(message: ValAddresses): unknown {
1094
- const obj: any = {};
1095
- if (message.addresses?.length) {
1096
- obj.addresses = message.addresses;
1097
- }
1098
- return obj;
1099
- },
1100
-
1101
- create<I extends Exact<DeepPartial<ValAddresses>, I>>(base?: I): ValAddresses {
1102
- return ValAddresses.fromPartial(base ?? ({} as any));
1103
- },
1104
- fromPartial<I extends Exact<DeepPartial<ValAddresses>, I>>(object: I): ValAddresses {
1105
- const message = createBaseValAddresses();
1106
- message.addresses = object.addresses?.map((e) => e) || [];
1107
- return message;
1108
- },
1109
- };
1110
-
1111
- function createBaseDVPair(): DVPair {
1112
- return { delegatorAddress: "", validatorAddress: "" };
1113
- }
1114
-
1115
- export const DVPair: MessageFns<DVPair> = {
1116
- encode(message: DVPair, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1117
- if (message.delegatorAddress !== "") {
1118
- writer.uint32(10).string(message.delegatorAddress);
1119
- }
1120
- if (message.validatorAddress !== "") {
1121
- writer.uint32(18).string(message.validatorAddress);
1122
- }
1123
- return writer;
1124
- },
1125
-
1126
- decode(input: BinaryReader | Uint8Array, length?: number): DVPair {
1127
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1128
- let end = length === undefined ? reader.len : reader.pos + length;
1129
- const message = createBaseDVPair();
1130
- while (reader.pos < end) {
1131
- const tag = reader.uint32();
1132
- switch (tag >>> 3) {
1133
- case 1: {
1134
- if (tag !== 10) {
1135
- break;
1136
- }
1137
-
1138
- message.delegatorAddress = reader.string();
1139
- continue;
1140
- }
1141
- case 2: {
1142
- if (tag !== 18) {
1143
- break;
1144
- }
1145
-
1146
- message.validatorAddress = reader.string();
1147
- continue;
1148
- }
1149
- }
1150
- if ((tag & 7) === 4 || tag === 0) {
1151
- break;
1152
- }
1153
- reader.skip(tag & 7);
1154
- }
1155
- return message;
1156
- },
1157
-
1158
- fromJSON(object: any): DVPair {
1159
- return {
1160
- delegatorAddress: isSet(object.delegatorAddress) ? globalThis.String(object.delegatorAddress) : "",
1161
- validatorAddress: isSet(object.validatorAddress) ? globalThis.String(object.validatorAddress) : "",
1162
- };
1163
- },
1164
-
1165
- toJSON(message: DVPair): unknown {
1166
- const obj: any = {};
1167
- if (message.delegatorAddress !== "") {
1168
- obj.delegatorAddress = message.delegatorAddress;
1169
- }
1170
- if (message.validatorAddress !== "") {
1171
- obj.validatorAddress = message.validatorAddress;
1172
- }
1173
- return obj;
1174
- },
1175
-
1176
- create<I extends Exact<DeepPartial<DVPair>, I>>(base?: I): DVPair {
1177
- return DVPair.fromPartial(base ?? ({} as any));
1178
- },
1179
- fromPartial<I extends Exact<DeepPartial<DVPair>, I>>(object: I): DVPair {
1180
- const message = createBaseDVPair();
1181
- message.delegatorAddress = object.delegatorAddress ?? "";
1182
- message.validatorAddress = object.validatorAddress ?? "";
1183
- return message;
1184
- },
1185
- };
1186
-
1187
- function createBaseDVPairs(): DVPairs {
1188
- return { pairs: [] };
1189
- }
1190
-
1191
- export const DVPairs: MessageFns<DVPairs> = {
1192
- encode(message: DVPairs, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1193
- for (const v of message.pairs) {
1194
- DVPair.encode(v!, writer.uint32(10).fork()).join();
1195
- }
1196
- return writer;
1197
- },
1198
-
1199
- decode(input: BinaryReader | Uint8Array, length?: number): DVPairs {
1200
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1201
- let end = length === undefined ? reader.len : reader.pos + length;
1202
- const message = createBaseDVPairs();
1203
- while (reader.pos < end) {
1204
- const tag = reader.uint32();
1205
- switch (tag >>> 3) {
1206
- case 1: {
1207
- if (tag !== 10) {
1208
- break;
1209
- }
1210
-
1211
- message.pairs.push(DVPair.decode(reader, reader.uint32()));
1212
- continue;
1213
- }
1214
- }
1215
- if ((tag & 7) === 4 || tag === 0) {
1216
- break;
1217
- }
1218
- reader.skip(tag & 7);
1219
- }
1220
- return message;
1221
- },
1222
-
1223
- fromJSON(object: any): DVPairs {
1224
- return { pairs: globalThis.Array.isArray(object?.pairs) ? object.pairs.map((e: any) => DVPair.fromJSON(e)) : [] };
1225
- },
1226
-
1227
- toJSON(message: DVPairs): unknown {
1228
- const obj: any = {};
1229
- if (message.pairs?.length) {
1230
- obj.pairs = message.pairs.map((e) => DVPair.toJSON(e));
1231
- }
1232
- return obj;
1233
- },
1234
-
1235
- create<I extends Exact<DeepPartial<DVPairs>, I>>(base?: I): DVPairs {
1236
- return DVPairs.fromPartial(base ?? ({} as any));
1237
- },
1238
- fromPartial<I extends Exact<DeepPartial<DVPairs>, I>>(object: I): DVPairs {
1239
- const message = createBaseDVPairs();
1240
- message.pairs = object.pairs?.map((e) => DVPair.fromPartial(e)) || [];
1241
- return message;
1242
- },
1243
- };
1244
-
1245
- function createBaseDVVTriplet(): DVVTriplet {
1246
- return { delegatorAddress: "", validatorSrcAddress: "", validatorDstAddress: "" };
1247
- }
1248
-
1249
- export const DVVTriplet: MessageFns<DVVTriplet> = {
1250
- encode(message: DVVTriplet, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1251
- if (message.delegatorAddress !== "") {
1252
- writer.uint32(10).string(message.delegatorAddress);
1253
- }
1254
- if (message.validatorSrcAddress !== "") {
1255
- writer.uint32(18).string(message.validatorSrcAddress);
1256
- }
1257
- if (message.validatorDstAddress !== "") {
1258
- writer.uint32(26).string(message.validatorDstAddress);
1259
- }
1260
- return writer;
1261
- },
1262
-
1263
- decode(input: BinaryReader | Uint8Array, length?: number): DVVTriplet {
1264
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1265
- let end = length === undefined ? reader.len : reader.pos + length;
1266
- const message = createBaseDVVTriplet();
1267
- while (reader.pos < end) {
1268
- const tag = reader.uint32();
1269
- switch (tag >>> 3) {
1270
- case 1: {
1271
- if (tag !== 10) {
1272
- break;
1273
- }
1274
-
1275
- message.delegatorAddress = reader.string();
1276
- continue;
1277
- }
1278
- case 2: {
1279
- if (tag !== 18) {
1280
- break;
1281
- }
1282
-
1283
- message.validatorSrcAddress = reader.string();
1284
- continue;
1285
- }
1286
- case 3: {
1287
- if (tag !== 26) {
1288
- break;
1289
- }
1290
-
1291
- message.validatorDstAddress = reader.string();
1292
- continue;
1293
- }
1294
- }
1295
- if ((tag & 7) === 4 || tag === 0) {
1296
- break;
1297
- }
1298
- reader.skip(tag & 7);
1299
- }
1300
- return message;
1301
- },
1302
-
1303
- fromJSON(object: any): DVVTriplet {
1304
- return {
1305
- delegatorAddress: isSet(object.delegatorAddress) ? globalThis.String(object.delegatorAddress) : "",
1306
- validatorSrcAddress: isSet(object.validatorSrcAddress) ? globalThis.String(object.validatorSrcAddress) : "",
1307
- validatorDstAddress: isSet(object.validatorDstAddress) ? globalThis.String(object.validatorDstAddress) : "",
1308
- };
1309
- },
1310
-
1311
- toJSON(message: DVVTriplet): unknown {
1312
- const obj: any = {};
1313
- if (message.delegatorAddress !== "") {
1314
- obj.delegatorAddress = message.delegatorAddress;
1315
- }
1316
- if (message.validatorSrcAddress !== "") {
1317
- obj.validatorSrcAddress = message.validatorSrcAddress;
1318
- }
1319
- if (message.validatorDstAddress !== "") {
1320
- obj.validatorDstAddress = message.validatorDstAddress;
1321
- }
1322
- return obj;
1323
- },
1324
-
1325
- create<I extends Exact<DeepPartial<DVVTriplet>, I>>(base?: I): DVVTriplet {
1326
- return DVVTriplet.fromPartial(base ?? ({} as any));
1327
- },
1328
- fromPartial<I extends Exact<DeepPartial<DVVTriplet>, I>>(object: I): DVVTriplet {
1329
- const message = createBaseDVVTriplet();
1330
- message.delegatorAddress = object.delegatorAddress ?? "";
1331
- message.validatorSrcAddress = object.validatorSrcAddress ?? "";
1332
- message.validatorDstAddress = object.validatorDstAddress ?? "";
1333
- return message;
1334
- },
1335
- };
1336
-
1337
- function createBaseDVVTriplets(): DVVTriplets {
1338
- return { triplets: [] };
1339
- }
1340
-
1341
- export const DVVTriplets: MessageFns<DVVTriplets> = {
1342
- encode(message: DVVTriplets, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1343
- for (const v of message.triplets) {
1344
- DVVTriplet.encode(v!, writer.uint32(10).fork()).join();
1345
- }
1346
- return writer;
1347
- },
1348
-
1349
- decode(input: BinaryReader | Uint8Array, length?: number): DVVTriplets {
1350
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1351
- let end = length === undefined ? reader.len : reader.pos + length;
1352
- const message = createBaseDVVTriplets();
1353
- while (reader.pos < end) {
1354
- const tag = reader.uint32();
1355
- switch (tag >>> 3) {
1356
- case 1: {
1357
- if (tag !== 10) {
1358
- break;
1359
- }
1360
-
1361
- message.triplets.push(DVVTriplet.decode(reader, reader.uint32()));
1362
- continue;
1363
- }
1364
- }
1365
- if ((tag & 7) === 4 || tag === 0) {
1366
- break;
1367
- }
1368
- reader.skip(tag & 7);
1369
- }
1370
- return message;
1371
- },
1372
-
1373
- fromJSON(object: any): DVVTriplets {
1374
- return {
1375
- triplets: globalThis.Array.isArray(object?.triplets)
1376
- ? object.triplets.map((e: any) => DVVTriplet.fromJSON(e))
1377
- : [],
1378
- };
1379
- },
1380
-
1381
- toJSON(message: DVVTriplets): unknown {
1382
- const obj: any = {};
1383
- if (message.triplets?.length) {
1384
- obj.triplets = message.triplets.map((e) => DVVTriplet.toJSON(e));
1385
- }
1386
- return obj;
1387
- },
1388
-
1389
- create<I extends Exact<DeepPartial<DVVTriplets>, I>>(base?: I): DVVTriplets {
1390
- return DVVTriplets.fromPartial(base ?? ({} as any));
1391
- },
1392
- fromPartial<I extends Exact<DeepPartial<DVVTriplets>, I>>(object: I): DVVTriplets {
1393
- const message = createBaseDVVTriplets();
1394
- message.triplets = object.triplets?.map((e) => DVVTriplet.fromPartial(e)) || [];
1395
- return message;
1396
- },
1397
- };
1398
-
1399
- function createBaseDelegation(): Delegation {
1400
- return { delegatorAddress: "", validatorAddress: "", shares: "" };
1401
- }
1402
-
1403
- export const Delegation: MessageFns<Delegation> = {
1404
- encode(message: Delegation, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1405
- if (message.delegatorAddress !== "") {
1406
- writer.uint32(10).string(message.delegatorAddress);
1407
- }
1408
- if (message.validatorAddress !== "") {
1409
- writer.uint32(18).string(message.validatorAddress);
1410
- }
1411
- if (message.shares !== "") {
1412
- writer.uint32(26).string(message.shares);
1413
- }
1414
- return writer;
1415
- },
1416
-
1417
- decode(input: BinaryReader | Uint8Array, length?: number): Delegation {
1418
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1419
- let end = length === undefined ? reader.len : reader.pos + length;
1420
- const message = createBaseDelegation();
1421
- while (reader.pos < end) {
1422
- const tag = reader.uint32();
1423
- switch (tag >>> 3) {
1424
- case 1: {
1425
- if (tag !== 10) {
1426
- break;
1427
- }
1428
-
1429
- message.delegatorAddress = reader.string();
1430
- continue;
1431
- }
1432
- case 2: {
1433
- if (tag !== 18) {
1434
- break;
1435
- }
1436
-
1437
- message.validatorAddress = reader.string();
1438
- continue;
1439
- }
1440
- case 3: {
1441
- if (tag !== 26) {
1442
- break;
1443
- }
1444
-
1445
- message.shares = reader.string();
1446
- continue;
1447
- }
1448
- }
1449
- if ((tag & 7) === 4 || tag === 0) {
1450
- break;
1451
- }
1452
- reader.skip(tag & 7);
1453
- }
1454
- return message;
1455
- },
1456
-
1457
- fromJSON(object: any): Delegation {
1458
- return {
1459
- delegatorAddress: isSet(object.delegatorAddress) ? globalThis.String(object.delegatorAddress) : "",
1460
- validatorAddress: isSet(object.validatorAddress) ? globalThis.String(object.validatorAddress) : "",
1461
- shares: isSet(object.shares) ? globalThis.String(object.shares) : "",
1462
- };
1463
- },
1464
-
1465
- toJSON(message: Delegation): unknown {
1466
- const obj: any = {};
1467
- if (message.delegatorAddress !== "") {
1468
- obj.delegatorAddress = message.delegatorAddress;
1469
- }
1470
- if (message.validatorAddress !== "") {
1471
- obj.validatorAddress = message.validatorAddress;
1472
- }
1473
- if (message.shares !== "") {
1474
- obj.shares = message.shares;
1475
- }
1476
- return obj;
1477
- },
1478
-
1479
- create<I extends Exact<DeepPartial<Delegation>, I>>(base?: I): Delegation {
1480
- return Delegation.fromPartial(base ?? ({} as any));
1481
- },
1482
- fromPartial<I extends Exact<DeepPartial<Delegation>, I>>(object: I): Delegation {
1483
- const message = createBaseDelegation();
1484
- message.delegatorAddress = object.delegatorAddress ?? "";
1485
- message.validatorAddress = object.validatorAddress ?? "";
1486
- message.shares = object.shares ?? "";
1487
- return message;
1488
- },
1489
- };
1490
-
1491
- function createBaseUnbondingDelegation(): UnbondingDelegation {
1492
- return { delegatorAddress: "", validatorAddress: "", entries: [] };
1493
- }
1494
-
1495
- export const UnbondingDelegation: MessageFns<UnbondingDelegation> = {
1496
- encode(message: UnbondingDelegation, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1497
- if (message.delegatorAddress !== "") {
1498
- writer.uint32(10).string(message.delegatorAddress);
1499
- }
1500
- if (message.validatorAddress !== "") {
1501
- writer.uint32(18).string(message.validatorAddress);
1502
- }
1503
- for (const v of message.entries) {
1504
- UnbondingDelegationEntry.encode(v!, writer.uint32(26).fork()).join();
1505
- }
1506
- return writer;
1507
- },
1508
-
1509
- decode(input: BinaryReader | Uint8Array, length?: number): UnbondingDelegation {
1510
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1511
- let end = length === undefined ? reader.len : reader.pos + length;
1512
- const message = createBaseUnbondingDelegation();
1513
- while (reader.pos < end) {
1514
- const tag = reader.uint32();
1515
- switch (tag >>> 3) {
1516
- case 1: {
1517
- if (tag !== 10) {
1518
- break;
1519
- }
1520
-
1521
- message.delegatorAddress = reader.string();
1522
- continue;
1523
- }
1524
- case 2: {
1525
- if (tag !== 18) {
1526
- break;
1527
- }
1528
-
1529
- message.validatorAddress = reader.string();
1530
- continue;
1531
- }
1532
- case 3: {
1533
- if (tag !== 26) {
1534
- break;
1535
- }
1536
-
1537
- message.entries.push(UnbondingDelegationEntry.decode(reader, reader.uint32()));
1538
- continue;
1539
- }
1540
- }
1541
- if ((tag & 7) === 4 || tag === 0) {
1542
- break;
1543
- }
1544
- reader.skip(tag & 7);
1545
- }
1546
- return message;
1547
- },
1548
-
1549
- fromJSON(object: any): UnbondingDelegation {
1550
- return {
1551
- delegatorAddress: isSet(object.delegatorAddress) ? globalThis.String(object.delegatorAddress) : "",
1552
- validatorAddress: isSet(object.validatorAddress) ? globalThis.String(object.validatorAddress) : "",
1553
- entries: globalThis.Array.isArray(object?.entries)
1554
- ? object.entries.map((e: any) => UnbondingDelegationEntry.fromJSON(e))
1555
- : [],
1556
- };
1557
- },
1558
-
1559
- toJSON(message: UnbondingDelegation): unknown {
1560
- const obj: any = {};
1561
- if (message.delegatorAddress !== "") {
1562
- obj.delegatorAddress = message.delegatorAddress;
1563
- }
1564
- if (message.validatorAddress !== "") {
1565
- obj.validatorAddress = message.validatorAddress;
1566
- }
1567
- if (message.entries?.length) {
1568
- obj.entries = message.entries.map((e) => UnbondingDelegationEntry.toJSON(e));
1569
- }
1570
- return obj;
1571
- },
1572
-
1573
- create<I extends Exact<DeepPartial<UnbondingDelegation>, I>>(base?: I): UnbondingDelegation {
1574
- return UnbondingDelegation.fromPartial(base ?? ({} as any));
1575
- },
1576
- fromPartial<I extends Exact<DeepPartial<UnbondingDelegation>, I>>(object: I): UnbondingDelegation {
1577
- const message = createBaseUnbondingDelegation();
1578
- message.delegatorAddress = object.delegatorAddress ?? "";
1579
- message.validatorAddress = object.validatorAddress ?? "";
1580
- message.entries = object.entries?.map((e) => UnbondingDelegationEntry.fromPartial(e)) || [];
1581
- return message;
1582
- },
1583
- };
1584
-
1585
- function createBaseUnbondingDelegationEntry(): UnbondingDelegationEntry {
1586
- return {
1587
- creationHeight: 0,
1588
- completionTime: undefined,
1589
- initialBalance: "",
1590
- balance: "",
1591
- unbondingId: 0,
1592
- unbondingOnHoldRefCount: 0,
1593
- };
1594
- }
1595
-
1596
- export const UnbondingDelegationEntry: MessageFns<UnbondingDelegationEntry> = {
1597
- encode(message: UnbondingDelegationEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1598
- if (message.creationHeight !== 0) {
1599
- writer.uint32(8).int64(message.creationHeight);
1600
- }
1601
- if (message.completionTime !== undefined) {
1602
- Timestamp.encode(toTimestamp(message.completionTime), writer.uint32(18).fork()).join();
1603
- }
1604
- if (message.initialBalance !== "") {
1605
- writer.uint32(26).string(message.initialBalance);
1606
- }
1607
- if (message.balance !== "") {
1608
- writer.uint32(34).string(message.balance);
1609
- }
1610
- if (message.unbondingId !== 0) {
1611
- writer.uint32(40).uint64(message.unbondingId);
1612
- }
1613
- if (message.unbondingOnHoldRefCount !== 0) {
1614
- writer.uint32(48).int64(message.unbondingOnHoldRefCount);
1615
- }
1616
- return writer;
1617
- },
1618
-
1619
- decode(input: BinaryReader | Uint8Array, length?: number): UnbondingDelegationEntry {
1620
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1621
- let end = length === undefined ? reader.len : reader.pos + length;
1622
- const message = createBaseUnbondingDelegationEntry();
1623
- while (reader.pos < end) {
1624
- const tag = reader.uint32();
1625
- switch (tag >>> 3) {
1626
- case 1: {
1627
- if (tag !== 8) {
1628
- break;
1629
- }
1630
-
1631
- message.creationHeight = longToNumber(reader.int64());
1632
- continue;
1633
- }
1634
- case 2: {
1635
- if (tag !== 18) {
1636
- break;
1637
- }
1638
-
1639
- message.completionTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1640
- continue;
1641
- }
1642
- case 3: {
1643
- if (tag !== 26) {
1644
- break;
1645
- }
1646
-
1647
- message.initialBalance = reader.string();
1648
- continue;
1649
- }
1650
- case 4: {
1651
- if (tag !== 34) {
1652
- break;
1653
- }
1654
-
1655
- message.balance = reader.string();
1656
- continue;
1657
- }
1658
- case 5: {
1659
- if (tag !== 40) {
1660
- break;
1661
- }
1662
-
1663
- message.unbondingId = longToNumber(reader.uint64());
1664
- continue;
1665
- }
1666
- case 6: {
1667
- if (tag !== 48) {
1668
- break;
1669
- }
1670
-
1671
- message.unbondingOnHoldRefCount = longToNumber(reader.int64());
1672
- continue;
1673
- }
1674
- }
1675
- if ((tag & 7) === 4 || tag === 0) {
1676
- break;
1677
- }
1678
- reader.skip(tag & 7);
1679
- }
1680
- return message;
1681
- },
1682
-
1683
- fromJSON(object: any): UnbondingDelegationEntry {
1684
- return {
1685
- creationHeight: isSet(object.creationHeight) ? globalThis.Number(object.creationHeight) : 0,
1686
- completionTime: isSet(object.completionTime) ? fromJsonTimestamp(object.completionTime) : undefined,
1687
- initialBalance: isSet(object.initialBalance) ? globalThis.String(object.initialBalance) : "",
1688
- balance: isSet(object.balance) ? globalThis.String(object.balance) : "",
1689
- unbondingId: isSet(object.unbondingId) ? globalThis.Number(object.unbondingId) : 0,
1690
- unbondingOnHoldRefCount: isSet(object.unbondingOnHoldRefCount)
1691
- ? globalThis.Number(object.unbondingOnHoldRefCount)
1692
- : 0,
1693
- };
1694
- },
1695
-
1696
- toJSON(message: UnbondingDelegationEntry): unknown {
1697
- const obj: any = {};
1698
- if (message.creationHeight !== 0) {
1699
- obj.creationHeight = Math.round(message.creationHeight);
1700
- }
1701
- if (message.completionTime !== undefined) {
1702
- obj.completionTime = message.completionTime.toISOString();
1703
- }
1704
- if (message.initialBalance !== "") {
1705
- obj.initialBalance = message.initialBalance;
1706
- }
1707
- if (message.balance !== "") {
1708
- obj.balance = message.balance;
1709
- }
1710
- if (message.unbondingId !== 0) {
1711
- obj.unbondingId = Math.round(message.unbondingId);
1712
- }
1713
- if (message.unbondingOnHoldRefCount !== 0) {
1714
- obj.unbondingOnHoldRefCount = Math.round(message.unbondingOnHoldRefCount);
1715
- }
1716
- return obj;
1717
- },
1718
-
1719
- create<I extends Exact<DeepPartial<UnbondingDelegationEntry>, I>>(base?: I): UnbondingDelegationEntry {
1720
- return UnbondingDelegationEntry.fromPartial(base ?? ({} as any));
1721
- },
1722
- fromPartial<I extends Exact<DeepPartial<UnbondingDelegationEntry>, I>>(object: I): UnbondingDelegationEntry {
1723
- const message = createBaseUnbondingDelegationEntry();
1724
- message.creationHeight = object.creationHeight ?? 0;
1725
- message.completionTime = object.completionTime ?? undefined;
1726
- message.initialBalance = object.initialBalance ?? "";
1727
- message.balance = object.balance ?? "";
1728
- message.unbondingId = object.unbondingId ?? 0;
1729
- message.unbondingOnHoldRefCount = object.unbondingOnHoldRefCount ?? 0;
1730
- return message;
1731
- },
1732
- };
1733
-
1734
- function createBaseRedelegationEntry(): RedelegationEntry {
1735
- return {
1736
- creationHeight: 0,
1737
- completionTime: undefined,
1738
- initialBalance: "",
1739
- sharesDst: "",
1740
- unbondingId: 0,
1741
- unbondingOnHoldRefCount: 0,
1742
- };
1743
- }
1744
-
1745
- export const RedelegationEntry: MessageFns<RedelegationEntry> = {
1746
- encode(message: RedelegationEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1747
- if (message.creationHeight !== 0) {
1748
- writer.uint32(8).int64(message.creationHeight);
1749
- }
1750
- if (message.completionTime !== undefined) {
1751
- Timestamp.encode(toTimestamp(message.completionTime), writer.uint32(18).fork()).join();
1752
- }
1753
- if (message.initialBalance !== "") {
1754
- writer.uint32(26).string(message.initialBalance);
1755
- }
1756
- if (message.sharesDst !== "") {
1757
- writer.uint32(34).string(message.sharesDst);
1758
- }
1759
- if (message.unbondingId !== 0) {
1760
- writer.uint32(40).uint64(message.unbondingId);
1761
- }
1762
- if (message.unbondingOnHoldRefCount !== 0) {
1763
- writer.uint32(48).int64(message.unbondingOnHoldRefCount);
1764
- }
1765
- return writer;
1766
- },
1767
-
1768
- decode(input: BinaryReader | Uint8Array, length?: number): RedelegationEntry {
1769
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1770
- let end = length === undefined ? reader.len : reader.pos + length;
1771
- const message = createBaseRedelegationEntry();
1772
- while (reader.pos < end) {
1773
- const tag = reader.uint32();
1774
- switch (tag >>> 3) {
1775
- case 1: {
1776
- if (tag !== 8) {
1777
- break;
1778
- }
1779
-
1780
- message.creationHeight = longToNumber(reader.int64());
1781
- continue;
1782
- }
1783
- case 2: {
1784
- if (tag !== 18) {
1785
- break;
1786
- }
1787
-
1788
- message.completionTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1789
- continue;
1790
- }
1791
- case 3: {
1792
- if (tag !== 26) {
1793
- break;
1794
- }
1795
-
1796
- message.initialBalance = reader.string();
1797
- continue;
1798
- }
1799
- case 4: {
1800
- if (tag !== 34) {
1801
- break;
1802
- }
1803
-
1804
- message.sharesDst = reader.string();
1805
- continue;
1806
- }
1807
- case 5: {
1808
- if (tag !== 40) {
1809
- break;
1810
- }
1811
-
1812
- message.unbondingId = longToNumber(reader.uint64());
1813
- continue;
1814
- }
1815
- case 6: {
1816
- if (tag !== 48) {
1817
- break;
1818
- }
1819
-
1820
- message.unbondingOnHoldRefCount = longToNumber(reader.int64());
1821
- continue;
1822
- }
1823
- }
1824
- if ((tag & 7) === 4 || tag === 0) {
1825
- break;
1826
- }
1827
- reader.skip(tag & 7);
1828
- }
1829
- return message;
1830
- },
1831
-
1832
- fromJSON(object: any): RedelegationEntry {
1833
- return {
1834
- creationHeight: isSet(object.creationHeight) ? globalThis.Number(object.creationHeight) : 0,
1835
- completionTime: isSet(object.completionTime) ? fromJsonTimestamp(object.completionTime) : undefined,
1836
- initialBalance: isSet(object.initialBalance) ? globalThis.String(object.initialBalance) : "",
1837
- sharesDst: isSet(object.sharesDst) ? globalThis.String(object.sharesDst) : "",
1838
- unbondingId: isSet(object.unbondingId) ? globalThis.Number(object.unbondingId) : 0,
1839
- unbondingOnHoldRefCount: isSet(object.unbondingOnHoldRefCount)
1840
- ? globalThis.Number(object.unbondingOnHoldRefCount)
1841
- : 0,
1842
- };
1843
- },
1844
-
1845
- toJSON(message: RedelegationEntry): unknown {
1846
- const obj: any = {};
1847
- if (message.creationHeight !== 0) {
1848
- obj.creationHeight = Math.round(message.creationHeight);
1849
- }
1850
- if (message.completionTime !== undefined) {
1851
- obj.completionTime = message.completionTime.toISOString();
1852
- }
1853
- if (message.initialBalance !== "") {
1854
- obj.initialBalance = message.initialBalance;
1855
- }
1856
- if (message.sharesDst !== "") {
1857
- obj.sharesDst = message.sharesDst;
1858
- }
1859
- if (message.unbondingId !== 0) {
1860
- obj.unbondingId = Math.round(message.unbondingId);
1861
- }
1862
- if (message.unbondingOnHoldRefCount !== 0) {
1863
- obj.unbondingOnHoldRefCount = Math.round(message.unbondingOnHoldRefCount);
1864
- }
1865
- return obj;
1866
- },
1867
-
1868
- create<I extends Exact<DeepPartial<RedelegationEntry>, I>>(base?: I): RedelegationEntry {
1869
- return RedelegationEntry.fromPartial(base ?? ({} as any));
1870
- },
1871
- fromPartial<I extends Exact<DeepPartial<RedelegationEntry>, I>>(object: I): RedelegationEntry {
1872
- const message = createBaseRedelegationEntry();
1873
- message.creationHeight = object.creationHeight ?? 0;
1874
- message.completionTime = object.completionTime ?? undefined;
1875
- message.initialBalance = object.initialBalance ?? "";
1876
- message.sharesDst = object.sharesDst ?? "";
1877
- message.unbondingId = object.unbondingId ?? 0;
1878
- message.unbondingOnHoldRefCount = object.unbondingOnHoldRefCount ?? 0;
1879
- return message;
1880
- },
1881
- };
1882
-
1883
- function createBaseRedelegation(): Redelegation {
1884
- return { delegatorAddress: "", validatorSrcAddress: "", validatorDstAddress: "", entries: [] };
1885
- }
1886
-
1887
- export const Redelegation: MessageFns<Redelegation> = {
1888
- encode(message: Redelegation, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1889
- if (message.delegatorAddress !== "") {
1890
- writer.uint32(10).string(message.delegatorAddress);
1891
- }
1892
- if (message.validatorSrcAddress !== "") {
1893
- writer.uint32(18).string(message.validatorSrcAddress);
1894
- }
1895
- if (message.validatorDstAddress !== "") {
1896
- writer.uint32(26).string(message.validatorDstAddress);
1897
- }
1898
- for (const v of message.entries) {
1899
- RedelegationEntry.encode(v!, writer.uint32(34).fork()).join();
1900
- }
1901
- return writer;
1902
- },
1903
-
1904
- decode(input: BinaryReader | Uint8Array, length?: number): Redelegation {
1905
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1906
- let end = length === undefined ? reader.len : reader.pos + length;
1907
- const message = createBaseRedelegation();
1908
- while (reader.pos < end) {
1909
- const tag = reader.uint32();
1910
- switch (tag >>> 3) {
1911
- case 1: {
1912
- if (tag !== 10) {
1913
- break;
1914
- }
1915
-
1916
- message.delegatorAddress = reader.string();
1917
- continue;
1918
- }
1919
- case 2: {
1920
- if (tag !== 18) {
1921
- break;
1922
- }
1923
-
1924
- message.validatorSrcAddress = reader.string();
1925
- continue;
1926
- }
1927
- case 3: {
1928
- if (tag !== 26) {
1929
- break;
1930
- }
1931
-
1932
- message.validatorDstAddress = reader.string();
1933
- continue;
1934
- }
1935
- case 4: {
1936
- if (tag !== 34) {
1937
- break;
1938
- }
1939
-
1940
- message.entries.push(RedelegationEntry.decode(reader, reader.uint32()));
1941
- continue;
1942
- }
1943
- }
1944
- if ((tag & 7) === 4 || tag === 0) {
1945
- break;
1946
- }
1947
- reader.skip(tag & 7);
1948
- }
1949
- return message;
1950
- },
1951
-
1952
- fromJSON(object: any): Redelegation {
1953
- return {
1954
- delegatorAddress: isSet(object.delegatorAddress) ? globalThis.String(object.delegatorAddress) : "",
1955
- validatorSrcAddress: isSet(object.validatorSrcAddress) ? globalThis.String(object.validatorSrcAddress) : "",
1956
- validatorDstAddress: isSet(object.validatorDstAddress) ? globalThis.String(object.validatorDstAddress) : "",
1957
- entries: globalThis.Array.isArray(object?.entries)
1958
- ? object.entries.map((e: any) => RedelegationEntry.fromJSON(e))
1959
- : [],
1960
- };
1961
- },
1962
-
1963
- toJSON(message: Redelegation): unknown {
1964
- const obj: any = {};
1965
- if (message.delegatorAddress !== "") {
1966
- obj.delegatorAddress = message.delegatorAddress;
1967
- }
1968
- if (message.validatorSrcAddress !== "") {
1969
- obj.validatorSrcAddress = message.validatorSrcAddress;
1970
- }
1971
- if (message.validatorDstAddress !== "") {
1972
- obj.validatorDstAddress = message.validatorDstAddress;
1973
- }
1974
- if (message.entries?.length) {
1975
- obj.entries = message.entries.map((e) => RedelegationEntry.toJSON(e));
1976
- }
1977
- return obj;
1978
- },
1979
-
1980
- create<I extends Exact<DeepPartial<Redelegation>, I>>(base?: I): Redelegation {
1981
- return Redelegation.fromPartial(base ?? ({} as any));
1982
- },
1983
- fromPartial<I extends Exact<DeepPartial<Redelegation>, I>>(object: I): Redelegation {
1984
- const message = createBaseRedelegation();
1985
- message.delegatorAddress = object.delegatorAddress ?? "";
1986
- message.validatorSrcAddress = object.validatorSrcAddress ?? "";
1987
- message.validatorDstAddress = object.validatorDstAddress ?? "";
1988
- message.entries = object.entries?.map((e) => RedelegationEntry.fromPartial(e)) || [];
1989
- return message;
1990
- },
1991
- };
1992
-
1993
- function createBaseParams(): Params {
1994
- return {
1995
- unbondingTime: undefined,
1996
- maxValidators: 0,
1997
- maxEntries: 0,
1998
- historicalEntries: 0,
1999
- bondDenom: "",
2000
- minCommissionRate: "",
2001
- };
2002
- }
2003
-
2004
- export const Params: MessageFns<Params> = {
2005
- encode(message: Params, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2006
- if (message.unbondingTime !== undefined) {
2007
- Duration.encode(message.unbondingTime, writer.uint32(10).fork()).join();
2008
- }
2009
- if (message.maxValidators !== 0) {
2010
- writer.uint32(16).uint32(message.maxValidators);
2011
- }
2012
- if (message.maxEntries !== 0) {
2013
- writer.uint32(24).uint32(message.maxEntries);
2014
- }
2015
- if (message.historicalEntries !== 0) {
2016
- writer.uint32(32).uint32(message.historicalEntries);
2017
- }
2018
- if (message.bondDenom !== "") {
2019
- writer.uint32(42).string(message.bondDenom);
2020
- }
2021
- if (message.minCommissionRate !== "") {
2022
- writer.uint32(50).string(message.minCommissionRate);
2023
- }
2024
- return writer;
2025
- },
2026
-
2027
- decode(input: BinaryReader | Uint8Array, length?: number): Params {
2028
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2029
- let end = length === undefined ? reader.len : reader.pos + length;
2030
- const message = createBaseParams();
2031
- while (reader.pos < end) {
2032
- const tag = reader.uint32();
2033
- switch (tag >>> 3) {
2034
- case 1: {
2035
- if (tag !== 10) {
2036
- break;
2037
- }
2038
-
2039
- message.unbondingTime = Duration.decode(reader, reader.uint32());
2040
- continue;
2041
- }
2042
- case 2: {
2043
- if (tag !== 16) {
2044
- break;
2045
- }
2046
-
2047
- message.maxValidators = reader.uint32();
2048
- continue;
2049
- }
2050
- case 3: {
2051
- if (tag !== 24) {
2052
- break;
2053
- }
2054
-
2055
- message.maxEntries = reader.uint32();
2056
- continue;
2057
- }
2058
- case 4: {
2059
- if (tag !== 32) {
2060
- break;
2061
- }
2062
-
2063
- message.historicalEntries = reader.uint32();
2064
- continue;
2065
- }
2066
- case 5: {
2067
- if (tag !== 42) {
2068
- break;
2069
- }
2070
-
2071
- message.bondDenom = reader.string();
2072
- continue;
2073
- }
2074
- case 6: {
2075
- if (tag !== 50) {
2076
- break;
2077
- }
2078
-
2079
- message.minCommissionRate = reader.string();
2080
- continue;
2081
- }
2082
- }
2083
- if ((tag & 7) === 4 || tag === 0) {
2084
- break;
2085
- }
2086
- reader.skip(tag & 7);
2087
- }
2088
- return message;
2089
- },
2090
-
2091
- fromJSON(object: any): Params {
2092
- return {
2093
- unbondingTime: isSet(object.unbondingTime) ? Duration.fromJSON(object.unbondingTime) : undefined,
2094
- maxValidators: isSet(object.maxValidators) ? globalThis.Number(object.maxValidators) : 0,
2095
- maxEntries: isSet(object.maxEntries) ? globalThis.Number(object.maxEntries) : 0,
2096
- historicalEntries: isSet(object.historicalEntries) ? globalThis.Number(object.historicalEntries) : 0,
2097
- bondDenom: isSet(object.bondDenom) ? globalThis.String(object.bondDenom) : "",
2098
- minCommissionRate: isSet(object.minCommissionRate) ? globalThis.String(object.minCommissionRate) : "",
2099
- };
2100
- },
2101
-
2102
- toJSON(message: Params): unknown {
2103
- const obj: any = {};
2104
- if (message.unbondingTime !== undefined) {
2105
- obj.unbondingTime = Duration.toJSON(message.unbondingTime);
2106
- }
2107
- if (message.maxValidators !== 0) {
2108
- obj.maxValidators = Math.round(message.maxValidators);
2109
- }
2110
- if (message.maxEntries !== 0) {
2111
- obj.maxEntries = Math.round(message.maxEntries);
2112
- }
2113
- if (message.historicalEntries !== 0) {
2114
- obj.historicalEntries = Math.round(message.historicalEntries);
2115
- }
2116
- if (message.bondDenom !== "") {
2117
- obj.bondDenom = message.bondDenom;
2118
- }
2119
- if (message.minCommissionRate !== "") {
2120
- obj.minCommissionRate = message.minCommissionRate;
2121
- }
2122
- return obj;
2123
- },
2124
-
2125
- create<I extends Exact<DeepPartial<Params>, I>>(base?: I): Params {
2126
- return Params.fromPartial(base ?? ({} as any));
2127
- },
2128
- fromPartial<I extends Exact<DeepPartial<Params>, I>>(object: I): Params {
2129
- const message = createBaseParams();
2130
- message.unbondingTime = (object.unbondingTime !== undefined && object.unbondingTime !== null)
2131
- ? Duration.fromPartial(object.unbondingTime)
2132
- : undefined;
2133
- message.maxValidators = object.maxValidators ?? 0;
2134
- message.maxEntries = object.maxEntries ?? 0;
2135
- message.historicalEntries = object.historicalEntries ?? 0;
2136
- message.bondDenom = object.bondDenom ?? "";
2137
- message.minCommissionRate = object.minCommissionRate ?? "";
2138
- return message;
2139
- },
2140
- };
2141
-
2142
- function createBaseDelegationResponse(): DelegationResponse {
2143
- return { delegation: undefined, balance: undefined };
2144
- }
2145
-
2146
- export const DelegationResponse: MessageFns<DelegationResponse> = {
2147
- encode(message: DelegationResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2148
- if (message.delegation !== undefined) {
2149
- Delegation.encode(message.delegation, writer.uint32(10).fork()).join();
2150
- }
2151
- if (message.balance !== undefined) {
2152
- Coin.encode(message.balance, writer.uint32(18).fork()).join();
2153
- }
2154
- return writer;
2155
- },
2156
-
2157
- decode(input: BinaryReader | Uint8Array, length?: number): DelegationResponse {
2158
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2159
- let end = length === undefined ? reader.len : reader.pos + length;
2160
- const message = createBaseDelegationResponse();
2161
- while (reader.pos < end) {
2162
- const tag = reader.uint32();
2163
- switch (tag >>> 3) {
2164
- case 1: {
2165
- if (tag !== 10) {
2166
- break;
2167
- }
2168
-
2169
- message.delegation = Delegation.decode(reader, reader.uint32());
2170
- continue;
2171
- }
2172
- case 2: {
2173
- if (tag !== 18) {
2174
- break;
2175
- }
2176
-
2177
- message.balance = Coin.decode(reader, reader.uint32());
2178
- continue;
2179
- }
2180
- }
2181
- if ((tag & 7) === 4 || tag === 0) {
2182
- break;
2183
- }
2184
- reader.skip(tag & 7);
2185
- }
2186
- return message;
2187
- },
2188
-
2189
- fromJSON(object: any): DelegationResponse {
2190
- return {
2191
- delegation: isSet(object.delegation) ? Delegation.fromJSON(object.delegation) : undefined,
2192
- balance: isSet(object.balance) ? Coin.fromJSON(object.balance) : undefined,
2193
- };
2194
- },
2195
-
2196
- toJSON(message: DelegationResponse): unknown {
2197
- const obj: any = {};
2198
- if (message.delegation !== undefined) {
2199
- obj.delegation = Delegation.toJSON(message.delegation);
2200
- }
2201
- if (message.balance !== undefined) {
2202
- obj.balance = Coin.toJSON(message.balance);
2203
- }
2204
- return obj;
2205
- },
2206
-
2207
- create<I extends Exact<DeepPartial<DelegationResponse>, I>>(base?: I): DelegationResponse {
2208
- return DelegationResponse.fromPartial(base ?? ({} as any));
2209
- },
2210
- fromPartial<I extends Exact<DeepPartial<DelegationResponse>, I>>(object: I): DelegationResponse {
2211
- const message = createBaseDelegationResponse();
2212
- message.delegation = (object.delegation !== undefined && object.delegation !== null)
2213
- ? Delegation.fromPartial(object.delegation)
2214
- : undefined;
2215
- message.balance = (object.balance !== undefined && object.balance !== null)
2216
- ? Coin.fromPartial(object.balance)
2217
- : undefined;
2218
- return message;
2219
- },
2220
- };
2221
-
2222
- function createBaseRedelegationEntryResponse(): RedelegationEntryResponse {
2223
- return { redelegationEntry: undefined, balance: "" };
2224
- }
2225
-
2226
- export const RedelegationEntryResponse: MessageFns<RedelegationEntryResponse> = {
2227
- encode(message: RedelegationEntryResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2228
- if (message.redelegationEntry !== undefined) {
2229
- RedelegationEntry.encode(message.redelegationEntry, writer.uint32(10).fork()).join();
2230
- }
2231
- if (message.balance !== "") {
2232
- writer.uint32(34).string(message.balance);
2233
- }
2234
- return writer;
2235
- },
2236
-
2237
- decode(input: BinaryReader | Uint8Array, length?: number): RedelegationEntryResponse {
2238
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2239
- let end = length === undefined ? reader.len : reader.pos + length;
2240
- const message = createBaseRedelegationEntryResponse();
2241
- while (reader.pos < end) {
2242
- const tag = reader.uint32();
2243
- switch (tag >>> 3) {
2244
- case 1: {
2245
- if (tag !== 10) {
2246
- break;
2247
- }
2248
-
2249
- message.redelegationEntry = RedelegationEntry.decode(reader, reader.uint32());
2250
- continue;
2251
- }
2252
- case 4: {
2253
- if (tag !== 34) {
2254
- break;
2255
- }
2256
-
2257
- message.balance = reader.string();
2258
- continue;
2259
- }
2260
- }
2261
- if ((tag & 7) === 4 || tag === 0) {
2262
- break;
2263
- }
2264
- reader.skip(tag & 7);
2265
- }
2266
- return message;
2267
- },
2268
-
2269
- fromJSON(object: any): RedelegationEntryResponse {
2270
- return {
2271
- redelegationEntry: isSet(object.redelegationEntry)
2272
- ? RedelegationEntry.fromJSON(object.redelegationEntry)
2273
- : undefined,
2274
- balance: isSet(object.balance) ? globalThis.String(object.balance) : "",
2275
- };
2276
- },
2277
-
2278
- toJSON(message: RedelegationEntryResponse): unknown {
2279
- const obj: any = {};
2280
- if (message.redelegationEntry !== undefined) {
2281
- obj.redelegationEntry = RedelegationEntry.toJSON(message.redelegationEntry);
2282
- }
2283
- if (message.balance !== "") {
2284
- obj.balance = message.balance;
2285
- }
2286
- return obj;
2287
- },
2288
-
2289
- create<I extends Exact<DeepPartial<RedelegationEntryResponse>, I>>(base?: I): RedelegationEntryResponse {
2290
- return RedelegationEntryResponse.fromPartial(base ?? ({} as any));
2291
- },
2292
- fromPartial<I extends Exact<DeepPartial<RedelegationEntryResponse>, I>>(object: I): RedelegationEntryResponse {
2293
- const message = createBaseRedelegationEntryResponse();
2294
- message.redelegationEntry = (object.redelegationEntry !== undefined && object.redelegationEntry !== null)
2295
- ? RedelegationEntry.fromPartial(object.redelegationEntry)
2296
- : undefined;
2297
- message.balance = object.balance ?? "";
2298
- return message;
2299
- },
2300
- };
2301
-
2302
- function createBaseRedelegationResponse(): RedelegationResponse {
2303
- return { redelegation: undefined, entries: [] };
2304
- }
2305
-
2306
- export const RedelegationResponse: MessageFns<RedelegationResponse> = {
2307
- encode(message: RedelegationResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2308
- if (message.redelegation !== undefined) {
2309
- Redelegation.encode(message.redelegation, writer.uint32(10).fork()).join();
2310
- }
2311
- for (const v of message.entries) {
2312
- RedelegationEntryResponse.encode(v!, writer.uint32(18).fork()).join();
2313
- }
2314
- return writer;
2315
- },
2316
-
2317
- decode(input: BinaryReader | Uint8Array, length?: number): RedelegationResponse {
2318
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2319
- let end = length === undefined ? reader.len : reader.pos + length;
2320
- const message = createBaseRedelegationResponse();
2321
- while (reader.pos < end) {
2322
- const tag = reader.uint32();
2323
- switch (tag >>> 3) {
2324
- case 1: {
2325
- if (tag !== 10) {
2326
- break;
2327
- }
2328
-
2329
- message.redelegation = Redelegation.decode(reader, reader.uint32());
2330
- continue;
2331
- }
2332
- case 2: {
2333
- if (tag !== 18) {
2334
- break;
2335
- }
2336
-
2337
- message.entries.push(RedelegationEntryResponse.decode(reader, reader.uint32()));
2338
- continue;
2339
- }
2340
- }
2341
- if ((tag & 7) === 4 || tag === 0) {
2342
- break;
2343
- }
2344
- reader.skip(tag & 7);
2345
- }
2346
- return message;
2347
- },
2348
-
2349
- fromJSON(object: any): RedelegationResponse {
2350
- return {
2351
- redelegation: isSet(object.redelegation) ? Redelegation.fromJSON(object.redelegation) : undefined,
2352
- entries: globalThis.Array.isArray(object?.entries)
2353
- ? object.entries.map((e: any) => RedelegationEntryResponse.fromJSON(e))
2354
- : [],
2355
- };
2356
- },
2357
-
2358
- toJSON(message: RedelegationResponse): unknown {
2359
- const obj: any = {};
2360
- if (message.redelegation !== undefined) {
2361
- obj.redelegation = Redelegation.toJSON(message.redelegation);
2362
- }
2363
- if (message.entries?.length) {
2364
- obj.entries = message.entries.map((e) => RedelegationEntryResponse.toJSON(e));
2365
- }
2366
- return obj;
2367
- },
2368
-
2369
- create<I extends Exact<DeepPartial<RedelegationResponse>, I>>(base?: I): RedelegationResponse {
2370
- return RedelegationResponse.fromPartial(base ?? ({} as any));
2371
- },
2372
- fromPartial<I extends Exact<DeepPartial<RedelegationResponse>, I>>(object: I): RedelegationResponse {
2373
- const message = createBaseRedelegationResponse();
2374
- message.redelegation = (object.redelegation !== undefined && object.redelegation !== null)
2375
- ? Redelegation.fromPartial(object.redelegation)
2376
- : undefined;
2377
- message.entries = object.entries?.map((e) => RedelegationEntryResponse.fromPartial(e)) || [];
2378
- return message;
2379
- },
2380
- };
2381
-
2382
- function createBasePool(): Pool {
2383
- return { notBondedTokens: "", bondedTokens: "" };
2384
- }
2385
-
2386
- export const Pool: MessageFns<Pool> = {
2387
- encode(message: Pool, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2388
- if (message.notBondedTokens !== "") {
2389
- writer.uint32(10).string(message.notBondedTokens);
2390
- }
2391
- if (message.bondedTokens !== "") {
2392
- writer.uint32(18).string(message.bondedTokens);
2393
- }
2394
- return writer;
2395
- },
2396
-
2397
- decode(input: BinaryReader | Uint8Array, length?: number): Pool {
2398
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2399
- let end = length === undefined ? reader.len : reader.pos + length;
2400
- const message = createBasePool();
2401
- while (reader.pos < end) {
2402
- const tag = reader.uint32();
2403
- switch (tag >>> 3) {
2404
- case 1: {
2405
- if (tag !== 10) {
2406
- break;
2407
- }
2408
-
2409
- message.notBondedTokens = reader.string();
2410
- continue;
2411
- }
2412
- case 2: {
2413
- if (tag !== 18) {
2414
- break;
2415
- }
2416
-
2417
- message.bondedTokens = reader.string();
2418
- continue;
2419
- }
2420
- }
2421
- if ((tag & 7) === 4 || tag === 0) {
2422
- break;
2423
- }
2424
- reader.skip(tag & 7);
2425
- }
2426
- return message;
2427
- },
2428
-
2429
- fromJSON(object: any): Pool {
2430
- return {
2431
- notBondedTokens: isSet(object.notBondedTokens) ? globalThis.String(object.notBondedTokens) : "",
2432
- bondedTokens: isSet(object.bondedTokens) ? globalThis.String(object.bondedTokens) : "",
2433
- };
2434
- },
2435
-
2436
- toJSON(message: Pool): unknown {
2437
- const obj: any = {};
2438
- if (message.notBondedTokens !== "") {
2439
- obj.notBondedTokens = message.notBondedTokens;
2440
- }
2441
- if (message.bondedTokens !== "") {
2442
- obj.bondedTokens = message.bondedTokens;
2443
- }
2444
- return obj;
2445
- },
2446
-
2447
- create<I extends Exact<DeepPartial<Pool>, I>>(base?: I): Pool {
2448
- return Pool.fromPartial(base ?? ({} as any));
2449
- },
2450
- fromPartial<I extends Exact<DeepPartial<Pool>, I>>(object: I): Pool {
2451
- const message = createBasePool();
2452
- message.notBondedTokens = object.notBondedTokens ?? "";
2453
- message.bondedTokens = object.bondedTokens ?? "";
2454
- return message;
2455
- },
2456
- };
2457
-
2458
- function createBaseValidatorUpdates(): ValidatorUpdates {
2459
- return { updates: [] };
2460
- }
2461
-
2462
- export const ValidatorUpdates: MessageFns<ValidatorUpdates> = {
2463
- encode(message: ValidatorUpdates, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2464
- for (const v of message.updates) {
2465
- ValidatorUpdate.encode(v!, writer.uint32(10).fork()).join();
2466
- }
2467
- return writer;
2468
- },
2469
-
2470
- decode(input: BinaryReader | Uint8Array, length?: number): ValidatorUpdates {
2471
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2472
- let end = length === undefined ? reader.len : reader.pos + length;
2473
- const message = createBaseValidatorUpdates();
2474
- while (reader.pos < end) {
2475
- const tag = reader.uint32();
2476
- switch (tag >>> 3) {
2477
- case 1: {
2478
- if (tag !== 10) {
2479
- break;
2480
- }
2481
-
2482
- message.updates.push(ValidatorUpdate.decode(reader, reader.uint32()));
2483
- continue;
2484
- }
2485
- }
2486
- if ((tag & 7) === 4 || tag === 0) {
2487
- break;
2488
- }
2489
- reader.skip(tag & 7);
2490
- }
2491
- return message;
2492
- },
2493
-
2494
- fromJSON(object: any): ValidatorUpdates {
2495
- return {
2496
- updates: globalThis.Array.isArray(object?.updates)
2497
- ? object.updates.map((e: any) => ValidatorUpdate.fromJSON(e))
2498
- : [],
2499
- };
2500
- },
2501
-
2502
- toJSON(message: ValidatorUpdates): unknown {
2503
- const obj: any = {};
2504
- if (message.updates?.length) {
2505
- obj.updates = message.updates.map((e) => ValidatorUpdate.toJSON(e));
2506
- }
2507
- return obj;
2508
- },
2509
-
2510
- create<I extends Exact<DeepPartial<ValidatorUpdates>, I>>(base?: I): ValidatorUpdates {
2511
- return ValidatorUpdates.fromPartial(base ?? ({} as any));
2512
- },
2513
- fromPartial<I extends Exact<DeepPartial<ValidatorUpdates>, I>>(object: I): ValidatorUpdates {
2514
- const message = createBaseValidatorUpdates();
2515
- message.updates = object.updates?.map((e) => ValidatorUpdate.fromPartial(e)) || [];
2516
- return message;
2517
- },
2518
- };
2519
-
2520
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
2521
-
2522
- export type DeepPartial<T> = T extends Builtin ? T
2523
- : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
2524
- : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
2525
- : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
2526
- : Partial<T>;
2527
-
2528
- type KeysOfUnion<T> = T extends T ? keyof T : never;
2529
- export type Exact<P, I extends P> = P extends Builtin ? P
2530
- : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
2531
-
2532
- function toTimestamp(date: Date): Timestamp {
2533
- const seconds = Math.trunc(date.getTime() / 1_000);
2534
- const nanos = (date.getTime() % 1_000) * 1_000_000;
2535
- return { seconds, nanos };
2536
- }
2537
-
2538
- function fromTimestamp(t: Timestamp): Date {
2539
- let millis = (t.seconds || 0) * 1_000;
2540
- millis += (t.nanos || 0) / 1_000_000;
2541
- return new globalThis.Date(millis);
2542
- }
2543
-
2544
- function fromJsonTimestamp(o: any): Date {
2545
- if (o instanceof globalThis.Date) {
2546
- return o;
2547
- } else if (typeof o === "string") {
2548
- return new globalThis.Date(o);
2549
- } else {
2550
- return fromTimestamp(Timestamp.fromJSON(o));
2551
- }
2552
- }
2553
-
2554
- function longToNumber(int64: { toString(): string }): number {
2555
- const num = globalThis.Number(int64.toString());
2556
- if (num > globalThis.Number.MAX_SAFE_INTEGER) {
2557
- throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
2558
- }
2559
- if (num < globalThis.Number.MIN_SAFE_INTEGER) {
2560
- throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
2561
- }
2562
- return num;
2563
- }
2564
-
2565
- function isSet(value: any): boolean {
2566
- return value !== null && value !== undefined;
2567
- }
2568
-
2569
- export interface MessageFns<T> {
2570
- encode(message: T, writer?: BinaryWriter): BinaryWriter;
2571
- decode(input: BinaryReader | Uint8Array, length?: number): T;
2572
- fromJSON(object: any): T;
2573
- toJSON(message: T): unknown;
2574
- create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
2575
- fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
2576
- }