decentralcardgame-cardchain-client-ts 0.0.31 → 0.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (390) hide show
  1. package/lib/index.d.ts +78 -78
  2. package/lib/index.js +23 -23
  3. package/package.json +5 -2
  4. package/cardchain.cardchain/index.ts +0 -6
  5. package/cardchain.cardchain/module.ts +0 -1869
  6. package/cardchain.cardchain/registry.ts +0 -111
  7. package/cardchain.cardchain/rest.ts +0 -655
  8. package/cardchain.cardchain/types.ts +0 -63
  9. package/cardchain.featureflag/index.ts +0 -6
  10. package/cardchain.featureflag/module.ts +0 -165
  11. package/cardchain.featureflag/registry.ts +0 -11
  12. package/cardchain.featureflag/rest.ts +0 -256
  13. package/cardchain.featureflag/types.ts +0 -9
  14. package/client.ts +0 -164
  15. package/cosmos.auth.v1beta1/index.ts +0 -6
  16. package/cosmos.auth.v1beta1/module.ts +0 -136
  17. package/cosmos.auth.v1beta1/registry.ts +0 -9
  18. package/cosmos.auth.v1beta1/rest.ts +0 -403
  19. package/cosmos.auth.v1beta1/types.ts +0 -13
  20. package/cosmos.authz.v1beta1/index.ts +0 -6
  21. package/cosmos.authz.v1beta1/module.ts +0 -206
  22. package/cosmos.authz.v1beta1/registry.ts +0 -13
  23. package/cosmos.authz.v1beta1/rest.ts +0 -256
  24. package/cosmos.authz.v1beta1/types.ts +0 -17
  25. package/cosmos.bank.v1beta1/index.ts +0 -6
  26. package/cosmos.bank.v1beta1/module.ts +0 -247
  27. package/cosmos.bank.v1beta1/registry.ts +0 -15
  28. package/cosmos.bank.v1beta1/rest.ts +0 -466
  29. package/cosmos.bank.v1beta1/types.ts +0 -25
  30. package/cosmos.base.node.v1beta1/index.ts +0 -6
  31. package/cosmos.base.node.v1beta1/module.ts +0 -95
  32. package/cosmos.base.node.v1beta1/registry.ts +0 -7
  33. package/cosmos.base.node.v1beta1/rest.ts +0 -235
  34. package/cosmos.base.node.v1beta1/types.ts +0 -5
  35. package/cosmos.base.tendermint.v1beta1/index.ts +0 -6
  36. package/cosmos.base.tendermint.v1beta1/module.ts +0 -109
  37. package/cosmos.base.tendermint.v1beta1/registry.ts +0 -7
  38. package/cosmos.base.tendermint.v1beta1/rest.ts +0 -340
  39. package/cosmos.base.tendermint.v1beta1/types.ts +0 -19
  40. package/cosmos.circuit.v1/index.ts +0 -6
  41. package/cosmos.circuit.v1/module.ts +0 -198
  42. package/cosmos.circuit.v1/registry.ts +0 -13
  43. package/cosmos.circuit.v1/rest.ts +0 -256
  44. package/cosmos.circuit.v1/types.ts +0 -9
  45. package/cosmos.consensus.v1/index.ts +0 -6
  46. package/cosmos.consensus.v1/module.ts +0 -128
  47. package/cosmos.consensus.v1/registry.ts +0 -9
  48. package/cosmos.consensus.v1/rest.ts +0 -214
  49. package/cosmos.consensus.v1/types.ts +0 -5
  50. package/cosmos.crisis.v1beta1/index.ts +0 -6
  51. package/cosmos.crisis.v1beta1/module.ts +0 -161
  52. package/cosmos.crisis.v1beta1/registry.ts +0 -11
  53. package/cosmos.crisis.v1beta1/rest.ts +0 -193
  54. package/cosmos.crisis.v1beta1/types.ts +0 -5
  55. package/cosmos.distribution.v1beta1/index.ts +0 -6
  56. package/cosmos.distribution.v1beta1/module.ts +0 -364
  57. package/cosmos.distribution.v1beta1/registry.ts +0 -21
  58. package/cosmos.distribution.v1beta1/rest.ts +0 -403
  59. package/cosmos.distribution.v1beta1/types.ts +0 -43
  60. package/cosmos.evidence.v1beta1/index.ts +0 -6
  61. package/cosmos.evidence.v1beta1/module.ts +0 -130
  62. package/cosmos.evidence.v1beta1/registry.ts +0 -9
  63. package/cosmos.evidence.v1beta1/rest.ts +0 -235
  64. package/cosmos.evidence.v1beta1/types.ts +0 -7
  65. package/cosmos.feegrant.v1beta1/index.ts +0 -6
  66. package/cosmos.feegrant.v1beta1/module.ts +0 -202
  67. package/cosmos.feegrant.v1beta1/registry.ts +0 -13
  68. package/cosmos.feegrant.v1beta1/rest.ts +0 -256
  69. package/cosmos.feegrant.v1beta1/types.ts +0 -13
  70. package/cosmos.gov.v1/index.ts +0 -6
  71. package/cosmos.gov.v1/module.ts +0 -344
  72. package/cosmos.gov.v1/registry.ts +0 -21
  73. package/cosmos.gov.v1/rest.ts +0 -382
  74. package/cosmos.gov.v1/types.ts +0 -23
  75. package/cosmos.gov.v1beta1/index.ts +0 -6
  76. package/cosmos.gov.v1beta1/module.ts +0 -245
  77. package/cosmos.gov.v1beta1/registry.ts +0 -15
  78. package/cosmos.gov.v1beta1/rest.ts +0 -361
  79. package/cosmos.gov.v1beta1/types.ts +0 -23
  80. package/cosmos.group.v1/index.ts +0 -6
  81. package/cosmos.group.v1/module.ts +0 -599
  82. package/cosmos.group.v1/registry.ts +0 -35
  83. package/cosmos.group.v1/rest.ts +0 -487
  84. package/cosmos.group.v1/types.ts +0 -47
  85. package/cosmos.mint.v1beta1/index.ts +0 -6
  86. package/cosmos.mint.v1beta1/module.ts +0 -132
  87. package/cosmos.mint.v1beta1/registry.ts +0 -9
  88. package/cosmos.mint.v1beta1/rest.ts +0 -256
  89. package/cosmos.mint.v1beta1/types.ts +0 -9
  90. package/cosmos.nft.v1beta1/index.ts +0 -6
  91. package/cosmos.nft.v1beta1/module.ts +0 -140
  92. package/cosmos.nft.v1beta1/registry.ts +0 -9
  93. package/cosmos.nft.v1beta1/rest.ts +0 -340
  94. package/cosmos.nft.v1beta1/types.ts +0 -17
  95. package/cosmos.params.v1beta1/index.ts +0 -6
  96. package/cosmos.params.v1beta1/module.ts +0 -101
  97. package/cosmos.params.v1beta1/registry.ts +0 -7
  98. package/cosmos.params.v1beta1/rest.ts +0 -235
  99. package/cosmos.params.v1beta1/types.ts +0 -11
  100. package/cosmos.slashing.v1beta1/index.ts +0 -6
  101. package/cosmos.slashing.v1beta1/module.ts +0 -171
  102. package/cosmos.slashing.v1beta1/registry.ts +0 -11
  103. package/cosmos.slashing.v1beta1/rest.ts +0 -256
  104. package/cosmos.slashing.v1beta1/types.ts +0 -15
  105. package/cosmos.staking.v1beta1/index.ts +0 -6
  106. package/cosmos.staking.v1beta1/module.ts +0 -374
  107. package/cosmos.staking.v1beta1/registry.ts +0 -21
  108. package/cosmos.staking.v1beta1/rest.ts +0 -487
  109. package/cosmos.staking.v1beta1/types.ts +0 -53
  110. package/cosmos.tx.v1beta1/index.ts +0 -6
  111. package/cosmos.tx.v1beta1/module.ts +0 -121
  112. package/cosmos.tx.v1beta1/registry.ts +0 -7
  113. package/cosmos.tx.v1beta1/rest.ts +0 -382
  114. package/cosmos.tx.v1beta1/types.ts +0 -31
  115. package/cosmos.upgrade.v1beta1/index.ts +0 -6
  116. package/cosmos.upgrade.v1beta1/module.ts +0 -169
  117. package/cosmos.upgrade.v1beta1/registry.ts +0 -11
  118. package/cosmos.upgrade.v1beta1/rest.ts +0 -298
  119. package/cosmos.upgrade.v1beta1/types.ts +0 -13
  120. package/cosmos.vesting.v1beta1/index.ts +0 -6
  121. package/cosmos.vesting.v1beta1/module.ts +0 -206
  122. package/cosmos.vesting.v1beta1/registry.ts +0 -13
  123. package/cosmos.vesting.v1beta1/rest.ts +0 -193
  124. package/cosmos.vesting.v1beta1/types.ts +0 -17
  125. package/env.ts +0 -7
  126. package/helpers.ts +0 -32
  127. package/ibc.applications.fee.v1/index.ts +0 -6
  128. package/ibc.applications.fee.v1/module.ts +0 -247
  129. package/ibc.applications.fee.v1/registry.ts +0 -15
  130. package/ibc.applications.fee.v1/rest.ts +0 -403
  131. package/ibc.applications.fee.v1/types.ts +0 -25
  132. package/ibc.applications.interchain_accounts.controller.v1/index.ts +0 -6
  133. package/ibc.applications.interchain_accounts.controller.v1/module.ts +0 -196
  134. package/ibc.applications.interchain_accounts.controller.v1/registry.ts +0 -13
  135. package/ibc.applications.interchain_accounts.controller.v1/rest.ts +0 -235
  136. package/ibc.applications.interchain_accounts.controller.v1/types.ts +0 -7
  137. package/ibc.applications.interchain_accounts.host.v1/index.ts +0 -6
  138. package/ibc.applications.interchain_accounts.host.v1/module.ts +0 -165
  139. package/ibc.applications.interchain_accounts.host.v1/registry.ts +0 -11
  140. package/ibc.applications.interchain_accounts.host.v1/rest.ts +0 -214
  141. package/ibc.applications.interchain_accounts.host.v1/types.ts +0 -9
  142. package/ibc.applications.transfer.v1/index.ts +0 -6
  143. package/ibc.applications.transfer.v1/module.ts +0 -169
  144. package/ibc.applications.transfer.v1/registry.ts +0 -11
  145. package/ibc.applications.transfer.v1/rest.ts +0 -319
  146. package/ibc.applications.transfer.v1/types.ts +0 -13
  147. package/ibc.core.channel.v1/index.ts +0 -6
  148. package/ibc.core.channel.v1/module.ts +0 -748
  149. package/ibc.core.channel.v1/registry.ts +0 -45
  150. package/ibc.core.channel.v1/rest.ts +0 -550
  151. package/ibc.core.channel.v1/types.ts +0 -31
  152. package/ibc.core.client.v1/index.ts +0 -6
  153. package/ibc.core.client.v1/module.ts +0 -344
  154. package/ibc.core.client.v1/registry.ts +0 -21
  155. package/ibc.core.client.v1/rest.ts +0 -403
  156. package/ibc.core.client.v1/types.ts +0 -23
  157. package/ibc.core.connection.v1/index.ts +0 -6
  158. package/ibc.core.connection.v1/module.ts +0 -274
  159. package/ibc.core.connection.v1/registry.ts +0 -17
  160. package/ibc.core.connection.v1/rest.ts +0 -319
  161. package/ibc.core.connection.v1/types.ts +0 -19
  162. package/index.ts +0 -81
  163. package/modules.ts +0 -5
  164. package/tsconfig.json +0 -13
  165. package/types/amino/amino.ts +0 -9
  166. package/types/capability/v1/capability.ts +0 -263
  167. package/types/capability/v1/genesis.ts +0 -220
  168. package/types/cardchain/cardchain/card.ts +0 -712
  169. package/types/cardchain/cardchain/card_content.ts +0 -116
  170. package/types/cardchain/cardchain/card_with_image.ts +0 -134
  171. package/types/cardchain/cardchain/council.ts +0 -502
  172. package/types/cardchain/cardchain/encounter.ts +0 -307
  173. package/types/cardchain/cardchain/encounter_with_image.ts +0 -119
  174. package/types/cardchain/cardchain/genesis.ts +0 -403
  175. package/types/cardchain/cardchain/image.ts +0 -122
  176. package/types/cardchain/cardchain/match.ts +0 -453
  177. package/types/cardchain/cardchain/module/module.ts +0 -99
  178. package/types/cardchain/cardchain/params.ts +0 -544
  179. package/types/cardchain/cardchain/query.ts +0 -3786
  180. package/types/cardchain/cardchain/running_average.ts +0 -116
  181. package/types/cardchain/cardchain/sell_offer.ts +0 -224
  182. package/types/cardchain/cardchain/server.ts +0 -144
  183. package/types/cardchain/cardchain/set.ts +0 -537
  184. package/types/cardchain/cardchain/set_with_artwork.ts +0 -142
  185. package/types/cardchain/cardchain/tx.ts +0 -8053
  186. package/types/cardchain/cardchain/user.ts +0 -955
  187. package/types/cardchain/cardchain/voting.ts +0 -328
  188. package/types/cardchain/cardchain/voting_results.ts +0 -227
  189. package/types/cardchain/cardchain/zealy.ts +0 -116
  190. package/types/cardchain/featureflag/flag.ts +0 -133
  191. package/types/cardchain/featureflag/genesis.ts +0 -226
  192. package/types/cardchain/featureflag/module/module.ts +0 -99
  193. package/types/cardchain/featureflag/params.ts +0 -78
  194. package/types/cardchain/featureflag/query.ts +0 -445
  195. package/types/cardchain/featureflag/tx.ts +0 -373
  196. package/types/cosmos/app/runtime/v1alpha1/module.ts +0 -389
  197. package/types/cosmos/app/v1alpha1/config.ts +0 -346
  198. package/types/cosmos/app/v1alpha1/module.ts +0 -348
  199. package/types/cosmos/app/v1alpha1/query.ts +0 -175
  200. package/types/cosmos/auth/module/v1/module.ts +0 -229
  201. package/types/cosmos/auth/v1beta1/auth.ts +0 -531
  202. package/types/cosmos/auth/v1beta1/genesis.ts +0 -125
  203. package/types/cosmos/auth/v1beta1/query.ts +0 -1564
  204. package/types/cosmos/auth/v1beta1/tx.ts +0 -213
  205. package/types/cosmos/authz/module/v1/module.ts +0 -78
  206. package/types/cosmos/authz/v1beta1/authz.ts +0 -411
  207. package/types/cosmos/authz/v1beta1/event.ts +0 -241
  208. package/types/cosmos/authz/v1beta1/genesis.ts +0 -101
  209. package/types/cosmos/authz/v1beta1/query.ts +0 -643
  210. package/types/cosmos/authz/v1beta1/tx.ts +0 -574
  211. package/types/cosmos/autocli/v1/options.ts +0 -1049
  212. package/types/cosmos/autocli/v1/query.ts +0 -291
  213. package/types/cosmos/bank/module/v1/module.ts +0 -150
  214. package/types/cosmos/bank/v1beta1/authz.ts +0 -129
  215. package/types/cosmos/bank/v1beta1/bank.ts +0 -775
  216. package/types/cosmos/bank/v1beta1/genesis.ts +0 -277
  217. package/types/cosmos/bank/v1beta1/query.ts +0 -2424
  218. package/types/cosmos/bank/v1beta1/tx.ts +0 -697
  219. package/types/cosmos/base/abci/v1beta1/abci.ts +0 -1469
  220. package/types/cosmos/base/node/v1beta1/query.ts +0 -485
  221. package/types/cosmos/base/query/v1beta1/pagination.ts +0 -336
  222. package/types/cosmos/base/reflection/v1beta1/reflection.ts +0 -328
  223. package/types/cosmos/base/reflection/v2alpha1/reflection.ts +0 -2092
  224. package/types/cosmos/base/tendermint/v1beta1/query.ts +0 -2025
  225. package/types/cosmos/base/tendermint/v1beta1/types.ts +0 -548
  226. package/types/cosmos/base/v1beta1/coin.ts +0 -209
  227. package/types/cosmos/circuit/module/v1/module.ts +0 -99
  228. package/types/cosmos/circuit/v1/query.ts +0 -476
  229. package/types/cosmos/circuit/v1/tx.ts +0 -576
  230. package/types/cosmos/circuit/v1/types.ts +0 -362
  231. package/types/cosmos/consensus/module/v1/module.ts +0 -99
  232. package/types/cosmos/consensus/v1/query.ts +0 -181
  233. package/types/cosmos/consensus/v1/tx.ts +0 -271
  234. package/types/cosmos/crisis/module/v1/module.ts +0 -119
  235. package/types/cosmos/crisis/v1beta1/genesis.ts +0 -105
  236. package/types/cosmos/crisis/v1beta1/tx.ts +0 -367
  237. package/types/cosmos/crypto/ed25519/keys.ts +0 -195
  238. package/types/cosmos/crypto/hd/v1/hd.ts +0 -178
  239. package/types/cosmos/crypto/keyring/v1/record.ts +0 -440
  240. package/types/cosmos/crypto/multisig/keys.ts +0 -124
  241. package/types/cosmos/crypto/multisig/v1beta1/multisig.ts +0 -218
  242. package/types/cosmos/crypto/secp256k1/keys.ts +0 -192
  243. package/types/cosmos/crypto/secp256r1/keys.ts +0 -193
  244. package/types/cosmos/distribution/module/v1/module.ts +0 -118
  245. package/types/cosmos/distribution/v1beta1/distribution.ts +0 -1177
  246. package/types/cosmos/distribution/v1beta1/genesis.ts +0 -1028
  247. package/types/cosmos/distribution/v1beta1/query.ts +0 -1700
  248. package/types/cosmos/distribution/v1beta1/tx.ts +0 -1178
  249. package/types/cosmos/evidence/module/v1/module.ts +0 -78
  250. package/types/cosmos/evidence/v1beta1/evidence.ts +0 -194
  251. package/types/cosmos/evidence/v1beta1/genesis.ts +0 -98
  252. package/types/cosmos/evidence/v1beta1/query.ts +0 -414
  253. package/types/cosmos/evidence/v1beta1/tx.ts +0 -243
  254. package/types/cosmos/feegrant/module/v1/module.ts +0 -78
  255. package/types/cosmos/feegrant/v1beta1/feegrant.ts +0 -513
  256. package/types/cosmos/feegrant/v1beta1/genesis.ts +0 -101
  257. package/types/cosmos/feegrant/v1beta1/query.ts +0 -597
  258. package/types/cosmos/feegrant/v1beta1/tx.ts +0 -496
  259. package/types/cosmos/genutil/module/v1/module.ts +0 -78
  260. package/types/cosmos/genutil/v1beta1/genesis.ts +0 -122
  261. package/types/cosmos/gov/module/v1/module.ts +0 -133
  262. package/types/cosmos/gov/v1/genesis.ts +0 -313
  263. package/types/cosmos/gov/v1/gov.ts +0 -1712
  264. package/types/cosmos/gov/v1/query.ts +0 -1605
  265. package/types/cosmos/gov/v1/tx.ts +0 -1387
  266. package/types/cosmos/gov/v1beta1/genesis.ts +0 -241
  267. package/types/cosmos/gov/v1beta1/gov.ts +0 -1273
  268. package/types/cosmos/gov/v1beta1/query.ts +0 -1441
  269. package/types/cosmos/gov/v1beta1/tx.ts +0 -738
  270. package/types/cosmos/group/module/v1/module.ts +0 -141
  271. package/types/cosmos/group/v1/events.ts +0 -795
  272. package/types/cosmos/group/v1/genesis.ts +0 -265
  273. package/types/cosmos/group/v1/query.ts +0 -2441
  274. package/types/cosmos/group/v1/tx.ts +0 -2631
  275. package/types/cosmos/group/v1/types.ts +0 -1850
  276. package/types/cosmos/ics23/v1/proofs.ts +0 -1731
  277. package/types/cosmos/mint/module/v1/module.ts +0 -118
  278. package/types/cosmos/mint/v1beta1/genesis.ts +0 -126
  279. package/types/cosmos/mint/v1beta1/mint.ts +0 -293
  280. package/types/cosmos/mint/v1beta1/query.ts +0 -453
  281. package/types/cosmos/mint/v1beta1/tx.ts +0 -213
  282. package/types/cosmos/msg/textual/v1/textual.ts +0 -9
  283. package/types/cosmos/msg/v1/msg.ts +0 -9
  284. package/types/cosmos/nft/module/v1/module.ts +0 -78
  285. package/types/cosmos/nft/v1beta1/event.ts +0 -359
  286. package/types/cosmos/nft/v1beta1/genesis.ts +0 -204
  287. package/types/cosmos/nft/v1beta1/nft.ts +0 -348
  288. package/types/cosmos/nft/v1beta1/query.ts +0 -1173
  289. package/types/cosmos/nft/v1beta1/tx.ts +0 -228
  290. package/types/cosmos/orm/module/v1alpha1/module.ts +0 -82
  291. package/types/cosmos/orm/query/v1alpha1/query.ts +0 -933
  292. package/types/cosmos/orm/v1/orm.ts +0 -453
  293. package/types/cosmos/orm/v1alpha1/schema.ts +0 -321
  294. package/types/cosmos/params/module/v1/module.ts +0 -78
  295. package/types/cosmos/params/v1beta1/params.ts +0 -236
  296. package/types/cosmos/params/v1beta1/query.ts +0 -439
  297. package/types/cosmos/query/v1/query.ts +0 -9
  298. package/types/cosmos/reflection/v1/reflection.ts +0 -179
  299. package/types/cosmos/slashing/module/v1/module.ts +0 -99
  300. package/types/cosmos/slashing/v1beta1/genesis.ts +0 -424
  301. package/types/cosmos/slashing/v1beta1/query.ts +0 -487
  302. package/types/cosmos/slashing/v1beta1/slashing.ts +0 -422
  303. package/types/cosmos/slashing/v1beta1/tx.ts +0 -336
  304. package/types/cosmos/staking/module/v1/module.ts +0 -161
  305. package/types/cosmos/staking/v1beta1/authz.ts +0 -306
  306. package/types/cosmos/staking/v1beta1/genesis.ts +0 -377
  307. package/types/cosmos/staking/v1beta1/query.ts +0 -2540
  308. package/types/cosmos/staking/v1beta1/staking.ts +0 -2576
  309. package/types/cosmos/staking/v1beta1/tx.ts +0 -1433
  310. package/types/cosmos/store/internal/kv/v1beta1/kv.ts +0 -205
  311. package/types/cosmos/store/snapshots/v1/snapshot.ts +0 -746
  312. package/types/cosmos/store/streaming/abci/grpc.ts +0 -367
  313. package/types/cosmos/store/v1beta1/commit_info.ts +0 -370
  314. package/types/cosmos/store/v1beta1/listening.ts +0 -301
  315. package/types/cosmos/tx/config/v1/config.ts +0 -125
  316. package/types/cosmos/tx/signing/v1beta1/signing.ts +0 -630
  317. package/types/cosmos/tx/v1beta1/service.ts +0 -1889
  318. package/types/cosmos/tx/v1beta1/tx.ts +0 -1657
  319. package/types/cosmos/upgrade/module/v1/module.ts +0 -99
  320. package/types/cosmos/upgrade/v1beta1/query.ts +0 -819
  321. package/types/cosmos/upgrade/v1beta1/tx.ts +0 -340
  322. package/types/cosmos/upgrade/v1beta1/upgrade.ts +0 -525
  323. package/types/cosmos/vesting/module/v1/module.ts +0 -78
  324. package/types/cosmos/vesting/v1beta1/tx.ts +0 -640
  325. package/types/cosmos/vesting/v1beta1/vesting.ts +0 -624
  326. package/types/cosmos_proto/cosmos.ts +0 -307
  327. package/types/gogoproto/gogo.ts +0 -9
  328. package/types/google/api/annotations.ts +0 -9
  329. package/types/google/api/http.ts +0 -770
  330. package/types/google/protobuf/any.ts +0 -259
  331. package/types/google/protobuf/descriptor.ts +0 -6642
  332. package/types/google/protobuf/duration.ts +0 -200
  333. package/types/google/protobuf/timestamp.ts +0 -229
  334. package/types/ibc/applications/fee/v1/ack.ts +0 -166
  335. package/types/ibc/applications/fee/v1/fee.ts +0 -403
  336. package/types/ibc/applications/fee/v1/genesis.ts +0 -571
  337. package/types/ibc/applications/fee/v1/metadata.ts +0 -122
  338. package/types/ibc/applications/fee/v1/query.ts +0 -1757
  339. package/types/ibc/applications/fee/v1/tx.ts +0 -781
  340. package/types/ibc/applications/interchain_accounts/controller/v1/controller.ts +0 -104
  341. package/types/ibc/applications/interchain_accounts/controller/v1/query.ts +0 -333
  342. package/types/ibc/applications/interchain_accounts/controller/v1/tx.ts +0 -619
  343. package/types/ibc/applications/interchain_accounts/genesis/v1/genesis.ts +0 -590
  344. package/types/ibc/applications/interchain_accounts/host/v1/host.ts +0 -242
  345. package/types/ibc/applications/interchain_accounts/host/v1/query.ts +0 -175
  346. package/types/ibc/applications/interchain_accounts/host/v1/tx.ts +0 -416
  347. package/types/ibc/applications/interchain_accounts/v1/account.ts +0 -120
  348. package/types/ibc/applications/interchain_accounts/v1/metadata.ts +0 -199
  349. package/types/ibc/applications/interchain_accounts/v1/packet.ts +0 -264
  350. package/types/ibc/applications/transfer/v1/authz.ts +0 -254
  351. package/types/ibc/applications/transfer/v1/genesis.ts +0 -165
  352. package/types/ibc/applications/transfer/v1/query.ts +0 -934
  353. package/types/ibc/applications/transfer/v1/transfer.ts +0 -220
  354. package/types/ibc/applications/transfer/v1/tx.ts +0 -505
  355. package/types/ibc/applications/transfer/v2/packet.ts +0 -177
  356. package/types/ibc/core/channel/v1/channel.ts +0 -1358
  357. package/types/ibc/core/channel/v1/genesis.ts +0 -377
  358. package/types/ibc/core/channel/v1/query.ts +0 -3781
  359. package/types/ibc/core/channel/v1/tx.ts +0 -4424
  360. package/types/ibc/core/channel/v1/upgrade.ts +0 -348
  361. package/types/ibc/core/client/v1/client.ts +0 -753
  362. package/types/ibc/core/client/v1/genesis.ts +0 -423
  363. package/types/ibc/core/client/v1/query.ts +0 -1898
  364. package/types/ibc/core/client/v1/tx.ts +0 -1301
  365. package/types/ibc/core/commitment/v1/commitment.ts +0 -336
  366. package/types/ibc/core/connection/v1/connection.ts +0 -840
  367. package/types/ibc/core/connection/v1/genesis.ts +0 -172
  368. package/types/ibc/core/connection/v1/query.ts +0 -1243
  369. package/types/ibc/core/connection/v1/tx.ts +0 -1352
  370. package/types/ibc/core/types/v1/genesis.ts +0 -150
  371. package/types/ibc/lightclients/localhost/v2/localhost.ts +0 -102
  372. package/types/ibc/lightclients/solomachine/v2/solomachine.ts +0 -1765
  373. package/types/ibc/lightclients/solomachine/v3/solomachine.ts +0 -945
  374. package/types/ibc/lightclients/tendermint/v1/tendermint.ts +0 -853
  375. package/types/ibc/lightclients/wasm/v1/genesis.ts +0 -192
  376. package/types/ibc/lightclients/wasm/v1/query.ts +0 -377
  377. package/types/ibc/lightclients/wasm/v1/tx.ts +0 -550
  378. package/types/ibc/lightclients/wasm/v1/wasm.ts +0 -370
  379. package/types/tendermint/abci/types.ts +0 -6103
  380. package/types/tendermint/crypto/keys.ts +0 -142
  381. package/types/tendermint/crypto/proof.ts +0 -533
  382. package/types/tendermint/libs/bits/types.ts +0 -139
  383. package/types/tendermint/p2p/types.ts +0 -544
  384. package/types/tendermint/types/block.ts +0 -158
  385. package/types/tendermint/types/evidence.ts +0 -502
  386. package/types/tendermint/types/params.ts +0 -701
  387. package/types/tendermint/types/types.ts +0 -2133
  388. package/types/tendermint/types/validator.ts +0 -424
  389. package/types/tendermint/version/types.ts +0 -218
  390. package/types.d.ts +0 -21
