decentralcardgame-cardchain-client-ts 0.0.31 → 0.0.33

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 +25 -25
  3. package/package.json +12 -1
  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,1731 +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/ics23/v1/proofs.proto
6
-
7
- /* eslint-disable */
8
- import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
9
-
10
- export const protobufPackage = "cosmos.ics23.v1";
11
-
12
- export enum HashOp {
13
- /** NO_HASH - NO_HASH is the default if no data passed. Note this is an illegal argument some places. */
14
- NO_HASH = 0,
15
- SHA256 = 1,
16
- SHA512 = 2,
17
- KECCAK = 3,
18
- RIPEMD160 = 4,
19
- /** BITCOIN - ripemd160(sha256(x)) */
20
- BITCOIN = 5,
21
- SHA512_256 = 6,
22
- UNRECOGNIZED = -1,
23
- }
24
-
25
- export function hashOpFromJSON(object: any): HashOp {
26
- switch (object) {
27
- case 0:
28
- case "NO_HASH":
29
- return HashOp.NO_HASH;
30
- case 1:
31
- case "SHA256":
32
- return HashOp.SHA256;
33
- case 2:
34
- case "SHA512":
35
- return HashOp.SHA512;
36
- case 3:
37
- case "KECCAK":
38
- return HashOp.KECCAK;
39
- case 4:
40
- case "RIPEMD160":
41
- return HashOp.RIPEMD160;
42
- case 5:
43
- case "BITCOIN":
44
- return HashOp.BITCOIN;
45
- case 6:
46
- case "SHA512_256":
47
- return HashOp.SHA512_256;
48
- case -1:
49
- case "UNRECOGNIZED":
50
- default:
51
- return HashOp.UNRECOGNIZED;
52
- }
53
- }
54
-
55
- export function hashOpToJSON(object: HashOp): string {
56
- switch (object) {
57
- case HashOp.NO_HASH:
58
- return "NO_HASH";
59
- case HashOp.SHA256:
60
- return "SHA256";
61
- case HashOp.SHA512:
62
- return "SHA512";
63
- case HashOp.KECCAK:
64
- return "KECCAK";
65
- case HashOp.RIPEMD160:
66
- return "RIPEMD160";
67
- case HashOp.BITCOIN:
68
- return "BITCOIN";
69
- case HashOp.SHA512_256:
70
- return "SHA512_256";
71
- case HashOp.UNRECOGNIZED:
72
- default:
73
- return "UNRECOGNIZED";
74
- }
75
- }
76
-
77
- /**
78
- * LengthOp defines how to process the key and value of the LeafOp
79
- * to include length information. After encoding the length with the given
80
- * algorithm, the length will be prepended to the key and value bytes.
81
- * (Each one with it's own encoded length)
82
- */
83
- export enum LengthOp {
84
- /** NO_PREFIX - NO_PREFIX don't include any length info */
85
- NO_PREFIX = 0,
86
- /** VAR_PROTO - VAR_PROTO uses protobuf (and go-amino) varint encoding of the length */
87
- VAR_PROTO = 1,
88
- /** VAR_RLP - VAR_RLP uses rlp int encoding of the length */
89
- VAR_RLP = 2,
90
- /** FIXED32_BIG - FIXED32_BIG uses big-endian encoding of the length as a 32 bit integer */
91
- FIXED32_BIG = 3,
92
- /** FIXED32_LITTLE - FIXED32_LITTLE uses little-endian encoding of the length as a 32 bit integer */
93
- FIXED32_LITTLE = 4,
94
- /** FIXED64_BIG - FIXED64_BIG uses big-endian encoding of the length as a 64 bit integer */
95
- FIXED64_BIG = 5,
96
- /** FIXED64_LITTLE - FIXED64_LITTLE uses little-endian encoding of the length as a 64 bit integer */
97
- FIXED64_LITTLE = 6,
98
- /** REQUIRE_32_BYTES - REQUIRE_32_BYTES is like NONE, but will fail if the input is not exactly 32 bytes (sha256 output) */
99
- REQUIRE_32_BYTES = 7,
100
- /** REQUIRE_64_BYTES - REQUIRE_64_BYTES is like NONE, but will fail if the input is not exactly 64 bytes (sha512 output) */
101
- REQUIRE_64_BYTES = 8,
102
- UNRECOGNIZED = -1,
103
- }
104
-
105
- export function lengthOpFromJSON(object: any): LengthOp {
106
- switch (object) {
107
- case 0:
108
- case "NO_PREFIX":
109
- return LengthOp.NO_PREFIX;
110
- case 1:
111
- case "VAR_PROTO":
112
- return LengthOp.VAR_PROTO;
113
- case 2:
114
- case "VAR_RLP":
115
- return LengthOp.VAR_RLP;
116
- case 3:
117
- case "FIXED32_BIG":
118
- return LengthOp.FIXED32_BIG;
119
- case 4:
120
- case "FIXED32_LITTLE":
121
- return LengthOp.FIXED32_LITTLE;
122
- case 5:
123
- case "FIXED64_BIG":
124
- return LengthOp.FIXED64_BIG;
125
- case 6:
126
- case "FIXED64_LITTLE":
127
- return LengthOp.FIXED64_LITTLE;
128
- case 7:
129
- case "REQUIRE_32_BYTES":
130
- return LengthOp.REQUIRE_32_BYTES;
131
- case 8:
132
- case "REQUIRE_64_BYTES":
133
- return LengthOp.REQUIRE_64_BYTES;
134
- case -1:
135
- case "UNRECOGNIZED":
136
- default:
137
- return LengthOp.UNRECOGNIZED;
138
- }
139
- }
140
-
141
- export function lengthOpToJSON(object: LengthOp): string {
142
- switch (object) {
143
- case LengthOp.NO_PREFIX:
144
- return "NO_PREFIX";
145
- case LengthOp.VAR_PROTO:
146
- return "VAR_PROTO";
147
- case LengthOp.VAR_RLP:
148
- return "VAR_RLP";
149
- case LengthOp.FIXED32_BIG:
150
- return "FIXED32_BIG";
151
- case LengthOp.FIXED32_LITTLE:
152
- return "FIXED32_LITTLE";
153
- case LengthOp.FIXED64_BIG:
154
- return "FIXED64_BIG";
155
- case LengthOp.FIXED64_LITTLE:
156
- return "FIXED64_LITTLE";
157
- case LengthOp.REQUIRE_32_BYTES:
158
- return "REQUIRE_32_BYTES";
159
- case LengthOp.REQUIRE_64_BYTES:
160
- return "REQUIRE_64_BYTES";
161
- case LengthOp.UNRECOGNIZED:
162
- default:
163
- return "UNRECOGNIZED";
164
- }
165
- }
166
-
167
- /**
168
- * ExistenceProof takes a key and a value and a set of steps to perform on it.
169
- * The result of peforming all these steps will provide a "root hash", which can
170
- * be compared to the value in a header.
171
- *
172
- * Since it is computationally infeasible to produce a hash collission for any of the used
173
- * cryptographic hash functions, if someone can provide a series of operations to transform
174
- * a given key and value into a root hash that matches some trusted root, these key and values
175
- * must be in the referenced merkle tree.
176
- *
177
- * The only possible issue is maliablity in LeafOp, such as providing extra prefix data,
178
- * which should be controlled by a spec. Eg. with lengthOp as NONE,
179
- * prefix = FOO, key = BAR, value = CHOICE
180
- * and
181
- * prefix = F, key = OOBAR, value = CHOICE
182
- * would produce the same value.
183
- *
184
- * With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field
185
- * in the ProofSpec is valuable to prevent this mutability. And why all trees should
186
- * length-prefix the data before hashing it.
187
- */
188
- export interface ExistenceProof {
189
- key: Uint8Array;
190
- value: Uint8Array;
191
- leaf: LeafOp | undefined;
192
- path: InnerOp[];
193
- }
194
-
195
- /**
196
- * NonExistenceProof takes a proof of two neighbors, one left of the desired key,
197
- * one right of the desired key. If both proofs are valid AND they are neighbors,
198
- * then there is no valid proof for the given key.
199
- */
200
- export interface NonExistenceProof {
201
- /** TODO: remove this as unnecessary??? we prove a range */
202
- key: Uint8Array;
203
- left: ExistenceProof | undefined;
204
- right: ExistenceProof | undefined;
205
- }
206
-
207
- /** CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages */
208
- export interface CommitmentProof {
209
- exist?: ExistenceProof | undefined;
210
- nonexist?: NonExistenceProof | undefined;
211
- batch?: BatchProof | undefined;
212
- compressed?: CompressedBatchProof | undefined;
213
- }
214
-
215
- /**
216
- * LeafOp represents the raw key-value data we wish to prove, and
217
- * must be flexible to represent the internal transformation from
218
- * the original key-value pairs into the basis hash, for many existing
219
- * merkle trees.
220
- *
221
- * key and value are passed in. So that the signature of this operation is:
222
- * leafOp(key, value) -> output
223
- *
224
- * To process this, first prehash the keys and values if needed (ANY means no hash in this case):
225
- * hkey = prehashKey(key)
226
- * hvalue = prehashValue(value)
227
- *
228
- * Then combine the bytes, and hash it
229
- * output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue)
230
- */
231
- export interface LeafOp {
232
- hash: HashOp;
233
- prehashKey: HashOp;
234
- prehashValue: HashOp;
235
- length: LengthOp;
236
- /**
237
- * prefix is a fixed bytes that may optionally be included at the beginning to differentiate
238
- * a leaf node from an inner node.
239
- */
240
- prefix: Uint8Array;
241
- }
242
-
243
- /**
244
- * InnerOp represents a merkle-proof step that is not a leaf.
245
- * It represents concatenating two children and hashing them to provide the next result.
246
- *
247
- * The result of the previous step is passed in, so the signature of this op is:
248
- * innerOp(child) -> output
249
- *
250
- * The result of applying InnerOp should be:
251
- * output = op.hash(op.prefix || child || op.suffix)
252
- *
253
- * where the || operator is concatenation of binary data,
254
- * and child is the result of hashing all the tree below this step.
255
- *
256
- * Any special data, like prepending child with the length, or prepending the entire operation with
257
- * some value to differentiate from leaf nodes, should be included in prefix and suffix.
258
- * If either of prefix or suffix is empty, we just treat it as an empty string
259
- */
260
- export interface InnerOp {
261
- hash: HashOp;
262
- prefix: Uint8Array;
263
- suffix: Uint8Array;
264
- }
265
-
266
- /**
267
- * ProofSpec defines what the expected parameters are for a given proof type.
268
- * This can be stored in the client and used to validate any incoming proofs.
269
- *
270
- * verify(ProofSpec, Proof) -> Proof | Error
271
- *
272
- * As demonstrated in tests, if we don't fix the algorithm used to calculate the
273
- * LeafHash for a given tree, there are many possible key-value pairs that can
274
- * generate a given hash (by interpretting the preimage differently).
275
- * We need this for proper security, requires client knows a priori what
276
- * tree format server uses. But not in code, rather a configuration object.
277
- */
278
- export interface ProofSpec {
279
- /**
280
- * any field in the ExistenceProof must be the same as in this spec.
281
- * except Prefix, which is just the first bytes of prefix (spec can be longer)
282
- */
283
- leafSpec: LeafOp | undefined;
284
- innerSpec:
285
- | InnerSpec
286
- | undefined;
287
- /** max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries) */
288
- maxDepth: number;
289
- /** min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries) */
290
- minDepth: number;
291
- }
292
-
293
- /**
294
- * InnerSpec contains all store-specific structure info to determine if two proofs from a
295
- * given store are neighbors.
296
- *
297
- * This enables:
298
- *
299
- * isLeftMost(spec: InnerSpec, op: InnerOp)
300
- * isRightMost(spec: InnerSpec, op: InnerOp)
301
- * isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp)
302
- */
303
- export interface InnerSpec {
304
- /**
305
- * Child order is the ordering of the children node, must count from 0
306
- * iavl tree is [0, 1] (left then right)
307
- * merk is [0, 2, 1] (left, right, here)
308
- */
309
- childOrder: number[];
310
- childSize: number;
311
- minPrefixLength: number;
312
- maxPrefixLength: number;
313
- /** empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0) */
314
- emptyChild: Uint8Array;
315
- /** hash is the algorithm that must be used for each InnerOp */
316
- hash: HashOp;
317
- }
318
-
319
- /** BatchProof is a group of multiple proof types than can be compressed */
320
- export interface BatchProof {
321
- entries: BatchEntry[];
322
- }
323
-
324
- /** Use BatchEntry not CommitmentProof, to avoid recursion */
325
- export interface BatchEntry {
326
- exist?: ExistenceProof | undefined;
327
- nonexist?: NonExistenceProof | undefined;
328
- }
329
-
330
- export interface CompressedBatchProof {
331
- entries: CompressedBatchEntry[];
332
- lookupInners: InnerOp[];
333
- }
334
-
335
- /** Use BatchEntry not CommitmentProof, to avoid recursion */
336
- export interface CompressedBatchEntry {
337
- exist?: CompressedExistenceProof | undefined;
338
- nonexist?: CompressedNonExistenceProof | undefined;
339
- }
340
-
341
- export interface CompressedExistenceProof {
342
- key: Uint8Array;
343
- value: Uint8Array;
344
- leaf:
345
- | LeafOp
346
- | undefined;
347
- /** these are indexes into the lookup_inners table in CompressedBatchProof */
348
- path: number[];
349
- }
350
-
351
- export interface CompressedNonExistenceProof {
352
- /** TODO: remove this as unnecessary??? we prove a range */
353
- key: Uint8Array;
354
- left: CompressedExistenceProof | undefined;
355
- right: CompressedExistenceProof | undefined;
356
- }
357
-
358
- function createBaseExistenceProof(): ExistenceProof {
359
- return { key: new Uint8Array(0), value: new Uint8Array(0), leaf: undefined, path: [] };
360
- }
361
-
362
- export const ExistenceProof: MessageFns<ExistenceProof> = {
363
- encode(message: ExistenceProof, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
364
- if (message.key.length !== 0) {
365
- writer.uint32(10).bytes(message.key);
366
- }
367
- if (message.value.length !== 0) {
368
- writer.uint32(18).bytes(message.value);
369
- }
370
- if (message.leaf !== undefined) {
371
- LeafOp.encode(message.leaf, writer.uint32(26).fork()).join();
372
- }
373
- for (const v of message.path) {
374
- InnerOp.encode(v!, writer.uint32(34).fork()).join();
375
- }
376
- return writer;
377
- },
378
-
379
- decode(input: BinaryReader | Uint8Array, length?: number): ExistenceProof {
380
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
381
- let end = length === undefined ? reader.len : reader.pos + length;
382
- const message = createBaseExistenceProof();
383
- while (reader.pos < end) {
384
- const tag = reader.uint32();
385
- switch (tag >>> 3) {
386
- case 1: {
387
- if (tag !== 10) {
388
- break;
389
- }
390
-
391
- message.key = reader.bytes();
392
- continue;
393
- }
394
- case 2: {
395
- if (tag !== 18) {
396
- break;
397
- }
398
-
399
- message.value = reader.bytes();
400
- continue;
401
- }
402
- case 3: {
403
- if (tag !== 26) {
404
- break;
405
- }
406
-
407
- message.leaf = LeafOp.decode(reader, reader.uint32());
408
- continue;
409
- }
410
- case 4: {
411
- if (tag !== 34) {
412
- break;
413
- }
414
-
415
- message.path.push(InnerOp.decode(reader, reader.uint32()));
416
- continue;
417
- }
418
- }
419
- if ((tag & 7) === 4 || tag === 0) {
420
- break;
421
- }
422
- reader.skip(tag & 7);
423
- }
424
- return message;
425
- },
426
-
427
- fromJSON(object: any): ExistenceProof {
428
- return {
429
- key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(0),
430
- value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(0),
431
- leaf: isSet(object.leaf) ? LeafOp.fromJSON(object.leaf) : undefined,
432
- path: globalThis.Array.isArray(object?.path) ? object.path.map((e: any) => InnerOp.fromJSON(e)) : [],
433
- };
434
- },
435
-
436
- toJSON(message: ExistenceProof): unknown {
437
- const obj: any = {};
438
- if (message.key.length !== 0) {
439
- obj.key = base64FromBytes(message.key);
440
- }
441
- if (message.value.length !== 0) {
442
- obj.value = base64FromBytes(message.value);
443
- }
444
- if (message.leaf !== undefined) {
445
- obj.leaf = LeafOp.toJSON(message.leaf);
446
- }
447
- if (message.path?.length) {
448
- obj.path = message.path.map((e) => InnerOp.toJSON(e));
449
- }
450
- return obj;
451
- },
452
-
453
- create<I extends Exact<DeepPartial<ExistenceProof>, I>>(base?: I): ExistenceProof {
454
- return ExistenceProof.fromPartial(base ?? ({} as any));
455
- },
456
- fromPartial<I extends Exact<DeepPartial<ExistenceProof>, I>>(object: I): ExistenceProof {
457
- const message = createBaseExistenceProof();
458
- message.key = object.key ?? new Uint8Array(0);
459
- message.value = object.value ?? new Uint8Array(0);
460
- message.leaf = (object.leaf !== undefined && object.leaf !== null) ? LeafOp.fromPartial(object.leaf) : undefined;
461
- message.path = object.path?.map((e) => InnerOp.fromPartial(e)) || [];
462
- return message;
463
- },
464
- };
465
-
466
- function createBaseNonExistenceProof(): NonExistenceProof {
467
- return { key: new Uint8Array(0), left: undefined, right: undefined };
468
- }
469
-
470
- export const NonExistenceProof: MessageFns<NonExistenceProof> = {
471
- encode(message: NonExistenceProof, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
472
- if (message.key.length !== 0) {
473
- writer.uint32(10).bytes(message.key);
474
- }
475
- if (message.left !== undefined) {
476
- ExistenceProof.encode(message.left, writer.uint32(18).fork()).join();
477
- }
478
- if (message.right !== undefined) {
479
- ExistenceProof.encode(message.right, writer.uint32(26).fork()).join();
480
- }
481
- return writer;
482
- },
483
-
484
- decode(input: BinaryReader | Uint8Array, length?: number): NonExistenceProof {
485
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
486
- let end = length === undefined ? reader.len : reader.pos + length;
487
- const message = createBaseNonExistenceProof();
488
- while (reader.pos < end) {
489
- const tag = reader.uint32();
490
- switch (tag >>> 3) {
491
- case 1: {
492
- if (tag !== 10) {
493
- break;
494
- }
495
-
496
- message.key = reader.bytes();
497
- continue;
498
- }
499
- case 2: {
500
- if (tag !== 18) {
501
- break;
502
- }
503
-
504
- message.left = ExistenceProof.decode(reader, reader.uint32());
505
- continue;
506
- }
507
- case 3: {
508
- if (tag !== 26) {
509
- break;
510
- }
511
-
512
- message.right = ExistenceProof.decode(reader, reader.uint32());
513
- continue;
514
- }
515
- }
516
- if ((tag & 7) === 4 || tag === 0) {
517
- break;
518
- }
519
- reader.skip(tag & 7);
520
- }
521
- return message;
522
- },
523
-
524
- fromJSON(object: any): NonExistenceProof {
525
- return {
526
- key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(0),
527
- left: isSet(object.left) ? ExistenceProof.fromJSON(object.left) : undefined,
528
- right: isSet(object.right) ? ExistenceProof.fromJSON(object.right) : undefined,
529
- };
530
- },
531
-
532
- toJSON(message: NonExistenceProof): unknown {
533
- const obj: any = {};
534
- if (message.key.length !== 0) {
535
- obj.key = base64FromBytes(message.key);
536
- }
537
- if (message.left !== undefined) {
538
- obj.left = ExistenceProof.toJSON(message.left);
539
- }
540
- if (message.right !== undefined) {
541
- obj.right = ExistenceProof.toJSON(message.right);
542
- }
543
- return obj;
544
- },
545
-
546
- create<I extends Exact<DeepPartial<NonExistenceProof>, I>>(base?: I): NonExistenceProof {
547
- return NonExistenceProof.fromPartial(base ?? ({} as any));
548
- },
549
- fromPartial<I extends Exact<DeepPartial<NonExistenceProof>, I>>(object: I): NonExistenceProof {
550
- const message = createBaseNonExistenceProof();
551
- message.key = object.key ?? new Uint8Array(0);
552
- message.left = (object.left !== undefined && object.left !== null)
553
- ? ExistenceProof.fromPartial(object.left)
554
- : undefined;
555
- message.right = (object.right !== undefined && object.right !== null)
556
- ? ExistenceProof.fromPartial(object.right)
557
- : undefined;
558
- return message;
559
- },
560
- };
561
-
562
- function createBaseCommitmentProof(): CommitmentProof {
563
- return { exist: undefined, nonexist: undefined, batch: undefined, compressed: undefined };
564
- }
565
-
566
- export const CommitmentProof: MessageFns<CommitmentProof> = {
567
- encode(message: CommitmentProof, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
568
- if (message.exist !== undefined) {
569
- ExistenceProof.encode(message.exist, writer.uint32(10).fork()).join();
570
- }
571
- if (message.nonexist !== undefined) {
572
- NonExistenceProof.encode(message.nonexist, writer.uint32(18).fork()).join();
573
- }
574
- if (message.batch !== undefined) {
575
- BatchProof.encode(message.batch, writer.uint32(26).fork()).join();
576
- }
577
- if (message.compressed !== undefined) {
578
- CompressedBatchProof.encode(message.compressed, writer.uint32(34).fork()).join();
579
- }
580
- return writer;
581
- },
582
-
583
- decode(input: BinaryReader | Uint8Array, length?: number): CommitmentProof {
584
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
585
- let end = length === undefined ? reader.len : reader.pos + length;
586
- const message = createBaseCommitmentProof();
587
- while (reader.pos < end) {
588
- const tag = reader.uint32();
589
- switch (tag >>> 3) {
590
- case 1: {
591
- if (tag !== 10) {
592
- break;
593
- }
594
-
595
- message.exist = ExistenceProof.decode(reader, reader.uint32());
596
- continue;
597
- }
598
- case 2: {
599
- if (tag !== 18) {
600
- break;
601
- }
602
-
603
- message.nonexist = NonExistenceProof.decode(reader, reader.uint32());
604
- continue;
605
- }
606
- case 3: {
607
- if (tag !== 26) {
608
- break;
609
- }
610
-
611
- message.batch = BatchProof.decode(reader, reader.uint32());
612
- continue;
613
- }
614
- case 4: {
615
- if (tag !== 34) {
616
- break;
617
- }
618
-
619
- message.compressed = CompressedBatchProof.decode(reader, reader.uint32());
620
- continue;
621
- }
622
- }
623
- if ((tag & 7) === 4 || tag === 0) {
624
- break;
625
- }
626
- reader.skip(tag & 7);
627
- }
628
- return message;
629
- },
630
-
631
- fromJSON(object: any): CommitmentProof {
632
- return {
633
- exist: isSet(object.exist) ? ExistenceProof.fromJSON(object.exist) : undefined,
634
- nonexist: isSet(object.nonexist) ? NonExistenceProof.fromJSON(object.nonexist) : undefined,
635
- batch: isSet(object.batch) ? BatchProof.fromJSON(object.batch) : undefined,
636
- compressed: isSet(object.compressed) ? CompressedBatchProof.fromJSON(object.compressed) : undefined,
637
- };
638
- },
639
-
640
- toJSON(message: CommitmentProof): unknown {
641
- const obj: any = {};
642
- if (message.exist !== undefined) {
643
- obj.exist = ExistenceProof.toJSON(message.exist);
644
- }
645
- if (message.nonexist !== undefined) {
646
- obj.nonexist = NonExistenceProof.toJSON(message.nonexist);
647
- }
648
- if (message.batch !== undefined) {
649
- obj.batch = BatchProof.toJSON(message.batch);
650
- }
651
- if (message.compressed !== undefined) {
652
- obj.compressed = CompressedBatchProof.toJSON(message.compressed);
653
- }
654
- return obj;
655
- },
656
-
657
- create<I extends Exact<DeepPartial<CommitmentProof>, I>>(base?: I): CommitmentProof {
658
- return CommitmentProof.fromPartial(base ?? ({} as any));
659
- },
660
- fromPartial<I extends Exact<DeepPartial<CommitmentProof>, I>>(object: I): CommitmentProof {
661
- const message = createBaseCommitmentProof();
662
- message.exist = (object.exist !== undefined && object.exist !== null)
663
- ? ExistenceProof.fromPartial(object.exist)
664
- : undefined;
665
- message.nonexist = (object.nonexist !== undefined && object.nonexist !== null)
666
- ? NonExistenceProof.fromPartial(object.nonexist)
667
- : undefined;
668
- message.batch = (object.batch !== undefined && object.batch !== null)
669
- ? BatchProof.fromPartial(object.batch)
670
- : undefined;
671
- message.compressed = (object.compressed !== undefined && object.compressed !== null)
672
- ? CompressedBatchProof.fromPartial(object.compressed)
673
- : undefined;
674
- return message;
675
- },
676
- };
677
-
678
- function createBaseLeafOp(): LeafOp {
679
- return { hash: 0, prehashKey: 0, prehashValue: 0, length: 0, prefix: new Uint8Array(0) };
680
- }
681
-
682
- export const LeafOp: MessageFns<LeafOp> = {
683
- encode(message: LeafOp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
684
- if (message.hash !== 0) {
685
- writer.uint32(8).int32(message.hash);
686
- }
687
- if (message.prehashKey !== 0) {
688
- writer.uint32(16).int32(message.prehashKey);
689
- }
690
- if (message.prehashValue !== 0) {
691
- writer.uint32(24).int32(message.prehashValue);
692
- }
693
- if (message.length !== 0) {
694
- writer.uint32(32).int32(message.length);
695
- }
696
- if (message.prefix.length !== 0) {
697
- writer.uint32(42).bytes(message.prefix);
698
- }
699
- return writer;
700
- },
701
-
702
- decode(input: BinaryReader | Uint8Array, length?: number): LeafOp {
703
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
704
- let end = length === undefined ? reader.len : reader.pos + length;
705
- const message = createBaseLeafOp();
706
- while (reader.pos < end) {
707
- const tag = reader.uint32();
708
- switch (tag >>> 3) {
709
- case 1: {
710
- if (tag !== 8) {
711
- break;
712
- }
713
-
714
- message.hash = reader.int32() as any;
715
- continue;
716
- }
717
- case 2: {
718
- if (tag !== 16) {
719
- break;
720
- }
721
-
722
- message.prehashKey = reader.int32() as any;
723
- continue;
724
- }
725
- case 3: {
726
- if (tag !== 24) {
727
- break;
728
- }
729
-
730
- message.prehashValue = reader.int32() as any;
731
- continue;
732
- }
733
- case 4: {
734
- if (tag !== 32) {
735
- break;
736
- }
737
-
738
- message.length = reader.int32() as any;
739
- continue;
740
- }
741
- case 5: {
742
- if (tag !== 42) {
743
- break;
744
- }
745
-
746
- message.prefix = reader.bytes();
747
- continue;
748
- }
749
- }
750
- if ((tag & 7) === 4 || tag === 0) {
751
- break;
752
- }
753
- reader.skip(tag & 7);
754
- }
755
- return message;
756
- },
757
-
758
- fromJSON(object: any): LeafOp {
759
- return {
760
- hash: isSet(object.hash) ? hashOpFromJSON(object.hash) : 0,
761
- prehashKey: isSet(object.prehashKey) ? hashOpFromJSON(object.prehashKey) : 0,
762
- prehashValue: isSet(object.prehashValue) ? hashOpFromJSON(object.prehashValue) : 0,
763
- length: isSet(object.length) ? lengthOpFromJSON(object.length) : 0,
764
- prefix: isSet(object.prefix) ? bytesFromBase64(object.prefix) : new Uint8Array(0),
765
- };
766
- },
767
-
768
- toJSON(message: LeafOp): unknown {
769
- const obj: any = {};
770
- if (message.hash !== 0) {
771
- obj.hash = hashOpToJSON(message.hash);
772
- }
773
- if (message.prehashKey !== 0) {
774
- obj.prehashKey = hashOpToJSON(message.prehashKey);
775
- }
776
- if (message.prehashValue !== 0) {
777
- obj.prehashValue = hashOpToJSON(message.prehashValue);
778
- }
779
- if (message.length !== 0) {
780
- obj.length = lengthOpToJSON(message.length);
781
- }
782
- if (message.prefix.length !== 0) {
783
- obj.prefix = base64FromBytes(message.prefix);
784
- }
785
- return obj;
786
- },
787
-
788
- create<I extends Exact<DeepPartial<LeafOp>, I>>(base?: I): LeafOp {
789
- return LeafOp.fromPartial(base ?? ({} as any));
790
- },
791
- fromPartial<I extends Exact<DeepPartial<LeafOp>, I>>(object: I): LeafOp {
792
- const message = createBaseLeafOp();
793
- message.hash = object.hash ?? 0;
794
- message.prehashKey = object.prehashKey ?? 0;
795
- message.prehashValue = object.prehashValue ?? 0;
796
- message.length = object.length ?? 0;
797
- message.prefix = object.prefix ?? new Uint8Array(0);
798
- return message;
799
- },
800
- };
801
-
802
- function createBaseInnerOp(): InnerOp {
803
- return { hash: 0, prefix: new Uint8Array(0), suffix: new Uint8Array(0) };
804
- }
805
-
806
- export const InnerOp: MessageFns<InnerOp> = {
807
- encode(message: InnerOp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
808
- if (message.hash !== 0) {
809
- writer.uint32(8).int32(message.hash);
810
- }
811
- if (message.prefix.length !== 0) {
812
- writer.uint32(18).bytes(message.prefix);
813
- }
814
- if (message.suffix.length !== 0) {
815
- writer.uint32(26).bytes(message.suffix);
816
- }
817
- return writer;
818
- },
819
-
820
- decode(input: BinaryReader | Uint8Array, length?: number): InnerOp {
821
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
822
- let end = length === undefined ? reader.len : reader.pos + length;
823
- const message = createBaseInnerOp();
824
- while (reader.pos < end) {
825
- const tag = reader.uint32();
826
- switch (tag >>> 3) {
827
- case 1: {
828
- if (tag !== 8) {
829
- break;
830
- }
831
-
832
- message.hash = reader.int32() as any;
833
- continue;
834
- }
835
- case 2: {
836
- if (tag !== 18) {
837
- break;
838
- }
839
-
840
- message.prefix = reader.bytes();
841
- continue;
842
- }
843
- case 3: {
844
- if (tag !== 26) {
845
- break;
846
- }
847
-
848
- message.suffix = reader.bytes();
849
- continue;
850
- }
851
- }
852
- if ((tag & 7) === 4 || tag === 0) {
853
- break;
854
- }
855
- reader.skip(tag & 7);
856
- }
857
- return message;
858
- },
859
-
860
- fromJSON(object: any): InnerOp {
861
- return {
862
- hash: isSet(object.hash) ? hashOpFromJSON(object.hash) : 0,
863
- prefix: isSet(object.prefix) ? bytesFromBase64(object.prefix) : new Uint8Array(0),
864
- suffix: isSet(object.suffix) ? bytesFromBase64(object.suffix) : new Uint8Array(0),
865
- };
866
- },
867
-
868
- toJSON(message: InnerOp): unknown {
869
- const obj: any = {};
870
- if (message.hash !== 0) {
871
- obj.hash = hashOpToJSON(message.hash);
872
- }
873
- if (message.prefix.length !== 0) {
874
- obj.prefix = base64FromBytes(message.prefix);
875
- }
876
- if (message.suffix.length !== 0) {
877
- obj.suffix = base64FromBytes(message.suffix);
878
- }
879
- return obj;
880
- },
881
-
882
- create<I extends Exact<DeepPartial<InnerOp>, I>>(base?: I): InnerOp {
883
- return InnerOp.fromPartial(base ?? ({} as any));
884
- },
885
- fromPartial<I extends Exact<DeepPartial<InnerOp>, I>>(object: I): InnerOp {
886
- const message = createBaseInnerOp();
887
- message.hash = object.hash ?? 0;
888
- message.prefix = object.prefix ?? new Uint8Array(0);
889
- message.suffix = object.suffix ?? new Uint8Array(0);
890
- return message;
891
- },
892
- };
893
-
894
- function createBaseProofSpec(): ProofSpec {
895
- return { leafSpec: undefined, innerSpec: undefined, maxDepth: 0, minDepth: 0 };
896
- }
897
-
898
- export const ProofSpec: MessageFns<ProofSpec> = {
899
- encode(message: ProofSpec, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
900
- if (message.leafSpec !== undefined) {
901
- LeafOp.encode(message.leafSpec, writer.uint32(10).fork()).join();
902
- }
903
- if (message.innerSpec !== undefined) {
904
- InnerSpec.encode(message.innerSpec, writer.uint32(18).fork()).join();
905
- }
906
- if (message.maxDepth !== 0) {
907
- writer.uint32(24).int32(message.maxDepth);
908
- }
909
- if (message.minDepth !== 0) {
910
- writer.uint32(32).int32(message.minDepth);
911
- }
912
- return writer;
913
- },
914
-
915
- decode(input: BinaryReader | Uint8Array, length?: number): ProofSpec {
916
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
917
- let end = length === undefined ? reader.len : reader.pos + length;
918
- const message = createBaseProofSpec();
919
- while (reader.pos < end) {
920
- const tag = reader.uint32();
921
- switch (tag >>> 3) {
922
- case 1: {
923
- if (tag !== 10) {
924
- break;
925
- }
926
-
927
- message.leafSpec = LeafOp.decode(reader, reader.uint32());
928
- continue;
929
- }
930
- case 2: {
931
- if (tag !== 18) {
932
- break;
933
- }
934
-
935
- message.innerSpec = InnerSpec.decode(reader, reader.uint32());
936
- continue;
937
- }
938
- case 3: {
939
- if (tag !== 24) {
940
- break;
941
- }
942
-
943
- message.maxDepth = reader.int32();
944
- continue;
945
- }
946
- case 4: {
947
- if (tag !== 32) {
948
- break;
949
- }
950
-
951
- message.minDepth = reader.int32();
952
- continue;
953
- }
954
- }
955
- if ((tag & 7) === 4 || tag === 0) {
956
- break;
957
- }
958
- reader.skip(tag & 7);
959
- }
960
- return message;
961
- },
962
-
963
- fromJSON(object: any): ProofSpec {
964
- return {
965
- leafSpec: isSet(object.leafSpec) ? LeafOp.fromJSON(object.leafSpec) : undefined,
966
- innerSpec: isSet(object.innerSpec) ? InnerSpec.fromJSON(object.innerSpec) : undefined,
967
- maxDepth: isSet(object.maxDepth) ? globalThis.Number(object.maxDepth) : 0,
968
- minDepth: isSet(object.minDepth) ? globalThis.Number(object.minDepth) : 0,
969
- };
970
- },
971
-
972
- toJSON(message: ProofSpec): unknown {
973
- const obj: any = {};
974
- if (message.leafSpec !== undefined) {
975
- obj.leafSpec = LeafOp.toJSON(message.leafSpec);
976
- }
977
- if (message.innerSpec !== undefined) {
978
- obj.innerSpec = InnerSpec.toJSON(message.innerSpec);
979
- }
980
- if (message.maxDepth !== 0) {
981
- obj.maxDepth = Math.round(message.maxDepth);
982
- }
983
- if (message.minDepth !== 0) {
984
- obj.minDepth = Math.round(message.minDepth);
985
- }
986
- return obj;
987
- },
988
-
989
- create<I extends Exact<DeepPartial<ProofSpec>, I>>(base?: I): ProofSpec {
990
- return ProofSpec.fromPartial(base ?? ({} as any));
991
- },
992
- fromPartial<I extends Exact<DeepPartial<ProofSpec>, I>>(object: I): ProofSpec {
993
- const message = createBaseProofSpec();
994
- message.leafSpec = (object.leafSpec !== undefined && object.leafSpec !== null)
995
- ? LeafOp.fromPartial(object.leafSpec)
996
- : undefined;
997
- message.innerSpec = (object.innerSpec !== undefined && object.innerSpec !== null)
998
- ? InnerSpec.fromPartial(object.innerSpec)
999
- : undefined;
1000
- message.maxDepth = object.maxDepth ?? 0;
1001
- message.minDepth = object.minDepth ?? 0;
1002
- return message;
1003
- },
1004
- };
1005
-
1006
- function createBaseInnerSpec(): InnerSpec {
1007
- return {
1008
- childOrder: [],
1009
- childSize: 0,
1010
- minPrefixLength: 0,
1011
- maxPrefixLength: 0,
1012
- emptyChild: new Uint8Array(0),
1013
- hash: 0,
1014
- };
1015
- }
1016
-
1017
- export const InnerSpec: MessageFns<InnerSpec> = {
1018
- encode(message: InnerSpec, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1019
- writer.uint32(10).fork();
1020
- for (const v of message.childOrder) {
1021
- writer.int32(v);
1022
- }
1023
- writer.join();
1024
- if (message.childSize !== 0) {
1025
- writer.uint32(16).int32(message.childSize);
1026
- }
1027
- if (message.minPrefixLength !== 0) {
1028
- writer.uint32(24).int32(message.minPrefixLength);
1029
- }
1030
- if (message.maxPrefixLength !== 0) {
1031
- writer.uint32(32).int32(message.maxPrefixLength);
1032
- }
1033
- if (message.emptyChild.length !== 0) {
1034
- writer.uint32(42).bytes(message.emptyChild);
1035
- }
1036
- if (message.hash !== 0) {
1037
- writer.uint32(48).int32(message.hash);
1038
- }
1039
- return writer;
1040
- },
1041
-
1042
- decode(input: BinaryReader | Uint8Array, length?: number): InnerSpec {
1043
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1044
- let end = length === undefined ? reader.len : reader.pos + length;
1045
- const message = createBaseInnerSpec();
1046
- while (reader.pos < end) {
1047
- const tag = reader.uint32();
1048
- switch (tag >>> 3) {
1049
- case 1: {
1050
- if (tag === 8) {
1051
- message.childOrder.push(reader.int32());
1052
-
1053
- continue;
1054
- }
1055
-
1056
- if (tag === 10) {
1057
- const end2 = reader.uint32() + reader.pos;
1058
- while (reader.pos < end2) {
1059
- message.childOrder.push(reader.int32());
1060
- }
1061
-
1062
- continue;
1063
- }
1064
-
1065
- break;
1066
- }
1067
- case 2: {
1068
- if (tag !== 16) {
1069
- break;
1070
- }
1071
-
1072
- message.childSize = reader.int32();
1073
- continue;
1074
- }
1075
- case 3: {
1076
- if (tag !== 24) {
1077
- break;
1078
- }
1079
-
1080
- message.minPrefixLength = reader.int32();
1081
- continue;
1082
- }
1083
- case 4: {
1084
- if (tag !== 32) {
1085
- break;
1086
- }
1087
-
1088
- message.maxPrefixLength = reader.int32();
1089
- continue;
1090
- }
1091
- case 5: {
1092
- if (tag !== 42) {
1093
- break;
1094
- }
1095
-
1096
- message.emptyChild = reader.bytes();
1097
- continue;
1098
- }
1099
- case 6: {
1100
- if (tag !== 48) {
1101
- break;
1102
- }
1103
-
1104
- message.hash = reader.int32() as any;
1105
- continue;
1106
- }
1107
- }
1108
- if ((tag & 7) === 4 || tag === 0) {
1109
- break;
1110
- }
1111
- reader.skip(tag & 7);
1112
- }
1113
- return message;
1114
- },
1115
-
1116
- fromJSON(object: any): InnerSpec {
1117
- return {
1118
- childOrder: globalThis.Array.isArray(object?.childOrder)
1119
- ? object.childOrder.map((e: any) => globalThis.Number(e))
1120
- : [],
1121
- childSize: isSet(object.childSize) ? globalThis.Number(object.childSize) : 0,
1122
- minPrefixLength: isSet(object.minPrefixLength) ? globalThis.Number(object.minPrefixLength) : 0,
1123
- maxPrefixLength: isSet(object.maxPrefixLength) ? globalThis.Number(object.maxPrefixLength) : 0,
1124
- emptyChild: isSet(object.emptyChild) ? bytesFromBase64(object.emptyChild) : new Uint8Array(0),
1125
- hash: isSet(object.hash) ? hashOpFromJSON(object.hash) : 0,
1126
- };
1127
- },
1128
-
1129
- toJSON(message: InnerSpec): unknown {
1130
- const obj: any = {};
1131
- if (message.childOrder?.length) {
1132
- obj.childOrder = message.childOrder.map((e) => Math.round(e));
1133
- }
1134
- if (message.childSize !== 0) {
1135
- obj.childSize = Math.round(message.childSize);
1136
- }
1137
- if (message.minPrefixLength !== 0) {
1138
- obj.minPrefixLength = Math.round(message.minPrefixLength);
1139
- }
1140
- if (message.maxPrefixLength !== 0) {
1141
- obj.maxPrefixLength = Math.round(message.maxPrefixLength);
1142
- }
1143
- if (message.emptyChild.length !== 0) {
1144
- obj.emptyChild = base64FromBytes(message.emptyChild);
1145
- }
1146
- if (message.hash !== 0) {
1147
- obj.hash = hashOpToJSON(message.hash);
1148
- }
1149
- return obj;
1150
- },
1151
-
1152
- create<I extends Exact<DeepPartial<InnerSpec>, I>>(base?: I): InnerSpec {
1153
- return InnerSpec.fromPartial(base ?? ({} as any));
1154
- },
1155
- fromPartial<I extends Exact<DeepPartial<InnerSpec>, I>>(object: I): InnerSpec {
1156
- const message = createBaseInnerSpec();
1157
- message.childOrder = object.childOrder?.map((e) => e) || [];
1158
- message.childSize = object.childSize ?? 0;
1159
- message.minPrefixLength = object.minPrefixLength ?? 0;
1160
- message.maxPrefixLength = object.maxPrefixLength ?? 0;
1161
- message.emptyChild = object.emptyChild ?? new Uint8Array(0);
1162
- message.hash = object.hash ?? 0;
1163
- return message;
1164
- },
1165
- };
1166
-
1167
- function createBaseBatchProof(): BatchProof {
1168
- return { entries: [] };
1169
- }
1170
-
1171
- export const BatchProof: MessageFns<BatchProof> = {
1172
- encode(message: BatchProof, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1173
- for (const v of message.entries) {
1174
- BatchEntry.encode(v!, writer.uint32(10).fork()).join();
1175
- }
1176
- return writer;
1177
- },
1178
-
1179
- decode(input: BinaryReader | Uint8Array, length?: number): BatchProof {
1180
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1181
- let end = length === undefined ? reader.len : reader.pos + length;
1182
- const message = createBaseBatchProof();
1183
- while (reader.pos < end) {
1184
- const tag = reader.uint32();
1185
- switch (tag >>> 3) {
1186
- case 1: {
1187
- if (tag !== 10) {
1188
- break;
1189
- }
1190
-
1191
- message.entries.push(BatchEntry.decode(reader, reader.uint32()));
1192
- continue;
1193
- }
1194
- }
1195
- if ((tag & 7) === 4 || tag === 0) {
1196
- break;
1197
- }
1198
- reader.skip(tag & 7);
1199
- }
1200
- return message;
1201
- },
1202
-
1203
- fromJSON(object: any): BatchProof {
1204
- return {
1205
- entries: globalThis.Array.isArray(object?.entries) ? object.entries.map((e: any) => BatchEntry.fromJSON(e)) : [],
1206
- };
1207
- },
1208
-
1209
- toJSON(message: BatchProof): unknown {
1210
- const obj: any = {};
1211
- if (message.entries?.length) {
1212
- obj.entries = message.entries.map((e) => BatchEntry.toJSON(e));
1213
- }
1214
- return obj;
1215
- },
1216
-
1217
- create<I extends Exact<DeepPartial<BatchProof>, I>>(base?: I): BatchProof {
1218
- return BatchProof.fromPartial(base ?? ({} as any));
1219
- },
1220
- fromPartial<I extends Exact<DeepPartial<BatchProof>, I>>(object: I): BatchProof {
1221
- const message = createBaseBatchProof();
1222
- message.entries = object.entries?.map((e) => BatchEntry.fromPartial(e)) || [];
1223
- return message;
1224
- },
1225
- };
1226
-
1227
- function createBaseBatchEntry(): BatchEntry {
1228
- return { exist: undefined, nonexist: undefined };
1229
- }
1230
-
1231
- export const BatchEntry: MessageFns<BatchEntry> = {
1232
- encode(message: BatchEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1233
- if (message.exist !== undefined) {
1234
- ExistenceProof.encode(message.exist, writer.uint32(10).fork()).join();
1235
- }
1236
- if (message.nonexist !== undefined) {
1237
- NonExistenceProof.encode(message.nonexist, writer.uint32(18).fork()).join();
1238
- }
1239
- return writer;
1240
- },
1241
-
1242
- decode(input: BinaryReader | Uint8Array, length?: number): BatchEntry {
1243
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1244
- let end = length === undefined ? reader.len : reader.pos + length;
1245
- const message = createBaseBatchEntry();
1246
- while (reader.pos < end) {
1247
- const tag = reader.uint32();
1248
- switch (tag >>> 3) {
1249
- case 1: {
1250
- if (tag !== 10) {
1251
- break;
1252
- }
1253
-
1254
- message.exist = ExistenceProof.decode(reader, reader.uint32());
1255
- continue;
1256
- }
1257
- case 2: {
1258
- if (tag !== 18) {
1259
- break;
1260
- }
1261
-
1262
- message.nonexist = NonExistenceProof.decode(reader, reader.uint32());
1263
- continue;
1264
- }
1265
- }
1266
- if ((tag & 7) === 4 || tag === 0) {
1267
- break;
1268
- }
1269
- reader.skip(tag & 7);
1270
- }
1271
- return message;
1272
- },
1273
-
1274
- fromJSON(object: any): BatchEntry {
1275
- return {
1276
- exist: isSet(object.exist) ? ExistenceProof.fromJSON(object.exist) : undefined,
1277
- nonexist: isSet(object.nonexist) ? NonExistenceProof.fromJSON(object.nonexist) : undefined,
1278
- };
1279
- },
1280
-
1281
- toJSON(message: BatchEntry): unknown {
1282
- const obj: any = {};
1283
- if (message.exist !== undefined) {
1284
- obj.exist = ExistenceProof.toJSON(message.exist);
1285
- }
1286
- if (message.nonexist !== undefined) {
1287
- obj.nonexist = NonExistenceProof.toJSON(message.nonexist);
1288
- }
1289
- return obj;
1290
- },
1291
-
1292
- create<I extends Exact<DeepPartial<BatchEntry>, I>>(base?: I): BatchEntry {
1293
- return BatchEntry.fromPartial(base ?? ({} as any));
1294
- },
1295
- fromPartial<I extends Exact<DeepPartial<BatchEntry>, I>>(object: I): BatchEntry {
1296
- const message = createBaseBatchEntry();
1297
- message.exist = (object.exist !== undefined && object.exist !== null)
1298
- ? ExistenceProof.fromPartial(object.exist)
1299
- : undefined;
1300
- message.nonexist = (object.nonexist !== undefined && object.nonexist !== null)
1301
- ? NonExistenceProof.fromPartial(object.nonexist)
1302
- : undefined;
1303
- return message;
1304
- },
1305
- };
1306
-
1307
- function createBaseCompressedBatchProof(): CompressedBatchProof {
1308
- return { entries: [], lookupInners: [] };
1309
- }
1310
-
1311
- export const CompressedBatchProof: MessageFns<CompressedBatchProof> = {
1312
- encode(message: CompressedBatchProof, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1313
- for (const v of message.entries) {
1314
- CompressedBatchEntry.encode(v!, writer.uint32(10).fork()).join();
1315
- }
1316
- for (const v of message.lookupInners) {
1317
- InnerOp.encode(v!, writer.uint32(18).fork()).join();
1318
- }
1319
- return writer;
1320
- },
1321
-
1322
- decode(input: BinaryReader | Uint8Array, length?: number): CompressedBatchProof {
1323
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1324
- let end = length === undefined ? reader.len : reader.pos + length;
1325
- const message = createBaseCompressedBatchProof();
1326
- while (reader.pos < end) {
1327
- const tag = reader.uint32();
1328
- switch (tag >>> 3) {
1329
- case 1: {
1330
- if (tag !== 10) {
1331
- break;
1332
- }
1333
-
1334
- message.entries.push(CompressedBatchEntry.decode(reader, reader.uint32()));
1335
- continue;
1336
- }
1337
- case 2: {
1338
- if (tag !== 18) {
1339
- break;
1340
- }
1341
-
1342
- message.lookupInners.push(InnerOp.decode(reader, reader.uint32()));
1343
- continue;
1344
- }
1345
- }
1346
- if ((tag & 7) === 4 || tag === 0) {
1347
- break;
1348
- }
1349
- reader.skip(tag & 7);
1350
- }
1351
- return message;
1352
- },
1353
-
1354
- fromJSON(object: any): CompressedBatchProof {
1355
- return {
1356
- entries: globalThis.Array.isArray(object?.entries)
1357
- ? object.entries.map((e: any) => CompressedBatchEntry.fromJSON(e))
1358
- : [],
1359
- lookupInners: globalThis.Array.isArray(object?.lookupInners)
1360
- ? object.lookupInners.map((e: any) => InnerOp.fromJSON(e))
1361
- : [],
1362
- };
1363
- },
1364
-
1365
- toJSON(message: CompressedBatchProof): unknown {
1366
- const obj: any = {};
1367
- if (message.entries?.length) {
1368
- obj.entries = message.entries.map((e) => CompressedBatchEntry.toJSON(e));
1369
- }
1370
- if (message.lookupInners?.length) {
1371
- obj.lookupInners = message.lookupInners.map((e) => InnerOp.toJSON(e));
1372
- }
1373
- return obj;
1374
- },
1375
-
1376
- create<I extends Exact<DeepPartial<CompressedBatchProof>, I>>(base?: I): CompressedBatchProof {
1377
- return CompressedBatchProof.fromPartial(base ?? ({} as any));
1378
- },
1379
- fromPartial<I extends Exact<DeepPartial<CompressedBatchProof>, I>>(object: I): CompressedBatchProof {
1380
- const message = createBaseCompressedBatchProof();
1381
- message.entries = object.entries?.map((e) => CompressedBatchEntry.fromPartial(e)) || [];
1382
- message.lookupInners = object.lookupInners?.map((e) => InnerOp.fromPartial(e)) || [];
1383
- return message;
1384
- },
1385
- };
1386
-
1387
- function createBaseCompressedBatchEntry(): CompressedBatchEntry {
1388
- return { exist: undefined, nonexist: undefined };
1389
- }
1390
-
1391
- export const CompressedBatchEntry: MessageFns<CompressedBatchEntry> = {
1392
- encode(message: CompressedBatchEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1393
- if (message.exist !== undefined) {
1394
- CompressedExistenceProof.encode(message.exist, writer.uint32(10).fork()).join();
1395
- }
1396
- if (message.nonexist !== undefined) {
1397
- CompressedNonExistenceProof.encode(message.nonexist, writer.uint32(18).fork()).join();
1398
- }
1399
- return writer;
1400
- },
1401
-
1402
- decode(input: BinaryReader | Uint8Array, length?: number): CompressedBatchEntry {
1403
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1404
- let end = length === undefined ? reader.len : reader.pos + length;
1405
- const message = createBaseCompressedBatchEntry();
1406
- while (reader.pos < end) {
1407
- const tag = reader.uint32();
1408
- switch (tag >>> 3) {
1409
- case 1: {
1410
- if (tag !== 10) {
1411
- break;
1412
- }
1413
-
1414
- message.exist = CompressedExistenceProof.decode(reader, reader.uint32());
1415
- continue;
1416
- }
1417
- case 2: {
1418
- if (tag !== 18) {
1419
- break;
1420
- }
1421
-
1422
- message.nonexist = CompressedNonExistenceProof.decode(reader, reader.uint32());
1423
- continue;
1424
- }
1425
- }
1426
- if ((tag & 7) === 4 || tag === 0) {
1427
- break;
1428
- }
1429
- reader.skip(tag & 7);
1430
- }
1431
- return message;
1432
- },
1433
-
1434
- fromJSON(object: any): CompressedBatchEntry {
1435
- return {
1436
- exist: isSet(object.exist) ? CompressedExistenceProof.fromJSON(object.exist) : undefined,
1437
- nonexist: isSet(object.nonexist) ? CompressedNonExistenceProof.fromJSON(object.nonexist) : undefined,
1438
- };
1439
- },
1440
-
1441
- toJSON(message: CompressedBatchEntry): unknown {
1442
- const obj: any = {};
1443
- if (message.exist !== undefined) {
1444
- obj.exist = CompressedExistenceProof.toJSON(message.exist);
1445
- }
1446
- if (message.nonexist !== undefined) {
1447
- obj.nonexist = CompressedNonExistenceProof.toJSON(message.nonexist);
1448
- }
1449
- return obj;
1450
- },
1451
-
1452
- create<I extends Exact<DeepPartial<CompressedBatchEntry>, I>>(base?: I): CompressedBatchEntry {
1453
- return CompressedBatchEntry.fromPartial(base ?? ({} as any));
1454
- },
1455
- fromPartial<I extends Exact<DeepPartial<CompressedBatchEntry>, I>>(object: I): CompressedBatchEntry {
1456
- const message = createBaseCompressedBatchEntry();
1457
- message.exist = (object.exist !== undefined && object.exist !== null)
1458
- ? CompressedExistenceProof.fromPartial(object.exist)
1459
- : undefined;
1460
- message.nonexist = (object.nonexist !== undefined && object.nonexist !== null)
1461
- ? CompressedNonExistenceProof.fromPartial(object.nonexist)
1462
- : undefined;
1463
- return message;
1464
- },
1465
- };
1466
-
1467
- function createBaseCompressedExistenceProof(): CompressedExistenceProof {
1468
- return { key: new Uint8Array(0), value: new Uint8Array(0), leaf: undefined, path: [] };
1469
- }
1470
-
1471
- export const CompressedExistenceProof: MessageFns<CompressedExistenceProof> = {
1472
- encode(message: CompressedExistenceProof, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1473
- if (message.key.length !== 0) {
1474
- writer.uint32(10).bytes(message.key);
1475
- }
1476
- if (message.value.length !== 0) {
1477
- writer.uint32(18).bytes(message.value);
1478
- }
1479
- if (message.leaf !== undefined) {
1480
- LeafOp.encode(message.leaf, writer.uint32(26).fork()).join();
1481
- }
1482
- writer.uint32(34).fork();
1483
- for (const v of message.path) {
1484
- writer.int32(v);
1485
- }
1486
- writer.join();
1487
- return writer;
1488
- },
1489
-
1490
- decode(input: BinaryReader | Uint8Array, length?: number): CompressedExistenceProof {
1491
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1492
- let end = length === undefined ? reader.len : reader.pos + length;
1493
- const message = createBaseCompressedExistenceProof();
1494
- while (reader.pos < end) {
1495
- const tag = reader.uint32();
1496
- switch (tag >>> 3) {
1497
- case 1: {
1498
- if (tag !== 10) {
1499
- break;
1500
- }
1501
-
1502
- message.key = reader.bytes();
1503
- continue;
1504
- }
1505
- case 2: {
1506
- if (tag !== 18) {
1507
- break;
1508
- }
1509
-
1510
- message.value = reader.bytes();
1511
- continue;
1512
- }
1513
- case 3: {
1514
- if (tag !== 26) {
1515
- break;
1516
- }
1517
-
1518
- message.leaf = LeafOp.decode(reader, reader.uint32());
1519
- continue;
1520
- }
1521
- case 4: {
1522
- if (tag === 32) {
1523
- message.path.push(reader.int32());
1524
-
1525
- continue;
1526
- }
1527
-
1528
- if (tag === 34) {
1529
- const end2 = reader.uint32() + reader.pos;
1530
- while (reader.pos < end2) {
1531
- message.path.push(reader.int32());
1532
- }
1533
-
1534
- continue;
1535
- }
1536
-
1537
- break;
1538
- }
1539
- }
1540
- if ((tag & 7) === 4 || tag === 0) {
1541
- break;
1542
- }
1543
- reader.skip(tag & 7);
1544
- }
1545
- return message;
1546
- },
1547
-
1548
- fromJSON(object: any): CompressedExistenceProof {
1549
- return {
1550
- key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(0),
1551
- value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(0),
1552
- leaf: isSet(object.leaf) ? LeafOp.fromJSON(object.leaf) : undefined,
1553
- path: globalThis.Array.isArray(object?.path) ? object.path.map((e: any) => globalThis.Number(e)) : [],
1554
- };
1555
- },
1556
-
1557
- toJSON(message: CompressedExistenceProof): unknown {
1558
- const obj: any = {};
1559
- if (message.key.length !== 0) {
1560
- obj.key = base64FromBytes(message.key);
1561
- }
1562
- if (message.value.length !== 0) {
1563
- obj.value = base64FromBytes(message.value);
1564
- }
1565
- if (message.leaf !== undefined) {
1566
- obj.leaf = LeafOp.toJSON(message.leaf);
1567
- }
1568
- if (message.path?.length) {
1569
- obj.path = message.path.map((e) => Math.round(e));
1570
- }
1571
- return obj;
1572
- },
1573
-
1574
- create<I extends Exact<DeepPartial<CompressedExistenceProof>, I>>(base?: I): CompressedExistenceProof {
1575
- return CompressedExistenceProof.fromPartial(base ?? ({} as any));
1576
- },
1577
- fromPartial<I extends Exact<DeepPartial<CompressedExistenceProof>, I>>(object: I): CompressedExistenceProof {
1578
- const message = createBaseCompressedExistenceProof();
1579
- message.key = object.key ?? new Uint8Array(0);
1580
- message.value = object.value ?? new Uint8Array(0);
1581
- message.leaf = (object.leaf !== undefined && object.leaf !== null) ? LeafOp.fromPartial(object.leaf) : undefined;
1582
- message.path = object.path?.map((e) => e) || [];
1583
- return message;
1584
- },
1585
- };
1586
-
1587
- function createBaseCompressedNonExistenceProof(): CompressedNonExistenceProof {
1588
- return { key: new Uint8Array(0), left: undefined, right: undefined };
1589
- }
1590
-
1591
- export const CompressedNonExistenceProof: MessageFns<CompressedNonExistenceProof> = {
1592
- encode(message: CompressedNonExistenceProof, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1593
- if (message.key.length !== 0) {
1594
- writer.uint32(10).bytes(message.key);
1595
- }
1596
- if (message.left !== undefined) {
1597
- CompressedExistenceProof.encode(message.left, writer.uint32(18).fork()).join();
1598
- }
1599
- if (message.right !== undefined) {
1600
- CompressedExistenceProof.encode(message.right, writer.uint32(26).fork()).join();
1601
- }
1602
- return writer;
1603
- },
1604
-
1605
- decode(input: BinaryReader | Uint8Array, length?: number): CompressedNonExistenceProof {
1606
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1607
- let end = length === undefined ? reader.len : reader.pos + length;
1608
- const message = createBaseCompressedNonExistenceProof();
1609
- while (reader.pos < end) {
1610
- const tag = reader.uint32();
1611
- switch (tag >>> 3) {
1612
- case 1: {
1613
- if (tag !== 10) {
1614
- break;
1615
- }
1616
-
1617
- message.key = reader.bytes();
1618
- continue;
1619
- }
1620
- case 2: {
1621
- if (tag !== 18) {
1622
- break;
1623
- }
1624
-
1625
- message.left = CompressedExistenceProof.decode(reader, reader.uint32());
1626
- continue;
1627
- }
1628
- case 3: {
1629
- if (tag !== 26) {
1630
- break;
1631
- }
1632
-
1633
- message.right = CompressedExistenceProof.decode(reader, reader.uint32());
1634
- continue;
1635
- }
1636
- }
1637
- if ((tag & 7) === 4 || tag === 0) {
1638
- break;
1639
- }
1640
- reader.skip(tag & 7);
1641
- }
1642
- return message;
1643
- },
1644
-
1645
- fromJSON(object: any): CompressedNonExistenceProof {
1646
- return {
1647
- key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(0),
1648
- left: isSet(object.left) ? CompressedExistenceProof.fromJSON(object.left) : undefined,
1649
- right: isSet(object.right) ? CompressedExistenceProof.fromJSON(object.right) : undefined,
1650
- };
1651
- },
1652
-
1653
- toJSON(message: CompressedNonExistenceProof): unknown {
1654
- const obj: any = {};
1655
- if (message.key.length !== 0) {
1656
- obj.key = base64FromBytes(message.key);
1657
- }
1658
- if (message.left !== undefined) {
1659
- obj.left = CompressedExistenceProof.toJSON(message.left);
1660
- }
1661
- if (message.right !== undefined) {
1662
- obj.right = CompressedExistenceProof.toJSON(message.right);
1663
- }
1664
- return obj;
1665
- },
1666
-
1667
- create<I extends Exact<DeepPartial<CompressedNonExistenceProof>, I>>(base?: I): CompressedNonExistenceProof {
1668
- return CompressedNonExistenceProof.fromPartial(base ?? ({} as any));
1669
- },
1670
- fromPartial<I extends Exact<DeepPartial<CompressedNonExistenceProof>, I>>(object: I): CompressedNonExistenceProof {
1671
- const message = createBaseCompressedNonExistenceProof();
1672
- message.key = object.key ?? new Uint8Array(0);
1673
- message.left = (object.left !== undefined && object.left !== null)
1674
- ? CompressedExistenceProof.fromPartial(object.left)
1675
- : undefined;
1676
- message.right = (object.right !== undefined && object.right !== null)
1677
- ? CompressedExistenceProof.fromPartial(object.right)
1678
- : undefined;
1679
- return message;
1680
- },
1681
- };
1682
-
1683
- function bytesFromBase64(b64: string): Uint8Array {
1684
- if ((globalThis as any).Buffer) {
1685
- return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
1686
- } else {
1687
- const bin = globalThis.atob(b64);
1688
- const arr = new Uint8Array(bin.length);
1689
- for (let i = 0; i < bin.length; ++i) {
1690
- arr[i] = bin.charCodeAt(i);
1691
- }
1692
- return arr;
1693
- }
1694
- }
1695
-
1696
- function base64FromBytes(arr: Uint8Array): string {
1697
- if ((globalThis as any).Buffer) {
1698
- return globalThis.Buffer.from(arr).toString("base64");
1699
- } else {
1700
- const bin: string[] = [];
1701
- arr.forEach((byte) => {
1702
- bin.push(globalThis.String.fromCharCode(byte));
1703
- });
1704
- return globalThis.btoa(bin.join(""));
1705
- }
1706
- }
1707
-
1708
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
1709
-
1710
- export type DeepPartial<T> = T extends Builtin ? T
1711
- : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
1712
- : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
1713
- : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
1714
- : Partial<T>;
1715
-
1716
- type KeysOfUnion<T> = T extends T ? keyof T : never;
1717
- export type Exact<P, I extends P> = P extends Builtin ? P
1718
- : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
1719
-
1720
- function isSet(value: any): boolean {
1721
- return value !== null && value !== undefined;
1722
- }
1723
-
1724
- export interface MessageFns<T> {
1725
- encode(message: T, writer?: BinaryWriter): BinaryWriter;
1726
- decode(input: BinaryReader | Uint8Array, length?: number): T;
1727
- fromJSON(object: any): T;
1728
- toJSON(message: T): unknown;
1729
- create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
1730
- fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
1731
- }