@ledgerhq/coin-aptos 2.0.0 → 2.1.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 (390) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/lib/__tests__/api/craftTransaction.unit.test.d.ts +2 -0
  3. package/lib/__tests__/api/craftTransaction.unit.test.d.ts.map +1 -0
  4. package/lib/__tests__/api/craftTransaction.unit.test.js +187 -0
  5. package/lib/__tests__/api/craftTransaction.unit.test.js.map +1 -0
  6. package/lib/__tests__/api/getBalance.unit.test.d.ts +2 -0
  7. package/lib/__tests__/api/getBalance.unit.test.d.ts.map +1 -0
  8. package/lib/__tests__/api/getBalance.unit.test.js +41 -0
  9. package/lib/__tests__/api/getBalance.unit.test.js.map +1 -0
  10. package/lib/__tests__/api/index.integ.test.js +276 -9
  11. package/lib/__tests__/api/index.integ.test.js.map +1 -1
  12. package/lib/__tests__/api/index.test.js +1 -1
  13. package/lib/__tests__/api/index.test.js.map +1 -1
  14. package/lib/__tests__/bridge/logic.test.js +8 -558
  15. package/lib/__tests__/bridge/logic.test.js.map +1 -1
  16. package/lib/__tests__/bridge/signOperation.test.js +7 -11
  17. package/lib/__tests__/bridge/signOperation.test.js.map +1 -1
  18. package/lib/__tests__/index.test.js +1 -1
  19. package/lib/__tests__/index.test.js.map +1 -1
  20. package/lib/__tests__/logic/buildTransaction.test.d.ts.map +1 -0
  21. package/lib/__tests__/{bridge → logic}/buildTransaction.test.js +14 -8
  22. package/lib/__tests__/logic/buildTransaction.test.js.map +1 -0
  23. package/lib/__tests__/logic/calculateAmount.unit.test.d.ts +2 -0
  24. package/lib/__tests__/logic/calculateAmount.unit.test.d.ts.map +1 -0
  25. package/lib/__tests__/logic/calculateAmount.unit.test.js +45 -0
  26. package/lib/__tests__/logic/calculateAmount.unit.test.js.map +1 -0
  27. package/lib/__tests__/logic/combine.unit.test.d.ts +2 -0
  28. package/lib/__tests__/logic/combine.unit.test.d.ts.map +1 -0
  29. package/lib/__tests__/logic/combine.unit.test.js +47 -0
  30. package/lib/__tests__/logic/combine.unit.test.js.map +1 -0
  31. package/lib/__tests__/logic/compareAddress.unit.test.d.ts +2 -0
  32. package/lib/__tests__/logic/compareAddress.unit.test.d.ts.map +1 -0
  33. package/lib/__tests__/logic/compareAddress.unit.test.js +26 -0
  34. package/lib/__tests__/logic/compareAddress.unit.test.js.map +1 -0
  35. package/lib/__tests__/logic/createTransaction.test.d.ts.map +1 -0
  36. package/lib/__tests__/{bridge → logic}/createTransaction.test.js +1 -1
  37. package/lib/__tests__/logic/createTransaction.test.js.map +1 -0
  38. package/lib/__tests__/logic/getCoinAndAmounts.unit.test.d.ts +2 -0
  39. package/lib/__tests__/logic/getCoinAndAmounts.unit.test.d.ts.map +1 -0
  40. package/lib/__tests__/logic/getCoinAndAmounts.unit.test.js +186 -0
  41. package/lib/__tests__/logic/getCoinAndAmounts.unit.test.js.map +1 -0
  42. package/lib/__tests__/logic/getFunctionAddress.unit.test.d.ts +2 -0
  43. package/lib/__tests__/logic/getFunctionAddress.unit.test.d.ts.map +1 -0
  44. package/lib/__tests__/logic/getFunctionAddress.unit.test.js +29 -0
  45. package/lib/__tests__/logic/getFunctionAddress.unit.test.js.map +1 -0
  46. package/lib/__tests__/logic/getResourceAddress.unit.test.d.ts +2 -0
  47. package/lib/__tests__/logic/getResourceAddress.unit.test.d.ts.map +1 -0
  48. package/lib/__tests__/logic/getResourceAddress.unit.test.js +218 -0
  49. package/lib/__tests__/logic/getResourceAddress.unit.test.js.map +1 -0
  50. package/lib/__tests__/logic/isTestnet.unit.test.d.ts +2 -0
  51. package/lib/__tests__/logic/isTestnet.unit.test.d.ts.map +1 -0
  52. package/lib/__tests__/logic/isTestnet.unit.test.js +12 -0
  53. package/lib/__tests__/logic/isTestnet.unit.test.js.map +1 -0
  54. package/lib/__tests__/logic/normalizeAddress.unit.test.d.ts +2 -0
  55. package/lib/__tests__/logic/normalizeAddress.unit.test.d.ts.map +1 -0
  56. package/lib/__tests__/logic/normalizeAddress.unit.test.js +12 -0
  57. package/lib/__tests__/logic/normalizeAddress.unit.test.js.map +1 -0
  58. package/lib/__tests__/logic/processRecipients.unit.test.d.ts +2 -0
  59. package/lib/__tests__/logic/processRecipients.unit.test.d.ts.map +1 -0
  60. package/lib/__tests__/logic/processRecipients.unit.test.js +79 -0
  61. package/lib/__tests__/logic/processRecipients.unit.test.js.map +1 -0
  62. package/lib/__tests__/network/client.test.js +613 -9
  63. package/lib/__tests__/network/client.test.js.map +1 -1
  64. package/lib/api/index.d.ts.map +1 -1
  65. package/lib/api/index.js +7 -12
  66. package/lib/api/index.js.map +1 -1
  67. package/lib/bridge/estimateMaxSpendable.d.ts.map +1 -1
  68. package/lib/bridge/estimateMaxSpendable.js.map +1 -1
  69. package/lib/bridge/getFeesForTransaction.d.ts.map +1 -1
  70. package/lib/bridge/getFeesForTransaction.js +1 -1
  71. package/lib/bridge/getFeesForTransaction.js.map +1 -1
  72. package/lib/bridge/index.js +1 -1
  73. package/lib/bridge/index.js.map +1 -1
  74. package/lib/bridge/logic.d.ts +1 -17
  75. package/lib/bridge/logic.d.ts.map +1 -1
  76. package/lib/bridge/logic.js +12 -204
  77. package/lib/bridge/logic.js.map +1 -1
  78. package/lib/bridge/prepareTransaction.js +1 -1
  79. package/lib/bridge/prepareTransaction.js.map +1 -1
  80. package/lib/bridge/signOperation.d.ts.map +1 -1
  81. package/lib/bridge/signOperation.js +1 -1
  82. package/lib/bridge/signOperation.js.map +1 -1
  83. package/lib/config.d.ts +1 -1
  84. package/lib/config.d.ts.map +1 -1
  85. package/lib/constants.d.ts +7 -4
  86. package/lib/constants.d.ts.map +1 -1
  87. package/lib/constants.js +8 -4
  88. package/lib/constants.js.map +1 -1
  89. package/lib/logic/buildTransaction.d.ts +9 -0
  90. package/lib/logic/buildTransaction.d.ts.map +1 -0
  91. package/lib/logic/buildTransaction.js +47 -0
  92. package/lib/logic/buildTransaction.js.map +1 -0
  93. package/lib/logic/calculateAmount.d.ts +3 -0
  94. package/lib/logic/calculateAmount.d.ts.map +1 -0
  95. package/lib/logic/calculateAmount.js +13 -0
  96. package/lib/logic/calculateAmount.js.map +1 -0
  97. package/lib/logic/combine.d.ts +4 -0
  98. package/lib/logic/combine.d.ts.map +1 -0
  99. package/lib/logic/combine.js +34 -0
  100. package/lib/logic/combine.js.map +1 -0
  101. package/lib/logic/craftTransaction.d.ts +5 -0
  102. package/lib/logic/craftTransaction.d.ts.map +1 -0
  103. package/lib/logic/craftTransaction.js +68 -0
  104. package/lib/logic/craftTransaction.js.map +1 -0
  105. package/lib/logic/createTransaction.d.ts.map +1 -0
  106. package/lib/logic/createTransaction.js.map +1 -0
  107. package/lib/logic/getBalance.d.ts +5 -0
  108. package/lib/logic/getBalance.d.ts.map +1 -0
  109. package/lib/logic/getBalance.js +12 -0
  110. package/lib/logic/getBalance.js.map +1 -0
  111. package/lib/logic/getCoinAndAmounts.d.ts +13 -0
  112. package/lib/logic/getCoinAndAmounts.d.ts.map +1 -0
  113. package/lib/logic/getCoinAndAmounts.js +112 -0
  114. package/lib/logic/getCoinAndAmounts.js.map +1 -0
  115. package/lib/logic/getFunctionAddress.d.ts +3 -0
  116. package/lib/logic/getFunctionAddress.d.ts.map +1 -0
  117. package/lib/logic/getFunctionAddress.js +12 -0
  118. package/lib/logic/getFunctionAddress.js.map +1 -0
  119. package/lib/logic/getResourceAddress.d.ts +4 -0
  120. package/lib/logic/getResourceAddress.d.ts.map +1 -0
  121. package/lib/logic/getResourceAddress.js +17 -0
  122. package/lib/logic/getResourceAddress.js.map +1 -0
  123. package/lib/logic/isTestnet.d.ts +2 -0
  124. package/lib/logic/isTestnet.d.ts.map +1 -0
  125. package/lib/logic/isTestnet.js +9 -0
  126. package/lib/logic/isTestnet.js.map +1 -0
  127. package/lib/logic/isWriteSetChangeWriteResource.d.ts +3 -0
  128. package/lib/logic/isWriteSetChangeWriteResource.d.ts.map +1 -0
  129. package/lib/logic/isWriteSetChangeWriteResource.js +8 -0
  130. package/lib/logic/isWriteSetChangeWriteResource.js.map +1 -0
  131. package/lib/logic/normalizeAddress.d.ts +2 -0
  132. package/lib/logic/normalizeAddress.d.ts.map +1 -0
  133. package/lib/logic/normalizeAddress.js +12 -0
  134. package/lib/logic/normalizeAddress.js.map +1 -0
  135. package/lib/logic/normalizeTransactionOptions.d.ts +3 -0
  136. package/lib/logic/normalizeTransactionOptions.d.ts.map +1 -0
  137. package/lib/logic/normalizeTransactionOptions.js +21 -0
  138. package/lib/logic/normalizeTransactionOptions.js.map +1 -0
  139. package/lib/logic/processRecipients.d.ts +6 -0
  140. package/lib/logic/processRecipients.d.ts.map +1 -0
  141. package/lib/logic/processRecipients.js +58 -0
  142. package/lib/logic/processRecipients.js.map +1 -0
  143. package/lib/logic/transactionsToOperations.d.ts +7 -0
  144. package/lib/logic/transactionsToOperations.d.ts.map +1 -0
  145. package/lib/logic/transactionsToOperations.js +89 -0
  146. package/lib/logic/transactionsToOperations.js.map +1 -0
  147. package/lib/network/client.d.ts +6 -4
  148. package/lib/network/client.d.ts.map +1 -1
  149. package/lib/network/client.js +50 -14
  150. package/lib/network/client.js.map +1 -1
  151. package/lib/network/index.d.ts.map +1 -1
  152. package/lib/network/index.js +4 -7
  153. package/lib/network/index.js.map +1 -1
  154. package/lib/types/assets.d.ts +5 -1
  155. package/lib/types/assets.d.ts.map +1 -1
  156. package/lib/types/index.d.ts +4 -0
  157. package/lib/types/index.d.ts.map +1 -1
  158. package/lib-es/__tests__/api/craftTransaction.unit.test.d.ts +2 -0
  159. package/lib-es/__tests__/api/craftTransaction.unit.test.d.ts.map +1 -0
  160. package/lib-es/__tests__/api/craftTransaction.unit.test.js +185 -0
  161. package/lib-es/__tests__/api/craftTransaction.unit.test.js.map +1 -0
  162. package/lib-es/__tests__/api/getBalance.unit.test.d.ts +2 -0
  163. package/lib-es/__tests__/api/getBalance.unit.test.d.ts.map +1 -0
  164. package/lib-es/__tests__/api/getBalance.unit.test.js +36 -0
  165. package/lib-es/__tests__/api/getBalance.unit.test.js.map +1 -0
  166. package/lib-es/__tests__/api/index.integ.test.js +277 -10
  167. package/lib-es/__tests__/api/index.integ.test.js.map +1 -1
  168. package/lib-es/__tests__/api/index.test.js +1 -1
  169. package/lib-es/__tests__/api/index.test.js.map +1 -1
  170. package/lib-es/__tests__/bridge/logic.test.js +8 -558
  171. package/lib-es/__tests__/bridge/logic.test.js.map +1 -1
  172. package/lib-es/__tests__/bridge/signOperation.test.js +7 -11
  173. package/lib-es/__tests__/bridge/signOperation.test.js.map +1 -1
  174. package/lib-es/__tests__/index.test.js +1 -1
  175. package/lib-es/__tests__/index.test.js.map +1 -1
  176. package/lib-es/__tests__/logic/buildTransaction.test.d.ts.map +1 -0
  177. package/lib-es/__tests__/{bridge → logic}/buildTransaction.test.js +11 -5
  178. package/lib-es/__tests__/logic/buildTransaction.test.js.map +1 -0
  179. package/lib-es/__tests__/logic/calculateAmount.unit.test.d.ts +2 -0
  180. package/lib-es/__tests__/logic/calculateAmount.unit.test.d.ts.map +1 -0
  181. package/lib-es/__tests__/logic/calculateAmount.unit.test.js +40 -0
  182. package/lib-es/__tests__/logic/calculateAmount.unit.test.js.map +1 -0
  183. package/lib-es/__tests__/logic/combine.unit.test.d.ts +2 -0
  184. package/lib-es/__tests__/logic/combine.unit.test.d.ts.map +1 -0
  185. package/lib-es/__tests__/logic/combine.unit.test.js +45 -0
  186. package/lib-es/__tests__/logic/combine.unit.test.js.map +1 -0
  187. package/lib-es/__tests__/logic/compareAddress.unit.test.d.ts +2 -0
  188. package/lib-es/__tests__/logic/compareAddress.unit.test.d.ts.map +1 -0
  189. package/lib-es/__tests__/logic/compareAddress.unit.test.js +24 -0
  190. package/lib-es/__tests__/logic/compareAddress.unit.test.js.map +1 -0
  191. package/lib-es/__tests__/logic/createTransaction.test.d.ts.map +1 -0
  192. package/lib-es/__tests__/{bridge → logic}/createTransaction.test.js +1 -1
  193. package/lib-es/__tests__/logic/createTransaction.test.js.map +1 -0
  194. package/lib-es/__tests__/logic/getCoinAndAmounts.unit.test.d.ts +2 -0
  195. package/lib-es/__tests__/logic/getCoinAndAmounts.unit.test.d.ts.map +1 -0
  196. package/lib-es/__tests__/logic/getCoinAndAmounts.unit.test.js +181 -0
  197. package/lib-es/__tests__/logic/getCoinAndAmounts.unit.test.js.map +1 -0
  198. package/lib-es/__tests__/logic/getFunctionAddress.unit.test.d.ts +2 -0
  199. package/lib-es/__tests__/logic/getFunctionAddress.unit.test.d.ts.map +1 -0
  200. package/lib-es/__tests__/logic/getFunctionAddress.unit.test.js +27 -0
  201. package/lib-es/__tests__/logic/getFunctionAddress.unit.test.js.map +1 -0
  202. package/lib-es/__tests__/logic/getResourceAddress.unit.test.d.ts +2 -0
  203. package/lib-es/__tests__/logic/getResourceAddress.unit.test.d.ts.map +1 -0
  204. package/lib-es/__tests__/logic/getResourceAddress.unit.test.js +216 -0
  205. package/lib-es/__tests__/logic/getResourceAddress.unit.test.js.map +1 -0
  206. package/lib-es/__tests__/logic/isTestnet.unit.test.d.ts +2 -0
  207. package/lib-es/__tests__/logic/isTestnet.unit.test.d.ts.map +1 -0
  208. package/lib-es/__tests__/logic/isTestnet.unit.test.js +10 -0
  209. package/lib-es/__tests__/logic/isTestnet.unit.test.js.map +1 -0
  210. package/lib-es/__tests__/logic/normalizeAddress.unit.test.d.ts +2 -0
  211. package/lib-es/__tests__/logic/normalizeAddress.unit.test.d.ts.map +1 -0
  212. package/lib-es/__tests__/logic/normalizeAddress.unit.test.js +10 -0
  213. package/lib-es/__tests__/logic/normalizeAddress.unit.test.js.map +1 -0
  214. package/lib-es/__tests__/logic/processRecipients.unit.test.d.ts +2 -0
  215. package/lib-es/__tests__/logic/processRecipients.unit.test.d.ts.map +1 -0
  216. package/lib-es/__tests__/logic/processRecipients.unit.test.js +74 -0
  217. package/lib-es/__tests__/logic/processRecipients.unit.test.js.map +1 -0
  218. package/lib-es/__tests__/network/client.test.js +614 -10
  219. package/lib-es/__tests__/network/client.test.js.map +1 -1
  220. package/lib-es/api/index.d.ts.map +1 -1
  221. package/lib-es/api/index.js +7 -12
  222. package/lib-es/api/index.js.map +1 -1
  223. package/lib-es/bridge/estimateMaxSpendable.d.ts.map +1 -1
  224. package/lib-es/bridge/estimateMaxSpendable.js.map +1 -1
  225. package/lib-es/bridge/getFeesForTransaction.d.ts.map +1 -1
  226. package/lib-es/bridge/getFeesForTransaction.js +1 -1
  227. package/lib-es/bridge/getFeesForTransaction.js.map +1 -1
  228. package/lib-es/bridge/index.js +1 -1
  229. package/lib-es/bridge/index.js.map +1 -1
  230. package/lib-es/bridge/logic.d.ts +1 -17
  231. package/lib-es/bridge/logic.d.ts.map +1 -1
  232. package/lib-es/bridge/logic.js +6 -187
  233. package/lib-es/bridge/logic.js.map +1 -1
  234. package/lib-es/bridge/prepareTransaction.js +1 -1
  235. package/lib-es/bridge/prepareTransaction.js.map +1 -1
  236. package/lib-es/bridge/signOperation.d.ts.map +1 -1
  237. package/lib-es/bridge/signOperation.js +1 -1
  238. package/lib-es/bridge/signOperation.js.map +1 -1
  239. package/lib-es/config.d.ts +1 -1
  240. package/lib-es/config.d.ts.map +1 -1
  241. package/lib-es/constants.d.ts +7 -4
  242. package/lib-es/constants.d.ts.map +1 -1
  243. package/lib-es/constants.js +7 -3
  244. package/lib-es/constants.js.map +1 -1
  245. package/lib-es/logic/buildTransaction.d.ts +9 -0
  246. package/lib-es/logic/buildTransaction.d.ts.map +1 -0
  247. package/lib-es/logic/buildTransaction.js +43 -0
  248. package/lib-es/logic/buildTransaction.js.map +1 -0
  249. package/lib-es/logic/calculateAmount.d.ts +3 -0
  250. package/lib-es/logic/calculateAmount.d.ts.map +1 -0
  251. package/lib-es/logic/calculateAmount.js +9 -0
  252. package/lib-es/logic/calculateAmount.js.map +1 -0
  253. package/lib-es/logic/combine.d.ts +4 -0
  254. package/lib-es/logic/combine.d.ts.map +1 -0
  255. package/lib-es/logic/combine.js +29 -0
  256. package/lib-es/logic/combine.js.map +1 -0
  257. package/lib-es/logic/craftTransaction.d.ts +5 -0
  258. package/lib-es/logic/craftTransaction.d.ts.map +1 -0
  259. package/lib-es/logic/craftTransaction.js +38 -0
  260. package/lib-es/logic/craftTransaction.js.map +1 -0
  261. package/lib-es/logic/createTransaction.d.ts.map +1 -0
  262. package/lib-es/logic/createTransaction.js.map +1 -0
  263. package/lib-es/logic/getBalance.d.ts +5 -0
  264. package/lib-es/logic/getBalance.d.ts.map +1 -0
  265. package/lib-es/logic/getBalance.js +8 -0
  266. package/lib-es/logic/getBalance.js.map +1 -0
  267. package/lib-es/logic/getCoinAndAmounts.d.ts +13 -0
  268. package/lib-es/logic/getCoinAndAmounts.d.ts.map +1 -0
  269. package/lib-es/logic/getCoinAndAmounts.js +101 -0
  270. package/lib-es/logic/getCoinAndAmounts.js.map +1 -0
  271. package/lib-es/logic/getFunctionAddress.d.ts +3 -0
  272. package/lib-es/logic/getFunctionAddress.d.ts.map +1 -0
  273. package/lib-es/logic/getFunctionAddress.js +8 -0
  274. package/lib-es/logic/getFunctionAddress.js.map +1 -0
  275. package/lib-es/logic/getResourceAddress.d.ts +4 -0
  276. package/lib-es/logic/getResourceAddress.d.ts.map +1 -0
  277. package/lib-es/logic/getResourceAddress.js +13 -0
  278. package/lib-es/logic/getResourceAddress.js.map +1 -0
  279. package/lib-es/logic/isTestnet.d.ts +2 -0
  280. package/lib-es/logic/isTestnet.d.ts.map +1 -0
  281. package/lib-es/logic/isTestnet.js +5 -0
  282. package/lib-es/logic/isTestnet.js.map +1 -0
  283. package/lib-es/logic/isWriteSetChangeWriteResource.d.ts +3 -0
  284. package/lib-es/logic/isWriteSetChangeWriteResource.d.ts.map +1 -0
  285. package/lib-es/logic/isWriteSetChangeWriteResource.js +4 -0
  286. package/lib-es/logic/isWriteSetChangeWriteResource.js.map +1 -0
  287. package/lib-es/logic/normalizeAddress.d.ts +2 -0
  288. package/lib-es/logic/normalizeAddress.d.ts.map +1 -0
  289. package/lib-es/logic/normalizeAddress.js +8 -0
  290. package/lib-es/logic/normalizeAddress.js.map +1 -0
  291. package/lib-es/logic/normalizeTransactionOptions.d.ts +3 -0
  292. package/lib-es/logic/normalizeTransactionOptions.d.ts.map +1 -0
  293. package/lib-es/logic/normalizeTransactionOptions.js +17 -0
  294. package/lib-es/logic/normalizeTransactionOptions.js.map +1 -0
  295. package/lib-es/logic/processRecipients.d.ts +6 -0
  296. package/lib-es/logic/processRecipients.d.ts.map +1 -0
  297. package/lib-es/logic/processRecipients.js +54 -0
  298. package/lib-es/logic/processRecipients.js.map +1 -0
  299. package/lib-es/logic/transactionsToOperations.d.ts +7 -0
  300. package/lib-es/logic/transactionsToOperations.d.ts.map +1 -0
  301. package/lib-es/logic/transactionsToOperations.js +81 -0
  302. package/lib-es/logic/transactionsToOperations.js.map +1 -0
  303. package/lib-es/network/client.d.ts +6 -4
  304. package/lib-es/network/client.d.ts.map +1 -1
  305. package/lib-es/network/client.js +50 -14
  306. package/lib-es/network/client.js.map +1 -1
  307. package/lib-es/network/index.d.ts.map +1 -1
  308. package/lib-es/network/index.js +5 -8
  309. package/lib-es/network/index.js.map +1 -1
  310. package/lib-es/types/assets.d.ts +5 -1
  311. package/lib-es/types/assets.d.ts.map +1 -1
  312. package/lib-es/types/index.d.ts +4 -0
  313. package/lib-es/types/index.d.ts.map +1 -1
  314. package/package.json +10 -10
  315. package/src/__tests__/api/craftTransaction.unit.test.ts +243 -0
  316. package/src/__tests__/api/getBalance.unit.test.ts +44 -0
  317. package/src/__tests__/api/index.integ.test.ts +355 -12
  318. package/src/__tests__/api/index.test.ts +1 -1
  319. package/src/__tests__/bridge/logic.test.ts +9 -654
  320. package/src/__tests__/bridge/signOperation.test.ts +7 -11
  321. package/src/__tests__/index.test.ts +1 -1
  322. package/src/__tests__/{bridge → logic}/buildTransaction.test.ts +14 -7
  323. package/src/__tests__/logic/calculateAmount.unit.test.ts +51 -0
  324. package/src/__tests__/logic/combine.unit.test.ts +65 -0
  325. package/src/__tests__/logic/compareAddress.unit.test.ts +27 -0
  326. package/src/__tests__/{bridge → logic}/createTransaction.test.ts +1 -1
  327. package/src/__tests__/logic/getCoinAndAmounts.unit.test.ts +195 -0
  328. package/src/__tests__/logic/getFunctionAddress.unit.test.ts +33 -0
  329. package/src/__tests__/logic/getResourceAddress.unit.test.ts +241 -0
  330. package/src/__tests__/logic/isTestnet.unit.test.ts +11 -0
  331. package/src/__tests__/logic/normalizeAddress.unit.test.ts +15 -0
  332. package/src/__tests__/logic/processRecipients.unit.test.ts +95 -0
  333. package/src/__tests__/network/client.test.ts +650 -11
  334. package/src/api/index.ts +10 -13
  335. package/src/bridge/estimateMaxSpendable.ts +1 -1
  336. package/src/bridge/getFeesForTransaction.ts +1 -1
  337. package/src/bridge/index.ts +1 -1
  338. package/src/bridge/logic.ts +8 -279
  339. package/src/bridge/prepareTransaction.ts +1 -1
  340. package/src/bridge/signOperation.ts +1 -1
  341. package/src/config.ts +1 -1
  342. package/src/constants.ts +8 -4
  343. package/src/logic/buildTransaction.ts +70 -0
  344. package/src/logic/calculateAmount.ts +15 -0
  345. package/src/logic/combine.ts +51 -0
  346. package/src/logic/craftTransaction.ts +65 -0
  347. package/src/logic/getBalance.ts +15 -0
  348. package/src/logic/getCoinAndAmounts.ts +141 -0
  349. package/src/logic/getFunctionAddress.ts +9 -0
  350. package/src/logic/getResourceAddress.ts +24 -0
  351. package/src/logic/isTestnet.ts +5 -0
  352. package/src/logic/isWriteSetChangeWriteResource.ts +7 -0
  353. package/src/logic/normalizeAddress.ts +8 -0
  354. package/src/logic/normalizeTransactionOptions.ts +18 -0
  355. package/src/logic/processRecipients.ts +88 -0
  356. package/src/logic/transactionsToOperations.ts +106 -0
  357. package/src/network/client.ts +88 -29
  358. package/src/network/index.ts +4 -13
  359. package/src/types/assets.ts +6 -1
  360. package/src/types/index.ts +5 -0
  361. package/lib/__tests__/bridge/buildTransaction.test.d.ts.map +0 -1
  362. package/lib/__tests__/bridge/buildTransaction.test.js.map +0 -1
  363. package/lib/__tests__/bridge/createTransaction.test.d.ts.map +0 -1
  364. package/lib/__tests__/bridge/createTransaction.test.js.map +0 -1
  365. package/lib/bridge/buildTransaction.d.ts +0 -7
  366. package/lib/bridge/buildTransaction.d.ts.map +0 -1
  367. package/lib/bridge/buildTransaction.js +0 -45
  368. package/lib/bridge/buildTransaction.js.map +0 -1
  369. package/lib/bridge/createTransaction.d.ts.map +0 -1
  370. package/lib/bridge/createTransaction.js.map +0 -1
  371. package/lib-es/__tests__/bridge/buildTransaction.test.d.ts.map +0 -1
  372. package/lib-es/__tests__/bridge/buildTransaction.test.js.map +0 -1
  373. package/lib-es/__tests__/bridge/createTransaction.test.d.ts.map +0 -1
  374. package/lib-es/__tests__/bridge/createTransaction.test.js.map +0 -1
  375. package/lib-es/bridge/buildTransaction.d.ts +0 -7
  376. package/lib-es/bridge/buildTransaction.d.ts.map +0 -1
  377. package/lib-es/bridge/buildTransaction.js +0 -43
  378. package/lib-es/bridge/buildTransaction.js.map +0 -1
  379. package/lib-es/bridge/createTransaction.d.ts.map +0 -1
  380. package/lib-es/bridge/createTransaction.js.map +0 -1
  381. package/src/bridge/buildTransaction.ts +0 -62
  382. /package/lib/__tests__/{bridge → logic}/buildTransaction.test.d.ts +0 -0
  383. /package/lib/__tests__/{bridge → logic}/createTransaction.test.d.ts +0 -0
  384. /package/lib/{bridge → logic}/createTransaction.d.ts +0 -0
  385. /package/lib/{bridge → logic}/createTransaction.js +0 -0
  386. /package/lib-es/__tests__/{bridge → logic}/buildTransaction.test.d.ts +0 -0
  387. /package/lib-es/__tests__/{bridge → logic}/createTransaction.test.d.ts +0 -0
  388. /package/lib-es/{bridge → logic}/createTransaction.d.ts +0 -0
  389. /package/lib-es/{bridge → logic}/createTransaction.js +0 -0
  390. /package/src/{bridge → logic}/createTransaction.ts +0 -0
