@initia/initia.js 1.0.20 → 2.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (696) hide show
  1. package/README.md +232 -154
  2. package/dist/abi-helpers-DdwdqhMQ.mjs +51 -0
  3. package/dist/abi-helpers-DdwdqhMQ.mjs.map +1 -0
  4. package/dist/address-DwAkzgJk.mjs +156 -0
  5. package/dist/address-DwAkzgJk.mjs.map +1 -0
  6. package/dist/address-profile-DjdaEBxo.d.mts +112 -0
  7. package/dist/address-profile-DlAFvgdg.mjs +241 -0
  8. package/dist/address-profile-DlAFvgdg.mjs.map +1 -0
  9. package/dist/amino-CMQN7Frn.mjs +220 -0
  10. package/dist/amino-CMQN7Frn.mjs.map +1 -0
  11. package/dist/amino_pb-Bi6YDY_U.mjs +88 -0
  12. package/dist/amino_pb-Bi6YDY_U.mjs.map +1 -0
  13. package/dist/amount-B0J9TTNF.mjs +90 -0
  14. package/dist/amount-B0J9TTNF.mjs.map +1 -0
  15. package/dist/any-DElm7qF7.mjs +19 -0
  16. package/dist/any-DElm7qF7.mjs.map +1 -0
  17. package/dist/auth_pb-DN4URGLh.mjs +26 -0
  18. package/dist/auth_pb-DN4URGLh.mjs.map +1 -0
  19. package/dist/auth_pb-DfXfdvrY.mjs +16 -0
  20. package/dist/auth_pb-DfXfdvrY.mjs.map +1 -0
  21. package/dist/base-provider-CLnd7kte.d.mts +68 -0
  22. package/dist/base-provider-LNp6K7Mt.mjs +96 -0
  23. package/dist/base-provider-LNp6K7Mt.mjs.map +1 -0
  24. package/dist/bcs-DiRcL4n9.mjs +533 -0
  25. package/dist/bcs-DiRcL4n9.mjs.map +1 -0
  26. package/dist/bridge-DL-q-7P7.mjs +1222 -0
  27. package/dist/bridge-DL-q-7P7.mjs.map +1 -0
  28. package/dist/bridge-cQoOjppA.d.mts +606 -0
  29. package/dist/broadcast-De8MdmYa.mjs +974 -0
  30. package/dist/broadcast-De8MdmYa.mjs.map +1 -0
  31. package/dist/chain-utils-C61cU5nd.mjs +139 -0
  32. package/dist/chain-utils-C61cU5nd.mjs.map +1 -0
  33. package/dist/codegen/cli.d.mts +1 -0
  34. package/dist/codegen/cli.mjs +274 -0
  35. package/dist/codegen/cli.mjs.map +1 -0
  36. package/dist/coin-DPWbtAFA.mjs +543 -0
  37. package/dist/coin-DPWbtAFA.mjs.map +1 -0
  38. package/dist/coin_pb--WuIu4sX.mjs +25 -0
  39. package/dist/coin_pb--WuIu4sX.mjs.map +1 -0
  40. package/dist/composite-provider-DbxNrdny.mjs +203 -0
  41. package/dist/composite-provider-DbxNrdny.mjs.map +1 -0
  42. package/dist/constants-W6V0E-3W.mjs +42 -0
  43. package/dist/constants-W6V0E-3W.mjs.map +1 -0
  44. package/dist/contract-Dpvu4wLO.mjs +657 -0
  45. package/dist/contract-Dpvu4wLO.mjs.map +1 -0
  46. package/dist/cosmos-Bqh8qNfP.mjs +540 -0
  47. package/dist/cosmos-Bqh8qNfP.mjs.map +1 -0
  48. package/dist/cosmos-registry-provider-DCrEEhJ-.d.mts +123 -0
  49. package/dist/cw20-BTpdgMXC.mjs +63 -0
  50. package/dist/cw20-BTpdgMXC.mjs.map +1 -0
  51. package/dist/decode-CXGawqIZ.mjs +29 -0
  52. package/dist/decode-CXGawqIZ.mjs.map +1 -0
  53. package/dist/entry.bridge.browser.d.mts +21 -0
  54. package/dist/entry.bridge.browser.mjs +25 -0
  55. package/dist/entry.bridge.browser.mjs.map +1 -0
  56. package/dist/entry.bridge.node.d.mts +21 -0
  57. package/dist/entry.bridge.node.mjs +25 -0
  58. package/dist/entry.bridge.node.mjs.map +1 -0
  59. package/dist/entry.browser.d.mts +49 -0
  60. package/dist/entry.browser.mjs +46 -0
  61. package/dist/entry.browser.mjs.map +1 -0
  62. package/dist/entry.chain.initia.browser.d.mts +8 -0
  63. package/dist/entry.chain.initia.browser.mjs +17 -0
  64. package/dist/entry.chain.initia.browser.mjs.map +1 -0
  65. package/dist/entry.chain.initia.node.d.mts +8 -0
  66. package/dist/entry.chain.initia.node.mjs +17 -0
  67. package/dist/entry.chain.initia.node.mjs.map +1 -0
  68. package/dist/entry.chain.minievm.browser.d.mts +8 -0
  69. package/dist/entry.chain.minievm.browser.mjs +17 -0
  70. package/dist/entry.chain.minievm.browser.mjs.map +1 -0
  71. package/dist/entry.chain.minievm.node.d.mts +8 -0
  72. package/dist/entry.chain.minievm.node.mjs +17 -0
  73. package/dist/entry.chain.minievm.node.mjs.map +1 -0
  74. package/dist/entry.chain.minimove.browser.d.mts +8 -0
  75. package/dist/entry.chain.minimove.browser.mjs +17 -0
  76. package/dist/entry.chain.minimove.browser.mjs.map +1 -0
  77. package/dist/entry.chain.minimove.node.d.mts +8 -0
  78. package/dist/entry.chain.minimove.node.mjs +17 -0
  79. package/dist/entry.chain.minimove.node.mjs.map +1 -0
  80. package/dist/entry.chain.miniwasm.browser.d.mts +8 -0
  81. package/dist/entry.chain.miniwasm.browser.mjs +17 -0
  82. package/dist/entry.chain.miniwasm.browser.mjs.map +1 -0
  83. package/dist/entry.chain.miniwasm.node.d.mts +8 -0
  84. package/dist/entry.chain.miniwasm.node.mjs +17 -0
  85. package/dist/entry.chain.miniwasm.node.mjs.map +1 -0
  86. package/dist/entry.client.browser-CQsfUmx1.d.mts +1 -0
  87. package/dist/entry.client.browser.d.mts +3 -0
  88. package/dist/entry.client.browser.mjs +6 -0
  89. package/dist/entry.client.node.d.mts +3 -0
  90. package/dist/entry.client.node.mjs +6 -0
  91. package/dist/entry.codegen.d.mts +251 -0
  92. package/dist/entry.codegen.mjs +2 -0
  93. package/dist/entry.cosmos.d.mts +2 -0
  94. package/dist/entry.cosmos.mjs +355 -0
  95. package/dist/entry.cosmos.mjs.map +1 -0
  96. package/dist/entry.events.d.mts +338 -0
  97. package/dist/entry.events.mjs +383 -0
  98. package/dist/entry.events.mjs.map +1 -0
  99. package/dist/entry.evm.d.mts +544 -0
  100. package/dist/entry.evm.mjs +761 -0
  101. package/dist/entry.evm.mjs.map +1 -0
  102. package/dist/entry.modules.d.mts +2 -0
  103. package/dist/entry.modules.mjs +7 -0
  104. package/dist/entry.move.d.mts +523 -0
  105. package/dist/entry.move.mjs +7 -0
  106. package/dist/entry.msgs.d.mts +2 -0
  107. package/dist/entry.msgs.mjs +3 -0
  108. package/dist/entry.node.d.mts +118 -0
  109. package/dist/entry.node.mjs +278 -0
  110. package/dist/entry.node.mjs.map +1 -0
  111. package/dist/entry.provider.d.mts +355 -0
  112. package/dist/entry.provider.mjs +416 -0
  113. package/dist/entry.provider.mjs.map +1 -0
  114. package/dist/entry.signer.d.mts +2 -0
  115. package/dist/entry.signer.mjs +674 -0
  116. package/dist/entry.signer.mjs.map +1 -0
  117. package/dist/entry.tx.d.mts +2 -0
  118. package/dist/entry.tx.mjs +6 -0
  119. package/dist/entry.usernames.d.mts +42 -0
  120. package/dist/entry.usernames.mjs +2 -0
  121. package/dist/entry.util.d.mts +103 -0
  122. package/dist/entry.util.mjs +70 -0
  123. package/dist/entry.util.mjs.map +1 -0
  124. package/dist/entry.vip.d.mts +1917 -0
  125. package/dist/entry.vip.mjs +3793 -0
  126. package/dist/entry.vip.mjs.map +1 -0
  127. package/dist/entry.wasm.d.mts +447 -0
  128. package/dist/entry.wasm.mjs +600 -0
  129. package/dist/entry.wasm.mjs.map +1 -0
  130. package/dist/erc20-CDs3j7vt.mjs +168 -0
  131. package/dist/erc20-CDs3j7vt.mjs.map +1 -0
  132. package/dist/errors-CN1MFOLv.mjs +253 -0
  133. package/dist/errors-CN1MFOLv.mjs.map +1 -0
  134. package/dist/evm-rpc-BxpgXIAF.mjs +338 -0
  135. package/dist/evm-rpc-BxpgXIAF.mjs.map +1 -0
  136. package/dist/fetch-Bq_aay6V.mjs +55 -0
  137. package/dist/fetch-Bq_aay6V.mjs.map +1 -0
  138. package/dist/fungible-asset-aHBTYpoT.mjs +64 -0
  139. package/dist/fungible-asset-aHBTYpoT.mjs.map +1 -0
  140. package/dist/get-tx-0P40z_A4.mjs +99 -0
  141. package/dist/get-tx-0P40z_A4.mjs.map +1 -0
  142. package/dist/grpc-client-DGyZjGcT.mjs +254 -0
  143. package/dist/grpc-client-DGyZjGcT.mjs.map +1 -0
  144. package/dist/hash-D40mxOlF.mjs +14 -0
  145. package/dist/hash-D40mxOlF.mjs.map +1 -0
  146. package/dist/hash-Doo89wm3.d.mts +31 -0
  147. package/dist/headers-CMO7ia_D.mjs +83 -0
  148. package/dist/headers-CMO7ia_D.mjs.map +1 -0
  149. package/dist/http-client-BrdVurTg.mjs +40 -0
  150. package/dist/http-client-BrdVurTg.mjs.map +1 -0
  151. package/dist/initia-B8l_x6sT.mjs +426 -0
  152. package/dist/initia-B8l_x6sT.mjs.map +1 -0
  153. package/dist/initia-Cj4bZ1dR.mjs +26 -0
  154. package/dist/initia-Cj4bZ1dR.mjs.map +1 -0
  155. package/dist/json-CGak0DqP.mjs +41 -0
  156. package/dist/json-CGak0DqP.mjs.map +1 -0
  157. package/dist/minievm-BAnGHa00.mjs +39 -0
  158. package/dist/minievm-BAnGHa00.mjs.map +1 -0
  159. package/dist/minievm-DZ8AhnD8.mjs +61 -0
  160. package/dist/minievm-DZ8AhnD8.mjs.map +1 -0
  161. package/dist/minimove-B8U85g-_.mjs +23 -0
  162. package/dist/minimove-B8U85g-_.mjs.map +1 -0
  163. package/dist/minimove-BBXTyhIv.mjs +24 -0
  164. package/dist/minimove-BBXTyhIv.mjs.map +1 -0
  165. package/dist/miniwasm-CB0XfStg.mjs +50 -0
  166. package/dist/miniwasm-CB0XfStg.mjs.map +1 -0
  167. package/dist/miniwasm-QdyYzmQ1.mjs +139 -0
  168. package/dist/miniwasm-QdyYzmQ1.mjs.map +1 -0
  169. package/dist/move-BaCv0oRX.mjs +64 -0
  170. package/dist/move-BaCv0oRX.mjs.map +1 -0
  171. package/dist/msg_pb-DxYxctLM.mjs +11 -0
  172. package/dist/msg_pb-DxYxctLM.mjs.map +1 -0
  173. package/dist/pagination_pb-DlkDYAcN.mjs +18 -0
  174. package/dist/pagination_pb-DlkDYAcN.mjs.map +1 -0
  175. package/dist/public-key-DV-uGaUC.mjs +550 -0
  176. package/dist/public-key-DV-uGaUC.mjs.map +1 -0
  177. package/dist/query_pb-cZ3szo3y.mjs +20 -0
  178. package/dist/query_pb-cZ3szo3y.mjs.map +1 -0
  179. package/dist/registry-provider-NzblVZQr.mjs +368 -0
  180. package/dist/registry-provider-NzblVZQr.mjs.map +1 -0
  181. package/dist/resolve-DdtY7KDz.mjs +50 -0
  182. package/dist/resolve-DdtY7KDz.mjs.map +1 -0
  183. package/dist/rolldown-runtime-wcPFST8Q.mjs +13 -0
  184. package/dist/service-BaMjxPNo.mjs +412 -0
  185. package/dist/service-BaMjxPNo.mjs.map +1 -0
  186. package/dist/service-CVFxsMp_.d.mts +151 -0
  187. package/dist/service_pb-Be-O-2-c.mjs +121 -0
  188. package/dist/service_pb-Be-O-2-c.mjs.map +1 -0
  189. package/dist/sign-DqagxLcg.mjs +212 -0
  190. package/dist/sign-DqagxLcg.mjs.map +1 -0
  191. package/dist/transport-common-BsPYcFQl.mjs +182 -0
  192. package/dist/transport-common-BsPYcFQl.mjs.map +1 -0
  193. package/dist/transport.browser-CCUWv3ta.mjs +31 -0
  194. package/dist/transport.browser-CCUWv3ta.mjs.map +1 -0
  195. package/dist/transport.node-DXcJtCnx.mjs +33 -0
  196. package/dist/transport.node-DXcJtCnx.mjs.map +1 -0
  197. package/dist/tx_pb-BJzY8SXE.mjs +38 -0
  198. package/dist/tx_pb-BJzY8SXE.mjs.map +1 -0
  199. package/dist/tx_pb-BVCXH992.mjs +39 -0
  200. package/dist/tx_pb-BVCXH992.mjs.map +1 -0
  201. package/dist/tx_pb-CnFNMLIq.mjs +107 -0
  202. package/dist/tx_pb-CnFNMLIq.mjs.map +1 -0
  203. package/dist/tx_pb-DYspoJTt.mjs +50 -0
  204. package/dist/tx_pb-DYspoJTt.mjs.map +1 -0
  205. package/dist/tx_pb-u3CoQYge.mjs +79 -0
  206. package/dist/tx_pb-u3CoQYge.mjs.map +1 -0
  207. package/dist/typed-context-Cg0If0M9.mjs +118 -0
  208. package/dist/typed-context-Cg0If0M9.mjs.map +1 -0
  209. package/dist/types-CLfdsa48.mjs +41 -0
  210. package/dist/types-CLfdsa48.mjs.map +1 -0
  211. package/dist/types-CSS5rfW1.mjs +303 -0
  212. package/dist/types-CSS5rfW1.mjs.map +1 -0
  213. package/dist/types-DGrP9Ro_.d.mts +39609 -0
  214. package/dist/types_pb-CrjtO9sB.mjs +21 -0
  215. package/dist/types_pb-CrjtO9sB.mjs.map +1 -0
  216. package/dist/types_pb-K7pKBvcg.mjs +1433 -0
  217. package/dist/types_pb-K7pKBvcg.mjs.map +1 -0
  218. package/dist/utils-B2carKSi.mjs +2 -0
  219. package/dist/waiting-BigHYRNN.mjs +1081 -0
  220. package/dist/waiting-BigHYRNN.mjs.map +1 -0
  221. package/dist/wasm-DdunGtLM.mjs +396 -0
  222. package/dist/wasm-DdunGtLM.mjs.map +1 -0
  223. package/package.json +195 -66
  224. package/dist/client/WebSocketClient.d.ts +0 -30
  225. package/dist/client/index.d.ts +0 -5
  226. package/dist/client/rest/APIRequester.d.ts +0 -27
  227. package/dist/client/rest/RESTClient.d.ts +0 -48
  228. package/dist/client/rest/Wallet.d.ts +0 -26
  229. package/dist/client/rest/api/AuctionAPI.d.ts +0 -6
  230. package/dist/client/rest/api/AuthAPI.d.ts +0 -8
  231. package/dist/client/rest/api/AuthzAPI.d.ts +0 -8
  232. package/dist/client/rest/api/BankAPI.d.ts +0 -10
  233. package/dist/client/rest/api/BaseAPI.d.ts +0 -5
  234. package/dist/client/rest/api/DistributionAPI.d.ts +0 -35
  235. package/dist/client/rest/api/EvidenceAPI.d.ts +0 -7
  236. package/dist/client/rest/api/EvmAPI.d.ts +0 -44
  237. package/dist/client/rest/api/FeeGrantAPI.d.ts +0 -22
  238. package/dist/client/rest/api/ForwardingAPI.d.ts +0 -20
  239. package/dist/client/rest/api/GovAPI.d.ts +0 -12
  240. package/dist/client/rest/api/GroupAPI.d.ts +0 -19
  241. package/dist/client/rest/api/IbcAPI.d.ts +0 -48
  242. package/dist/client/rest/api/IbcHooksAPI.d.ts +0 -8
  243. package/dist/client/rest/api/IbcNftAPI.d.ts +0 -10
  244. package/dist/client/rest/api/IbcPermAPI.d.ts +0 -12
  245. package/dist/client/rest/api/IbcTransferAPI.d.ts +0 -10
  246. package/dist/client/rest/api/InterTxAPI.d.ts +0 -6
  247. package/dist/client/rest/api/MarketmapAPI.d.ts +0 -18
  248. package/dist/client/rest/api/MoveAPI.d.ts +0 -62
  249. package/dist/client/rest/api/MstakingAPI.d.ts +0 -28
  250. package/dist/client/rest/api/OpchildAPI.d.ts +0 -12
  251. package/dist/client/rest/api/OphostAPI.d.ts +0 -33
  252. package/dist/client/rest/api/OracleAPI.d.ts +0 -22
  253. package/dist/client/rest/api/RewardAPI.d.ts +0 -8
  254. package/dist/client/rest/api/SlashingAPI.d.ts +0 -8
  255. package/dist/client/rest/api/TendermintAPI.d.ts +0 -16
  256. package/dist/client/rest/api/TokenfactoryAPI.d.ts +0 -12
  257. package/dist/client/rest/api/TxAPI.d.ts +0 -190
  258. package/dist/client/rest/api/UpgradeAPI.d.ts +0 -18
  259. package/dist/client/rest/api/WasmAPI.d.ts +0 -78
  260. package/dist/client/rest/api/index.d.ts +0 -30
  261. package/dist/core/Block.d.ts +0 -55
  262. package/dist/core/Coin.d.ts +0 -40
  263. package/dist/core/Coins.d.ts +0 -43
  264. package/dist/core/Denom.d.ts +0 -1
  265. package/dist/core/Duration.d.ts +0 -19
  266. package/dist/core/Msg.d.ts +0 -45
  267. package/dist/core/PublicKey.d.ts +0 -122
  268. package/dist/core/auction/AuctionParams.d.ts +0 -41
  269. package/dist/core/auction/index.d.ts +0 -2
  270. package/dist/core/auction/msgs/MsgAuctionBid.d.ts +0 -36
  271. package/dist/core/auction/msgs/MsgUpdateAuctionParams.d.ts +0 -33
  272. package/dist/core/auction/msgs/index.d.ts +0 -10
  273. package/dist/core/auth/Account.d.ts +0 -12
  274. package/dist/core/auth/AuthParams.d.ts +0 -37
  275. package/dist/core/auth/BaseAccount.d.ts +0 -45
  276. package/dist/core/auth/ModuleAccount.d.ts +0 -39
  277. package/dist/core/auth/index.d.ts +0 -5
  278. package/dist/core/auth/msgs/MsgUpdateAuthParams.d.ts +0 -33
  279. package/dist/core/auth/msgs/index.d.ts +0 -8
  280. package/dist/core/authz/authorizations/Authorization.d.ts +0 -41
  281. package/dist/core/authz/authorizations/ExecuteAuthorization.d.ts +0 -54
  282. package/dist/core/authz/authorizations/GenericAuthorization.d.ts +0 -28
  283. package/dist/core/authz/authorizations/PublishAuthorization.d.ts +0 -28
  284. package/dist/core/authz/authorizations/SendAuthorization.d.ts +0 -33
  285. package/dist/core/authz/authorizations/StakeAuthorization.d.ts +0 -60
  286. package/dist/core/authz/authorizations/index.d.ts +0 -6
  287. package/dist/core/authz/index.d.ts +0 -2
  288. package/dist/core/authz/msgs/MsgExecAuthorized.d.ts +0 -33
  289. package/dist/core/authz/msgs/MsgGrantAuthorization.d.ts +0 -36
  290. package/dist/core/authz/msgs/MsgRevokeAuthorization.d.ts +0 -35
  291. package/dist/core/authz/msgs/index.d.ts +0 -12
  292. package/dist/core/bank/BankParams.d.ts +0 -29
  293. package/dist/core/bank/DenomMetadata.d.ts +0 -43
  294. package/dist/core/bank/DenomUnit.d.ts +0 -28
  295. package/dist/core/bank/SendEnabled.d.ts +0 -25
  296. package/dist/core/bank/index.d.ts +0 -5
  297. package/dist/core/bank/msgs/MsgMultiSend.d.ts +0 -78
  298. package/dist/core/bank/msgs/MsgSend.d.ts +0 -36
  299. package/dist/core/bank/msgs/MsgSetDenomMetadata.d.ts +0 -33
  300. package/dist/core/bank/msgs/MsgSetSendEnabled.d.ts +0 -37
  301. package/dist/core/bank/msgs/MsgUpdateBankParams.d.ts +0 -33
  302. package/dist/core/bank/msgs/index.d.ts +0 -16
  303. package/dist/core/bech32.d.ts +0 -27
  304. package/dist/core/celestia/Blob.d.ts +0 -24
  305. package/dist/core/celestia/BlobTx.d.ts +0 -25
  306. package/dist/core/celestia/index.d.ts +0 -3
  307. package/dist/core/celestia/msgs/MsgPayForBlobs.d.ts +0 -31
  308. package/dist/core/celestia/msgs/index.d.ts +0 -7
  309. package/dist/core/consensus/ABCIParams.d.ts +0 -21
  310. package/dist/core/consensus/BlockParams.d.ts +0 -24
  311. package/dist/core/consensus/EvidenceParams.d.ts +0 -28
  312. package/dist/core/consensus/ValidatorParams.d.ts +0 -21
  313. package/dist/core/consensus/index.d.ts +0 -5
  314. package/dist/core/consensus/msgs/MsgUpdateConsensusParams.d.ts +0 -45
  315. package/dist/core/consensus/msgs/index.d.ts +0 -8
  316. package/dist/core/crisis/index.d.ts +0 -1
  317. package/dist/core/crisis/msgs/MsgUpdateCrisisParams.d.ts +0 -33
  318. package/dist/core/crisis/msgs/MsgVerifyInvariant.d.ts +0 -35
  319. package/dist/core/crisis/msgs/index.d.ts +0 -10
  320. package/dist/core/distribution/DistributionParams.d.ts +0 -32
  321. package/dist/core/distribution/RewardWeight.d.ts +0 -25
  322. package/dist/core/distribution/index.d.ts +0 -3
  323. package/dist/core/distribution/msgs/MsgCommunityPoolSpend.d.ts +0 -36
  324. package/dist/core/distribution/msgs/MsgDepositValidatorRewardsPool.d.ts +0 -40
  325. package/dist/core/distribution/msgs/MsgFundCommunityPool.d.ts +0 -33
  326. package/dist/core/distribution/msgs/MsgSetWithdrawAddress.d.ts +0 -32
  327. package/dist/core/distribution/msgs/MsgUpdateDistrParams.d.ts +0 -33
  328. package/dist/core/distribution/msgs/MsgWithdrawDelegatorReward.d.ts +0 -32
  329. package/dist/core/distribution/msgs/MsgWithdrawValidatorCommission.d.ts +0 -29
  330. package/dist/core/distribution/msgs/index.d.ts +0 -20
  331. package/dist/core/evidence/Equivocation.d.ts +0 -38
  332. package/dist/core/evidence/Evidence.d.ts +0 -11
  333. package/dist/core/evidence/index.d.ts +0 -3
  334. package/dist/core/evidence/msgs/MsgSubmitEvidence.d.ts +0 -33
  335. package/dist/core/evidence/msgs/index.d.ts +0 -8
  336. package/dist/core/evm/AccessTuple.d.ts +0 -25
  337. package/dist/core/evm/EvmParams.d.ts +0 -39
  338. package/dist/core/evm/index.d.ts +0 -3
  339. package/dist/core/evm/msgs/MsgCall.d.ts +0 -42
  340. package/dist/core/evm/msgs/MsgCreate.d.ts +0 -39
  341. package/dist/core/evm/msgs/MsgCreate2.d.ts +0 -42
  342. package/dist/core/evm/msgs/MsgUpdateEvmParams.d.ts +0 -33
  343. package/dist/core/evm/msgs/index.d.ts +0 -14
  344. package/dist/core/feegrant/allowances/AllowedMsgAllowance.d.ts +0 -33
  345. package/dist/core/feegrant/allowances/BasicAllowance.d.ts +0 -32
  346. package/dist/core/feegrant/allowances/PeriodicAllowance.d.ts +0 -43
  347. package/dist/core/feegrant/allowances/index.d.ts +0 -16
  348. package/dist/core/feegrant/index.d.ts +0 -2
  349. package/dist/core/feegrant/msgs/MsgGrantAllowance.d.ts +0 -36
  350. package/dist/core/feegrant/msgs/MsgRevokeAllowance.d.ts +0 -32
  351. package/dist/core/feegrant/msgs/index.d.ts +0 -10
  352. package/dist/core/forwarding/index.d.ts +0 -1
  353. package/dist/core/forwarding/msgs/MsgClearForwardingAccount.d.ts +0 -32
  354. package/dist/core/forwarding/msgs/MsgRegisterForwardingAccount.d.ts +0 -38
  355. package/dist/core/forwarding/msgs/index.d.ts +0 -10
  356. package/dist/core/gov/Deposit.d.ts +0 -29
  357. package/dist/core/gov/GovParams.d.ts +0 -82
  358. package/dist/core/gov/TallyResult.d.ts +0 -36
  359. package/dist/core/gov/Vesting.d.ts +0 -28
  360. package/dist/core/gov/Vote.d.ts +0 -55
  361. package/dist/core/gov/index.d.ts +0 -6
  362. package/dist/core/gov/msgs/MsgCancelProposal.d.ts +0 -32
  363. package/dist/core/gov/msgs/MsgDeposit.d.ts +0 -36
  364. package/dist/core/gov/msgs/MsgDepositLegacy.d.ts +0 -36
  365. package/dist/core/gov/msgs/MsgSubmitProposal.d.ts +0 -49
  366. package/dist/core/gov/msgs/MsgSubmitProposalLegacy.d.ts +0 -37
  367. package/dist/core/gov/msgs/MsgUpdateGovParams.d.ts +0 -33
  368. package/dist/core/gov/msgs/MsgVote.d.ts +0 -41
  369. package/dist/core/gov/msgs/MsgVoteLegacy.d.ts +0 -38
  370. package/dist/core/gov/msgs/MsgVoteWeighted.d.ts +0 -39
  371. package/dist/core/gov/msgs/MsgVoteWeightedLegacy.d.ts +0 -36
  372. package/dist/core/gov/msgs/index.d.ts +0 -26
  373. package/dist/core/gov/proposals/Content.d.ts +0 -12
  374. package/dist/core/gov/proposals/Proposal.d.ts +0 -79
  375. package/dist/core/gov/proposals/TextProposal.d.ts +0 -31
  376. package/dist/core/gov/proposals/index.d.ts +0 -3
  377. package/dist/core/group/GroupInfo.d.ts +0 -37
  378. package/dist/core/group/GroupMember.d.ts +0 -78
  379. package/dist/core/group/GroupPolicyInfo.d.ts +0 -41
  380. package/dist/core/group/GroupProposal.d.ts +0 -82
  381. package/dist/core/group/GroupVote.d.ts +0 -36
  382. package/dist/core/group/index.d.ts +0 -7
  383. package/dist/core/group/msgs/MsgCreateGroup.d.ts +0 -36
  384. package/dist/core/group/msgs/MsgCreateGroupPolicy.d.ts +0 -39
  385. package/dist/core/group/msgs/MsgCreateGroupWithPolicy.d.ts +0 -46
  386. package/dist/core/group/msgs/MsgGroupExec.d.ts +0 -32
  387. package/dist/core/group/msgs/MsgGroupVote.d.ts +0 -46
  388. package/dist/core/group/msgs/MsgLeaveGroup.d.ts +0 -32
  389. package/dist/core/group/msgs/MsgSubmitGroupProposal.d.ts +0 -50
  390. package/dist/core/group/msgs/MsgUpdateGroupAdmin.d.ts +0 -35
  391. package/dist/core/group/msgs/MsgUpdateGroupDecisionPolicy.d.ts +0 -36
  392. package/dist/core/group/msgs/MsgUpdateGroupMembers.d.ts +0 -36
  393. package/dist/core/group/msgs/MsgUpdateGroupMetadata.d.ts +0 -35
  394. package/dist/core/group/msgs/MsgUpdateGroupPolicyAdmin.d.ts +0 -35
  395. package/dist/core/group/msgs/MsgUpdateGroupPolicyMetadata.d.ts +0 -35
  396. package/dist/core/group/msgs/MsgWithdrawProposal.d.ts +0 -32
  397. package/dist/core/group/msgs/index.d.ts +0 -32
  398. package/dist/core/group/policies/DecisionPolicyWindows.d.ts +0 -25
  399. package/dist/core/group/policies/PercentageDecisionPolicy.d.ts +0 -32
  400. package/dist/core/group/policies/ThresholdDecisionPolicy.d.ts +0 -32
  401. package/dist/core/group/policies/index.d.ts +0 -15
  402. package/dist/core/ibc/applications/fee/IbcFee.d.ts +0 -28
  403. package/dist/core/ibc/applications/fee/IdentifiedPacketFee.d.ts +0 -26
  404. package/dist/core/ibc/applications/fee/Metadata.d.ts +0 -24
  405. package/dist/core/ibc/applications/fee/PacketFee.d.ts +0 -29
  406. package/dist/core/ibc/applications/fee/index.d.ts +0 -5
  407. package/dist/core/ibc/applications/fee/msgs/MsgPayPacketFee.d.ts +0 -31
  408. package/dist/core/ibc/applications/fee/msgs/MsgPayPacketFeeAsync.d.ts +0 -26
  409. package/dist/core/ibc/applications/fee/msgs/MsgRegisterCounterpartyPayee.d.ts +0 -28
  410. package/dist/core/ibc/applications/fee/msgs/MsgRegisterPayee.d.ts +0 -28
  411. package/dist/core/ibc/applications/fee/msgs/index.d.ts +0 -13
  412. package/dist/core/ibc/applications/index.d.ts +0 -4
  413. package/dist/core/ibc/applications/interchain-account/Account.d.ts +0 -25
  414. package/dist/core/ibc/applications/interchain-account/Metadata.d.ts +0 -36
  415. package/dist/core/ibc/applications/interchain-account/controller/Params.d.ts +0 -21
  416. package/dist/core/ibc/applications/interchain-account/host/Params.d.ts +0 -24
  417. package/dist/core/ibc/applications/interchain-account/index.d.ts +0 -4
  418. package/dist/core/ibc/applications/nft-transfer/IbcNftParams.d.ts +0 -28
  419. package/dist/core/ibc/applications/nft-transfer/NftClassTrace.d.ts +0 -24
  420. package/dist/core/ibc/applications/nft-transfer/NonFungibleTokenPacketData.d.ts +0 -45
  421. package/dist/core/ibc/applications/nft-transfer/index.d.ts +0 -4
  422. package/dist/core/ibc/applications/nft-transfer/msgs/MsgNftTransfer.d.ts +0 -54
  423. package/dist/core/ibc/applications/nft-transfer/msgs/MsgUpdateIbcNftParams.d.ts +0 -33
  424. package/dist/core/ibc/applications/nft-transfer/msgs/index.d.ts +0 -10
  425. package/dist/core/ibc/applications/perm/index.d.ts +0 -1
  426. package/dist/core/ibc/applications/perm/msgs/MsgUpdateIbcPermAdmin.d.ts +0 -38
  427. package/dist/core/ibc/applications/perm/msgs/MsgUpdatePermissionedRelayers.d.ts +0 -38
  428. package/dist/core/ibc/applications/perm/msgs/index.d.ts +0 -10
  429. package/dist/core/ibc/applications/transfer/DenomTrace.d.ts +0 -24
  430. package/dist/core/ibc/applications/transfer/FungibleTokenPacketData.d.ts +0 -33
  431. package/dist/core/ibc/applications/transfer/IbcTransferParams.d.ts +0 -24
  432. package/dist/core/ibc/applications/transfer/authorizations/Allocation.d.ts +0 -34
  433. package/dist/core/ibc/applications/transfer/authorizations/TransferAuthorization.d.ts +0 -23
  434. package/dist/core/ibc/applications/transfer/authorizations/index.d.ts +0 -2
  435. package/dist/core/ibc/applications/transfer/index.d.ts +0 -5
  436. package/dist/core/ibc/applications/transfer/msgs/MsgTransfer.d.ts +0 -52
  437. package/dist/core/ibc/applications/transfer/msgs/MsgUpdateIbcTransferParams.d.ts +0 -26
  438. package/dist/core/ibc/applications/transfer/msgs/index.d.ts +0 -10
  439. package/dist/core/ibc/core/channel/Channel.d.ts +0 -39
  440. package/dist/core/ibc/core/channel/ChannelCounterparty.d.ts +0 -24
  441. package/dist/core/ibc/core/channel/ChannelOrder.d.ts +0 -3
  442. package/dist/core/ibc/core/channel/ChannelState.d.ts +0 -3
  443. package/dist/core/ibc/core/channel/ErrorReceipt.d.ts +0 -20
  444. package/dist/core/ibc/core/channel/IbcChannelParams.d.ts +0 -22
  445. package/dist/core/ibc/core/channel/IdentifiedChannel.d.ts +0 -45
  446. package/dist/core/ibc/core/channel/Packet.d.ts +0 -43
  447. package/dist/core/ibc/core/channel/PacketId.d.ts +0 -27
  448. package/dist/core/ibc/core/channel/Timeout.d.ts +0 -25
  449. package/dist/core/ibc/core/channel/Upgrade.d.ts +0 -24
  450. package/dist/core/ibc/core/channel/UpgradeFields.d.ts +0 -23
  451. package/dist/core/ibc/core/channel/index.d.ts +0 -13
  452. package/dist/core/ibc/core/channel/msgs/MsgChannelCloseConfirm.d.ts +0 -32
  453. package/dist/core/ibc/core/channel/msgs/MsgChannelCloseInit.d.ts +0 -27
  454. package/dist/core/ibc/core/channel/msgs/MsgChannelOpenAck.d.ts +0 -36
  455. package/dist/core/ibc/core/channel/msgs/MsgChannelOpenConfirm.d.ts +0 -32
  456. package/dist/core/ibc/core/channel/msgs/MsgChannelOpenInit.d.ts +0 -28
  457. package/dist/core/ibc/core/channel/msgs/MsgChannelOpenTry.d.ts +0 -36
  458. package/dist/core/ibc/core/channel/msgs/MsgChannelUpgradeAck.d.ts +0 -37
  459. package/dist/core/ibc/core/channel/msgs/MsgChannelUpgradeCancel.d.ts +0 -35
  460. package/dist/core/ibc/core/channel/msgs/MsgChannelUpgradeConfirm.d.ts +0 -40
  461. package/dist/core/ibc/core/channel/msgs/MsgChannelUpgradeInit.d.ts +0 -30
  462. package/dist/core/ibc/core/channel/msgs/MsgChannelUpgradeOpen.d.ts +0 -37
  463. package/dist/core/ibc/core/channel/msgs/MsgChannelUpgradeTimeout.d.ts +0 -35
  464. package/dist/core/ibc/core/channel/msgs/MsgChannelUpgradeTry.d.ts +0 -41
  465. package/dist/core/ibc/core/channel/msgs/MsgRecvAcknowledgement.d.ts +0 -32
  466. package/dist/core/ibc/core/channel/msgs/MsgRecvPacket.d.ts +0 -30
  467. package/dist/core/ibc/core/channel/msgs/MsgTimeout.d.ts +0 -32
  468. package/dist/core/ibc/core/channel/msgs/MsgTimeoutClose.d.ts +0 -34
  469. package/dist/core/ibc/core/channel/msgs/MsgUpdateIbcChannelParams.d.ts +0 -26
  470. package/dist/core/ibc/core/channel/msgs/index.d.ts +0 -41
  471. package/dist/core/ibc/core/client/ClientConsensusStates.d.ts +0 -25
  472. package/dist/core/ibc/core/client/ConsensusStateWithHeight.d.ts +0 -25
  473. package/dist/core/ibc/core/client/Height.d.ts +0 -24
  474. package/dist/core/ibc/core/client/IbcClientParams.d.ts +0 -21
  475. package/dist/core/ibc/core/client/IdentifiedClient.d.ts +0 -24
  476. package/dist/core/ibc/core/client/index.d.ts +0 -6
  477. package/dist/core/ibc/core/client/msgs/MsgCreateClient.d.ts +0 -27
  478. package/dist/core/ibc/core/client/msgs/MsgIBCSoftwareUpgrade.d.ts +0 -28
  479. package/dist/core/ibc/core/client/msgs/MsgRecoverClient.d.ts +0 -27
  480. package/dist/core/ibc/core/client/msgs/MsgSubmitMisbehaviour.d.ts +0 -27
  481. package/dist/core/ibc/core/client/msgs/MsgUpdateClient.d.ts +0 -27
  482. package/dist/core/ibc/core/client/msgs/MsgUpdateIbcClientParams.d.ts +0 -26
  483. package/dist/core/ibc/core/client/msgs/MsgUpgradeClient.d.ts +0 -33
  484. package/dist/core/ibc/core/client/msgs/index.d.ts +0 -19
  485. package/dist/core/ibc/core/client/msgs/tendermint/crypto.d.ts +0 -43
  486. package/dist/core/ibc/core/client/msgs/tendermint/types.d.ts +0 -187
  487. package/dist/core/ibc/core/client/msgs/tendermint/version.d.ts +0 -38
  488. package/dist/core/ibc/core/commitment/MerklePrefix.d.ts +0 -21
  489. package/dist/core/ibc/core/commitment/MerkleRoot.d.ts +0 -21
  490. package/dist/core/ibc/core/commitment/index.d.ts +0 -2
  491. package/dist/core/ibc/core/connection/ConnectionCounterparty.d.ts +0 -28
  492. package/dist/core/ibc/core/connection/ConnectionState.d.ts +0 -3
  493. package/dist/core/ibc/core/connection/IbcConnectionParams.d.ts +0 -21
  494. package/dist/core/ibc/core/connection/IbcVersion.d.ts +0 -24
  495. package/dist/core/ibc/core/connection/IdentifiedConnection.d.ts +0 -39
  496. package/dist/core/ibc/core/connection/index.d.ts +0 -5
  497. package/dist/core/ibc/core/connection/msgs/MsgConnectionOpenAck.d.ts +0 -42
  498. package/dist/core/ibc/core/connection/msgs/MsgConnectionOpenConfirm.d.ts +0 -30
  499. package/dist/core/ibc/core/connection/msgs/MsgConnectionOpenInit.d.ts +0 -33
  500. package/dist/core/ibc/core/connection/msgs/MsgConnectionOpenTry.d.ts +0 -46
  501. package/dist/core/ibc/core/connection/msgs/MsgUpdateIbcConnectionParams.d.ts +0 -26
  502. package/dist/core/ibc/core/connection/msgs/index.d.ts +0 -15
  503. package/dist/core/ibc/core/index.d.ts +0 -4
  504. package/dist/core/ibc/index.d.ts +0 -2
  505. package/dist/core/ibc/lightclient/index.d.ts +0 -1
  506. package/dist/core/ibc/lightclient/tendermint/Header.d.ts +0 -29
  507. package/dist/core/ibchooks/ACL.d.ts +0 -25
  508. package/dist/core/ibchooks/IbcHooksParams.d.ts +0 -25
  509. package/dist/core/ibchooks/index.d.ts +0 -3
  510. package/dist/core/ibchooks/msgs/MsgUpdateACL.d.ts +0 -35
  511. package/dist/core/ibchooks/msgs/MsgUpdateIbcHooksParams.d.ts +0 -33
  512. package/dist/core/ibchooks/msgs/index.d.ts +0 -10
  513. package/dist/core/index.d.ts +0 -40
  514. package/dist/core/intertx/index.d.ts +0 -1
  515. package/dist/core/intertx/msgs/MsgRegisterAccount.d.ts +0 -39
  516. package/dist/core/intertx/msgs/MsgSubmitTx.d.ts +0 -36
  517. package/dist/core/intertx/msgs/index.d.ts +0 -10
  518. package/dist/core/marketmap/Market.d.ts +0 -26
  519. package/dist/core/marketmap/MarketmapParams.d.ts +0 -25
  520. package/dist/core/marketmap/ProviderConfig.d.ts +0 -34
  521. package/dist/core/marketmap/Ticker.d.ts +0 -34
  522. package/dist/core/marketmap/index.d.ts +0 -5
  523. package/dist/core/marketmap/msgs/MsgCreateMarkets.d.ts +0 -33
  524. package/dist/core/marketmap/msgs/MsgRemoveMarketAuthorities.d.ts +0 -32
  525. package/dist/core/marketmap/msgs/MsgRemoveMarkets.d.ts +0 -32
  526. package/dist/core/marketmap/msgs/MsgUpdateMarketmapParams.d.ts +0 -33
  527. package/dist/core/marketmap/msgs/MsgUpdateMarkets.d.ts +0 -33
  528. package/dist/core/marketmap/msgs/MsgUpsertMarkets.d.ts +0 -33
  529. package/dist/core/marketmap/msgs/index.d.ts +0 -18
  530. package/dist/core/move/Module.d.ts +0 -36
  531. package/dist/core/move/MoveParams.d.ts +0 -37
  532. package/dist/core/move/index.d.ts +0 -3
  533. package/dist/core/move/msgs/MsgDelist.d.ts +0 -32
  534. package/dist/core/move/msgs/MsgExecute.d.ts +0 -44
  535. package/dist/core/move/msgs/MsgExecuteJSON.d.ts +0 -44
  536. package/dist/core/move/msgs/MsgGovExecute.d.ts +0 -47
  537. package/dist/core/move/msgs/MsgGovExecuteJSON.d.ts +0 -47
  538. package/dist/core/move/msgs/MsgGovPublish.d.ts +0 -41
  539. package/dist/core/move/msgs/MsgGovScript.d.ts +0 -41
  540. package/dist/core/move/msgs/MsgGovScriptJSON.d.ts +0 -41
  541. package/dist/core/move/msgs/MsgPublish.d.ts +0 -38
  542. package/dist/core/move/msgs/MsgScript.d.ts +0 -38
  543. package/dist/core/move/msgs/MsgScriptJSON.d.ts +0 -38
  544. package/dist/core/move/msgs/MsgUpdateMoveParams.d.ts +0 -33
  545. package/dist/core/move/msgs/MsgWhitelist.d.ts +0 -35
  546. package/dist/core/move/msgs/index.d.ts +0 -32
  547. package/dist/core/mstaking/Delegation.d.ts +0 -36
  548. package/dist/core/mstaking/MstakingParams.d.ts +0 -44
  549. package/dist/core/mstaking/Redelegation.d.ts +0 -71
  550. package/dist/core/mstaking/UnbondingDelegation.d.ts +0 -57
  551. package/dist/core/mstaking/Validator.d.ts +0 -137
  552. package/dist/core/mstaking/index.d.ts +0 -6
  553. package/dist/core/mstaking/msgs/MsgBeginRedelegate.d.ts +0 -39
  554. package/dist/core/mstaking/msgs/MsgCancelUnbondingDelegation.d.ts +0 -39
  555. package/dist/core/mstaking/msgs/MsgCreateValidator.d.ts +0 -44
  556. package/dist/core/mstaking/msgs/MsgDelegate.d.ts +0 -36
  557. package/dist/core/mstaking/msgs/MsgEditValidator.d.ts +0 -37
  558. package/dist/core/mstaking/msgs/MsgUndelegate.d.ts +0 -36
  559. package/dist/core/mstaking/msgs/MsgUpdateMstakingParams.d.ts +0 -33
  560. package/dist/core/mstaking/msgs/index.d.ts +0 -20
  561. package/dist/core/num.d.ts +0 -2
  562. package/dist/core/opchild/BridgeInfo.d.ts +0 -34
  563. package/dist/core/opchild/OpValidator.d.ts +0 -32
  564. package/dist/core/opchild/OpchildParams.d.ts +0 -45
  565. package/dist/core/opchild/index.d.ts +0 -4
  566. package/dist/core/opchild/msgs/MsgAddBridgeExecutor.d.ts +0 -32
  567. package/dist/core/opchild/msgs/MsgAddFeeWhitelistAddresses.d.ts +0 -32
  568. package/dist/core/opchild/msgs/MsgAddValidator.d.ts +0 -39
  569. package/dist/core/opchild/msgs/MsgExecuteMessages.d.ts +0 -33
  570. package/dist/core/opchild/msgs/MsgFinalizeTokenDeposit.d.ts +0 -52
  571. package/dist/core/opchild/msgs/MsgInitiateTokenWithdrawal.d.ts +0 -36
  572. package/dist/core/opchild/msgs/MsgRemoveBridgeExecutor.d.ts +0 -32
  573. package/dist/core/opchild/msgs/MsgRemoveFeeWhitelistAddresses.d.ts +0 -32
  574. package/dist/core/opchild/msgs/MsgRemoveValidator.d.ts +0 -32
  575. package/dist/core/opchild/msgs/MsgSetBridgeInfo.d.ts +0 -33
  576. package/dist/core/opchild/msgs/MsgSpendFeePool.d.ts +0 -36
  577. package/dist/core/opchild/msgs/MsgUpdateMinGasPrices.d.ts +0 -33
  578. package/dist/core/opchild/msgs/MsgUpdateOpchildAdmin.d.ts +0 -32
  579. package/dist/core/opchild/msgs/MsgUpdateOpchildParams.d.ts +0 -33
  580. package/dist/core/opchild/msgs/MsgUpdateOracle.d.ts +0 -35
  581. package/dist/core/opchild/msgs/index.d.ts +0 -36
  582. package/dist/core/ophost/BatchInfo.d.ts +0 -25
  583. package/dist/core/ophost/BatchInfoWithOutput.d.ts +0 -26
  584. package/dist/core/ophost/BridgeConfig.d.ts +0 -45
  585. package/dist/core/ophost/OphostParams.d.ts +0 -26
  586. package/dist/core/ophost/Output.d.ts +0 -30
  587. package/dist/core/ophost/index.d.ts +0 -6
  588. package/dist/core/ophost/msgs/MsgCreateBridge.d.ts +0 -33
  589. package/dist/core/ophost/msgs/MsgDeleteOutput.d.ts +0 -35
  590. package/dist/core/ophost/msgs/MsgFinalizeTokenWithdrawal.d.ts +0 -60
  591. package/dist/core/ophost/msgs/MsgInitiateTokenDeposit.d.ts +0 -42
  592. package/dist/core/ophost/msgs/MsgProposeOutput.d.ts +0 -41
  593. package/dist/core/ophost/msgs/MsgRecordBatch.d.ts +0 -35
  594. package/dist/core/ophost/msgs/MsgUpdateBatchInfo.d.ts +0 -36
  595. package/dist/core/ophost/msgs/MsgUpdateChallenger.d.ts +0 -35
  596. package/dist/core/ophost/msgs/MsgUpdateFinalizationPeriod.d.ts +0 -36
  597. package/dist/core/ophost/msgs/MsgUpdateMetadata.d.ts +0 -35
  598. package/dist/core/ophost/msgs/MsgUpdateOphostParams.d.ts +0 -33
  599. package/dist/core/ophost/msgs/MsgUpdateOracleConfig.d.ts +0 -35
  600. package/dist/core/ophost/msgs/MsgUpdateProposer.d.ts +0 -35
  601. package/dist/core/ophost/msgs/index.d.ts +0 -32
  602. package/dist/core/oracle/CurrencyPair.d.ts +0 -25
  603. package/dist/core/oracle/QuotePrice.d.ts +0 -27
  604. package/dist/core/oracle/index.d.ts +0 -3
  605. package/dist/core/oracle/msgs/MsgAddCurrencyPairs.d.ts +0 -33
  606. package/dist/core/oracle/msgs/MsgRemoveCurrencyPairs.d.ts +0 -32
  607. package/dist/core/oracle/msgs/index.d.ts +0 -10
  608. package/dist/core/params/ParamChange.d.ts +0 -42
  609. package/dist/core/params/index.d.ts +0 -2
  610. package/dist/core/params/proposals/ParameterChangeProposal.d.ts +0 -35
  611. package/dist/core/params/proposals/index.d.ts +0 -1
  612. package/dist/core/reward/RewardParams.d.ts +0 -38
  613. package/dist/core/reward/index.d.ts +0 -2
  614. package/dist/core/reward/msgs/MsgUpdateRewardParams.d.ts +0 -33
  615. package/dist/core/reward/msgs/index.d.ts +0 -8
  616. package/dist/core/slashing/SlashingParams.d.ts +0 -38
  617. package/dist/core/slashing/ValidatorSigningInfo.d.ts +0 -37
  618. package/dist/core/slashing/index.d.ts +0 -3
  619. package/dist/core/slashing/msgs/MsgUnjail.d.ts +0 -29
  620. package/dist/core/slashing/msgs/MsgUpdateSlashingParams.d.ts +0 -33
  621. package/dist/core/slashing/msgs/index.d.ts +0 -10
  622. package/dist/core/tokenfactory/TokenfactoryParams.d.ts +0 -25
  623. package/dist/core/tokenfactory/index.d.ts +0 -2
  624. package/dist/core/tokenfactory/msgs/MsgBurn.d.ts +0 -33
  625. package/dist/core/tokenfactory/msgs/MsgChangeAdmin.d.ts +0 -35
  626. package/dist/core/tokenfactory/msgs/MsgCreateDenom.d.ts +0 -32
  627. package/dist/core/tokenfactory/msgs/MsgMint.d.ts +0 -36
  628. package/dist/core/tokenfactory/msgs/MsgSetBeforeSendHook.d.ts +0 -35
  629. package/dist/core/tokenfactory/msgs/MsgSetDenomMetadataWasm.d.ts +0 -33
  630. package/dist/core/tokenfactory/msgs/MsgUpdateTokenfactoryParams.d.ts +0 -33
  631. package/dist/core/tokenfactory/msgs/index.d.ts +0 -20
  632. package/dist/core/tx/CompactBitArray.d.ts +0 -22
  633. package/dist/core/tx/Fee.d.ts +0 -31
  634. package/dist/core/tx/MultiSignature.d.ts +0 -13
  635. package/dist/core/tx/SignDoc.d.ts +0 -36
  636. package/dist/core/tx/SignMode.d.ts +0 -3
  637. package/dist/core/tx/SignatureV2.d.ts +0 -66
  638. package/dist/core/tx/Tx.d.ts +0 -146
  639. package/dist/core/tx/TxInfo.d.ts +0 -74
  640. package/dist/core/tx/index.d.ts +0 -7
  641. package/dist/core/upgrade/Plan.d.ts +0 -27
  642. package/dist/core/upgrade/index.d.ts +0 -2
  643. package/dist/core/upgrade/msgs/MsgCancelUpgrade.d.ts +0 -29
  644. package/dist/core/upgrade/msgs/MsgSoftwareUpgrade.d.ts +0 -33
  645. package/dist/core/upgrade/msgs/index.d.ts +0 -10
  646. package/dist/core/wasm/AbsoluteTxPosition.d.ts +0 -24
  647. package/dist/core/wasm/AccessConfig.d.ts +0 -27
  648. package/dist/core/wasm/WasmParams.d.ts +0 -29
  649. package/dist/core/wasm/authorizations/AcceptedMessageKeysFilter.d.ts +0 -28
  650. package/dist/core/wasm/authorizations/AcceptedMessagesFilter.d.ts +0 -28
  651. package/dist/core/wasm/authorizations/AllowAllMessagesFilter.d.ts +0 -24
  652. package/dist/core/wasm/authorizations/CodeGrant.d.ts +0 -25
  653. package/dist/core/wasm/authorizations/CombinedLimit.d.ts +0 -32
  654. package/dist/core/wasm/authorizations/ContractExecutionAuthorization.d.ts +0 -29
  655. package/dist/core/wasm/authorizations/ContractFilter.d.ts +0 -13
  656. package/dist/core/wasm/authorizations/ContractGrant.d.ts +0 -30
  657. package/dist/core/wasm/authorizations/ContractLimit.d.ts +0 -13
  658. package/dist/core/wasm/authorizations/ContractMigrationAuthorization.d.ts +0 -29
  659. package/dist/core/wasm/authorizations/MaxCallsLimit.d.ts +0 -28
  660. package/dist/core/wasm/authorizations/MaxFundsLimit.d.ts +0 -29
  661. package/dist/core/wasm/authorizations/StoreCodeAuthorization.d.ts +0 -29
  662. package/dist/core/wasm/authorizations/index.d.ts +0 -11
  663. package/dist/core/wasm/index.d.ts +0 -5
  664. package/dist/core/wasm/msgs/MsgAddCodeUploadParamsAddresses.d.ts +0 -32
  665. package/dist/core/wasm/msgs/MsgClearAdmin.d.ts +0 -32
  666. package/dist/core/wasm/msgs/MsgExecuteContract.d.ts +0 -39
  667. package/dist/core/wasm/msgs/MsgInstantiateContract.d.ts +0 -45
  668. package/dist/core/wasm/msgs/MsgInstantiateContractV2.d.ts +0 -51
  669. package/dist/core/wasm/msgs/MsgMigrateContract.d.ts +0 -38
  670. package/dist/core/wasm/msgs/MsgPinCodes.d.ts +0 -32
  671. package/dist/core/wasm/msgs/MsgRemoveCodeUploadParamsAddresses.d.ts +0 -32
  672. package/dist/core/wasm/msgs/MsgStoreAndInstantiateContract.d.ts +0 -61
  673. package/dist/core/wasm/msgs/MsgStoreAndMigrateContract.d.ts +0 -42
  674. package/dist/core/wasm/msgs/MsgStoreCode.d.ts +0 -36
  675. package/dist/core/wasm/msgs/MsgSudoContract.d.ts +0 -35
  676. package/dist/core/wasm/msgs/MsgUnpinCodes.d.ts +0 -32
  677. package/dist/core/wasm/msgs/MsgUpdateAdmin.d.ts +0 -35
  678. package/dist/core/wasm/msgs/MsgUpdateContractLabel.d.ts +0 -35
  679. package/dist/core/wasm/msgs/MsgUpdateInstantiateConfig.d.ts +0 -36
  680. package/dist/core/wasm/msgs/MsgUpdateWasmParams.d.ts +0 -33
  681. package/dist/core/wasm/msgs/index.d.ts +0 -40
  682. package/dist/core/wasmextension/AccessConfigExt.d.ts +0 -28
  683. package/dist/core/wasmextension/index.d.ts +0 -2
  684. package/dist/core/wasmextension/msgs/MsgStoreCodeAdmin.d.ts +0 -39
  685. package/dist/core/wasmextension/msgs/index.d.ts +0 -8
  686. package/dist/index.cjs +0 -6
  687. package/dist/index.d.ts +0 -4
  688. package/dist/index.mjs +0 -100795
  689. package/dist/key/Key.d.ts +0 -20
  690. package/dist/key/MnemonicKey.d.ts +0 -14
  691. package/dist/key/RawKey.d.ts +0 -9
  692. package/dist/key/index.d.ts +0 -3
  693. package/dist/util/bcs.d.ts +0 -44
  694. package/dist/util/hash.d.ts +0 -4
  695. package/dist/util/index.d.ts +0 -3
  696. package/dist/util/json.d.ts +0 -9
