@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
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PolkadotCrypto = void 0;
4
+ const mod_js_1 = require("../../../utils/src/mod.js");
5
+ const value_1 = require("@sinclair/typebox/value");
6
+ const util_crypto_1 = require("@polkadot/util-crypto");
7
+ const util_1 = require("@polkadot/util");
8
+ class PolkadotCrypto {
9
+ verifyAddress = (address) => {
10
+ return value_1.Value.Check(mod_js_1.TypeboxHelpers.Substrate.Address, address);
11
+ };
12
+ verifySignature = async (userAddress, message, signature) => {
13
+ try {
14
+ // const { cryptoWaitReady, decodeAddress, signatureVerify } = await import(
15
+ // "@polkadot/util-crypto"
16
+ // );
17
+ // const { u8aToHex } = await import("@polkadot/util");
18
+ await (0, util_crypto_1.cryptoWaitReady)();
19
+ const publicKey = (0, util_crypto_1.decodeAddress)(userAddress);
20
+ const hexPublicKey = (0, util_1.u8aToHex)(publicKey);
21
+ return (0, util_crypto_1.signatureVerify)(message, signature, hexPublicKey).isValid;
22
+ }
23
+ catch (err) {
24
+ console.error("[address-validator] error verifying polkadot signature:", err);
25
+ return false;
26
+ }
27
+ };
28
+ decodeAddress(address) {
29
+ return value_1.Value.Decode(mod_js_1.TypeboxHelpers.Polkadot.Address, address);
30
+ }
31
+ }
32
+ exports.PolkadotCrypto = PolkadotCrypto;
@@ -0,0 +1,5 @@
1
+ export * from "./CryptoManager.js";
2
+ export * from "./IVerify.js";
3
+ export { Prando } from "./Prando.js";
4
+ export { generatePaimaBlockHash } from "./paima-hash.js";
5
+ //# sourceMappingURL=mod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/crypto/src/mod.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -14,5 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./config/mod.js"), exports);
18
- __exportStar(require("./schema/mod.js"), exports);
17
+ exports.generatePaimaBlockHash = exports.Prando = void 0;
18
+ __exportStar(require("./CryptoManager.js"), exports);
19
+ __exportStar(require("./IVerify.js"), exports);
20
+ var Prando_js_1 = require("./Prando.js");
21
+ Object.defineProperty(exports, "Prando", { enumerable: true, get: function () { return Prando_js_1.Prando; } });
22
+ var paima_hash_js_1 = require("./paima-hash.js");
23
+ Object.defineProperty(exports, "generatePaimaBlockHash", { enumerable: true, get: function () { return paima_hash_js_1.generatePaimaBlockHash; } });
@@ -0,0 +1,14 @@
1
+ import type { BlockHash, PaimaBlockHash } from "../../utils/src/mod.js";
2
+ /**
3
+ * Calculates the Paima block hash based on the captured blocks, and previous block hash.
4
+ * @param chainBlock - The chain block to hash.
5
+ * @param previousBlockHash - The previous block hash.
6
+ * @returns The Paima block hash.
7
+ */
8
+ export declare function generatePaimaBlockHash(chainBlock: {
9
+ blockInfo: {
10
+ blockHash: BlockHash;
11
+ }[];
12
+ }, // ChainBlock,
13
+ previousBlockHash: PaimaBlockHash | null): PaimaBlockHash;
14
+ //# sourceMappingURL=paima-hash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paima-hash.d.ts","sourceRoot":"","sources":["../../../src/crypto/src/paima-hash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxE;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE;IAAE,SAAS,EAAE;QAAE,SAAS,EAAE,SAAS,CAAA;KAAE,EAAE,CAAA;CAAE,EAAE,cAAc;AACrE,iBAAiB,EAAE,cAAc,GAAG,IAAI,GACvC,cAAc,CAIhB"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.generatePaimaBlockHash = generatePaimaBlockHash;
7
+ const node_crypto_1 = __importDefault(require("node:crypto"));
8
+ /**
9
+ * Calculates the Paima block hash based on the captured blocks, and previous block hash.
10
+ * @param chainBlock - The chain block to hash.
11
+ * @param previousBlockHash - The previous block hash.
12
+ * @returns The Paima block hash.
13
+ */
14
+ function generatePaimaBlockHash(chainBlock, // ChainBlock,
15
+ previousBlockHash) {
16
+ const hashes = chainBlock.blockInfo.map((h) => h.blockHash);
17
+ const hashString = [previousBlockHash ?? "0x0", ...hashes].join("");
18
+ return `0x${node_crypto_1.default.hash("sha512", hashString, "hex")}`;
19
+ }
@@ -12,7 +12,7 @@ export type Caip2 = FastFlavor<string, "Caip2">;
12
12
  */
