@paimaexample/wallets 0.3.117 → 0.3.120

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 (440) hide show
  1. package/esm/concise/src/batcher.d.ts.map +1 -1
  2. package/esm/concise/src/batcher.js +7 -25
  3. package/esm/concise/src/delegate.d.ts.map +1 -1
  4. package/esm/concise/src/delegate.js +14 -38
  5. package/esm/concise/src/v2/builtins/batcher.d.ts +2 -2
  6. package/esm/crypto/src/CryptoManager.d.ts +24 -0
  7. package/esm/crypto/src/CryptoManager.d.ts.map +1 -0
  8. package/esm/crypto/src/CryptoManager.js +72 -0
  9. package/esm/crypto/src/IVerify.d.ts +7 -0
  10. package/esm/crypto/src/IVerify.d.ts.map +1 -0
  11. package/esm/crypto/src/Prando.d.ts +59 -0
  12. package/esm/crypto/src/Prando.d.ts.map +1 -0
  13. package/esm/crypto/src/Prando.js +123 -0
  14. package/esm/crypto/src/chains/algorand.d.ts +11 -0
  15. package/esm/crypto/src/chains/algorand.d.ts.map +1 -0
  16. package/esm/crypto/src/chains/algorand.js +86 -0
  17. package/esm/crypto/src/chains/cardano.d.ts +8 -0
  18. package/esm/crypto/src/chains/cardano.d.ts.map +1 -0
  19. package/esm/crypto/src/chains/cardano.js +30 -0
  20. package/esm/crypto/src/chains/evm.d.ts +9 -0
  21. package/esm/crypto/src/chains/evm.d.ts.map +1 -0
  22. package/esm/crypto/src/chains/evm.js +29 -0
  23. package/esm/crypto/src/chains/midnight.d.ts +9 -0
  24. package/esm/crypto/src/chains/midnight.d.ts.map +1 -0
  25. package/esm/crypto/src/chains/midnight.js +25 -0
  26. package/esm/crypto/src/chains/mina.d.ts +8 -0
  27. package/esm/crypto/src/chains/mina.d.ts.map +1 -0
  28. package/esm/crypto/src/chains/mina.js +32 -0
  29. package/esm/crypto/src/chains/polkadot.d.ts +9 -0
  30. package/esm/crypto/src/chains/polkadot.d.ts.map +1 -0
  31. package/esm/crypto/src/chains/polkadot.js +28 -0
  32. package/esm/crypto/src/mod.d.ts +5 -0
  33. package/esm/crypto/src/mod.d.ts.map +1 -0
  34. package/esm/crypto/src/mod.js +4 -0
  35. package/esm/crypto/src/paima-hash.d.ts +14 -0
  36. package/esm/crypto/src/paima-hash.d.ts.map +1 -0
  37. package/esm/crypto/src/paima-hash.js +13 -0
  38. package/esm/utils/src/types/nominal.d.ts +5 -1
  39. package/esm/utils/src/types/nominal.d.ts.map +1 -1
  40. package/esm/utils/src/types/typebox-helpers.d.ts +7 -6
  41. package/esm/utils/src/types/typebox-helpers.d.ts.map +1 -1
  42. package/esm/utils/src/types/typebox-helpers.js +8 -5
  43. package/esm/wallets/src/algorand/algorand.d.ts +26 -0
  44. package/esm/wallets/src/algorand/algorand.d.ts.map +1 -0
  45. package/esm/wallets/src/algorand/algorand.js +133 -0
  46. package/esm/wallets/src/algorand/wrapper.d.ts +6 -0
  47. package/esm/wallets/src/algorand/wrapper.d.ts.map +1 -0
  48. package/esm/wallets/src/algorand/wrapper.js +12 -0
  49. package/esm/wallets/src/cardano/cardano.js +1 -1
  50. package/esm/wallets/src/midnight/midnight.js +1 -1
  51. package/esm/wallets/src/mina/mina.js +1 -1
  52. package/esm/wallets/src/mod.d.ts +1 -0
  53. package/esm/wallets/src/mod.d.ts.map +1 -1
  54. package/esm/wallets/src/mod.js +1 -0
  55. package/esm/wallets/src/polkadot/polkadot.d.ts +26 -0
  56. package/esm/wallets/src/polkadot/polkadot.d.ts.map +1 -0
  57. package/esm/wallets/src/polkadot/polkadot.js +133 -0
  58. package/esm/wallets/src/polkadot/wrapper.d.ts +6 -0
  59. package/esm/wallets/src/polkadot/wrapper.d.ts.map +1 -0
  60. package/esm/wallets/src/polkadot/wrapper.js +19 -0
  61. package/esm/wallets/src/utils.d.ts +12 -4
  62. package/esm/wallets/src/utils.d.ts.map +1 -1
  63. package/esm/wallets/src/utils.js +12 -12
  64. package/esm/wallets/src/wallet-modes.d.ts +7 -1
  65. package/esm/wallets/src/wallet-modes.d.ts.map +1 -1
  66. package/esm/wallets/src/wallet-modes.js +26 -2
  67. package/esm/wallets/src/wallets.js +8 -9
  68. package/package.json +8 -3
  69. package/script/concise/src/batcher.d.ts.map +1 -1
  70. package/script/concise/src/batcher.js +7 -25
  71. package/script/concise/src/delegate.d.ts.map +1 -1
  72. package/script/concise/src/delegate.js +13 -37
  73. package/script/concise/src/v2/builtins/batcher.d.ts +2 -2
  74. package/script/crypto/src/CryptoManager.d.ts +24 -0
  75. package/script/crypto/src/CryptoManager.d.ts.map +1 -0
  76. package/script/crypto/src/CryptoManager.js +76 -0
  77. package/script/crypto/src/IVerify.d.ts +7 -0
  78. package/script/crypto/src/IVerify.d.ts.map +1 -0
  79. package/script/crypto/src/Prando.d.ts +59 -0
  80. package/script/crypto/src/Prando.d.ts.map +1 -0
  81. package/script/crypto/src/Prando.js +127 -0
  82. package/script/crypto/src/chains/algorand.d.ts +11 -0
  83. package/script/crypto/src/chains/algorand.d.ts.map +1 -0
  84. package/script/crypto/src/chains/algorand.js +90 -0
  85. package/script/crypto/src/chains/cardano.d.ts +8 -0
  86. package/script/crypto/src/chains/cardano.d.ts.map +1 -0
  87. package/script/crypto/src/chains/cardano.js +37 -0
  88. package/script/crypto/src/chains/evm.d.ts +9 -0
  89. package/script/crypto/src/chains/evm.d.ts.map +1 -0
  90. package/script/crypto/src/chains/evm.js +33 -0
  91. package/script/crypto/src/chains/midnight.d.ts +9 -0
  92. package/script/crypto/src/chains/midnight.d.ts.map +1 -0
  93. package/script/crypto/src/chains/midnight.js +29 -0
  94. package/script/crypto/src/chains/mina.d.ts +8 -0
  95. package/script/crypto/src/chains/mina.d.ts.map +1 -0
  96. package/script/crypto/src/chains/mina.js +39 -0
  97. package/script/crypto/src/chains/polkadot.d.ts +9 -0
  98. package/script/crypto/src/chains/polkadot.d.ts.map +1 -0
  99. package/script/crypto/src/chains/polkadot.js +32 -0
  100. package/script/crypto/src/mod.d.ts +5 -0
  101. package/script/crypto/src/mod.d.ts.map +1 -0
  102. package/script/{config → crypto}/src/mod.js +7 -2
  103. package/script/crypto/src/paima-hash.d.ts +14 -0
  104. package/script/crypto/src/paima-hash.d.ts.map +1 -0
  105. package/script/crypto/src/paima-hash.js +19 -0
  106. package/script/utils/src/types/nominal.d.ts +5 -1
  107. package/script/utils/src/types/nominal.d.ts.map +1 -1
  108. package/script/utils/src/types/typebox-helpers.d.ts +7 -6
  109. package/script/utils/src/types/typebox-helpers.d.ts.map +1 -1
  110. package/script/utils/src/types/typebox-helpers.js +8 -5
  111. package/script/wallets/src/algorand/algorand.d.ts +26 -0
  112. package/script/wallets/src/algorand/algorand.d.ts.map +1 -0
  113. package/script/wallets/src/algorand/algorand.js +138 -0
  114. package/script/wallets/src/algorand/wrapper.d.ts +6 -0
  115. package/script/wallets/src/algorand/wrapper.d.ts.map +1 -0
  116. package/script/wallets/src/algorand/wrapper.js +15 -0
  117. package/script/wallets/src/cardano/cardano.js +1 -1
  118. package/script/wallets/src/midnight/midnight.js +1 -1
  119. package/script/wallets/src/mina/mina.js +1 -1
  120. package/script/wallets/src/mod.d.ts +1 -0
  121. package/script/wallets/src/mod.d.ts.map +1 -1
  122. package/script/wallets/src/mod.js +3 -1
  123. package/script/wallets/src/polkadot/polkadot.d.ts +26 -0
  124. package/script/wallets/src/polkadot/polkadot.d.ts.map +1 -0
  125. package/script/wallets/src/polkadot/polkadot.js +138 -0
  126. package/script/wallets/src/polkadot/wrapper.d.ts +6 -0
  127. package/script/wallets/src/polkadot/wrapper.d.ts.map +1 -0
  128. package/script/wallets/src/polkadot/wrapper.js +22 -0
  129. package/script/wallets/src/utils.d.ts +12 -4
  130. package/script/wallets/src/utils.d.ts.map +1 -1
  131. package/script/wallets/src/utils.js +12 -12
  132. package/script/wallets/src/wallet-modes.d.ts +7 -1
  133. package/script/wallets/src/wallet-modes.d.ts.map +1 -1
  134. package/script/wallets/src/wallet-modes.js +26 -1
  135. package/script/wallets/src/wallets.js +17 -18
  136. package/esm/chain-types/src/hash.d.ts +0 -28
  137. package/esm/chain-types/src/hash.d.ts.map +0 -1
  138. package/esm/chain-types/src/hash.js +0 -29
  139. package/esm/chain-types/src/mod.d.ts +0 -3
  140. package/esm/chain-types/src/mod.d.ts.map +0 -1
  141. package/esm/chain-types/src/mod.js +0 -2
  142. package/esm/chain-types/src/types.d.ts +0 -70
  143. package/esm/chain-types/src/types.d.ts.map +0 -1
  144. package/esm/config/src/config/builder.d.ts +0 -33
  145. package/esm/config/src/config/builder.d.ts.map +0 -1
  146. package/esm/config/src/config/builder.js +0 -82
  147. package/esm/config/src/config/configCheck.d.ts +0 -32
  148. package/esm/config/src/config/configCheck.d.ts.map +0 -1
  149. package/esm/config/src/config/configCheck.js +0 -67
  150. package/esm/config/src/config/context.d.ts +0 -23
  151. package/esm/config/src/config/context.d.ts.map +0 -1
  152. package/esm/config/src/config/context.js +0 -25
  153. package/esm/config/src/config/mod.d.ts +0 -7
  154. package/esm/config/src/config/mod.d.ts.map +0 -1
  155. package/esm/config/src/config/mod.js +0 -4
  156. package/esm/config/src/config/parts/deployedAddresses.d.ts +0 -17
  157. package/esm/config/src/config/parts/deployedAddresses.d.ts.map +0 -1
  158. package/esm/config/src/config/parts/deployedAddresses.js +0 -24
  159. package/esm/config/src/config/parts/network.d.ts +0 -19
  160. package/esm/config/src/config/parts/network.d.ts.map +0 -1
  161. package/esm/config/src/config/parts/network.js +0 -29
  162. package/esm/config/src/config/parts/primitive.d.ts +0 -31
  163. package/esm/config/src/config/parts/primitive.d.ts.map +0 -1
  164. package/esm/config/src/config/parts/primitive.js +0 -28
  165. package/esm/config/src/config/parts/securityNamespace.d.ts +0 -14
  166. package/esm/config/src/config/parts/securityNamespace.d.ts.map +0 -1
  167. package/esm/config/src/config/parts/securityNamespace.js +0 -26
  168. package/esm/config/src/config/parts/syncProtocols.d.ts +0 -43
  169. package/esm/config/src/config/parts/syncProtocols.d.ts.map +0 -1
  170. package/esm/config/src/config/parts/syncProtocols.js +0 -66
  171. package/esm/config/src/config/utils.d.ts +0 -40
  172. package/esm/config/src/config/utils.d.ts.map +0 -1
  173. package/esm/config/src/config/utils.js +0 -55
  174. package/esm/config/src/mod.d.ts +0 -3
  175. package/esm/config/src/mod.d.ts.map +0 -1
  176. package/esm/config/src/mod.js +0 -2
  177. package/esm/config/src/schema/common.d.ts +0 -26
  178. package/esm/config/src/schema/common.d.ts.map +0 -1
  179. package/esm/config/src/schema/common.js +0 -51
  180. package/esm/config/src/schema/mod.d.ts +0 -7
  181. package/esm/config/src/schema/mod.d.ts.map +0 -1
  182. package/esm/config/src/schema/mod.js +0 -6
  183. package/esm/config/src/schema/namespace.d.ts +0 -39
  184. package/esm/config/src/schema/namespace.d.ts.map +0 -1
  185. package/esm/config/src/schema/namespace.js +0 -34
  186. package/esm/config/src/schema/network/algorand.d.ts +0 -12
  187. package/esm/config/src/schema/network/algorand.d.ts.map +0 -1
  188. package/esm/config/src/schema/network/algorand.js +0 -23
  189. package/esm/config/src/schema/network/all.d.ts +0 -175
  190. package/esm/config/src/schema/network/all.d.ts.map +0 -1
  191. package/esm/config/src/schema/network/all.js +0 -24
  192. package/esm/config/src/schema/network/bitcoin.d.ts +0 -19
  193. package/esm/config/src/schema/network/bitcoin.d.ts.map +0 -1
  194. package/esm/config/src/schema/network/bitcoin.js +0 -21
  195. package/esm/config/src/schema/network/cardano.d.ts +0 -12
  196. package/esm/config/src/schema/network/cardano.d.ts.map +0 -1
  197. package/esm/config/src/schema/network/cardano.js +0 -27
  198. package/esm/config/src/schema/network/evm.d.ts +0 -68
  199. package/esm/config/src/schema/network/evm.d.ts.map +0 -1
  200. package/esm/config/src/schema/network/evm.js +0 -70
  201. package/esm/config/src/schema/network/mina.d.ts +0 -14
  202. package/esm/config/src/schema/network/mina.d.ts.map +0 -1
  203. package/esm/config/src/schema/network/mina.js +0 -25
  204. package/esm/config/src/schema/network/mod.d.ts +0 -9
  205. package/esm/config/src/schema/network/mod.d.ts.map +0 -1
  206. package/esm/config/src/schema/network/mod.js +0 -8
  207. package/esm/config/src/schema/network/ntp.d.ts +0 -32
  208. package/esm/config/src/schema/network/ntp.d.ts.map +0 -1
  209. package/esm/config/src/schema/network/ntp.js +0 -39
  210. package/esm/config/src/schema/network/substrate/avail.d.ts +0 -14
  211. package/esm/config/src/schema/network/substrate/avail.d.ts.map +0 -1
  212. package/esm/config/src/schema/network/substrate/avail.js +0 -26
  213. package/esm/config/src/schema/network/substrate/common.d.ts +0 -18
  214. package/esm/config/src/schema/network/substrate/common.d.ts.map +0 -1
  215. package/esm/config/src/schema/network/substrate/common.js +0 -32
  216. package/esm/config/src/schema/network/substrate/midnight.d.ts +0 -20
  217. package/esm/config/src/schema/network/substrate/midnight.d.ts.map +0 -1
  218. package/esm/config/src/schema/network/substrate/midnight.js +0 -32
  219. package/esm/config/src/schema/network/substrate/mod.d.ts +0 -4
  220. package/esm/config/src/schema/network/substrate/mod.d.ts.map +0 -1
  221. package/esm/config/src/schema/network/substrate/mod.js +0 -3
  222. package/esm/config/src/schema/network/types.d.ts +0 -13
  223. package/esm/config/src/schema/network/types.d.ts.map +0 -1
  224. package/esm/config/src/schema/network/types.js +0 -13
  225. package/esm/config/src/schema/network/utils.d.ts +0 -5
  226. package/esm/config/src/schema/network/utils.d.ts.map +0 -1
  227. package/esm/config/src/schema/network/utils.js +0 -73
  228. package/esm/config/src/schema/primitive/mod.d.ts +0 -2
  229. package/esm/config/src/schema/primitive/mod.d.ts.map +0 -1
  230. package/esm/config/src/schema/primitive/mod.js +0 -1
  231. package/esm/config/src/schema/primitive/types.d.ts +0 -58
  232. package/esm/config/src/schema/primitive/types.d.ts.map +0 -1
  233. package/esm/config/src/schema/primitive/types.js +0 -1
  234. package/esm/config/src/schema/sync-protocols/all.d.ts +0 -583
  235. package/esm/config/src/schema/sync-protocols/all.d.ts.map +0 -1
  236. package/esm/config/src/schema/sync-protocols/all.js +0 -55
  237. package/esm/config/src/schema/sync-protocols/avail/rpc.d.ts +0 -76
  238. package/esm/config/src/schema/sync-protocols/avail/rpc.d.ts.map +0 -1
  239. package/esm/config/src/schema/sync-protocols/avail/rpc.js +0 -56
  240. package/esm/config/src/schema/sync-protocols/bitcoin/rpc.d.ts +0 -76
  241. package/esm/config/src/schema/sync-protocols/bitcoin/rpc.d.ts.map +0 -1
  242. package/esm/config/src/schema/sync-protocols/bitcoin/rpc.js +0 -47
  243. package/esm/config/src/schema/sync-protocols/cardano/carp.d.ts +0 -80
  244. package/esm/config/src/schema/sync-protocols/cardano/carp.d.ts.map +0 -1
  245. package/esm/config/src/schema/sync-protocols/cardano/carp.js +0 -62
  246. package/esm/config/src/schema/sync-protocols/cardano/mod.d.ts +0 -2
  247. package/esm/config/src/schema/sync-protocols/cardano/mod.d.ts.map +0 -1
  248. package/esm/config/src/schema/sync-protocols/cardano/mod.js +0 -1
  249. package/esm/config/src/schema/sync-protocols/cardano/utxorpc.d.ts +0 -56
  250. package/esm/config/src/schema/sync-protocols/cardano/utxorpc.d.ts.map +0 -1
  251. package/esm/config/src/schema/sync-protocols/cardano/utxorpc.js +0 -56
  252. package/esm/config/src/schema/sync-protocols/common.d.ts +0 -60
  253. package/esm/config/src/schema/sync-protocols/common.d.ts.map +0 -1
  254. package/esm/config/src/schema/sync-protocols/common.js +0 -54
  255. package/esm/config/src/schema/sync-protocols/decorators/all.d.ts +0 -17
  256. package/esm/config/src/schema/sync-protocols/decorators/all.d.ts.map +0 -1
  257. package/esm/config/src/schema/sync-protocols/decorators/all.js +0 -8
  258. package/esm/config/src/schema/sync-protocols/decorators/emulated.d.ts +0 -8
  259. package/esm/config/src/schema/sync-protocols/decorators/emulated.d.ts.map +0 -1
  260. package/esm/config/src/schema/sync-protocols/decorators/emulated.js +0 -12
  261. package/esm/config/src/schema/sync-protocols/decorators/mod.d.ts +0 -4
  262. package/esm/config/src/schema/sync-protocols/decorators/mod.d.ts.map +0 -1
  263. package/esm/config/src/schema/sync-protocols/decorators/mod.js +0 -3
  264. package/esm/config/src/schema/sync-protocols/decorators/types.d.ts +0 -4
  265. package/esm/config/src/schema/sync-protocols/decorators/types.d.ts.map +0 -1
  266. package/esm/config/src/schema/sync-protocols/decorators/types.js +0 -4
  267. package/esm/config/src/schema/sync-protocols/evm/rpc.d.ts +0 -68
  268. package/esm/config/src/schema/sync-protocols/evm/rpc.d.ts.map +0 -1
  269. package/esm/config/src/schema/sync-protocols/evm/rpc.js +0 -44
  270. package/esm/config/src/schema/sync-protocols/midnight/graphql.d.ts +0 -66
  271. package/esm/config/src/schema/sync-protocols/midnight/graphql.d.ts.map +0 -1
  272. package/esm/config/src/schema/sync-protocols/midnight/graphql.js +0 -50
  273. package/esm/config/src/schema/sync-protocols/mina/graphql.d.ts +0 -73
  274. package/esm/config/src/schema/sync-protocols/mina/graphql.d.ts.map +0 -1
  275. package/esm/config/src/schema/sync-protocols/mina/graphql.js +0 -59
  276. package/esm/config/src/schema/sync-protocols/mod.d.ts +0 -10
  277. package/esm/config/src/schema/sync-protocols/mod.d.ts.map +0 -1
  278. package/esm/config/src/schema/sync-protocols/mod.js +0 -9
  279. package/esm/config/src/schema/sync-protocols/ntp/rpc.d.ts +0 -45
  280. package/esm/config/src/schema/sync-protocols/ntp/rpc.d.ts.map +0 -1
  281. package/esm/config/src/schema/sync-protocols/ntp/rpc.js +0 -33
  282. package/esm/config/src/schema/sync-protocols/types.d.ts +0 -125
  283. package/esm/config/src/schema/sync-protocols/types.d.ts.map +0 -1
  284. package/esm/config/src/schema/sync-protocols/types.js +0 -22
  285. package/esm/config/src/schema/utils.d.ts +0 -53
  286. package/esm/config/src/schema/utils.d.ts.map +0 -1
  287. package/esm/config/src/schema/utils.js +0 -58
  288. package/script/chain-types/src/hash.d.ts +0 -28
  289. package/script/chain-types/src/hash.d.ts.map +0 -1
  290. package/script/chain-types/src/hash.js +0 -36
  291. package/script/chain-types/src/mod.d.ts +0 -3
  292. package/script/chain-types/src/mod.d.ts.map +0 -1
  293. package/script/chain-types/src/mod.js +0 -18
  294. package/script/chain-types/src/types.d.ts +0 -70
  295. package/script/chain-types/src/types.d.ts.map +0 -1
  296. package/script/config/src/config/builder.d.ts +0 -33
  297. package/script/config/src/config/builder.d.ts.map +0 -1
  298. package/script/config/src/config/builder.js +0 -86
  299. package/script/config/src/config/configCheck.d.ts +0 -32
  300. package/script/config/src/config/configCheck.d.ts.map +0 -1
  301. package/script/config/src/config/configCheck.js +0 -70
  302. package/script/config/src/config/context.d.ts +0 -23
  303. package/script/config/src/config/context.d.ts.map +0 -1
  304. package/script/config/src/config/context.js +0 -31
  305. package/script/config/src/config/mod.d.ts +0 -7
  306. package/script/config/src/config/mod.d.ts.map +0 -1
  307. package/script/config/src/config/mod.js +0 -22
  308. package/script/config/src/config/parts/deployedAddresses.d.ts +0 -17
  309. package/script/config/src/config/parts/deployedAddresses.d.ts.map +0 -1
  310. package/script/config/src/config/parts/deployedAddresses.js +0 -28
  311. package/script/config/src/config/parts/network.d.ts +0 -19
  312. package/script/config/src/config/parts/network.d.ts.map +0 -1
  313. package/script/config/src/config/parts/network.js +0 -33
  314. package/script/config/src/config/parts/primitive.d.ts +0 -31
  315. package/script/config/src/config/parts/primitive.d.ts.map +0 -1
  316. package/script/config/src/config/parts/primitive.js +0 -32
  317. package/script/config/src/config/parts/securityNamespace.d.ts +0 -14
  318. package/script/config/src/config/parts/securityNamespace.d.ts.map +0 -1
  319. package/script/config/src/config/parts/securityNamespace.js +0 -30
  320. package/script/config/src/config/parts/syncProtocols.d.ts +0 -43
  321. package/script/config/src/config/parts/syncProtocols.d.ts.map +0 -1
  322. package/script/config/src/config/parts/syncProtocols.js +0 -70
  323. package/script/config/src/config/utils.d.ts +0 -40
  324. package/script/config/src/config/utils.d.ts.map +0 -1
  325. package/script/config/src/config/utils.js +0 -62
  326. package/script/config/src/mod.d.ts +0 -3
  327. package/script/config/src/mod.d.ts.map +0 -1
  328. package/script/config/src/schema/common.d.ts +0 -26
  329. package/script/config/src/schema/common.d.ts.map +0 -1
  330. package/script/config/src/schema/common.js +0 -54
  331. package/script/config/src/schema/mod.d.ts +0 -7
  332. package/script/config/src/schema/mod.d.ts.map +0 -1
  333. package/script/config/src/schema/mod.js +0 -22
  334. package/script/config/src/schema/namespace.d.ts +0 -39
  335. package/script/config/src/schema/namespace.d.ts.map +0 -1
  336. package/script/config/src/schema/namespace.js +0 -38
  337. package/script/config/src/schema/network/algorand.d.ts +0 -12
  338. package/script/config/src/schema/network/algorand.d.ts.map +0 -1
  339. package/script/config/src/schema/network/algorand.js +0 -26
  340. package/script/config/src/schema/network/all.d.ts +0 -175
  341. package/script/config/src/schema/network/all.d.ts.map +0 -1
  342. package/script/config/src/schema/network/all.js +0 -28
  343. package/script/config/src/schema/network/bitcoin.d.ts +0 -19
  344. package/script/config/src/schema/network/bitcoin.d.ts.map +0 -1
  345. package/script/config/src/schema/network/bitcoin.js +0 -24
  346. package/script/config/src/schema/network/cardano.d.ts +0 -12
  347. package/script/config/src/schema/network/cardano.d.ts.map +0 -1
  348. package/script/config/src/schema/network/cardano.js +0 -30
  349. package/script/config/src/schema/network/evm.d.ts +0 -68
  350. package/script/config/src/schema/network/evm.d.ts.map +0 -1
  351. package/script/config/src/schema/network/evm.js +0 -75
  352. package/script/config/src/schema/network/mina.d.ts +0 -14
  353. package/script/config/src/schema/network/mina.d.ts.map +0 -1
  354. package/script/config/src/schema/network/mina.js +0 -28
  355. package/script/config/src/schema/network/mod.d.ts +0 -9
  356. package/script/config/src/schema/network/mod.d.ts.map +0 -1
  357. package/script/config/src/schema/network/mod.js +0 -24
  358. package/script/config/src/schema/network/ntp.d.ts +0 -32
  359. package/script/config/src/schema/network/ntp.d.ts.map +0 -1
  360. package/script/config/src/schema/network/ntp.js +0 -42
  361. package/script/config/src/schema/network/substrate/avail.d.ts +0 -14
  362. package/script/config/src/schema/network/substrate/avail.d.ts.map +0 -1
  363. package/script/config/src/schema/network/substrate/avail.js +0 -29
  364. package/script/config/src/schema/network/substrate/common.d.ts +0 -18
  365. package/script/config/src/schema/network/substrate/common.d.ts.map +0 -1
  366. package/script/config/src/schema/network/substrate/common.js +0 -35
  367. package/script/config/src/schema/network/substrate/midnight.d.ts +0 -20
  368. package/script/config/src/schema/network/substrate/midnight.d.ts.map +0 -1
  369. package/script/config/src/schema/network/substrate/midnight.js +0 -35
  370. package/script/config/src/schema/network/substrate/mod.d.ts +0 -4
  371. package/script/config/src/schema/network/substrate/mod.d.ts.map +0 -1
  372. package/script/config/src/schema/network/substrate/mod.js +0 -19
  373. package/script/config/src/schema/network/types.d.ts +0 -13
  374. package/script/config/src/schema/network/types.d.ts.map +0 -1
  375. package/script/config/src/schema/network/types.js +0 -16
  376. package/script/config/src/schema/network/utils.d.ts +0 -5
  377. package/script/config/src/schema/network/utils.d.ts.map +0 -1
  378. package/script/config/src/schema/network/utils.js +0 -76
  379. package/script/config/src/schema/primitive/mod.d.ts +0 -2
  380. package/script/config/src/schema/primitive/mod.d.ts.map +0 -1
  381. package/script/config/src/schema/primitive/mod.js +0 -17
  382. package/script/config/src/schema/primitive/types.d.ts +0 -58
  383. package/script/config/src/schema/primitive/types.d.ts.map +0 -1
  384. package/script/config/src/schema/primitive/types.js +0 -2
  385. package/script/config/src/schema/sync-protocols/all.d.ts +0 -583
  386. package/script/config/src/schema/sync-protocols/all.d.ts.map +0 -1
  387. package/script/config/src/schema/sync-protocols/all.js +0 -62
  388. package/script/config/src/schema/sync-protocols/avail/rpc.d.ts +0 -76
  389. package/script/config/src/schema/sync-protocols/avail/rpc.d.ts.map +0 -1
  390. package/script/config/src/schema/sync-protocols/avail/rpc.js +0 -59
  391. package/script/config/src/schema/sync-protocols/bitcoin/rpc.d.ts +0 -76
  392. package/script/config/src/schema/sync-protocols/bitcoin/rpc.d.ts.map +0 -1
  393. package/script/config/src/schema/sync-protocols/bitcoin/rpc.js +0 -50
  394. package/script/config/src/schema/sync-protocols/cardano/carp.d.ts +0 -80
  395. package/script/config/src/schema/sync-protocols/cardano/carp.d.ts.map +0 -1
  396. package/script/config/src/schema/sync-protocols/cardano/carp.js +0 -65
  397. package/script/config/src/schema/sync-protocols/cardano/mod.d.ts +0 -2
  398. package/script/config/src/schema/sync-protocols/cardano/mod.d.ts.map +0 -1
  399. package/script/config/src/schema/sync-protocols/cardano/mod.js +0 -17
  400. package/script/config/src/schema/sync-protocols/cardano/utxorpc.d.ts +0 -56
  401. package/script/config/src/schema/sync-protocols/cardano/utxorpc.d.ts.map +0 -1
  402. package/script/config/src/schema/sync-protocols/cardano/utxorpc.js +0 -59
  403. package/script/config/src/schema/sync-protocols/common.d.ts +0 -60
  404. package/script/config/src/schema/sync-protocols/common.d.ts.map +0 -1
  405. package/script/config/src/schema/sync-protocols/common.js +0 -61
  406. package/script/config/src/schema/sync-protocols/decorators/all.d.ts +0 -17
  407. package/script/config/src/schema/sync-protocols/decorators/all.d.ts.map +0 -1
  408. package/script/config/src/schema/sync-protocols/decorators/all.js +0 -12
  409. package/script/config/src/schema/sync-protocols/decorators/emulated.d.ts +0 -8
  410. package/script/config/src/schema/sync-protocols/decorators/emulated.d.ts.map +0 -1
  411. package/script/config/src/schema/sync-protocols/decorators/emulated.js +0 -15
  412. package/script/config/src/schema/sync-protocols/decorators/mod.d.ts +0 -4
  413. package/script/config/src/schema/sync-protocols/decorators/mod.d.ts.map +0 -1
  414. package/script/config/src/schema/sync-protocols/decorators/mod.js +0 -19
  415. package/script/config/src/schema/sync-protocols/decorators/types.d.ts +0 -4
  416. package/script/config/src/schema/sync-protocols/decorators/types.d.ts.map +0 -1
  417. package/script/config/src/schema/sync-protocols/decorators/types.js +0 -7
  418. package/script/config/src/schema/sync-protocols/evm/rpc.d.ts +0 -68
  419. package/script/config/src/schema/sync-protocols/evm/rpc.d.ts.map +0 -1
  420. package/script/config/src/schema/sync-protocols/evm/rpc.js +0 -47
  421. package/script/config/src/schema/sync-protocols/midnight/graphql.d.ts +0 -66
  422. package/script/config/src/schema/sync-protocols/midnight/graphql.d.ts.map +0 -1
  423. package/script/config/src/schema/sync-protocols/midnight/graphql.js +0 -53
  424. package/script/config/src/schema/sync-protocols/mina/graphql.d.ts +0 -73
  425. package/script/config/src/schema/sync-protocols/mina/graphql.d.ts.map +0 -1
  426. package/script/config/src/schema/sync-protocols/mina/graphql.js +0 -62
  427. package/script/config/src/schema/sync-protocols/mod.d.ts +0 -10
  428. package/script/config/src/schema/sync-protocols/mod.d.ts.map +0 -1
  429. package/script/config/src/schema/sync-protocols/mod.js +0 -25
  430. package/script/config/src/schema/sync-protocols/ntp/rpc.d.ts +0 -45
  431. package/script/config/src/schema/sync-protocols/ntp/rpc.d.ts.map +0 -1
  432. package/script/config/src/schema/sync-protocols/ntp/rpc.js +0 -36
  433. package/script/config/src/schema/sync-protocols/types.d.ts +0 -125
  434. package/script/config/src/schema/sync-protocols/types.d.ts.map +0 -1
  435. package/script/config/src/schema/sync-protocols/types.js +0 -25
  436. package/script/config/src/schema/utils.d.ts +0 -53
  437. package/script/config/src/schema/utils.d.ts.map +0 -1
  438. package/script/config/src/schema/utils.js +0 -62
  439. /package/esm/{chain-types/src/types.js → crypto/src/IVerify.js} +0 -0
  440. /package/script/{chain-types/src/types.js → crypto/src/IVerify.js} +0 -0
