@paimaexample/wallets 0.3.117

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 (700) hide show
  1. package/README.md +1 -0
  2. package/esm/chain-types/src/hash.d.ts +28 -0
  3. package/esm/chain-types/src/hash.d.ts.map +1 -0
  4. package/esm/chain-types/src/hash.js +29 -0
  5. package/esm/chain-types/src/mod.d.ts +3 -0
  6. package/esm/chain-types/src/mod.d.ts.map +1 -0
  7. package/esm/chain-types/src/mod.js +2 -0
  8. package/esm/chain-types/src/types.d.ts +70 -0
  9. package/esm/chain-types/src/types.d.ts.map +1 -0
  10. package/esm/chain-types/src/types.js +1 -0
  11. package/esm/concise/src/batcher.d.ts +40 -0
  12. package/esm/concise/src/batcher.d.ts.map +1 -0
  13. package/esm/concise/src/batcher.js +117 -0
  14. package/esm/concise/src/delegate.d.ts +18 -0
  15. package/esm/concise/src/delegate.d.ts.map +1 -0
  16. package/esm/concise/src/delegate.js +118 -0
  17. package/esm/concise/src/mod.d.ts +5 -0
  18. package/esm/concise/src/mod.d.ts.map +1 -0
  19. package/esm/concise/src/mod.js +3 -0
  20. package/esm/concise/src/v2/builtins/batcher.d.ts +27 -0
  21. package/esm/concise/src/v2/builtins/batcher.d.ts.map +1 -0
  22. package/esm/concise/src/v2/builtins/batcher.js +51 -0
  23. package/esm/concise/src/v2/builtins/grammar.d.ts +25 -0
  24. package/esm/concise/src/v2/builtins/grammar.d.ts.map +1 -0
  25. package/esm/concise/src/v2/builtins/grammar.js +40 -0
  26. package/esm/concise/src/v2/builtins/index.d.ts +3 -0
  27. package/esm/concise/src/v2/builtins/index.d.ts.map +1 -0
  28. package/esm/concise/src/v2/builtins/index.js +3 -0
  29. package/esm/concise/src/v2/grammar.d.ts +8 -0
  30. package/esm/concise/src/v2/grammar.d.ts.map +1 -0
  31. package/esm/concise/src/v2/grammar.js +19 -0
  32. package/esm/concise/src/v2/inputs.d.ts +7 -0
  33. package/esm/concise/src/v2/inputs.d.ts.map +1 -0
  34. package/esm/concise/src/v2/inputs.js +37 -0
  35. package/esm/concise/src/v2/mod.d.ts +5 -0
  36. package/esm/concise/src/v2/mod.d.ts.map +1 -0
  37. package/esm/concise/src/v2/mod.js +4 -0
  38. package/esm/concise/src/v2/types.d.ts +23 -0
  39. package/esm/concise/src/v2/types.d.ts.map +1 -0
  40. package/esm/concise/src/v2/types.js +1 -0
  41. package/esm/config/src/config/builder.d.ts +33 -0
  42. package/esm/config/src/config/builder.d.ts.map +1 -0
  43. package/esm/config/src/config/builder.js +82 -0
  44. package/esm/config/src/config/configCheck.d.ts +32 -0
  45. package/esm/config/src/config/configCheck.d.ts.map +1 -0
  46. package/esm/config/src/config/configCheck.js +67 -0
  47. package/esm/config/src/config/context.d.ts +23 -0
  48. package/esm/config/src/config/context.d.ts.map +1 -0
  49. package/esm/config/src/config/context.js +25 -0
  50. package/esm/config/src/config/mod.d.ts +7 -0
  51. package/esm/config/src/config/mod.d.ts.map +1 -0
  52. package/esm/config/src/config/mod.js +4 -0
  53. package/esm/config/src/config/parts/deployedAddresses.d.ts +17 -0
  54. package/esm/config/src/config/parts/deployedAddresses.d.ts.map +1 -0
  55. package/esm/config/src/config/parts/deployedAddresses.js +24 -0
  56. package/esm/config/src/config/parts/network.d.ts +19 -0
  57. package/esm/config/src/config/parts/network.d.ts.map +1 -0
  58. package/esm/config/src/config/parts/network.js +29 -0
  59. package/esm/config/src/config/parts/primitive.d.ts +31 -0
  60. package/esm/config/src/config/parts/primitive.d.ts.map +1 -0
  61. package/esm/config/src/config/parts/primitive.js +28 -0
  62. package/esm/config/src/config/parts/securityNamespace.d.ts +14 -0
  63. package/esm/config/src/config/parts/securityNamespace.d.ts.map +1 -0
  64. package/esm/config/src/config/parts/securityNamespace.js +26 -0
  65. package/esm/config/src/config/parts/syncProtocols.d.ts +43 -0
  66. package/esm/config/src/config/parts/syncProtocols.d.ts.map +1 -0
  67. package/esm/config/src/config/parts/syncProtocols.js +66 -0
  68. package/esm/config/src/config/utils.d.ts +40 -0
  69. package/esm/config/src/config/utils.d.ts.map +1 -0
  70. package/esm/config/src/config/utils.js +55 -0
  71. package/esm/config/src/mod.d.ts +3 -0
  72. package/esm/config/src/mod.d.ts.map +1 -0
  73. package/esm/config/src/mod.js +2 -0
  74. package/esm/config/src/schema/common.d.ts +26 -0
  75. package/esm/config/src/schema/common.d.ts.map +1 -0
  76. package/esm/config/src/schema/common.js +51 -0
  77. package/esm/config/src/schema/mod.d.ts +7 -0
  78. package/esm/config/src/schema/mod.d.ts.map +1 -0
  79. package/esm/config/src/schema/mod.js +6 -0
  80. package/esm/config/src/schema/namespace.d.ts +39 -0
  81. package/esm/config/src/schema/namespace.d.ts.map +1 -0
  82. package/esm/config/src/schema/namespace.js +34 -0
  83. package/esm/config/src/schema/network/algorand.d.ts +12 -0
  84. package/esm/config/src/schema/network/algorand.d.ts.map +1 -0
  85. package/esm/config/src/schema/network/algorand.js +23 -0
  86. package/esm/config/src/schema/network/all.d.ts +175 -0
  87. package/esm/config/src/schema/network/all.d.ts.map +1 -0
  88. package/esm/config/src/schema/network/all.js +24 -0
  89. package/esm/config/src/schema/network/bitcoin.d.ts +19 -0
  90. package/esm/config/src/schema/network/bitcoin.d.ts.map +1 -0
  91. package/esm/config/src/schema/network/bitcoin.js +21 -0
  92. package/esm/config/src/schema/network/cardano.d.ts +12 -0
  93. package/esm/config/src/schema/network/cardano.d.ts.map +1 -0
  94. package/esm/config/src/schema/network/cardano.js +27 -0
  95. package/esm/config/src/schema/network/evm.d.ts +68 -0
  96. package/esm/config/src/schema/network/evm.d.ts.map +1 -0
  97. package/esm/config/src/schema/network/evm.js +70 -0
  98. package/esm/config/src/schema/network/mina.d.ts +14 -0
  99. package/esm/config/src/schema/network/mina.d.ts.map +1 -0
  100. package/esm/config/src/schema/network/mina.js +25 -0
  101. package/esm/config/src/schema/network/mod.d.ts +9 -0
  102. package/esm/config/src/schema/network/mod.d.ts.map +1 -0
  103. package/esm/config/src/schema/network/mod.js +8 -0
  104. package/esm/config/src/schema/network/ntp.d.ts +32 -0
  105. package/esm/config/src/schema/network/ntp.d.ts.map +1 -0
  106. package/esm/config/src/schema/network/ntp.js +39 -0
  107. package/esm/config/src/schema/network/substrate/avail.d.ts +14 -0
  108. package/esm/config/src/schema/network/substrate/avail.d.ts.map +1 -0
  109. package/esm/config/src/schema/network/substrate/avail.js +26 -0
  110. package/esm/config/src/schema/network/substrate/common.d.ts +18 -0
  111. package/esm/config/src/schema/network/substrate/common.d.ts.map +1 -0
  112. package/esm/config/src/schema/network/substrate/common.js +32 -0
  113. package/esm/config/src/schema/network/substrate/midnight.d.ts +20 -0
  114. package/esm/config/src/schema/network/substrate/midnight.d.ts.map +1 -0
  115. package/esm/config/src/schema/network/substrate/midnight.js +32 -0
  116. package/esm/config/src/schema/network/substrate/mod.d.ts +4 -0
  117. package/esm/config/src/schema/network/substrate/mod.d.ts.map +1 -0
  118. package/esm/config/src/schema/network/substrate/mod.js +3 -0
  119. package/esm/config/src/schema/network/types.d.ts +13 -0
  120. package/esm/config/src/schema/network/types.d.ts.map +1 -0
  121. package/esm/config/src/schema/network/types.js +13 -0
  122. package/esm/config/src/schema/network/utils.d.ts +5 -0
  123. package/esm/config/src/schema/network/utils.d.ts.map +1 -0
  124. package/esm/config/src/schema/network/utils.js +73 -0
  125. package/esm/config/src/schema/primitive/mod.d.ts +2 -0
  126. package/esm/config/src/schema/primitive/mod.d.ts.map +1 -0
  127. package/esm/config/src/schema/primitive/mod.js +1 -0
  128. package/esm/config/src/schema/primitive/types.d.ts +58 -0
  129. package/esm/config/src/schema/primitive/types.d.ts.map +1 -0
  130. package/esm/config/src/schema/primitive/types.js +1 -0
  131. package/esm/config/src/schema/sync-protocols/all.d.ts +583 -0
  132. package/esm/config/src/schema/sync-protocols/all.d.ts.map +1 -0
  133. package/esm/config/src/schema/sync-protocols/all.js +55 -0
  134. package/esm/config/src/schema/sync-protocols/avail/rpc.d.ts +76 -0
  135. package/esm/config/src/schema/sync-protocols/avail/rpc.d.ts.map +1 -0
  136. package/esm/config/src/schema/sync-protocols/avail/rpc.js +56 -0
  137. package/esm/config/src/schema/sync-protocols/bitcoin/rpc.d.ts +76 -0
  138. package/esm/config/src/schema/sync-protocols/bitcoin/rpc.d.ts.map +1 -0
  139. package/esm/config/src/schema/sync-protocols/bitcoin/rpc.js +47 -0
  140. package/esm/config/src/schema/sync-protocols/cardano/carp.d.ts +80 -0
  141. package/esm/config/src/schema/sync-protocols/cardano/carp.d.ts.map +1 -0
  142. package/esm/config/src/schema/sync-protocols/cardano/carp.js +62 -0
  143. package/esm/config/src/schema/sync-protocols/cardano/mod.d.ts +2 -0
  144. package/esm/config/src/schema/sync-protocols/cardano/mod.d.ts.map +1 -0
  145. package/esm/config/src/schema/sync-protocols/cardano/mod.js +1 -0
  146. package/esm/config/src/schema/sync-protocols/cardano/utxorpc.d.ts +56 -0
  147. package/esm/config/src/schema/sync-protocols/cardano/utxorpc.d.ts.map +1 -0
  148. package/esm/config/src/schema/sync-protocols/cardano/utxorpc.js +56 -0
  149. package/esm/config/src/schema/sync-protocols/common.d.ts +60 -0
  150. package/esm/config/src/schema/sync-protocols/common.d.ts.map +1 -0
  151. package/esm/config/src/schema/sync-protocols/common.js +54 -0
  152. package/esm/config/src/schema/sync-protocols/decorators/all.d.ts +17 -0
  153. package/esm/config/src/schema/sync-protocols/decorators/all.d.ts.map +1 -0
  154. package/esm/config/src/schema/sync-protocols/decorators/all.js +8 -0
  155. package/esm/config/src/schema/sync-protocols/decorators/emulated.d.ts +8 -0
  156. package/esm/config/src/schema/sync-protocols/decorators/emulated.d.ts.map +1 -0
  157. package/esm/config/src/schema/sync-protocols/decorators/emulated.js +12 -0
  158. package/esm/config/src/schema/sync-protocols/decorators/mod.d.ts +4 -0
  159. package/esm/config/src/schema/sync-protocols/decorators/mod.d.ts.map +1 -0
  160. package/esm/config/src/schema/sync-protocols/decorators/mod.js +3 -0
  161. package/esm/config/src/schema/sync-protocols/decorators/types.d.ts +4 -0
  162. package/esm/config/src/schema/sync-protocols/decorators/types.d.ts.map +1 -0
  163. package/esm/config/src/schema/sync-protocols/decorators/types.js +4 -0
  164. package/esm/config/src/schema/sync-protocols/evm/rpc.d.ts +68 -0
  165. package/esm/config/src/schema/sync-protocols/evm/rpc.d.ts.map +1 -0
  166. package/esm/config/src/schema/sync-protocols/evm/rpc.js +44 -0
  167. package/esm/config/src/schema/sync-protocols/midnight/graphql.d.ts +66 -0
  168. package/esm/config/src/schema/sync-protocols/midnight/graphql.d.ts.map +1 -0
  169. package/esm/config/src/schema/sync-protocols/midnight/graphql.js +50 -0
  170. package/esm/config/src/schema/sync-protocols/mina/graphql.d.ts +73 -0
  171. package/esm/config/src/schema/sync-protocols/mina/graphql.d.ts.map +1 -0
  172. package/esm/config/src/schema/sync-protocols/mina/graphql.js +59 -0
  173. package/esm/config/src/schema/sync-protocols/mod.d.ts +10 -0
  174. package/esm/config/src/schema/sync-protocols/mod.d.ts.map +1 -0
  175. package/esm/config/src/schema/sync-protocols/mod.js +9 -0
  176. package/esm/config/src/schema/sync-protocols/ntp/rpc.d.ts +45 -0
  177. package/esm/config/src/schema/sync-protocols/ntp/rpc.d.ts.map +1 -0
  178. package/esm/config/src/schema/sync-protocols/ntp/rpc.js +33 -0
  179. package/esm/config/src/schema/sync-protocols/types.d.ts +125 -0
  180. package/esm/config/src/schema/sync-protocols/types.d.ts.map +1 -0
  181. package/esm/config/src/schema/sync-protocols/types.js +22 -0
  182. package/esm/config/src/schema/utils.d.ts +53 -0
  183. package/esm/config/src/schema/utils.d.ts.map +1 -0
  184. package/esm/config/src/schema/utils.js +58 -0
  185. package/esm/events/src/app-events.d.ts +65 -0
  186. package/esm/events/src/app-events.d.ts.map +1 -0
  187. package/esm/events/src/app-events.js +51 -0
  188. package/esm/events/src/asyncapi.d.ts +1173 -0
  189. package/esm/events/src/asyncapi.d.ts.map +1 -0
  190. package/esm/events/src/asyncapi.js +7 -0
  191. package/esm/events/src/builtin-event-utils.d.ts +5 -0
  192. package/esm/events/src/builtin-event-utils.d.ts.map +1 -0
  193. package/esm/events/src/builtin-event-utils.js +58 -0
  194. package/esm/events/src/builtin-events.d.ts +106 -0
  195. package/esm/events/src/builtin-events.d.ts.map +1 -0
  196. package/esm/events/src/builtin-events.js +198 -0
  197. package/esm/events/src/event-connect.d.ts +15 -0
  198. package/esm/events/src/event-connect.d.ts.map +1 -0
  199. package/esm/events/src/event-connect.js +75 -0
  200. package/esm/events/src/event-manager.d.ts +54 -0
  201. package/esm/events/src/event-manager.d.ts.map +1 -0
  202. package/esm/events/src/event-manager.js +129 -0
  203. package/esm/events/src/evm.d.ts +6 -0
  204. package/esm/events/src/evm.d.ts.map +1 -0
  205. package/esm/events/src/evm.js +55 -0
  206. package/esm/events/src/mod.d.ts +10 -0
  207. package/esm/events/src/mod.d.ts.map +1 -0
  208. package/esm/events/src/mod.js +9 -0
  209. package/esm/events/src/types.d.ts +255 -0
  210. package/esm/events/src/types.d.ts.map +1 -0
  211. package/esm/events/src/types.js +103 -0
  212. package/esm/events/src/utils.d.ts +16 -0
  213. package/esm/events/src/utils.d.ts.map +1 -0
  214. package/esm/events/src/utils.js +93 -0
  215. package/esm/package.json +3 -0
  216. package/esm/utils/src/binary-search.d.ts +7 -0
  217. package/esm/utils/src/binary-search.d.ts.map +1 -0
  218. package/esm/utils/src/binary-search.js +38 -0
  219. package/esm/utils/src/captcha.d.ts +9 -0
  220. package/esm/utils/src/captcha.d.ts.map +1 -0
  221. package/esm/utils/src/captcha.js +19 -0
  222. package/esm/utils/src/concurrency/condVar.d.ts +25 -0
  223. package/esm/utils/src/concurrency/condVar.d.ts.map +1 -0
  224. package/esm/utils/src/concurrency/condVar.js +39 -0
  225. package/esm/utils/src/concurrency/latch.d.ts +25 -0
  226. package/esm/utils/src/concurrency/latch.d.ts.map +1 -0
  227. package/esm/utils/src/concurrency/latch.js +51 -0
  228. package/esm/utils/src/concurrency/mod.d.ts +5 -0
  229. package/esm/utils/src/concurrency/mod.d.ts.map +1 -0
  230. package/esm/utils/src/concurrency/mod.js +4 -0
  231. package/esm/utils/src/concurrency/retry.d.ts +14 -0
  232. package/esm/utils/src/concurrency/retry.d.ts.map +1 -0
  233. package/esm/utils/src/concurrency/retry.js +26 -0
  234. package/esm/utils/src/concurrency/utils.d.ts +27 -0
  235. package/esm/utils/src/concurrency/utils.d.ts.map +1 -0
  236. package/esm/utils/src/concurrency/utils.js +27 -0
  237. package/esm/utils/src/constants.d.ts +4 -0
  238. package/esm/utils/src/constants.d.ts.map +1 -0
  239. package/esm/utils/src/constants.js +7 -0
  240. package/esm/utils/src/decorators/bound.d.ts +10 -0
  241. package/esm/utils/src/decorators/bound.d.ts.map +1 -0
  242. package/esm/utils/src/decorators/bound.js +17 -0
  243. package/esm/utils/src/decorators/mod.d.ts +2 -0
  244. package/esm/utils/src/decorators/mod.d.ts.map +1 -0
  245. package/esm/utils/src/decorators/mod.js +1 -0
  246. package/esm/utils/src/mod.d.ts +8 -0
  247. package/esm/utils/src/mod.d.ts.map +1 -0
  248. package/esm/utils/src/mod.js +7 -0
  249. package/esm/utils/src/types/json-query.d.ts +30 -0
  250. package/esm/utils/src/types/json-query.d.ts.map +1 -0
  251. package/esm/utils/src/types/json-query.js +1 -0
  252. package/esm/utils/src/types/misc.d.ts +109 -0
  253. package/esm/utils/src/types/misc.d.ts.map +1 -0
  254. package/esm/utils/src/types/misc.js +2 -0
  255. package/esm/utils/src/types/mod.d.ts +7 -0
  256. package/esm/utils/src/types/mod.d.ts.map +1 -0
  257. package/esm/utils/src/types/mod.js +3 -0
  258. package/esm/utils/src/types/nominal.d.ts +87 -0
  259. package/esm/utils/src/types/nominal.d.ts.map +1 -0
  260. package/esm/utils/src/types/nominal.js +1 -0
  261. package/esm/utils/src/types/typebox-helpers.d.ts +183 -0
  262. package/esm/utils/src/types/typebox-helpers.d.ts.map +1 -0
  263. package/esm/utils/src/types/typebox-helpers.js +235 -0
  264. package/esm/utils/src/types/utils.d.ts +37 -0
  265. package/esm/utils/src/types/utils.d.ts.map +1 -0
  266. package/esm/utils/src/types/utils.js +46 -0
  267. package/esm/utils/src/types/validators/algorand.d.ts +31 -0
  268. package/esm/utils/src/types/validators/algorand.d.ts.map +1 -0
  269. package/esm/utils/src/types/validators/algorand.js +90 -0
  270. package/esm/utils/src/types/validators/cardano.d.ts +26 -0
  271. package/esm/utils/src/types/validators/cardano.d.ts.map +1 -0
  272. package/esm/utils/src/types/validators/cardano.js +113 -0
  273. package/esm/utils/src/types/validators/mina.d.ts +15 -0
  274. package/esm/utils/src/types/validators/mina.d.ts.map +1 -0
  275. package/esm/utils/src/types/validators/mina.js +43 -0
  276. package/esm/utils/src/types/validators/minicbor.d.ts +98 -0
  277. package/esm/utils/src/types/validators/minicbor.d.ts.map +1 -0
  278. package/esm/utils/src/types/validators/minicbor.js +332 -0
  279. package/esm/utils/src/types/validators/mod.d.ts +3 -0
  280. package/esm/utils/src/types/validators/mod.d.ts.map +1 -0
  281. package/esm/utils/src/types/validators/mod.js +2 -0
  282. package/esm/utils/src/types/validators/utils.d.ts +6 -0
  283. package/esm/utils/src/types/validators/utils.d.ts.map +1 -0
  284. package/esm/utils/src/types/validators/utils.js +24 -0
  285. package/esm/utils/src/viem.d.ts +6 -0
  286. package/esm/utils/src/viem.d.ts.map +1 -0
  287. package/esm/utils/src/viem.js +15 -0
  288. package/esm/wallets/src/IProvider.d.ts +48 -0
  289. package/esm/wallets/src/IProvider.d.ts.map +1 -0
  290. package/esm/wallets/src/IProvider.js +7 -0
  291. package/esm/wallets/src/avail/avail.d.ts +28 -0
  292. package/esm/wallets/src/avail/avail.d.ts.map +1 -0
  293. package/esm/wallets/src/avail/avail.js +65 -0
  294. package/esm/wallets/src/avail/wrapper.d.ts +6 -0
  295. package/esm/wallets/src/avail/wrapper.d.ts.map +1 -0
  296. package/esm/wallets/src/avail/wrapper.js +31 -0
  297. package/esm/wallets/src/cardano/cardano.d.ts +30 -0
  298. package/esm/wallets/src/cardano/cardano.d.ts.map +1 -0
  299. package/esm/wallets/src/cardano/cardano.js +158 -0
  300. package/esm/wallets/src/cardano/wrapper.d.ts +7 -0
  301. package/esm/wallets/src/cardano/wrapper.d.ts.map +1 -0
  302. package/esm/wallets/src/cardano/wrapper.js +22 -0
  303. package/esm/wallets/src/evm/ethers.d.ts +28 -0
  304. package/esm/wallets/src/evm/ethers.d.ts.map +1 -0
  305. package/esm/wallets/src/evm/ethers.js +79 -0
  306. package/esm/wallets/src/evm/injected.d.ts +74 -0
  307. package/esm/wallets/src/evm/injected.d.ts.map +1 -0
  308. package/esm/wallets/src/evm/injected.js +322 -0
  309. package/esm/wallets/src/evm/types.d.ts +3 -0
  310. package/esm/wallets/src/evm/types.d.ts.map +1 -0
  311. package/esm/wallets/src/evm/types.js +1 -0
  312. package/esm/wallets/src/evm/wrapper-ethers.d.ts +6 -0
  313. package/esm/wallets/src/evm/wrapper-ethers.d.ts.map +1 -0
  314. package/esm/wallets/src/evm/wrapper-ethers.js +38 -0
  315. package/esm/wallets/src/evm/wrapper-injected.d.ts +7 -0
  316. package/esm/wallets/src/evm/wrapper-injected.d.ts.map +1 -0
  317. package/esm/wallets/src/evm/wrapper-injected.js +80 -0
  318. package/esm/wallets/src/midnight/midnight.d.ts +26 -0
  319. package/esm/wallets/src/midnight/midnight.d.ts.map +1 -0
  320. package/esm/wallets/src/midnight/midnight.js +112 -0
  321. package/esm/wallets/src/midnight/wrapper.d.ts +7 -0
  322. package/esm/wallets/src/midnight/wrapper.d.ts.map +1 -0
  323. package/esm/wallets/src/midnight/wrapper.js +22 -0
  324. package/esm/wallets/src/mina/mina.d.ts +28 -0
  325. package/esm/wallets/src/mina/mina.d.ts.map +1 -0
  326. package/esm/wallets/src/mina/mina.js +133 -0
  327. package/esm/wallets/src/mina/wrapper.d.ts +6 -0
  328. package/esm/wallets/src/mina/wrapper.d.ts.map +1 -0
  329. package/esm/wallets/src/mina/wrapper.js +12 -0
  330. package/esm/wallets/src/mod.d.ts +8 -0
  331. package/esm/wallets/src/mod.d.ts.map +1 -0
  332. package/esm/wallets/src/mod.js +5 -0
  333. package/esm/wallets/src/paima.d.ts +104 -0
  334. package/esm/wallets/src/paima.d.ts.map +1 -0
  335. package/esm/wallets/src/paima.js +244 -0
  336. package/esm/wallets/src/types.d.ts +49 -0
  337. package/esm/wallets/src/types.d.ts.map +1 -0
  338. package/esm/wallets/src/types.js +1 -0
  339. package/esm/wallets/src/utils.d.ts +41 -0
  340. package/esm/wallets/src/utils.d.ts.map +1 -0
  341. package/esm/wallets/src/utils.js +75 -0
  342. package/esm/wallets/src/wallet-modes.d.ts +49 -0
  343. package/esm/wallets/src/wallet-modes.d.ts.map +1 -0
  344. package/esm/wallets/src/wallet-modes.js +26 -0
  345. package/esm/wallets/src/wallets.d.ts +5 -0
  346. package/esm/wallets/src/wallets.d.ts.map +1 -0
  347. package/esm/wallets/src/wallets.js +55 -0
  348. package/esm/wallets/src/windows.d.ts +5 -0
  349. package/esm/wallets/src/windows.d.ts.map +1 -0
  350. package/esm/wallets/src/windows.js +9 -0
  351. package/package.json +51 -0
  352. package/script/chain-types/src/hash.d.ts +28 -0
  353. package/script/chain-types/src/hash.d.ts.map +1 -0
  354. package/script/chain-types/src/hash.js +36 -0
  355. package/script/chain-types/src/mod.d.ts +3 -0
  356. package/script/chain-types/src/mod.d.ts.map +1 -0
  357. package/script/chain-types/src/mod.js +18 -0
  358. package/script/chain-types/src/types.d.ts +70 -0
  359. package/script/chain-types/src/types.d.ts.map +1 -0
  360. package/script/chain-types/src/types.js +2 -0
  361. package/script/concise/src/batcher.d.ts +40 -0
  362. package/script/concise/src/batcher.d.ts.map +1 -0
  363. package/script/concise/src/batcher.js +122 -0
  364. package/script/concise/src/delegate.d.ts +18 -0
  365. package/script/concise/src/delegate.d.ts.map +1 -0
  366. package/script/concise/src/delegate.js +123 -0
  367. package/script/concise/src/mod.d.ts +5 -0
  368. package/script/concise/src/mod.d.ts.map +1 -0
  369. package/script/concise/src/mod.js +19 -0
  370. package/script/concise/src/v2/builtins/batcher.d.ts +27 -0
  371. package/script/concise/src/v2/builtins/batcher.d.ts.map +1 -0
  372. package/script/concise/src/v2/builtins/batcher.js +54 -0
  373. package/script/concise/src/v2/builtins/grammar.d.ts +25 -0
  374. package/script/concise/src/v2/builtins/grammar.d.ts.map +1 -0
  375. package/script/concise/src/v2/builtins/grammar.js +43 -0
  376. package/script/concise/src/v2/builtins/index.d.ts +3 -0
  377. package/script/concise/src/v2/builtins/index.d.ts.map +1 -0
  378. package/script/concise/src/v2/builtins/index.js +19 -0
  379. package/script/concise/src/v2/grammar.d.ts +8 -0
  380. package/script/concise/src/v2/grammar.d.ts.map +1 -0
  381. package/script/concise/src/v2/grammar.js +24 -0
  382. package/script/concise/src/v2/inputs.d.ts +7 -0
  383. package/script/concise/src/v2/inputs.d.ts.map +1 -0
  384. package/script/concise/src/v2/inputs.js +43 -0
  385. package/script/concise/src/v2/mod.d.ts +5 -0
  386. package/script/concise/src/v2/mod.d.ts.map +1 -0
  387. package/script/concise/src/v2/mod.js +20 -0
  388. package/script/concise/src/v2/types.d.ts +23 -0
  389. package/script/concise/src/v2/types.d.ts.map +1 -0
  390. package/script/concise/src/v2/types.js +2 -0
  391. package/script/config/src/config/builder.d.ts +33 -0
  392. package/script/config/src/config/builder.d.ts.map +1 -0
  393. package/script/config/src/config/builder.js +86 -0
  394. package/script/config/src/config/configCheck.d.ts +32 -0
  395. package/script/config/src/config/configCheck.d.ts.map +1 -0
  396. package/script/config/src/config/configCheck.js +70 -0
  397. package/script/config/src/config/context.d.ts +23 -0
  398. package/script/config/src/config/context.d.ts.map +1 -0
  399. package/script/config/src/config/context.js +31 -0
  400. package/script/config/src/config/mod.d.ts +7 -0
  401. package/script/config/src/config/mod.d.ts.map +1 -0
  402. package/script/config/src/config/mod.js +22 -0
  403. package/script/config/src/config/parts/deployedAddresses.d.ts +17 -0
  404. package/script/config/src/config/parts/deployedAddresses.d.ts.map +1 -0
  405. package/script/config/src/config/parts/deployedAddresses.js +28 -0
  406. package/script/config/src/config/parts/network.d.ts +19 -0
  407. package/script/config/src/config/parts/network.d.ts.map +1 -0
  408. package/script/config/src/config/parts/network.js +33 -0
  409. package/script/config/src/config/parts/primitive.d.ts +31 -0
  410. package/script/config/src/config/parts/primitive.d.ts.map +1 -0
  411. package/script/config/src/config/parts/primitive.js +32 -0
  412. package/script/config/src/config/parts/securityNamespace.d.ts +14 -0
  413. package/script/config/src/config/parts/securityNamespace.d.ts.map +1 -0
  414. package/script/config/src/config/parts/securityNamespace.js +30 -0
  415. package/script/config/src/config/parts/syncProtocols.d.ts +43 -0
  416. package/script/config/src/config/parts/syncProtocols.d.ts.map +1 -0
  417. package/script/config/src/config/parts/syncProtocols.js +70 -0
  418. package/script/config/src/config/utils.d.ts +40 -0
  419. package/script/config/src/config/utils.d.ts.map +1 -0
  420. package/script/config/src/config/utils.js +62 -0
  421. package/script/config/src/mod.d.ts +3 -0
  422. package/script/config/src/mod.d.ts.map +1 -0
  423. package/script/config/src/mod.js +18 -0
  424. package/script/config/src/schema/common.d.ts +26 -0
  425. package/script/config/src/schema/common.d.ts.map +1 -0
  426. package/script/config/src/schema/common.js +54 -0
  427. package/script/config/src/schema/mod.d.ts +7 -0
  428. package/script/config/src/schema/mod.d.ts.map +1 -0
  429. package/script/config/src/schema/mod.js +22 -0
  430. package/script/config/src/schema/namespace.d.ts +39 -0
  431. package/script/config/src/schema/namespace.d.ts.map +1 -0
  432. package/script/config/src/schema/namespace.js +38 -0
  433. package/script/config/src/schema/network/algorand.d.ts +12 -0
  434. package/script/config/src/schema/network/algorand.d.ts.map +1 -0
  435. package/script/config/src/schema/network/algorand.js +26 -0
  436. package/script/config/src/schema/network/all.d.ts +175 -0
  437. package/script/config/src/schema/network/all.d.ts.map +1 -0
  438. package/script/config/src/schema/network/all.js +28 -0
  439. package/script/config/src/schema/network/bitcoin.d.ts +19 -0
  440. package/script/config/src/schema/network/bitcoin.d.ts.map +1 -0
  441. package/script/config/src/schema/network/bitcoin.js +24 -0
  442. package/script/config/src/schema/network/cardano.d.ts +12 -0
  443. package/script/config/src/schema/network/cardano.d.ts.map +1 -0
  444. package/script/config/src/schema/network/cardano.js +30 -0
  445. package/script/config/src/schema/network/evm.d.ts +68 -0
  446. package/script/config/src/schema/network/evm.d.ts.map +1 -0
  447. package/script/config/src/schema/network/evm.js +75 -0
  448. package/script/config/src/schema/network/mina.d.ts +14 -0
  449. package/script/config/src/schema/network/mina.d.ts.map +1 -0
  450. package/script/config/src/schema/network/mina.js +28 -0
  451. package/script/config/src/schema/network/mod.d.ts +9 -0
  452. package/script/config/src/schema/network/mod.d.ts.map +1 -0
  453. package/script/config/src/schema/network/mod.js +24 -0
  454. package/script/config/src/schema/network/ntp.d.ts +32 -0
  455. package/script/config/src/schema/network/ntp.d.ts.map +1 -0
  456. package/script/config/src/schema/network/ntp.js +42 -0
  457. package/script/config/src/schema/network/substrate/avail.d.ts +14 -0
  458. package/script/config/src/schema/network/substrate/avail.d.ts.map +1 -0
  459. package/script/config/src/schema/network/substrate/avail.js +29 -0
  460. package/script/config/src/schema/network/substrate/common.d.ts +18 -0
  461. package/script/config/src/schema/network/substrate/common.d.ts.map +1 -0
  462. package/script/config/src/schema/network/substrate/common.js +35 -0
  463. package/script/config/src/schema/network/substrate/midnight.d.ts +20 -0
  464. package/script/config/src/schema/network/substrate/midnight.d.ts.map +1 -0
  465. package/script/config/src/schema/network/substrate/midnight.js +35 -0
  466. package/script/config/src/schema/network/substrate/mod.d.ts +4 -0
  467. package/script/config/src/schema/network/substrate/mod.d.ts.map +1 -0
  468. package/script/config/src/schema/network/substrate/mod.js +19 -0
  469. package/script/config/src/schema/network/types.d.ts +13 -0
  470. package/script/config/src/schema/network/types.d.ts.map +1 -0
  471. package/script/config/src/schema/network/types.js +16 -0
  472. package/script/config/src/schema/network/utils.d.ts +5 -0
  473. package/script/config/src/schema/network/utils.d.ts.map +1 -0
  474. package/script/config/src/schema/network/utils.js +76 -0
  475. package/script/config/src/schema/primitive/mod.d.ts +2 -0
  476. package/script/config/src/schema/primitive/mod.d.ts.map +1 -0
  477. package/script/config/src/schema/primitive/mod.js +17 -0
  478. package/script/config/src/schema/primitive/types.d.ts +58 -0
  479. package/script/config/src/schema/primitive/types.d.ts.map +1 -0
  480. package/script/config/src/schema/primitive/types.js +2 -0
  481. package/script/config/src/schema/sync-protocols/all.d.ts +583 -0
  482. package/script/config/src/schema/sync-protocols/all.d.ts.map +1 -0
  483. package/script/config/src/schema/sync-protocols/all.js +62 -0
  484. package/script/config/src/schema/sync-protocols/avail/rpc.d.ts +76 -0
  485. package/script/config/src/schema/sync-protocols/avail/rpc.d.ts.map +1 -0
  486. package/script/config/src/schema/sync-protocols/avail/rpc.js +59 -0
  487. package/script/config/src/schema/sync-protocols/bitcoin/rpc.d.ts +76 -0
  488. package/script/config/src/schema/sync-protocols/bitcoin/rpc.d.ts.map +1 -0
  489. package/script/config/src/schema/sync-protocols/bitcoin/rpc.js +50 -0
  490. package/script/config/src/schema/sync-protocols/cardano/carp.d.ts +80 -0
  491. package/script/config/src/schema/sync-protocols/cardano/carp.d.ts.map +1 -0
  492. package/script/config/src/schema/sync-protocols/cardano/carp.js +65 -0
  493. package/script/config/src/schema/sync-protocols/cardano/mod.d.ts +2 -0
  494. package/script/config/src/schema/sync-protocols/cardano/mod.d.ts.map +1 -0
  495. package/script/config/src/schema/sync-protocols/cardano/mod.js +17 -0
  496. package/script/config/src/schema/sync-protocols/cardano/utxorpc.d.ts +56 -0
  497. package/script/config/src/schema/sync-protocols/cardano/utxorpc.d.ts.map +1 -0
  498. package/script/config/src/schema/sync-protocols/cardano/utxorpc.js +59 -0
  499. package/script/config/src/schema/sync-protocols/common.d.ts +60 -0
  500. package/script/config/src/schema/sync-protocols/common.d.ts.map +1 -0
  501. package/script/config/src/schema/sync-protocols/common.js +61 -0
  502. package/script/config/src/schema/sync-protocols/decorators/all.d.ts +17 -0
  503. package/script/config/src/schema/sync-protocols/decorators/all.d.ts.map +1 -0
  504. package/script/config/src/schema/sync-protocols/decorators/all.js +12 -0
  505. package/script/config/src/schema/sync-protocols/decorators/emulated.d.ts +8 -0
  506. package/script/config/src/schema/sync-protocols/decorators/emulated.d.ts.map +1 -0
  507. package/script/config/src/schema/sync-protocols/decorators/emulated.js +15 -0
  508. package/script/config/src/schema/sync-protocols/decorators/mod.d.ts +4 -0
  509. package/script/config/src/schema/sync-protocols/decorators/mod.d.ts.map +1 -0
  510. package/script/config/src/schema/sync-protocols/decorators/mod.js +19 -0
  511. package/script/config/src/schema/sync-protocols/decorators/types.d.ts +4 -0
  512. package/script/config/src/schema/sync-protocols/decorators/types.d.ts.map +1 -0
  513. package/script/config/src/schema/sync-protocols/decorators/types.js +7 -0
  514. package/script/config/src/schema/sync-protocols/evm/rpc.d.ts +68 -0
  515. package/script/config/src/schema/sync-protocols/evm/rpc.d.ts.map +1 -0
  516. package/script/config/src/schema/sync-protocols/evm/rpc.js +47 -0
  517. package/script/config/src/schema/sync-protocols/midnight/graphql.d.ts +66 -0
  518. package/script/config/src/schema/sync-protocols/midnight/graphql.d.ts.map +1 -0
  519. package/script/config/src/schema/sync-protocols/midnight/graphql.js +53 -0
  520. package/script/config/src/schema/sync-protocols/mina/graphql.d.ts +73 -0
  521. package/script/config/src/schema/sync-protocols/mina/graphql.d.ts.map +1 -0
  522. package/script/config/src/schema/sync-protocols/mina/graphql.js +62 -0
  523. package/script/config/src/schema/sync-protocols/mod.d.ts +10 -0
  524. package/script/config/src/schema/sync-protocols/mod.d.ts.map +1 -0
  525. package/script/config/src/schema/sync-protocols/mod.js +25 -0
  526. package/script/config/src/schema/sync-protocols/ntp/rpc.d.ts +45 -0
  527. package/script/config/src/schema/sync-protocols/ntp/rpc.d.ts.map +1 -0
  528. package/script/config/src/schema/sync-protocols/ntp/rpc.js +36 -0
  529. package/script/config/src/schema/sync-protocols/types.d.ts +125 -0
  530. package/script/config/src/schema/sync-protocols/types.d.ts.map +1 -0
  531. package/script/config/src/schema/sync-protocols/types.js +25 -0
  532. package/script/config/src/schema/utils.d.ts +53 -0
  533. package/script/config/src/schema/utils.d.ts.map +1 -0
  534. package/script/config/src/schema/utils.js +62 -0
  535. package/script/events/src/app-events.d.ts +65 -0
  536. package/script/events/src/app-events.d.ts.map +1 -0
  537. package/script/events/src/app-events.js +62 -0
  538. package/script/events/src/asyncapi.d.ts +1173 -0
  539. package/script/events/src/asyncapi.d.ts.map +1 -0
  540. package/script/events/src/asyncapi.js +8 -0
  541. package/script/events/src/builtin-event-utils.d.ts +5 -0
  542. package/script/events/src/builtin-event-utils.d.ts.map +1 -0
  543. package/script/events/src/builtin-event-utils.js +63 -0
  544. package/script/events/src/builtin-events.d.ts +106 -0
  545. package/script/events/src/builtin-events.d.ts.map +1 -0
  546. package/script/events/src/builtin-events.js +204 -0
  547. package/script/events/src/event-connect.d.ts +15 -0
  548. package/script/events/src/event-connect.d.ts.map +1 -0
  549. package/script/events/src/event-connect.js +82 -0
  550. package/script/events/src/event-manager.d.ts +54 -0
  551. package/script/events/src/event-manager.d.ts.map +1 -0
  552. package/script/events/src/event-manager.js +133 -0
  553. package/script/events/src/evm.d.ts +6 -0
  554. package/script/events/src/evm.d.ts.map +1 -0
  555. package/script/events/src/evm.js +59 -0
  556. package/script/events/src/mod.d.ts +10 -0
  557. package/script/events/src/mod.d.ts.map +1 -0
  558. package/script/events/src/mod.js +25 -0
  559. package/script/events/src/types.d.ts +255 -0
  560. package/script/events/src/types.d.ts.map +1 -0
  561. package/script/events/src/types.js +111 -0
  562. package/script/events/src/utils.d.ts +16 -0
  563. package/script/events/src/utils.d.ts.map +1 -0
  564. package/script/events/src/utils.js +98 -0
  565. package/script/package.json +3 -0
  566. package/script/utils/src/binary-search.d.ts +7 -0
  567. package/script/utils/src/binary-search.d.ts.map +1 -0
  568. package/script/utils/src/binary-search.js +41 -0
  569. package/script/utils/src/captcha.d.ts +9 -0
  570. package/script/utils/src/captcha.d.ts.map +1 -0
  571. package/script/utils/src/captcha.js +22 -0
  572. package/script/utils/src/concurrency/condVar.d.ts +25 -0
  573. package/script/utils/src/concurrency/condVar.d.ts.map +1 -0
  574. package/script/utils/src/concurrency/condVar.js +42 -0
  575. package/script/utils/src/concurrency/latch.d.ts +25 -0
  576. package/script/utils/src/concurrency/latch.d.ts.map +1 -0
  577. package/script/utils/src/concurrency/latch.js +54 -0
  578. package/script/utils/src/concurrency/mod.d.ts +5 -0
  579. package/script/utils/src/concurrency/mod.d.ts.map +1 -0
  580. package/script/utils/src/concurrency/mod.js +20 -0
  581. package/script/utils/src/concurrency/retry.d.ts +14 -0
  582. package/script/utils/src/concurrency/retry.d.ts.map +1 -0
  583. package/script/utils/src/concurrency/retry.js +30 -0
  584. package/script/utils/src/concurrency/utils.d.ts +27 -0
  585. package/script/utils/src/concurrency/utils.d.ts.map +1 -0
  586. package/script/utils/src/concurrency/utils.js +30 -0
  587. package/script/utils/src/constants.d.ts +4 -0
  588. package/script/utils/src/constants.d.ts.map +1 -0
  589. package/script/utils/src/constants.js +12 -0
  590. package/script/utils/src/decorators/bound.d.ts +10 -0
  591. package/script/utils/src/decorators/bound.d.ts.map +1 -0
  592. package/script/utils/src/decorators/bound.js +20 -0
  593. package/script/utils/src/decorators/mod.d.ts +2 -0
  594. package/script/utils/src/decorators/mod.d.ts.map +1 -0
  595. package/script/utils/src/decorators/mod.js +17 -0
  596. package/script/utils/src/mod.d.ts +8 -0
  597. package/script/utils/src/mod.d.ts.map +1 -0
  598. package/script/utils/src/mod.js +23 -0
  599. package/script/utils/src/types/json-query.d.ts +30 -0
  600. package/script/utils/src/types/json-query.d.ts.map +1 -0
  601. package/script/utils/src/types/json-query.js +2 -0
  602. package/script/utils/src/types/misc.d.ts +109 -0
  603. package/script/utils/src/types/misc.d.ts.map +1 -0
  604. package/script/utils/src/types/misc.js +3 -0
  605. package/script/utils/src/types/mod.d.ts +7 -0
  606. package/script/utils/src/types/mod.d.ts.map +1 -0
  607. package/script/utils/src/types/mod.js +19 -0
  608. package/script/utils/src/types/nominal.d.ts +87 -0
  609. package/script/utils/src/types/nominal.d.ts.map +1 -0
  610. package/script/utils/src/types/nominal.js +2 -0
  611. package/script/utils/src/types/typebox-helpers.d.ts +183 -0
  612. package/script/utils/src/types/typebox-helpers.d.ts.map +1 -0
  613. package/script/utils/src/types/typebox-helpers.js +277 -0
  614. package/script/utils/src/types/utils.d.ts +37 -0
  615. package/script/utils/src/types/utils.d.ts.map +1 -0
  616. package/script/utils/src/types/utils.js +52 -0
  617. package/script/utils/src/types/validators/algorand.d.ts +31 -0
  618. package/script/utils/src/types/validators/algorand.d.ts.map +1 -0
  619. package/script/utils/src/types/validators/algorand.js +98 -0
  620. package/script/utils/src/types/validators/cardano.d.ts +26 -0
  621. package/script/utils/src/types/validators/cardano.d.ts.map +1 -0
  622. package/script/utils/src/types/validators/cardano.js +121 -0
  623. package/script/utils/src/types/validators/mina.d.ts +15 -0
  624. package/script/utils/src/types/validators/mina.d.ts.map +1 -0
  625. package/script/utils/src/types/validators/mina.js +51 -0
  626. package/script/utils/src/types/validators/minicbor.d.ts +98 -0
  627. package/script/utils/src/types/validators/minicbor.d.ts.map +1 -0
  628. package/script/utils/src/types/validators/minicbor.js +337 -0
  629. package/script/utils/src/types/validators/mod.d.ts +3 -0
  630. package/script/utils/src/types/validators/mod.d.ts.map +1 -0
  631. package/script/utils/src/types/validators/mod.js +18 -0
  632. package/script/utils/src/types/validators/utils.d.ts +6 -0
  633. package/script/utils/src/types/validators/utils.d.ts.map +1 -0
  634. package/script/utils/src/types/validators/utils.js +31 -0
  635. package/script/utils/src/viem.d.ts +6 -0
  636. package/script/utils/src/viem.d.ts.map +1 -0
  637. package/script/utils/src/viem.js +19 -0
  638. package/script/wallets/src/IProvider.d.ts +48 -0
  639. package/script/wallets/src/IProvider.d.ts.map +1 -0
  640. package/script/wallets/src/IProvider.js +10 -0
  641. package/script/wallets/src/avail/avail.d.ts +28 -0
  642. package/script/wallets/src/avail/avail.d.ts.map +1 -0
  643. package/script/wallets/src/avail/avail.js +70 -0
  644. package/script/wallets/src/avail/wrapper.d.ts +6 -0
  645. package/script/wallets/src/avail/wrapper.d.ts.map +1 -0
  646. package/script/wallets/src/avail/wrapper.js +34 -0
  647. package/script/wallets/src/cardano/cardano.d.ts +30 -0
  648. package/script/wallets/src/cardano/cardano.d.ts.map +1 -0
  649. package/script/wallets/src/cardano/cardano.js +163 -0
  650. package/script/wallets/src/cardano/wrapper.d.ts +7 -0
  651. package/script/wallets/src/cardano/wrapper.d.ts.map +1 -0
  652. package/script/wallets/src/cardano/wrapper.js +26 -0
  653. package/script/wallets/src/evm/ethers.d.ts +28 -0
  654. package/script/wallets/src/evm/ethers.d.ts.map +1 -0
  655. package/script/wallets/src/evm/ethers.js +84 -0
  656. package/script/wallets/src/evm/injected.d.ts +74 -0
  657. package/script/wallets/src/evm/injected.d.ts.map +1 -0
  658. package/script/wallets/src/evm/injected.js +360 -0
  659. package/script/wallets/src/evm/types.d.ts +3 -0
  660. package/script/wallets/src/evm/types.d.ts.map +1 -0
  661. package/script/wallets/src/evm/types.js +4 -0
  662. package/script/wallets/src/evm/wrapper-ethers.d.ts +6 -0
  663. package/script/wallets/src/evm/wrapper-ethers.d.ts.map +1 -0
  664. package/script/wallets/src/evm/wrapper-ethers.js +41 -0
  665. package/script/wallets/src/evm/wrapper-injected.d.ts +7 -0
  666. package/script/wallets/src/evm/wrapper-injected.d.ts.map +1 -0
  667. package/script/wallets/src/evm/wrapper-injected.js +84 -0
  668. package/script/wallets/src/midnight/midnight.d.ts +26 -0
  669. package/script/wallets/src/midnight/midnight.d.ts.map +1 -0
  670. package/script/wallets/src/midnight/midnight.js +117 -0
  671. package/script/wallets/src/midnight/wrapper.d.ts +7 -0
  672. package/script/wallets/src/midnight/wrapper.d.ts.map +1 -0
  673. package/script/wallets/src/midnight/wrapper.js +26 -0
  674. package/script/wallets/src/mina/mina.d.ts +28 -0
  675. package/script/wallets/src/mina/mina.d.ts.map +1 -0
  676. package/script/wallets/src/mina/mina.js +138 -0
  677. package/script/wallets/src/mina/wrapper.d.ts +6 -0
  678. package/script/wallets/src/mina/wrapper.d.ts.map +1 -0
  679. package/script/wallets/src/mina/wrapper.js +15 -0
  680. package/script/wallets/src/mod.d.ts +8 -0
  681. package/script/wallets/src/mod.d.ts.map +1 -0
  682. package/script/wallets/src/mod.js +26 -0
  683. package/script/wallets/src/paima.d.ts +104 -0
  684. package/script/wallets/src/paima.d.ts.map +1 -0
  685. package/script/wallets/src/paima.js +253 -0
  686. package/script/wallets/src/types.d.ts +49 -0
  687. package/script/wallets/src/types.d.ts.map +1 -0
  688. package/script/wallets/src/types.js +2 -0
  689. package/script/wallets/src/utils.d.ts +41 -0
  690. package/script/wallets/src/utils.d.ts.map +1 -0
  691. package/script/wallets/src/utils.js +81 -0
  692. package/script/wallets/src/wallet-modes.d.ts +49 -0
  693. package/script/wallets/src/wallet-modes.d.ts.map +1 -0
  694. package/script/wallets/src/wallet-modes.js +29 -0
  695. package/script/wallets/src/wallets.d.ts +5 -0
  696. package/script/wallets/src/wallets.d.ts.map +1 -0
  697. package/script/wallets/src/wallets.js +58 -0
  698. package/script/wallets/src/windows.d.ts +5 -0
  699. package/script/wallets/src/windows.d.ts.map +1 -0
  700. package/script/wallets/src/windows.js +12 -0