13
13
  export type EvmSignature = FastFlavor<HexString0x, "EvmSignature">;
14
14
  export type GenericSignature = FastFlavor<string, "OtherSignature">;
15
- export type Signature = EvmSignature | GenericSignature;
15
+ export type Signature = EvmSignature | GenericSignature | MidnightSignature;
16
16
  export type VersionString = `${number}.${number}.${number}`;
17
17
  export type PaimaBlockNumber = FastFlavor<number, "PaimaBlockNumber">;
18
18
  export type EvmBlockNumber = FastFlavor<number, "EvmBlockNumber">;
@@ -62,9 +62,13 @@ export type Evm4ByteSelector = FastFlavor<HexString0x, "Evm4ByteSelector">;
62
62
  export type MidnightBlockHash = FastFlavor<HexString0x, "MidnightBlockHash">;
63
63
  export type MidnightTxHash = FastFlavor<HexString0x, "MidnightTxHash">;
64
64
  export type MidnightAddress = FastFlavor<string, "MidnightAddress">;
65
+ export type MidnightSignature = FastFlavor<string, "MidnightSignature">;
65
66
  export type MinaBlockHash = FastFlavor<UnknownFormat, "MinaBlockHash">;
66
67
  export type MinaTxHash = FastFlavor<UnknownFormat, "MinaTxHash">;
67
68
  export type MinaAddress = FastFlavor<string, "MinaAddress">;
69
+ export type PolkadotAddress = SubstrateAddress;
70
+ export type PolkadotBlockHash = FastFlavor<UnknownFormat, "PolkadotBlockHash">;
71
+ export type PolkadotTxHash = FastFlavor<UnknownFormat, "PolkadotTxHash">;
68
72
  export type SubstrateAddress = FastFlavor<string, "SubstrateAddress">;
69
73
  export type BitcoinBlockHash = FastFlavor<string, "BitcoinBlockHash">;
70
74
  export type BitcoinTxId = FastFlavor<string, "BitcoinTxId">;