@@ -0,0 +1,1222 @@
1
+ import { t as CoinSchema } from "./coin_pb--WuIu4sX.mjs";
2
+ import { c as InitiaError, g as isNotFoundError, h as WebSocketNotAvailableError, p as TimeoutError } from "./errors-CN1MFOLv.mjs";
3
+ import { s as parseCoin, t as Coin } from "./coin-DPWbtAFA.mjs";
4
+ import { o as UnsignedTx } from "./broadcast-De8MdmYa.mjs";
5
+ import { t as Message$1 } from "./types-CSS5rfW1.mjs";
6
+ import { t as base64ToUint8Array } from "./amino-CMQN7Frn.mjs";
7
+ import { n as isDirectSigner, r as isEIP191Signer, t as isAminoSigner } from "./types-CLfdsa48.mjs";
8
+ import { n as fetchWithTimeout, t as fetchJson } from "./fetch-Bq_aay6V.mjs";
9
+ import { t as createGrpcClient } from "./grpc-client-DGyZjGcT.mjs";
10
+ import { a as file_cosmos_bank_v1beta1_tx, r as file_ibc_applications_transfer_v1_tx, v as buildChainContextFactory, y as wrapClientWithCache } from "./types_pb-K7pKBvcg.mjs";
11
+ import { o as createSession } from "./waiting-BigHYRNN.mjs";
12
+ import { r as file_minievm_evm_v1_tx } from "./tx_pb-BVCXH992.mjs";
13
+ import { s as file_initia_move_v1_tx } from "./tx_pb-DYspoJTt.mjs";
14
+ import { i as file_opinit_ophost_v1_tx, n as MsgFinalizeTokenWithdrawalSchema, r as MsgInitiateTokenDepositSchema, t as initiaChain } from "./initia-B8l_x6sT.mjs";
15
+ import { a as file_opinit_opchild_v1_tx, i as MsgInitiateTokenWithdrawalSchema } from "./tx_pb-CnFNMLIq.mjs";
16
+ import { n as resolveRegistry, r as resolveServices, t as resolveMsgs } from "./resolve-DdtY7KDz.mjs";
17
+ import { create, createRegistry, fromJson, toBinary } from "@bufbuild/protobuf";
18
+ import { AnySchema } from "@bufbuild/protobuf/wkt";
19
+ import { base64 } from "@scure/base";
20
+ import { sha3_256 } from "@noble/hashes/sha3.js";
21
+ import { bytesToHex, hexToBytes } from "@noble/hashes/utils.js";
22
+ //#region src/bridge/executor.ts
23
+ /**
24
+ * Decode base64 string to hex string.
25
+ */
26
+ function base64ToHex(b64) {
27
+ return bytesToHex(base64.decode(b64));
28
+ }
29
+ /**
30
+ * Convert Executor API response to WithdrawalInfo.
31
+ * Status is set to { status: 'pending' } as a placeholder — actual status
32
+ * is determined by L1 queries in the status determination logic.
33
+ */
34
+ function toWithdrawalInfo(raw) {
35
+ return {
36
+ sequence: BigInt(raw.sequence),
37
+ from: raw.from,
38
+ to: raw.to,
39
+ amount: new Coin(raw.amount.denom, raw.amount.amount),
40
+ outputIndex: BigInt(raw.output_index),
41
+ bridgeId: BigInt(raw.bridge_id),
42
+ txHash: raw.tx_hash,
43
+ withdrawalProofs: raw.withdrawal_proofs.map(base64ToHex),
44
+ version: base64ToHex(raw.version),
45
+ storageRoot: base64ToHex(raw.storage_root),
46
+ lastBlockHash: base64ToHex(raw.last_block_hash)
47
+ };
48
+ }
49
+ /**
50
+ * Fetch paginated withdrawal list from Executor API.
51
+ *
52
+ * @param executorUri - Executor API base URL (e.g., 'https://executor.minimove-2.initia.xyz')
53
+ * @param address - L2 sender address to query withdrawals for
54
+ * @param options - Pagination options
55
+ * @returns Array of WithdrawalInfo without status (status determined separately by L1 queries)
56
+ */
57
+ async function fetchWithdrawals(executorUri, address, options) {
58
+ const params = new URLSearchParams();
59
+ if (options?.limit != null) params.set("limit", String(options.limit));
60
+ if (options?.offset != null) params.set("offset", String(options.offset));
61
+ const query = params.toString();
62
+ return (await fetchJson(`${executorUri}/withdrawals/${address}${query ? `?${query}` : ""}`)).withdrawals.map(toWithdrawalInfo);
63
+ }
64
+ /**
65
+ * Fetch a single withdrawal by sequence from Executor API.
66
+ *
67
+ * @param executorUri - Executor API base URL
68
+ * @param sequence - Withdrawal sequence number
69
+ * @returns WithdrawalInfo without status (status determined separately by L1 queries)
70
+ */
71
+ async function fetchWithdrawal(executorUri, sequence) {
72
+ return toWithdrawalInfo(await fetchJson(`${executorUri}/withdrawal/${sequence.toString()}`));
73
+ }
74
+ //#endregion
75
+ //#region src/bridge/hash.ts
76
+ /**
77
+ * Withdrawal hash calculation for OPInit bridge.
78
+ *
79
+ * Computes the SHA3-256 double hash used as Merkle leaf for withdrawal verification.
80
+ */
81
+ const textEncoder = new TextEncoder();
82
+ /**
83
+ * Encode a bigint as big-endian 8 bytes.
84
+ */
85
+ function bigintToBeBytes(value) {
86
+ const buf = new Uint8Array(8);
87
+ for (let i = 7; i >= 0; i--) {
88
+ buf[i] = Number(value & 255n);
89
+ value >>= 8n;
90
+ }
91
+ return buf;
92
+ }
93
+ /**
94
+ * Calculate the withdrawal hash for OPInit bridge verification.
95
+ *
96
+ * This is a SHA3-256 double hash (Merkle leaf node format) computed from:
97
+ * - bridgeId (8 bytes big-endian)
98
+ * - l2Sequence (8 bytes big-endian)
99
+ * - sha3_256(sender UTF-8) (32 bytes)
100
+ * - sha3_256(receiver UTF-8) (32 bytes)
101
+ * - sha3_256(denom UTF-8) (32 bytes)
102
+ * - amount (8 bytes big-endian)
103
+ *
104
+ * Result = sha3_256(sha3_256(concatenation))
105
+ *
106
+ * @param bridgeId - Bridge ID
107
+ * @param l2Sequence - L2 withdrawal sequence number
108
+ * @param sender - L2 sender address
109
+ * @param receiver - L1 receiver address
110
+ * @param denom - Token denomination
111
+ * @param amount - Token amount
112
+ * @returns 32-byte withdrawal hash
113
+ */
114
+ function calculateWithdrawalHash(bridgeId, l2Sequence, sender, receiver, denom, amount) {
115
+ const parts = [
116
+ bigintToBeBytes(bridgeId),
117
+ bigintToBeBytes(l2Sequence),
118
+ sha3_256(textEncoder.encode(sender)),
119
+ sha3_256(textEncoder.encode(receiver)),
120
+ sha3_256(textEncoder.encode(denom)),
121
+ bigintToBeBytes(amount)
122
+ ];
123
+ const totalLength = parts.reduce((sum, p) => sum + p.length, 0);
124
+ const concat = new Uint8Array(totalLength);
125
+ let offset = 0;
126
+ for (const part of parts) {
127
+ concat.set(part, offset);
128
+ offset += part.length;
129
+ }
130
+ return sha3_256(sha3_256(concat));
131
+ }
132
+ //#endregion
133
+ //#region src/bridge/utils.ts
134
+ /**
135
+ * Convert protobuf Duration to milliseconds.
136
+ */
137
+ function durationToMs(d) {
138
+ return Number(d.seconds) * 1e3 + Math.floor(d.nanos / 1e6);
139
+ }
140
+ /**
141
+ * Convert protobuf Timestamp to milliseconds since epoch.
142
+ */
143
+ function timestampToMs(t) {
144
+ return Number(t.seconds) * 1e3 + Math.floor(t.nanos / 1e6);
145
+ }
146
+ //#endregion
147
+ //#region src/bridge/op-bridge.ts
148
+ /**
149
+ * Internal OP bridge implementation.
150
+ * Use `provider.bridge` instead of instantiating directly.
151
+ */
152
+ var OpBridgeInternal = class {
153
+ _l1Client;
154
+ constructor(provider, createTransport) {
155
+ this.provider = provider;
156
+ this.createTransport = createTransport;
157
+ }
158
+ /**
159
+ * Lazily create and cache the L1 ophost gRPC client.
160
+ * Finds L1 chain from provider automatically.
161
+ */
162
+ getL1Client() {
163
+ if (this._l1Client) return this._l1Client;
164
+ const l1Chain = this.provider.listChains().find((c) => c.chainType === "initia");
165
+ if (!l1Chain) throw new Error("L1 (initia) chain not found in provider. Ensure the provider includes L1 chain info for withdrawal status queries.");
166
+ const config = initiaChain.build();
167
+ this._l1Client = wrapClientWithCache(createGrpcClient(this.createTransport(l1Chain), config.services, void 0, void 0, config.registry), l1Chain.chainId);
168
+ return this._l1Client;
169
+ }
170
+ /**
171
+ * Resolve bridgeId for a given L2 chain.
172
+ *
173
+ * @param l2ChainId - The L2 chain ID (e.g., 'minimove-1')
174
+ * @returns The bridge ID for the L2 chain
175
+ * @throws Error if chain is not found or has no opBridgeId
176
+ */
177
+ getBridgeId(l2ChainId) {
178
+ const chainInfo = this.provider.getChainInfo(l2ChainId);
179
+ if (!chainInfo) throw new Error(`Chain not found: ${l2ChainId}`);
180
+ if (chainInfo.opBridgeId == null) throw new Error(`Chain ${l2ChainId} does not have an opBridgeId. Only L2 (minitia) chains support bridging.`);
181
+ return chainInfo.opBridgeId;
182
+ }
183
+ /**
184
+ * Create a MsgInitiateTokenDeposit for L1 → L2 transfer.
185
+ *
186
+ * @param options - Deposit options (use toChain for auto bridgeId resolve, or bridgeId directly)
187
+ * @returns Packed Message ready for signAndBroadcast
188
+ */
189
+ deposit(options) {
190
+ const { sender, to, amount, data } = options;
191
+ const bridgeId = "toChain" in options && options.toChain ? this.getBridgeId(options.toChain) : options.bridgeId;
192
+ const resolvedCoin = typeof amount === "string" ? parseCoin(amount) : amount;
193
+ return new Message$1(MsgInitiateTokenDepositSchema, {
194
+ sender,
195
+ bridgeId: BigInt(bridgeId),
196
+ to: to ?? sender,
197
+ amount: create(CoinSchema, {
198
+ denom: resolvedCoin.denom,
199
+ amount: resolvedCoin.amount
200
+ }),
201
+ data: data ?? new Uint8Array()
202
+ });
203
+ }
204
+ /**
205
+ * Create a MsgInitiateTokenWithdrawal for L2 → L1 transfer.
206
+ *
207
+ * @param options - Withdrawal options
208
+ * @returns Packed Message ready for signAndBroadcast
209
+ */
210
+ withdraw(options) {
211
+ const { sender, to, amount } = options;
212
+ const resolvedCoin = typeof amount === "string" ? parseCoin(amount) : amount;
213
+ return new Message$1(MsgInitiateTokenWithdrawalSchema, {
214
+ sender,
215
+ to: to ?? sender,
216
+ amount: create(CoinSchema, {
217
+ denom: resolvedCoin.denom,
218
+ amount: resolvedCoin.amount
219
+ })
220
+ });
221
+ }
222
+ /**
223
+ * Create a MsgFinalizeTokenWithdrawal to claim a withdrawal on L1.
224
+ *
225
+ * @param options - Claim options with sender and withdrawal info (must be 'claimable')
226
+ * @returns Packed Message ready for signAndBroadcast
227
+ * @throws Error if withdrawal status is not 'claimable'
228
+ */
229
+ claim(options) {
230
+ const { sender, withdrawal } = options;
231
+ if (withdrawal.status.status !== "claimable") throw new Error(`Withdrawal is not claimable (current status: ${withdrawal.status.status})`);
232
+ return new Message$1(MsgFinalizeTokenWithdrawalSchema, {
233
+ sender,
234
+ bridgeId: withdrawal.bridgeId,
235
+ outputIndex: withdrawal.outputIndex,
236
+ withdrawalProofs: withdrawal.withdrawalProofs.map((p) => hexToBytes(p)),
237
+ from: withdrawal.from,
238
+ to: withdrawal.to,
239
+ sequence: withdrawal.sequence,
240
+ amount: create(CoinSchema, {
241
+ denom: withdrawal.amount.denom,
242
+ amount: withdrawal.amount.amount
243
+ }),
244
+ version: hexToBytes(withdrawal.version),
245
+ storageRoot: hexToBytes(withdrawal.storageRoot),
246
+ lastBlockHash: hexToBytes(withdrawal.lastBlockHash)
247
+ });
248
+ }
249
+ /**
250
+ * List all chains that support OPInit bridging.
251
+ *
252
+ * @returns Array of ChainInfo with opBridgeId defined
253
+ */
254
+ listBridgeableChains() {
255
+ return this.provider.listChains().filter((c) => c.opBridgeId != null);
256
+ }
257
+ /**
258
+ * Fetch withdrawals for an address and determine their statuses via L1 queries.
259
+ *
260
+ * @param l2ChainId - The L2 chain ID (e.g., 'minimove-1')
261
+ * @param address - L2 sender address
262
+ * @param options - Pagination options for Executor API
263
+ * @returns Array of WithdrawalInfo with status determined
264
+ */
265
+ async getWithdrawals(l2ChainId, address, options) {
266
+ const l2Info = this.provider.getChainInfo(l2ChainId);
267
+ if (!l2Info) throw new Error(`Chain not found: ${l2ChainId}`);
268
+ if (!l2Info.executorUri) throw new Error(`Chain ${l2ChainId} does not have an executorUri. Cannot fetch withdrawals.`);
269
+ if (l2Info.opBridgeId == null) throw new Error(`Chain ${l2ChainId} does not have an opBridgeId`);
270
+ const rawWithdrawals = await fetchWithdrawals(l2Info.executorUri, address, options);
271
+ if (rawWithdrawals.length === 0) return [];
272
+ const ophost = this.getL1Client().ophost;
273
+ const finalizationPeriod = (await ophost.bridge({ bridgeId: l2Info.opBridgeId })).bridgeConfig?.finalizationPeriod;
274
+ if (!finalizationPeriod) throw new Error("Bridge config missing finalizationPeriod");
275
+ const finalizationMs = durationToMs(finalizationPeriod);
276
+ let latestProposedIndex = 0n;
277
+ try {
278
+ const proposalsResponse = await ophost.outputProposals({
279
+ bridgeId: l2Info.opBridgeId,
280
+ pagination: {
281
+ reverse: true,
282
+ limit: 1n
283
+ }
284
+ });
285
+ if (proposalsResponse.outputProposals.length > 0) latestProposedIndex = proposalsResponse.outputProposals[0].outputIndex;
286
+ } catch (err) {
287
+ if (!isNotFoundError(err)) throw err;
288
+ }
289
+ const nonPendingIndices = [...new Set(rawWithdrawals.map((w) => w.outputIndex).filter((i) => i > 0n && i <= latestProposedIndex))];
290
+ const outputTimestamps = /* @__PURE__ */ new Map();
291
+ await Promise.all(nonPendingIndices.map(async (outputIndex) => {
292
+ try {
293
+ const response = await ophost.outputProposal({
294
+ bridgeId: l2Info.opBridgeId,
295
+ outputIndex
296
+ });
297
+ if (response.outputProposal?.l1BlockTime) outputTimestamps.set(outputIndex, timestampToMs(response.outputProposal.l1BlockTime));
298
+ } catch (err) {
299
+ if (!isNotFoundError(err)) throw err;
300
+ }
301
+ }));
302
+ const now = Date.now();
303
+ return Promise.all(rawWithdrawals.map(async (raw) => {
304
+ const status = await this.determineWithdrawalStatus(raw, outputTimestamps, latestProposedIndex, finalizationMs, now, ophost);
305
+ return {
306
+ ...raw,
307
+ status
308
+ };
309
+ }));
310
+ }
311
+ /**
312
+ * Fetch a single withdrawal and determine its status.
313
+ *
314
+ * @param l2ChainId - The L2 chain ID
315
+ * @param sequence - Withdrawal sequence number
316
+ * @returns WithdrawalInfo with status determined
317
+ */
318
+ async getWithdrawalStatus(l2ChainId, sequence) {
319
+ const l2Info = this.provider.getChainInfo(l2ChainId);
320
+ if (!l2Info) throw new Error(`Chain not found: ${l2ChainId}`);
321
+ if (!l2Info.executorUri) throw new Error(`Chain ${l2ChainId} does not have an executorUri. Cannot fetch withdrawal.`);
322
+ if (l2Info.opBridgeId == null) throw new Error(`Chain ${l2ChainId} does not have an opBridgeId`);
323
+ const raw = await fetchWithdrawal(l2Info.executorUri, sequence);
324
+ const ophost = this.getL1Client().ophost;
325
+ const finalizationPeriod = (await ophost.bridge({ bridgeId: l2Info.opBridgeId })).bridgeConfig?.finalizationPeriod;
326
+ if (!finalizationPeriod) throw new Error("Bridge config missing finalizationPeriod");
327
+ const finalizationMs = durationToMs(finalizationPeriod);
328
+ const outputTimestamps = /* @__PURE__ */ new Map();
329
+ let latestProposedIndex = 0n;
330
+ if (raw.outputIndex > 0n) try {
331
+ const response = await ophost.outputProposal({
332
+ bridgeId: l2Info.opBridgeId,
333
+ outputIndex: raw.outputIndex
334
+ });
335
+ if (response.outputProposal?.l1BlockTime) {
336
+ outputTimestamps.set(raw.outputIndex, timestampToMs(response.outputProposal.l1BlockTime));
337
+ latestProposedIndex = raw.outputIndex;
338
+ }
339
+ } catch (err) {
340
+ if (!isNotFoundError(err)) throw err;
341
+ }
342
+ const status = await this.determineWithdrawalStatus(raw, outputTimestamps, latestProposedIndex, finalizationMs, Date.now(), ophost);
343
+ return {
344
+ ...raw,
345
+ status
346
+ };
347
+ }
348
+ /**
349
+ * Determine withdrawal status based on output proposals and finalization period.
350
+ */
351
+ async determineWithdrawalStatus(raw, outputTimestamps, latestProposedIndex, finalizationMs, now, ophost) {
352
+ if (raw.outputIndex === 0n || raw.outputIndex > latestProposedIndex) return { status: "pending" };
353
+ const l1BlockTimeMs = outputTimestamps.get(raw.outputIndex);
354
+ if (l1BlockTimeMs == null) return { status: "pending" };
355
+ const claimableAt = new Date(l1BlockTimeMs + finalizationMs);
356
+ if (claimableAt.getTime() > now) return {
357
+ status: "waiting",
358
+ claimableAt
359
+ };
360
+ const hash = calculateWithdrawalHash(raw.bridgeId, raw.sequence, raw.from, raw.to, raw.amount.denom, BigInt(raw.amount.amount));
361
+ try {
362
+ if ((await ophost.claimed({
363
+ bridgeId: raw.bridgeId,
364
+ withdrawalHash: hash
365
+ })).claimed) return { status: "claimed" };
366
+ } catch (err) {
367
+ if (!isNotFoundError(err)) throw err;
368
+ }
369
+ return { status: "claimable" };
370
+ }
371
+ };
372
+ //#endregion
373
+ //#region src/bridge/router-client.ts
374
+ const INTERWOVENKIT_VERSION = "2.4.6";
375
+ const routerRegistry = createRegistry(file_cosmos_bank_v1beta1_tx, file_ibc_applications_transfer_v1_tx, file_opinit_ophost_v1_tx, file_opinit_opchild_v1_tx, file_minievm_evm_v1_tx, file_initia_move_v1_tx);
376
+ var RouterClient = class {
377
+ constructor(baseUrl) {
378
+ this.baseUrl = baseUrl;
379
+ }
380
+ async route(opts) {
381
+ const body = {
382
+ amount_in: opts.amount,
383
+ source_asset_chain_id: opts.source.chainId,
384
+ source_asset_denom: opts.source.denom,
385
+ dest_asset_chain_id: opts.dest.chainId,
386
+ dest_asset_denom: opts.dest.denom,
387
+ allow_unsafe: opts.allowUnsafe,
388
+ go_fast: opts.goFast,
389
+ is_op_withdraw: opts.isOpWithdraw
390
+ };
391
+ return normalizeRouteResponse(await (await this.post("/v2/fungible/route", body)).json());
392
+ }
393
+ async msgs(opts) {
394
+ const raw = opts.route._raw;
395
+ const body = {
396
+ amount_in: raw.amount_in,
397
+ amount_out: raw.amount_out,
398
+ source_asset_chain_id: raw.source_asset_chain_id,
399
+ source_asset_denom: raw.source_asset_denom,
400
+ dest_asset_chain_id: raw.dest_asset_chain_id,
401
+ dest_asset_denom: raw.dest_asset_denom,
402
+ address_list: opts.addresses,
403
+ operations: raw.operations,
404
+ slippage_tolerance_percent: opts.slippageTolerance ?? "1",
405
+ signed_op_hook: opts.signedOpHook,
406
+ ignore_blacklist: opts.ignoreBlacklist
407
+ };
408
+ return normalizeTransferTxs(await (await this.post("/v2/fungible/msgs", body)).json());
409
+ }
410
+ async opHook(opts) {
411
+ const body = {
412
+ source_address: opts.sourceAddress,
413
+ source_asset_chain_id: opts.sourceChainId,
414
+ source_asset_denom: opts.sourceDenom,
415
+ dest_address: opts.destAddress,
416
+ dest_asset_chain_id: opts.destChainId,
417
+ dest_asset_denom: opts.destDenom
418
+ };
419
+ return normalizeOpHookResponse(await (await this.post("/op-hook", body)).json());
420
+ }
421
+ async track(txHash, chainId) {
422
+ await this.post("/v2/tx/track", {
423
+ tx_hash: txHash,
424
+ chain_id: chainId
425
+ });
426
+ }
427
+ async assets(chainIds) {
428
+ const query = chainIds?.length ? `?chain_ids=${chainIds.join(",")}` : "";
429
+ return normalizeAssetsResponse(await (await this.get(`/v2/fungible/assets${query}`)).json());
430
+ }
431
+ async chains(chainIds) {
432
+ const query = chainIds?.length ? `?chain_ids=${chainIds.join(",")}` : "";
433
+ return normalizeChainsResponse(await (await this.get(`/v2/info/chains${query}`)).json());
434
+ }
435
+ async balances(queries) {
436
+ return normalizeBalancesResponse(await (await this.post("/v2/info/balances", { chains: queries })).json());
437
+ }
438
+ async nftTransfer(opts) {
439
+ const body = {
440
+ from_address: opts.fromAddress,
441
+ from_chain_id: opts.fromChainId,
442
+ to_address: opts.toAddress,
443
+ to_chain_id: opts.toChainId,
444
+ token_ids: opts.tokenIds,
445
+ collection_address: opts.collectionAddress
446
+ };
447
+ if (opts.classId) body.class_id = opts.classId;
448
+ if (opts.classTrace) body.class_trace = {
449
+ path: opts.classTrace.path,
450
+ base_class_id: opts.classTrace.baseClassId
451
+ };
452
+ if (opts.objectAddresses) body.object_addresses = opts.objectAddresses;
453
+ if (opts.l1RecoverAddress) body.l1_recover_address = opts.l1RecoverAddress;
454
+ if (opts.outgoingProxy) body.outgoing_proxy = opts.outgoingProxy;
455
+ if (opts.timeout !== void 0) body.timeout = opts.timeout;
456
+ if (opts.ignoreBlacklist) body.ignore_blacklist = opts.ignoreBlacklist;
457
+ return await (await this.post("/nft", body)).json();
458
+ }
459
+ async status(txHash, chainId) {
460
+ const params = new URLSearchParams({
461
+ tx_hash: txHash,
462
+ chain_id: chainId
463
+ });
464
+ return normalizeStatus(await (await this.get(`/v2/tx/status?${params.toString()}`)).json());
465
+ }
466
+ headers() {
467
+ return { "InterwovenKit-Version": INTERWOVENKIT_VERSION };
468
+ }
469
+ async throwIfNotOk(res, path) {
470
+ if (res.ok) return;
471
+ let detail = "";
472
+ try {
473
+ const body = await res.json();
474
+ if (body.message) detail = `: ${body.message}`;
475
+ } catch {}
476
+ throw new InitiaError(`Router API ${path} failed (${res.status})${detail}`);
477
+ }
478
+ async get(path) {
479
+ const res = await fetchWithTimeout(`${this.baseUrl}${path}`, { headers: this.headers() });
480
+ await this.throwIfNotOk(res, path);
481
+ return res;
482
+ }
483
+ async post(path, body) {
484
+ const res = await fetchWithTimeout(`${this.baseUrl}${path}`, {
485
+ method: "POST",
486
+ headers: {
487
+ ...this.headers(),
488
+ "Content-Type": "application/json"
489
+ },
490
+ body: JSON.stringify(body)
491
+ });
492
+ await this.throwIfNotOk(res, path);
493
+ return res;
494
+ }
495
+ };
496
+ /**
497
+ * Normalize route response. Preserves the entire raw response in `_raw`
498
+ * so that buildTransferMsgs() can pass server-original data without loss.
499
+ */
500
+ function normalizeRouteResponse(raw) {
501
+ return {
502
+ amountIn: raw.amount_in,
503
+ amountOut: raw.amount_out,
504
+ source: {
505
+ chainId: raw.source_asset_chain_id,
506
+ denom: raw.source_asset_denom,
507
+ symbol: raw.source_asset_symbol
508
+ },
509
+ dest: {
510
+ chainId: raw.dest_asset_chain_id,
511
+ denom: raw.dest_asset_denom,
512
+ symbol: raw.dest_asset_symbol
513
+ },
514
+ operations: normalizeOperations(raw.operations),
515
+ estimatedDurationSeconds: raw.estimated_duration_seconds,
516
+ usdAmountIn: raw.usd_amount_in,
517
+ usdAmountOut: raw.usd_amount_out,
518
+ warnings: raw.warnings,
519
+ extraInfos: raw.extra_infos,
520
+ extraWarnings: raw.extra_warnings,
521
+ requiresOpHook: raw.required_op_hook,
522
+ _raw: raw
523
+ };
524
+ }
525
+ /**
526
+ * Normalize operations array (display-only; originals preserved in _raw).
527
+ */
528
+ function normalizeOperations(raw) {
529
+ return raw.map((op) => {
530
+ const type = op.type ?? op.op_type;
531
+ switch (type) {
532
+ case "transfer": return {
533
+ type: "transfer",
534
+ chainId: op.chain_id ?? "",
535
+ channel: op.channel ?? "",
536
+ denomIn: op.denom_in ?? "",
537
+ denomOut: op.denom_out ?? ""
538
+ };
539
+ case "swap": return {
540
+ type: "swap",
541
+ poolId: op.pool_id ?? "",
542
+ denomIn: op.denom_in ?? "",
543
+ denomOut: op.denom_out ?? ""
544
+ };
545
+ default: return {
546
+ type,
547
+ denomIn: op.denom_in ?? "",
548
+ denomOut: op.denom_out ?? ""
549
+ };
550
+ }
551
+ });
552
+ }
553
+ /**
554
+ * Normalize transfer transactions response.
555
+ * Converts base64-encoded proto messages to SDK Message format.
556
+ */
557
+ function normalizeTransferTxs(raw) {
558
+ return raw.txs.map((tx) => ({
559
+ chainId: tx.chain_id ?? tx.cosmos_tx?.chain_id ?? tx.evm_tx?.chain_id ?? "",
560
+ cosmosMsgs: normalizeCosmosMsgs(tx.cosmos_tx?.msgs),
561
+ evmTx: tx.evm_tx ? {
562
+ to: tx.evm_tx.to,
563
+ data: tx.evm_tx.data,
564
+ value: tx.evm_tx.value
565
+ } : void 0,
566
+ signerAddress: tx.signer_address ?? tx.cosmos_tx?.signer_address ?? tx.evm_tx?.signer_address ?? ""
567
+ }));
568
+ }
569
+ /**
570
+ * Convert router API message format to SDK Message format.
571
+ *
572
+ * The Router API returns `msg` as a JSON string (snake_case),
573
+ * not base64-encoded proto bytes. We use the routerRegistry to
574
+ * resolve the schema, then `fromJson` → `toBinary` → `Any`.
575
+ */
576
+ function normalizeCosmosMsgs(msgs) {
577
+ if (!msgs?.length) return void 0;
578
+ return msgs.map((m) => {
579
+ let value;
580
+ if (m.msg.startsWith("{")) {
581
+ const typeName = m.msg_type_url.replace(/^\//, "");
582
+ const desc = routerRegistry.getMessage(typeName);
583
+ if (!desc) throw new InitiaError(`Unknown router msg type: ${m.msg_type_url}`);
584
+ value = toBinary(desc, fromJson(desc, JSON.parse(m.msg)));
585
+ } else value = base64ToUint8Array(m.msg);
586
+ return Message$1.fromAny(create(AnySchema, {
587
+ typeUrl: m.msg_type_url,
588
+ value
589
+ }));
590
+ });
591
+ }
592
+ function normalizeOpHookResponse(raw) {
593
+ return {
594
+ chainId: raw.chain_id,
595
+ hook: raw.hook
596
+ };
597
+ }
598
+ function normalizeAssetsResponse(raw) {
599
+ const result = {};
600
+ for (const [chainId, { assets }] of Object.entries(raw.chain_to_assets_map)) result[chainId] = assets.map((a) => ({
601
+ denom: a.denom,
602
+ chainId: a.chain_id,
603
+ originDenom: a.origin_denom,
604
+ originChainId: a.origin_chain_id,
605
+ symbol: a.symbol,
606
+ name: a.name,
607
+ decimals: a.decimals,
608
+ logoUri: a.logo_uri,
609
+ recommendedSymbol: a.recommended_symbol,
610
+ description: a.description,
611
+ coingeckoId: a.coingecko_id,
612
+ trace: a.trace,
613
+ isCw20: a.is_cw20,
614
+ isEvm: a.is_evm,
615
+ isSvm: a.is_svm,
616
+ tokenContract: a.token_contract,
617
+ hidden: a.hidden,
618
+ forwardContract: a.forwardContract,
619
+ oftOwner: a.oftOwner
620
+ }));
621
+ return result;
622
+ }
623
+ function normalizeStatus(raw) {
624
+ return {
625
+ state: raw.state,
626
+ transfers: raw.transfers ?? [],
627
+ transferSequence: (raw.transfer_sequence ?? []).map((h) => ({
628
+ srcChainId: h.src_chain_id,
629
+ dstChainId: h.dst_chain_id,
630
+ state: h.state
631
+ })),
632
+ nextBlockingTransfer: raw.next_blocking_transfer ? { transferSequenceIndex: raw.next_blocking_transfer.transfer_sequence_index } : void 0,
633
+ transferAssetRelease: raw.transfer_asset_release ? {
634
+ chainId: raw.transfer_asset_release.chain_id,
635
+ denom: raw.transfer_asset_release.denom,
636
+ amount: raw.transfer_asset_release.amount ?? void 0,
637
+ released: raw.transfer_asset_release.released
638
+ } : void 0,
639
+ error: raw.error ?? void 0
640
+ };
641
+ }
642
+ function normalizeBalancesResponse(raw) {
643
+ const result = {};
644
+ for (const [chainId, chainData] of Object.entries(raw.chains ?? {})) {
645
+ result[chainId] = {};
646
+ for (const [denom, info] of Object.entries(chainData.denoms ?? {})) result[chainId][denom] = {
647
+ amount: info.amount,
648
+ priceUsd: info.price_usd,
649
+ valueUsd: info.value_usd
650
+ };
651
+ }
652
+ return result;
653
+ }
654
+ function normalizeChainsResponse(raw) {
655
+ return (raw.chains ?? []).map((c) => ({
656
+ chainId: c.chain_id,
657
+ chainName: c.chain_name,
658
+ chainType: c.chain_type,
659
+ pfmEnabled: c.pfm_enabled,
660
+ supportsMemo: c.supports_memo,
661
+ logoUri: c.logo_uri,
662
+ bech32Prefix: c.bech32_prefix,
663
+ rest: c.rest,
664
+ rpc: c.rpc,
665
+ evmFeeAsset: c.evm_fee_asset
666
+ }));
667
+ }
668
+ //#endregion
669
+ //#region src/bridge/watch.ts
670
+ /**
671
+ * Extract events of a specific type from a WebSocket TxResult.
672
+ * Returns an array of attribute maps for each matching event.
673
+ */
674
+ function parseTxEvents(tx, eventType) {
675
+ const results = [];
676
+ const events = tx.result?.events ?? [];
677
+ for (const event of events) {
678
+ if (event.type !== eventType) continue;
679
+ const attrs = {};
680
+ for (const attr of event.attributes ?? []) if (attr.key && attr.value !== void 0) attrs[attr.key] = attr.value;
681
+ results.push(attrs);
682
+ }
683
+ return results;
684
+ }
685
+ function buildDepositFilter(eventType, opts, bridgeId) {
686
+ const conditions = [];
687
+ if (eventType === "initiate_token_deposit") {
688
+ if (bridgeId !== void 0) conditions.push(`initiate_token_deposit.bridge_id='${bridgeId}'`);
689
+ if (opts.l1Sequence !== void 0) conditions.push(`initiate_token_deposit.l1_sequence='${opts.l1Sequence}'`);
690
+ if (opts.sender) conditions.push(`initiate_token_deposit.from='${opts.sender}'`);
691
+ if (opts.recipient) conditions.push(`initiate_token_deposit.to='${opts.recipient}'`);
692
+ } else if (eventType === "finalize_token_deposit") {
693
+ if (opts.l1Sequence !== void 0) conditions.push(`finalize_token_deposit.l1_sequence='${opts.l1Sequence}'`);
694
+ if (opts.sender) conditions.push(`finalize_token_deposit.sender='${opts.sender}'`);
695
+ if (opts.recipient) conditions.push(`finalize_token_deposit.recipient='${opts.recipient}'`);
696
+ }
697
+ return conditions.length > 0 ? conditions.join(" AND ") : void 0;
698
+ }
699
+ function buildWithdrawalFilter(eventType, opts, bridgeId) {
700
+ const conditions = [];
701
+ if (eventType === "initiate_token_withdrawal") {
702
+ if (opts.l2Sequence !== void 0) conditions.push(`initiate_token_withdrawal.l2_sequence='${opts.l2Sequence}'`);
703
+ if (opts.sender) conditions.push(`initiate_token_withdrawal.from='${opts.sender}'`);
704
+ } else if (eventType === "propose_output") {
705
+ if (bridgeId !== void 0) conditions.push(`propose_output.bridge_id='${bridgeId}'`);
706
+ } else if (eventType === "finalize_token_withdrawal") {
707
+ if (bridgeId !== void 0) conditions.push(`finalize_token_withdrawal.bridge_id='${bridgeId}'`);
708
+ if (opts.l2Sequence !== void 0) conditions.push(`finalize_token_withdrawal.l2_sequence='${opts.l2Sequence}'`);
709
+ }
710
+ return conditions.length > 0 ? conditions.join(" AND ") : void 0;
711
+ }
712
+ /**
713
+ * Watch deposit events in real-time via WebSocket.
714
+ *
715
+ * Subscribes to L1 initiate_token_deposit and L2 finalize_token_deposit events.
716
+ * Call `handle.unsubscribe()` to stop watching and close connections.
717
+ */
718
+ function watchDeposit(provider, options, callback) {
719
+ const l2Info = provider.getChainInfo(options.l2ChainId);
720
+ if (!l2Info) throw new Error(`Chain not found: ${options.l2ChainId}`);
721
+ const l1Info = provider.listChains().find((c) => c.chainType === "initia");
722
+ if (!l1Info) throw new Error("L1 (initia) chain not found in provider");
723
+ if (!l1Info.wss) throw new WebSocketNotAvailableError(l1Info.chainId);
724
+ if (!l2Info.wss) throw new WebSocketNotAvailableError(l2Info.chainId);
725
+ const bridgeId = l2Info.opBridgeId;
726
+ const sessions = [];
727
+ const subs = [];
728
+ let cleaned = false;
729
+ const cleanup = () => {
730
+ if (cleaned) return;
731
+ cleaned = true;
732
+ for (const sub of subs) sub.unsubscribe();
733
+ for (const session of sessions) session.close();
734
+ subs.length = 0;
735
+ sessions.length = 0;
736
+ };
737
+ const handleError = options.onError ?? ((err) => {
738
+ console.error("[initia.js] watchDeposit failed — watcher terminated. Provide onError to handle:", err);
739
+ cleanup();
740
+ });
741
+ const l1Session = createSession(l1Info);
742
+ sessions.push(l1Session);
743
+ const l1Filter = buildDepositFilter("initiate_token_deposit", options, bridgeId);
744
+ l1Session.subscribe({
745
+ event: "tx",
746
+ filter: l1Filter
747
+ }, (tx) => {
748
+ const events = parseTxEvents(tx, "initiate_token_deposit");
749
+ for (const attrs of events) {
750
+ if (options.l1Sequence !== void 0 && attrs.l1_sequence !== String(options.l1Sequence)) continue;
751
+ callback({
752
+ status: "initiated",
753
+ l1Sequence: BigInt(attrs.l1_sequence ?? "0"),
754
+ from: attrs.from ?? "",
755
+ to: attrs.to ?? "",
756
+ amount: attrs.amount ?? "0",
757
+ bridgeId: BigInt(attrs.bridge_id ?? "0")
758
+ });
759
+ }
760
+ }).then((sub) => {
761
+ if (!cleaned) subs.push(sub);
762
+ else sub.unsubscribe();
763
+ }).catch(handleError);
764
+ const l2Session = createSession(l2Info);
765
+ sessions.push(l2Session);
766
+ const l2Filter = buildDepositFilter("finalize_token_deposit", options);
767
+ l2Session.subscribe({
768
+ event: "tx",
769
+ filter: l2Filter
770
+ }, (tx) => {
771
+ const events = parseTxEvents(tx, "finalize_token_deposit");
772
+ for (const attrs of events) {
773
+ if (options.l1Sequence !== void 0 && attrs.l1_sequence !== String(options.l1Sequence)) continue;
774
+ callback({
775
+ status: "finalized",
776
+ l1Sequence: BigInt(attrs.l1_sequence ?? "0"),
777
+ recipient: attrs.recipient ?? "",
778
+ amount: attrs.amount ?? "0",
779
+ success: attrs.success === "true",
780
+ reason: attrs.reason || void 0
781
+ });
782
+ }
783
+ }).then((sub) => {
784
+ if (!cleaned) subs.push(sub);
785
+ else sub.unsubscribe();
786
+ }).catch(handleError);
787
+ return { unsubscribe: cleanup };
788
+ }
789
+ /**
790
+ * Watch withdrawal events in real-time via WebSocket.
791
+ *
792
+ * Subscribes to L2 initiate_token_withdrawal, L1 propose_output, and
793
+ * L1 finalize_token_withdrawal events. Emits 'waiting' and 'claimable'
794
+ * events based on the finalization period.
795
+ *
796
+ * Call `handle.unsubscribe()` to stop watching and close connections.
797
+ */
798
+ function watchWithdrawal(provider, options, callback, createTransport) {
799
+ const l2Info = provider.getChainInfo(options.l2ChainId);
800
+ if (!l2Info) throw new Error(`Chain not found: ${options.l2ChainId}`);
801
+ if (l2Info.opBridgeId == null) throw new Error(`Chain ${options.l2ChainId} has no opBridgeId`);
802
+ const l1Info = provider.listChains().find((c) => c.chainType === "initia");
803
+ if (!l1Info) throw new Error("L1 (initia) chain not found in provider");
804
+ if (!l1Info.wss) throw new WebSocketNotAvailableError(l1Info.chainId);
805
+ if (!l2Info.wss) throw new WebSocketNotAvailableError(l2Info.chainId);
806
+ const bridgeId = l2Info.opBridgeId;
807
+ const sessions = [];
808
+ const subs = [];
809
+ const timers = [];
810
+ let timeoutTimer = null;
811
+ let cleaned = false;
812
+ const cleanup = () => {
813
+ if (cleaned) return;
814
+ cleaned = true;
815
+ for (const sub of subs) sub.unsubscribe();
816
+ for (const session of sessions) session.close();
817
+ for (const timer of timers) clearTimeout(timer);
818
+ if (timeoutTimer) clearTimeout(timeoutTimer);
819
+ subs.length = 0;
820
+ sessions.length = 0;
821
+ timers.length = 0;
822
+ };
823
+ const handleError = options.onError ?? ((err) => {
824
+ console.error("[initia.js] watchWithdrawal failed — watcher terminated. Provide onError to handle:", err);
825
+ cleanup();
826
+ });
827
+ if (options.timeout) timeoutTimer = setTimeout(() => {
828
+ cleanup();
829
+ handleError(new TimeoutError("watchWithdrawal", options.timeout));
830
+ }, options.timeout);
831
+ const finalizationMsPromise = (async () => {
832
+ const config = initiaChain.build();
833
+ const fp = (await wrapClientWithCache(createGrpcClient(createTransport(l1Info), config.services, void 0, void 0, config.registry), l1Info.chainId).ophost.bridge({ bridgeId })).bridgeConfig?.finalizationPeriod;
834
+ if (!fp) throw new Error("Bridge config missing finalizationPeriod — cannot determine claimable timing");
835
+ return durationToMs(fp);
836
+ })();
837
+ finalizationMsPromise.catch((err) => {
838
+ cleanup();
839
+ handleError(err);
840
+ });
841
+ const l2Session = createSession(l2Info);
842
+ sessions.push(l2Session);
843
+ const l2Filter = buildWithdrawalFilter("initiate_token_withdrawal", options);
844
+ l2Session.subscribe({
845
+ event: "tx",
846
+ filter: l2Filter
847
+ }, (tx) => {
848
+ const events = parseTxEvents(tx, "initiate_token_withdrawal");
849
+ for (const attrs of events) {
850
+ if (options.l2Sequence !== void 0 && attrs.l2_sequence !== String(options.l2Sequence)) continue;
851
+ callback({
852
+ status: "initiated",
853
+ l2Sequence: BigInt(attrs.l2_sequence ?? "0"),
854
+ from: attrs.from ?? "",
855
+ to: attrs.to ?? "",
856
+ amount: attrs.amount ?? "0"
857
+ });
858
+ }
859
+ }).then((sub) => {
860
+ if (!cleaned) subs.push(sub);
861
+ else sub.unsubscribe();
862
+ }).catch(handleError);
863
+ const l1Session = createSession(l1Info);
864
+ sessions.push(l1Session);
865
+ const proposeFilter = buildWithdrawalFilter("propose_output", options, bridgeId);
866
+ l1Session.subscribe({
867
+ event: "tx",
868
+ filter: proposeFilter
869
+ }, (tx) => {
870
+ const events = parseTxEvents(tx, "propose_output");
871
+ for (const attrs of events) {
872
+ if (attrs.bridge_id !== String(bridgeId)) continue;
873
+ callback({
874
+ status: "proposed",
875
+ outputIndex: BigInt(attrs.output_index ?? "0"),
876
+ l2BlockNumber: BigInt(attrs.l2_block_number ?? "0")
877
+ });
878
+ finalizationMsPromise.then((ms) => {
879
+ if (cleaned) return;
880
+ callback({
881
+ status: "waiting",
882
+ claimableAt: new Date(Date.now() + ms)
883
+ });
884
+ const timer = setTimeout(() => {
885
+ if (!cleaned) callback({ status: "claimable" });
886
+ }, ms);
887
+ timers.push(timer);
888
+ }).catch((err) => {
889
+ if (!cleaned) handleError(err);
890
+ });
891
+ }
892
+ }).then((sub) => {
893
+ if (!cleaned) subs.push(sub);
894
+ else sub.unsubscribe();
895
+ }).catch(handleError);
896
+ const claimFilter = buildWithdrawalFilter("finalize_token_withdrawal", options, bridgeId);
897
+ l1Session.subscribe({
898
+ event: "tx",
899
+ filter: claimFilter
900
+ }, (tx) => {
901
+ const events = parseTxEvents(tx, "finalize_token_withdrawal");
902
+ for (const attrs of events) {
903
+ if (options.l2Sequence !== void 0 && attrs.l2_sequence !== String(options.l2Sequence)) continue;
904
+ callback({
905
+ status: "claimed",
906
+ l2Sequence: BigInt(attrs.l2_sequence ?? "0"),
907
+ from: attrs.from ?? "",
908
+ to: attrs.to ?? "",
909
+ amount: attrs.amount ?? "0"
910
+ });
911
+ }
912
+ }).then((sub) => {
913
+ if (!cleaned) subs.push(sub);
914
+ else sub.unsubscribe();
915
+ }).catch(handleError);
916
+ return { unsubscribe: cleanup };
917
+ }
918
+ /**
919
+ * Generic helper: watch for a specific event status and wrap in a Promise.
920
+ * Resolves on matching event, rejects on error or timeout.
921
+ */
922
+ function waitForEvent(watchFn, provider, options, targetStatus, defaultTimeout, label) {
923
+ return new Promise((resolve, reject) => {
924
+ const timeout = options.timeout ?? defaultTimeout;
925
+ let settled = false;
926
+ const settle = () => {
927
+ if (settled) return false;
928
+ settled = true;
929
+ handle.unsubscribe();
930
+ if (timer) clearTimeout(timer);
931
+ return true;
932
+ };
933
+ const handle = watchFn(provider, {
934
+ ...options,
935
+ timeout: void 0,
936
+ onError: (err) => {
937
+ options.onError?.(err);
938
+ if (settle()) reject(err instanceof Error ? err : new Error(String(err)));
939
+ }
940
+ }, (event) => {
941
+ if (event.status === targetStatus && settle()) resolve(event);
942
+ });
943
+ const timer = setTimeout(() => {
944
+ if (settle()) reject(new TimeoutError(label, timeout));
945
+ }, timeout);
946
+ });
947
+ }
948
+ /**
949
+ * Wait for a deposit to be finalized on L2.
950
+ *
951
+ * Returns a Promise that resolves when the finalize_token_deposit event
952
+ * is observed on L2. Rejects on timeout (default: 5 minutes).
953
+ */
954
+ function waitForDeposit(provider, options) {
955
+ return waitForEvent(watchDeposit, provider, options, "finalized", 3e5, "waitForDeposit");
956
+ }
957
+ /**
958
+ * Wait for a withdrawal to become claimable on L1.
959
+ *
960
+ * Returns a Promise that resolves when the finalization period passes
961
+ * after an output proposal. Rejects on timeout (default: 2 hours).
962
+ */
963
+ function waitForClaimable(provider, options, createTransport) {
964
+ const watchFn = (p, opts, cb) => watchWithdrawal(p, opts, cb, createTransport);
965
+ return waitForEvent(watchFn, provider, options, "claimable", 72e5, "waitForClaimable");
966
+ }
967
+ //#endregion
968
+ //#region src/bridge/bridge.ts
969
+ var Bridge = class {
970
+ opBridge;
971
+ router;
972
+ constructor(provider, createTransport, routerUrl) {
973
+ this.provider = provider;
974
+ this.createTransport = createTransport;
975
+ this.opBridge = new OpBridgeInternal(provider, createTransport);
976
+ if (routerUrl) this.router = new RouterClient(routerUrl);
977
+ }
978
+ deposit(options) {
979
+ return this.opBridge.deposit(options);
980
+ }
981
+ withdraw(options) {
982
+ return this.opBridge.withdraw(options);
983
+ }
984
+ claim(options) {
985
+ return this.opBridge.claim(options);
986
+ }
987
+ getWithdrawals(l2ChainId, address, options) {
988
+ return this.opBridge.getWithdrawals(l2ChainId, address, options);
989
+ }
990
+ getWithdrawalStatus(l2ChainId, sequence) {
991
+ return this.opBridge.getWithdrawalStatus(l2ChainId, sequence);
992
+ }
993
+ listBridgeableChains() {
994
+ return this.opBridge.listBridgeableChains();
995
+ }
996
+ getBridgeId(l2ChainId) {
997
+ return this.opBridge.getBridgeId(l2ChainId);
998
+ }
999
+ requireRouter() {
1000
+ if (!this.router) throw new InitiaError("Router API not available for this network");
1001
+ return this.router;
1002
+ }
1003
+ route(options) {
1004
+ return this.requireRouter().route(options);
1005
+ }
1006
+ getRoutableAssets(chainIds) {
1007
+ return this.requireRouter().assets(chainIds);
1008
+ }
1009
+ /**
1010
+ * Resolve an asset by symbol on a specific chain.
1011
+ *
1012
+ * @returns The matching asset with denom, decimals, symbol, etc.
1013
+ * @throws If the symbol is not found or ambiguous (multiple matches).
1014
+ *
1015
+ * @example
1016
+ * ```typescript
1017
+ * const asset = await provider.bridge.resolveAsset('evm-1', 'INIT')
1018
+ * // → { denom: 'evm/2eE7...', decimals: 18, symbol: 'INIT', ... }
1019
+ * ```
1020
+ */
1021
+ async resolveAsset(chainId, symbol) {
1022
+ const matches = (await this.getRoutableAssets([chainId]))[chainId]?.filter((a) => a.symbol === symbol) ?? [];
1023
+ if (matches.length === 0) throw new InitiaError(`No asset with symbol '${symbol}' found on chain '${chainId}'`);
1024
+ if (matches.length > 1) {
1025
+ const denoms = matches.map((a) => a.denom).join(", ");
1026
+ throw new InitiaError(`Ambiguous symbol '${symbol}' on chain '${chainId}': ${matches.length} matches (${denoms}). Use getRoutableAssets() and specify denom directly.`);
1027
+ }
1028
+ return matches[0];
1029
+ }
1030
+ getRoutableChains(chainIds) {
1031
+ return this.requireRouter().chains(chainIds);
1032
+ }
1033
+ getBalances(queries) {
1034
+ return this.requireRouter().balances(queries);
1035
+ }
1036
+ nftTransfer(options) {
1037
+ return this.requireRouter().nftTransfer(options);
1038
+ }
1039
+ buildTransferMsgs(options) {
1040
+ return this.requireRouter().msgs(options);
1041
+ }
1042
+ getOpHook(options) {
1043
+ return this.requireRouter().opHook(options);
1044
+ }
1045
+ /**
1046
+ * Build and sign a Cosmos transaction from OP Hook messages.
1047
+ *
1048
+ * The hook messages (from getOpHook) are assembled into a Cosmos TxRaw,
1049
+ * signed with the appropriate sign mode, and returned as base64.
1050
+ * The L2's handleBridgeHook decodes and executes this transaction.
1051
+ *
1052
+ * opHook is minievm-only (ERC-20 6d↔18d wrapping). Default sign mode
1053
+ * is eip191 if the signer supports it, otherwise direct, then amino.
1054
+ *
1055
+ * @param hookResult - OP Hook data from getOpHook()
1056
+ * @param signer - Any Signer (Key, Keplr, WalletConnect, etc.)
1057
+ * @param options - Optional sign mode override and source chain ID
1058
+ */
1059
+ async signOpHook(hookResult, signer, options) {
1060
+ const chainInfo = this.provider.getChainInfo(hookResult.chainId);
1061
+ if (!chainInfo) throw new InitiaError(`Chain not found: ${hookResult.chainId}`);
1062
+ const registry = resolveRegistry(chainInfo);
1063
+ const messages = hookResult.hook.map((hookMsg) => {
1064
+ const typeUrl = hookMsg.msg_type_url;
1065
+ const typeName = typeUrl.startsWith("/") ? typeUrl.slice(1) : typeUrl;
1066
+ const schema = registry.getMessage(typeName);
1067
+ if (!schema) throw new InitiaError(`Unknown message type in opHook: ${typeUrl}. Ensure the chain config includes this message schema.`);
1068
+ let parsed;
1069
+ try {
1070
+ parsed = JSON.parse(hookMsg.msg);
1071
+ } catch (err) {
1072
+ throw new InitiaError(`Failed to parse opHook message JSON (type: ${typeUrl}): ` + (err instanceof Error ? err.message : String(err)));
1073
+ }
1074
+ let msg;
1075
+ try {
1076
+ msg = fromJson(schema, parsed, { registry });
1077
+ } catch (err) {
1078
+ throw new InitiaError(`Failed to deserialize opHook message (type: ${typeUrl}): ` + (err instanceof Error ? err.message : String(err)));
1079
+ }
1080
+ return new Message$1(schema, msg);
1081
+ });
1082
+ let signMode;
1083
+ if (options?.signMode) signMode = options.signMode;
1084
+ else switch (true) {
1085
+ case isEIP191Signer(signer):
1086
+ signMode = "eip191";
1087
+ break;
1088
+ case isDirectSigner(signer):
1089
+ signMode = "direct";
1090
+ break;
1091
+ case isAminoSigner(signer):
1092
+ signMode = "amino";
1093
+ break;
1094
+ default: throw new InitiaError("Signer must support signDirect, signAmino, or signPersonal");
1095
+ }
1096
+ if (signMode === "direct" && !isDirectSigner(signer)) throw new InitiaError("signMode \"direct\" requires a signer that implements signDirect");
1097
+ if (signMode === "amino" && !isAminoSigner(signer)) throw new InitiaError("signMode \"amino\" requires a signer that implements signAmino");
1098
+ if (signMode === "eip191" && !isEIP191Signer(signer)) throw new InitiaError("signMode \"eip191\" requires a signer that implements signPersonal");
1099
+ const ctx = buildChainContextFactory(this.createTransport, resolveServices, resolveMsgs)(chainInfo, { signer });
1100
+ const prefix = chainInfo.bech32Prefix ?? "init";
1101
+ const address = await signer.getAddress(prefix);
1102
+ let accountNumber = 0n;
1103
+ let sequence = 0n;
1104
+ try {
1105
+ const account = await ctx.getAccount({ address });
1106
+ accountNumber = account.number;
1107
+ sequence = account.sequence;
1108
+ } catch (err) {
1109
+ if (!isNotFoundError(err)) throw err;
1110
+ }
1111
+ if (options?.sourceChainId === hookResult.chainId) sequence += 2n;
1112
+ const unsignedTx = new UnsignedTx({
1113
+ msgs: messages,
1114
+ signMode,
1115
+ chainId: hookResult.chainId,
1116
+ accountNumber,
1117
+ sequence,
1118
+ fee: [],
1119
+ gasLimit: 0n,
1120
+ memo: "",
1121
+ timeoutHeight: 0n
1122
+ });
1123
+ const signed = await ctx.sign(unsignedTx);
1124
+ return {
1125
+ hook: base64.encode(signed.txBytes),
1126
+ signer: address
1127
+ };
1128
+ }
1129
+ trackTransfer(txHash, chainId) {
1130
+ return this.requireRouter().track(txHash, chainId);
1131
+ }
1132
+ getTransferStatus(txHash, chainId) {
1133
+ return this.requireRouter().status(txHash, chainId);
1134
+ }
1135
+ watchDeposit(options, callback) {
1136
+ return watchDeposit(this.provider, options, callback);
1137
+ }
1138
+ watchWithdrawal(options, callback) {
1139
+ return watchWithdrawal(this.provider, options, callback, this.createTransport);
1140
+ }
1141
+ waitForDeposit(options) {
1142
+ return waitForDeposit(this.provider, options);
1143
+ }
1144
+ waitForClaimable(options) {
1145
+ return waitForClaimable(this.provider, options, this.createTransport);
1146
+ }
1147
+ /**
1148
+ * Deposit L1 → L2 and wait for finalization on L2.
1149
+ *
1150
+ * Combines `deposit()` + `signAndBroadcast()` + `waitForDeposit()` into one call.
1151
+ *
1152
+ * @example
1153
+ * ```typescript
1154
+ * const event = await bridge.depositAndWait({
1155
+ * sender: key.address,
1156
+ * toChain: 'rollup-1',
1157
+ * amount: coin('uinit', 1_000_000),
1158
+ * signAndBroadcast: (msgs) => l1.signAndBroadcast(msgs),
1159
+ * })
1160
+ * console.log(event.status) // 'finalized'
1161
+ * ```
1162
+ */
1163
+ async depositAndWait(options) {
1164
+ const msg = this.deposit({
1165
+ sender: options.sender,
1166
+ to: options.to,
1167
+ toChain: options.toChain,
1168
+ amount: options.amount,
1169
+ data: options.data
1170
+ });
1171
+ await options.signAndBroadcast([msg]);
1172
+ return this.waitForDeposit({
1173
+ l2ChainId: options.toChain,
1174
+ sender: options.sender,
1175
+ recipient: options.to ?? options.sender,
1176
+ timeout: options.timeout
1177
+ });
1178
+ }
1179
+ /**
1180
+ * Withdraw L2 → L1, wait for finalization, and auto-claim on L1.
1181
+ *
1182
+ * Combines `withdraw()` + `signAndBroadcastL2()` + `waitForClaimable()` +
1183
+ * `getWithdrawals()` + `claim()` + `signAndBroadcastL1()`.
1184
+ *
1185
+ * @example
1186
+ * ```typescript
1187
+ * const withdrawal = await bridge.withdrawAndClaim({
1188
+ * sender: key.address,
1189
+ * amount: coin('uinit', 1_000_000),
1190
+ * l2ChainId: 'rollup-1',
1191
+ * signAndBroadcastL2: (msgs) => l2.signAndBroadcast(msgs),
1192
+ * signAndBroadcastL1: (msgs) => l1.signAndBroadcast(msgs),
1193
+ * })
1194
+ * ```
1195
+ */
1196
+ async withdrawAndClaim(options) {
1197
+ const withdrawMsg = this.withdraw({
1198
+ sender: options.sender,
1199
+ to: options.to,
1200
+ amount: options.amount
1201
+ });
1202
+ await options.signAndBroadcastL2([withdrawMsg]);
1203
+ await this.waitForClaimable({
1204
+ l2ChainId: options.l2ChainId,
1205
+ sender: options.sender,
1206
+ timeout: options.timeout
1207
+ });
1208
+ const recipient = options.to ?? options.sender;
1209
+ const claimable = (await this.getWithdrawals(options.l2ChainId, recipient)).find((w) => w.status.status === "claimable");
1210
+ if (!claimable) throw new InitiaError("No claimable withdrawal found after finalization");
1211
+ const claimMsg = this.claim({
1212
+ sender: recipient,
1213
+ withdrawal: claimable
1214
+ });
1215
+ await options.signAndBroadcastL1([claimMsg]);
1216
+ return claimable;
1217
+ }
1218
+ };
1219
+ //#endregion
1220
+ export { watchWithdrawal as a, fetchWithdrawals as c, watchDeposit as i, waitForClaimable as n, calculateWithdrawalHash as o, waitForDeposit as r, fetchWithdrawal as s, Bridge as t };
1221
+
1222
+ //# sourceMappingURL=bridge-DL-q-7P7.mjs.map