@@ -1,20 +1,13 @@
1
1
  import BigNumber from "bignumber.js";
2
- import { APTOS_ASSET_ID, APTOS_COIN_CHANGE, APTOS_FUNGIBLE_STORE, APTOS_OBJECT_CORE, DIRECTION, } from "../../constants";
3
- import { calculateAmount, compareAddress, getCoinAndAmounts, getFunctionAddress, getResourceAddress, isTestnet, processRecipients, getMaxSendBalance, normalizeTransactionOptions, getBlankOperation, txsToOps, getEventCoinAddress, getEventFAAddress, } from "../../bridge/logic";
2
+ import { APTOS_COIN_CHANGE, DIRECTION } from "../../constants";
3
+ import { getMaxSendBalance, getBlankOperation, txsToOps } from "../../bridge/logic";
4
4
  import { createFixtureAccount, createFixtureTransaction } from "../../bridge/bridge.fixture";
5
5
  import { findTokenByAddressInCurrency } from "@ledgerhq/cryptoassets";
6
6
  import { decodeTokenAccountId, encodeTokenAccountId } from "@ledgerhq/coin-framework/account/index";
7
+ import { normalizeTransactionOptions } from "../../logic/normalizeTransactionOptions";
7
8
  jest.mock("@ledgerhq/cryptoassets");
