@ledgerhq/live-common 21.20.0 → 21.21.0-rc.2

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 (428) hide show
  1. package/lib/__tests__/families/bitcoin/wallet-btc/utils.test.js +4 -0
  2. package/lib/__tests__/families/bitcoin/wallet-btc/utils.test.js.map +1 -1
  3. package/lib/__tests__/families/bitcoin/wallet-btc/xpub.syncing.integration.test.js +12 -0
  4. package/lib/__tests__/families/bitcoin/wallet-btc/xpub.syncing.integration.test.js.map +1 -1
  5. package/lib/__tests__/test-helpers/setup.js +1 -0
  6. package/lib/__tests__/test-helpers/setup.js.map +1 -1
  7. package/lib/account/pending.d.ts +1 -1
  8. package/lib/api/Ledger.d.ts.map +1 -1
  9. package/lib/api/Ledger.js +12 -2
  10. package/lib/api/Ledger.js.map +1 -1
  11. package/lib/api/explorerConfig/index.d.ts.map +1 -1
  12. package/lib/api/explorerConfig/index.js +5 -1
  13. package/lib/api/explorerConfig/index.js.map +1 -1
  14. package/lib/data/icons/react/cro.d.ts +8 -0
  15. package/lib/data/icons/react/cro.d.ts.map +1 -0
  16. package/lib/data/icons/react/cro.js +33 -0
  17. package/lib/data/icons/react/cro.js.map +1 -0
  18. package/lib/data/icons/react/index.d.ts +2 -0
  19. package/lib/data/icons/react/index.d.ts.map +1 -1
  20. package/lib/data/icons/react/index.js +12 -8
  21. package/lib/data/icons/react/index.js.map +1 -1
  22. package/lib/data/icons/react/sol.d.ts +8 -0
  23. package/lib/data/icons/react/sol.d.ts.map +1 -0
  24. package/lib/data/icons/react/sol.js +30 -0
  25. package/lib/data/icons/react/sol.js.map +1 -0
  26. package/lib/data/icons/reactNative/cro.d.ts +8 -0
  27. package/lib/data/icons/reactNative/cro.d.ts.map +1 -0
  28. package/lib/data/icons/reactNative/cro.js +34 -0
  29. package/lib/data/icons/reactNative/cro.js.map +1 -0
  30. package/lib/data/icons/reactNative/index.d.ts +2 -0
  31. package/lib/data/icons/reactNative/index.d.ts.map +1 -1
  32. package/lib/data/icons/reactNative/index.js +12 -8
  33. package/lib/data/icons/reactNative/index.js.map +1 -1
  34. package/lib/data/icons/reactNative/sol.d.ts +8 -0
  35. package/lib/data/icons/reactNative/sol.d.ts.map +1 -0
  36. package/lib/data/icons/reactNative/sol.js +31 -0
  37. package/lib/data/icons/reactNative/sol.js.map +1 -0
  38. package/lib/derivation.d.ts +7 -0
  39. package/lib/derivation.d.ts.map +1 -1
  40. package/lib/derivation.js +16 -1
  41. package/lib/derivation.js.map +1 -1
  42. package/lib/errors.d.ts +1 -0
  43. package/lib/errors.d.ts.map +1 -1
  44. package/lib/errors.js +1 -0
  45. package/lib/errors.js.map +1 -1
  46. package/lib/families/bitcoin/exchange.d.ts +1 -1
  47. package/lib/families/bitcoin/getAccountNetworkInfo.d.ts.map +1 -1
  48. package/lib/families/bitcoin/getAccountNetworkInfo.js +3 -2
  49. package/lib/families/bitcoin/getAccountNetworkInfo.js.map +1 -1
  50. package/lib/families/bitcoin/js-signOperation.d.ts.map +1 -1
  51. package/lib/families/bitcoin/js-signOperation.js +7 -2
  52. package/lib/families/bitcoin/js-signOperation.js.map +1 -1
  53. package/lib/families/bitcoin/js-synchronisation.d.ts +2 -2
  54. package/lib/families/bitcoin/specs.d.ts +1 -0
  55. package/lib/families/bitcoin/specs.d.ts.map +1 -1
  56. package/lib/families/bitcoin/specs.js +14 -1
  57. package/lib/families/bitcoin/specs.js.map +1 -1
  58. package/lib/families/bitcoin/wallet-btc/crypto/base.d.ts +1 -1
  59. package/lib/families/bitcoin/wallet-btc/crypto/base.d.ts.map +1 -1
  60. package/lib/families/bitcoin/wallet-btc/crypto/base.js.map +1 -1
  61. package/lib/families/bitcoin/wallet-btc/crypto/bitcoincash.d.ts.map +1 -1
  62. package/lib/families/bitcoin/wallet-btc/crypto/bitcoincash.js +8 -1
  63. package/lib/families/bitcoin/wallet-btc/crypto/bitcoincash.js.map +1 -1
  64. package/lib/families/bitcoin/wallet-btc/crypto/decred.d.ts +16 -0
  65. package/lib/families/bitcoin/wallet-btc/crypto/decred.d.ts.map +1 -0
  66. package/lib/families/bitcoin/wallet-btc/crypto/decred.js +248 -0
  67. package/lib/families/bitcoin/wallet-btc/crypto/decred.js.map +1 -0
  68. package/lib/families/bitcoin/wallet-btc/crypto/factory.d.ts.map +1 -1
  69. package/lib/families/bitcoin/wallet-btc/crypto/factory.js +5 -0
  70. package/lib/families/bitcoin/wallet-btc/crypto/factory.js.map +1 -1
  71. package/lib/families/bitcoin/wallet-btc/crypto/index.d.ts +1 -0
  72. package/lib/families/bitcoin/wallet-btc/crypto/index.d.ts.map +1 -1
  73. package/lib/families/bitcoin/wallet-btc/crypto/index.js +3 -1
  74. package/lib/families/bitcoin/wallet-btc/crypto/index.js.map +1 -1
  75. package/lib/families/bitcoin/wallet-btc/crypto/litecoin.d.ts.map +1 -1
  76. package/lib/families/bitcoin/wallet-btc/crypto/litecoin.js +13 -3
  77. package/lib/families/bitcoin/wallet-btc/crypto/litecoin.js.map +1 -1
  78. package/lib/families/bitcoin/wallet-btc/crypto/types.d.ts +1 -1
  79. package/lib/families/bitcoin/wallet-btc/crypto/types.d.ts.map +1 -1
  80. package/lib/families/bitcoin/wallet-btc/crypto/zec.d.ts.map +1 -1
  81. package/lib/families/bitcoin/wallet-btc/crypto/zec.js +8 -1
  82. package/lib/families/bitcoin/wallet-btc/crypto/zec.js.map +1 -1
  83. package/lib/families/bitcoin/wallet-btc/crypto/zen.d.ts.map +1 -1
  84. package/lib/families/bitcoin/wallet-btc/crypto/zen.js +8 -1
  85. package/lib/families/bitcoin/wallet-btc/crypto/zen.js.map +1 -1
  86. package/lib/families/bitcoin/wallet-btc/utils.d.ts.map +1 -1
  87. package/lib/families/bitcoin/wallet-btc/utils.js +6 -1
  88. package/lib/families/bitcoin/wallet-btc/utils.js.map +1 -1
  89. package/lib/families/bitcoin/wallet-btc/wallet.d.ts +2 -0
  90. package/lib/families/bitcoin/wallet-btc/wallet.d.ts.map +1 -1
  91. package/lib/families/bitcoin/wallet-btc/wallet.js +15 -7
  92. package/lib/families/bitcoin/wallet-btc/wallet.js.map +1 -1
  93. package/lib/families/crypto_org/js-synchronisation.d.ts +2 -2
  94. package/lib/families/elrond/js-synchronisation.d.ts +2 -2
  95. package/lib/families/ethereum/synchronisation.d.ts.map +1 -1
  96. package/lib/families/ethereum/synchronisation.js +2 -2
  97. package/lib/families/ethereum/synchronisation.js.map +1 -1
  98. package/lib/families/polkadot/api/sidecar.js +4 -2
  99. package/lib/families/polkadot/api/sidecar.js.map +1 -1
  100. package/lib/families/polkadot/js-synchronisation.d.ts +2 -2
  101. package/lib/families/solana/api/cached.d.ts +5 -0
  102. package/lib/families/solana/api/cached.d.ts.map +1 -0
  103. package/lib/families/solana/api/cached.js +80 -0
  104. package/lib/families/solana/api/cached.js.map +1 -0
  105. package/lib/families/solana/api/chain/account/index.d.ts +2 -0
  106. package/lib/families/solana/api/chain/account/index.d.ts.map +1 -0
  107. package/lib/families/solana/api/chain/account/index.js +14 -0
  108. package/lib/families/solana/api/chain/account/index.js.map +1 -0
  109. package/lib/families/solana/api/chain/account/parser.d.ts +5 -0
  110. package/lib/families/solana/api/chain/account/parser.d.ts.map +1 -0
  111. package/lib/families/solana/api/chain/account/parser.js +33 -0
  112. package/lib/families/solana/api/chain/account/parser.js.map +1 -0
  113. package/lib/families/solana/api/chain/account/stake.d.ts +237 -0
  114. package/lib/families/solana/api/chain/account/stake.d.ts.map +1 -0
  115. package/lib/families/solana/api/chain/account/stake.js +43 -0
  116. package/lib/families/solana/api/chain/account/stake.js.map +1 -0
  117. package/lib/families/solana/api/chain/account/token.d.ts +116 -0
  118. package/lib/families/solana/api/chain/account/token.d.ts.map +1 -0
  119. package/lib/families/solana/api/chain/account/token.js +42 -0
  120. package/lib/families/solana/api/chain/account/token.js.map +1 -0
  121. package/lib/families/solana/api/chain/index.d.ts +22 -0
  122. package/lib/families/solana/api/chain/index.d.ts.map +1 -0
  123. package/lib/families/solana/api/chain/index.js +54 -0
  124. package/lib/families/solana/api/chain/index.js.map +1 -0
  125. package/lib/families/solana/api/chain/instruction/associated-token-account/index.d.ts +15 -0
  126. package/lib/families/solana/api/chain/instruction/associated-token-account/index.d.ts.map +1 -0
  127. package/lib/families/solana/api/chain/instruction/associated-token-account/index.js +21 -0
  128. package/lib/families/solana/api/chain/instruction/associated-token-account/index.js.map +1 -0
  129. package/lib/families/solana/api/chain/instruction/associated-token-account/types.d.ts +30 -0
  130. package/lib/families/solana/api/chain/instruction/associated-token-account/types.d.ts.map +1 -0
  131. package/lib/families/solana/api/chain/instruction/associated-token-account/types.js +19 -0
  132. package/lib/families/solana/api/chain/instruction/associated-token-account/types.js.map +1 -0
  133. package/lib/families/solana/api/chain/instruction/memo/index.d.ts +15 -0
  134. package/lib/families/solana/api/chain/instruction/memo/index.d.ts.map +1 -0
  135. package/lib/families/solana/api/chain/instruction/memo/index.js +14 -0
  136. package/lib/families/solana/api/chain/instruction/memo/index.js.map +1 -0
  137. package/lib/families/solana/api/chain/instruction/memo/types.d.ts +21 -0
  138. package/lib/families/solana/api/chain/instruction/memo/types.d.ts.map +1 -0
  139. package/lib/families/solana/api/chain/instruction/memo/types.js +16 -0
  140. package/lib/families/solana/api/chain/instruction/memo/types.js.map +1 -0
  141. package/lib/families/solana/api/chain/instruction/stake/index.d.ts +15 -0
  142. package/lib/families/solana/api/chain/instruction/stake/index.d.ts.map +1 -0
  143. package/lib/families/solana/api/chain/instruction/stake/index.js +20 -0
  144. package/lib/families/solana/api/chain/instruction/stake/index.js.map +1 -0
  145. package/lib/families/solana/api/chain/instruction/stake/types.d.ts +215 -0
  146. package/lib/families/solana/api/chain/instruction/stake/types.d.ts.map +1 -0
  147. package/lib/families/solana/api/chain/instruction/stake/types.js +80 -0
  148. package/lib/families/solana/api/chain/instruction/stake/types.js.map +1 -0
  149. package/lib/families/solana/api/chain/instruction/token/index.d.ts +15 -0
  150. package/lib/families/solana/api/chain/instruction/token/index.d.ts.map +1 -0
  151. package/lib/families/solana/api/chain/instruction/token/index.js +20 -0
  152. package/lib/families/solana/api/chain/instruction/token/index.js.map +1 -0
  153. package/lib/families/solana/api/chain/instruction/token/types.d.ts +497 -0
  154. package/lib/families/solana/api/chain/instruction/token/types.d.ts.map +1 -0
  155. package/lib/families/solana/api/chain/instruction/token/types.js +205 -0
  156. package/lib/families/solana/api/chain/instruction/token/types.js.map +1 -0
  157. package/lib/families/solana/api/chain/program/constants.d.ts +11 -0
  158. package/lib/families/solana/api/chain/program/constants.d.ts.map +1 -0
  159. package/lib/families/solana/api/chain/program/constants.js +14 -0
  160. package/lib/families/solana/api/chain/program/constants.js.map +1 -0
  161. package/lib/families/solana/api/chain/program/index.d.ts +2 -0
  162. package/lib/families/solana/api/chain/program/index.d.ts.map +1 -0
  163. package/lib/families/solana/api/chain/program/index.js +14 -0
  164. package/lib/families/solana/api/chain/program/index.js.map +1 -0
  165. package/lib/families/solana/api/chain/program/parser.d.ts +30 -0
  166. package/lib/families/solana/api/chain/program/parser.d.ts.map +1 -0
  167. package/lib/families/solana/api/chain/program/parser.js +70 -0
  168. package/lib/families/solana/api/chain/program/parser.js.map +1 -0
  169. package/lib/families/solana/api/chain/validators/bignum.d.ts +3 -0
  170. package/lib/families/solana/api/chain/validators/bignum.d.ts.map +1 -0
  171. package/lib/families/solana/api/chain/validators/bignum.js +11 -0
  172. package/lib/families/solana/api/chain/validators/bignum.js.map +1 -0
  173. package/lib/families/solana/api/chain/validators/index.d.ts +10 -0
  174. package/lib/families/solana/api/chain/validators/index.d.ts.map +1 -0
  175. package/lib/families/solana/api/chain/validators/index.js +10 -0
  176. package/lib/families/solana/api/chain/validators/index.js.map +1 -0
  177. package/lib/families/solana/api/chain/validators/pubkey.d.ts +3 -0
  178. package/lib/families/solana/api/chain/validators/pubkey.d.ts.map +1 -0
  179. package/lib/families/solana/api/chain/validators/pubkey.js +7 -0
  180. package/lib/families/solana/api/chain/validators/pubkey.js.map +1 -0
  181. package/lib/families/solana/api/chain/web3.d.ts +29 -0
  182. package/lib/families/solana/api/chain/web3.d.ts.map +1 -0
  183. package/lib/families/solana/api/chain/web3.js +287 -0
  184. package/lib/families/solana/api/chain/web3.js.map +1 -0
  185. package/lib/families/solana/api/index.d.ts +5 -0
  186. package/lib/families/solana/api/index.d.ts.map +1 -0
  187. package/lib/families/solana/api/index.js +21 -0
  188. package/lib/families/solana/api/index.js.map +1 -0
  189. package/lib/families/solana/api/logged.d.ts +3 -0
  190. package/lib/families/solana/api/logged.d.ts.map +1 -0
  191. package/lib/families/solana/api/logged.js +53 -0
  192. package/lib/families/solana/api/logged.js.map +1 -0
  193. package/lib/families/solana/api/queued.d.ts +3 -0
  194. package/lib/families/solana/api/queued.d.ts.map +1 -0
  195. package/lib/families/solana/api/queued.js +31 -0
  196. package/lib/families/solana/api/queued.js.map +1 -0
  197. package/lib/families/solana/bridge/bridge.d.ts +12 -0
  198. package/lib/families/solana/bridge/bridge.d.ts.map +1 -0
  199. package/lib/families/solana/bridge/bridge.js +218 -0
  200. package/lib/families/solana/bridge/bridge.js.map +1 -0
  201. package/lib/families/solana/bridge/js.d.ts +6 -0
  202. package/lib/families/solana/bridge/js.d.ts.map +1 -0
  203. package/lib/families/solana/bridge/js.js +15 -0
  204. package/lib/families/solana/bridge/js.js.map +1 -0
  205. package/lib/families/solana/bridge/mock-data.d.ts +186 -0
  206. package/lib/families/solana/bridge/mock-data.d.ts.map +1 -0
  207. package/lib/families/solana/bridge/mock-data.js +23 -0
  208. package/lib/families/solana/bridge/mock-data.js.map +1 -0
  209. package/lib/families/solana/bridge/mock.d.ts +6 -0
  210. package/lib/families/solana/bridge/mock.d.ts.map +1 -0
  211. package/lib/families/solana/bridge/mock.js +75 -0
  212. package/lib/families/solana/bridge/mock.js.map +1 -0
  213. package/lib/families/solana/cli-transaction.d.ts +14 -0
  214. package/lib/families/solana/cli-transaction.d.ts.map +1 -0
  215. package/lib/families/solana/cli-transaction.js +137 -0
  216. package/lib/families/solana/cli-transaction.js.map +1 -0
  217. package/lib/families/solana/datasets/solana.scanAccounts.1.d.ts +6 -0
  218. package/lib/families/solana/datasets/solana.scanAccounts.1.d.ts.map +1 -0
  219. package/lib/families/solana/datasets/solana.scanAccounts.1.js +7 -0
  220. package/lib/families/solana/datasets/solana.scanAccounts.1.js.map +1 -0
  221. package/lib/families/solana/deviceTransactionConfig.d.ts +10 -0
  222. package/lib/families/solana/deviceTransactionConfig.d.ts.map +1 -0
  223. package/lib/families/solana/deviceTransactionConfig.js +121 -0
  224. package/lib/families/solana/deviceTransactionConfig.js.map +1 -0
  225. package/lib/families/solana/errors.d.ts +25 -0
  226. package/lib/families/solana/errors.d.ts.map +1 -0
  227. package/lib/families/solana/errors.js +13 -0
  228. package/lib/families/solana/errors.js.map +1 -0
  229. package/lib/families/solana/hw-getAddress.d.ts +4 -0
  230. package/lib/families/solana/hw-getAddress.d.ts.map +1 -0
  231. package/lib/families/solana/hw-getAddress.js +66 -0
  232. package/lib/families/solana/hw-getAddress.js.map +1 -0
  233. package/lib/families/solana/js-broadcast.d.ts +7 -0
  234. package/lib/families/solana/js-broadcast.d.ts.map +1 -0
  235. package/lib/families/solana/js-broadcast.js +59 -0
  236. package/lib/families/solana/js-broadcast.js.map +1 -0
  237. package/lib/families/solana/js-buildTransaction.d.ts +6 -0
  238. package/lib/families/solana/js-buildTransaction.d.ts.map +1 -0
  239. package/lib/families/solana/js-buildTransaction.js +123 -0
  240. package/lib/families/solana/js-buildTransaction.js.map +1 -0
  241. package/lib/families/solana/js-createTransaction.d.ts +6 -0
  242. package/lib/families/solana/js-createTransaction.d.ts.map +1 -0
  243. package/lib/families/solana/js-createTransaction.js +35 -0
  244. package/lib/families/solana/js-createTransaction.js.map +1 -0
  245. package/lib/families/solana/js-estimateMaxSpendable.d.ts +7 -0
  246. package/lib/families/solana/js-estimateMaxSpendable.d.ts.map +1 -0
  247. package/lib/families/solana/js-estimateMaxSpendable.js +72 -0
  248. package/lib/families/solana/js-estimateMaxSpendable.js.map +1 -0
  249. package/lib/families/solana/js-getTransactionStatus.d.ts +5 -0
  250. package/lib/families/solana/js-getTransactionStatus.d.ts.map +1 -0
  251. package/lib/families/solana/js-getTransactionStatus.js +106 -0
  252. package/lib/families/solana/js-getTransactionStatus.js.map +1 -0
  253. package/lib/families/solana/js-prepareTransaction.d.ts +6 -0
  254. package/lib/families/solana/js-prepareTransaction.d.ts.map +1 -0
  255. package/lib/families/solana/js-prepareTransaction.js +380 -0
  256. package/lib/families/solana/js-prepareTransaction.js.map +1 -0
  257. package/lib/families/solana/js-signOperation.d.ts +10 -0
  258. package/lib/families/solana/js-signOperation.d.ts.map +1 -0
  259. package/lib/families/solana/js-signOperation.js +193 -0
  260. package/lib/families/solana/js-signOperation.js.map +1 -0
  261. package/lib/families/solana/js-synchronization.d.ts +5 -0
  262. package/lib/families/solana/js-synchronization.d.ts.map +1 -0
  263. package/lib/families/solana/js-synchronization.js +464 -0
  264. package/lib/families/solana/js-synchronization.js.map +1 -0
  265. package/lib/families/solana/logic.d.ts +15 -0
  266. package/lib/families/solana/logic.d.ts.map +1 -0
  267. package/lib/families/solana/logic.js +49 -0
  268. package/lib/families/solana/logic.js.map +1 -0
  269. package/lib/families/solana/specs.d.ts +7 -0
  270. package/lib/families/solana/specs.d.ts.map +1 -0
  271. package/lib/families/solana/specs.js +100 -0
  272. package/lib/families/solana/specs.js.map +1 -0
  273. package/lib/families/solana/speculos-deviceActions.d.ts +8 -0
  274. package/lib/families/solana/speculos-deviceActions.d.ts.map +1 -0
  275. package/lib/families/solana/speculos-deviceActions.js +60 -0
  276. package/lib/families/solana/speculos-deviceActions.js.map +1 -0
  277. package/lib/families/solana/test-dataset.d.ts +5 -0
  278. package/lib/families/solana/test-dataset.d.ts.map +1 -0
  279. package/lib/families/solana/test-dataset.js +396 -0
  280. package/lib/families/solana/test-dataset.js.map +1 -0
  281. package/lib/families/solana/transaction.d.ts +12 -0
  282. package/lib/families/solana/transaction.d.ts.map +1 -0
  283. package/lib/families/solana/transaction.js +109 -0
  284. package/lib/families/solana/transaction.js.map +1 -0
  285. package/lib/families/solana/types.d.ts +84 -0
  286. package/lib/families/solana/types.d.ts.map +1 -0
  287. package/lib/families/solana/types.js +6 -0
  288. package/lib/families/solana/types.js.map +1 -0
  289. package/lib/families/solana/utils.d.ts +10 -0
  290. package/lib/families/solana/utils.d.ts.map +1 -0
  291. package/lib/families/solana/utils.js +194 -0
  292. package/lib/families/solana/utils.js.map +1 -0
  293. package/lib/families/stellar/js-synchronization.d.ts +2 -2
  294. package/lib/generated/bridge/js.d.ts +4 -0
  295. package/lib/generated/bridge/js.d.ts.map +1 -1
  296. package/lib/generated/bridge/js.js +8 -6
  297. package/lib/generated/bridge/js.js.map +1 -1
  298. package/lib/generated/bridge/mock.d.ts +4 -0
  299. package/lib/generated/bridge/mock.d.ts.map +1 -1
  300. package/lib/generated/bridge/mock.js +6 -4
  301. package/lib/generated/bridge/mock.js.map +1 -1
  302. package/lib/generated/cli-transaction.d.ts +9 -0
  303. package/lib/generated/cli-transaction.d.ts.map +1 -1
  304. package/lib/generated/cli-transaction.js +8 -6
  305. package/lib/generated/cli-transaction.js.map +1 -1
  306. package/lib/generated/deviceTransactionConfig.d.ts +2 -0
  307. package/lib/generated/deviceTransactionConfig.d.ts.map +1 -1
  308. package/lib/generated/deviceTransactionConfig.js +8 -6
  309. package/lib/generated/deviceTransactionConfig.js.map +1 -1
  310. package/lib/generated/exchange.d.ts +1 -1
  311. package/lib/generated/hw-getAddress.d.ts +1 -0
  312. package/lib/generated/hw-getAddress.d.ts.map +1 -1
  313. package/lib/generated/hw-getAddress.js +8 -6
  314. package/lib/generated/hw-getAddress.js.map +1 -1
  315. package/lib/generated/specs.d.ts +4 -0
  316. package/lib/generated/specs.d.ts.map +1 -1
  317. package/lib/generated/specs.js +8 -6
  318. package/lib/generated/specs.js.map +1 -1
  319. package/lib/generated/speculos-deviceActions.d.ts +3 -0
  320. package/lib/generated/speculos-deviceActions.d.ts.map +1 -1
  321. package/lib/generated/speculos-deviceActions.js +8 -6
  322. package/lib/generated/speculos-deviceActions.js.map +1 -1
  323. package/lib/generated/test-dataset.d.ts +1 -0
  324. package/lib/generated/test-dataset.d.ts.map +1 -1
  325. package/lib/generated/test-dataset.js +8 -6
  326. package/lib/generated/test-dataset.js.map +1 -1
  327. package/lib/generated/transaction.d.ts +5 -0
  328. package/lib/generated/transaction.d.ts.map +1 -1
  329. package/lib/generated/transaction.js +8 -6
  330. package/lib/generated/transaction.js.map +1 -1
  331. package/lib/generated/types.d.ts +12 -6
  332. package/lib/generated/types.d.ts.map +1 -1
  333. package/lib/generated/types.js +5 -3
  334. package/lib/generated/types.js.map +1 -1
  335. package/lib/nft/helpers.js +1 -1
  336. package/lib/nft/helpers.js.map +1 -1
  337. package/package.json +8 -4
  338. package/src/__tests__/__snapshots__/all.libcore.ts.snap +113 -0
  339. package/src/__tests__/families/bitcoin/wallet-btc/utils.test.ts +4 -0
  340. package/src/__tests__/families/bitcoin/wallet-btc/xpub.syncing.integration.test.ts +12 -0
  341. package/src/__tests__/test-helpers/setup.ts +1 -0
  342. package/src/api/Ledger.ts +11 -1
  343. package/src/api/explorerConfig/index.ts +1 -3
  344. package/src/data/icons/react/cro.tsx +12 -0
  345. package/src/data/icons/react/index.tsx +2 -0
  346. package/src/data/icons/react/sol.tsx +12 -0
  347. package/src/data/icons/reactNative/cro.tsx +13 -0
  348. package/src/data/icons/reactNative/index.tsx +2 -0
  349. package/src/data/icons/reactNative/sol.tsx +13 -0
  350. package/src/data/icons/svg/CRO.svg +6 -0
  351. package/src/data/icons/svg/SOL.svg +3 -0
  352. package/src/derivation.ts +13 -0
  353. package/src/errors.ts +1 -0
  354. package/src/families/bitcoin/getAccountNetworkInfo.ts +5 -2
  355. package/src/families/bitcoin/js-signOperation.ts +4 -7
  356. package/src/families/bitcoin/specs.ts +16 -0
  357. package/src/families/bitcoin/wallet-btc/crypto/base.ts +1 -1
  358. package/src/families/bitcoin/wallet-btc/crypto/bitcoincash.ts +8 -1
  359. package/src/families/bitcoin/wallet-btc/crypto/decred.ts +251 -0
  360. package/src/families/bitcoin/wallet-btc/crypto/factory.ts +5 -0
  361. package/src/families/bitcoin/wallet-btc/crypto/index.ts +1 -0
  362. package/src/families/bitcoin/wallet-btc/crypto/litecoin.ts +13 -3
  363. package/src/families/bitcoin/wallet-btc/crypto/types.ts +1 -0
  364. package/src/families/bitcoin/wallet-btc/crypto/zec.ts +8 -1
  365. package/src/families/bitcoin/wallet-btc/crypto/zen.ts +8 -1
  366. package/src/families/bitcoin/wallet-btc/utils.ts +6 -1
  367. package/src/families/bitcoin/wallet-btc/wallet.ts +18 -5
  368. package/src/families/ethereum/synchronisation.ts +5 -2
  369. package/src/families/polkadot/api/sidecar.ts +2 -2
  370. package/src/families/solana/api/cached.ts +89 -0
  371. package/src/families/solana/api/chain/account/index.ts +1 -0
  372. package/src/families/solana/api/chain/account/parser.ts +35 -0
  373. package/src/families/solana/api/chain/account/stake.ts +50 -0
  374. package/src/families/solana/api/chain/account/token.ts +63 -0
  375. package/src/families/solana/api/chain/index.ts +115 -0
  376. package/src/families/solana/api/chain/instruction/associated-token-account/index.ts +37 -0
  377. package/src/families/solana/api/chain/instruction/associated-token-account/types.ts +23 -0
  378. package/src/families/solana/api/chain/instruction/memo/index.ts +24 -0
  379. package/src/families/solana/api/chain/instruction/memo/types.ts +18 -0
  380. package/src/families/solana/api/chain/instruction/stake/index.ts +29 -0
  381. package/src/families/solana/api/chain/instruction/stake/types.ts +95 -0
  382. package/src/families/solana/api/chain/instruction/token/index.ts +30 -0
  383. package/src/families/solana/api/chain/instruction/token/types.ts +237 -0
  384. package/src/families/solana/api/chain/program/constants.ts +10 -0
  385. package/src/families/solana/api/chain/program/index.ts +1 -0
  386. package/src/families/solana/api/chain/program/parser.ts +122 -0
  387. package/src/families/solana/api/chain/validators/bignum.ts +11 -0
  388. package/src/families/solana/api/chain/validators/index.ts +9 -0
  389. package/src/families/solana/api/chain/validators/pubkey.ts +8 -0
  390. package/src/families/solana/api/chain/web3.ts +258 -0
  391. package/src/families/solana/api/index.ts +4 -0
  392. package/src/families/solana/api/logged.ts +50 -0
  393. package/src/families/solana/api/queued.ts +23 -0
  394. package/src/families/solana/bridge/bridge.ts +169 -0
  395. package/src/families/solana/bridge/js.ts +28 -0
  396. package/src/families/solana/bridge/mock-data.ts +22 -0
  397. package/src/families/solana/bridge/mock.ts +80 -0
  398. package/src/families/solana/cli-transaction.ts +175 -0
  399. package/src/families/solana/datasets/solana.scanAccounts.1.ts +9 -0
  400. package/src/families/solana/deviceTransactionConfig.ts +160 -0
  401. package/src/families/solana/errors.ts +32 -0
  402. package/src/families/solana/hw-getAddress.ts +20 -0
  403. package/src/families/solana/js-broadcast.ts +20 -0
  404. package/src/families/solana/js-buildTransaction.ts +75 -0
  405. package/src/families/solana/js-createTransaction.ts +27 -0
  406. package/src/families/solana/js-estimateMaxSpendable.ts +29 -0
  407. package/src/families/solana/js-getTransactionStatus.ts +78 -0
  408. package/src/families/solana/js-prepareTransaction.ts +423 -0
  409. package/src/families/solana/js-signOperation.ts +230 -0
  410. package/src/families/solana/js-synchronization.ts +544 -0
  411. package/src/families/solana/logic.ts +52 -0
  412. package/src/families/solana/specs.ts +100 -0
  413. package/src/families/solana/speculos-deviceActions.ts +59 -0
  414. package/src/families/solana/test-dataset.ts +572 -0
  415. package/src/families/solana/transaction.ts +146 -0
  416. package/src/families/solana/types.ts +110 -0
  417. package/src/families/solana/utils.ts +80 -0
  418. package/src/generated/bridge/js.ts +3 -0
  419. package/src/generated/bridge/mock.ts +3 -0
  420. package/src/generated/cli-transaction.ts +3 -0
  421. package/src/generated/deviceTransactionConfig.ts +3 -0
  422. package/src/generated/hw-getAddress.ts +3 -0
  423. package/src/generated/specs.ts +3 -0
  424. package/src/generated/speculos-deviceActions.ts +3 -0
  425. package/src/generated/test-dataset.ts +3 -0
  426. package/src/generated/transaction.ts +3 -0
  427. package/src/generated/types.ts +14 -0
  428. package/src/nft/helpers.ts +1 -1
