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,1358 +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: ibc/core/channel/v1/channel.proto
6
-
7
- /* eslint-disable */
8
- import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
9
- import { Height } from "../../client/v1/client";
10
-
11
- export const protobufPackage = "ibc.core.channel.v1";
12
-
13
- /**
14
- * State defines if a channel is in one of the following states:
15
- * CLOSED, INIT, TRYOPEN, OPEN, FLUSHING, FLUSHCOMPLETE or UNINITIALIZED.
16
- */
17
- export enum State {
18
- /** STATE_UNINITIALIZED_UNSPECIFIED - Default State */
19
- STATE_UNINITIALIZED_UNSPECIFIED = 0,
20
- /** STATE_INIT - A channel has just started the opening handshake. */
21
- STATE_INIT = 1,
22
- /** STATE_TRYOPEN - A channel has acknowledged the handshake step on the counterparty chain. */
23
- STATE_TRYOPEN = 2,
24
- /**
25
- * STATE_OPEN - A channel has completed the handshake. Open channels are
26
- * ready to send and receive packets.
27
- */
28
- STATE_OPEN = 3,
29
- /**
30
- * STATE_CLOSED - A channel has been closed and can no longer be used to send or receive
31
- * packets.
32
- */
33
- STATE_CLOSED = 4,
34
- /** STATE_FLUSHING - A channel has just accepted the upgrade handshake attempt and is flushing in-flight packets. */
35
- STATE_FLUSHING = 5,
36
- /** STATE_FLUSHCOMPLETE - A channel has just completed flushing any in-flight packets. */
37
- STATE_FLUSHCOMPLETE = 6,
38
- UNRECOGNIZED = -1,
39
- }
40
-
41
- export function stateFromJSON(object: any): State {
42
- switch (object) {
43
- case 0:
44
- case "STATE_UNINITIALIZED_UNSPECIFIED":
45
- return State.STATE_UNINITIALIZED_UNSPECIFIED;
46
- case 1:
47
- case "STATE_INIT":
48
- return State.STATE_INIT;
49
- case 2:
50
- case "STATE_TRYOPEN":
51
- return State.STATE_TRYOPEN;
52
- case 3:
53
- case "STATE_OPEN":
54
- return State.STATE_OPEN;
55
- case 4:
56
- case "STATE_CLOSED":
57
- return State.STATE_CLOSED;
58
- case 5:
59
- case "STATE_FLUSHING":
60
- return State.STATE_FLUSHING;
61
- case 6:
62
- case "STATE_FLUSHCOMPLETE":
63
- return State.STATE_FLUSHCOMPLETE;
64
- case -1:
65
- case "UNRECOGNIZED":
66
- default:
67
- return State.UNRECOGNIZED;
68
- }
69
- }
70
-
71
- export function stateToJSON(object: State): string {
72
- switch (object) {
73
- case State.STATE_UNINITIALIZED_UNSPECIFIED:
74
- return "STATE_UNINITIALIZED_UNSPECIFIED";
75
- case State.STATE_INIT:
76
- return "STATE_INIT";
77
- case State.STATE_TRYOPEN:
78
- return "STATE_TRYOPEN";
79
- case State.STATE_OPEN:
80
- return "STATE_OPEN";
81
- case State.STATE_CLOSED:
82
- return "STATE_CLOSED";
83
- case State.STATE_FLUSHING:
84
- return "STATE_FLUSHING";
85
- case State.STATE_FLUSHCOMPLETE:
86
- return "STATE_FLUSHCOMPLETE";
87
- case State.UNRECOGNIZED:
88
- default:
89
- return "UNRECOGNIZED";
90
- }
91
- }
92
-
93
- /** Order defines if a channel is ORDERED or UNORDERED */
94
- export enum Order {
95
- /** ORDER_NONE_UNSPECIFIED - zero-value for channel ordering */
96
- ORDER_NONE_UNSPECIFIED = 0,
97
- /**
98
- * ORDER_UNORDERED - packets can be delivered in any order, which may differ from the order in
99
- * which they were sent.
100
- */
101
- ORDER_UNORDERED = 1,
102
- /** ORDER_ORDERED - packets are delivered exactly in the order which they were sent */
103
- ORDER_ORDERED = 2,
104
- UNRECOGNIZED = -1,
105
- }
106
-
107
- export function orderFromJSON(object: any): Order {
108
- switch (object) {
109
- case 0:
110
- case "ORDER_NONE_UNSPECIFIED":
111
- return Order.ORDER_NONE_UNSPECIFIED;
112
- case 1:
113
- case "ORDER_UNORDERED":
114
- return Order.ORDER_UNORDERED;
115
- case 2:
116
- case "ORDER_ORDERED":
117
- return Order.ORDER_ORDERED;
118
- case -1:
119
- case "UNRECOGNIZED":
120
- default:
121
- return Order.UNRECOGNIZED;
122
- }
123
- }
124
-
125
- export function orderToJSON(object: Order): string {
126
- switch (object) {
127
- case Order.ORDER_NONE_UNSPECIFIED:
128
- return "ORDER_NONE_UNSPECIFIED";
129
- case Order.ORDER_UNORDERED:
130
- return "ORDER_UNORDERED";
131
- case Order.ORDER_ORDERED:
132
- return "ORDER_ORDERED";
133
- case Order.UNRECOGNIZED:
134
- default:
135
- return "UNRECOGNIZED";
136
- }
137
- }
138
-
139
- /**
140
- * Channel defines pipeline for exactly-once packet delivery between specific
141
- * modules on separate blockchains, which has at least one end capable of
142
- * sending packets and one end capable of receiving packets.
143
- */
144
- export interface Channel {
145
- /** current state of the channel end */
146
- state: State;
147
- /** whether the channel is ordered or unordered */
148
- ordering: Order;
149
- /** counterparty channel end */
150
- counterparty:
151
- | Counterparty
152
- | undefined;
153
- /**
154
- * list of connection identifiers, in order, along which packets sent on
155
- * this channel will travel
156
- */
157
- connectionHops: string[];
158
- /** opaque channel version, which is agreed upon during the handshake */
159
- version: string;
160
- /**
161
- * upgrade sequence indicates the latest upgrade attempt performed by this channel
162
- * the value of 0 indicates the channel has never been upgraded
163
- */
164
- upgradeSequence: number;
165
- }
166
-
167
- /**
168
- * IdentifiedChannel defines a channel with additional port and channel
169
- * identifier fields.
170
- */
171
- export interface IdentifiedChannel {
172
- /** current state of the channel end */
173
- state: State;
174
- /** whether the channel is ordered or unordered */
175
- ordering: Order;
176
- /** counterparty channel end */
177
- counterparty:
178
- | Counterparty
179
- | undefined;
180
- /**
181
- * list of connection identifiers, in order, along which packets sent on
182
- * this channel will travel
183
- */
184
- connectionHops: string[];
185
- /** opaque channel version, which is agreed upon during the handshake */
186
- version: string;
187
- /** port identifier */
188
- portId: string;
189
- /** channel identifier */
190
- channelId: string;
191
- /**
192
- * upgrade sequence indicates the latest upgrade attempt performed by this channel
193
- * the value of 0 indicates the channel has never been upgraded
194
- */
195
- upgradeSequence: number;
196
- }
197
-
198
- /** Counterparty defines a channel end counterparty */
199
- export interface Counterparty {
200
- /** port on the counterparty chain which owns the other end of the channel. */
201
- portId: string;
202
- /** channel end on the counterparty chain */
203
- channelId: string;
204
- }
205
-
206
- /** Packet defines a type that carries data across different chains through IBC */
207
- export interface Packet {
208
- /**
209
- * number corresponds to the order of sends and receives, where a Packet
210
- * with an earlier sequence number must be sent and received before a Packet
211
- * with a later sequence number.
212
- */
213
- sequence: number;
214
- /** identifies the port on the sending chain. */
215
- sourcePort: string;
216
- /** identifies the channel end on the sending chain. */
217
- sourceChannel: string;
218
- /** identifies the port on the receiving chain. */
219
- destinationPort: string;
220
- /** identifies the channel end on the receiving chain. */
221
- destinationChannel: string;
222
- /** actual opaque bytes transferred directly to the application module */
223
- data: Uint8Array;
224
- /** block height after which the packet times out */
225
- timeoutHeight:
226
- | Height
227
- | undefined;
228
- /** block timestamp (in nanoseconds) after which the packet times out */
229
- timeoutTimestamp: number;
230
- }
231
-
232
- /**
233
- * PacketState defines the generic type necessary to retrieve and store
234
- * packet commitments, acknowledgements, and receipts.
235
- * Caller is responsible for knowing the context necessary to interpret this
236
- * state as a commitment, acknowledgement, or a receipt.
237
- */
238
- export interface PacketState {
239
- /** channel port identifier. */
240
- portId: string;
241
- /** channel unique identifier. */
242
- channelId: string;
243
- /** packet sequence. */
244
- sequence: number;
245
- /** embedded data that represents packet state. */
246
- data: Uint8Array;
247
- }
248
-
249
- /**
250
- * PacketId is an identifer for a unique Packet
251
- * Source chains refer to packets by source port/channel
252
- * Destination chains refer to packets by destination port/channel
253
- */
254
- export interface PacketId {
255
- /** channel port identifier */
256
- portId: string;
257
- /** channel unique identifier */
258
- channelId: string;
259
- /** packet sequence */
260
- sequence: number;
261
- }
262
-
263
- /**
264
- * Acknowledgement is the recommended acknowledgement format to be used by
265
- * app-specific protocols.
266
- * NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental
267
- * conflicts with other protobuf message formats used for acknowledgements.
268
- * The first byte of any message with this format will be the non-ASCII values
269
- * `0xaa` (result) or `0xb2` (error). Implemented as defined by ICS:
270
- * https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#acknowledgement-envelope
271
- */
272
- export interface Acknowledgement {
273
- result?: Uint8Array | undefined;
274
- error?: string | undefined;
275
- }
276
-
277
- /**
278
- * Timeout defines an execution deadline structure for 04-channel handlers.
279
- * This includes packet lifecycle handlers as well as the upgrade handshake handlers.
280
- * A valid Timeout contains either one or both of a timestamp and block height (sequence).
281
- */
282
- export interface Timeout {
283
- /** block height after which the packet or upgrade times out */
284
- height:
285
- | Height
286
- | undefined;
287
- /** block timestamp (in nanoseconds) after which the packet or upgrade times out */
288
- timestamp: number;
289
- }
290
-
291
- /** Params defines the set of IBC channel parameters. */
292
- export interface Params {
293
- /** the relative timeout after which channel upgrades will time out. */
294
- upgradeTimeout: Timeout | undefined;
295
- }
296
-
297
- function createBaseChannel(): Channel {
298
- return { state: 0, ordering: 0, counterparty: undefined, connectionHops: [], version: "", upgradeSequence: 0 };
299
- }
300
-
301
- export const Channel: MessageFns<Channel> = {
302
- encode(message: Channel, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
303
- if (message.state !== 0) {
304
- writer.uint32(8).int32(message.state);
305
- }
306
- if (message.ordering !== 0) {
307
- writer.uint32(16).int32(message.ordering);
308
- }
309
- if (message.counterparty !== undefined) {
310
- Counterparty.encode(message.counterparty, writer.uint32(26).fork()).join();
311
- }
312
- for (const v of message.connectionHops) {
313
- writer.uint32(34).string(v!);
314
- }
315
- if (message.version !== "") {
316
- writer.uint32(42).string(message.version);
317
- }
318
- if (message.upgradeSequence !== 0) {
319
- writer.uint32(48).uint64(message.upgradeSequence);
320
- }
321
- return writer;
322
- },
323
-
324
- decode(input: BinaryReader | Uint8Array, length?: number): Channel {
325
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
326
- let end = length === undefined ? reader.len : reader.pos + length;
327
- const message = createBaseChannel();
328
- while (reader.pos < end) {
329
- const tag = reader.uint32();
330
- switch (tag >>> 3) {
331
- case 1: {
332
- if (tag !== 8) {
333
- break;
334
- }
335
-
336
- message.state = reader.int32() as any;
337
- continue;
338
- }
339
- case 2: {
340
- if (tag !== 16) {
341
- break;
342
- }
343
-
344
- message.ordering = reader.int32() as any;
345
- continue;
346
- }
347
- case 3: {
348
- if (tag !== 26) {
349
- break;
350
- }
351
-
352
- message.counterparty = Counterparty.decode(reader, reader.uint32());
353
- continue;
354
- }
355
- case 4: {
356
- if (tag !== 34) {
357
- break;
358
- }
359
-
360
- message.connectionHops.push(reader.string());
361
- continue;
362
- }
363
- case 5: {
364
- if (tag !== 42) {
365
- break;
366
- }
367
-
368
- message.version = reader.string();
369
- continue;
370
- }
371
- case 6: {
372
- if (tag !== 48) {
373
- break;
374
- }
375
-
376
- message.upgradeSequence = longToNumber(reader.uint64());
377
- continue;
378
- }
379
- }
380
- if ((tag & 7) === 4 || tag === 0) {
381
- break;
382
- }
383
- reader.skip(tag & 7);
384
- }
385
- return message;
386
- },
387
-
388
- fromJSON(object: any): Channel {
389
- return {
390
- state: isSet(object.state) ? stateFromJSON(object.state) : 0,
391
- ordering: isSet(object.ordering) ? orderFromJSON(object.ordering) : 0,
392
- counterparty: isSet(object.counterparty) ? Counterparty.fromJSON(object.counterparty) : undefined,
393
- connectionHops: globalThis.Array.isArray(object?.connectionHops)
394
- ? object.connectionHops.map((e: any) => globalThis.String(e))
395
- : [],
396
- version: isSet(object.version) ? globalThis.String(object.version) : "",
397
- upgradeSequence: isSet(object.upgradeSequence) ? globalThis.Number(object.upgradeSequence) : 0,
398
- };
399
- },
400
-
401
- toJSON(message: Channel): unknown {
402
- const obj: any = {};
403
- if (message.state !== 0) {
404
- obj.state = stateToJSON(message.state);
405
- }
406
- if (message.ordering !== 0) {
407
- obj.ordering = orderToJSON(message.ordering);
408
- }
409
- if (message.counterparty !== undefined) {
410
- obj.counterparty = Counterparty.toJSON(message.counterparty);
411
- }
412
- if (message.connectionHops?.length) {
413
- obj.connectionHops = message.connectionHops;
414
- }
415
- if (message.version !== "") {
416
- obj.version = message.version;
417
- }
418
- if (message.upgradeSequence !== 0) {
419
- obj.upgradeSequence = Math.round(message.upgradeSequence);
420
- }
421
- return obj;
422
- },
423
-
424
- create<I extends Exact<DeepPartial<Channel>, I>>(base?: I): Channel {
425
- return Channel.fromPartial(base ?? ({} as any));
426
- },
427
- fromPartial<I extends Exact<DeepPartial<Channel>, I>>(object: I): Channel {
428
- const message = createBaseChannel();
429
- message.state = object.state ?? 0;
430
- message.ordering = object.ordering ?? 0;
431
- message.counterparty = (object.counterparty !== undefined && object.counterparty !== null)
432
- ? Counterparty.fromPartial(object.counterparty)
433
- : undefined;
434
- message.connectionHops = object.connectionHops?.map((e) => e) || [];
435
- message.version = object.version ?? "";
436
- message.upgradeSequence = object.upgradeSequence ?? 0;
437
- return message;
438
- },
439
- };
440
-
441
- function createBaseIdentifiedChannel(): IdentifiedChannel {
442
- return {
443
- state: 0,
444
- ordering: 0,
445
- counterparty: undefined,
446
- connectionHops: [],
447
- version: "",
448
- portId: "",
449
- channelId: "",
450
- upgradeSequence: 0,
451
- };
452
- }
453
-
454
- export const IdentifiedChannel: MessageFns<IdentifiedChannel> = {
455
- encode(message: IdentifiedChannel, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
456
- if (message.state !== 0) {
457
- writer.uint32(8).int32(message.state);
458
- }
459
- if (message.ordering !== 0) {
460
- writer.uint32(16).int32(message.ordering);
461
- }
462
- if (message.counterparty !== undefined) {
463
- Counterparty.encode(message.counterparty, writer.uint32(26).fork()).join();
464
- }
465
- for (const v of message.connectionHops) {
466
- writer.uint32(34).string(v!);
467
- }
468
- if (message.version !== "") {
469
- writer.uint32(42).string(message.version);
470
- }
471
- if (message.portId !== "") {
472
- writer.uint32(50).string(message.portId);
473
- }
474
- if (message.channelId !== "") {
475
- writer.uint32(58).string(message.channelId);
476
- }
477
- if (message.upgradeSequence !== 0) {
478
- writer.uint32(64).uint64(message.upgradeSequence);
479
- }
480
- return writer;
481
- },
482
-
483
- decode(input: BinaryReader | Uint8Array, length?: number): IdentifiedChannel {
484
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
485
- let end = length === undefined ? reader.len : reader.pos + length;
486
- const message = createBaseIdentifiedChannel();
487
- while (reader.pos < end) {
488
- const tag = reader.uint32();
489
- switch (tag >>> 3) {
490
- case 1: {
491
- if (tag !== 8) {
492
- break;
493
- }
494
-
495
- message.state = reader.int32() as any;
496
- continue;
497
- }
498
- case 2: {
499
- if (tag !== 16) {
500
- break;
501
- }
502
-
503
- message.ordering = reader.int32() as any;
504
- continue;
505
- }
506
- case 3: {
507
- if (tag !== 26) {
508
- break;
509
- }
510
-
511
- message.counterparty = Counterparty.decode(reader, reader.uint32());
512
- continue;
513
- }
514
- case 4: {
515
- if (tag !== 34) {
516
- break;
517
- }
518
-
519
- message.connectionHops.push(reader.string());
520
- continue;
521
- }
522
- case 5: {
523
- if (tag !== 42) {
524
- break;
525
- }
526
-
527
- message.version = reader.string();
528
- continue;
529
- }
530
- case 6: {
531
- if (tag !== 50) {
532
- break;
533
- }
534
-
535
- message.portId = reader.string();
536
- continue;
537
- }
538
- case 7: {
539
- if (tag !== 58) {
540
- break;
541
- }
542
-
543
- message.channelId = reader.string();
544
- continue;
545
- }
546
- case 8: {
547
- if (tag !== 64) {
548
- break;
549
- }
550
-
551
- message.upgradeSequence = longToNumber(reader.uint64());
552
- continue;
553
- }
554
- }
555
- if ((tag & 7) === 4 || tag === 0) {
556
- break;
557
- }
558
- reader.skip(tag & 7);
559
- }
560
- return message;
561
- },
562
-
563
- fromJSON(object: any): IdentifiedChannel {
564
- return {
565
- state: isSet(object.state) ? stateFromJSON(object.state) : 0,
566
- ordering: isSet(object.ordering) ? orderFromJSON(object.ordering) : 0,
567
- counterparty: isSet(object.counterparty) ? Counterparty.fromJSON(object.counterparty) : undefined,
568
- connectionHops: globalThis.Array.isArray(object?.connectionHops)
569
- ? object.connectionHops.map((e: any) => globalThis.String(e))
570
- : [],
571
- version: isSet(object.version) ? globalThis.String(object.version) : "",
572
- portId: isSet(object.portId) ? globalThis.String(object.portId) : "",
573
- channelId: isSet(object.channelId) ? globalThis.String(object.channelId) : "",
574
- upgradeSequence: isSet(object.upgradeSequence) ? globalThis.Number(object.upgradeSequence) : 0,
575
- };
576
- },
577
-
578
- toJSON(message: IdentifiedChannel): unknown {
579
- const obj: any = {};
580
- if (message.state !== 0) {
581
- obj.state = stateToJSON(message.state);
582
- }
583
- if (message.ordering !== 0) {
584
- obj.ordering = orderToJSON(message.ordering);
585
- }
586
- if (message.counterparty !== undefined) {
587
- obj.counterparty = Counterparty.toJSON(message.counterparty);
588
- }
589
- if (message.connectionHops?.length) {
590
- obj.connectionHops = message.connectionHops;
591
- }
592
- if (message.version !== "") {
593
- obj.version = message.version;
594
- }
595
- if (message.portId !== "") {
596
- obj.portId = message.portId;
597
- }
598
- if (message.channelId !== "") {
599
- obj.channelId = message.channelId;
600
- }
601
- if (message.upgradeSequence !== 0) {
602
- obj.upgradeSequence = Math.round(message.upgradeSequence);
603
- }
604
- return obj;
605
- },
606
-
607
- create<I extends Exact<DeepPartial<IdentifiedChannel>, I>>(base?: I): IdentifiedChannel {
608
- return IdentifiedChannel.fromPartial(base ?? ({} as any));
609
- },
610
- fromPartial<I extends Exact<DeepPartial<IdentifiedChannel>, I>>(object: I): IdentifiedChannel {
611
- const message = createBaseIdentifiedChannel();
612
- message.state = object.state ?? 0;
613
- message.ordering = object.ordering ?? 0;
614
- message.counterparty = (object.counterparty !== undefined && object.counterparty !== null)
615
- ? Counterparty.fromPartial(object.counterparty)
616
- : undefined;
617
- message.connectionHops = object.connectionHops?.map((e) => e) || [];
618
- message.version = object.version ?? "";
619
- message.portId = object.portId ?? "";
620
- message.channelId = object.channelId ?? "";
621
- message.upgradeSequence = object.upgradeSequence ?? 0;
622
- return message;
623
- },
624
- };
625
-
626
- function createBaseCounterparty(): Counterparty {
627
- return { portId: "", channelId: "" };
628
- }
629
-
630
- export const Counterparty: MessageFns<Counterparty> = {
631
- encode(message: Counterparty, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
632
- if (message.portId !== "") {
633
- writer.uint32(10).string(message.portId);
634
- }
635
- if (message.channelId !== "") {
636
- writer.uint32(18).string(message.channelId);
637
- }
638
- return writer;
639
- },
640
-
641
- decode(input: BinaryReader | Uint8Array, length?: number): Counterparty {
642
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
643
- let end = length === undefined ? reader.len : reader.pos + length;
644
- const message = createBaseCounterparty();
645
- while (reader.pos < end) {
646
- const tag = reader.uint32();
647
- switch (tag >>> 3) {
648
- case 1: {
649
- if (tag !== 10) {
650
- break;
651
- }
652
-
653
- message.portId = reader.string();
654
- continue;
655
- }
656
- case 2: {
657
- if (tag !== 18) {
658
- break;
659
- }
660
-
661
- message.channelId = reader.string();
662
- continue;
663
- }
664
- }
665
- if ((tag & 7) === 4 || tag === 0) {
666
- break;
667
- }
668
- reader.skip(tag & 7);
669
- }
670
- return message;
671
- },
672
-
673
- fromJSON(object: any): Counterparty {
674
- return {
675
- portId: isSet(object.portId) ? globalThis.String(object.portId) : "",
676
- channelId: isSet(object.channelId) ? globalThis.String(object.channelId) : "",
677
- };
678
- },
679
-
680
- toJSON(message: Counterparty): unknown {
681
- const obj: any = {};
682
- if (message.portId !== "") {
683
- obj.portId = message.portId;
684
- }
685
- if (message.channelId !== "") {
686
- obj.channelId = message.channelId;
687
- }
688
- return obj;
689
- },
690
-
691
- create<I extends Exact<DeepPartial<Counterparty>, I>>(base?: I): Counterparty {
692
- return Counterparty.fromPartial(base ?? ({} as any));
693
- },
694
- fromPartial<I extends Exact<DeepPartial<Counterparty>, I>>(object: I): Counterparty {
695
- const message = createBaseCounterparty();
696
- message.portId = object.portId ?? "";
697
- message.channelId = object.channelId ?? "";
698
- return message;
699
- },
700
- };
701
-
702
- function createBasePacket(): Packet {
703
- return {
704
- sequence: 0,
705
- sourcePort: "",
706
- sourceChannel: "",
707
- destinationPort: "",
708
- destinationChannel: "",
709
- data: new Uint8Array(0),
710
- timeoutHeight: undefined,
711
- timeoutTimestamp: 0,
712
- };
713
- }
714
-
715
- export const Packet: MessageFns<Packet> = {
716
- encode(message: Packet, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
717
- if (message.sequence !== 0) {
718
- writer.uint32(8).uint64(message.sequence);
719
- }
720
- if (message.sourcePort !== "") {
721
- writer.uint32(18).string(message.sourcePort);
722
- }
723
- if (message.sourceChannel !== "") {
724
- writer.uint32(26).string(message.sourceChannel);
725
- }
726
- if (message.destinationPort !== "") {
727
- writer.uint32(34).string(message.destinationPort);
728
- }
729
- if (message.destinationChannel !== "") {
730
- writer.uint32(42).string(message.destinationChannel);
731
- }
732
- if (message.data.length !== 0) {
733
- writer.uint32(50).bytes(message.data);
734
- }
735
- if (message.timeoutHeight !== undefined) {
736
- Height.encode(message.timeoutHeight, writer.uint32(58).fork()).join();
737
- }
738
- if (message.timeoutTimestamp !== 0) {
739
- writer.uint32(64).uint64(message.timeoutTimestamp);
740
- }
741
- return writer;
742
- },
743
-
744
- decode(input: BinaryReader | Uint8Array, length?: number): Packet {
745
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
746
- let end = length === undefined ? reader.len : reader.pos + length;
747
- const message = createBasePacket();
748
- while (reader.pos < end) {
749
- const tag = reader.uint32();
750
- switch (tag >>> 3) {
751
- case 1: {
752
- if (tag !== 8) {
753
- break;
754
- }
755
-
756
- message.sequence = longToNumber(reader.uint64());
757
- continue;
758
- }
759
- case 2: {
760
- if (tag !== 18) {
761
- break;
762
- }
763
-
764
- message.sourcePort = reader.string();
765
- continue;
766
- }
767
- case 3: {
768
- if (tag !== 26) {
769
- break;
770
- }
771
-
772
- message.sourceChannel = reader.string();
773
- continue;
774
- }
775
- case 4: {
776
- if (tag !== 34) {
777
- break;
778
- }
779
-
780
- message.destinationPort = reader.string();
781
- continue;
782
- }
783
- case 5: {
784
- if (tag !== 42) {
785
- break;
786
- }
787
-
788
- message.destinationChannel = reader.string();
789
- continue;
790
- }
791
- case 6: {
792
- if (tag !== 50) {
793
- break;
794
- }
795
-
796
- message.data = reader.bytes();
797
- continue;
798
- }
799
- case 7: {
800
- if (tag !== 58) {
801
- break;
802
- }
803
-
804
- message.timeoutHeight = Height.decode(reader, reader.uint32());
805
- continue;
806
- }
807
- case 8: {
808
- if (tag !== 64) {
809
- break;
810
- }
811
-
812
- message.timeoutTimestamp = longToNumber(reader.uint64());
813
- continue;
814
- }
815
- }
816
- if ((tag & 7) === 4 || tag === 0) {
817
- break;
818
- }
819
- reader.skip(tag & 7);
820
- }
821
- return message;
822
- },
823
-
824
- fromJSON(object: any): Packet {
825
- return {
826
- sequence: isSet(object.sequence) ? globalThis.Number(object.sequence) : 0,
827
- sourcePort: isSet(object.sourcePort) ? globalThis.String(object.sourcePort) : "",
828
- sourceChannel: isSet(object.sourceChannel) ? globalThis.String(object.sourceChannel) : "",
829
- destinationPort: isSet(object.destinationPort) ? globalThis.String(object.destinationPort) : "",
830
- destinationChannel: isSet(object.destinationChannel) ? globalThis.String(object.destinationChannel) : "",
831
- data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0),
832
- timeoutHeight: isSet(object.timeoutHeight) ? Height.fromJSON(object.timeoutHeight) : undefined,
833
- timeoutTimestamp: isSet(object.timeoutTimestamp) ? globalThis.Number(object.timeoutTimestamp) : 0,
834
- };
835
- },
836
-
837
- toJSON(message: Packet): unknown {
838
- const obj: any = {};
839
- if (message.sequence !== 0) {
840
- obj.sequence = Math.round(message.sequence);
841
- }
842
- if (message.sourcePort !== "") {
843
- obj.sourcePort = message.sourcePort;
844
- }
845
- if (message.sourceChannel !== "") {
846
- obj.sourceChannel = message.sourceChannel;
847
- }
848
- if (message.destinationPort !== "") {
849
- obj.destinationPort = message.destinationPort;
850
- }
851
- if (message.destinationChannel !== "") {
852
- obj.destinationChannel = message.destinationChannel;
853
- }
854
- if (message.data.length !== 0) {
855
- obj.data = base64FromBytes(message.data);
856
- }
857
- if (message.timeoutHeight !== undefined) {
858
- obj.timeoutHeight = Height.toJSON(message.timeoutHeight);
859
- }
860
- if (message.timeoutTimestamp !== 0) {
861
- obj.timeoutTimestamp = Math.round(message.timeoutTimestamp);
862
- }
863
- return obj;
864
- },
865
-
866
- create<I extends Exact<DeepPartial<Packet>, I>>(base?: I): Packet {
867
- return Packet.fromPartial(base ?? ({} as any));
868
- },
869
- fromPartial<I extends Exact<DeepPartial<Packet>, I>>(object: I): Packet {
870
- const message = createBasePacket();
871
- message.sequence = object.sequence ?? 0;
872
- message.sourcePort = object.sourcePort ?? "";
873
- message.sourceChannel = object.sourceChannel ?? "";
874
- message.destinationPort = object.destinationPort ?? "";
875
- message.destinationChannel = object.destinationChannel ?? "";
876
- message.data = object.data ?? new Uint8Array(0);
877
- message.timeoutHeight = (object.timeoutHeight !== undefined && object.timeoutHeight !== null)
878
- ? Height.fromPartial(object.timeoutHeight)
879
- : undefined;
880
- message.timeoutTimestamp = object.timeoutTimestamp ?? 0;
881
- return message;
882
- },
883
- };
884
-
885
- function createBasePacketState(): PacketState {
886
- return { portId: "", channelId: "", sequence: 0, data: new Uint8Array(0) };
887
- }
888
-
889
- export const PacketState: MessageFns<PacketState> = {
890
- encode(message: PacketState, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
891
- if (message.portId !== "") {
892
- writer.uint32(10).string(message.portId);
893
- }
894
- if (message.channelId !== "") {
895
- writer.uint32(18).string(message.channelId);
896
- }
897
- if (message.sequence !== 0) {
898
- writer.uint32(24).uint64(message.sequence);
899
- }
900
- if (message.data.length !== 0) {
901
- writer.uint32(34).bytes(message.data);
902
- }
903
- return writer;
904
- },
905
-
906
- decode(input: BinaryReader | Uint8Array, length?: number): PacketState {
907
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
908
- let end = length === undefined ? reader.len : reader.pos + length;
909
- const message = createBasePacketState();
910
- while (reader.pos < end) {
911
- const tag = reader.uint32();
912
- switch (tag >>> 3) {
913
- case 1: {
914
- if (tag !== 10) {
915
- break;
916
- }
917
-
918
- message.portId = reader.string();
919
- continue;
920
- }
921
- case 2: {
922
- if (tag !== 18) {
923
- break;
924
- }
925
-
926
- message.channelId = reader.string();
927
- continue;
928
- }
929
- case 3: {
930
- if (tag !== 24) {
931
- break;
932
- }
933
-
934
- message.sequence = longToNumber(reader.uint64());
935
- continue;
936
- }
937
- case 4: {
938
- if (tag !== 34) {
939
- break;
940
- }
941
-
942
- message.data = reader.bytes();
943
- continue;
944
- }
945
- }
946
- if ((tag & 7) === 4 || tag === 0) {
947
- break;
948
- }
949
- reader.skip(tag & 7);
950
- }
951
- return message;
952
- },
953
-
954
- fromJSON(object: any): PacketState {
955
- return {
956
- portId: isSet(object.portId) ? globalThis.String(object.portId) : "",
957
- channelId: isSet(object.channelId) ? globalThis.String(object.channelId) : "",
958
- sequence: isSet(object.sequence) ? globalThis.Number(object.sequence) : 0,
959
- data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0),
960
- };
961
- },
962
-
963
- toJSON(message: PacketState): unknown {
964
- const obj: any = {};
965
- if (message.portId !== "") {
966
- obj.portId = message.portId;
967
- }
968
- if (message.channelId !== "") {
969
- obj.channelId = message.channelId;
970
- }
971
- if (message.sequence !== 0) {
972
- obj.sequence = Math.round(message.sequence);
973
- }
974
- if (message.data.length !== 0) {
975
- obj.data = base64FromBytes(message.data);
976
- }
977
- return obj;
978
- },
979
-
980
- create<I extends Exact<DeepPartial<PacketState>, I>>(base?: I): PacketState {
981
- return PacketState.fromPartial(base ?? ({} as any));
982
- },
983
- fromPartial<I extends Exact<DeepPartial<PacketState>, I>>(object: I): PacketState {
984
- const message = createBasePacketState();
985
- message.portId = object.portId ?? "";
986
- message.channelId = object.channelId ?? "";
987
- message.sequence = object.sequence ?? 0;
988
- message.data = object.data ?? new Uint8Array(0);
989
- return message;
990
- },
991
- };
992
-
993
- function createBasePacketId(): PacketId {
994
- return { portId: "", channelId: "", sequence: 0 };
995
- }
996
-
997
- export const PacketId: MessageFns<PacketId> = {
998
- encode(message: PacketId, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
999
- if (message.portId !== "") {
1000
- writer.uint32(10).string(message.portId);
1001
- }
1002
- if (message.channelId !== "") {
1003
- writer.uint32(18).string(message.channelId);
1004
- }
1005
- if (message.sequence !== 0) {
1006
- writer.uint32(24).uint64(message.sequence);
1007
- }
1008
- return writer;
1009
- },
1010
-
1011
- decode(input: BinaryReader | Uint8Array, length?: number): PacketId {
1012
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1013
- let end = length === undefined ? reader.len : reader.pos + length;
1014
- const message = createBasePacketId();
1015
- while (reader.pos < end) {
1016
- const tag = reader.uint32();
1017
- switch (tag >>> 3) {
1018
- case 1: {
1019
- if (tag !== 10) {
1020
- break;
1021
- }
1022
-
1023
- message.portId = reader.string();
1024
- continue;
1025
- }
1026
- case 2: {
1027
- if (tag !== 18) {
1028
- break;
1029
- }
1030
-
1031
- message.channelId = reader.string();
1032
- continue;
1033
- }
1034
- case 3: {
1035
- if (tag !== 24) {
1036
- break;
1037
- }
1038
-
1039
- message.sequence = longToNumber(reader.uint64());
1040
- continue;
1041
- }
1042
- }
1043
- if ((tag & 7) === 4 || tag === 0) {
1044
- break;
1045
- }
1046
- reader.skip(tag & 7);
1047
- }
1048
- return message;
1049
- },
1050
-
1051
- fromJSON(object: any): PacketId {
1052
- return {
1053
- portId: isSet(object.portId) ? globalThis.String(object.portId) : "",
1054
- channelId: isSet(object.channelId) ? globalThis.String(object.channelId) : "",
1055
- sequence: isSet(object.sequence) ? globalThis.Number(object.sequence) : 0,
1056
- };
1057
- },
1058
-
1059
- toJSON(message: PacketId): unknown {
1060
- const obj: any = {};
1061
- if (message.portId !== "") {
1062
- obj.portId = message.portId;
1063
- }
1064
- if (message.channelId !== "") {
1065
- obj.channelId = message.channelId;
1066
- }
1067
- if (message.sequence !== 0) {
1068
- obj.sequence = Math.round(message.sequence);
1069
- }
1070
- return obj;
1071
- },
1072
-
1073
- create<I extends Exact<DeepPartial<PacketId>, I>>(base?: I): PacketId {
1074
- return PacketId.fromPartial(base ?? ({} as any));
1075
- },
1076
- fromPartial<I extends Exact<DeepPartial<PacketId>, I>>(object: I): PacketId {
1077
- const message = createBasePacketId();
1078
- message.portId = object.portId ?? "";
1079
- message.channelId = object.channelId ?? "";
1080
- message.sequence = object.sequence ?? 0;
1081
- return message;
1082
- },
1083
- };
1084
-
1085
- function createBaseAcknowledgement(): Acknowledgement {
1086
- return { result: undefined, error: undefined };
1087
- }
1088
-
1089
- export const Acknowledgement: MessageFns<Acknowledgement> = {
1090
- encode(message: Acknowledgement, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1091
- if (message.result !== undefined) {
1092
- writer.uint32(170).bytes(message.result);
1093
- }
1094
- if (message.error !== undefined) {
1095
- writer.uint32(178).string(message.error);
1096
- }
1097
- return writer;
1098
- },
1099
-
1100
- decode(input: BinaryReader | Uint8Array, length?: number): Acknowledgement {
1101
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1102
- let end = length === undefined ? reader.len : reader.pos + length;
1103
- const message = createBaseAcknowledgement();
1104
- while (reader.pos < end) {
1105
- const tag = reader.uint32();
1106
- switch (tag >>> 3) {
1107
- case 21: {
1108
- if (tag !== 170) {
1109
- break;
1110
- }
1111
-
1112
- message.result = reader.bytes();
1113
- continue;
1114
- }
1115
- case 22: {
1116
- if (tag !== 178) {
1117
- break;
1118
- }
1119
-
1120
- message.error = reader.string();
1121
- continue;
1122
- }
1123
- }
1124
- if ((tag & 7) === 4 || tag === 0) {
1125
- break;
1126
- }
1127
- reader.skip(tag & 7);
1128
- }
1129
- return message;
1130
- },
1131
-
1132
- fromJSON(object: any): Acknowledgement {
1133
- return {
1134
- result: isSet(object.result) ? bytesFromBase64(object.result) : undefined,
1135
- error: isSet(object.error) ? globalThis.String(object.error) : undefined,
1136
- };
1137
- },
1138
-
1139
- toJSON(message: Acknowledgement): unknown {
1140
- const obj: any = {};
1141
- if (message.result !== undefined) {
1142
- obj.result = base64FromBytes(message.result);
1143
- }
1144
- if (message.error !== undefined) {
1145
- obj.error = message.error;
1146
- }
1147
- return obj;
1148
- },
1149
-
1150
- create<I extends Exact<DeepPartial<Acknowledgement>, I>>(base?: I): Acknowledgement {
1151
- return Acknowledgement.fromPartial(base ?? ({} as any));
1152
- },
1153
- fromPartial<I extends Exact<DeepPartial<Acknowledgement>, I>>(object: I): Acknowledgement {
1154
- const message = createBaseAcknowledgement();
1155
- message.result = object.result ?? undefined;
1156
- message.error = object.error ?? undefined;
1157
- return message;
1158
- },
1159
- };
1160
-
1161
- function createBaseTimeout(): Timeout {
1162
- return { height: undefined, timestamp: 0 };
1163
- }
1164
-
1165
- export const Timeout: MessageFns<Timeout> = {
1166
- encode(message: Timeout, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1167
- if (message.height !== undefined) {
1168
- Height.encode(message.height, writer.uint32(10).fork()).join();
1169
- }
1170
- if (message.timestamp !== 0) {
1171
- writer.uint32(16).uint64(message.timestamp);
1172
- }
1173
- return writer;
1174
- },
1175
-
1176
- decode(input: BinaryReader | Uint8Array, length?: number): Timeout {
1177
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1178
- let end = length === undefined ? reader.len : reader.pos + length;
1179
- const message = createBaseTimeout();
1180
- while (reader.pos < end) {
1181
- const tag = reader.uint32();
1182
- switch (tag >>> 3) {
1183
- case 1: {
1184
- if (tag !== 10) {
1185
- break;
1186
- }
1187
-
1188
- message.height = Height.decode(reader, reader.uint32());
1189
- continue;
1190
- }
1191
- case 2: {
1192
- if (tag !== 16) {
1193
- break;
1194
- }
1195
-
1196
- message.timestamp = longToNumber(reader.uint64());
1197
- continue;
1198
- }
1199
- }
1200
- if ((tag & 7) === 4 || tag === 0) {
1201
- break;
1202
- }
1203
- reader.skip(tag & 7);
1204
- }
1205
- return message;
1206
- },
1207
-
1208
- fromJSON(object: any): Timeout {
1209
- return {
1210
- height: isSet(object.height) ? Height.fromJSON(object.height) : undefined,
1211
- timestamp: isSet(object.timestamp) ? globalThis.Number(object.timestamp) : 0,
1212
- };
1213
- },
1214
-
1215
- toJSON(message: Timeout): unknown {
1216
- const obj: any = {};
1217
- if (message.height !== undefined) {
1218
- obj.height = Height.toJSON(message.height);
1219
- }
1220
- if (message.timestamp !== 0) {
1221
- obj.timestamp = Math.round(message.timestamp);
1222
- }
1223
- return obj;
1224
- },
1225
-
1226
- create<I extends Exact<DeepPartial<Timeout>, I>>(base?: I): Timeout {
1227
- return Timeout.fromPartial(base ?? ({} as any));
1228
- },
1229
- fromPartial<I extends Exact<DeepPartial<Timeout>, I>>(object: I): Timeout {
1230
- const message = createBaseTimeout();
1231
- message.height = (object.height !== undefined && object.height !== null)
1232
- ? Height.fromPartial(object.height)
1233
- : undefined;
1234
- message.timestamp = object.timestamp ?? 0;
1235
- return message;
1236
- },
1237
- };
1238
-
1239
- function createBaseParams(): Params {
1240
- return { upgradeTimeout: undefined };
1241
- }
1242
-
1243
- export const Params: MessageFns<Params> = {
1244
- encode(message: Params, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1245
- if (message.upgradeTimeout !== undefined) {
1246
- Timeout.encode(message.upgradeTimeout, writer.uint32(10).fork()).join();
1247
- }
1248
- return writer;
1249
- },
1250
-
1251
- decode(input: BinaryReader | Uint8Array, length?: number): Params {
1252
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1253
- let end = length === undefined ? reader.len : reader.pos + length;
1254
- const message = createBaseParams();
1255
- while (reader.pos < end) {
1256
- const tag = reader.uint32();
1257
- switch (tag >>> 3) {
1258
- case 1: {
1259
- if (tag !== 10) {
1260
- break;
1261
- }
1262
-
1263
- message.upgradeTimeout = Timeout.decode(reader, reader.uint32());
1264
- continue;
1265
- }
1266
- }
1267
- if ((tag & 7) === 4 || tag === 0) {
1268
- break;
1269
- }
1270
- reader.skip(tag & 7);
1271
- }
1272
- return message;
1273
- },
1274
-
1275
- fromJSON(object: any): Params {
1276
- return { upgradeTimeout: isSet(object.upgradeTimeout) ? Timeout.fromJSON(object.upgradeTimeout) : undefined };
1277
- },
1278
-
1279
- toJSON(message: Params): unknown {
1280
- const obj: any = {};
1281
- if (message.upgradeTimeout !== undefined) {
1282
- obj.upgradeTimeout = Timeout.toJSON(message.upgradeTimeout);
1283
- }
1284
- return obj;
1285
- },
1286
-
1287
- create<I extends Exact<DeepPartial<Params>, I>>(base?: I): Params {
1288
- return Params.fromPartial(base ?? ({} as any));
1289
- },
1290
- fromPartial<I extends Exact<DeepPartial<Params>, I>>(object: I): Params {
1291
- const message = createBaseParams();
1292
- message.upgradeTimeout = (object.upgradeTimeout !== undefined && object.upgradeTimeout !== null)
1293
- ? Timeout.fromPartial(object.upgradeTimeout)
1294
- : undefined;
1295
- return message;
1296
- },
1297
- };
1298
-
1299
- function bytesFromBase64(b64: string): Uint8Array {
1300
- if ((globalThis as any).Buffer) {
1301
- return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
1302
- } else {
1303
- const bin = globalThis.atob(b64);
1304
- const arr = new Uint8Array(bin.length);
1305
- for (let i = 0; i < bin.length; ++i) {
1306
- arr[i] = bin.charCodeAt(i);
1307
- }
1308
- return arr;
1309
- }
1310
- }
1311
-
1312
- function base64FromBytes(arr: Uint8Array): string {
1313
- if ((globalThis as any).Buffer) {
1314
- return globalThis.Buffer.from(arr).toString("base64");
1315
- } else {
1316
- const bin: string[] = [];
1317
- arr.forEach((byte) => {
1318
- bin.push(globalThis.String.fromCharCode(byte));
1319
- });
1320
- return globalThis.btoa(bin.join(""));
1321
- }
1322
- }
1323
-
1324
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
1325
-
1326
- export type DeepPartial<T> = T extends Builtin ? T
1327
- : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
1328
- : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
1329
- : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
1330
- : Partial<T>;
1331
-
1332
- type KeysOfUnion<T> = T extends T ? keyof T : never;
1333
- export type Exact<P, I extends P> = P extends Builtin ? P
1334
- : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
1335
-
1336
- function longToNumber(int64: { toString(): string }): number {
1337
- const num = globalThis.Number(int64.toString());
1338
- if (num > globalThis.Number.MAX_SAFE_INTEGER) {
1339
- throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
1340
- }
1341
- if (num < globalThis.Number.MIN_SAFE_INTEGER) {
1342
- throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
1343
- }
1344
- return num;
1345
- }
1346
-
1347
- function isSet(value: any): boolean {
1348
- return value !== null && value !== undefined;
1349
- }
1350
-
1351
- export interface MessageFns<T> {
1352
- encode(message: T, writer?: BinaryWriter): BinaryWriter;
1353
- decode(input: BinaryReader | Uint8Array, length?: number): T;
1354
- fromJSON(object: any): T;
1355
- toJSON(message: T): unknown;
1356
- create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
1357
- fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
1358
- }