@@ -1,27 +0,0 @@
1
- import { Type } from "@sinclair/typebox";
2
- import { ConfigSchema } from "../utils.js";
3
- import { ConfigNetworkType } from "./types.js";
4
- // =====
5
- // Utils
6
- // =====
7
- export const CardanoNetwork = Type.Union([
8
- Type.Literal("preview"),
9
- Type.Literal("preprod"),
10
- Type.Literal("mainnet"),
11
- Type.Literal("yaci"),
12
- ]);
13
- // ===========
14
- // Base schema
15
- // ===========
16
- export const ConfigNetworkSchemaCardano = new ConfigSchema({
17
- required: Type.Object({
18
- name: Type.String(),
19
- type: Type.Literal(ConfigNetworkType.CARDANO),
20
- network: CardanoNetwork,
21
- }),
22
- optional: Type.Object({}),
23
- });
24
- // ===========
25
- // Conversions
26
- // ===========
27
- // none
@@ -1,68 +0,0 @@
1
- import type { Static } from "@sinclair/typebox";
2
- import { ConfigSchema } from "../utils.js";
3
- import { ConfigNetworkType } from "./types.js";
4
- import { type MergeIntersects } from "../../../../utils/src/mod.js";
5
- import type { Chain, ChainFormatters } from "viem";
6
- export declare const BlockExplorer: import("@sinclair/typebox").TObject<{
7
- name: import("@sinclair/typebox").TString;
8
- url: import("@sinclair/typebox").TString;
9
- apiUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
10
- }>;
11
- export declare const RpcUrls: import("@sinclair/typebox").TUnsafe<{
12
- readonly webSocket?: readonly string[] | undefined;
13
- readonly http: readonly string[];
14
- }>;
15
- export declare const ChainNativeCurrency: import("@sinclair/typebox").TObject<{
16
- name: import("@sinclair/typebox").TString;
17
- symbol: import("@sinclair/typebox").TString;
18
- decimals: import("@sinclair/typebox").TNumber;
19
- }>;
20
- /**
21
- * Note: this tries as much as possible to follow Viem's network definition format
22
- * we can't map it exactly because viem allows for some non-JSON serializable fields
23
- */
24
- export declare const ConfigNetworkSchemaEvm: ConfigSchema<import("@sinclair/typebox").TObject<{
25
- name: import("@sinclair/typebox").TString;
26
- type: import("@sinclair/typebox").TLiteral<ConfigNetworkType.EVM>;
27
- chainId: import("@sinclair/typebox").TNumber;
28
- nativeCurrency: import("@sinclair/typebox").TObject<{
29
- name: import("@sinclair/typebox").TString;
30
- symbol: import("@sinclair/typebox").TString;
31
- decimals: import("@sinclair/typebox").TNumber;
32
- }>;
33
- rpcUrls: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnsafe<{
34
- readonly webSocket?: readonly string[] | undefined;
35
- readonly http: readonly string[];
36
- }>>, import("@sinclair/typebox").TObject<{
37
- default: import("@sinclair/typebox").TUnsafe<{
38
- readonly webSocket?: readonly string[] | undefined;
39
- readonly http: readonly string[];
40
- }>;
41
- }>]>;
42
- }>, import("@sinclair/typebox").TObject<{
43
- blockExplorers: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
44
- name: import("@sinclair/typebox").TString;
45
- url: import("@sinclair/typebox").TString;
46
- apiUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
47
- }>>, import("@sinclair/typebox").TObject<{
48
- default: import("@sinclair/typebox").TObject<{
49
- name: import("@sinclair/typebox").TString;
50
- url: import("@sinclair/typebox").TString;
51
- apiUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
52
- }>;
53
- }>]>, import("@sinclair/typebox").TNull]>;
54
- /** Source Chain ID (ie. the L1 chain) */
55
- sourceId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TNull]>;
56
- testnet: import("@sinclair/typebox").TBoolean;
57
- }>>;
58
- export type ConfigNetworkEvm = MergeIntersects<Static<ReturnType<typeof ConfigNetworkSchemaEvm.allProperties<true>>>>;
59
- export type MapNetworkTypes<chain extends Chain<ChainFormatters>> = Omit<chain, "id"> & {
60
- chainId: chain["id"];
61
- type: ConfigNetworkType.EVM;
62
- blockExplorers: NonNullable<chain["blockExplorers"]> | null;
63
- sourceId: NonNullable<chain["sourceId"]> | null;
64
- testnet: NonNullable<chain["testnet"]> | false;
65
- };
66
- export declare function viemToConfigNetwork(chain: Chain<ChainFormatters>): ConfigNetworkEvm;
67
- export declare function ConfigNetworkToViem(chain: ConfigNetworkEvm): Chain<ChainFormatters>;
68
- //# sourceMappingURL=evm.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"evm.d.ts","sourceRoot":"","sources":["../../../../../src/config/src/schema/network/evm.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAEL,KAAK,eAAe,EAErB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAMnD,eAAO,MAAM,aAAa;;;;EAIxB,CAAC;AAMH,eAAO,MAAM,OAAO;;;EAEnB,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;EAI9B,CAAC;AAMH;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAmB/B,yCAAyC;;;GAI3C,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,eAAe,CAC5C,MAAM,CAAC,UAAU,CAAC,OAAO,sBAAsB,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CACtE,CAAC;AAMF,MAAM,MAAM,eAAe,CAAC,KAAK,SAAS,KAAK,CAAC,eAAe,CAAC,IAC5D,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GACjB;IACA,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACrB,IAAI,EAAE,iBAAiB,CAAC,GAAG,CAAC;IAC5B,cAAc,EAAE,WAAW,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,GAAG,IAAI,CAAC;IAC5D,QAAQ,EAAE,WAAW,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,GAAG,IAAI,CAAC;IAChD,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,GAAG,KAAK,CAAC;CAChD,CAAC;AAEJ,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,KAAK,CAAC,eAAe,CAAC,GAC5B,gBAAgB,CAUlB;AACD,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,gBAAgB,GACtB,KAAK,CAAC,eAAe,CAAC,CAQxB"}
@@ -1,70 +0,0 @@
1
- import { Type } from "@sinclair/typebox";
2
- import { ConfigSchema } from "../utils.js";
3
- import { ConfigNetworkType } from "./types.js";
4
- import { TypeboxHelpers, } from "../../../../utils/src/mod.js";
5
- // =====
6
- // Utils
7
- // =====
8
- export const BlockExplorer = Type.Object({
9
- name: Type.String(),
10
- url: Type.String(),
11
- apiUrl: Type.Optional(Type.String()),
12
- });
13
- const RpcUrlInternal = Type.Object({
14
- http: Type.Array(Type.String()),
15
- webSocket: Type.Optional(Type.Array(Type.String())),
16
- });
17
- export const RpcUrls = Type.Unsafe(RpcUrlInternal);
18
- export const ChainNativeCurrency = Type.Object({
19
- name: Type.String(),
20
- symbol: Type.String({ minLength: 2, maxLength: 6 }),
21
- decimals: Type.Number(),
22
- });
23
- // ===========
24
- // Base schema
25
- // ===========
26
- /**
27
- * Note: this tries as much as possible to follow Viem's network definition format
28
- * we can't map it exactly because viem allows for some non-JSON serializable fields
29
- */
30
- export const ConfigNetworkSchemaEvm = new ConfigSchema({
31
- required: Type.Object({
32
- name: Type.String(),
33
- type: Type.Literal(ConfigNetworkType.EVM),
34
- chainId: Type.Number(),
35
- nativeCurrency: ChainNativeCurrency,
36
- rpcUrls: Type.Intersect([
37
- Type.Record(Type.String(), RpcUrls),
38
- Type.Object({ default: RpcUrls }),
39
- ]),
40
- }),
41
- optional: Type.Object({
42
- blockExplorers: TypeboxHelpers.Nullable(Type.Intersect([
43
- Type.Record(Type.String(), BlockExplorer),
44
- Type.Object({ default: BlockExplorer }),
45
- ]), { default: null }),
46
- /** Source Chain ID (ie. the L1 chain) */
47
- sourceId: TypeboxHelpers.Nullable(Type.Number(), { default: null }),
48
- testnet: Type.Boolean({ default: false }),
49
- }),
50
- });
51
- export function viemToConfigNetwork(chain) {
52
- const network = {
53
- ...chain,
54
- type: ConfigNetworkType.EVM,
55
- chainId: chain.id,
56
- blockExplorers: chain.blockExplorers ?? null,
57
- sourceId: chain.sourceId ?? null,
58
- testnet: chain.testnet ?? false,
59
- };
60
- return network;
61
- }
62
- export function ConfigNetworkToViem(chain) {
63
- const network = {
64
- ...chain,
65
- id: chain.chainId,
66
- blockExplorers: chain.blockExplorers ?? undefined,
67
- sourceId: chain.sourceId ?? undefined,
68
- };
69
- return network;
70
- }
@@ -1,14 +0,0 @@
1
- import type { Static } from "@sinclair/typebox";
2
- import { ConfigSchema } from "../utils.js";
3
- import { ConfigNetworkType } from "./types.js";
4
- import type { MergeIntersects } from "../../../../utils/src/mod.js";
5
- export declare const ConfigNetworkSchemaMina: ConfigSchema<import("@sinclair/typebox").TObject<{
6
- name: import("@sinclair/typebox").TString;
7
- type: import("@sinclair/typebox").TLiteral<ConfigNetworkType.MINA>;
8
- /**
9
- * String name of the network (https://github.com/ChainAgnostic/namespaces/blob/main/mina/caip2.md)
10
- */
11
- networkId: import("@sinclair/typebox").TString;
12
- }>, import("@sinclair/typebox").TObject<{}>>;
13
- export type ConfigNetworkMina = MergeIntersects<Static<ReturnType<typeof ConfigNetworkSchemaMina.allProperties<true>>>>;
14
- //# sourceMappingURL=mina.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mina.d.ts","sourceRoot":"","sources":["../../../../../src/config/src/schema/network/mina.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAYpE,eAAO,MAAM,uBAAuB;;;IAIhC;;OAEG;;4CAIL,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAC7C,MAAM,CAAC,UAAU,CAAC,OAAO,uBAAuB,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CACvE,CAAC"}
@@ -1,25 +0,0 @@
1
- import { Type } from "@sinclair/typebox";
2
- import { ConfigSchema } from "../utils.js";
3
- import { ConfigNetworkType } from "./types.js";
4
- // =====
5
- // Utils
6
- // =====
7
- // none
8
- // ===========
9
- // Base schema
10
- // ===========
11
- export const ConfigNetworkSchemaMina = new ConfigSchema({
12
- required: Type.Object({
13
- name: Type.String(),
14
- type: Type.Literal(ConfigNetworkType.MINA),
15
- /**
16
- * String name of the network (https://github.com/ChainAgnostic/namespaces/blob/main/mina/caip2.md)
17
- */
18
- networkId: Type.String(),
19
- }),
20
- optional: Type.Object({}),
21
- });
22
- // ===========
23
- // Conversions
24
- // ===========
25
- // none
@@ -1,9 +0,0 @@
1
- export * from "./evm.js";
2
- export * from "./cardano.js";
3
- export * from "./mina.js";
4
- export * from "./substrate/mod.js";
5
- export * from "./bitcoin.js";
6
- export * from "./types.js";
7
- export * from "./utils.js";
8
- export * from "./all.js";
9
- //# sourceMappingURL=mod.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../../src/config/src/schema/network/mod.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
@@ -1,8 +0,0 @@
1
- export * from "./evm.js";
2
- export * from "./cardano.js";
3
- export * from "./mina.js";
4
- export * from "./substrate/mod.js";
5
- export * from "./bitcoin.js";
6
- export * from "./types.js";
7
- export * from "./utils.js";
8
- export * from "./all.js";
@@ -1,32 +0,0 @@
1
- import type { Static } from "@sinclair/typebox";
2
- import { ConfigSchema } from "../utils.js";
3
- import { ConfigNetworkType } from "./types.js";
4
- import { type MergeIntersects } from "../../../../utils/src/mod.js";
5
- export declare const BlockExplorer: import("@sinclair/typebox").TObject<{
6
- name: import("@sinclair/typebox").TString;
7
- url: import("@sinclair/typebox").TString;
8
- apiUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
9
- }>;
10
- export declare const RpcUrls: import("@sinclair/typebox").TUnsafe<{
11
- readonly webSocket?: readonly string[] | undefined;
12
- readonly http: readonly string[];
13
- }>;
14
- export declare const ChainNativeCurrency: import("@sinclair/typebox").TObject<{
15
- name: import("@sinclair/typebox").TString;
16
- symbol: import("@sinclair/typebox").TString;
17
- decimals: import("@sinclair/typebox").TNumber;
18
- }>;
19
- /**
20
- * Note: this tries as much as possible to follow Viem's network definition format
21
- * we can't map it exactly because viem allows for some non-JSON serializable fields
22
- */
23
- export declare const ConfigNetworkSchemaNtp: ConfigSchema<import("@sinclair/typebox").TObject<{
24
- name: import("@sinclair/typebox").TString;
25
- type: import("@sinclair/typebox").TLiteral<ConfigNetworkType.NTP>;
26
- startTime: import("@sinclair/typebox").TNumber;
27
- blockTimeMS: import("@sinclair/typebox").TNumber;
28
- }>, import("@sinclair/typebox").TObject<{
29
- servers: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
30
- }>>;
31
- export type ConfigNetworkNtp = MergeIntersects<Static<ReturnType<typeof ConfigNetworkSchemaNtp.allProperties<true>>>>;
32
- //# sourceMappingURL=ntp.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ntp.d.ts","sourceRoot":"","sources":["../../../../../src/config/src/schema/network/ntp.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAEL,KAAK,eAAe,EAErB,MAAM,8BAA8B,CAAC;AAMtC,eAAO,MAAM,aAAa;;;;EAIxB,CAAC;AAMH,eAAO,MAAM,OAAO;;;EAEnB,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;EAI9B,CAAC;AAMH;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;GAUjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,eAAe,CAC5C,MAAM,CAAC,UAAU,CAAC,OAAO,sBAAsB,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CACtE,CAAC"}
@@ -1,39 +0,0 @@
1
- import { Type } from "@sinclair/typebox";
2
- import { ConfigSchema } from "../utils.js";
3
- import { ConfigNetworkType } from "./types.js";
4
- // =====
5
- // Utils
6
- // =====
7
- export const BlockExplorer = Type.Object({
8
- name: Type.String(),
9
- url: Type.String(),
10
- apiUrl: Type.Optional(Type.String()),
11
- });
12
- const RpcUrlInternal = Type.Object({
13
- http: Type.Array(Type.String()),
14
- webSocket: Type.Optional(Type.Array(Type.String())),
15
- });
16
- export const RpcUrls = Type.Unsafe(RpcUrlInternal);
17
- export const ChainNativeCurrency = Type.Object({
18
- name: Type.String(),
19
- symbol: Type.String({ minLength: 2, maxLength: 6 }),
20
- decimals: Type.Number(),
21
- });
22
- // ===========
23
- // Base schema
24
- // ===========
25
- /**
26
- * Note: this tries as much as possible to follow Viem's network definition format
27
- * we can't map it exactly because viem allows for some non-JSON serializable fields
28
- */
29
- export const ConfigNetworkSchemaNtp = new ConfigSchema({
30
- required: Type.Object({
31
- name: Type.String(),
32
- type: Type.Literal(ConfigNetworkType.NTP),
33
- startTime: Type.Number(),
34
- blockTimeMS: Type.Number(),
35
- }),
36
- optional: Type.Object({
37
- servers: Type.Array(Type.String()),
38
- }),
39
- });
@@ -1,14 +0,0 @@
1
- import type { Static } from "@sinclair/typebox";
2
- import { ConfigSchema } from "../../utils.js";
3
- import { ConfigNetworkType } from "../types.js";
4
- import type { MergeIntersects } from "../../../../../utils/src/mod.js";
5
- export declare const ConfigNetworkSchemaAvail: ConfigSchema<import("@sinclair/typebox").TObject<{
6
- name: import("@sinclair/typebox").TString;
7
- type: import("@sinclair/typebox").TLiteral<ConfigNetworkType.AVAIL>;
8
- genesisSeed: import("@sinclair/typebox").TString;
9
- caip2: import("@sinclair/typebox").TUnsafe<import("../../../../../utils/src/mod.js").Caip2>;
10
- nodeUrl: import("@sinclair/typebox").TString;
11
- genesisHash: import("@sinclair/typebox").TString;
12
- }>, import("@sinclair/typebox").TObject<{}>>;
13
- export type ConfigNetworkAvail = MergeIntersects<Static<ReturnType<typeof ConfigNetworkSchemaAvail.allProperties<true>>>>;
14
- //# sourceMappingURL=avail.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"avail.d.ts","sourceRoot":"","sources":["../../../../../../src/config/src/schema/network/substrate/avail.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAavE,eAAO,MAAM,wBAAwB;;;;;;;4CAUnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAC9C,MAAM,CAAC,UAAU,CAAC,OAAO,wBAAwB,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CACxE,CAAC"}
@@ -1,26 +0,0 @@
1
- import { Type } from "@sinclair/typebox";
2
- import { ConfigSchema } from "../../utils.js";
3
- import { ConfigNetworkType } from "../types.js";
4
- import { TypeboxHelpers } from "../../../../../utils/src/mod.js";
5
- // =====
6
- // Utils
7
- // =====
8
- // none
9
- // ===========
10
- // Base schema
11
- // ===========
12
- export const ConfigNetworkSchemaAvail = new ConfigSchema({
13
- required: Type.Object({
14
- name: Type.String(),
15
- type: Type.Literal(ConfigNetworkType.AVAIL),
16
- genesisSeed: Type.String(),
17
- caip2: TypeboxHelpers.Caip2,
18
- nodeUrl: Type.String(),
19
- genesisHash: Type.String(),
20
- }),
21
- optional: Type.Object({}),
22
- });
23
- // ===========
24
- // Conversions
25
- // ===========
26
- // none
@@ -1,18 +0,0 @@
1
- import type { Static } from "@sinclair/typebox";
2
- import { ConfigSchema } from "../../utils.js";
3
- import { ConfigNetworkType } from "../types.js";
4
- import { type MergeIntersects } from "../../../../../utils/src/mod.js";
5
- /**
6
- * This will be the network identifier of the Substrate chain.
7
- * In Substrate it is always the genesis hash of the network (hash of the first block)
8
- * You can retrieve this easily by going to PolkadotJS and looking for the hash on block 0
9
- * e.g. for Kusama it is 0xb0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe.
10
- */
11
- export declare const SubstrateGenesisHash: import("@sinclair/typebox").TUnsafe<`0x${string}`>;
12
- export declare const ConfigNetworkSchemaSubstrate: ConfigSchema<import("@sinclair/typebox").TObject<{
13
- name: import("@sinclair/typebox").TString;
14
- type: import("@sinclair/typebox").TLiteral<ConfigNetworkType.SUBSTRATE>;
15
- genesisHash: import("@sinclair/typebox").TUnsafe<`0x${string}`>;
16
- }>, import("@sinclair/typebox").TObject<{}>>;
17
- export type ConfigNetworkSubstrate = MergeIntersects<Static<ReturnType<typeof ConfigNetworkSchemaSubstrate.allProperties<true>>>>;
18
- //# sourceMappingURL=common.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../../src/config/src/schema/network/substrate/common.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,KAAK,eAAe,EAAkB,MAAM,iCAAiC,CAAC;AAMvF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,oDAG/B,CAAC;AAMH,eAAO,MAAM,4BAA4B;;;;4CAOvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,eAAe,CAClD,MAAM,CAAC,UAAU,CAAC,OAAO,4BAA4B,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAC5E,CAAC"}
@@ -1,32 +0,0 @@
1
- import { Type } from "@sinclair/typebox";
2
- import { ConfigSchema } from "../../utils.js";
3
- import { ConfigNetworkType } from "../types.js";
4
- import { TypeboxHelpers } from "../../../../../utils/src/mod.js";
5
- // =====
6
- // Utils
7
- // =====
8
- /**
9
- * This will be the network identifier of the Substrate chain.
10
- * In Substrate it is always the genesis hash of the network (hash of the first block)
11
- * You can retrieve this easily by going to PolkadotJS and looking for the hash on block 0
12
- * e.g. for Kusama it is 0xb0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe.
13
- */
14
- export const SubstrateGenesisHash = TypeboxHelpers.HexString0x({
15
- maxLength: 66, // 64 + '0x'.length
16
- minLength: 66,
17
- });
18
- // ===========
19
- // Base schema
20
- // ===========
21
- export const ConfigNetworkSchemaSubstrate = new ConfigSchema({
22
- required: Type.Object({
23
- name: Type.String(),
24
- type: Type.Literal(ConfigNetworkType.SUBSTRATE),
25
- genesisHash: SubstrateGenesisHash,
26
- }),
27
- optional: Type.Object({}),
28
- });
29
- // ===========
30
- // Conversions
31
- // ===========
32
- // none
@@ -1,20 +0,0 @@
1
- import type { Static } from "@sinclair/typebox";
2
- import { ConfigSchema } from "../../utils.js";
3
- import { ConfigNetworkType } from "../types.js";
4
- import type { MergeIntersects } from "../../../../../utils/src/mod.js";
5
- export declare const ConfigNetworkSchemaMidnight: ConfigSchema<import("@sinclair/typebox").TObject<{
6
- name: import("@sinclair/typebox").TString;
7
- type: import("@sinclair/typebox").TLiteral<ConfigNetworkType.MIDNIGHT>;
8
- /**
9
- * TODO: possibly this should switch to either
10
- * - a string following @midnight-ntwrk/midnight-js-network-id
11
- * - a genesis hash (following Substrate standard)
12
- *
13
- * 0 for localhost
14
- * 1 for devnet
15
- */
16
- networkId: import("@sinclair/typebox").TNumber;
17
- genesisHash: import("@sinclair/typebox").TUnsafe<`0x${string}`>;
18
- }>, import("@sinclair/typebox").TObject<{}>>;
19
- export type ConfigNetworkMidnight = MergeIntersects<Static<ReturnType<typeof ConfigNetworkSchemaMidnight.allProperties<true>>>>;
20
- //# sourceMappingURL=midnight.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"midnight.d.ts","sourceRoot":"","sources":["../../../../../../src/config/src/schema/network/substrate/midnight.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAavE,eAAO,MAAM,2BAA2B;;;IAIpC;;;;;;;OAOG;;;4CAKL,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,eAAe,CACjD,MAAM,CAAC,UAAU,CAAC,OAAO,2BAA2B,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAC3E,CAAC"}
@@ -1,32 +0,0 @@
1
- import { Type } from "@sinclair/typebox";
2
- import { ConfigSchema } from "../../utils.js";
3
- import { ConfigNetworkType } from "../types.js";
4
- import { SubstrateGenesisHash } from "./common.js";
5
- // =====
6
- // Utils
7
- // =====
8
- // none
9
- // ===========
10
- // Base schema
11
- // ===========
12
- export const ConfigNetworkSchemaMidnight = new ConfigSchema({
13
- required: Type.Object({
14
- name: Type.String(),
15
- type: Type.Literal(ConfigNetworkType.MIDNIGHT),
16
- /**
17
- * TODO: possibly this should switch to either
18
- * - a string following @midnight-ntwrk/midnight-js-network-id
19
- * - a genesis hash (following Substrate standard)
20
- *
21
- * 0 for localhost
22
- * 1 for devnet
23
- */
24
- networkId: Type.Number(),
25
- genesisHash: SubstrateGenesisHash,
26
- }),
27
- optional: Type.Object({}),
28
- });
29
- // ===========
30
- // Conversions
31
- // ===========
32
- // none
@@ -1,4 +0,0 @@
1
- export * from "./avail.js";
2
- export * from "./common.js";
3
- export * from "./midnight.js";
4
- //# sourceMappingURL=mod.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../../../src/config/src/schema/network/substrate/mod.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC"}
@@ -1,3 +0,0 @@
1
- export * from "./avail.js";
2
- export * from "./common.js";
3
- export * from "./midnight.js";
@@ -1,13 +0,0 @@
1
- export declare enum ConfigNetworkType {
2
- NTP = "ntp",
3
- EVM = "evm",
4
- CARDANO = "cardano",
5
- MINA = "mina",
6
- ALGORAND = "algorand",
7
- /** generic substrate network */
8
- SUBSTRATE = "substrate",
9
- AVAIL = "avail",
10
- MIDNIGHT = "midnight",
11
- BITCOIN = "bitcoin"
12
- }
13
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/config/src/schema/network/types.ts"],"names":[],"mappings":"AAAA,oBAAY,iBAAiB;IAC3B,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,gCAAgC;IAChC,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB"}
@@ -1,13 +0,0 @@
1
- export var ConfigNetworkType;
2
- (function (ConfigNetworkType) {
3
- ConfigNetworkType["NTP"] = "ntp";
4
- ConfigNetworkType["EVM"] = "evm";
5
- ConfigNetworkType["CARDANO"] = "cardano";
6
- ConfigNetworkType["MINA"] = "mina";
7
- ConfigNetworkType["ALGORAND"] = "algorand";
8
- /** generic substrate network */
9
- ConfigNetworkType["SUBSTRATE"] = "substrate";
10
- ConfigNetworkType["AVAIL"] = "avail";
11
- ConfigNetworkType["MIDNIGHT"] = "midnight";
12
- ConfigNetworkType["BITCOIN"] = "bitcoin";
13
- })(ConfigNetworkType || (ConfigNetworkType = {}));
@@ -1,5 +0,0 @@
1
- import type { Static } from "@sinclair/typebox";
2
- import { type Caip2, type MergeIntersects } from "../../../../utils/src/mod.js";
3
- import type { ConfigNetworkAll } from "./all.js";
4
- export declare function caip2PrefixFor(config: MergeIntersects<Static<ReturnType<typeof ConfigNetworkAll<false>>>>): Caip2;
5
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/config/src/schema/network/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,eAAe,EAAW,MAAM,8BAA8B,CAAC;AAGzF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAsCjD,wBAAgB,cAAc,CAC5B,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAC1E,KAAK,CA4CP"}
@@ -1,73 +0,0 @@
1
- import { strip0x } from "../../../../utils/src/mod.js";
2
- import { registry, toChainId } from "@dcspark/cip34-js";
3
- import { ConfigNetworkType } from "./types.js";
4
- import { Buffer } from "node:buffer";
5
- function networkToCip34(config) {
6
- switch (config.network) {
7
- case "mainnet":
8
- return toChainId({
9
- networkId: registry.Mainnet.NetworkId,
10
- networkMagic: registry.Mainnet.NetworkMagic,
11
- });
12
- case "preprod":
13
- return toChainId({
14
- networkId: registry.PreProduction.NetworkId,
15
- networkMagic: registry.PreProduction.NetworkMagic,
16
- });
17
- case "preview":
18
- return toChainId({
19
- networkId: registry.Preview.NetworkId,
20
- networkMagic: registry.Preview.NetworkMagic,
21
- });
22
- case "yaci":
23
- // TODO: dynamically fetch (but it should probably be added inside `config` directly instead of fetched here)
24
- // see: https://github.com/utxorpc/spec/pull/147#discussion_r2013805908
25
- return toChainId({
26
- // default values for yaci-devkit
27
- networkId: 0,
28
- networkMagic: 42,
29
- });
30
- }
31
- throw new Error(`Unknown network: ${config.network}`);
32
- }
33
- export function caip2PrefixFor(config) {
34
- const type = config.type;
35
- // see https://github.com/ChainAgnostic/namespaces
36
- switch (type) {
37
- case ConfigNetworkType.NTP:
38
- // TODO What to return here
39
- return `ntp:${config.name}`;
40
- case ConfigNetworkType.EVM:
41
- // https://github.com/ChainAgnostic/namespaces/tree/main/eip155
42
- return `eip155:${config.chainId}`;
43
- case ConfigNetworkType.MINA:
44
- // https://github.com/ChainAgnostic/namespaces/blob/main/mina/caip2.md
45
- return `mina:${config.networkId}`;
46
- case ConfigNetworkType.CARDANO:
47
- // https://github.com/cardano-foundation/CIPs/tree/master/CIP-0034
48
- return networkToCip34(config);
49
- case ConfigNetworkType.AVAIL:
50
- // https://github.com/ChainAgnostic/namespaces/blob/main/polkadot/caip2.md
51
- return `polkadot:${strip0x(config.genesisHash).slice(0, 32)}`;
52
- case ConfigNetworkType.MIDNIGHT:
53
- // https://github.com/ChainAgnostic/namespaces/blob/main/polkadot/caip2.md
54
- return `polkadot:${strip0x(config.genesisHash).slice(0, 32)}`;
55
- case ConfigNetworkType.BITCOIN: {
56
- const chainIdentifier = config.chainIdentifier ??
57
- config.network ??
58
- config.name;
59
- return `bip122:${chainIdentifier}`;
60
- }
61
- case ConfigNetworkType.SUBSTRATE:
62
- // https://github.com/ChainAgnostic/namespaces/blob/main/polkadot/caip2.md
63
- return `polkadot:${strip0x(config.genesisHash).slice(0, 32)}`;
64
- case ConfigNetworkType.ALGORAND: {
65
- // https://github.com/ChainAgnostic/namespaces/blob/main/algorand/caip2.md
66
- const urlSafe = Buffer.from(config.genesisHash, "base64").toString("base64url");
67
- const prefix = urlSafe.substring(0, 32);
68
- const identifier = "algorand:" + prefix;
69
- return identifier;
70
- }
71
- }
72
- throw new Error(`Unknown network type: ${type}`);
73
- }
@@ -1,2 +0,0 @@
1
- export * from "./types.js";
2
- //# sourceMappingURL=mod.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../../src/config/src/schema/primitive/mod.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -1 +0,0 @@
1
- export * from "./types.js";