@ledgerhq/coin-aptos 1.4.0-next.0

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 (439) hide show
  1. package/.turbo/turbo-build.log +4 -0
  2. package/.unimportedrc.json +16 -0
  3. package/CHANGELOG.md +18 -0
  4. package/LICENSE.txt +21 -0
  5. package/jest.config.js +8 -0
  6. package/lib/__tests__/api/index.test.d.ts +2 -0
  7. package/lib/__tests__/api/index.test.d.ts.map +1 -0
  8. package/lib/__tests__/api/index.test.js +447 -0
  9. package/lib/__tests__/api/index.test.js.map +1 -0
  10. package/lib/__tests__/bridge/broadcast.test.d.ts +2 -0
  11. package/lib/__tests__/bridge/broadcast.test.d.ts.map +1 -0
  12. package/lib/__tests__/bridge/broadcast.test.js +98 -0
  13. package/lib/__tests__/bridge/broadcast.test.js.map +1 -0
  14. package/lib/__tests__/bridge/buildTransaction.test.d.ts +2 -0
  15. package/lib/__tests__/bridge/buildTransaction.test.d.ts.map +1 -0
  16. package/lib/__tests__/bridge/buildTransaction.test.js +62 -0
  17. package/lib/__tests__/bridge/buildTransaction.test.js.map +1 -0
  18. package/lib/__tests__/bridge/createTransaction.test.d.ts +2 -0
  19. package/lib/__tests__/bridge/createTransaction.test.d.ts.map +1 -0
  20. package/lib/__tests__/bridge/createTransaction.test.js +38 -0
  21. package/lib/__tests__/bridge/createTransaction.test.js.map +1 -0
  22. package/lib/__tests__/bridge/deviceTransactionConfig.test.d.ts +2 -0
  23. package/lib/__tests__/bridge/deviceTransactionConfig.test.d.ts.map +1 -0
  24. package/lib/__tests__/bridge/deviceTransactionConfig.test.js +43 -0
  25. package/lib/__tests__/bridge/deviceTransactionConfig.test.js.map +1 -0
  26. package/lib/__tests__/bridge/estimateMaxSpendable.test.d.ts +2 -0
  27. package/lib/__tests__/bridge/estimateMaxSpendable.test.d.ts.map +1 -0
  28. package/lib/__tests__/bridge/estimateMaxSpendable.test.js +84 -0
  29. package/lib/__tests__/bridge/estimateMaxSpendable.test.js.map +1 -0
  30. package/lib/__tests__/bridge/getFeesForTransaction.test.d.ts +2 -0
  31. package/lib/__tests__/bridge/getFeesForTransaction.test.d.ts.map +1 -0
  32. package/lib/__tests__/bridge/getFeesForTransaction.test.js +188 -0
  33. package/lib/__tests__/bridge/getFeesForTransaction.test.js.map +1 -0
  34. package/lib/__tests__/bridge/getTransactionStatus.test.d.ts +2 -0
  35. package/lib/__tests__/bridge/getTransactionStatus.test.d.ts.map +1 -0
  36. package/lib/__tests__/bridge/getTransactionStatus.test.js +133 -0
  37. package/lib/__tests__/bridge/getTransactionStatus.test.js.map +1 -0
  38. package/lib/__tests__/bridge/index.test.d.ts +2 -0
  39. package/lib/__tests__/bridge/index.test.d.ts.map +1 -0
  40. package/lib/__tests__/bridge/index.test.js +116 -0
  41. package/lib/__tests__/bridge/index.test.js.map +1 -0
  42. package/lib/__tests__/bridge/logic.test.d.ts +2 -0
  43. package/lib/__tests__/bridge/logic.test.d.ts.map +1 -0
  44. package/lib/__tests__/bridge/logic.test.js +773 -0
  45. package/lib/__tests__/bridge/logic.test.js.map +1 -0
  46. package/lib/__tests__/bridge/prepareTransaction.test.d.ts +2 -0
  47. package/lib/__tests__/bridge/prepareTransaction.test.d.ts.map +1 -0
  48. package/lib/__tests__/bridge/prepareTransaction.test.js +121 -0
  49. package/lib/__tests__/bridge/prepareTransaction.test.js.map +1 -0
  50. package/lib/__tests__/bridge/signOperation.test.d.ts +2 -0
  51. package/lib/__tests__/bridge/signOperation.test.d.ts.map +1 -0
  52. package/lib/__tests__/bridge/signOperation.test.js +185 -0
  53. package/lib/__tests__/bridge/signOperation.test.js.map +1 -0
  54. package/lib/__tests__/bridge/synchronisation.test.d.ts +2 -0
  55. package/lib/__tests__/bridge/synchronisation.test.d.ts.map +1 -0
  56. package/lib/__tests__/bridge/synchronisation.test.js +349 -0
  57. package/lib/__tests__/bridge/synchronisation.test.js.map +1 -0
  58. package/lib/__tests__/bridge/transaction.test.d.ts +2 -0
  59. package/lib/__tests__/bridge/transaction.test.d.ts.map +1 -0
  60. package/lib/__tests__/bridge/transaction.test.js +231 -0
  61. package/lib/__tests__/bridge/transaction.test.js.map +1 -0
  62. package/lib/__tests__/errors.test.d.ts +2 -0
  63. package/lib/__tests__/errors.test.d.ts.map +1 -0
  64. package/lib/__tests__/errors.test.js +18 -0
  65. package/lib/__tests__/errors.test.js.map +1 -0
  66. package/lib/__tests__/index.test.d.ts +2 -0
  67. package/lib/__tests__/index.test.d.ts.map +1 -0
  68. package/lib/__tests__/index.test.js +27 -0
  69. package/lib/__tests__/index.test.js.map +1 -0
  70. package/lib/__tests__/network/index.test.d.ts +2 -0
  71. package/lib/__tests__/network/index.test.d.ts.map +1 -0
  72. package/lib/__tests__/network/index.test.js +57 -0
  73. package/lib/__tests__/network/index.test.js.map +1 -0
  74. package/lib/__tests__/signer/index.test.d.ts +2 -0
  75. package/lib/__tests__/signer/index.test.d.ts.map +1 -0
  76. package/lib/__tests__/signer/index.test.js +37 -0
  77. package/lib/__tests__/signer/index.test.js.map +1 -0
  78. package/lib/api/graphql/queries.d.ts +5 -0
  79. package/lib/api/graphql/queries.d.ts.map +1 -0
  80. package/lib/api/graphql/queries.js +56 -0
  81. package/lib/api/graphql/queries.js.map +1 -0
  82. package/lib/api/graphql/types.d.ts +79 -0
  83. package/lib/api/graphql/types.d.ts.map +1 -0
  84. package/lib/api/graphql/types.js +3 -0
  85. package/lib/api/graphql/types.js.map +1 -0
  86. package/lib/api/index.d.ts +31 -0
  87. package/lib/api/index.d.ts.map +1 -0
  88. package/lib/api/index.js +200 -0
  89. package/lib/api/index.js.map +1 -0
  90. package/lib/bridge/bridge.fixture.d.ts +4 -0
  91. package/lib/bridge/bridge.fixture.d.ts.map +1 -0
  92. package/lib/bridge/bridge.fixture.js +56 -0
  93. package/lib/bridge/bridge.fixture.js.map +1 -0
  94. package/lib/bridge/broadcast.d.ts +7 -0
  95. package/lib/bridge/broadcast.d.ts.map +1 -0
  96. package/lib/bridge/broadcast.js +20 -0
  97. package/lib/bridge/broadcast.js.map +1 -0
  98. package/lib/bridge/buildTransaction.d.ts +7 -0
  99. package/lib/bridge/buildTransaction.d.ts.map +1 -0
  100. package/lib/bridge/buildTransaction.js +28 -0
  101. package/lib/bridge/buildTransaction.js.map +1 -0
  102. package/lib/bridge/createTransaction.d.ts +4 -0
  103. package/lib/bridge/createTransaction.d.ts.map +1 -0
  104. package/lib/bridge/createTransaction.js +20 -0
  105. package/lib/bridge/createTransaction.js.map +1 -0
  106. package/lib/bridge/deviceTransactionConfig.d.ts +11 -0
  107. package/lib/bridge/deviceTransactionConfig.d.ts.map +1 -0
  108. package/lib/bridge/deviceTransactionConfig.js +23 -0
  109. package/lib/bridge/deviceTransactionConfig.js.map +1 -0
  110. package/lib/bridge/estimateMaxSpendable.d.ts +10 -0
  111. package/lib/bridge/estimateMaxSpendable.d.ts.map +1 -0
  112. package/lib/bridge/estimateMaxSpendable.js +30 -0
  113. package/lib/bridge/estimateMaxSpendable.js.map +1 -0
  114. package/lib/bridge/getFeesForTransaction.d.ts +16 -0
  115. package/lib/bridge/getFeesForTransaction.d.ts.map +1 -0
  116. package/lib/bridge/getFeesForTransaction.js +74 -0
  117. package/lib/bridge/getFeesForTransaction.js.map +1 -0
  118. package/lib/bridge/getTransactionStatus.d.ts +5 -0
  119. package/lib/bridge/getTransactionStatus.d.ts.map +1 -0
  120. package/lib/bridge/getTransactionStatus.js +48 -0
  121. package/lib/bridge/getTransactionStatus.js.map +1 -0
  122. package/lib/bridge/index.d.ts +8 -0
  123. package/lib/bridge/index.d.ts.map +1 -0
  124. package/lib/bridge/index.js +54 -0
  125. package/lib/bridge/index.js.map +1 -0
  126. package/lib/bridge/logic.d.ts +24 -0
  127. package/lib/bridge/logic.d.ts.map +1 -0
  128. package/lib/bridge/logic.js +200 -0
  129. package/lib/bridge/logic.js.map +1 -0
  130. package/lib/bridge/prepareTransaction.d.ts +5 -0
  131. package/lib/bridge/prepareTransaction.d.ts.map +1 -0
  132. package/lib/bridge/prepareTransaction.js +44 -0
  133. package/lib/bridge/prepareTransaction.js.map +1 -0
  134. package/lib/bridge/signOperation.d.ts +11 -0
  135. package/lib/bridge/signOperation.d.ts.map +1 -0
  136. package/lib/bridge/signOperation.js +77 -0
  137. package/lib/bridge/signOperation.js.map +1 -0
  138. package/lib/bridge/synchronisation.d.ts +3 -0
  139. package/lib/bridge/synchronisation.d.ts.map +1 -0
  140. package/lib/bridge/synchronisation.js +53 -0
  141. package/lib/bridge/synchronisation.js.map +1 -0
  142. package/lib/bridge/transaction.d.ts +15 -0
  143. package/lib/bridge/transaction.d.ts.map +1 -0
  144. package/lib/bridge/transaction.js +37 -0
  145. package/lib/bridge/transaction.js.map +1 -0
  146. package/lib/constants.d.ts +19 -0
  147. package/lib/constants.d.ts.map +1 -0
  148. package/lib/constants.js +33 -0
  149. package/lib/constants.js.map +1 -0
  150. package/lib/errors.d.ts +10 -0
  151. package/lib/errors.d.ts.map +1 -0
  152. package/lib/errors.js +8 -0
  153. package/lib/errors.js.map +1 -0
  154. package/lib/index.d.ts +3 -0
  155. package/lib/index.d.ts.map +1 -0
  156. package/lib/index.js +21 -0
  157. package/lib/index.js.map +1 -0
  158. package/lib/network/index.d.ts +6 -0
  159. package/lib/network/index.d.ts.map +1 -0
  160. package/lib/network/index.js +39 -0
  161. package/lib/network/index.js.map +1 -0
  162. package/lib/signer/index.d.ts +6 -0
  163. package/lib/signer/index.d.ts.map +1 -0
  164. package/lib/signer/index.js +23 -0
  165. package/lib/signer/index.js.map +1 -0
  166. package/lib/test/bot-specs.d.ts +7 -0
  167. package/lib/test/bot-specs.d.ts.map +1 -0
  168. package/lib/test/bot-specs.js +77 -0
  169. package/lib/test/bot-specs.js.map +1 -0
  170. package/lib/test/bridgeDatasetTest.d.ts +4 -0
  171. package/lib/test/bridgeDatasetTest.d.ts.map +1 -0
  172. package/lib/test/bridgeDatasetTest.js +85 -0
  173. package/lib/test/bridgeDatasetTest.js.map +1 -0
  174. package/lib/test/cli.d.ts +19 -0
  175. package/lib/test/cli.d.ts.map +1 -0
  176. package/lib/test/cli.js +59 -0
  177. package/lib/test/cli.js.map +1 -0
  178. package/lib/test/index.d.ts +4 -0
  179. package/lib/test/index.d.ts.map +1 -0
  180. package/lib/test/index.js +20 -0
  181. package/lib/test/index.js.map +1 -0
  182. package/lib/test/speculos-deviceActions.d.ts +5 -0
  183. package/lib/test/speculos-deviceActions.d.ts.map +1 -0
  184. package/lib/test/speculos-deviceActions.js +46 -0
  185. package/lib/test/speculos-deviceActions.js.map +1 -0
  186. package/lib/types/bridge.d.ts +5 -0
  187. package/lib/types/bridge.d.ts.map +1 -0
  188. package/lib/types/bridge.js +9 -0
  189. package/lib/types/bridge.js.map +1 -0
  190. package/lib/types/index.d.ts +62 -0
  191. package/lib/types/index.d.ts.map +1 -0
  192. package/lib/types/index.js +19 -0
  193. package/lib/types/index.js.map +1 -0
  194. package/lib/types/signer.d.ts +27 -0
  195. package/lib/types/signer.d.ts.map +1 -0
  196. package/lib/types/signer.js +3 -0
  197. package/lib/types/signer.js.map +1 -0
  198. package/lib-es/__tests__/api/index.test.d.ts +2 -0
  199. package/lib-es/__tests__/api/index.test.d.ts.map +1 -0
  200. package/lib-es/__tests__/api/index.test.js +442 -0
  201. package/lib-es/__tests__/api/index.test.js.map +1 -0
  202. package/lib-es/__tests__/bridge/broadcast.test.d.ts +2 -0
  203. package/lib-es/__tests__/bridge/broadcast.test.d.ts.map +1 -0
  204. package/lib-es/__tests__/bridge/broadcast.test.js +93 -0
  205. package/lib-es/__tests__/bridge/broadcast.test.js.map +1 -0
  206. package/lib-es/__tests__/bridge/buildTransaction.test.d.ts +2 -0
  207. package/lib-es/__tests__/bridge/buildTransaction.test.d.ts.map +1 -0
  208. package/lib-es/__tests__/bridge/buildTransaction.test.js +57 -0
  209. package/lib-es/__tests__/bridge/buildTransaction.test.js.map +1 -0
  210. package/lib-es/__tests__/bridge/createTransaction.test.d.ts +2 -0
  211. package/lib-es/__tests__/bridge/createTransaction.test.d.ts.map +1 -0
  212. package/lib-es/__tests__/bridge/createTransaction.test.js +33 -0
  213. package/lib-es/__tests__/bridge/createTransaction.test.js.map +1 -0
  214. package/lib-es/__tests__/bridge/deviceTransactionConfig.test.d.ts +2 -0
  215. package/lib-es/__tests__/bridge/deviceTransactionConfig.test.d.ts.map +1 -0
  216. package/lib-es/__tests__/bridge/deviceTransactionConfig.test.js +18 -0
  217. package/lib-es/__tests__/bridge/deviceTransactionConfig.test.js.map +1 -0
  218. package/lib-es/__tests__/bridge/estimateMaxSpendable.test.d.ts +2 -0
  219. package/lib-es/__tests__/bridge/estimateMaxSpendable.test.d.ts.map +1 -0
  220. package/lib-es/__tests__/bridge/estimateMaxSpendable.test.js +79 -0
  221. package/lib-es/__tests__/bridge/estimateMaxSpendable.test.js.map +1 -0
  222. package/lib-es/__tests__/bridge/getFeesForTransaction.test.d.ts +2 -0
  223. package/lib-es/__tests__/bridge/getFeesForTransaction.test.d.ts.map +1 -0
  224. package/lib-es/__tests__/bridge/getFeesForTransaction.test.js +160 -0
  225. package/lib-es/__tests__/bridge/getFeesForTransaction.test.js.map +1 -0
  226. package/lib-es/__tests__/bridge/getTransactionStatus.test.d.ts +2 -0
  227. package/lib-es/__tests__/bridge/getTransactionStatus.test.d.ts.map +1 -0
  228. package/lib-es/__tests__/bridge/getTransactionStatus.test.js +128 -0
  229. package/lib-es/__tests__/bridge/getTransactionStatus.test.js.map +1 -0
  230. package/lib-es/__tests__/bridge/index.test.d.ts +2 -0
  231. package/lib-es/__tests__/bridge/index.test.d.ts.map +1 -0
  232. package/lib-es/__tests__/bridge/index.test.js +111 -0
  233. package/lib-es/__tests__/bridge/index.test.js.map +1 -0
  234. package/lib-es/__tests__/bridge/logic.test.d.ts +2 -0
  235. package/lib-es/__tests__/bridge/logic.test.d.ts.map +1 -0
  236. package/lib-es/__tests__/bridge/logic.test.js +768 -0
  237. package/lib-es/__tests__/bridge/logic.test.js.map +1 -0
  238. package/lib-es/__tests__/bridge/prepareTransaction.test.d.ts +2 -0
  239. package/lib-es/__tests__/bridge/prepareTransaction.test.d.ts.map +1 -0
  240. package/lib-es/__tests__/bridge/prepareTransaction.test.js +116 -0
  241. package/lib-es/__tests__/bridge/prepareTransaction.test.js.map +1 -0
  242. package/lib-es/__tests__/bridge/signOperation.test.d.ts +2 -0
  243. package/lib-es/__tests__/bridge/signOperation.test.d.ts.map +1 -0
  244. package/lib-es/__tests__/bridge/signOperation.test.js +157 -0
  245. package/lib-es/__tests__/bridge/signOperation.test.js.map +1 -0
  246. package/lib-es/__tests__/bridge/synchronisation.test.d.ts +2 -0
  247. package/lib-es/__tests__/bridge/synchronisation.test.d.ts.map +1 -0
  248. package/lib-es/__tests__/bridge/synchronisation.test.js +347 -0
  249. package/lib-es/__tests__/bridge/synchronisation.test.js.map +1 -0
  250. package/lib-es/__tests__/bridge/transaction.test.d.ts +2 -0
  251. package/lib-es/__tests__/bridge/transaction.test.d.ts.map +1 -0
  252. package/lib-es/__tests__/bridge/transaction.test.js +226 -0
  253. package/lib-es/__tests__/bridge/transaction.test.js.map +1 -0
  254. package/lib-es/__tests__/errors.test.d.ts +2 -0
  255. package/lib-es/__tests__/errors.test.d.ts.map +1 -0
  256. package/lib-es/__tests__/errors.test.js +16 -0
  257. package/lib-es/__tests__/errors.test.js.map +1 -0
  258. package/lib-es/__tests__/index.test.d.ts +2 -0
  259. package/lib-es/__tests__/index.test.d.ts.map +1 -0
  260. package/lib-es/__tests__/index.test.js +25 -0
  261. package/lib-es/__tests__/index.test.js.map +1 -0
  262. package/lib-es/__tests__/network/index.test.d.ts +2 -0
  263. package/lib-es/__tests__/network/index.test.d.ts.map +1 -0
  264. package/lib-es/__tests__/network/index.test.js +55 -0
  265. package/lib-es/__tests__/network/index.test.js.map +1 -0
  266. package/lib-es/__tests__/signer/index.test.d.ts +2 -0
  267. package/lib-es/__tests__/signer/index.test.d.ts.map +1 -0
  268. package/lib-es/__tests__/signer/index.test.js +32 -0
  269. package/lib-es/__tests__/signer/index.test.js.map +1 -0
  270. package/lib-es/api/graphql/queries.d.ts +5 -0
  271. package/lib-es/api/graphql/queries.d.ts.map +1 -0
  272. package/lib-es/api/graphql/queries.js +53 -0
  273. package/lib-es/api/graphql/queries.js.map +1 -0
  274. package/lib-es/api/graphql/types.d.ts +79 -0
  275. package/lib-es/api/graphql/types.d.ts.map +1 -0
  276. package/lib-es/api/graphql/types.js +2 -0
  277. package/lib-es/api/graphql/types.js.map +1 -0
  278. package/lib-es/api/index.d.ts +31 -0
  279. package/lib-es/api/index.d.ts.map +1 -0
  280. package/lib-es/api/index.js +193 -0
  281. package/lib-es/api/index.js.map +1 -0
  282. package/lib-es/bridge/bridge.fixture.d.ts +4 -0
  283. package/lib-es/bridge/bridge.fixture.d.ts.map +1 -0
  284. package/lib-es/bridge/bridge.fixture.js +48 -0
  285. package/lib-es/bridge/bridge.fixture.js.map +1 -0
  286. package/lib-es/bridge/broadcast.d.ts +7 -0
  287. package/lib-es/bridge/broadcast.d.ts.map +1 -0
  288. package/lib-es/bridge/broadcast.js +18 -0
  289. package/lib-es/bridge/broadcast.js.map +1 -0
  290. package/lib-es/bridge/buildTransaction.d.ts +7 -0
  291. package/lib-es/bridge/buildTransaction.d.ts.map +1 -0
  292. package/lib-es/bridge/buildTransaction.js +26 -0
  293. package/lib-es/bridge/buildTransaction.js.map +1 -0
  294. package/lib-es/bridge/createTransaction.d.ts +4 -0
  295. package/lib-es/bridge/createTransaction.d.ts.map +1 -0
  296. package/lib-es/bridge/createTransaction.js +15 -0
  297. package/lib-es/bridge/createTransaction.js.map +1 -0
  298. package/lib-es/bridge/deviceTransactionConfig.d.ts +11 -0
  299. package/lib-es/bridge/deviceTransactionConfig.d.ts.map +1 -0
  300. package/lib-es/bridge/deviceTransactionConfig.js +19 -0
  301. package/lib-es/bridge/deviceTransactionConfig.js.map +1 -0
  302. package/lib-es/bridge/estimateMaxSpendable.d.ts +10 -0
  303. package/lib-es/bridge/estimateMaxSpendable.d.ts.map +1 -0
  304. package/lib-es/bridge/estimateMaxSpendable.js +28 -0
  305. package/lib-es/bridge/estimateMaxSpendable.js.map +1 -0
  306. package/lib-es/bridge/getFeesForTransaction.d.ts +16 -0
  307. package/lib-es/bridge/getFeesForTransaction.d.ts.map +1 -0
  308. package/lib-es/bridge/getFeesForTransaction.js +66 -0
  309. package/lib-es/bridge/getFeesForTransaction.js.map +1 -0
  310. package/lib-es/bridge/getTransactionStatus.d.ts +5 -0
  311. package/lib-es/bridge/getTransactionStatus.d.ts.map +1 -0
  312. package/lib-es/bridge/getTransactionStatus.js +46 -0
  313. package/lib-es/bridge/getTransactionStatus.js.map +1 -0
  314. package/lib-es/bridge/index.d.ts +8 -0
  315. package/lib-es/bridge/index.d.ts.map +1 -0
  316. package/lib-es/bridge/index.js +47 -0
  317. package/lib-es/bridge/index.js.map +1 -0
  318. package/lib-es/bridge/logic.d.ts +24 -0
  319. package/lib-es/bridge/logic.d.ts.map +1 -0
  320. package/lib-es/bridge/logic.js +183 -0
  321. package/lib-es/bridge/logic.js.map +1 -0
  322. package/lib-es/bridge/prepareTransaction.d.ts +5 -0
  323. package/lib-es/bridge/prepareTransaction.d.ts.map +1 -0
  324. package/lib-es/bridge/prepareTransaction.js +39 -0
  325. package/lib-es/bridge/prepareTransaction.js.map +1 -0
  326. package/lib-es/bridge/signOperation.d.ts +11 -0
  327. package/lib-es/bridge/signOperation.d.ts.map +1 -0
  328. package/lib-es/bridge/signOperation.js +70 -0
  329. package/lib-es/bridge/signOperation.js.map +1 -0
  330. package/lib-es/bridge/synchronisation.d.ts +3 -0
  331. package/lib-es/bridge/synchronisation.d.ts.map +1 -0
  332. package/lib-es/bridge/synchronisation.js +49 -0
  333. package/lib-es/bridge/synchronisation.js.map +1 -0
  334. package/lib-es/bridge/transaction.d.ts +15 -0
  335. package/lib-es/bridge/transaction.d.ts.map +1 -0
  336. package/lib-es/bridge/transaction.js +31 -0
  337. package/lib-es/bridge/transaction.js.map +1 -0
  338. package/lib-es/constants.d.ts +19 -0
  339. package/lib-es/constants.d.ts.map +1 -0
  340. package/lib-es/constants.js +30 -0
  341. package/lib-es/constants.js.map +1 -0
  342. package/lib-es/errors.d.ts +10 -0
  343. package/lib-es/errors.d.ts.map +1 -0
  344. package/lib-es/errors.js +5 -0
  345. package/lib-es/errors.js.map +1 -0
  346. package/lib-es/index.d.ts +3 -0
  347. package/lib-es/index.d.ts.map +1 -0
  348. package/lib-es/index.js +3 -0
  349. package/lib-es/index.js.map +1 -0
  350. package/lib-es/network/index.d.ts +6 -0
  351. package/lib-es/network/index.d.ts.map +1 -0
  352. package/lib-es/network/index.js +35 -0
  353. package/lib-es/network/index.js.map +1 -0
  354. package/lib-es/signer/index.d.ts +6 -0
  355. package/lib-es/signer/index.d.ts.map +1 -0
  356. package/lib-es/signer/index.js +21 -0
  357. package/lib-es/signer/index.js.map +1 -0
  358. package/lib-es/test/bot-specs.d.ts +7 -0
  359. package/lib-es/test/bot-specs.d.ts.map +1 -0
  360. package/lib-es/test/bot-specs.js +72 -0
  361. package/lib-es/test/bot-specs.js.map +1 -0
  362. package/lib-es/test/bridgeDatasetTest.d.ts +4 -0
  363. package/lib-es/test/bridgeDatasetTest.d.ts.map +1 -0
  364. package/lib-es/test/bridgeDatasetTest.js +79 -0
  365. package/lib-es/test/bridgeDatasetTest.js.map +1 -0
  366. package/lib-es/test/cli.d.ts +19 -0
  367. package/lib-es/test/cli.d.ts.map +1 -0
  368. package/lib-es/test/cli.js +53 -0
  369. package/lib-es/test/cli.js.map +1 -0
  370. package/lib-es/test/index.d.ts +4 -0
  371. package/lib-es/test/index.d.ts.map +1 -0
  372. package/lib-es/test/index.js +4 -0
  373. package/lib-es/test/index.js.map +1 -0
  374. package/lib-es/test/speculos-deviceActions.d.ts +5 -0
  375. package/lib-es/test/speculos-deviceActions.d.ts.map +1 -0
  376. package/lib-es/test/speculos-deviceActions.js +43 -0
  377. package/lib-es/test/speculos-deviceActions.js.map +1 -0
  378. package/lib-es/types/bridge.d.ts +5 -0
  379. package/lib-es/types/bridge.d.ts.map +1 -0
  380. package/lib-es/types/bridge.js +6 -0
  381. package/lib-es/types/bridge.js.map +1 -0
  382. package/lib-es/types/index.d.ts +62 -0
  383. package/lib-es/types/index.d.ts.map +1 -0
  384. package/lib-es/types/index.js +3 -0
  385. package/lib-es/types/index.js.map +1 -0
  386. package/lib-es/types/signer.d.ts +27 -0
  387. package/lib-es/types/signer.d.ts.map +1 -0
  388. package/lib-es/types/signer.js +2 -0
  389. package/lib-es/types/signer.js.map +1 -0
  390. package/package.json +124 -0
  391. package/src/__tests__/api/index.test.ts +499 -0
  392. package/src/__tests__/bridge/broadcast.test.ts +98 -0
  393. package/src/__tests__/bridge/buildTransaction.test.ts +61 -0
  394. package/src/__tests__/bridge/createTransaction.test.ts +27 -0
  395. package/src/__tests__/bridge/deviceTransactionConfig.test.ts +19 -0
  396. package/src/__tests__/bridge/estimateMaxSpendable.test.ts +94 -0
  397. package/src/__tests__/bridge/getFeesForTransaction.test.ts +189 -0
  398. package/src/__tests__/bridge/getTransactionStatus.test.ts +155 -0
  399. package/src/__tests__/bridge/index.test.ts +108 -0
  400. package/src/__tests__/bridge/logic.test.ts +876 -0
  401. package/src/__tests__/bridge/prepareTransaction.test.ts +118 -0
  402. package/src/__tests__/bridge/signOperation.test.ts +178 -0
  403. package/src/__tests__/bridge/synchronisation.test.ts +374 -0
  404. package/src/__tests__/bridge/transaction.test.ts +261 -0
  405. package/src/__tests__/errors.test.ts +25 -0
  406. package/src/__tests__/index.test.ts +26 -0
  407. package/src/__tests__/network/index.test.ts +95 -0
  408. package/src/__tests__/signer/index.test.ts +24 -0
  409. package/src/api/graphql/queries.ts +53 -0
  410. package/src/api/graphql/types.ts +85 -0
  411. package/src/api/index.ts +224 -0
  412. package/src/bridge/bridge.fixture.ts +53 -0
  413. package/src/bridge/broadcast.ts +17 -0
  414. package/src/bridge/buildTransaction.ts +29 -0
  415. package/src/bridge/createTransaction.ts +17 -0
  416. package/src/bridge/deviceTransactionConfig.ts +30 -0
  417. package/src/bridge/estimateMaxSpendable.ts +35 -0
  418. package/src/bridge/getFeesForTransaction.ts +87 -0
  419. package/src/bridge/getTransactionStatus.ts +54 -0
  420. package/src/bridge/index.ts +65 -0
  421. package/src/bridge/logic.ts +265 -0
  422. package/src/bridge/prepareTransaction.ts +55 -0
  423. package/src/bridge/signOperation.ts +82 -0
  424. package/src/bridge/synchronisation.ts +50 -0
  425. package/src/bridge/transaction.ts +61 -0
  426. package/src/constants.ts +34 -0
  427. package/src/errors.ts +7 -0
  428. package/src/index.ts +3 -0
  429. package/src/network/index.ts +54 -0
  430. package/src/signer/index.ts +17 -0
  431. package/src/test/bot-specs.ts +86 -0
  432. package/src/test/bridgeDatasetTest.ts +82 -0
  433. package/src/test/cli.ts +80 -0
  434. package/src/test/index.ts +3 -0
  435. package/src/test/speculos-deviceActions.ts +52 -0
  436. package/src/types/bridge.ts +4 -0
  437. package/src/types/index.ts +74 -0
  438. package/src/types/signer.ts +26 -0
  439. package/tsconfig.json +14 -0