@@ -0,0 +1,45 @@
1
+ import type { Static } from "@sinclair/typebox";
2
+ import { ConfigSyncProtocolType } from "../types.js";
3
+ import { type MergeIntersects } from "../../../../../utils/src/mod.js";
4
+ export declare const ConfigSyncProtocolSchemaNtpBase: import("../../utils.js").ConfigSchema<import("@sinclair/typebox").TObject<{
5
+ name: import("@sinclair/typebox").TString;
6
+ } & {
7
+ pollingInterval: import("@sinclair/typebox").TUnsafe<import("../../../../../utils/src/mod.js").IntervalMs>;
8
+ } & {
9
+ startBlockHeight: import("@sinclair/typebox").TUnsafe<import("../../../../../utils/src/mod.js").BlockNumber>;
10
+ }>, import("@sinclair/typebox").TObject<{
11
+ stopBlockHeight: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TUnsafe<import("../../../../../utils/src/mod.js").BlockNumber>, import("@sinclair/typebox").TNull]>;
12
+ } & {
13
+ stepSize: import("@sinclair/typebox").TNumber;
14
+ }>>;
15
+ export declare const CommonResponseNtpBase: {
16
+ readonly internal: {};
17
+ readonly payload: {
18
+ readonly ownChain: import("@sinclair/typebox").TObject<{
19
+ blockNumber: import("@sinclair/typebox").TUnsafe<import("../../../../../utils/src/mod.js").BlockNumber>;
20
+ }>;
21
+ };
22
+ };
23
+ export declare const ConfigSyncProtocolSchemaNtpMain: import("../../utils.js").ConfigSchema<import("@sinclair/typebox").TObject<{
24
+ name: import("@sinclair/typebox").TString;
25
+ } & {
26
+ pollingInterval: import("@sinclair/typebox").TUnsafe<import("../../../../../utils/src/mod.js").IntervalMs>;
27
+ } & {
28
+ startBlockHeight: import("@sinclair/typebox").TUnsafe<import("../../../../../utils/src/mod.js").BlockNumber>;
29
+ } & {
30
+ type: import("@sinclair/typebox").TLiteral<ConfigSyncProtocolType.NTP_MAIN>;
31
+ }>, import("@sinclair/typebox").TObject<{
32
+ stopBlockHeight: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TUnsafe<import("../../../../../utils/src/mod.js").BlockNumber>, import("@sinclair/typebox").TNull]>;
33
+ } & {
34
+ stepSize: import("@sinclair/typebox").TNumber;
35
+ }>>;
36
+ export type ConfigSyncProtocolNtpMain = MergeIntersects<Static<ReturnType<typeof ConfigSyncProtocolSchemaNtpMain.allProperties<true>>>>;
37
+ export declare const CommonResponseNtpMain: import("@sinclair/typebox").TObject<{
38
+ internal: import("@sinclair/typebox").TObject<{}>;
39
+ payload: import("@sinclair/typebox").TObject<{
40
+ readonly ownChain: import("@sinclair/typebox").TObject<{
41
+ blockNumber: import("@sinclair/typebox").TUnsafe<import("../../../../../utils/src/mod.js").BlockNumber>;
42
+ }>;
43
+ }>;
44
+ }>;
45
+ //# sourceMappingURL=rpc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../../../../../../src/config/src/schema/sync-protocols/ntp/rpc.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAMrD,OAAO,EAAE,KAAK,eAAe,EAAkB,MAAM,iCAAiC,CAAC;AAUvF,eAAO,MAAM,+BAA+B;;;;;;;;;;GAO1C,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;CAOmB,CAAC;AAMtD,eAAO,MAAM,+BAA+B;;;;;;;;;;;;GAMxC,CAAC;AACL,MAAM,MAAM,yBAAyB,GAAG,eAAe,CACrD,MAAM,CAAC,UAAU,CAAC,OAAO,+BAA+B,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAC/E,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;EAEjC,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { Type } from "@sinclair/typebox";
2
+ import { ConfigSyncProtocolType } from "../types.js";
3
+ import { NameField, PollingSyncProtocol, StartStopBlockheight, } from "../../common.js";
4
+ import { TypeboxHelpers } from "../../../../../utils/src/mod.js";
5
+ import { genCommonResponse, } from "../common.js";
6
+ // ===========
7
+ // Base schema
8
+ // ===========
9
+ export const ConfigSyncProtocolSchemaNtpBase = NameField.cloneMerge(PollingSyncProtocol).cloneMerge(StartStopBlockheight).cloneMerge({
10
+ required: Type.Object({}),
11
+ optional: Type.Object({
12
+ stepSize: Type.Number({ default: 1000 }),
13
+ }),
14
+ });
15
+ export const CommonResponseNtpBase = {
16
+ internal: {},
17
+ payload: {
18
+ ownChain: Type.Object({
19
+ blockNumber: TypeboxHelpers.BlockNumber(),
20
+ }),
21
+ },
22
+ };
23
+ // ======================
24
+ // NTP Main config
25
+ // ======================
26
+ export const ConfigSyncProtocolSchemaNtpMain = ConfigSyncProtocolSchemaNtpBase
27
+ .cloneMerge({
28
+ required: Type.Object({
29
+ type: Type.Literal(ConfigSyncProtocolType.NTP_MAIN),
30
+ }),
31
+ optional: Type.Object({}),
32
+ });
33
+ export const CommonResponseNtpMain = genCommonResponse(CommonResponseNtpBase);
@@ -0,0 +1,125 @@
1
+ import type { FlipObject } from "../../../../utils/src/mod.js";
2
+ import { ConfigNetworkType } from "../network/mod.js";
3
+ import type { ConfigSyncProtocolDecoratorType } from "./decorators/types.js";
4
+ import type { NetworkConfig } from "../../config/parts/network.js";
5
+ import type { ConfigSyncProtocolMapping } from "./all.js";
6
+ import type { EncodedStateValue, getEvmEvent } from "../../mod.js";
7
+ export declare enum ConfigSyncProtocolType {
8
+ NTP_MAIN = "ntp-main",
9
+ EVM_RPC_PARALLEL = "evm-rpc-parallel",
10
+ CARDANO_CARP_PARALLEL = "cardano-carp-parallel",
11
+ CARDANO_UTXORPC_PARALLEL = "cardano-utxorpc-parallel",
12
+ MINA_PARALLEL = "mina-sql-parallel",
13
+ AVAIL_PARALLEL = "avail-rpc-parallel",
14
+ MIDNIGHT_PARALLEL = "midnight-graphql-parallel",
15
+ BITCOIN_RPC_PARALLEL = "bitcoin-rpc-parallel"
16
+ }
17
+ export declare const SyncProtocolToNetwork: {
18
+ "ntp-main": ConfigNetworkType.NTP;
19
+ "evm-rpc-parallel": ConfigNetworkType.EVM;
20
+ "cardano-carp-parallel": ConfigNetworkType.CARDANO;
21
+ "cardano-utxorpc-parallel": ConfigNetworkType.CARDANO;
22
+ "mina-sql-parallel": ConfigNetworkType.MINA;
23
+ "avail-rpc-parallel": ConfigNetworkType.AVAIL;
24
+ "midnight-graphql-parallel": ConfigNetworkType.MIDNIGHT;
25
+ "bitcoin-rpc-parallel": ConfigNetworkType.BITCOIN;
26
+ };
27
+ export type NetworkTypeFromSyncProtocol<T extends ConfigSyncProtocolType> = (typeof SyncProtocolToNetwork)[T];
28
+ export type SyncProtocolFromNetwork<T extends ConfigNetworkType> = FlipObject<typeof SyncProtocolToNetwork> extends Partial<Record<ConfigNetworkType, ConfigSyncProtocolType>> ? FlipObject<typeof SyncProtocolToNetwork>[T] : never;
29
+ type BasePrimitive = {
30
+ name: string;
31
+ type: `${string}:${string}`;
32
+ startBlockHeight: number;
33
+ scheduledPrefix?: string;
34
+ };
35
+ type EVMPrimitive = BasePrimitive & {
36
+ abi: ReturnType<typeof getEvmEvent> | ReturnType<typeof getEvmEvent>[];
37
+ contractAddress: string;
38
+ };
39
+ type MidnightPrimitive = BasePrimitive & {
40
+ name: string;
41
+ contractAddress: string;
42
+ contract: {
43
+ ledger: (data: EncodedStateValue) => any;
44
+ };
45
+ networkId?: number;
46
+ genesisHash?: string;
47
+ };
48
+ type CardanoUtxoRpcPrimitive = BasePrimitive & {
49
+ TODO_ADD_MISSING_FIELDS: string;
50
+ };
51
+ type CardanoCarpPrimitive = BasePrimitive & {
52
+ TODO_ADD_MISSING_FIELDS: string;
53
+ };
54
+ type MinaPrimitive = BasePrimitive & {
55
+ TODO_ADD_MISSING_FIELDS: string;
56
+ };
57
+ type AvailPrimitive = BasePrimitive & {
58
+ appId: number;
59
+ applicationKey: string;
60
+ genesisHash: string;
61
+ };
62
+ type NtpMainPrimitive = BasePrimitive & {};
63
+ export type BitcoinPrimitiveDirection = "inputs" | "outputs" | "both";
64
+ type BitcoinPrimitive = BasePrimitive & {
65
+ /**
66
+ * The address to watch for transactions. Must be a fixed address, for now multi address wallets are not supported.
67
+ */
68
+ watchAddress: string;
69
+ /**
70
+ * Allows narrowing notifications to only creations or spends.
71
+ * Defaults to `both`.
72
+ */
73
+ direction?: BitcoinPrimitiveDirection;
74
+ /**
75
+ * Optional human label for this address (e.g. exchange name).
76
+ */
77
+ label?: string;
78
+ };
79
+ /**
80
+ * A mapping between specific sync protocols and their corresponding primitive types.
81
+ * This helps in creating a discriminated union for PrimitiveEntry.
82
+ */
83
+ export type ProtocolPrimitiveMap = {
84
+ [ConfigSyncProtocolType.NTP_MAIN]: NtpMainPrimitive;
85
+ [ConfigSyncProtocolType.EVM_RPC_PARALLEL]: EVMPrimitive;
86
+ [ConfigSyncProtocolType.MIDNIGHT_PARALLEL]: MidnightPrimitive;
87
+ [ConfigSyncProtocolType.CARDANO_CARP_PARALLEL]: CardanoCarpPrimitive;
88
+ [ConfigSyncProtocolType.CARDANO_UTXORPC_PARALLEL]: CardanoUtxoRpcPrimitive;
89
+ [ConfigSyncProtocolType.MINA_PARALLEL]: MinaPrimitive;
90
+ [ConfigSyncProtocolType.AVAIL_PARALLEL]: AvailPrimitive;
91
+ [ConfigSyncProtocolType.BITCOIN_RPC_PARALLEL]: BitcoinPrimitive;
92
+ };
93
+ /**
94
+ * PrimitiveEntry contains the sync protocol name,
95
+ * and the primitive configuration created by `getConfig()`
96
+ */
97
+ export type PrimitiveEntry = {
98
+ [K in ConfigSyncProtocolType]: {
99
+ /** The sync protocol this primitive belongs to */
100
+ syncProtocol: K;
101
+ /**
102
+ * The primitive configuration, correctly typed based on the syncProtocol.
103
+ * Protocols not in ProtocolPrimitiveMap will default to DefaultPrimitive.
104
+ */
105
+ primitive: K extends keyof ProtocolPrimitiveMap ? ProtocolPrimitiveMap[K] : never;
106
+ /** Custom identifier for the primitive */
107
+ id: string;
108
+ };
109
+ }[ConfigSyncProtocolType];
110
+ export type NetworkFromSyncProtocol<T extends ConfigSyncProtocolType | ConfigSyncProtocolDecoratorType> = T extends ConfigSyncProtocolType ? Extract<NetworkConfig, {
111
+ type: NetworkTypeFromSyncProtocol<T>;
112
+ }> : undefined;
113
+ export type SyncProtocolWithNetwork = {
114
+ [K in keyof typeof SyncProtocolToNetwork]: {
115
+ networkType: NetworkFromSyncProtocol<K>["type"];
116
+ syncProtocolType: ConfigSyncProtocolMapping[K]["type"];
117
+ syncProtocol: ConfigSyncProtocolMapping[K];
118
+ network: NetworkFromSyncProtocol<K>;
119
+ primitives: Extract<PrimitiveEntry, {
120
+ syncProtocol: ConfigSyncProtocolMapping[K]["type"];
121
+ }>[];
122
+ };
123
+ }[keyof typeof SyncProtocolToNetwork];
124
+ export {};
125
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1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,CAAC;QAC3C,OAAO,EAAE,uBAAuB,CAAC,CAAC,CAAC,CAAC;QACpC,UAAU,EAAE,OAAO,CACjB,cAAc,EACd;YAAE,YAAY,EAAE,yBAAyB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;SAAE,CACvD,EAAE,CAAC;KACL;CACF,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { ConfigNetworkType } from "../network/mod.js";
2
+ export var ConfigSyncProtocolType;
3
+ (function (ConfigSyncProtocolType) {
4
+ ConfigSyncProtocolType["NTP_MAIN"] = "ntp-main";
5
+ ConfigSyncProtocolType["EVM_RPC_PARALLEL"] = "evm-rpc-parallel";
6
+ ConfigSyncProtocolType["CARDANO_CARP_PARALLEL"] = "cardano-carp-parallel";
7
+ ConfigSyncProtocolType["CARDANO_UTXORPC_PARALLEL"] = "cardano-utxorpc-parallel";
8
+ ConfigSyncProtocolType["MINA_PARALLEL"] = "mina-sql-parallel";
9
+ ConfigSyncProtocolType["AVAIL_PARALLEL"] = "avail-rpc-parallel";
10
+ ConfigSyncProtocolType["MIDNIGHT_PARALLEL"] = "midnight-graphql-parallel";
11
+ ConfigSyncProtocolType["BITCOIN_RPC_PARALLEL"] = "bitcoin-rpc-parallel";
12
+ })(ConfigSyncProtocolType || (ConfigSyncProtocolType = {}));
13
+ export const SyncProtocolToNetwork = {
14
+ [ConfigSyncProtocolType.NTP_MAIN]: ConfigNetworkType.NTP,
15
+ [ConfigSyncProtocolType.EVM_RPC_PARALLEL]: ConfigNetworkType.EVM,
16
+ [ConfigSyncProtocolType.CARDANO_CARP_PARALLEL]: ConfigNetworkType.CARDANO,
17
+ [ConfigSyncProtocolType.CARDANO_UTXORPC_PARALLEL]: ConfigNetworkType.CARDANO,
18
+ [ConfigSyncProtocolType.MINA_PARALLEL]: ConfigNetworkType.MINA,
19
+ [ConfigSyncProtocolType.AVAIL_PARALLEL]: ConfigNetworkType.AVAIL,
20
+ [ConfigSyncProtocolType.MIDNIGHT_PARALLEL]: ConfigNetworkType.MIDNIGHT,
21
+ [ConfigSyncProtocolType.BITCOIN_RPC_PARALLEL]: ConfigNetworkType.BITCOIN,
22
+ };
@@ -0,0 +1,53 @@
1
+ import type { MergeIntersects } from "../../../utils/src/mod.js";
2
+ import type { Static, TIntersect, TObject, TPartial } from "@sinclair/typebox";
3
+ /**
4
+ * We limit the top-level types that are allowed to avoid performance issues.
5
+ * The problem comes with `cloneMerge` where we need to combine many ConfigSchemas together.
6
+ * If we allow things other than objects, we have to support almost *any* type
7
+ *
8
+ * You might be tempted to think you could just handle only common cases:
9
+ * - TObject, TUnion, TIntersect
10
+ * But the problem is combining these is non-trivial in a general way.
11
+ * There exists a general solution `TComposite<TObject[]>`,
12
+ * but the type is extremely complex which slows down Typescript a lot.
13
+ */
14
+ type ObjectLike = TObject;
15
+ type ObjectContent<T extends ObjectLike> = T extends TObject<infer O> ? O : never;
16
+ export type ConfigProperties<Required extends ObjectLike, Optional extends ObjectLike> = {
17
+ required: Required;
18
+ /**
19
+ * Note: each `optional` value MUST contain a `default` field.
20
+ * the default value can be null
21
+ */
22
+ optional: Optional;
23
+ };
24
+ export type AllProperties<Required extends ObjectLike, Optional extends ObjectLike, Bool extends boolean> = TIntersect<[Required, Bool extends true ? Optional : TPartial<Optional>]>;
25
+ export type AllPropertiesFor<Schema extends ConfigSchema<any, any>, Bool extends boolean> = Schema extends ConfigSchema<infer Required, infer Optional> ? AllProperties<Required, Optional, Bool> : never;
26
+ export type ToMapping<Type extends string, T extends Partial<Record<Type, ConfigSchema<TObject, TObject>>>> = {
27
+ [K in keyof T]: T[K] extends ConfigSchema<TObject, TObject> ? MergeIntersects<Static<AllPropertiesFor<T[K], true>>> : never;
28
+ };
29
+ /**
30
+ * This class is to used to help handle the fact that some fields are required and some are optional.
31
+ *
32
+ * Notably, in some cases we want to allow omitting optional fields (when defining your configuration)
33
+ * But in other cases (ex: using the config after it's been generated), we want to enforce that all optional fields that have a default are present.
34
+ *
35
+ * You can't easily solve this in Typebox without this class
36
+ * because default values aren't part of the type signature
37
+ * so there is no easy way to recover them after-the-fact
38
+ * (aka distinguish between a field that defaults to null vs defaults to a non-nullable specific value)
39
+ * However, it's possible thanks to this class
40
+ */
41
+ export declare class ConfigSchema<Required extends ObjectLike, Optional extends ObjectLike> {
42
+ readonly config: ConfigProperties<Required, Optional>;
43
+ constructor(config: ConfigProperties<Required, Optional>);
44
+ allProperties: <Bool extends boolean>(requireOptional: Bool) => AllProperties<Required, Optional, Bool>;
45
+ defaultProperties: () => MergeIntersects<Partial<Static<Optional>>>;
46
+ /**
47
+ * Merge two ConfigSchemas together
48
+ * DANGER: this will not merge top-level `options` of these objects
49
+ */
50
+ cloneMerge: <NewRequired extends ObjectLike, NewOptional extends ObjectLike>(newConfig: ConfigProperties<NewRequired, NewOptional> | ConfigSchema<NewRequired, NewOptional>) => ConfigSchema<TObject<ObjectContent<Required> & ObjectContent<NewRequired>>, TObject<ObjectContent<Optional> & ObjectContent<NewOptional>>>;
51
+ }
52
+ export {};
53
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/config/src/schema/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI/E;;;;;;;;;;GAUG;AACH,KAAK,UAAU,GAAG,OAAO,CAAC;AAE1B,KAAK,aAAa,CAAC,CAAC,SAAS,UAAU,IAAI,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GACrE,KAAK,CAAC;AAEV,MAAM,MAAM,gBAAgB,CAC1B,QAAQ,SAAS,UAAU,EAC3B,QAAQ,SAAS,UAAU,IACzB;IACF,QAAQ,EAAE,QAAQ,CAAC;IAC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C,CAOxC;IAEF,iBAAiB,QAAO,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAGhE;IAEF;;;OAGG;IACH,UAAU,GAAI,WAAW,SAAS,UAAU,EAAE,WAAW,SAAS,UAAU,EAC1E,WACI,gBAAgB,CAAC,WAAW,EAAE,WAAW,CAAC,GAC1C,YAAY,CAAC,WAAW,EAAE,WAAW,CAAC,KACzC,YAAY,CACb,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC,EAC7D,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC,CAC9D,CAeC;CACH"}
@@ -0,0 +1,58 @@
1
+ import { Type } from "@sinclair/typebox";
2
+ import { Value } from "@sinclair/typebox/value";
3
+ /**
4
+ * This class is to used to help handle the fact that some fields are required and some are optional.
5
+ *
6
+ * Notably, in some cases we want to allow omitting optional fields (when defining your configuration)
7
+ * But in other cases (ex: using the config after it's been generated), we want to enforce that all optional fields that have a default are present.
8
+ *
9
+ * You can't easily solve this in Typebox without this class
10
+ * because default values aren't part of the type signature
11
+ * so there is no easy way to recover them after-the-fact
12
+ * (aka distinguish between a field that defaults to null vs defaults to a non-nullable specific value)
13
+ * However, it's possible thanks to this class
14
+ */
15
+ export class ConfigSchema {
16
+ config;
17
+ constructor(config) {
18
+ // TODO: fast-fail if
19
+ // 1. any required property is an optional field
20
+ // 1. any `optional` does not set a default value
21
+ this.config = config;
22
+ // TODO: replace once TS5 decorators are better supported
23
+ this.allProperties.bind(this);
24
+ this.defaultProperties.bind(this);
25
+ this.cloneMerge.bind(this);
26
+ }
27
+ allProperties = (requireOptional) => {
28
+ return Type.Intersect([
29
+ this.config.required,
30
+ requireOptional
31
+ ? this.config.optional
32
+ : Type.Partial(this.config.optional),
33
+ ]);
34
+ };
35
+ defaultProperties = () => {
36
+ const defaults = Value.Default(this.config.optional, {});
37
+ return defaults;
38
+ };
39
+ /**
40
+ * Merge two ConfigSchemas together
41
+ * DANGER: this will not merge top-level `options` of these objects
42
+ */
43
+ cloneMerge = (newConfig) => {
44
+ const config = newConfig instanceof ConfigSchema
45
+ ? newConfig.config
46
+ : newConfig;
47
+ return new ConfigSchema({
48
+ required: Type.Object({
49
+ ...this.config.required.properties,
50
+ ...config.required.properties,
51
+ }),
52
+ optional: Type.Object({
53
+ ...this.config.optional.properties,
54
+ ...config.optional.properties,
55
+ }),
56
+ });
57
+ };
58
+ }
@@ -0,0 +1,65 @@
1
+ import type { ArgPath, BrokerName, ExcludeFromTuple, LogEvent, LogEventFields, OutputKeypairToObj, RemoveAllIndexed, TransformAllEventInput } from './types.js';
2
+ import { TopicPrefix } from './types.js';
3
+ import type { TSchema, Static, TObject } from '@sinclair/typebox';
4
+ type Data<T extends LogEvent<LogEventFields<TSchema>[]>> = {
5
+ name: T['name'];
6
+ fields: KeypairToObj<T['fields']>;
7
+ topic: string;
8
+ };
9
+ type AllEventsUnion<T extends Record<string, LogEvent<LogEventFields<TSchema>[]>>> = {
10
+ [K in keyof T]: Data<T[K]>;
11
+ };
12
+ export type EventQueue<T extends Record<string, LogEvent<LogEventFields<TSchema>[]>>> = {
13
+ address: `0x${string}`;
14
+ data: AllEventsUnion<T>[keyof T];
15
+ }[];
16
+ export declare const toSignature: <T extends LogEvent<LogEventFields<TSchema>[]>>(event: T) => string;
17
+ export declare const toSignatureHash: <T extends LogEvent<LogEventFields<TSchema>[]>>(event: T) => string;
18
+ export type AppEvents = ReturnType<typeof groupEvents>;
19
+ export type RegisteredEvent<T extends LogEvent<LogEventFields<TSchema>[]>> = {
20
+ /**
21
+ * the next three properties are basically the return type of toPath, but
22
+ * using ReturnType for some reason binds path to never[], which makes any
23
+ * assignment fail to typecheck.
24
+ */
25
+ path: (string | ArgPath)[];
26
+ broker: BrokerName<TopicPrefix.App>;
27
+ type: TObject<OutputKeypairToObj<ExcludeFromTuple<TransformAllEventInput<RemoveAllIndexed<T['fields']>>, never>>>;
28
+ /**
29
+ * keep the original definition around since it's nicer to work with, it
30
+ * also has the advantage that it allows recovering the initial order in
31
+ * case the signature/topicHash needs to be computed again, which can't be
32
+ * done from the path (since you don't know which non indexed fields go in
33
+ * between each indexed field).
34
+ */
35
+ definition: T;
36
+ /**
37
+ * we add this to avoid having to re-compute it all the time
38
+ */
39
+ topicHash: string;
40
+ };
41
+ export declare const registerEvents: <const T extends Record<string, LogEvent<LogEventFields<TSchema>[]>>>(entries: T) => { [K in keyof T]: RegisteredEvent<T[K]>; };
42
+ /**
43
+ * groups events by their name (essentially, grouping by overloads)
44
+ */
45
+ export declare const groupEvents: <T extends Record<string, RegisteredEvent<LogEvent<LogEventFields<TSchema>[]>>>>(events: T) => { [K in T[string] as K["definition"]["name"]]: T[string][]; };
46
+ export declare const encodeEventForStf: <T extends Omit<RegisteredEvent<LogEvent<LogEventFields<TSchema>[]>>, "path">>(args: {
47
+ from: `0x${string}`;
48
+ topic: T;
49
+ data: KeypairToObj<T["definition"]["fields"]>;
50
+ }) => {
51
+ address: `0x${string}`;
52
+ data: {
53
+ name: T["definition"]["name"];
54
+ fields: KeypairToObj<T["definition"]["fields"]>;
55
+ topic: string;
56
+ };
57
+ };
58
+ type KeypairToObj<T extends {
59
+ name: string;
60
+ type: any;
61
+ }[]> = {
62
+ [K in T[number] as K['name']]: Static<K['type']>;
63
+ };
64
+ export {};
65
+ //# sourceMappingURL=app-events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-events.d.ts","sourceRoot":"","sources":["../../../src/events/src/app-events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,EACvB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAU,WAAW,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,E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F,OAAO,EAAE,KAAK,MAAM,EAAE,CAAC;IACvB,IAAI,EAAE;QACJ,IAAI,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;QAC9B,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;QAChD,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CAUH,CAAC;AAGF,KAAK,YAAY,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,GAAG,CAAA;CAAE,EAAE,IAAI;KAC1D,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;CACjD,CAAC"}
@@ -0,0 +1,51 @@
1
+ import { toPath, TopicPrefix } from './types.js';
2
+ import sha3 from 'js-sha3';
3
+ const { keccak_256 } = sha3;
4
+ export const toSignature = (event) => {
5
+ return event.name + '(' + event.fields.map(f => f.type.type).join(',') + ')';
6
+ };
7
+ export const toSignatureHash = (event) => {
8
+ return keccak_256(toSignature(event));
9
+ };
10
+ export const registerEvents = (entries) => {
11
+ return Object.fromEntries(Object.keys(entries).map(key => {
12
+ const event = entries[key];
13
+ const topicHash = toSignatureHash(event);
14
+ return [
15
+ key,
16
+ {
17
+ ...toPath(TopicPrefix.App, event, topicHash),
18
+ definition: event,
19
+ topicHash,
20
+ },
21
+ ];
22
+ })); // we can't know the type here
23
+ };
24
+ /**
25
+ * groups events by their name (essentially, grouping by overloads)
26
+ */
27
+ export const groupEvents = (events) => {
28
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
29
+ let result = {}; // we can't know the type here
30
+ for (const key of Object.keys(events)) {
31
+ const event = events[key];
32
+ if (!result[event.definition.name]) {
33
+ result[event.definition.name] = [];
34
+ }
35
+ result[event.definition.name].push(event);
36
+ }
37
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
38
+ return result;
39
+ };
40
+ // Create payload for the stf from an object. Using this allows statically
41
+ // checking `data` with the type from `T`.
42
+ export const encodeEventForStf = (args) => {
43
+ return {
44
+ address: args.from,
45
+ data: {
46
+ name: args.topic.definition.name,
47
+ fields: args.data,
48
+ topic: toSignatureHash(args.topic.definition),
49
+ },
50
+ };
51
+ };