@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,29 @@
1
+ import { TypeboxHelpers, } from "../../../utils/src/mod.js";
2
+ import { verifyMessage } from "viem";
3
+ import { Value } from "@sinclair/typebox/value";
4
+ export class EvmCrypto {
5
+ isEvmSignature = (signature) => {
6
+ return Value.Check(TypeboxHelpers.Evm.Signature, signature);
7
+ };
8
+ verifyAddress = (address) => {
9
+ return Value.Check(TypeboxHelpers.Evm.Address, address);
10
+ };
11
+ verifySignature = async (signerAddress, message, signature) => {
12
+ try {
13
+ if (this.verifyAddress(signerAddress) && this.isEvmSignature(signature)) {
14
+ return await verifyMessage({
15
+ address: signerAddress,
16
+ message,
17
+ signature,
18
+ });
19
+ }
20
+ }
21
+ catch {
22
+ // do nothing, error messages are expected if the signature is invalid
23
+ }
24
+ return false;
25
+ };
26
+ decodeAddress(address) {
27
+ return Value.Decode(TypeboxHelpers.Evm.Address, address);
28
+ }
29
+ }
@@ -0,0 +1,9 @@
1
+ import { type MidnightAddress, type MidnightSignature, type Signature, type WalletAddress } from "../../../utils/src/mod.js";
2
+ import type { IVerify } from "../IVerify.js";
3
+ export declare class MidnightCrypto implements IVerify {
4
+ isMidnightSignature: (signature: Signature) => signature is MidnightSignature;
5
+ verifyAddress: (address: WalletAddress) => address is MidnightAddress;
6
+ verifySignature: (signerAddress: WalletAddress, message: string, signature: Signature) => Promise<boolean>;
7
+ decodeAddress(address: WalletAddress): WalletAddress;
8
+ }
9
+ //# sourceMappingURL=midnight.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"midnight.d.ts","sourceRoot":"","sources":["../../../../src/crypto/src/chains/midnight.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,SAAS,EAEd,KAAK,aAAa,EACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAG7C,qBAAa,cAAe,YAAW,OAAO;IAC5C,mBAAmB,GAAI,WAAW,SAAS,KAAG,SAAS,IAAI,iBAAiB,CAE1E;IACF,aAAa,GAAI,SAAS,aAAa,KAAG,OAAO,IAAI,eAAe,CAElE;IACF,eAAe,GACb,eAAe,aAAa,EAC5B,SAAS,MAAM,EACf,WAAW,SAAS,KACnB,OAAO,CAAC,OAAO,CAAC,CAUjB;IAEF,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa;CAGrD"}
@@ -0,0 +1,25 @@
1
+ import { TypeboxHelpers, } from "../../../utils/src/mod.js";
2
+ import { Value } from "@sinclair/typebox/value";
3
+ export class MidnightCrypto {
4
+ isMidnightSignature = (signature) => {
5
+ return Value.Check(TypeboxHelpers.Midnight.Signature, signature);
6
+ };
7
+ verifyAddress = (address) => {
8
+ return Value.Check(TypeboxHelpers.Midnight.Address, address);
9
+ };
10
+ verifySignature = async (signerAddress, message, signature) => {
11
+ try {
12
+ if (this.verifyAddress(signerAddress) && this.isMidnightSignature(signature)) {
13
+ console.log("TODO MIDNIGHT VERIFY SIGNATURE:", { signerAddress, message, signature });
14
+ return true;
15
+ }
16
+ }
17
+ catch {
18
+ // do nothing, error messages are expected if the signature is invalid
19
+ }
20
+ return false;
21
+ };
22
+ decodeAddress(address) {
23
+ return Value.Decode(TypeboxHelpers.Midnight.Address, address);
24
+ }
25
+ }
@@ -0,0 +1,8 @@
1
+ import { type MinaAddress, type Signature, type WalletAddress } from "../../../utils/src/mod.js";
2
+ import type { IVerify } from "../IVerify.js";
3
+ export declare class MinaCrypto implements IVerify {
4
+ verifyAddress: (address: WalletAddress) => address is MinaAddress;
5
+ verifySignature: (userAddress: MinaAddress, message: string, sigStruct: Signature) => Promise<boolean>;
6
+ decodeAddress(address: WalletAddress): WalletAddress;
7
+ }
8
+ //# sourceMappingURL=mina.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mina.d.ts","sourceRoot":"","sources":["../../../../src/crypto/src/chains/mina.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,SAAS,EAEd,KAAK,aAAa,EACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAK7C,qBAAa,UAAW,YAAW,OAAO;IACxC,aAAa,GAAI,SAAS,aAAa,KAAG,OAAO,IAAI,WAAW,CAE9D;IACF,eAAe,GACb,aAAa,WAAW,EACxB,SAAS,MAAM,EACf,WAAW,SAAS,KACnB,OAAO,CAAC,OAAO,CAAC,CAwBjB;IAEF,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa;CAGrD"}
@@ -0,0 +1,32 @@
1
+ import { TypeboxHelpers, } from "../../../utils/src/mod.js";
2
+ import { Value } from "@sinclair/typebox/value";
3
+ import { default as Client } from "mina-signer";
4
+ export class MinaCrypto {
5
+ verifyAddress = (address) => {
6
+ return Value.Check(TypeboxHelpers.Mina.Address, address);
7
+ };
8
+ verifySignature = async (userAddress, message, sigStruct) => {
9
+ try {
10
+ const [field, scalar, network, ...remainder] = sigStruct.split(";");
11
+ if (!field || !scalar || !network || remainder.length > 0) {
12
+ return false;
13
+ }
14
+ // const Client = (await import("mina-signer")).default;
15
+ const signerClient = new Client({ network: network });
16
+ const verifyBody = {
17
+ data: message,
18
+ publicKey: userAddress,
19
+ signature: { field, scalar },
20
+ };
21
+ const verifyResult = signerClient.verifyMessage(verifyBody);
22
+ return verifyResult;
23
+ }
24
+ catch (err) {
25
+ console.error("[address-validator] error verifying mina signature:", err);
26
+ return false;
27
+ }
28
+ };
29
+ decodeAddress(address) {
30
+ return Value.Decode(TypeboxHelpers.Mina.Address, address);
31
+ }
32
+ }
@@ -0,0 +1,9 @@
1
+ import { type Signature, type SubstrateAddress } from "../../../utils/src/mod.js";
2
+ import type { IVerify } from "../IVerify.js";
3
+ import { WalletAddress } from "../../../utils/src/types/nominal.js";
4
+ export declare class PolkadotCrypto implements IVerify {
5
+ verifyAddress: (address: string) => address is SubstrateAddress;
6
+ verifySignature: (userAddress: SubstrateAddress, message: string, signature: Signature) => Promise<boolean>;
7
+ decodeAddress(address: WalletAddress): WalletAddress;
8
+ }
9
+ //# sourceMappingURL=polkadot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"polkadot.d.ts","sourceRoot":"","sources":["../../../../src/crypto/src/chains/polkadot.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,gBAAgB,EAEtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAI7C,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,qBAAa,cAAe,YAAW,OAAO;IAC5C,aAAa,GAAI,SAAS,MAAM,KAAG,OAAO,IAAI,gBAAgB,CAE5D;IACF,eAAe,GACb,aAAa,gBAAgB,EAC7B,SAAS,MAAM,EACf,WAAW,SAAS,KACnB,OAAO,CAAC,OAAO,CAAC,CAiBjB;IAEF,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa;CAGrD"}
@@ -0,0 +1,28 @@
1
+ import { TypeboxHelpers, } from "../../../utils/src/mod.js";
2
+ import { Value } from "@sinclair/typebox/value";
3
+ import { cryptoWaitReady, decodeAddress, signatureVerify } from "@polkadot/util-crypto";
4
+ import { u8aToHex } from "@polkadot/util";
5
+ export class PolkadotCrypto {
6
+ verifyAddress = (address) => {
7
+ return Value.Check(TypeboxHelpers.Substrate.Address, address);
8
+ };
9
+ verifySignature = async (userAddress, message, signature) => {
10
+ try {
11
+ // const { cryptoWaitReady, decodeAddress, signatureVerify } = await import(
12
+ // "@polkadot/util-crypto"
13
+ // );
14
+ // const { u8aToHex } = await import("@polkadot/util");
15
+ await cryptoWaitReady();
16
+ const publicKey = decodeAddress(userAddress);
17
+ const hexPublicKey = u8aToHex(publicKey);
18
+ return signatureVerify(message, signature, hexPublicKey).isValid;
19
+ }
20
+ catch (err) {
21
+ console.error("[address-validator] error verifying polkadot signature:", err);
22
+ return false;
23
+ }
24
+ };
25
+ decodeAddress(address) {
26
+ return Value.Decode(TypeboxHelpers.Polkadot.Address, address);
27
+ }
28
+ }
@@ -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"}
@@ -0,0 +1,4 @@
1
+ export * from "./CryptoManager.js";
2
+ export * from "./IVerify.js";
3
+ export { Prando } from "./Prando.js";
4
+ export { generatePaimaBlockHash } from "./paima-hash.js";
@@ -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,13 @@
1
+ import crypto from "node:crypto";
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 function generatePaimaBlockHash(chainBlock, // ChainBlock,
9
+ previousBlockHash) {
10
+ const hashes = chainBlock.blockInfo.map((h) => h.blockHash);
11
+ const hashString = [previousBlockHash ?? "0x0", ...hashes].join("");
12
+ return `0x${crypto.hash("sha512", hashString, "hex")}`;
13
+ }
@@ -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,MAAM,MAAM,GAAG,GAAG,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAE5C,MAAM,MAAM,KAAK,GAAG,UAAU,C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AC;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,IAAI;IACP,OAAO,IAAI;IACX,SAAS,IAAI;IACb,QAAQ,IAAI;IACZ,IAAI,IAAI;IACR,QAAQ,IAAI;IACZ,KAAK,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I,CAAC,CAAC,CAAC,GAAG,MAAM,EAAE,MAAM,CAAC,SAAS,OAAO,CAAC,CAAC,GAAG,CAAC,GACtE,KAAK;KACV;CACF,CAAC;AACF,wBAAgB,IAAI,CAAC,KAAK,CAAC,IAAI,SAAS,MAAM,EAAE,EAC9C,IAAI,EAAE,IAAI,GACT;IACD,IAAI,EAAE,CAAC,GAAG,SAAS,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,EACnD,GAAG,EAAE,GAAG,KACL,cAAc,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;CAChC,CAUA;AAED,KAAK,gBAAgB,CACnB,CAAC,SAAS,OAAO,CAAC,GAAG,CAAC,EACtB,CAAC,SAAS,MAAM,EAAE,IAChB,MAAM,CAAC,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,GAC3C,gBAAgB,CAChB,uBAAuB,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAC5E,CAAC;AAEJ;;GAEG;AACH,wBAAgB,OAAO,CAAC,KAAK,CAAC,IAAI,SAAS,MAAM,EAAE,EACjD,IAAI,EAAE,IAAI,GACT;IACD,IAAI,EAAE,CAAC,GAAG,SAAS,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,EACnD,GAAG,EAAE,gBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,KAC7B,cAAc,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;CAChC,CAIA"}
@@ -101,18 +101,21 @@ export const TypeboxHelpers = {
101
101
  Midnight: {
102
102
  BlockHash: Type.Unsafe(forceLowercase(Type.RegExp(/^0x[a-fA-F0-9]{64}$/))),
103
103
  TxHash: Type.Unsafe(forceLowercase(Type.RegExp(/^0x[a-fA-F0-9]{64}$/))),
104
- Address: Type.Unsafe(forceLowercase(Type.RegExp(/^[a-fA-F0-9]{181}$/))),
104
+ // TODO Temporal placeholder for midnight address
105
+ Address: Type.Unsafe(forceLowercase(Type.RegExp(/^mn_(shield-addr|addr|dust-addr|shield-esk|shield-cpk)_(test|dev|undeployed)[a-zA-Z0-9]+$/))),
106
+ // TODO Temporal placeholder for midnight signature
107
+ Signature: Type.Unsafe(Type.RegExp(/^.*$/)),
105
108
  },
106
109
  Mina: {
107
110
  BlockHash: Type.Unsafe(Type.String({ format: "mina-blockhash" })),
108
111
  TxHash: Type.Unsafe(Type.String({ format: "mina-txid" })),
109
112
  Address: Type.Unsafe(Type.String({ format: "mina-address" })),
110
113
  },
111
- // TODO THIS IS WRONG TYPE - ONLY A PLACEHOLDER
114
+ // TODO: PLACEHOLDER TYPES FOR POLKADOT
112
115
  Polkadot: {
113
- BlockHash: Type.Unsafe(Type.String({ format: "mina-blockhash" })),
114
- TxHash: Type.Unsafe(Type.String({ format: "mina-txid" })),
115
- Address: Type.Unsafe(Type.String({ format: "mina-address" })),
116
+ BlockHash: Type.Unsafe(Type.String({ format: "polkadot-blockhash" })),
117
+ TxHash: Type.Unsafe(Type.String({ format: "polkadot-txid" })),
118
+ Address: Type.Unsafe(Type.String({ format: "ss58" })),
116
119
  },
117
120
  Caip2: Type.Unsafe(Type.String()),
118
121
  WalletAddress: () => Type.Union(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,133 @@
1
+ import { PeraWalletConnect } from "@perawallet/connect";
2
+ import { AddressType, uint8ArrayToHexString } from "../../../utils/src/mod.js";
3
+ import { optionToActive, } from "../IProvider.js";
4
+ import { getWindow } from "../windows.js";
5
+ import { CryptoManager } from "../../../crypto/src/mod.js";
6
+ export class AlgorandConnector {
7
+ provider;
8
+ static INSTANCE = undefined;
9
+ static getWalletOptions() {
10
+ // Algorand has no standard for wallet discovery
11
+ // The closest that exists is ARC11 (https://arc.algorand.foundation/ARCs/arc-0011)
12
+ // but it doesn't give any information about which wallet is injected
13
+ // and, similar to window.ethereum, has wallets overriding each other
14
+ // and Pera wallet doesn't even use this standard
15
+ // instead, the best we can do is check if Pera injected its UI component in the window
16
+ if (getWindow()?.customElements.get("pera-wallet-connect-modal") ==
17
+ null) {
18
+ return [];
19
+ }
20
+ return [
21
+ {
22
+ metadata: {
23
+ name: "pera",
24
+ displayName: "Pera Wallet",
25
+ },
26
+ api: async () => {
27
+ // const { PeraWalletConnect } = await import("@perawallet/connect");
28
+ const peraWallet = new PeraWalletConnect();
29
+ return peraWallet;
30
+ },
31
+ },
32
+ ];
33
+ }
34
+ static instance() {
35
+ if (AlgorandConnector.INSTANCE == null) {
36
+ const newInstance = new AlgorandConnector();
37
+ AlgorandConnector.INSTANCE = newInstance;
38
+ }
39
+ return AlgorandConnector.INSTANCE;
40
+ }
41
+ connectSimple = async () => {
42
+ if (this.provider != null) {
43
+ return this.provider;
44
+ }
45
+ const options = AlgorandConnector.getWalletOptions();
46
+ if (options.length === 0) {
47
+ throw new Error(`No Algorand wallet found`);
48
+ }
49
+ return await this.connectExternal(await optionToActive(options[0]));
50
+ };
51
+ connectExternal = async (conn) => {
52
+ if (this.provider?.getConnection().metadata?.name === conn.metadata.name) {
53
+ return this.provider;
54
+ }
55
+ this.provider = await AlgorandProvider.init(conn);
56
+ return this.provider;
57
+ };
58
+ connectNamed = async (name) => {
59
+ if (this.provider?.getConnection().metadata?.name === name) {
60
+ return this.provider;
61
+ }
62
+ const provider = AlgorandConnector.getWalletOptions().find((entry) => entry.metadata.name === name);
63
+ if (provider == null) {
64
+ throw new Error(`AlgorandProvider: unsupported connection type ${name}`);
65
+ }
66
+ return await this.connectExternal(await optionToActive(provider));
67
+ };
68
+ getProvider = () => {
69
+ return this.provider;
70
+ };
71
+ getOrThrowProvider = () => {
72
+ if (this.provider == null) {
73
+ throw new Error(`AlgorandConnector provider isn't initialized yet`);
74
+ }
75
+ return this.provider;
76
+ };
77
+ isConnected = () => {
78
+ return this.provider != null;
79
+ };
80
+ }
81
+ export class AlgorandProvider {
82
+ conn;
83
+ address;
84
+ constructor(conn, address) {
85
+ this.conn = conn;
86
+ this.address = address;
87
+ }
88
+ static init = async (conn) => {
89
+ let newAccounts = [];
90
+ // conn.api.isConnected starts as false, even if connected
91
+ // if connected and connected() is called, then an error is thrown
92
+ try {
93
+ newAccounts = await conn.api.reconnectSession();
94
+ if (newAccounts.length < 1) {
95
+ throw new Error("[peraLogin] no addresses returned!");
96
+ }
97
+ }
98
+ catch (error) {
99
+ newAccounts = await conn.api.connect();
100
+ }
101
+ if (newAccounts.length < 1) {
102
+ throw new Error("[peraLogin] no addresses returned!");
103
+ }
104
+ return new AlgorandProvider(conn, newAccounts[0]);
105
+ };
106
+ getConnection = () => {
107
+ return this.conn;
108
+ };
109
+ getAddress = () => {
110
+ return {
111
+ type: AddressType.ALGORAND,
112
+ address: this.address,
113
+ };
114
+ };
115
+ signMessage = async (message) => {
116
+ const txn = await CryptoManager.Algorand().buildAlgorandTransaction(this.getAddress().address, message);
117
+ const signerTx = {
118
+ txn,
119
+ signers: [this.getAddress().address],
120
+ };
121
+ const signedTxs = await this.conn.api.signTransaction([[signerTx]], this.getAddress().address);
122
+ if (signedTxs.length !== 1) {
123
+ throw new Error(`[signMessageAlgorand] invalid number of signatures returned: ${signedTxs.length}`);
124
+ }
125
+ const signedTx = await CryptoManager.Algorand().decodeSignedTransaction(signedTxs[0]);
126
+ const signature = signedTx.sig;
127
+ if (!signature) {
128
+ throw new Error(`[signMessageAlgorand] signature missing in signed Tx`);
129
+ }
130
+ const hexSignature = uint8ArrayToHexString(signature);
131
+ return hexSignature;
132
+ };
133
+ }
@@ -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,12 @@
1
+ import { connectInjected } from "../wallet-modes.js";
2
+ import { AlgorandConnector } from "./algorand.js";
3
+ export async function algorandLoginWrapper(loginInfo) {
4
+ const loginResult = await connectInjected("algorandLoginWrapper", loginInfo, AlgorandConnector.instance());
5
+ if (loginResult.success === false) {
6
+ return loginResult;
7
+ }
8
+ return {
9
+ success: true,
10
+ result: loginResult.result,
11
+ };
12
+ }
@@ -130,7 +130,7 @@ export class CardanoProvider {
130
130
  };
131
131
  signMessage = async (message) => {
132
132
  const hexMessage = utf8ToHex(message).slice(2);
133
- const address = this.conn.metadata.name === 'nami' ? this.address.hex : this.address.bech32;
133
+ const address = (this.conn.metadata.name === 'nami' || this.conn.metadata.name === 'subwallet') ? this.address.hex : this.address.bech32;
134
134
  const { signature, key } = await this.conn.api.signData(address, hexMessage);
135
135
  return `${signature}+${key}`;
136
136
  };
@@ -10,7 +10,7 @@ export class MidnightConnector {
10
10
  if (midnightApi == null)
11
11
  return [];
12
12
  const options = Object.entries(midnightApi).reduce((options, [key, info]) => {
13
- if (info.name != null && info.enable != null && info.name === 'lace') {
13
+ if (info.name != null && info.enable != null) {
14
14
  options.push({
15
15
  metadata: {
16
16
  name: key,
@@ -108,7 +108,7 @@ export class MinaProvider {
108
108
  // only these two options are used
109
109
  // https://github.com/aurowallet/auro-wallet-browser-extension/blob/624de322dd99baaa09617bbad4a4a838f0a88edc/src/background/lib/index.js#L17
110
110
  // this is part of the hashed message
111
- const network = networkKind.networkID === "mainnet" ? "mainnet" : "testnet";
111
+ const network = networkKind.networkID === "mina:mainnet" ? "mainnet" : "testnet";
112
112
  return `${signature.field};${signature.scalar};${network}`;
113
113
  }
114
114
  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"}
@@ -2,4 +2,5 @@ export { WalletMode, WalletNameMap } from "./utils.js";
2
2
  // Main entry point
3
3
  export { walletLogin } from "./wallets.js";
4
4
  export { allInjectedWallets } from "./utils.js";
5
+ export { getAddressType } from "./wallet-modes.js";
5
6
  export * from "./paima.js";
@@ -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