@@ -1 +1 @@
1
- {"version":3,"file":"nominal.d.ts","sourceRoot":"","sources":["../../../../src/utils/src/types/nominal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AAEnC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C,MAAM,EAAE,gBAAgB,CAAC,CAAC;AAClE,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;AAClE,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAC/C,MAAM,EACN,0BAA0B,CAC3B,CAAC"}
@@ -56,6 +56,7 @@ export declare const TypeboxHelpers: {
56
56
  BlockHash: TUnsafe<Nominal.MidnightBlockHash>;
57
57
  TxHash: TUnsafe<Nominal.MidnightTxHash>;
58
58
  Address: TUnsafe<Nominal.MidnightAddress>;
59
+ Signature: TUnsafe<Nominal.MidnightSignature>;
59
60
  };
60
61
  Mina: {
61
62
  BlockHash: TUnsafe<Nominal.MinaBlockHash>;
@@ -63,9 +64,9 @@ export declare const TypeboxHelpers: {
63
64
  Address: TUnsafe<Nominal.MinaAddress>;
64
65
  };
65
66
  Polkadot: {
66
- BlockHash: TUnsafe<Nominal.MinaBlockHash>;
67
- TxHash: TUnsafe<Nominal.MinaTxHash>;
68
- Address: TUnsafe<Nominal.MinaAddress>;
67
+ BlockHash: TUnsafe<Nominal.PolkadotBlockHash>;
68
+ TxHash: TUnsafe<Nominal.PolkadotTxHash>;
69
+ Address: TUnsafe<Nominal.SubstrateAddress>;
69
70
  };
70
71
  Caip2: TUnsafe<Nominal.Caip2>;
71
72
  WalletAddress: () => TUnion<[TObject<{
@@ -94,7 +95,7 @@ export declare const TypeboxHelpers: {
94
95
  address: TUnsafe<Nominal.MidnightAddress>;
95
96
  }>, TObject<{
96
97
  type: import("@sinclair/typebox").TLiteral<AddressType.POLKADOT>;
97
- address: TUnsafe<Nominal.MinaAddress>;
98
+ address: TUnsafe<Nominal.SubstrateAddress>;
98
99
  }>]>;
99
100
  IntervalMs: (options?: NumberOptions) => TUnsafe<Nominal.IntervalMs>;
100
101
  IntervalSec: (options?: NumberOptions) => TUnsafe<Nominal.IntervalSec>;
@@ -123,7 +124,7 @@ export declare const AddressValidator: {
123
124
  readonly 3: TUnsafe<Nominal.AlgorandAddress>;
124
125
  readonly 4: TUnsafe<Nominal.MinaAddress>;
125
126
  readonly 5: TUnsafe<Nominal.MidnightAddress>;
126
- readonly 7: TUnsafe<Nominal.MinaAddress>;
127
+ readonly 7: TUnsafe<Nominal.SubstrateAddress>;
127
128
  };
128
129
  export declare const AddressTypebox: readonly [TObject<{
129
130
  type: import("@sinclair/typebox").TLiteral<AddressType.NONE>;
@@ -151,7 +152,7 @@ export declare const AddressTypebox: readonly [TObject<{
151
152
  address: TUnsafe<Nominal.MidnightAddress>;
152
153
  }>, TObject<{
153
154
  type: import("@sinclair/typebox").TLiteral<AddressType.POLKADOT>;
154
- address: TUnsafe<Nominal.MinaAddress>;
155
+ address: TUnsafe<Nominal.SubstrateAddress>;
155
156
  }>];
156
157
  type AddressTypeMap = {
157
158
  [K in keyof typeof AddressValidator]: StaticDecode<(typeof AddressValidator)[K]>;
@@ -1 +1 @@
1
- {"version":3,"file":"typebox-helpers.d.ts","sourceRoot":"","sources":["../../../../src/utils/src/types/typebox-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,IAAI,EAAQ,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,aAAa,EACb,MAAM,EACN,YAAY,EACZ,KAAK,EACL,OAAO,EAEP,OAAO,EACP,OAAO,EACP,UAAU,EACV,MAAM,EACN,OAAO,EACR,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,WAAW,CAAC;AACtE,OAAO,KAAK,KAAK,OAAO,MAAM,cAAc,CAAC;AAmB7C,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,KAAK,GAAG,OAAO,IAAI,CAAC,SAAS,OAAO,GACxE,YAAY,CAAC,CAAC,CAAC,GACf,KAAK,CAAC;AAKV,oBAAY,WAAW;IACrB,IAAI,KAAK;IACT,GAAG,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ase(typebox_1.Type.RegExp(/^0x[a-fA-F0-9]{64}$/))),
145
145
  TxHash: typebox_1.Type.Unsafe(forceLowercase(typebox_1.Type.RegExp(/^0x[a-fA-F0-9]{64}$/))),
146
- Address: typebox_1.Type.Unsafe(forceLowercase(typebox_1.Type.RegExp(/^[a-fA-F0-9]{181}$/))),
146
+ // TODO Temporal placeholder for midnight address
147
+ Address: typebox_1.Type.Unsafe(forceLowercase(typebox_1.Type.RegExp(/^mn_(shield-addr|addr|dust-addr|shield-esk|shield-cpk)_(test|dev|undeployed)[a-zA-Z0-9]+$/))),
148
+ // TODO Temporal placeholder for midnight signature
149
+ Signature: typebox_1.Type.Unsafe(typebox_1.Type.RegExp(/^.*$/)),
147
150
  },
148
151
  Mina: {
149
152
  BlockHash: typebox_1.Type.Unsafe(typebox_1.Type.String({ format: "mina-blockhash" })),
150
153
  TxHash: typebox_1.Type.Unsafe(typebox_1.Type.String({ format: "mina-txid" })),
151
154
  Address: typebox_1.Type.Unsafe(typebox_1.Type.String({ format: "mina-address" })),
152
155
  },
153
- // TODO THIS IS WRONG TYPE - ONLY A PLACEHOLDER
156
+ // TODO: PLACEHOLDER TYPES FOR POLKADOT
154
157
  Polkadot: {
155
- BlockHash: typebox_1.Type.Unsafe(typebox_1.Type.String({ format: "mina-blockhash" })),
156
- TxHash: typebox_1.Type.Unsafe(typebox_1.Type.String({ format: "mina-txid" })),
157
- Address: typebox_1.Type.Unsafe(typebox_1.Type.String({ format: "mina-address" })),
158
+ BlockHash: typebox_1.Type.Unsafe(typebox_1.Type.String({ format: "polkadot-blockhash" })),
159
+ TxHash: typebox_1.Type.Unsafe(typebox_1.Type.String({ format: "polkadot-txid" })),
160
+ Address: typebox_1.Type.Unsafe(typebox_1.Type.String({ format: "ss58" })),
158
161
  },
159
162
  Caip2: typebox_1.Type.Unsafe(typebox_1.Type.String()),
160
163
  WalletAddress: () => typebox_1.Type.Union(exports.AddressTypebox),
@@ -0,0 +1,26 @@
1
+ import { PeraWalletConnect } from "@perawallet/connect";
2
+ import { type IConnector, type IInjectedConnector, type ConnectionOption, type ActiveConnection, type IProvider, type AddressAndType, type UserSignature } from "../IProvider.js";
3
+ export type AlgorandApi = PeraWalletConnect;
4
+ export type AlgorandAddress = string;
5
+ export declare class AlgorandConnector implements IConnector<AlgorandApi>, IInjectedConnector<AlgorandApi> {
6
+ private provider;
7
+ private static INSTANCE;
8
+ static getWalletOptions(): ConnectionOption<AlgorandApi>[];
9
+ static instance(): AlgorandConnector;
10
+ connectSimple: () => Promise<AlgorandProvider>;
11
+ connectExternal: (conn: ActiveConnection<AlgorandApi>) => Promise<AlgorandProvider>;
12
+ connectNamed: (name: string) => Promise<AlgorandProvider>;
13
+ getProvider: () => undefined | AlgorandProvider;
14
+ getOrThrowProvider: () => AlgorandProvider;
15
+ isConnected: () => boolean;
16
+ }
17
+ export declare class AlgorandProvider implements IProvider<AlgorandApi> {
18
+ private readonly conn;
19
+ readonly address: AlgorandAddress;
20
+ constructor(conn: ActiveConnection<AlgorandApi>, address: AlgorandAddress);
21
+ static init: (conn: ActiveConnection<AlgorandApi>) => Promise<AlgorandProvider>;
22
+ getConnection: () => ActiveConnection<AlgorandApi>;
23
+ getAddress: () => AddressAndType;
24
+ signMessage: (message: string) => Promise<UserSignature>;
25
+ }
26
+ //# sourceMappingURL=algorand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"algorand.d.ts","sourceRoot":"","sources":["../../../../src/wallets/src/algorand/algorand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EACL,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EAErB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,iBAAiB,CAAC;AAIzB,MAAM,MAAM,WAAW,GAAG,iBAAiB,CAAC;AAC5C,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AAErC,qBAAa,iBACX,YAAW,UAAU,CAAC,WAAW,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC;IAEnE,OAAO,CAAC,QAAQ,CAA+B;IAC/C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAA4C;IAEnE,MAAM,CAAC,gBAAgB,IAAI,gBAAgB,CAAC,WAAW,CAAC,EAAE;IA4B1D,MAAM,CAAC,QAAQ,IAAI,iBAAiB;IAOpC,aAAa,QAAa,OAAO,CAAC,gBAAgB,CAAC,CASjD;IACF,eAAe,GACb,MAAM,gBAAgB,CAAC,WAAW,CAAC,KAClC,OAAO,CAAC,gBAAgB,CAAC,CAM1B;IACF,YAAY,GAAU,MAAM,MAAM,KAAG,OAAO,CAAC,gBAAgB,CAAC,CAW5D;IACF,WAAW,QAAO,SAAS,GAAG,gBAAgB,CAE5C;IACF,kBAAkB,QAAO,gBAAgB,CAKvC;IACF,WAAW,QAAO,OAAO,CAEvB;CACH;AAED,qBAAa,gBAAiB,YAAW,SAAS,CAAC,WAAW,CAAC;IAE3D,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,QAAQ,CAAC,OAAO,EAAE,eAAe;gBADhB,IAAI,EAAE,gBAAgB,CAAC,WAAW,CAAC,EAC3C,OAAO,EAAE,eAAe;IAEnC,MAAM,CAAC,IAAI,GACT,MAAM,gBAAgB,CAAC,WAAW,CAAC,KAClC,OAAO,CAAC,gBAAgB,CAAC,CAiB1B;IACF,aAAa,QAAO,gBAAgB,CAAC,WAAW,CAAC,CAE/C;IACF,UAAU,QAAO,cAAc,CAK7B;IACF,WAAW,GAAU,SAAS,MAAM,KAAG,OAAO,CAAC,aAAa,CAAC,CA4B3D;CACH"}
@@ -0,0 +1,138 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AlgorandProvider = exports.AlgorandConnector = void 0;
4
+ const connect_1 = require("@perawallet/connect");
5
+ const mod_js_1 = require("../../../utils/src/mod.js");
6
+ const IProvider_js_1 = require("../IProvider.js");
7
+ const windows_js_1 = require("../windows.js");
8
+ const mod_js_2 = require("../../../crypto/src/mod.js");
9
+ class AlgorandConnector {
10
+ provider;
11
+ static INSTANCE = undefined;
12
+ static getWalletOptions() {
13
+ // Algorand has no standard for wallet discovery
14
+ // The closest that exists is ARC11 (https://arc.algorand.foundation/ARCs/arc-0011)
15
+ // but it doesn't give any information about which wallet is injected
16
+ // and, similar to window.ethereum, has wallets overriding each other
17
+ // and Pera wallet doesn't even use this standard
18
+ // instead, the best we can do is check if Pera injected its UI component in the window
19
+ if ((0, windows_js_1.getWindow)()?.customElements.get("pera-wallet-connect-modal") ==
20
+ null) {
21
+ return [];
22
+ }
23
+ return [
24
+ {
25
+ metadata: {
26
+ name: "pera",
27
+ displayName: "Pera Wallet",
28
+ },
29
+ api: async () => {
30
+ // const { PeraWalletConnect } = await import("@perawallet/connect");
31
+ const peraWallet = new connect_1.PeraWalletConnect();
32
+ return peraWallet;
33
+ },
34
+ },
35
+ ];
36
+ }
37
+ static instance() {
38
+ if (AlgorandConnector.INSTANCE == null) {
39
+ const newInstance = new AlgorandConnector();
40
+ AlgorandConnector.INSTANCE = newInstance;
41
+ }
42
+ return AlgorandConnector.INSTANCE;
43
+ }
44
+ connectSimple = async () => {
45
+ if (this.provider != null) {
46
+ return this.provider;
47
+ }
48
+ const options = AlgorandConnector.getWalletOptions();
49
+ if (options.length === 0) {
50
+ throw new Error(`No Algorand wallet found`);
51
+ }
52
+ return await this.connectExternal(await (0, IProvider_js_1.optionToActive)(options[0]));
53
+ };
54
+ connectExternal = async (conn) => {
55
+ if (this.provider?.getConnection().metadata?.name === conn.metadata.name) {
56
+ return this.provider;
57
+ }
58
+ this.provider = await AlgorandProvider.init(conn);
59
+ return this.provider;
60
+ };
61
+ connectNamed = async (name) => {
62
+ if (this.provider?.getConnection().metadata?.name === name) {
63
+ return this.provider;
64
+ }
65
+ const provider = AlgorandConnector.getWalletOptions().find((entry) => entry.metadata.name === name);
66
+ if (provider == null) {
67
+ throw new Error(`AlgorandProvider: unsupported connection type ${name}`);
68
+ }
69
+ return await this.connectExternal(await (0, IProvider_js_1.optionToActive)(provider));
70
+ };
71
+ getProvider = () => {
72
+ return this.provider;
73
+ };
74
+ getOrThrowProvider = () => {
75
+ if (this.provider == null) {
76
+ throw new Error(`AlgorandConnector provider isn't initialized yet`);
77
+ }
78
+ return this.provider;
79
+ };
80
+ isConnected = () => {
81
+ return this.provider != null;
82
+ };
83
+ }
84
+ exports.AlgorandConnector = AlgorandConnector;
85
+ class AlgorandProvider {
86
+ conn;
87
+ address;
88
+ constructor(conn, address) {
89
+ this.conn = conn;
90
+ this.address = address;
91
+ }
92
+ static init = async (conn) => {
93
+ let newAccounts = [];
94
+ // conn.api.isConnected starts as false, even if connected
95
+ // if connected and connected() is called, then an error is thrown
96
+ try {
97
+ newAccounts = await conn.api.reconnectSession();
98
+ if (newAccounts.length < 1) {
99
+ throw new Error("[peraLogin] no addresses returned!");
100
+ }
101
+ }
102
+ catch (error) {
103
+ newAccounts = await conn.api.connect();
104
+ }
105
+ if (newAccounts.length < 1) {
106
+ throw new Error("[peraLogin] no addresses returned!");
107
+ }
108
+ return new AlgorandProvider(conn, newAccounts[0]);
109
+ };
110
+ getConnection = () => {
111
+ return this.conn;
112
+ };
113
+ getAddress = () => {
114
+ return {
115
+ type: mod_js_1.AddressType.ALGORAND,
116
+ address: this.address,
117
+ };
118
+ };
119
+ signMessage = async (message) => {
120
+ const txn = await mod_js_2.CryptoManager.Algorand().buildAlgorandTransaction(this.getAddress().address, message);
121
+ const signerTx = {
122
+ txn,
123
+ signers: [this.getAddress().address],
124
+ };
125
+ const signedTxs = await this.conn.api.signTransaction([[signerTx]], this.getAddress().address);
126
+ if (signedTxs.length !== 1) {
127
+ throw new Error(`[signMessageAlgorand] invalid number of signatures returned: ${signedTxs.length}`);
128
+ }
129
+ const signedTx = await mod_js_2.CryptoManager.Algorand().decodeSignedTransaction(signedTxs[0]);
130
+ const signature = signedTx.sig;
131
+ if (!signature) {
132
+ throw new Error(`[signMessageAlgorand] signature missing in signed Tx`);
133
+ }
134
+ const hexSignature = (0, mod_js_1.uint8ArrayToHexString)(signature);
135
+ return hexSignature;
136
+ };
137
+ }
138
+ exports.AlgorandProvider = AlgorandProvider;
@@ -0,0 +1,6 @@
1
+ import type { Result } from "../../../utils/src/mod.js";
2
+ import type { IProvider } from "../IProvider.js";
3
+ import type { WalletMode, ApiForMode } from "../utils.js";
4
+ import { type LoginInfoMap } from "../wallet-modes.js";
5
+ export declare function algorandLoginWrapper(loginInfo: LoginInfoMap[WalletMode.Algorand]): Promise<Result<IProvider<ApiForMode<WalletMode.Algorand>>>>;
6
+ //# sourceMappingURL=wrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wrapper.d.ts","sourceRoot":"","sources":["../../../../src/wallets/src/algorand/wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,KAAK,YAAY,EAAmB,MAAM,oBAAoB,CAAC;AAGxE,wBAAsB,oBAAoB,CACxC,SAAS,EAAE,YAAY,CAAC,UAAU,CAAC,QAAQ,CAAC,GAC3C,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAa7D"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.algorandLoginWrapper = algorandLoginWrapper;
4
+ const wallet_modes_js_1 = require("../wallet-modes.js");
5
+ const algorand_js_1 = require("./algorand.js");
6
+ async function algorandLoginWrapper(loginInfo) {
7
+ const loginResult = await (0, wallet_modes_js_1.connectInjected)("algorandLoginWrapper", loginInfo, algorand_js_1.AlgorandConnector.instance());
8
+ if (loginResult.success === false) {
9
+ return loginResult;
10
+ }
11
+ return {
12
+ success: true,
13
+ result: loginResult.result,
14
+ };
15
+ }
@@ -134,7 +134,7 @@ class CardanoProvider {
134
134
  };
135
135
  signMessage = async (message) => {
136
136
  const hexMessage = (0, web3_utils_1.utf8ToHex)(message).slice(2);
137
- const address = this.conn.metadata.name === 'nami' ? this.address.hex : this.address.bech32;
137
+ const address = (this.conn.metadata.name === 'nami' || this.conn.metadata.name === 'subwallet') ? this.address.hex : this.address.bech32;
138
138
  const { signature, key } = await this.conn.api.signData(address, hexMessage);
139
139
  return `${signature}+${key}`;
140
140
  };
@@ -13,7 +13,7 @@ class MidnightConnector {
13
13
  if (midnightApi == null)
14
14
  return [];
15
15
  const options = Object.entries(midnightApi).reduce((options, [key, info]) => {
16
- if (info.name != null && info.enable != null && info.name === 'lace') {
16
+ if (info.name != null && info.enable != null) {
17
17
  options.push({
18
18
  metadata: {
19
19
  name: key,
@@ -112,7 +112,7 @@ class MinaProvider {
112
112
  // only these two options are used
113
113
  // https://github.com/aurowallet/auro-wallet-browser-extension/blob/624de322dd99baaa09617bbad4a4a838f0a88edc/src/background/lib/index.js#L17
114
114
  // this is part of the hashed message
115
- const network = networkKind.networkID === "mainnet" ? "mainnet" : "testnet";
115
+ const network = networkKind.networkID === "mina:mainnet" ? "mainnet" : "testnet";
116
116
  return `${signature.field};${signature.scalar};${network}`;
117
117
  }
118
118
  else {
@@ -4,5 +4,6 @@ export type { WalletAddress } from "../../utils/src/mod.js";
4
4
  export { WalletMode, WalletNameMap } from "./utils.js";
5
5
  export { walletLogin } from "./wallets.js";
6
6
  export { allInjectedWallets } from "./utils.js";
7
+ export { getAddressType } from "./wallet-modes.js";
7
8
  export * from "./paima.js";
8
9
  //# sourceMappingURL=mod.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/wallets/src/mod.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC7F,YAAY,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACzC,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/wallets/src/mod.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC7F,YAAY,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACzC,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,cAAc,YAAY,CAAC"}
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.allInjectedWallets = exports.walletLogin = exports.WalletNameMap = exports.WalletMode = void 0;
17
+ exports.getAddressType = exports.allInjectedWallets = exports.walletLogin = exports.WalletNameMap = exports.WalletMode = void 0;
18
18
  var utils_js_1 = require("./utils.js");
19
19
  Object.defineProperty(exports, "WalletMode", { enumerable: true, get: function () { return utils_js_1.WalletMode; } });
20
20
  Object.defineProperty(exports, "WalletNameMap", { enumerable: true, get: function () { return utils_js_1.WalletNameMap; } });
@@ -23,4 +23,6 @@ var wallets_js_1 = require("./wallets.js");
23
23
  Object.defineProperty(exports, "walletLogin", { enumerable: true, get: function () { return wallets_js_1.walletLogin; } });
24
24
  var utils_js_2 = require("./utils.js");
25
25
  Object.defineProperty(exports, "allInjectedWallets", { enumerable: true, get: function () { return utils_js_2.allInjectedWallets; } });
26
+ var wallet_modes_js_1 = require("./wallet-modes.js");
27
+ Object.defineProperty(exports, "getAddressType", { enumerable: true, get: function () { return wallet_modes_js_1.getAddressType; } });
26
28
  __exportStar(require("./paima.js"), exports);
@@ -0,0 +1,26 @@
1
+ import type { InjectedExtension } from "@polkadot/extension-inject/types";
2
+ import { type IConnector, type IInjectedConnector, type ConnectionOption, type ActiveConnection, type IProvider, type AddressAndType, type UserSignature } from "../IProvider.js";
3
+ export type PolkadotAddress = string;
4
+ export type PolkadotApi = InjectedExtension;
5
+ export declare class PolkadotConnector implements IConnector<PolkadotApi>, IInjectedConnector<PolkadotApi> {
6
+ private provider;
7
+ private static INSTANCE;
8
+ static getWalletOptions(): Promise<ConnectionOption<PolkadotApi>[]>;
9
+ static instance(): PolkadotConnector;
10
+ connectSimple: () => Promise<PolkadotProvider>;
11
+ connectExternal: (conn: ActiveConnection<PolkadotApi>) => Promise<PolkadotProvider>;
12
+ connectNamed: (name: string) => Promise<PolkadotProvider>;
13
+ getProvider: () => undefined | PolkadotProvider;
14
+ getOrThrowProvider: () => PolkadotProvider;
15
+ isConnected: () => boolean;
16
+ }
17
+ export declare class PolkadotProvider implements IProvider<PolkadotApi> {
18
+ private readonly conn;
19
+ readonly address: PolkadotAddress;
20
+ constructor(conn: ActiveConnection<PolkadotApi>, address: PolkadotAddress);
21
+ static init: (conn: ActiveConnection<PolkadotApi>) => Promise<PolkadotProvider>;
22
+ getConnection: () => ActiveConnection<PolkadotApi>;
23
+ getAddress: () => AddressAndType;
24
+ signMessage: (message: string) => Promise<UserSignature>;
25
+ }
26
+ //# sourceMappingURL=polkadot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"polkadot.d.ts","sourceRoot":"","sources":["../../../../src/wallets/src/polkadot/polkadot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EAElB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EAErB,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,iBAAiB,CAAC;AAMzB,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AACrC,MAAM,MAAM,WAAW,GAAG,iBAAiB,CAAC;AAQ5C,qBAAa,iBACX,YAAW,UAAU,CAAC,WAAW,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC;IAEnE,OAAO,CAAC,QAAQ,CAA+B;IAC/C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAA4C;WAEtD,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,WAAW,CAAC,EAAE,CAAC;IAkBzE,MAAM,CAAC,QAAQ,IAAI,iBAAiB;IAOpC,aAAa,QAAa,OAAO,CAAC,gBAAgB,CAAC,CA0BjD;IACF,eAAe,GACb,MAAM,gBAAgB,CAAC,WAAW,CAAC,KAClC,OAAO,CAAC,gBAAgB,CAAC,CAM1B;IACF,YAAY,GAAU,MAAM,MAAM,KAAG,OAAO,CAAC,gBAAgB,CAAC,CAW5D;IACF,WAAW,QAAO,SAAS,GAAG,gBAAgB,CAE5C;IACF,kBAAkB,QAAO,gBAAgB,CAKvC;IACF,WAAW,QAAO,OAAO,CAEvB;CACH;AAED,qBAAa,gBAAiB,YAAW,SAAS,CAAC,WAAW,CAAC;IAE3D,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,QAAQ,CAAC,OAAO,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