8
9
  jest.mock("@ledgerhq/coin-framework/account/index");
9
10
  describe("Aptos logic ", () => {
10
- describe("isTestnet", () => {
11
- it("should return true for testnet currencies", () => {
12
- expect(isTestnet("aptos_testnet")).toBe(true);
13
- });
14
- it("should return false for mainnet currencies", () => {
15
- expect(isTestnet("aptos")).toBe(false);
16
- });
17
- });
18
11
  describe("getMaxSendBalance", () => {
19
12
  it("should return the correct max send balance when amount is greater than total gas", () => {
20
13
  const amount = new BigNumber(1000000);
@@ -136,549 +129,6 @@ describe("Aptos logic ", () => {
136
129
  });
137
130
  });
138
131
  describe("Aptos sync logic ", () => {
139
- describe("compareAddress", () => {
140
- it("should return true for identical addresses", () => {
141
- const addressA = "0x1234567890abcdef";
142
- const addressB = "0x1234567890abcdef";
143
- expect(compareAddress(addressA, addressB)).toBe(true);
144
- });
145
- it("should return true for addresses with different cases", () => {
146
- const addressA = "0x1234567890abcdef";
147
- const addressB = "0x1234567890ABCDEF";
148
- expect(compareAddress(addressA, addressB)).toBe(true);
149
- });
150
- it("should return true for addresses with different hex formats", () => {
151
- const addressA = "0x1234567890abcdef";
152
- const addressB = "1234567890abcdef";
153
- expect(compareAddress(addressA, addressB)).toBe(true);
154
- });
155
- it("should return false for different addresses", () => {
156
- const addressA = "0x1234567890abcdef";
157
- const addressB = "0xfedcba0987654321";
158
- expect(compareAddress(addressA, addressB)).toBe(false);
159
- });
160
- });
161
- describe("getFunctionAddress", () => {
162
- it("should return the function address when payload contains a function", () => {
163
- const payload = {
164
- function: "0x1::coin::transfer",
165
- typeArguments: [],
166
- functionArguments: [],
167
- };
168
- const result = getFunctionAddress(payload);
169
- expect(result).toBe("0x1");
170
- });
171
- it("should return undefined when payload does not contain a function", () => {
172
- const payload = {
173
- function: "::::",
174
- typeArguments: [],
175
- functionArguments: [],
176
- };
177
- const result = getFunctionAddress(payload);
178
- expect(result).toBeUndefined();
179
- });
180
- it("should return undefined when payload is empty", () => {
181
- const payload = {};
182
- const result = getFunctionAddress(payload);
183
- expect(result).toBeUndefined();
184
- });
185
- });
186
- describe("processRecipients", () => {
187
- let op;
188
- beforeEach(() => {
189
- op = {
190
- id: "",
191
- hash: "",
192
- type: "",
193
- value: new BigNumber(0),
194
- fee: new BigNumber(0),
195
- blockHash: "",
196
- blockHeight: 0,
197
- senders: [],
198
- recipients: [],
199
- accountId: "",
200
- date: new Date(),
201
- extra: {},
202
- transactionSequenceNumber: 0,
203
- hasFailed: false,
204
- };
205
- });
206
- it("should add recipient for transfer-like functions from LL account", () => {
207
- const payload = {
208
- function: "0x1::coin::transfer",
209
- typeArguments: [],
210
- functionArguments: ["0x13", 1], // from: &signer, to: address, amount: u64
211
- };
212
- processRecipients(payload, "0x13", op, "0x1");
213
- expect(op.recipients).toContain("0x13");
214
- });
215
- it("should add recipient for transfer-like functions from external account", () => {
216
- const payload = {
217
- function: "0x1::coin::transfer",
218
- typeArguments: [],
219
- functionArguments: ["0x12", 1], // from: &signer, to: address, amount: u64
220
- };
221
- processRecipients(payload, "0x13", op, "0x1");
222
- expect(op.recipients).toContain("0x12");
223
- });
224
- it("should add recipients for batch transfer functions", () => {
225
- const payload = {
226
- function: "0x1::aptos_account::batch_transfer_coins",
227
- typeArguments: [APTOS_ASSET_ID],
228
- functionArguments: [
229
- ["0x12", "0x13"],
230
- [1, 2],
231
- ],
232
- };
233
- op.senders.push("0x11");
234
- processRecipients(payload, "0x12", op, "0x1");
235
- expect(op.recipients).toContain("0x12");
236
- });
237
- it("should add function address as recipient for other smart contracts", () => {
238
- const payload = {
239
- function: "0x2::other::contract",
240
- typeArguments: [],
241
- functionArguments: [["0x12"], [1]],
242
- };
243
- processRecipients(payload, "0x11", op, "0x2");
244
- expect(op.recipients).toContain("0x2");
245
- });
246
- it("should add recipient for fungible assets transfer-like functions", () => {
247
- const payload = {
248
- function: "0x1::primary_fungible_store::transfer",
249
- typeArguments: [],
250
- functionArguments: [["0xfff"], "0x13"],
251
- };
252
- processRecipients(payload, "0x13", op, "0x1");
253
- expect(op.recipients).toContain("0x13");
254
- });
255
- });
256
- describe("getResourceAddress", () => {
257
- it("should return coin name from the change", () => {
258
- const change = {
259
- type: "write_resource",
260
- data: {
261
- type: APTOS_COIN_CHANGE,
262
- data: {
263
- withdraw_events: {
264
- guid: {
265
- id: {
266
- addr: "0x11",
267
- creation_num: "2",
268
- },
269
- },
270
- },
271
- },
272
- },
273
- };
274
- const tx = {
275
- hash: "0x123",
276
- block: { hash: "0xabc", height: 1 },
277
- timestamp: "1000000",
278
- sequence_number: "1",
279
- version: "1",
280
- changes: [change],
281
- };
282
- const event = {
283
- guid: {
284
- account_address: "0x11",
285
- creation_number: "2",
286
- },
287
- type: "0x1::coin::WithdrawEvent",
288
- };
289
- const result = getResourceAddress(tx, event, "withdraw_events", getEventCoinAddress);
290
- expect(result).toEqual(APTOS_ASSET_ID);
291
- });
292
- it("should return null for not finding the valid coin in change", () => {
293
- const change = {
294
- type: "write_resource",
295
- data: {
296
- type: APTOS_COIN_CHANGE,
297
- data: {
298
- withdraw_events: {
299
- guid: {
300
- id: {
301
- addr: "0x12",
302
- creation_num: "2",
303
- },
304
- },
305
- },
306
- },
307
- },
308
- };
309
- const tx = {
310
- hash: "0x123",
311
- block: { hash: "0xabc", height: 1 },
312
- timestamp: "1000000",
313
- sequence_number: "1",
314
- version: "1",
315
- changes: [change],
316
- };
317
- const event = {
318
- guid: {
319
- account_address: "0x11",
320
- creation_number: "1",
321
- },
322
- type: "0x1::coin::WithdrawEvent",
323
- };
324
- const result = getResourceAddress(tx, event, "withdraw_events", getEventCoinAddress);
325
- expect(result).toBe(null);
326
- });
327
- it("should return null for not finding the event name in change", () => {
328
- const change = {
329
- type: "write_resource",
330
- data: {
331
- type: APTOS_COIN_CHANGE,
332
- data: {
333
- other_events: {
334
- guid: {
335
- id: {
336
- addr: "0x12",
337
- creation_num: "2",
338
- },
339
- },
340
- },
341
- },
342
- },
343
- };
344
- const tx = {
345
- hash: "0x123",
346
- block: { hash: "0xabc", height: 1 },
347
- timestamp: "1000000",
348
- sequence_number: "1",
349
- version: "1",
350
- changes: [change],
351
- };
352
- const event = {
353
- guid: {
354
- account_address: "0x11",
355
- creation_number: "1",
356
- },
357
- type: "0x1::coin::WithdrawEvent",
358
- };
359
- const result = getResourceAddress(tx, event, "withdraw_events", getEventCoinAddress);
360
- expect(result).toBe(null);
361
- });
362
- it("should return fungible asset address", () => {
363
- const change = {
364
- type: "write_resource",
365
- address: "0xsomeaddress",
366
- data: {
367
- type: APTOS_FUNGIBLE_STORE,
368
- data: {
369
- metadata: {
370
- inner: "0xassetaddress",
371
- },
372
- },
373
- },
374
- };
375
- const tx = {
376
- hash: "0x123",
377
- block: { hash: "0xabc", height: 1 },
378
- timestamp: "1000000",
379
- sequence_number: "1",
380
- version: "1",
381
- changes: [change],
382
- };
383
- const event = {
384
- guid: {
385
- account_address: "0x0",
386
- creation_number: "0",
387
- },
388
- type: "0x1::fungible_asset::Deposit",
389
- data: {
390
- amount: "100",
391
- store: "0xsomeaddress",
392
- },
393
- };
394
- const result = getResourceAddress(tx, event, "withdraw_events", getEventFAAddress);
395
- expect(result).toEqual("0xassetaddress");
396
- });
397
- it("should return null address instead of fungible asset when wrong type", () => {
398
- const change = {
399
- type: "write_resource",
400
- address: "0xsomeaddress",
401
- data: {
402
- type: APTOS_COIN_CHANGE,
403
- data: {
404
- metadata: {
405
- inner: "0xassetaddress",
406
- },
407
- },
408
- },
409
- };
410
- const tx = {
411
- hash: "0x123",
412
- block: { hash: "0xabc", height: 1 },
413
- timestamp: "1000000",
414
- sequence_number: "1",
415
- version: "1",
416
- changes: [change],
417
- };
418
- const event = {
419
- guid: {
420
- account_address: "0x0",
421
- creation_number: "0",
422
- },
423
- type: "0x1::fungible_asset::Deposit",
424
- data: {
425
- amount: "100",
426
- store: "0xsomeaddress",
427
- },
428
- };
429
- const result = getResourceAddress(tx, event, "withdraw_events", getEventFAAddress);
430
- expect(result).toEqual(null);
431
- });
432
- it("should return null address instead of fungible asset when wrong event address", () => {
433
- const change = {
434
- type: "write_resource",
435
- address: "0xsomeaddress",
436
- data: {
437
- type: APTOS_FUNGIBLE_STORE,
438
- data: {
439
- metadata: {
440
- inner: "0xassetaddress",
441
- },
442
- },
443
- },
444
- };
445
- const tx = {
446
- hash: "0x123",
447
- block: { hash: "0xabc", height: 1 },
448
- timestamp: "1000000",
449
- sequence_number: "1",
450
- version: "1",
451
- changes: [change],
452
- };
453
- const event = {
454
- guid: {
455
- account_address: "0x0",
456
- creation_number: "0",
457
- },
458
- type: "0x1::fungible_asset::Deposit",
459
- data: {
460
- amount: "100",
461
- store: "0xwrongaddress",
462
- },
463
- };
464
- const result = getResourceAddress(tx, event, "withdraw_events", getEventFAAddress);
465
- expect(result).toEqual(null);
466
- });
467
- });
468
- describe("getCoinAndAmounts", () => {
469
- it("should calculate the correct legacy coins amounts for withdraw and deposit events", () => {
470
- const tx = {
471
- events: [
472
- {
473
- type: "0x1::coin::WithdrawEvent",
474
- guid: {
475
- account_address: "0x11",
476
- creation_number: "1",
477
- },
478
- data: {
479
- amount: "100",
480
- },
481
- },
482
- {
483
- type: "0x1::coin::DepositEvent",
484
- guid: {
485
- account_address: "0x11",
486
- creation_number: "2",
487
- },
488
- data: {
489
- amount: "50",
490
- },
491
- },
492
- ],
493
- changes: [
494
- {
495
- type: "write_resource",
496
- data: {
497
- type: APTOS_COIN_CHANGE,
498
- data: {
499
- withdraw_events: {
500
- guid: {
501
- id: {
502
- addr: "0x11",
503
- creation_num: "1",
504
- },
505
- },
506
- },
507
- deposit_events: {
508
- guid: {
509
- id: {
510
- addr: "0x11",
511
- creation_num: "2",
512
- },
513
- },
514
- },
515
- },
516
- },
517
- },
518
- ],
519
- };
520
- const address = "0x11";
521
- const result = getCoinAndAmounts(tx, address);
522
- expect(result.amount_in).toEqual(new BigNumber(50));
523
- expect(result.amount_out).toEqual(new BigNumber(100));
524
- expect(result.coin_id).toEqual(APTOS_ASSET_ID);
525
- });
526
- it("should calculate the correct fungible asset amounts for withdraw and deposit events", () => {
527
- const tx = {
528
- events: [
529
- {
530
- type: "0x1::fungible_asset::Withdraw",
531
- guid: {
532
- account_address: "0x11",
533
- creation_number: "1",
534
- },
535
- data: {
536
- amount: "100",
537
- store: "0x22",
538
- },
539
- },
540
- {
541
- type: "0x1::fungible_asset::Deposit",
542
- guid: {
543
- account_address: "0x11",
544
- creation_number: "2",
545
- },
546
- data: {
547
- amount: "50",
548
- store: "0x33",
549
- },
550
- },
551
- ],
552
- changes: [
553
- {
554
- type: "write_resource",
555
- address: "0x22",
556
- data: {
557
- type: APTOS_FUNGIBLE_STORE,
558
- data: {
559
- metadata: {
560
- inner: "0x44",
561
- },
562
- transfer_events: {
563
- guid: {
564
- id: {
565
- addr: "0x11",
566
- creation_num: "2",
567
- },
568
- },
569
- },
570
- },
571
- },
572
- },
573
- {
574
- type: "write_resource",
575
- address: "0x22",
576
- data: {
577
- type: APTOS_OBJECT_CORE,
578
- data: {
579
- owner: "0x11",
580
- transfer_events: {
581
- guid: {
582
- id: {
583
- addr: "0x22",
584
- creation_num: "2",
585
- },
586
- },
587
- },
588
- },
589
- },
590
- },
591
- {
592
- type: "write_resource",
593
- data: {
594
- type: APTOS_COIN_CHANGE,
595
- data: {
596
- withdraw_events: {
597
- guid: {
598
- id: {
599
- addr: "0x11",
600
- creation_num: "1",
601
- },
602
- },
603
- },
604
- deposit_events: {
605
- guid: {
606
- id: {
607
- addr: "0x11",
608
- creation_num: "2",
609
- },
610
- },
611
- },
612
- },
613
- },
614
- },
615
- ],
616
- };
617
- const address = "0x11";
618
- const result = getCoinAndAmounts(tx, address);
619
- expect(result.amount_in).toEqual(new BigNumber(0));
620
- expect(result.amount_out).toEqual(new BigNumber(100));
621
- expect(result.coin_id).toEqual("0x44");
622
- });
623
- it("should handle transactions with other events", () => {
624
- const tx = {
625
- events: [
626
- {
627
- type: "0x1::coin::OtherEvent",
628
- guid: {
629
- account_address: "0x11",
630
- creation_number: "1",
631
- },
632
- data: {
633
- amount: "100",
634
- },
635
- },
636
- ],
637
- };
638
- const address = "0x1";
639
- const result = getCoinAndAmounts(tx, address);
640
- expect(result.amount_in).toEqual(new BigNumber(0));
641
- expect(result.amount_out).toEqual(new BigNumber(0));
642
- expect(result.coin_id).toEqual(null);
643
- });
644
- });
645
- describe("calculateAmount", () => {
646
- it("should calculate the correct amount when the address is the sender", () => {
647
- const address = "0x11";
648
- const sender = "0x11";
649
- const amount_in = new BigNumber(50);
650
- const amount_out = new BigNumber(100);
651
- const result = calculateAmount(sender, address, amount_in, amount_out);
652
- // LL negates the amount for SEND transactions during output
653
- expect(result).toEqual(new BigNumber(50)); // -(50 - 100 - 10)
654
- });
655
- it("should calculate the correct amount when the address is not the sender", () => {
656
- const address = "0x11";
657
- const sender = "0x12";
658
- const amount_in = new BigNumber(100);
659
- const amount_out = new BigNumber(50);
660
- const result = calculateAmount(sender, address, amount_in, amount_out);
661
- expect(result).toEqual(new BigNumber(50)); // 100 - 50
662
- });
663
- it("should handle transactions with zero amounts", () => {
664
- const address = "0x11";
665
- const sender = "0x11";
666
- const amount_in = new BigNumber(0);
667
- const amount_out = new BigNumber(0);
668
- const result = calculateAmount(sender, address, amount_in, amount_out);
669
- // LL negates the amount for SEND transactions during output
670
- expect(result).toEqual(new BigNumber(0)); // -(0 - 0 - 10)
671
- });
672
- it("should get negative numbers (for send tx with deposit to account)", () => {
673
- const address = "0x11";
674
- const sender = "0x11";
675
- const amount_in = new BigNumber(100);
676
- const amount_out = new BigNumber(0);
677
- const result = calculateAmount(sender, address, amount_in, amount_out);
678
- // LL negates the amount for SEND transactions during output
679
- expect(result).toEqual(new BigNumber(100).negated()); // 100 - 10
680
- });
681
- });
682
132
  describe("txsToOps", () => {
683
133
  it("should convert Aptos transactions to operations correctly", () => {
684
134
  const address = "0x11";
@@ -760,7 +210,7 @@ describe("Aptos sync logic ", () => {
760
210
  blockHash: "0xabc",
761
211
  blockHeight: 1,
762
212
  senders: ["0x11"],
763
- recipients: ["0x12"],
213
+ recipients: ["0x0000000000000000000000000000000000000000000000000000000000000012"],
764
214
  accountId: id,
765
215
  date: new Date(1000),
766
216
  extra: { version: undefined },
@@ -950,7 +400,7 @@ describe("Aptos sync logic ", () => {
950
400
  blockHash: "0xc496",
951
401
  blockHeight: 1,
952
402
  senders: ["0xa0d8"],
953
- recipients: ["0x4e5e"],
403
+ recipients: ["0x0000000000000000000000000000000000000000000000000000000000004e5e"],
954
404
  accountId: id,
955
405
  date: new Date(1000),
956
406
  extra: { version: undefined },
@@ -1224,7 +674,7 @@ describe("Aptos sync logic ", () => {
1224
674
  blockHash: "0xabc",
1225
675
  blockHeight: 1,
1226
676
  senders: ["0xa0d"],
1227
- recipients: ["0x4e5"],
677
+ recipients: ["0x00000000000000000000000000000000000000000000000000000000000004e5"],
1228
678
  accountId: "token_account_id",
1229
679
  date: new Date(1000),
1230
680
  extra: { version: undefined },
@@ -1241,7 +691,7 @@ describe("Aptos sync logic ", () => {
1241
691
  blockHash: "0xabc",
1242
692
  blockHeight: 1,
1243
693
  senders: ["0xa0d"],
1244
- recipients: ["0x4e5"],
694
+ recipients: ["0x00000000000000000000000000000000000000000000000000000000000004e5"],
1245
695
  date: new Date(1000),
1246
696
  extra: { version: undefined },
1247
697
  transactionSequenceNumber: 1,
@@ -1530,7 +980,7 @@ describe("Aptos sync logic ", () => {
1530
980
  blockHash: "0xabc",
1531
981
  blockHeight: 1,
1532
982
  senders: ["0xa0d8"],
1533
- recipients: ["0x6b8c"],
983
+ recipients: ["0x0000000000000000000000000000000000000000000000000000000000006b8c"],
1534
984
  date: new Date(1000),
1535
985
  extra: { version: undefined },
1536
986
  transactionSequenceNumber: 1,