@@ -0,0 +1,205 @@
1
+ "use strict";
2
+ /* eslint-disable @typescript-eslint/no-redeclare */
3
+ exports.__esModule = true;
4
+ exports.IX_TITLES = exports.IX_STRUCTS = exports.TokenInstructionType = exports.TransferChecked = exports.Transfer = exports.TokenAmountUi = void 0;
5
+ var superstruct_1 = require("superstruct");
6
+ var pubkey_1 = require("../../validators/pubkey");
7
+ exports.TokenAmountUi = (0, superstruct_1.type)({
8
+ amount: (0, superstruct_1.string)(),
9
+ decimals: (0, superstruct_1.number)(),
10
+ uiAmountString: (0, superstruct_1.string)()
11
+ });
12
+ var InitializeMint = (0, superstruct_1.type)({
13
+ mint: pubkey_1.PublicKeyFromString,
14
+ decimals: (0, superstruct_1.number)(),
15
+ mintAuthority: pubkey_1.PublicKeyFromString,
16
+ rentSysvar: pubkey_1.PublicKeyFromString,
17
+ freezeAuthority: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString)
18
+ });
19
+ var InitializeAccount = (0, superstruct_1.type)({
20
+ account: pubkey_1.PublicKeyFromString,
21
+ mint: pubkey_1.PublicKeyFromString,
22
+ owner: pubkey_1.PublicKeyFromString,
23
+ rentSysvar: pubkey_1.PublicKeyFromString
24
+ });
25
+ var InitializeMultisig = (0, superstruct_1.type)({
26
+ multisig: pubkey_1.PublicKeyFromString,
27
+ rentSysvar: pubkey_1.PublicKeyFromString,
28
+ signers: (0, superstruct_1.array)(pubkey_1.PublicKeyFromString),
29
+ m: (0, superstruct_1.number)()
30
+ });
31
+ exports.Transfer = (0, superstruct_1.type)({
32
+ source: pubkey_1.PublicKeyFromString,
33
+ destination: pubkey_1.PublicKeyFromString,
34
+ amount: (0, superstruct_1.union)([(0, superstruct_1.string)(), (0, superstruct_1.number)()]),
35
+ authority: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString),
36
+ multisigAuthority: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString),
37
+ signers: (0, superstruct_1.optional)((0, superstruct_1.array)(pubkey_1.PublicKeyFromString))
38
+ });
39
+ var Approve = (0, superstruct_1.type)({
40
+ source: pubkey_1.PublicKeyFromString,
41
+ delegate: pubkey_1.PublicKeyFromString,
42
+ amount: (0, superstruct_1.union)([(0, superstruct_1.string)(), (0, superstruct_1.number)()]),
43
+ owner: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString),
44
+ multisigOwner: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString),
45
+ signers: (0, superstruct_1.optional)((0, superstruct_1.array)(pubkey_1.PublicKeyFromString))
46
+ });
47
+ var Revoke = (0, superstruct_1.type)({
48
+ source: pubkey_1.PublicKeyFromString,
49
+ owner: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString),
50
+ multisigOwner: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString),
51
+ signers: (0, superstruct_1.optional)((0, superstruct_1.array)(pubkey_1.PublicKeyFromString))
52
+ });
53
+ var AuthorityType = (0, superstruct_1.enums)([
54
+ "mintTokens",
55
+ "freezeAccount",
56
+ "accountOwner",
57
+ "closeAccount",
58
+ ]);
59
+ var SetAuthority = (0, superstruct_1.type)({
60
+ mint: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString),
61
+ account: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString),
62
+ authorityType: AuthorityType,
63
+ newAuthority: (0, superstruct_1.nullable)(pubkey_1.PublicKeyFromString),
64
+ authority: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString),
65
+ multisigAuthority: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString),
66
+ signers: (0, superstruct_1.optional)((0, superstruct_1.array)(pubkey_1.PublicKeyFromString))
67
+ });
68
+ var MintTo = (0, superstruct_1.type)({
69
+ mint: pubkey_1.PublicKeyFromString,
70
+ account: pubkey_1.PublicKeyFromString,
71
+ amount: (0, superstruct_1.union)([(0, superstruct_1.string)(), (0, superstruct_1.number)()]),
72
+ mintAuthority: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString),
73
+ multisigMintAuthority: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString),
74
+ signers: (0, superstruct_1.optional)((0, superstruct_1.array)(pubkey_1.PublicKeyFromString))
75
+ });
76
+ var Burn = (0, superstruct_1.type)({
77
+ account: pubkey_1.PublicKeyFromString,
78
+ mint: pubkey_1.PublicKeyFromString,
79
+ amount: (0, superstruct_1.union)([(0, superstruct_1.string)(), (0, superstruct_1.number)()]),
80
+ authority: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString),
81
+ multisigAuthority: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString),
82
+ signers: (0, superstruct_1.optional)((0, superstruct_1.array)(pubkey_1.PublicKeyFromString))
83
+ });
84
+ var CloseAccount = (0, superstruct_1.type)({
85
+ account: pubkey_1.PublicKeyFromString,
86
+ destination: pubkey_1.PublicKeyFromString,
87
+ owner: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString),
88
+ multisigOwner: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString),
89
+ signers: (0, superstruct_1.optional)((0, superstruct_1.array)(pubkey_1.PublicKeyFromString))
90
+ });
91
+ var FreezeAccount = (0, superstruct_1.type)({
92
+ account: pubkey_1.PublicKeyFromString,
93
+ mint: pubkey_1.PublicKeyFromString,
94
+ freezeAuthority: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString),
95
+ multisigFreezeAuthority: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString),
96
+ signers: (0, superstruct_1.optional)((0, superstruct_1.array)(pubkey_1.PublicKeyFromString))
97
+ });
98
+ var ThawAccount = (0, superstruct_1.type)({
99
+ account: pubkey_1.PublicKeyFromString,
100
+ mint: pubkey_1.PublicKeyFromString,
101
+ freezeAuthority: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString),
102
+ multisigFreezeAuthority: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString),
103
+ signers: (0, superstruct_1.optional)((0, superstruct_1.array)(pubkey_1.PublicKeyFromString))
104
+ });
105
+ exports.TransferChecked = (0, superstruct_1.type)({
106
+ source: pubkey_1.PublicKeyFromString,
107
+ mint: pubkey_1.PublicKeyFromString,
108
+ destination: pubkey_1.PublicKeyFromString,
109
+ authority: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString),
110
+ multisigAuthority: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString),
111
+ signers: (0, superstruct_1.optional)((0, superstruct_1.array)(pubkey_1.PublicKeyFromString)),
112
+ tokenAmount: exports.TokenAmountUi
113
+ });
114
+ var ApproveChecked = (0, superstruct_1.type)({
115
+ source: pubkey_1.PublicKeyFromString,
116
+ mint: pubkey_1.PublicKeyFromString,
117
+ delegate: pubkey_1.PublicKeyFromString,
118
+ owner: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString),
119
+ multisigOwner: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString),
120
+ signers: (0, superstruct_1.optional)((0, superstruct_1.array)(pubkey_1.PublicKeyFromString)),
121
+ tokenAmount: exports.TokenAmountUi
122
+ });
123
+ var MintToChecked = (0, superstruct_1.type)({
124
+ account: pubkey_1.PublicKeyFromString,
125
+ mint: pubkey_1.PublicKeyFromString,
126
+ mintAuthority: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString),
127
+ multisigMintAuthority: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString),
128
+ signers: (0, superstruct_1.optional)((0, superstruct_1.array)(pubkey_1.PublicKeyFromString)),
129
+ tokenAmount: exports.TokenAmountUi
130
+ });
131
+ var BurnChecked = (0, superstruct_1.type)({
132
+ account: pubkey_1.PublicKeyFromString,
133
+ mint: pubkey_1.PublicKeyFromString,
134
+ authority: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString),
135
+ multisigAuthority: (0, superstruct_1.optional)(pubkey_1.PublicKeyFromString),
136
+ signers: (0, superstruct_1.optional)((0, superstruct_1.array)(pubkey_1.PublicKeyFromString)),
137
+ tokenAmount: exports.TokenAmountUi
138
+ });
139
+ exports.TokenInstructionType = (0, superstruct_1.enums)([
140
+ "initializeMint",
141
+ "initializeAccount",
142
+ "initializeMultisig",
143
+ "transfer",
144
+ "approve",
145
+ "revoke",
146
+ "setAuthority",
147
+ "mintTo",
148
+ "burn",
149
+ "closeAccount",
150
+ "freezeAccount",
151
+ "thawAccount",
152
+ "transfer2",
153
+ "approve2",
154
+ "mintTo2",
155
+ "burn2",
156
+ "transferChecked",
157
+ "approveChecked",
158
+ "mintToChecked",
159
+ "burnChecked",
160
+ ]);
161
+ exports.IX_STRUCTS = {
162
+ initializeMint: InitializeMint,
163
+ initializeAccount: InitializeAccount,
164
+ initializeMultisig: InitializeMultisig,
165
+ transfer: exports.Transfer,
166
+ approve: Approve,
167
+ revoke: Revoke,
168
+ setAuthority: SetAuthority,
169
+ mintTo: MintTo,
170
+ burn: Burn,
171
+ closeAccount: CloseAccount,
172
+ freezeAccount: FreezeAccount,
173
+ thawAccount: ThawAccount,
174
+ transfer2: exports.TransferChecked,
175
+ approve2: ApproveChecked,
176
+ mintTo2: MintToChecked,
177
+ burn2: BurnChecked,
178
+ transferChecked: exports.TransferChecked,
179
+ approveChecked: ApproveChecked,
180
+ mintToChecked: MintToChecked,
181
+ burnChecked: BurnChecked
182
+ };
183
+ exports.IX_TITLES = {
184
+ initializeMint: "Initialize Mint",
185
+ initializeAccount: "Initialize Account",
186
+ initializeMultisig: "Initialize Multisig",
187
+ transfer: "Transfer",
188
+ approve: "Approve",
189
+ revoke: "Revoke",
190
+ setAuthority: "Set Authority",
191
+ mintTo: "Mint To",
192
+ burn: "Burn",
193
+ closeAccount: "Close Account",
194
+ freezeAccount: "Freeze Account",
195
+ thawAccount: "Thaw Account",
196
+ transfer2: "Transfer (Checked)",
197
+ approve2: "Approve (Checked)",
198
+ mintTo2: "Mint To (Checked)",
199
+ burn2: "Burn (Checked)",
200
+ transferChecked: "Transfer (Checked)",
201
+ approveChecked: "Approve (Checked)",
202
+ mintToChecked: "Mint To (Checked)",
203
+ burnChecked: "Burn (Checked)"
204
+ };
205
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../src/families/solana/api/chain/instruction/token/types.ts"],"names":[],"mappings":";AAAA,oDAAoD;;;AAEpD,2CAUqB;AACrB,kDAA8D;AAGjD,QAAA,aAAa,GAAG,IAAA,kBAAI,EAAC;IAChC,MAAM,EAAE,IAAA,oBAAM,GAAE;IAChB,QAAQ,EAAE,IAAA,oBAAM,GAAE;IAClB,cAAc,EAAE,IAAA,oBAAM,GAAE;CACzB,CAAC,CAAC;AAEH,IAAM,cAAc,GAAG,IAAA,kBAAI,EAAC;IAC1B,IAAI,EAAE,4BAAmB;IACzB,QAAQ,EAAE,IAAA,oBAAM,GAAE;IAClB,aAAa,EAAE,4BAAmB;IAClC,UAAU,EAAE,4BAAmB;IAC/B,eAAe,EAAE,IAAA,sBAAQ,EAAC,4BAAmB,CAAC;CAC/C,CAAC,CAAC;AAEH,IAAM,iBAAiB,GAAG,IAAA,kBAAI,EAAC;IAC7B,OAAO,EAAE,4BAAmB;IAC5B,IAAI,EAAE,4BAAmB;IACzB,KAAK,EAAE,4BAAmB;IAC1B,UAAU,EAAE,4BAAmB;CAChC,CAAC,CAAC;AAEH,IAAM,kBAAkB,GAAG,IAAA,kBAAI,EAAC;IAC9B,QAAQ,EAAE,4BAAmB;IAC7B,UAAU,EAAE,4BAAmB;IAC/B,OAAO,EAAE,IAAA,mBAAK,EAAC,4BAAmB,CAAC;IACnC,CAAC,EAAE,IAAA,oBAAM,GAAE;CACZ,CAAC,CAAC;AAGU,QAAA,QAAQ,GAAG,IAAA,kBAAI,EAAC;IAC3B,MAAM,EAAE,4BAAmB;IAC3B,WAAW,EAAE,4BAAmB;IAChC,MAAM,EAAE,IAAA,mBAAK,EAAC,CAAC,IAAA,oBAAM,GAAE,EAAE,IAAA,oBAAM,GAAE,CAAC,CAAC;IACnC,SAAS,EAAE,IAAA,sBAAQ,EAAC,4BAAmB,CAAC;IACxC,iBAAiB,EAAE,IAAA,s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YAAY,EAAE,YAAY;IAC1B,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,IAAI;IACV,YAAY,EAAE,YAAY;IAC1B,aAAa,EAAE,aAAa;IAC5B,WAAW,EAAE,WAAW;IACxB,SAAS,EAAE,uBAAe;IAC1B,QAAQ,EAAE,cAAc;IACxB,OAAO,EAAE,aAAa;IACtB,KAAK,EAAE,WAAW;IAClB,eAAe,EAAE,uBAAe;IAChC,cAAc,EAAE,cAAc;IAC9B,aAAa,EAAE,aAAa;IAC5B,WAAW,EAAE,WAAW;CACzB,CAAC;AAEW,QAAA,SAAS,GAAG;IACvB,cAAc,EAAE,iBAAiB;IACjC,iBAAiB,EAAE,oBAAoB;IACvC,kBAAkB,EAAE,qBAAqB;IACzC,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,YAAY,EAAE,eAAe;IAC7B,MAAM,EAAE,SAAS;IACjB,IAAI,EAAE,MAAM;IACZ,YAAY,EAAE,eAAe;IAC7B,aAAa,EAAE,gBAAgB;IAC/B,WAAW,EAAE,cAAc;IAC3B,SAAS,EAAE,oBAAoB;IAC/B,QAAQ,EAAE,mBAAmB;IAC7B,OAAO,EAAE,mBAAmB;IAC5B,KAAK,EAAE,gBAAgB;IACvB,eAAe,EAAE,oBAAoB;IACrC,cAAc,EAAE,mBAAmB;IACnC,aAAa,EAAE,mBAAmB;IAClC,WAAW,EAAE,gBAAgB;CAC9B,CAAC"}
@@ -0,0 +1,11 @@
1
+ export declare const PARSED_PROGRAMS: {
2
+ readonly SPL_ASSOCIATED_TOKEN_ACCOUNT: "spl-associated-token-account";
3
+ readonly BPF_LOADER: "bpf-loader";
4
+ readonly BPF_UPGRADEABLE_LOADER: "bpf-upgradeable-loader";
5
+ readonly SPL_MEMO: "spl-memo";
6
+ readonly STAKE: "stake";
7
+ readonly SYSTEM: "system";
8
+ readonly SPL_TOKEN: "spl-token";
9
+ readonly VOTE: "vote";
10
+ };
11
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../src/families/solana/api/chain/program/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;;;;;CASlB,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.PARSED_PROGRAMS = void 0;
4
+ exports.PARSED_PROGRAMS = {
5
+ SPL_ASSOCIATED_TOKEN_ACCOUNT: "spl-associated-token-account",
6
+ BPF_LOADER: "bpf-loader",
7
+ BPF_UPGRADEABLE_LOADER: "bpf-upgradeable-loader",
8
+ SPL_MEMO: "spl-memo",
9
+ STAKE: "stake",
10
+ SYSTEM: "system",
11
+ SPL_TOKEN: "spl-token",
12
+ VOTE: "vote"
13
+ };
14
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../src/families/solana/api/chain/program/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,eAAe,GAAG;IAC7B,4BAA4B,EAAE,8BAA8B;IAC5D,UAAU,EAAE,YAAY;IACxB,sBAAsB,EAAE,wBAAwB;IAChD,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,WAAW;IACtB,IAAI,EAAE,MAAM;CACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { parse, parseQuiet } from "./parser";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/families/solana/api/chain/program/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ exports.__esModule = true;
10
+ exports.parseQuiet = exports.parse = void 0;
11
+ var parser_1 = require("./parser");
12
+ __createBinding(exports, parser_1, "parse");
13
+ __createBinding(exports, parser_1, "parseQuiet");
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/families/solana/api/chain/program/index.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,mCAA6C;AAApC,4CAAK;AAAE,iDAAU"}
@@ -0,0 +1,30 @@
1
+ import { ParsedInstruction, PartiallyDecodedInstruction } from "@solana/web3.js";
2
+ import { TokenInstructionDescriptor } from "../instruction/token";
3
+ import { AssociatedTokenAccountInstructionDescriptor } from "../instruction/associated-token-account";
4
+ import { MemoInstructionDescriptor } from "../instruction/memo";
5
+ import { StakeInstructionDescriptor } from "../instruction/stake";
6
+ declare type ParsedProgram = {
7
+ program: "spl-associated-token-account";
8
+ title: string;
9
+ instruction: AssociatedTokenAccountInstructionDescriptor;
10
+ } | {
11
+ program: "spl-memo";
12
+ title: string;
13
+ instruction: MemoInstructionDescriptor;
14
+ } | {
15
+ program: "stake";
16
+ title: string;
17
+ instruction: StakeInstructionDescriptor;
18
+ } | {
19
+ program: "spl-token";
20
+ title: string;
21
+ instruction: TokenInstructionDescriptor;
22
+ } | {
23
+ program: "unknown";
24
+ title: "Unknown";
25
+ instruction: undefined;
26
+ };
27
+ export declare const parse: (ix: ParsedInstruction | PartiallyDecodedInstruction) => ParsedProgram;
28
+ export declare const parseQuiet: (ix: ParsedInstruction | PartiallyDecodedInstruction) => ParsedProgram;
29
+ export {};
30
+ //# sourceMappingURL=parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../../../../src/families/solana/api/chain/program/parser.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,2BAA2B,EAC5B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAEL,0BAA0B,EAC3B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,2CAA2C,EAE5C,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,yBAAyB,EAE1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,0BAA0B,EAC3B,MAAM,sBAAsB,CAAC;AAE9B,aAAK,aAAa,GACd;IACE,OAAO,EAAE,8BAA8B,CAAC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,2CAA2C,CAAC;CAC1D,GACD;IACE,OAAO,EAAE,UAAU,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,yBAAyB,CAAC;CACxC,GACD;IACE,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,0BAA0B,CAAC;CACzC,GACD;IACE,OAAO,EAAE,WAAW,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,0BAA0B,CAAC;CACzC,GACD;IACE,OAAO,EAAE,SAAS,CAAC;IACnB,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,EAAE,SAAS,CAAC;CACxB,CAAC;AAEN,eAAO,MAAM,KAAK,OACZ,iBAAiB,GAAG,2BAA2B,KAClD,aAgDF,CAAC;AAEF,eAAO,MAAM,UAAU,OACjB,iBAAiB,GAAG,2BAA2B,KAClD,aAMF,CAAC"}
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ exports.__esModule = true;
14
+ exports.parseQuiet = exports.parse = void 0;
15
+ var token_1 = require("../instruction/token");
16
+ var associated_token_account_1 = require("../instruction/associated-token-account");
17
+ var memo_1 = require("../instruction/memo");
18
+ var stake_1 = require("../instruction/stake");
19
+ var parse = function (ix) {
20
+ if ("parsed" in ix) {
21
+ var program = ix.program;
22
+ switch (program) {
23
+ case "spl-associated-token-account":
24
+ return {
25
+ program: program,
26
+ title: "Associated Token Account",
27
+ instruction: (0, associated_token_account_1.parseAssociatedTokenAccountInstruction)(__assign(__assign({}, ix), { program: program }))
28
+ };
29
+ case "spl-memo":
30
+ return {
31
+ program: program,
32
+ title: "Memo",
33
+ instruction: (0, memo_1.parseSplMemoInstruction)(__assign(__assign({}, ix), { program: program }))
34
+ };
35
+ case "stake":
36
+ return {
37
+ program: program,
38
+ title: "Stake",
39
+ instruction: (0, stake_1.parseStakeInstruction)(__assign(__assign({}, ix), { program: program }))
40
+ };
41
+ case "spl-token":
42
+ return {
43
+ program: program,
44
+ title: "Token",
45
+ instruction: (0, token_1.parseSplTokenInstruction)(__assign(__assign({}, ix), { program: program }))
46
+ };
47
+ default:
48
+ return unknown();
49
+ }
50
+ }
51
+ return unknown();
52
+ };
53
+ exports.parse = parse;
54
+ var parseQuiet = function (ix) {
55
+ try {
56
+ return (0, exports.parse)(ix);
57
+ }
58
+ catch (_) {
59
+ return unknown();
60
+ }
61
+ };
62
+ exports.parseQuiet = parseQuiet;
63
+ function unknown() {
64
+ return {
65
+ program: "unknown",
66
+ title: "Unknown",
67
+ instruction: undefined
68
+ };
69
+ }
70
+ //# sourceMappingURL=parser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parser.js","sourceRoot":"","sources":["../../../../../../src/families/solana/api/chain/program/parser.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAIA,8CAG8B;AAE9B,oFAGiD;AACjD,4CAG6B;AAC7B,8CAG8B;AA6BvB,IAAM,KAAK,GAAG,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.js";
2
+ export declare const BigNumFromString: import("superstruct").Struct<BigNumber, null>;
3
+ //# sourceMappingURL=bignum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bignum.d.ts","sourceRoot":"","sources":["../../../../../../src/families/solana/api/chain/validators/bignum.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,gBAAgB,+CAO5B,CAAC"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.BigNumFromString = void 0;
4
+ var superstruct_1 = require("superstruct");
5
+ var bignumber_js_1 = require("bignumber.js");
6
+ exports.BigNumFromString = (0, superstruct_1.coerce)((0, superstruct_1.instance)(bignumber_js_1.BigNumber), (0, superstruct_1.string)(), function (value) {
7
+ if (typeof value === "string")
8
+ return new bignumber_js_1.BigNumber(value, 10);
9
+ throw new Error("invalid big num");
10
+ });
11
+ //# sourceMappingURL=bignum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bignum.js","sourceRoot":"","sources":["../../../../../../src/families/solana/api/chain/validators/bignum.ts"],"names":[],"mappings":";;;AAAA,2CAAuD;AACvD,6CAAyC;AAE5B,QAAA,gBAAgB,GAAG,IAAA,oBAAM,EACpC,IAAA,sBAAQ,EAAC,wBAAS,CAAC,EACnB,IAAA,oBAAM,GAAE,EACR,UAAC,KAAK;IACJ,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,wBAAS,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC/D,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;AACrC,CAAC,CACF,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { Infer } from "superstruct";
2
+ export declare type ParsedInfo = Infer<typeof ParsedInfo>;
3
+ export declare const ParsedInfo: import("superstruct").Struct<{
4
+ type: string;
5
+ info?: any;
6
+ }, {
7
+ type: import("superstruct").Struct<string, null>;
8
+ info: import("superstruct").Struct<any, null>;
9
+ }>;
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/families/solana/api/chain/validators/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAa,KAAK,EAAU,MAAM,aAAa,CAAC;AAEvD,oBAAY,UAAU,GAAG,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAClD,eAAO,MAAM,UAAU;;;;;;EAGrB,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /* eslint-disable @typescript-eslint/no-redeclare */
3
+ exports.__esModule = true;
4
+ exports.ParsedInfo = void 0;
5
+ var superstruct_1 = require("superstruct");
6
+ exports.ParsedInfo = (0, superstruct_1.type)({
7
+ type: (0, superstruct_1.string)(),
8
+ info: (0, superstruct_1.any)()
9
+ });
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/families/solana/api/chain/validators/index.ts"],"names":[],"mappings":";AAAA,oDAAoD;;;AAEpD,2CAAuD;AAG1C,QAAA,UAAU,GAAG,IAAA,kBAAI,EAAC;IAC7B,IAAI,EAAE,IAAA,oBAAM,GAAE;IACd,IAAI,EAAE,IAAA,iBAAG,GAAE;CACZ,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { PublicKey } from "@solana/web3.js";
2
+ export declare const PublicKeyFromString: import("superstruct").Struct<PublicKey, null>;
3
+ //# sourceMappingURL=pubkey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pubkey.d.ts","sourceRoot":"","sources":["../../../../../../src/families/solana/api/chain/validators/pubkey.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,eAAO,MAAM,mBAAmB,+CAI/B,CAAC"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.PublicKeyFromString = void 0;
4
+ var superstruct_1 = require("superstruct");
5
+ var web3_js_1 = require("@solana/web3.js");
6
+ exports.PublicKeyFromString = (0, superstruct_1.coerce)((0, superstruct_1.instance)(web3_js_1.PublicKey), (0, superstruct_1.string)(), function (value) { return new web3_js_1.PublicKey(value); });
7
+ //# sourceMappingURL=pubkey.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pubkey.js","sourceRoot":"","sources":["../../../../../../src/families/solana/api/chain/validators/pubkey.ts"],"names":[],"mappings":";;;AAAA,2CAAuD;AACvD,2CAA4C;AAE/B,QAAA,mBAAmB,GAAG,IAAA,oBAAM,EACvC,IAAA,sBAAQ,EAAC,mBAAS,CAAC,EACnB,IAAA,oBAAM,GAAE,EACR,UAAC,KAAK,IAAK,OAAA,IAAI,mBAAS,CAAC,KAAK,CAAC,EAApB,CAAoB,CAChC,CAAC"}
@@ -0,0 +1,29 @@
1
+ /// <reference types="node" />
2
+ import { Connection, PublicKey, Transaction, ConfirmedSignatureInfo, ParsedConfirmedTransaction, TransactionInstruction } from "@solana/web3.js";
3
+ import { TokenCreateATACommand, TokenTransferCommand, TransferCommand } from "../../types";
4
+ import { TokenAccountInfo } from "./account/token";
5
+ import { Awaited } from "../../logic";
6
+ import { ChainAPI } from ".";
7
+ declare type ParsedOnChainTokenAccount = Awaited<ReturnType<Connection["getParsedTokenAccountsByOwner"]>>["value"][number];
8
+ export declare type ParsedOnChainTokenAccountWithInfo = {
9
+ onChainAcc: ParsedOnChainTokenAccount;
10
+ info: TokenAccountInfo;
11
+ };
12
+ export declare function toTokenAccountWithInfo(onChainAcc: ParsedOnChainTokenAccount): ParsedOnChainTokenAccountWithInfo;
13
+ export declare type TransactionDescriptor = {
14
+ parsed: ParsedConfirmedTransaction;
15
+ info: ConfirmedSignatureInfo;
16
+ };
17
+ export declare function getTransactions(address: string, untilTxSignature: string | undefined, api: ChainAPI): Promise<TransactionDescriptor[]>;
18
+ export declare const buildTransferInstructions: ({ sender, recipient, amount, memo, }: TransferCommand) => TransactionInstruction[];
19
+ export declare const buildTokenTransferInstructions: (command: TokenTransferCommand) => TransactionInstruction[];
20
+ export declare const addSignatureToTransaction: ({ tx, address, signature, }: {
21
+ tx: Transaction;
22
+ address: string;
23
+ signature: Buffer;
24
+ }) => Transaction;
25
+ export declare function findAssociatedTokenAccountPubkey(ownerAddress: string, mintAddress: string): Promise<PublicKey>;
26
+ export declare const getMaybeTokenAccount: (address: string, api: ChainAPI) => Promise<TokenAccountInfo | undefined | Error>;
27
+ export declare function buildCreateAssociatedTokenAccountInstruction({ mint, owner, associatedTokenAccountAddress, }: TokenCreateATACommand): TransactionInstruction[];
28
+ export {};
29
+ //# sourceMappingURL=web3.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web3.d.ts","sourceRoot":"","sources":["../../../../../src/families/solana/api/chain/web3.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EACV,SAAS,EAET,WAAW,EACX,sBAAsB,EACtB,0BAA0B,EAC1B,sBAAsB,EACvB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EAChB,MAAM,aAAa,CAAC;AAOrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,CAAC;AAI7B,aAAK,yBAAyB,GAAG,OAAO,CACtC,UAAU,CAAC,UAAU,CAAC,+BAA+B,CAAC,CAAC,CACxD,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnB,oBAAY,iCAAiC,GAAG;IAC9C,UAAU,EAAE,yBAAyB,CAAC;IACtC,IAAI,EAAE,gBAAgB,CAAC;CACxB,CAAC;AAEF,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,yBAAyB,GACpC,iCAAiC,CAInC;AAED,oBAAY,qBAAqB,GAAG;IAClC,MAA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