@@ -1,382 +0,0 @@
1
- import axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse, ResponseType } from "axios";
2
- import { QueryConstitutionResponse } from "../types/cosmos/gov/v1/query";
3
- import { QueryProposalResponse } from "../types/cosmos/gov/v1/query";
4
- import { QueryProposalsResponse } from "../types/cosmos/gov/v1/query";
5
- import { QueryVoteResponse } from "../types/cosmos/gov/v1/query";
6
- import { QueryVotesResponse } from "../types/cosmos/gov/v1/query";
7
- import { QueryParamsResponse } from "../types/cosmos/gov/v1/query";
8
- import { QueryDepositResponse } from "../types/cosmos/gov/v1/query";
9
- import { QueryDepositsResponse } from "../types/cosmos/gov/v1/query";
10
- import { QueryTallyResultResponse } from "../types/cosmos/gov/v1/query";
11
-
12
- import { QueryConstitutionRequest } from "../types/cosmos/gov/v1/query";
13
- import { QueryProposalRequest } from "../types/cosmos/gov/v1/query";
14
- import { QueryProposalsRequest } from "../types/cosmos/gov/v1/query";
15
- import { QueryVoteRequest } from "../types/cosmos/gov/v1/query";
16
- import { QueryVotesRequest } from "../types/cosmos/gov/v1/query";
17
- import { QueryParamsRequest } from "../types/cosmos/gov/v1/query";
18
- import { QueryDepositRequest } from "../types/cosmos/gov/v1/query";
19
- import { QueryDepositsRequest } from "../types/cosmos/gov/v1/query";
20
- import { QueryTallyResultRequest } from "../types/cosmos/gov/v1/query";
21
-
22
-
23
- import type {SnakeCasedPropertiesDeep} from 'type-fest';
24
-
25
- export type QueryParamsType = Record<string | number, any>;
26
-
27
- export type FlattenObject<TValue> = CollapseEntries<CreateObjectEntries<TValue, TValue>>;
28
-
29
- type Entry = { key: string; value: unknown };
30
- type EmptyEntry<TValue> = { key: ''; value: TValue };
31
- type ExcludedTypes = Date | Set<unknown> | Map<unknown, unknown>;
32
- type ArrayEncoder = `[${bigint}]`;
33
-
34
- type EscapeArrayKey<TKey extends string> = TKey extends `${infer TKeyBefore}.${ArrayEncoder}${infer TKeyAfter}`
35
- ? EscapeArrayKey<`${TKeyBefore}${ArrayEncoder}${TKeyAfter}`>
36
- : TKey;
37
-
38
- // Transforms entries to one flattened type
39
- type CollapseEntries<TEntry extends Entry> = {
40
- [E in TEntry as EscapeArrayKey<E['key']>]: E['value'];
41
- };
42
-
43
- // Transforms array type to object
44
- type CreateArrayEntry<TValue, TValueInitial> = OmitItself<
45
- TValue extends unknown[] ? { [k: ArrayEncoder]: TValue[number] } : TValue,
46
- TValueInitial
47
- >;
48
-
49
- // Omit the type that references itself
50
- type OmitItself<TValue, TValueInitial> = TValue extends TValueInitial
51
- ? EmptyEntry<TValue>
52
- : OmitExcludedTypes<TValue, TValueInitial>;
53
-
54
- // Omit the type that is listed in ExcludedTypes union
55
- type OmitExcludedTypes<TValue, TValueInitial> = TValue extends ExcludedTypes
56
- ? EmptyEntry<TValue>
57
- : CreateObjectEntries<TValue, TValueInitial>;
58
-
59
- type CreateObjectEntries<TValue, TValueInitial> = TValue extends object
60
- ? {
61
- // Checks that Key is of type string
62
- [TKey in keyof TValue]-?: TKey extends string
63
- ? // Nested key can be an object, run recursively to the bottom
64
- CreateArrayEntry<TValue[TKey], TValueInitial> extends infer TNestedValue
65
- ? TNestedValue extends Entry
66
- ? TNestedValue['key'] extends ''
67
- ? {
68
- key: TKey;
69
- value: TNestedValue['value'];
70
- }
71
- :
72
- | {
73
- key: `${TKey}.${TNestedValue['key']}`;
74
- value: TNestedValue['value'];
75
- }
76
- | {
77
- key: TKey;
78
- value: TValue[TKey];
79
- }
80
- : never
81
- : never
82
- : never;
83
- }[keyof TValue] // Builds entry for each key
84
- : EmptyEntry<TValue>;
85
-
86
- export type ChangeProtoToJSPrimitives<T extends object> = {
87
- [key in keyof T]: T[key] extends Uint8Array | Date ? string : T[key] extends object ? ChangeProtoToJSPrimitives<T[key]>: T[key];
88
- // ^^^^ This line is used to convert Uint8Array to string, if you want to keep Uint8Array as is, you can remove this line
89
- }
90
-
91
- export interface FullRequestParams extends Omit<AxiosRequestConfig, "data" | "params" | "url" | "responseType"> {
92
- /** set parameter to `true` for call `securityWorker` for this request */
93
- secure?: boolean;
94
- /** request path */
95
- path: string;
96
- /** content type of request body */
97
- type?: ContentType;
98
- /** query params */
99
- query?: QueryParamsType;
100
- /** format of response (i.e. response.json() -> format: "json") */
101
- format?: ResponseType;
102
- /** request body */
103
- body?: unknown;
104
- }
105
-
106
- export type RequestParams = Omit<FullRequestParams, "body" | "method" | "query" | "path">;
107
-
108
- export interface ApiConfig<SecurityDataType = unknown> extends Omit<AxiosRequestConfig, "data" | "cancelToken"> {
109
- securityWorker?: (
110
- securityData: SecurityDataType | null,
111
- ) => Promise<AxiosRequestConfig | void> | AxiosRequestConfig | void;
112
- secure?: boolean;
113
- format?: ResponseType;
114
- }
115
-
116
- export enum ContentType {
117
- Json = "application/json",
118
- FormData = "multipart/form-data",
119
- UrlEncoded = "application/x-www-form-urlencoded",
120
- }
121
-
122
- export class HttpClient<SecurityDataType = unknown> {
123
- public instance: AxiosInstance;
124
- private securityData: SecurityDataType | null = null;
125
- private securityWorker?: ApiConfig<SecurityDataType>["securityWorker"];
126
- private secure?: boolean;
127
- private format?: ResponseType;
128
-
129
- constructor({ securityWorker, secure, format, ...axiosConfig }: ApiConfig<SecurityDataType> = {}) {
130
- this.instance = axios.create({ ...axiosConfig, baseURL: axiosConfig.baseURL || "" });
131
- this.secure = secure;
132
- this.format = format;
133
- this.securityWorker = securityWorker;
134
- }
135
-
136
- public setSecurityData = (data: SecurityDataType | null) => {
137
- this.securityData = data;
138
- };
139
-
140
- private mergeRequestParams(params1: AxiosRequestConfig, params2?: AxiosRequestConfig): AxiosRequestConfig {
141
- return {
142
- ...this.instance.defaults,
143
- ...params1,
144
- ...(params2 || {}),
145
- headers: {
146
- ...(this.instance.defaults.headers ),
147
- ...(params1.headers || {}),
148
- ...((params2 && params2.headers) || {}),
149
- },
150
- } as AxiosRequestConfig;
151
- }
152
-
153
- private createFormData(input: Record<string, unknown>): FormData {
154
- return Object.keys(input || {}).reduce((formData, key) => {
155
- const property = input[key];
156
- formData.append(
157
- key,
158
- property instanceof Blob
159
- ? property
160
- : typeof property === "object" && property !== null
161
- ? JSON.stringify(property)
162
- : `${property}`,
163
- );
164
- return formData;
165
- }, new FormData());
166
- }
167
-
168
- public request = async <T = any>({
169
- secure,
170
- path,
171
- type,
172
- query,
173
- format,
174
- body,
175
- ...params
176
- }: FullRequestParams): Promise<AxiosResponse<T>> => {
177
- const secureParams =
178
- ((typeof secure === "boolean" ? secure : this.secure) &&
179
- this.securityWorker &&
180
- (await this.securityWorker(this.securityData))) ||
181
- {};
182
- const requestParams = this.mergeRequestParams(params, secureParams);
183
- const responseFormat = (format && this.format) || void 0;
184
-
185
- if (type === ContentType.FormData && body && body !== null && typeof body === "object") {
186
- requestParams.headers.common = { Accept: "*/*" };
187
- requestParams.headers.post = {};
188
- requestParams.headers.put = {};
189
-
190
- body = this.createFormData(body as Record<string, unknown>);
191
- }
192
-
193
- return this.instance.request({
194
- ...requestParams,
195
- headers: {
196
- ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}),
197
- ...(requestParams.headers || {}),
198
- },
199
- params: query,
200
- responseType: responseFormat,
201
- data: body,
202
- url: path,
203
- });
204
- };
205
- }
206
-
207
- /**
208
- * @title cosmos.gov.v1
209
- */
210
- export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
211
- /**
212
- * QueryConstitution
213
- *
214
- * @tags Query
215
- * @name queryConstitution
216
- * @request GET:/cosmos/gov/v1/constitution
217
- */
218
- queryConstitution = (
219
- query?: Record<string, any>,
220
- params: RequestParams = {},
221
- ) =>
222
- this.request<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryConstitutionResponse>>>({
223
- path: `/cosmos/gov/v1/constitution`,
224
- method: "GET",
225
- query: query,
226
- format: "json",
227
- ...params,
228
- });
229
-
230
- /**
231
- * QueryProposal
232
- *
233
- * @tags Query
234
- * @name queryProposal
235
- * @request GET:/cosmos/gov/v1/proposals/{proposal_id}
236
- */
237
- queryProposal = (proposal_id: string,
238
- query?: Record<string, any>,
239
- params: RequestParams = {},
240
- ) =>
241
- this.request<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryProposalResponse>>>({
242
- path: `/cosmos/gov/v1/proposals/${proposal_id}`,
243
- method: "GET",
244
- query: query,
245
- format: "json",
246
- ...params,
247
- });
248
-
249
- /**
250
- * QueryProposals
251
- *
252
- * @tags Query
253
- * @name queryProposals
254
- * @request GET:/cosmos/gov/v1/proposals
255
- */
256
- queryProposals = (
257
- query?: Omit<FlattenObject<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryProposalsRequest>>>,"">,
258
- params: RequestParams = {},
259
- ) =>
260
- this.request<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryProposalsResponse>>>({
261
- path: `/cosmos/gov/v1/proposals`,
262
- method: "GET",
263
- query: query,
264
- format: "json",
265
- ...params,
266
- });
267
-
268
- /**
269
- * QueryVote
270
- *
271
- * @tags Query
272
- * @name queryVote
273
- * @request GET:/cosmos/gov/v1/proposals/{proposal_id}/votes/{voter}
274
- */
275
- queryVote = (proposal_id: string, voter: string,
276
- query?: Record<string, any>,
277
- params: RequestParams = {},
278
- ) =>
279
- this.request<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryVoteResponse>>>({
280
- path: `/cosmos/gov/v1/proposals/${proposal_id}/votes/${voter}`,
281
- method: "GET",
282
- query: query,
283
- format: "json",
284
- ...params,
285
- });
286
-
287
- /**
288
- * QueryVotes
289
- *
290
- * @tags Query
291
- * @name queryVotes
292
- * @request GET:/cosmos/gov/v1/proposals/{proposal_id}/votes
293
- */
294
- queryVotes = (proposal_id: string,
295
- query?: Omit<FlattenObject<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryVotesRequest>>>,"proposal_id">,
296
- params: RequestParams = {},
297
- ) =>
298
- this.request<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryVotesResponse>>>({
299
- path: `/cosmos/gov/v1/proposals/${proposal_id}/votes`,
300
- method: "GET",
301
- query: query,
302
- format: "json",
303
- ...params,
304
- });
305
-
306
- /**
307
- * QueryParams
308
- *
309
- * @tags Query
310
- * @name queryParams
311
- * @request GET:/cosmos/gov/v1/params/{params_type}
312
- */
313
- queryParams = (params_type: string,
314
- query?: Record<string, any>,
315
- params: RequestParams = {},
316
- ) =>
317
- this.request<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryParamsResponse>>>({
318
- path: `/cosmos/gov/v1/params/${params_type}`,
319
- method: "GET",
320
- query: query,
321
- format: "json",
322
- ...params,
323
- });
324
-
325
- /**
326
- * QueryDeposit
327
- *
328
- * @tags Query
329
- * @name queryDeposit
330
- * @request GET:/cosmos/gov/v1/proposals/{proposal_id}/deposits/{depositor}
331
- */
332
- queryDeposit = (proposal_id: string, depositor: string,
333
- query?: Record<string, any>,
334
- params: RequestParams = {},
335
- ) =>
336
- this.request<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryDepositResponse>>>({
337
- path: `/cosmos/gov/v1/proposals/${proposal_id}/deposits/${depositor}`,
338
- method: "GET",
339
- query: query,
340
- format: "json",
341
- ...params,
342
- });
343
-
344
- /**
345
- * QueryDeposits
346
- *
347
- * @tags Query
348
- * @name queryDeposits
349
- * @request GET:/cosmos/gov/v1/proposals/{proposal_id}/deposits
350
- */
351
- queryDeposits = (proposal_id: string,
352
- query?: Omit<FlattenObject<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryDepositsRequest>>>,"proposal_id">,
353
- params: RequestParams = {},
354
- ) =>
355
- this.request<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryDepositsResponse>>>({
356
- path: `/cosmos/gov/v1/proposals/${proposal_id}/deposits`,
357
- method: "GET",
358
- query: query,
359
- format: "json",
360
- ...params,
361
- });
362
-
363
- /**
364
- * QueryTallyResult
365
- *
366
- * @tags Query
367
- * @name queryTallyResult
368
- * @request GET:/cosmos/gov/v1/proposals/{proposal_id}/tally
369
- */
370
- queryTallyResult = (proposal_id: string,
371
- query?: Record<string, any>,
372
- params: RequestParams = {},
373
- ) =>
374
- this.request<SnakeCasedPropertiesDeep<ChangeProtoToJSPrimitives<QueryTallyResultResponse>>>({
375
- path: `/cosmos/gov/v1/proposals/${proposal_id}/tally`,
376
- method: "GET",
377
- query: query,
378
- format: "json",
379
- ...params,
380
- });
381
-
382
- }
@@ -1,23 +0,0 @@
1
- import { WeightedVoteOption } from "../types/cosmos/gov/v1/gov"
2
- import { Deposit } from "../types/cosmos/gov/v1/gov"
3
- import { Proposal } from "../types/cosmos/gov/v1/gov"
4
- import { TallyResult } from "../types/cosmos/gov/v1/gov"
5
- import { Vote } from "../types/cosmos/gov/v1/gov"
6
- import { DepositParams } from "../types/cosmos/gov/v1/gov"
7
- import { VotingParams } from "../types/cosmos/gov/v1/gov"
8
- import { TallyParams } from "../types/cosmos/gov/v1/gov"
9
- import { Params } from "../types/cosmos/gov/v1/gov"
10
-
11
-
12
- export {
13
- WeightedVoteOption,
14
- Deposit,
15
- Proposal,
16
- TallyResult,
17
- Vote,
18
- DepositParams,
19
- VotingParams,
20
- TallyParams,
21
- Params,
22
-
23
- }
@@ -1,6 +0,0 @@
1
- import IgntModule from './module';
2
- import { txClient, queryClient, registry } from './module';
3
- import { msgTypes } from './registry';
4
-
5
- export * from "./types";
6
- export { IgntModule, msgTypes, txClient, queryClient, registry };
@@ -1,245 +0,0 @@
1
- // Generated by Ignite ignite.com/cli
2
-
3
- import { SigningStargateClient, DeliverTxResponse, StdFee } from "@cosmjs/stargate";
4
- import { EncodeObject, GeneratedType, OfflineSigner, Registry } from "@cosmjs/proto-signing";
5
- import { msgTypes } from './registry';
6
- import { IgniteClient } from "../client"
7
- import { MissingWalletError } from "../helpers"
8
- import { Api } from "./rest";
9
- import { MsgSubmitProposal } from "../types/cosmos/gov/v1beta1/tx";
10
- import { MsgVote } from "../types/cosmos/gov/v1beta1/tx";
11
- import { MsgVoteWeighted } from "../types/cosmos/gov/v1beta1/tx";
12
- import { MsgDeposit } from "../types/cosmos/gov/v1beta1/tx";
13
-
14
- import { WeightedVoteOption as typeWeightedVoteOption} from "./types"
15
- import { TextProposal as typeTextProposal} from "./types"
16
- import { Deposit as typeDeposit} from "./types"
17
- import { Proposal as typeProposal} from "./types"
18
- import { TallyResult as typeTallyResult} from "./types"
19
- import { Vote as typeVote} from "./types"
20
- import { DepositParams as typeDepositParams} from "./types"
21
- import { VotingParams as typeVotingParams} from "./types"
22
- import { TallyParams as typeTallyParams} from "./types"
23
-
24
- export { MsgSubmitProposal, MsgVote, MsgVoteWeighted, MsgDeposit };
25
-
26
- type sendMsgSubmitProposalParams = {
27
- value: MsgSubmitProposal,
28
- fee?: StdFee,
29
- memo?: string
30
- };
31
-
32
- type sendMsgVoteParams = {
33
- value: MsgVote,
34
- fee?: StdFee,
35
- memo?: string
36
- };
37
-
38
- type sendMsgVoteWeightedParams = {
39
- value: MsgVoteWeighted,
40
- fee?: StdFee,
41
- memo?: string
42
- };
43
-
44
- type sendMsgDepositParams = {
45
- value: MsgDeposit,
46
- fee?: StdFee,
47
- memo?: string
48
- };
49
-
50
-
51
- type msgSubmitProposalParams = {
52
- value: MsgSubmitProposal,
53
- };
54
-
55
- type msgVoteParams = {
56
- value: MsgVote,
57
- };
58
-
59
- type msgVoteWeightedParams = {
60
- value: MsgVoteWeighted,
61
- };
62
-
63
- type msgDepositParams = {
64
- value: MsgDeposit,
65
- };
66
-
67
-
68
- export const registry = new Registry(msgTypes);
69
-
70
- type Field = {
71
- name: string;
72
- type: unknown;
73
- }
74
- function getStructure(template) {
75
- const structure: {fields: Field[]} = { fields: [] }
76
- for (let [key, value] of Object.entries(template)) {
77
- let field = { name: key, type: typeof value }
78
- structure.fields.push(field)
79
- }
80
- return structure
81
- }
82
- const defaultFee = {
83
- amount: [],
84
- gas: "200000",
85
- };
86
-
87
- interface TxClientOptions {
88
- addr: string
89
- prefix: string
90
- signer?: OfflineSigner
91
- }
92
-
93
- export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "http://localhost:26657", prefix: "cosmos" }) => {
94
-
95
- return {
96
-
97
- async sendMsgSubmitProposal({ value, fee, memo }: sendMsgSubmitProposalParams): Promise<DeliverTxResponse> {
98
- if (!signer) {
99
- throw new Error('TxClient:sendMsgSubmitProposal: Unable to sign Tx. Signer is not present.')
100
- }
101
- try {
102
- const { address } = (await signer.getAccounts())[0];
103
- const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry});
104
- let msg = this.msgSubmitProposal({ value: MsgSubmitProposal.fromPartial(value) })
105
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
106
- } catch (e: any) {
107
- throw new Error('TxClient:sendMsgSubmitProposal: Could not broadcast Tx: '+ e.message)
108
- }
109
- },
110
-
111
- async sendMsgVote({ value, fee, memo }: sendMsgVoteParams): Promise<DeliverTxResponse> {
112
- if (!signer) {
113
- throw new Error('TxClient:sendMsgVote: Unable to sign Tx. Signer is not present.')
114
- }
115
- try {
116
- const { address } = (await signer.getAccounts())[0];
117
- const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry});
118
- let msg = this.msgVote({ value: MsgVote.fromPartial(value) })
119
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
120
- } catch (e: any) {
121
- throw new Error('TxClient:sendMsgVote: Could not broadcast Tx: '+ e.message)
122
- }
123
- },
124
-
125
- async sendMsgVoteWeighted({ value, fee, memo }: sendMsgVoteWeightedParams): Promise<DeliverTxResponse> {
126
- if (!signer) {
127
- throw new Error('TxClient:sendMsgVoteWeighted: Unable to sign Tx. Signer is not present.')
128
- }
129
- try {
130
- const { address } = (await signer.getAccounts())[0];
131
- const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry});
132
- let msg = this.msgVoteWeighted({ value: MsgVoteWeighted.fromPartial(value) })
133
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
134
- } catch (e: any) {
135
- throw new Error('TxClient:sendMsgVoteWeighted: Could not broadcast Tx: '+ e.message)
136
- }
137
- },
138
-
139
- async sendMsgDeposit({ value, fee, memo }: sendMsgDepositParams): Promise<DeliverTxResponse> {
140
- if (!signer) {
141
- throw new Error('TxClient:sendMsgDeposit: Unable to sign Tx. Signer is not present.')
142
- }
143
- try {
144
- const { address } = (await signer.getAccounts())[0];
145
- const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry});
146
- let msg = this.msgDeposit({ value: MsgDeposit.fromPartial(value) })
147
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
148
- } catch (e: any) {
149
- throw new Error('TxClient:sendMsgDeposit: Could not broadcast Tx: '+ e.message)
150
- }
151
- },
152
-
153
-
154
- msgSubmitProposal({ value }: msgSubmitProposalParams): EncodeObject {
155
- try {
156
- return { typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal", value: MsgSubmitProposal.fromPartial( value ) }
157
- } catch (e: any) {
158
- throw new Error('TxClient:MsgSubmitProposal: Could not create message: ' + e.message)
159
- }
160
- },
161
-
162
- msgVote({ value }: msgVoteParams): EncodeObject {
163
- try {
164
- return { typeUrl: "/cosmos.gov.v1beta1.MsgVote", value: MsgVote.fromPartial( value ) }
165
- } catch (e: any) {
166
- throw new Error('TxClient:MsgVote: Could not create message: ' + e.message)
167
- }
168
- },
169
-
170
- msgVoteWeighted({ value }: msgVoteWeightedParams): EncodeObject {
171
- try {
172
- return { typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeighted", value: MsgVoteWeighted.fromPartial( value ) }
173
- } catch (e: any) {
174
- throw new Error('TxClient:MsgVoteWeighted: Could not create message: ' + e.message)
175
- }
176
- },
177
-
178
- msgDeposit({ value }: msgDepositParams): EncodeObject {
179
- try {
180
- return { typeUrl: "/cosmos.gov.v1beta1.MsgDeposit", value: MsgDeposit.fromPartial( value ) }
181
- } catch (e: any) {
182
- throw new Error('TxClient:MsgDeposit: Could not create message: ' + e.message)
183
- }
184
- },
185
-
186
- }
187
- };
188
-
189
- interface QueryClientOptions {
190
- addr: string
191
- }
192
-
193
- export const queryClient = ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => {
194
- return new Api({ baseURL: addr });
195
- };
196
-
197
- class SDKModule {
198
- public query: ReturnType<typeof queryClient>;
199
- public tx: ReturnType<typeof txClient>;
200
- public structure: Record<string,unknown>;
201
- public registry: Array<[string, GeneratedType]> = [];
202
-
203
- constructor(client: IgniteClient) {
204
-
205
- this.query = queryClient({ addr: client.env.apiURL });
206
- this.updateTX(client);
207
- this.structure = {
208
- WeightedVoteOption: getStructure(typeWeightedVoteOption.fromPartial({})),
209
- TextProposal: getStructure(typeTextProposal.fromPartial({})),
210
- Deposit: getStructure(typeDeposit.fromPartial({})),
211
- Proposal: getStructure(typeProposal.fromPartial({})),
212
- TallyResult: getStructure(typeTallyResult.fromPartial({})),
213
- Vote: getStructure(typeVote.fromPartial({})),
214
- DepositParams: getStructure(typeDepositParams.fromPartial({})),
215
- VotingParams: getStructure(typeVotingParams.fromPartial({})),
216
- TallyParams: getStructure(typeTallyParams.fromPartial({})),
217
-
218
- };
219
- client.on('signer-changed',(signer) => {
220
- this.updateTX(client);
221
- })
222
- }
223
- updateTX(client: IgniteClient) {
224
- const methods = txClient({
225
- signer: client.signer,
226
- addr: client.env.rpcURL,
227
- prefix: client.env.prefix ?? "cosmos",
228
- })
229
-
230
- this.tx = methods;
231
- for (let m in methods) {
232
- this.tx[m] = methods[m].bind(this.tx);
233
- }
234
- }
235
- };
236
-
237
- const IgntModule = (test: IgniteClient) => {
238
- return {
239
- module: {
240
- CosmosGovV_1Beta_1: new SDKModule(test)
241
- },
242
- registry: msgTypes
243
- }
244
- }
245
- export default IgntModule;
@@ -1,15 +0,0 @@
1
- import { GeneratedType } from "@cosmjs/proto-signing";
2
- import { MsgSubmitProposal } from "../types/cosmos/gov/v1beta1/tx";
3
- import { MsgVote } from "../types/cosmos/gov/v1beta1/tx";
4
- import { MsgVoteWeighted } from "../types/cosmos/gov/v1beta1/tx";
5
- import { MsgDeposit } from "../types/cosmos/gov/v1beta1/tx";
6
-
7
- const msgTypes: Array<[string, GeneratedType]> = [
8
- ["/cosmos.gov.v1beta1.MsgSubmitProposal", MsgSubmitProposal],
9
- ["/cosmos.gov.v1beta1.MsgVote", MsgVote],
10
- ["/cosmos.gov.v1beta1.MsgVoteWeighted", MsgVoteWeighted],
11
- ["/cosmos.gov.v1beta1.MsgDeposit", MsgDeposit],
12
-
13
- ];
14
-
15
- export { msgTypes }