@@ -0,0 +1,261 @@
1
+ import BigNumber from "bignumber.js";
2
+ import { createFixtureAccount, createFixtureTransaction } from "../../bridge/bridge.fixture";
3
+ import { formatTransaction, fromTransactionRaw, toTransactionRaw } from "../../bridge/transaction";
4
+ import { Transaction, TransactionRaw } from "../../types";
5
+
6
+ describe("transaction Test", () => {
7
+ describe("when formatTransaction", () => {
8
+ describe("when amount is 0 and fee is 0", () => {
9
+ it("should return a transaction SEND to 0xff00 with fees=?", async () => {
10
+ const account = createFixtureAccount();
11
+ const transaction = createFixtureTransaction();
12
+
13
+ transaction.recipient = "0xff00";
14
+ const result = formatTransaction(transaction, account);
15
+
16
+ const expected = `
17
+ SEND
18
+ TO 0xff00
19
+ with fees=?`;
20
+
21
+ expect(result).toBe(expected);
22
+ });
23
+ });
24
+
25
+ describe("when amount is 0 and fee is 0.0001", () => {
26
+ it("should return a transaction SEND to 0xff00 with fees=0", async () => {
27
+ const account = createFixtureAccount();
28
+ const transaction = createFixtureTransaction();
29
+
30
+ transaction.recipient = "0xff00";
31
+ transaction.fees = BigNumber("0.0001");
32
+ const result = formatTransaction(transaction, account);
33
+
34
+ const expected = `
35
+ SEND
36
+ TO 0xff00
37
+ with fees=0`;
38
+
39
+ expect(result).toBe(expected);
40
+ });
41
+ });
42
+
43
+ describe("when amount is 0 and fee is 0.1", () => {
44
+ it("should return a transaction SEND to 0xff00 with fees=0", async () => {
45
+ const account = createFixtureAccount();
46
+ const transaction = createFixtureTransaction();
47
+
48
+ transaction.recipient = "0xff00";
49
+ transaction.fees = BigNumber("0.1");
50
+ const result = formatTransaction(transaction, account);
51
+
52
+ const expected = `
53
+ SEND
54
+ TO 0xff00
55
+ with fees=0`;
56
+
57
+ expect(result).toBe(expected);
58
+ });
59
+ });
60
+
61
+ describe("when amount is 1 and fee is 0.1", () => {
62
+ it("should return a transaction SEND to 0xff00 with fees=0", async () => {
63
+ const account = createFixtureAccount();
64
+ const transaction = createFixtureTransaction();
65
+
66
+ transaction.amount = BigNumber("1");
67
+ transaction.recipient = "0xff00";
68
+ transaction.fees = BigNumber("0.1");
69
+ const result = formatTransaction(transaction, account);
70
+
71
+ const expected = `
72
+ SEND 0.00000001
73
+ TO 0xff00
74
+ with fees=0`;
75
+
76
+ expect(result).toBe(expected);
77
+ });
78
+ });
79
+
80
+ describe("when amount is 10 and fee is 1", () => {
81
+ it("should return a transaction SEND to 0xff00 with fees=0", async () => {
82
+ const account = createFixtureAccount();
83
+ const transaction = createFixtureTransaction();
84
+
85
+ transaction.amount = BigNumber("10");
86
+ transaction.recipient = "0xff00";
87
+ transaction.fees = BigNumber("1");
88
+ const result = formatTransaction(transaction, account);
89
+
90
+ const expected = `
91
+ SEND 0.0000001
92
+ TO 0xff00
93
+ with fees=0.00000001`;
94
+
95
+ expect(result).toBe(expected);
96
+ });
97
+ });
98
+
99
+ describe("when amount is 1000 and fee is 1", () => {
100
+ it("should return a transaction SEND to 0xff00 with fees=0", async () => {
101
+ const account = createFixtureAccount();
102
+ const transaction = createFixtureTransaction();
103
+
104
+ transaction.amount = BigNumber("1000");
105
+ transaction.recipient = "0xff00";
106
+ transaction.fees = BigNumber("1");
107
+ const result = formatTransaction(transaction, account);
108
+
109
+ const expected = `
110
+ SEND 0.00001
111
+ TO 0xff00
112
+ with fees=0.00000001`;
113
+
114
+ expect(result).toBe(expected);
115
+ });
116
+ });
117
+
118
+ describe("when using MAX with amount is 1000 and fee is 1", () => {
119
+ it("should return a transaction SEND to 0xff00 with fees=0", async () => {
120
+ const account = createFixtureAccount();
121
+ const transaction = createFixtureTransaction();
122
+
123
+ transaction.amount = BigNumber("1000");
124
+ transaction.useAllAmount = true;
125
+ transaction.recipient = "0xff00";
126
+ transaction.fees = BigNumber("1");
127
+ const result = formatTransaction(transaction, account);
128
+
129
+ const expected = `
130
+ SEND MAX
131
+ TO 0xff00
132
+ with fees=0.00000001`;
133
+
134
+ expect(result).toBe(expected);
135
+ });
136
+ });
137
+ });
138
+
139
+ describe("when fromTransactionRaw", () => {
140
+ it("should return the transaction object", () => {
141
+ const txRaw = {
142
+ family: "aptos",
143
+ mode: "send",
144
+ options: "{}",
145
+ amount: "0.5",
146
+ recipient: "0xff00",
147
+ useAllAmount: false,
148
+ subAccountId: "0xff01",
149
+ recipientDomain: {},
150
+ } as TransactionRaw;
151
+
152
+ const result = fromTransactionRaw(txRaw);
153
+
154
+ const expected = {
155
+ family: "aptos",
156
+ amount: BigNumber("0.5"),
157
+ options: {},
158
+ mode: "send",
159
+ recipient: "0xff00",
160
+ recipientDomain: {},
161
+ subAccountId: "0xff01",
162
+ useAllAmount: false,
163
+ };
164
+
165
+ expect(result).toEqual(expected);
166
+ });
167
+
168
+ it("should return the transaction object with fees and errors", () => {
169
+ const txRaw = {
170
+ family: "aptos",
171
+ mode: "send",
172
+ fees: "50",
173
+ errors: '{ "errors": "error" }',
174
+ options: "{}",
175
+ amount: "0.5",
176
+ recipient: "0xff00",
177
+ useAllAmount: false,
178
+ subAccountId: "0xff01",
179
+ recipientDomain: {},
180
+ } as TransactionRaw;
181
+
182
+ const result = fromTransactionRaw(txRaw);
183
+
184
+ const expected = {
185
+ family: "aptos",
186
+ amount: BigNumber("0.5"),
187
+ fees: BigNumber(50),
188
+ errors: { errors: "error" },
189
+ options: {},
190
+ mode: "send",
191
+ recipient: "0xff00",
192
+ recipientDomain: {},
193
+ subAccountId: "0xff01",
194
+ useAllAmount: false,
195
+ };
196
+
197
+ expect(result).toEqual(expected);
198
+ });
199
+ });
200
+
201
+ describe("when toTransactionRaw", () => {
202
+ it("should return the raw transaction object", () => {
203
+ const tx = {
204
+ family: "aptos",
205
+ amount: BigNumber("0.5"),
206
+ options: {},
207
+ mode: "send",
208
+ recipient: "0xff00",
209
+ recipientDomain: {},
210
+ subAccountId: "0xff01",
211
+ useAllAmount: false,
212
+ } as Transaction;
213
+
214
+ const result = toTransactionRaw(tx);
215
+
216
+ const expected = {
217
+ family: "aptos",
218
+ mode: "send",
219
+ fees: null,
220
+ options: "{}",
221
+ amount: "0.5",
222
+ recipient: "0xff00",
223
+ useAllAmount: false,
224
+ subAccountId: "0xff01",
225
+ recipientDomain: {},
226
+ } as TransactionRaw;
227
+
228
+ expect(result).toEqual(expected);
229
+ });
230
+
231
+ it("should return the raw transaction object with fees", () => {
232
+ const tx = {
233
+ family: "aptos",
234
+ amount: BigNumber("0.5"),
235
+ options: {},
236
+ fees: BigNumber("0.1"),
237
+ mode: "send",
238
+ recipient: "0xff00",
239
+ recipientDomain: {},
240
+ subAccountId: "0xff01",
241
+ useAllAmount: false,
242
+ } as Transaction;
243
+
244
+ const result = toTransactionRaw(tx);
245
+
246
+ const expected = {
247
+ family: "aptos",
248
+ mode: "send",
249
+ fees: "0.1",
250
+ options: "{}",
251
+ amount: "0.5",
252
+ recipient: "0xff00",
253
+ useAllAmount: false,
254
+ subAccountId: "0xff01",
255
+ recipientDomain: {},
256
+ } as TransactionRaw;
257
+
258
+ expect(result).toEqual(expected);
259
+ });
260
+ });
261
+ });
@@ -0,0 +1,25 @@
1
+ import {
2
+ SequenceNumberTooOldError,
3
+ SequenceNumberTooNewError,
4
+ TransactionExpiredError,
5
+ } from "../errors";
6
+
7
+ describe("APTOS errors", () => {
8
+ it("should create the SequenceNumberTooOldError error", () => {
9
+ const error = new SequenceNumberTooOldError();
10
+
11
+ expect(error).toBeInstanceOf(Error);
12
+ });
13
+
14
+ it("should create the SequenceNumberTooNewError error", () => {
15
+ const error = new SequenceNumberTooNewError();
16
+
17
+ expect(error).toBeInstanceOf(Error);
18
+ });
19
+
20
+ it("should create the TransactionExpiredError error", () => {
21
+ const error = new TransactionExpiredError();
22
+
23
+ expect(error).toBeInstanceOf(Error);
24
+ });
25
+ });
@@ -0,0 +1,26 @@
1
+ jest.mock("@ledgerhq/coin-framework/bridge/getAddressWrapper", () => jest.fn());
2
+ jest.mock("@ledgerhq/coin-framework/signer", () => jest.fn());
3
+ jest.mock("@ledgerhq/types-live", () => jest.fn());
4
+ jest.mock("@ledgerhq/coin-framework/bridge/jsHelpers", () => ({
5
+ makeAccountBridgeReceive: jest.fn(),
6
+ makeScanAccounts: jest.fn(),
7
+ getSerializedAddressParameters: jest.fn(),
8
+ makeSync: jest.fn(),
9
+ }));
10
+ jest.mock("../signer", () => jest.fn());
11
+ jest.mock("../types", () => jest.fn());
12
+ jest.mock("../bridge/getTransactionStatus", () => jest.fn());
13
+ jest.mock("../bridge/estimateMaxSpendable", () => jest.fn());
14
+ jest.mock("../bridge/prepareTransaction", () => jest.fn());
15
+ jest.mock("../bridge/createTransaction", () => jest.fn());
16
+ jest.mock("../bridge/synchronisation", () => jest.fn());
17
+ jest.mock("../bridge/signOperation", () => jest.fn());
18
+ jest.mock("../bridge/broadcast", () => jest.fn());
19
+
20
+ import { createBridges } from "../bridge";
21
+
22
+ describe("APTOS index", () => {
23
+ it("should export a function createBridges", () => {
24
+ expect(typeof createBridges).toBe("function");
25
+ });
26
+ });
@@ -0,0 +1,95 @@
1
+ import { signTransaction } from "../../network";
2
+ import { createFixtureAccount } from "../../bridge/bridge.fixture";
3
+ import {
4
+ AccountAddress,
5
+ ChainId,
6
+ RawTransaction,
7
+ Serializable,
8
+ generateSigningMessageForTransaction,
9
+ generateSignedTransaction,
10
+ } from "@aptos-labs/ts-sdk";
11
+
12
+ jest.mock("@aptos-labs/ts-sdk", () => {
13
+ const originalModule = jest.requireActual("@aptos-labs/ts-sdk");
14
+ const partialMockedModule = Object.keys(originalModule).reduce(
15
+ (pre: { [key: string]: jest.Mock }, methodName) => {
16
+ pre[methodName] = jest.fn();
17
+ return pre;
18
+ },
19
+ {} as { [key: string]: jest.Mock },
20
+ );
21
+ return {
22
+ ...partialMockedModule,
23
+ // mock all except these
24
+ AccountAddress: originalModule.AccountAddress,
25
+ Hex: originalModule.Hex,
26
+ };
27
+ });
28
+ let mockedGenerateSigningMessageForTransaction: jest.Mocked<any>;
29
+ let mockedGenerateSignedTransaction: jest.Mocked<any>;
30
+
31
+ describe("signTransaction", () => {
32
+ beforeAll(() => {
33
+ mockedGenerateSigningMessageForTransaction = jest.mocked(generateSigningMessageForTransaction);
34
+ mockedGenerateSignedTransaction = jest.mocked(generateSignedTransaction);
35
+ });
36
+
37
+ afterEach(() => {
38
+ jest.resetAllMocks();
39
+ });
40
+
41
+ it("should throw an error", async () => {
42
+ mockedGenerateSigningMessageForTransaction.mockReturnValue("signingMessage");
43
+
44
+ const mockGenerateSignedTransactionSpy = jest.spyOn(
45
+ { generateSignedTransaction: mockedGenerateSignedTransaction },
46
+ "generateSignedTransaction",
47
+ );
48
+
49
+ const signerContext = jest.fn().mockImplementation(() => ({ signature: "0x7aa193705193f4" }));
50
+ const account = createFixtureAccount();
51
+ const deviceId = "nanoX";
52
+ const rawTxn = new RawTransaction(
53
+ new AccountAddress(Uint8Array.from(Buffer.from("thisaddressmustbe32byteslooooong"))),
54
+ BigInt(1),
55
+ "" as unknown as Serializable,
56
+ BigInt(100),
57
+ BigInt(50),
58
+ BigInt(1),
59
+ { chainId: 1 } as ChainId,
60
+ );
61
+
62
+ expect(signTransaction(signerContext, account, deviceId, rawTxn)).rejects.toThrow(
63
+ "Account must have a public signing key",
64
+ );
65
+
66
+ expect(mockGenerateSignedTransactionSpy).toHaveBeenCalledTimes(0);
67
+ });
68
+
69
+ it("should sign a transaction", async () => {
70
+ mockedGenerateSigningMessageForTransaction.mockReturnValue("signingMessage");
71
+
72
+ const mockGenerateSignedTransactionSpy = jest.spyOn(
73
+ { generateSignedTransaction: mockedGenerateSignedTransaction },
74
+ "generateSignedTransaction",
75
+ );
76
+
77
+ const signerContext = jest.fn().mockImplementation(() => ({ signature: "0x7aa193705193f4" }));
78
+ const account = createFixtureAccount();
79
+ account.xpub = "0xb69a68cc64f7aa193705193f4dd598320a0a74baf7e4b50c9980c5bd60a82390";
80
+ const deviceId = "nanoX";
81
+ const rawTxn = new RawTransaction(
82
+ AccountAddress.fromString(account.xpub),
83
+ BigInt(1),
84
+ "" as unknown as Serializable,
85
+ BigInt(100),
86
+ BigInt(50),
87
+ BigInt(1),
88
+ { chainId: 1 } as ChainId,
89
+ );
90
+
91
+ await signTransaction(signerContext, account, deviceId, rawTxn);
92
+
93
+ expect(mockGenerateSignedTransactionSpy).toHaveBeenCalledTimes(1);
94
+ });
95
+ });
@@ -0,0 +1,24 @@
1
+ import { getCryptoCurrencyById } from "@ledgerhq/cryptoassets/currencies";
2
+ import resolver from "../../signer";
3
+
4
+ describe("aptos signer", () => {
5
+ test("getAddress", async () => {
6
+ const getAddress = resolver(
7
+ async () =>
8
+ ({
9
+ address: "address",
10
+ publicKey: Buffer.from("publicKey"),
11
+ }) as any,
12
+ );
13
+ const result = await getAddress("deviceId", {
14
+ path: "path",
15
+ currency: getCryptoCurrencyById("aptos"),
16
+ derivationMode: "",
17
+ });
18
+ expect(result).toMatchObject({
19
+ address: "address",
20
+ publicKey: "7075626c69634b6579",
21
+ path: "path",
22
+ });
23
+ });
24
+ });
@@ -0,0 +1,53 @@
1
+ import { gql } from "@apollo/client";
2
+
3
+ export const GetDelegatedStakingActivities = gql`
4
+ query getDelegatedStakingActivities($delegatorAddress: String) {
5
+ delegated_staking_activities(
6
+ where: { delegator_address: { _eq: $delegatorAddress } }
7
+ order_by: { transaction_version: asc }
8
+ ) {
9
+ amount
10
+ delegator_address
11
+ event_index
12
+ event_type
13
+ pool_address
14
+ transaction_version
15
+ }
16
+ }
17
+ `;
18
+ export const GetAccountTransactionsData = gql`
19
+ query GetAccountTransactionsData($address: String, $limit: Int) {
20
+ address_version_from_move_resources(
21
+ where: { address: { _eq: $address } }
22
+ order_by: { transaction_version: desc }
23
+ limit: $limit
24
+ ) {
25
+ transaction_version
26
+ __typename
27
+ }
28
+ }
29
+ `;
30
+ export const GetAccountTransactionsDataGt = gql`
31
+ query GetAccountTransactionsDataGt($address: String, $limit: Int, $gt: bigint) {
32
+ address_version_from_move_resources(
33
+ where: { address: { _eq: $address }, transaction_version: { _gt: $gt } }
34
+ order_by: { transaction_version: desc }
35
+ limit: $limit
36
+ ) {
37
+ transaction_version
38
+ __typename
39
+ }
40
+ }
41
+ `;
42
+ export const GetAccountTransactionsDataLt = gql`
43
+ query GetAccountTransactionsDataLt($address: String, $limit: Int, $lt: bigint) {
44
+ address_version_from_move_resources(
45
+ where: { address: { _eq: $address }, transaction_version: { _lt: $lt } }
46
+ order_by: { transaction_version: desc }
47
+ limit: $limit
48
+ ) {
49
+ transaction_version
50
+ __typename
51
+ }
52
+ }
53
+ `;
@@ -0,0 +1,85 @@
1
+ export type Maybe<T> = T | null;
2
+ export type InputMaybe<T> = Maybe<T>;
3
+ export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
4
+ /** All built-in and custom scalars, mapped to their actual values */
5
+ export type Scalars = {
6
+ ID: string;
7
+ String: string;
8
+ Boolean: boolean;
9
+ Int: number;
10
+ Float: number;
11
+ bigint: any;
12
+ jsonb: any;
13
+ numeric: any;
14
+ timestamp: any;
15
+ timestamptz: any;
16
+ };
17
+
18
+ export type GetAccountTransactionsDataQueryVariables = Exact<{
19
+ address?: InputMaybe<Scalars["String"]>;
20
+ limit?: InputMaybe<Scalars["Int"]>;
21
+ }>;
22
+
23
+ export type GetAccountTransactionsDataQuery = {
24
+ __typename?: "query_root";
25
+ address_version_from_move_resources: Array<{
26
+ __typename: "address_version_from_move_resources";
27
+ transaction_version?: any | null;
28
+ }>;
29
+ };
30
+
31
+ export type GetAccountTransactionsDataGtQueryVariables = Exact<{
32
+ address?: InputMaybe<Scalars["String"]>;
33
+ limit?: InputMaybe<Scalars["Int"]>;
34
+ gt?: InputMaybe<Scalars["bigint"]>;
35
+ }>;
36
+
37
+ export type GetAccountTransactionsDataGtQuery = {
38
+ __typename?: "query_root";
39
+ address_version_from_move_resources: Array<{
40
+ __typename: "address_version_from_move_resources";
41
+ transaction_version?: any | null;
42
+ }>;
43
+ };
44
+
45
+ export type GetAccountTransactionsDataLtQueryVariables = Exact<{
46
+ address?: InputMaybe<Scalars["String"]>;
47
+ limit?: InputMaybe<Scalars["Int"]>;
48
+ lt?: InputMaybe<Scalars["bigint"]>;
49
+ }>;
50
+
51
+ export type GetAccountTransactionsDataLtQuery = {
52
+ __typename?: "query_root";
53
+ address_version_from_move_resources: Array<{
54
+ __typename: "address_version_from_move_resources";
55
+ transaction_version?: any | null;
56
+ }>;
57
+ };
58
+
59
+ export type DelegatedStakingActivity = {
60
+ amount: number;
61
+ delegator_address: string;
62
+ event_index: number;
63
+ event_type: string;
64
+ pool_address: string;
65
+ transaction_version: bigint;
66
+ };
67
+
68
+ export type GetDelegatedStakingActivitiesQuery = {
69
+ delegated_staking_activities: Array<DelegatedStakingActivity>;
70
+ };
71
+
72
+ export type PartitionedDelegatedStakingActivities = Record<string, DelegatedStakingActivity[]>;
73
+
74
+ export type StakePrincipals = {
75
+ activePrincipals: number;
76
+ pendingInactivePrincipals: number;
77
+ };
78
+
79
+ export type StakeDetails = {
80
+ active: number;
81
+ inactive: number;
82
+ pendingInactive: number;
83
+ canWithdrawPendingInactive: boolean;
84
+ poolAddress: string;
85
+ };