@aptos-labs/ts-sdk 1.14.0-zeta.2 → 1.14.0-zeta.4

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 (429) hide show
  1. package/dist/common/chunk-KSEUZTKY.js +2 -0
  2. package/dist/common/chunk-KSEUZTKY.js.map +1 -0
  3. package/dist/common/cli/index.js +1 -245
  4. package/dist/common/cli/index.js.map +1 -1
  5. package/dist/common/index.js +390 -11802
  6. package/dist/common/index.js.map +1 -1
  7. package/dist/esm/account/Account.mjs +1 -55
  8. package/dist/esm/account/Ed25519Account.mjs +1 -53
  9. package/dist/esm/account/EphemeralKeyPair.mjs +1 -36
  10. package/dist/esm/account/KeylessAccount.mjs +1 -56
  11. package/dist/esm/account/MultiKeyAccount.mjs +1 -55
  12. package/dist/esm/account/SingleKeyAccount.mjs +1 -53
  13. package/dist/esm/account/index.mjs +1 -76
  14. package/dist/esm/api/account.mjs +1 -76
  15. package/dist/esm/api/ans.mjs +1 -87
  16. package/dist/esm/api/aptos.mjs +1 -116
  17. package/dist/esm/api/aptosConfig.mjs +1 -9
  18. package/dist/esm/api/coin.mjs +1 -86
  19. package/dist/esm/api/digitalAsset.mjs +1 -87
  20. package/dist/esm/api/event.mjs +1 -54
  21. package/dist/esm/api/faucet.mjs +1 -53
  22. package/dist/esm/api/fungibleAsset.mjs +1 -87
  23. package/dist/esm/api/general.mjs +1 -84
  24. package/dist/esm/api/index.mjs +1 -120
  25. package/dist/esm/api/keyless.mjs +1 -70
  26. package/dist/esm/api/staking.mjs +1 -54
  27. package/dist/esm/api/transaction.mjs +1 -94
  28. package/dist/esm/api/transactionSubmission/build.mjs +1 -85
  29. package/dist/esm/api/transactionSubmission/helpers.mjs +1 -9
  30. package/dist/esm/api/transactionSubmission/management.mjs +1 -89
  31. package/dist/esm/api/transactionSubmission/sign.mjs +1 -109
  32. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  33. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -86
  34. package/dist/esm/api/transactionSubmission/submit.mjs +1 -86
  35. package/dist/esm/api/utils.mjs +1 -34
  36. package/dist/esm/bcs/consts.mjs +1 -17
  37. package/dist/esm/bcs/deserializer.mjs +1 -8
  38. package/dist/esm/bcs/index.mjs +1 -57
  39. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -12
  40. package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -11
  41. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -25
  42. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -18
  43. package/dist/esm/bcs/serializer.mjs +1 -18
  44. package/dist/esm/chunk-3COVJN6Z.mjs +2 -0
  45. package/dist/esm/{chunk-2JOCR2VL.mjs.map → chunk-3COVJN6Z.mjs.map} +1 -1
  46. package/dist/esm/chunk-3FVRXELT.mjs +2 -0
  47. package/dist/esm/{chunk-KK2BSALW.mjs.map → chunk-3FVRXELT.mjs.map} +1 -1
  48. package/dist/esm/chunk-3JPVQHOR.mjs +2 -0
  49. package/dist/esm/{chunk-GGMTQAQP.mjs.map → chunk-3JPVQHOR.mjs.map} +1 -1
  50. package/dist/esm/chunk-3VGX3TXH.mjs +2 -0
  51. package/dist/esm/{chunk-7FO3S6IZ.mjs.map → chunk-3VGX3TXH.mjs.map} +1 -1
  52. package/dist/esm/chunk-4D5QYFL7.mjs +2 -0
  53. package/dist/esm/{chunk-VZQXLVEP.mjs.map → chunk-4D5QYFL7.mjs.map} +1 -1
  54. package/dist/esm/chunk-4SZSI7QT.mjs +2 -0
  55. package/dist/esm/{chunk-2ZEGJU43.mjs.map → chunk-4SZSI7QT.mjs.map} +1 -1
  56. package/dist/esm/chunk-52ECIIIH.mjs +2 -0
  57. package/dist/esm/{chunk-U3IUCR2G.mjs.map → chunk-52ECIIIH.mjs.map} +1 -1
  58. package/dist/esm/chunk-53T2VRZA.mjs +2 -0
  59. package/dist/esm/{chunk-7IDBB4J4.mjs.map → chunk-53T2VRZA.mjs.map} +1 -1
  60. package/dist/esm/chunk-56CNRT2K.mjs +2 -0
  61. package/dist/esm/{chunk-SBB4YEPT.mjs.map → chunk-56CNRT2K.mjs.map} +1 -1
  62. package/dist/esm/chunk-56NB52W6.mjs +2 -0
  63. package/dist/esm/{chunk-VJP2VWMF.mjs.map → chunk-56NB52W6.mjs.map} +1 -1
  64. package/dist/esm/chunk-5JGWZSNG.mjs +2 -0
  65. package/dist/esm/{chunk-LYK4TQZO.mjs.map → chunk-5JGWZSNG.mjs.map} +1 -1
  66. package/dist/esm/chunk-6EMN3BOV.mjs +2 -0
  67. package/dist/esm/{chunk-SIJELMDP.mjs.map → chunk-6EMN3BOV.mjs.map} +1 -1
  68. package/dist/esm/chunk-6JT3CUFA.mjs +2 -0
  69. package/dist/esm/{chunk-ST4QXIMI.mjs.map → chunk-6JT3CUFA.mjs.map} +1 -1
  70. package/dist/esm/chunk-6KGDQGT2.mjs +2 -0
  71. package/dist/esm/{chunk-GBEVD2VM.mjs.map → chunk-6KGDQGT2.mjs.map} +1 -1
  72. package/dist/esm/chunk-6OETO7Q7.mjs +2 -0
  73. package/dist/esm/{chunk-UX5NSZEN.mjs.map → chunk-6OETO7Q7.mjs.map} +1 -1
  74. package/dist/esm/chunk-6RBUXB5I.mjs +2 -0
  75. package/dist/esm/{chunk-WK5ZSNE2.mjs.map → chunk-6RBUXB5I.mjs.map} +1 -1
  76. package/dist/esm/chunk-6YFCRKVC.mjs +2 -0
  77. package/dist/esm/{chunk-YYOPNUX5.mjs.map → chunk-6YFCRKVC.mjs.map} +1 -1
  78. package/dist/esm/chunk-7STYQ5ZE.mjs +2 -0
  79. package/dist/esm/{chunk-UEBBLQJ5.mjs.map → chunk-7STYQ5ZE.mjs.map} +1 -1
  80. package/dist/esm/chunk-7WJTKYRG.mjs +2 -0
  81. package/dist/esm/{chunk-2OQW7BMN.mjs.map → chunk-7WJTKYRG.mjs.map} +1 -1
  82. package/dist/esm/chunk-AFGTRMOR.mjs +2 -0
  83. package/dist/esm/{chunk-KMXSRHJ6.mjs.map → chunk-AFGTRMOR.mjs.map} +1 -1
  84. package/dist/esm/chunk-AH44UPM4.mjs +2 -0
  85. package/dist/esm/{chunk-EYHRMZPO.mjs.map → chunk-AH44UPM4.mjs.map} +1 -1
  86. package/dist/esm/chunk-AOCNYMMX.mjs +2 -0
  87. package/dist/esm/{chunk-YV7M4CFP.mjs.map → chunk-AOCNYMMX.mjs.map} +1 -1
  88. package/dist/esm/chunk-B3BLP5DP.mjs +2 -0
  89. package/dist/esm/{chunk-W76MGKZB.mjs.map → chunk-B3BLP5DP.mjs.map} +1 -1
  90. package/dist/esm/chunk-BTTXZYBD.mjs +2 -0
  91. package/dist/esm/{chunk-LI2QV6RU.mjs.map → chunk-BTTXZYBD.mjs.map} +1 -1
  92. package/dist/esm/chunk-C34M4T77.mjs +2 -0
  93. package/dist/esm/{chunk-UKU6A2W2.mjs.map → chunk-C34M4T77.mjs.map} +1 -1
  94. package/dist/esm/chunk-C3L4ETUF.mjs +2 -0
  95. package/dist/esm/{chunk-PIMQHG2J.mjs.map → chunk-C3L4ETUF.mjs.map} +1 -1
  96. package/dist/esm/chunk-CO53EOHE.mjs +2 -0
  97. package/dist/esm/{chunk-MZZLEY6O.mjs.map → chunk-CO53EOHE.mjs.map} +1 -1
  98. package/dist/esm/chunk-COW5IGYC.mjs +2 -0
  99. package/dist/esm/{chunk-FXKSE3ZP.mjs.map → chunk-COW5IGYC.mjs.map} +1 -1
  100. package/dist/esm/chunk-CPBGL37X.mjs +2 -0
  101. package/dist/esm/{chunk-D2BVBXWO.mjs.map → chunk-CPBGL37X.mjs.map} +1 -1
  102. package/dist/esm/chunk-CSP3V4UZ.mjs +2 -0
  103. package/dist/esm/{chunk-DGV7DYU4.mjs.map → chunk-CSP3V4UZ.mjs.map} +1 -1
  104. package/dist/esm/chunk-D4J3MCOI.mjs +2 -0
  105. package/dist/esm/{chunk-JV3GSIJW.mjs.map → chunk-D4J3MCOI.mjs.map} +1 -1
  106. package/dist/esm/chunk-EB7AI4B4.mjs +2 -0
  107. package/dist/esm/{chunk-AR7X6GWQ.mjs.map → chunk-EB7AI4B4.mjs.map} +1 -1
  108. package/dist/esm/chunk-EIXCAYQM.mjs +2 -0
  109. package/dist/esm/{chunk-O6PSHSN3.mjs.map → chunk-EIXCAYQM.mjs.map} +1 -1
  110. package/dist/esm/chunk-F3HH6U3Z.mjs +2 -0
  111. package/dist/esm/{chunk-IC56GQFJ.mjs.map → chunk-F3HH6U3Z.mjs.map} +1 -1
  112. package/dist/esm/chunk-FBPNHF54.mjs +2 -0
  113. package/dist/esm/{chunk-QMM2KL6C.mjs.map → chunk-FBPNHF54.mjs.map} +1 -1
  114. package/dist/esm/chunk-FHNW3DEN.mjs +2 -0
  115. package/dist/esm/{chunk-ATVFVXR6.mjs.map → chunk-FHNW3DEN.mjs.map} +1 -1
  116. package/dist/esm/chunk-FLYEALDB.mjs +2 -0
  117. package/dist/esm/{chunk-76TSTAU4.mjs.map → chunk-FLYEALDB.mjs.map} +1 -1
  118. package/dist/esm/chunk-FMBZNFEA.mjs +2 -0
  119. package/dist/esm/{chunk-ZAHJ7KXB.mjs.map → chunk-FMBZNFEA.mjs.map} +1 -1
  120. package/dist/esm/chunk-FVA2OPG4.mjs +2 -0
  121. package/dist/esm/chunk-GUO5GDBN.mjs +2 -0
  122. package/dist/esm/{chunk-HBNSRCZN.mjs.map → chunk-GUO5GDBN.mjs.map} +1 -1
  123. package/dist/esm/chunk-HGZGTBA4.mjs +2 -0
  124. package/dist/esm/{chunk-PYLOAMR2.mjs.map → chunk-HGZGTBA4.mjs.map} +1 -1
  125. package/dist/esm/chunk-HX5246EM.mjs +2 -0
  126. package/dist/esm/{chunk-JHDHNGJ3.mjs.map → chunk-HX5246EM.mjs.map} +1 -1
  127. package/dist/esm/chunk-HY5E66FY.mjs +2 -0
  128. package/dist/esm/{chunk-7FUHWL6A.mjs.map → chunk-HY5E66FY.mjs.map} +1 -1
  129. package/dist/esm/chunk-IBQWYF23.mjs +2 -0
  130. package/dist/esm/{chunk-WDRH2URB.mjs.map → chunk-IBQWYF23.mjs.map} +1 -1
  131. package/dist/esm/chunk-IWBLSSVA.mjs +2 -0
  132. package/dist/esm/{chunk-TBHU6ZW6.mjs.map → chunk-IWBLSSVA.mjs.map} +1 -1
  133. package/dist/esm/chunk-JJIANJE3.mjs +2 -0
  134. package/dist/esm/{chunk-GSVQ6EUD.mjs.map → chunk-JJIANJE3.mjs.map} +1 -1
  135. package/dist/esm/chunk-JM2B5E2I.mjs +2 -0
  136. package/dist/esm/{chunk-CX3NAVRD.mjs.map → chunk-JM2B5E2I.mjs.map} +1 -1
  137. package/dist/esm/chunk-JM544NRW.mjs +2 -0
  138. package/dist/esm/{chunk-7REUIYF4.mjs.map → chunk-JM544NRW.mjs.map} +1 -1
  139. package/dist/esm/chunk-JYUTX5G7.mjs +2 -0
  140. package/dist/esm/{chunk-LYMY63SO.mjs.map → chunk-JYUTX5G7.mjs.map} +1 -1
  141. package/dist/esm/chunk-K247GPES.mjs +2 -0
  142. package/dist/esm/{chunk-NYL77J4X.mjs.map → chunk-K247GPES.mjs.map} +1 -1
  143. package/dist/esm/chunk-KW2KIYJE.mjs +2 -0
  144. package/dist/esm/{chunk-BXMHDQHW.mjs.map → chunk-KW2KIYJE.mjs.map} +1 -1
  145. package/dist/esm/chunk-KYZCH7IK.mjs +2 -0
  146. package/dist/esm/{chunk-NXFO2W4G.mjs.map → chunk-KYZCH7IK.mjs.map} +1 -1
  147. package/dist/esm/chunk-L54P6EGN.mjs +2 -0
  148. package/dist/esm/{chunk-SS3NUM5L.mjs.map → chunk-L54P6EGN.mjs.map} +1 -1
  149. package/dist/esm/chunk-LDQ6JFEF.mjs +2 -0
  150. package/dist/esm/{chunk-N4WKFNQ6.mjs.map → chunk-LDQ6JFEF.mjs.map} +1 -1
  151. package/dist/esm/chunk-LR5YOJG2.mjs +2 -0
  152. package/dist/esm/{chunk-6LRQSBRH.mjs.map → chunk-LR5YOJG2.mjs.map} +1 -1
  153. package/dist/esm/chunk-LR65XHSF.mjs +2 -0
  154. package/dist/esm/{chunk-PU5AFUX3.mjs.map → chunk-LR65XHSF.mjs.map} +1 -1
  155. package/dist/esm/chunk-MC6O2XME.mjs +2 -0
  156. package/dist/esm/{chunk-RCQMWXEW.mjs.map → chunk-MC6O2XME.mjs.map} +1 -1
  157. package/dist/esm/chunk-MGOHPDX4.mjs +2 -0
  158. package/dist/esm/{chunk-2TJJWII2.mjs.map → chunk-MGOHPDX4.mjs.map} +1 -1
  159. package/dist/esm/chunk-MTLETLKV.mjs +2 -0
  160. package/dist/esm/{chunk-DIYZRGR6.mjs.map → chunk-MTLETLKV.mjs.map} +1 -1
  161. package/dist/esm/chunk-MWUJCP27.mjs +2 -0
  162. package/dist/esm/{chunk-6MSZMIFW.mjs.map → chunk-MWUJCP27.mjs.map} +1 -1
  163. package/dist/esm/chunk-N466X3S6.mjs +2 -0
  164. package/dist/esm/{chunk-WLTBF4DF.mjs.map → chunk-N466X3S6.mjs.map} +1 -1
  165. package/dist/esm/chunk-NC5HHEEM.mjs +2 -0
  166. package/dist/esm/{chunk-XANFAUBD.mjs.map → chunk-NC5HHEEM.mjs.map} +1 -1
  167. package/dist/esm/chunk-NNIHTVLA.mjs +2 -0
  168. package/dist/esm/{chunk-VPWUODU4.mjs.map → chunk-NNIHTVLA.mjs.map} +1 -1
  169. package/dist/esm/chunk-NT47KB7Y.mjs +2 -0
  170. package/dist/esm/{chunk-Y2LV3S5W.mjs.map → chunk-NT47KB7Y.mjs.map} +1 -1
  171. package/dist/esm/chunk-NWGBV3YO.mjs +2 -0
  172. package/dist/esm/{chunk-F2ZWA7B7.mjs.map → chunk-NWGBV3YO.mjs.map} +1 -1
  173. package/dist/esm/chunk-NWWXZ7EW.mjs +2 -0
  174. package/dist/esm/{chunk-B5S6DDUD.mjs.map → chunk-NWWXZ7EW.mjs.map} +1 -1
  175. package/dist/esm/chunk-NYTZPISE.mjs +2 -0
  176. package/dist/esm/{chunk-KVSQ57HU.mjs.map → chunk-NYTZPISE.mjs.map} +1 -1
  177. package/dist/esm/chunk-O6LITRY2.mjs +2 -0
  178. package/dist/esm/{chunk-CTJSZT5V.mjs.map → chunk-O6LITRY2.mjs.map} +1 -1
  179. package/dist/esm/chunk-OJFMOV2O.mjs +2 -0
  180. package/dist/esm/{chunk-TLNHRJB2.mjs.map → chunk-OJFMOV2O.mjs.map} +1 -1
  181. package/dist/esm/chunk-OMD4G3E6.mjs +2 -0
  182. package/dist/esm/{chunk-FF4JPDKD.mjs.map → chunk-OMD4G3E6.mjs.map} +1 -1
  183. package/dist/esm/chunk-PBDEW4TN.mjs +2 -0
  184. package/dist/esm/{chunk-IHNPN5CQ.mjs.map → chunk-PBDEW4TN.mjs.map} +1 -1
  185. package/dist/esm/chunk-PFFAQZHT.mjs +2 -0
  186. package/dist/esm/{chunk-DNPMS2OF.mjs.map → chunk-PFFAQZHT.mjs.map} +1 -1
  187. package/dist/esm/chunk-PTRUUJCS.mjs +2 -0
  188. package/dist/esm/{chunk-LLLQJWRZ.mjs.map → chunk-PTRUUJCS.mjs.map} +1 -1
  189. package/dist/esm/chunk-PYUU4OEL.mjs +2 -0
  190. package/dist/esm/{chunk-RX4VG2AT.mjs.map → chunk-PYUU4OEL.mjs.map} +1 -1
  191. package/dist/esm/chunk-QDJN5HCB.mjs +2 -0
  192. package/dist/esm/{chunk-CC4DQ6NH.mjs.map → chunk-QDJN5HCB.mjs.map} +1 -1
  193. package/dist/esm/chunk-QFMUMZXR.mjs +2 -0
  194. package/dist/esm/{chunk-ASF2VWOX.mjs.map → chunk-QFMUMZXR.mjs.map} +1 -1
  195. package/dist/esm/chunk-RJ4PSGZ4.mjs +2 -0
  196. package/dist/esm/{chunk-QFOG4LIN.mjs.map → chunk-RJ4PSGZ4.mjs.map} +1 -1
  197. package/dist/esm/chunk-RKHPXZM6.mjs +2 -0
  198. package/dist/esm/{chunk-PCLNX6FS.mjs.map → chunk-RKHPXZM6.mjs.map} +1 -1
  199. package/dist/esm/{chunk-4PJ5FYGQ.mjs → chunk-S4SEFF4K.mjs} +27 -302
  200. package/dist/esm/{chunk-4PJ5FYGQ.mjs.map → chunk-S4SEFF4K.mjs.map} +1 -1
  201. package/dist/esm/chunk-S4YEK4LM.mjs +2 -0
  202. package/dist/esm/{chunk-WVGO4D7K.mjs.map → chunk-S4YEK4LM.mjs.map} +1 -1
  203. package/dist/esm/chunk-STYDBDYL.mjs +2 -0
  204. package/dist/esm/{chunk-FDWJNY4U.mjs.map → chunk-STYDBDYL.mjs.map} +1 -1
  205. package/dist/esm/chunk-SXOQWGMT.mjs +2 -0
  206. package/dist/esm/{chunk-VDJBDX3A.mjs.map → chunk-SXOQWGMT.mjs.map} +1 -1
  207. package/dist/esm/chunk-T23OVRNF.mjs +2 -0
  208. package/dist/esm/{chunk-CMNJG4NN.mjs.map → chunk-T23OVRNF.mjs.map} +1 -1
  209. package/dist/esm/chunk-TBGRYIFW.mjs +2 -0
  210. package/dist/esm/{chunk-NW45SCPY.mjs.map → chunk-TBGRYIFW.mjs.map} +1 -1
  211. package/dist/esm/chunk-TICM455H.mjs +2 -0
  212. package/dist/esm/{chunk-ZMFKQUHL.mjs.map → chunk-TICM455H.mjs.map} +1 -1
  213. package/dist/esm/chunk-TJDC5PWD.mjs +2 -0
  214. package/dist/esm/{chunk-NMKCJNQM.mjs.map → chunk-TJDC5PWD.mjs.map} +1 -1
  215. package/dist/esm/chunk-TVRJ3M7B.mjs +2 -0
  216. package/dist/esm/{chunk-FQQW55X7.mjs.map → chunk-TVRJ3M7B.mjs.map} +1 -1
  217. package/dist/esm/chunk-U6Z4FNB7.mjs +2 -0
  218. package/dist/esm/{chunk-AC3OGAL6.mjs.map → chunk-U6Z4FNB7.mjs.map} +1 -1
  219. package/dist/esm/chunk-UAL7TX7O.mjs +2 -0
  220. package/dist/esm/{chunk-DVPQGCFT.mjs.map → chunk-UAL7TX7O.mjs.map} +1 -1
  221. package/dist/esm/chunk-UTXJOB3O.mjs +2 -0
  222. package/dist/esm/{chunk-QBBTUC66.mjs.map → chunk-UTXJOB3O.mjs.map} +1 -1
  223. package/dist/esm/chunk-VDMVO4R4.mjs +2 -0
  224. package/dist/esm/{chunk-4OYYOYSO.mjs.map → chunk-VDMVO4R4.mjs.map} +1 -1
  225. package/dist/esm/chunk-VT6XJSRO.mjs +2 -0
  226. package/dist/esm/{chunk-7JRMOHBP.mjs.map → chunk-VT6XJSRO.mjs.map} +1 -1
  227. package/dist/esm/chunk-VXZDDYG7.mjs +2 -0
  228. package/dist/esm/{chunk-55NODGHC.mjs.map → chunk-VXZDDYG7.mjs.map} +1 -1
  229. package/dist/esm/chunk-WOPMZAWX.mjs +2 -0
  230. package/dist/esm/{chunk-VKJQORON.mjs.map → chunk-WOPMZAWX.mjs.map} +1 -1
  231. package/dist/esm/chunk-XOTF6PQ7.mjs +2 -0
  232. package/dist/esm/{chunk-CXUGZXED.mjs.map → chunk-XOTF6PQ7.mjs.map} +1 -1
  233. package/dist/esm/chunk-YE5B2S5L.mjs +2 -0
  234. package/dist/esm/{chunk-NFJCQRVK.mjs.map → chunk-YE5B2S5L.mjs.map} +1 -1
  235. package/dist/esm/chunk-ZJDNONEP.mjs +2 -0
  236. package/dist/esm/{chunk-U7QBZ6PP.mjs.map → chunk-ZJDNONEP.mjs.map} +1 -1
  237. package/dist/esm/chunk-ZLLU4XK7.mjs +2 -0
  238. package/dist/esm/{chunk-WHBWEN6N.mjs.map → chunk-ZLLU4XK7.mjs.map} +1 -1
  239. package/dist/esm/chunk-ZNEBMSNC.mjs +2 -0
  240. package/dist/esm/{chunk-JL2JHVS4.mjs.map → chunk-ZNEBMSNC.mjs.map} +1 -1
  241. package/dist/esm/cli/index.mjs +1 -12
  242. package/dist/esm/cli/localNode.mjs +1 -8
  243. package/dist/esm/cli/move.mjs +1 -7
  244. package/dist/esm/client/core.mjs +1 -27
  245. package/dist/esm/client/get.mjs +1 -32
  246. package/dist/esm/client/index.mjs +1 -55
  247. package/dist/esm/client/post.mjs +1 -36
  248. package/dist/esm/client/types.mjs +1 -7
  249. package/dist/esm/core/account/index.mjs +1 -19
  250. package/dist/esm/core/account/utils/address.mjs +1 -18
  251. package/dist/esm/core/account/utils/index.mjs +1 -19
  252. package/dist/esm/core/accountAddress.mjs +1 -15
  253. package/dist/esm/core/authenticationKey.mjs +1 -14
  254. package/dist/esm/core/common.mjs +1 -7
  255. package/dist/esm/core/crypto/ed25519.mjs +1 -29
  256. package/dist/esm/core/crypto/ephemeral.mjs +1 -28
  257. package/dist/esm/core/crypto/hdKey.mjs +1 -25
  258. package/dist/esm/core/crypto/index.mjs +1 -124
  259. package/dist/esm/core/crypto/keyless.mjs +1 -55
  260. package/dist/esm/core/crypto/multiEd25519.mjs +1 -28
  261. package/dist/esm/core/crypto/multiKey.mjs +1 -34
  262. package/dist/esm/core/crypto/poseidon.mjs +1 -15
  263. package/dist/esm/core/crypto/privateKey.mjs +1 -1
  264. package/dist/esm/core/crypto/proof.mjs +1 -19
  265. package/dist/esm/core/crypto/publicKey.mjs +1 -21
  266. package/dist/esm/core/crypto/secp256k1.mjs +1 -27
  267. package/dist/esm/core/crypto/signature.mjs +1 -19
  268. package/dist/esm/core/crypto/singleKey.mjs +1 -33
  269. package/dist/esm/core/crypto/utils.mjs +1 -9
  270. package/dist/esm/core/hex.mjs +1 -10
  271. package/dist/esm/core/index.mjs +1 -141
  272. package/dist/esm/index.mjs +1 -635
  273. package/dist/esm/internal/account.mjs +1 -106
  274. package/dist/esm/internal/ans.mjs +1 -120
  275. package/dist/esm/internal/coin.mjs +1 -85
  276. package/dist/esm/internal/digitalAsset.mjs +1 -127
  277. package/dist/esm/internal/event.mjs +1 -55
  278. package/dist/esm/internal/faucet.mjs +1 -52
  279. package/dist/esm/internal/fungibleAsset.mjs +1 -91
  280. package/dist/esm/internal/general.mjs +1 -46
  281. package/dist/esm/internal/keyless.mjs +1 -73
  282. package/dist/esm/internal/staking.mjs +1 -53
  283. package/dist/esm/internal/transaction.mjs +1 -51
  284. package/dist/esm/internal/transactionSubmission.mjs +1 -102
  285. package/dist/esm/internal/view.mjs +1 -83
  286. package/dist/esm/transactions/authenticator/account.mjs +1 -44
  287. package/dist/esm/transactions/authenticator/index.mjs +1 -60
  288. package/dist/esm/transactions/authenticator/transaction.mjs +1 -48
  289. package/dist/esm/transactions/index.mjs +1 -284
  290. package/dist/esm/transactions/instances/chainId.mjs +1 -11
  291. package/dist/esm/transactions/instances/identifier.mjs +1 -11
  292. package/dist/esm/transactions/instances/index.mjs +1 -96
  293. package/dist/esm/transactions/instances/moduleId.mjs +1 -38
  294. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -43
  295. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -48
  296. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -20
  297. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -45
  298. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -43
  299. package/dist/esm/transactions/instances/transactionArgument.mjs +1 -1
  300. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -56
  301. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -74
  302. package/dist/esm/transactions/management/asyncQueue.mjs +1 -9
  303. package/dist/esm/transactions/management/index.mjs +1 -95
  304. package/dist/esm/transactions/management/transactionWorker.mjs +1 -91
  305. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -75
  306. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -162
  307. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -85
  308. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -58
  309. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -98
  310. package/dist/esm/transactions/typeTag/index.mjs +1 -74
  311. package/dist/esm/transactions/typeTag/parser.mjs +1 -43
  312. package/dist/esm/transactions/types.mjs +1 -1
  313. package/dist/esm/types/generated/queries.mjs +1 -57
  314. package/dist/esm/types/generated/types.mjs +1 -809
  315. package/dist/esm/types/generated/types.mjs.map +1 -1
  316. package/dist/esm/types/index.mjs +1 -68
  317. package/dist/esm/types/indexer.mjs +1 -1
  318. package/dist/esm/types/keyless.mjs +1 -9
  319. package/dist/esm/utils/apiEndpoints.mjs +1 -21
  320. package/dist/esm/utils/const.mjs +1 -21
  321. package/dist/esm/utils/helpers.mjs +1 -7
  322. package/dist/esm/utils/index.mjs +1 -56
  323. package/dist/esm/utils/memoize.mjs +1 -9
  324. package/dist/esm/utils/normalizeBundle.mjs +1 -19
  325. package/dist/esm/version.d.mts +1 -1
  326. package/dist/esm/version.mjs +1 -7
  327. package/package.json +1 -1
  328. package/src/version.ts +1 -1
  329. package/dist/common/chunk-QRI7EC4T.js +0 -24
  330. package/dist/common/chunk-QRI7EC4T.js.map +0 -1
  331. package/dist/esm/chunk-2JOCR2VL.mjs +0 -32
  332. package/dist/esm/chunk-2OQW7BMN.mjs +0 -129
  333. package/dist/esm/chunk-2TJJWII2.mjs +0 -23
  334. package/dist/esm/chunk-2ZEGJU43.mjs +0 -252
  335. package/dist/esm/chunk-4OYYOYSO.mjs +0 -336
  336. package/dist/esm/chunk-55NODGHC.mjs +0 -135
  337. package/dist/esm/chunk-6LRQSBRH.mjs +0 -130
  338. package/dist/esm/chunk-6MSZMIFW.mjs +0 -23
  339. package/dist/esm/chunk-76TSTAU4.mjs +0 -120
  340. package/dist/esm/chunk-7FO3S6IZ.mjs +0 -324
  341. package/dist/esm/chunk-7FUHWL6A.mjs +0 -42
  342. package/dist/esm/chunk-7IDBB4J4.mjs +0 -33
  343. package/dist/esm/chunk-7JRMOHBP.mjs +0 -247
  344. package/dist/esm/chunk-7REUIYF4.mjs +0 -63
  345. package/dist/esm/chunk-AC3OGAL6.mjs +0 -87
  346. package/dist/esm/chunk-AR7X6GWQ.mjs +0 -356
  347. package/dist/esm/chunk-ASF2VWOX.mjs +0 -142
  348. package/dist/esm/chunk-ATVFVXR6.mjs +0 -43
  349. package/dist/esm/chunk-B5S6DDUD.mjs +0 -120
  350. package/dist/esm/chunk-BXMHDQHW.mjs +0 -512
  351. package/dist/esm/chunk-CC4DQ6NH.mjs +0 -19
  352. package/dist/esm/chunk-CMNJG4NN.mjs +0 -345
  353. package/dist/esm/chunk-CTJSZT5V.mjs +0 -87
  354. package/dist/esm/chunk-CX3NAVRD.mjs +0 -205
  355. package/dist/esm/chunk-CXUGZXED.mjs +0 -307
  356. package/dist/esm/chunk-D2BVBXWO.mjs +0 -7
  357. package/dist/esm/chunk-DGV7DYU4.mjs +0 -413
  358. package/dist/esm/chunk-DIYZRGR6.mjs +0 -242
  359. package/dist/esm/chunk-DNPMS2OF.mjs +0 -236
  360. package/dist/esm/chunk-DVPQGCFT.mjs +0 -74
  361. package/dist/esm/chunk-EYHRMZPO.mjs +0 -34
  362. package/dist/esm/chunk-F2ZWA7B7.mjs +0 -412
  363. package/dist/esm/chunk-FDWJNY4U.mjs +0 -22
  364. package/dist/esm/chunk-FF4JPDKD.mjs +0 -315
  365. package/dist/esm/chunk-FQQW55X7.mjs +0 -288
  366. package/dist/esm/chunk-FXKSE3ZP.mjs +0 -25
  367. package/dist/esm/chunk-GBEVD2VM.mjs +0 -99
  368. package/dist/esm/chunk-GGMTQAQP.mjs +0 -11
  369. package/dist/esm/chunk-GSVQ6EUD.mjs +0 -649
  370. package/dist/esm/chunk-HBNSRCZN.mjs +0 -100
  371. package/dist/esm/chunk-IC56GQFJ.mjs +0 -127
  372. package/dist/esm/chunk-IHNPN5CQ.mjs +0 -256
  373. package/dist/esm/chunk-JHDHNGJ3.mjs +0 -126
  374. package/dist/esm/chunk-JL2JHVS4.mjs +0 -49
  375. package/dist/esm/chunk-JV3GSIJW.mjs +0 -268
  376. package/dist/esm/chunk-KK2BSALW.mjs +0 -32
  377. package/dist/esm/chunk-KMXSRHJ6.mjs +0 -93
  378. package/dist/esm/chunk-KVSQ57HU.mjs +0 -45
  379. package/dist/esm/chunk-LI2QV6RU.mjs +0 -129
  380. package/dist/esm/chunk-LLLQJWRZ.mjs +0 -35
  381. package/dist/esm/chunk-LYK4TQZO.mjs +0 -70
  382. package/dist/esm/chunk-LYMY63SO.mjs +0 -124
  383. package/dist/esm/chunk-MZZLEY6O.mjs +0 -92
  384. package/dist/esm/chunk-N4WKFNQ6.mjs +0 -156
  385. package/dist/esm/chunk-NFJCQRVK.mjs +0 -37
  386. package/dist/esm/chunk-NMKCJNQM.mjs +0 -20
  387. package/dist/esm/chunk-NW45SCPY.mjs +0 -36
  388. package/dist/esm/chunk-NXFO2W4G.mjs +0 -84
  389. package/dist/esm/chunk-NYL77J4X.mjs +0 -97
  390. package/dist/esm/chunk-O6PSHSN3.mjs +0 -53
  391. package/dist/esm/chunk-OR7TEZ25.mjs +0 -16
  392. package/dist/esm/chunk-PCLNX6FS.mjs +0 -17
  393. package/dist/esm/chunk-PIMQHG2J.mjs +0 -49
  394. package/dist/esm/chunk-PU5AFUX3.mjs +0 -52
  395. package/dist/esm/chunk-PYLOAMR2.mjs +0 -29
  396. package/dist/esm/chunk-QBBTUC66.mjs +0 -15
  397. package/dist/esm/chunk-QFOG4LIN.mjs +0 -319
  398. package/dist/esm/chunk-QMM2KL6C.mjs +0 -12
  399. package/dist/esm/chunk-RCQMWXEW.mjs +0 -35
  400. package/dist/esm/chunk-RX4VG2AT.mjs +0 -314
  401. package/dist/esm/chunk-SBB4YEPT.mjs +0 -17
  402. package/dist/esm/chunk-SIJELMDP.mjs +0 -29
  403. package/dist/esm/chunk-SS3NUM5L.mjs +0 -94
  404. package/dist/esm/chunk-ST4QXIMI.mjs +0 -37
  405. package/dist/esm/chunk-TBHU6ZW6.mjs +0 -215
  406. package/dist/esm/chunk-TLNHRJB2.mjs +0 -155
  407. package/dist/esm/chunk-U3IUCR2G.mjs +0 -54
  408. package/dist/esm/chunk-U7QBZ6PP.mjs +0 -400
  409. package/dist/esm/chunk-UEBBLQJ5.mjs +0 -94
  410. package/dist/esm/chunk-UKU6A2W2.mjs +0 -232
  411. package/dist/esm/chunk-UX5NSZEN.mjs +0 -134
  412. package/dist/esm/chunk-VDJBDX3A.mjs +0 -79
  413. package/dist/esm/chunk-VJP2VWMF.mjs +0 -58
  414. package/dist/esm/chunk-VKJQORON.mjs +0 -93
  415. package/dist/esm/chunk-VPWUODU4.mjs +0 -51
  416. package/dist/esm/chunk-VZQXLVEP.mjs +0 -197
  417. package/dist/esm/chunk-W76MGKZB.mjs +0 -33
  418. package/dist/esm/chunk-WDRH2URB.mjs +0 -91
  419. package/dist/esm/chunk-WHBWEN6N.mjs +0 -206
  420. package/dist/esm/chunk-WK5ZSNE2.mjs +0 -173
  421. package/dist/esm/chunk-WLTBF4DF.mjs +0 -22
  422. package/dist/esm/chunk-WVGO4D7K.mjs +0 -254
  423. package/dist/esm/chunk-XANFAUBD.mjs +0 -44
  424. package/dist/esm/chunk-Y2LV3S5W.mjs +0 -410
  425. package/dist/esm/chunk-YV7M4CFP.mjs +0 -137
  426. package/dist/esm/chunk-YYOPNUX5.mjs +0 -41
  427. package/dist/esm/chunk-ZAHJ7KXB.mjs +0 -81
  428. package/dist/esm/chunk-ZMFKQUHL.mjs +0 -117
  429. /package/dist/esm/{chunk-OR7TEZ25.mjs.map → chunk-FVA2OPG4.mjs.map} +0 -0
@@ -1,197 +0,0 @@
1
- import {
2
- view
3
- } from "./chunk-RCQMWXEW.mjs";
4
- import {
5
- getBlockByHeight,
6
- getBlockByVersion,
7
- getChainTopUserTransactions,
8
- getIndexerLastSuccessVersion,
9
- getLedgerInfo,
10
- getProcessorStatus,
11
- getTableItem,
12
- queryIndexer
13
- } from "./chunk-LYMY63SO.mjs";
14
-
15
- // src/api/general.ts
16
- var General = class {
17
- constructor(config) {
18
- this.config = config;
19
- }
20
- /**
21
- * Queries for the Aptos ledger info
22
- *
23
- * @returns Aptos Ledger Info
24
- *
25
- * @example
26
- * const ledgerInfo = await aptos.getLedgerInfo()
27
- * // an example of the returned data
28
- * ```
29
- * {
30
- * "chain_id": 4,
31
- * "epoch": "8",
32
- * "ledger_version": "714",
33
- * "oldest_ledger_version": "0",
34
- * "ledger_timestamp": "1694695496521775",
35
- * "node_role": "validator",
36
- * "oldest_block_height": "0",
37
- * "block_height": "359",
38
- * "git_hash": "c82193f36f4e185fed9f68c4ad21f6c6dd390c6e"
39
- * }
40
- * ```
41
- */
42
- async getLedgerInfo() {
43
- return getLedgerInfo({ aptosConfig: this.config });
44
- }
45
- /**
46
- * Queries for the chain id
47
- *
48
- * @example
49
- * const chainId = await aptos.getChainId()
50
- *
51
- * @returns The chain id
52
- */
53
- async getChainId() {
54
- const result = await this.getLedgerInfo();
55
- return result.chain_id;
56
- }
57
- /**
58
- * Queries for block by transaction version
59
- *
60
- * @example
61
- * const block = await aptos.getBlockByVersion({ledgerVersion:5})
62
- *
63
- * @param args.ledgerVersion Ledger version to lookup block information for
64
- * @param args.options.withTransactions If set to true, include all transactions in the block
65
- *
66
- * @returns Block information with optional transactions
67
- */
68
- async getBlockByVersion(args) {
69
- return getBlockByVersion({
70
- aptosConfig: this.config,
71
- ...args
72
- });
73
- }
74
- /**
75
- * Get block by block height
76
- *
77
- * @example
78
- * const block = await aptos.getBlockByVersion({blockHeight:5})
79
- *
80
- * @param args.blockHeight Block height to lookup. Starts at 0
81
- * @param args.options.withTransactions If set to true, include all transactions in the block
82
- *
83
- * @returns Block with optional transactions
84
- */
85
- async getBlockByHeight(args) {
86
- return getBlockByHeight({ aptosConfig: this.config, ...args });
87
- }
88
- /**
89
- * Queries for a table item for a table identified by the handle and the key for the item.
90
- * Key and value types need to be passed in to help with key serialization and value deserialization.
91
- *
92
- * @example https://api.devnet.aptoslabs.com/v1/accounts/0x1/resource/0x1::coin::CoinInfo%3C0x1::aptos_coin::AptosCoin%3E
93
- * const tableItem = await aptos.getTableItem({
94
- * handle: "0x123",
95
- * data: {
96
- * key_type: "address", // Move type of table key
97
- * value_type: "u128", // Move type of table value
98
- * key: "0x619dc29a0aac8fa146714058e8dd6d2d0f3bdf5f6331907bf91f3acd81e6935" // Value of table key
99
- * },
100
- * })
101
- *
102
- * @param args.handle A pointer to where that table is stored
103
- * @param args.data Object that describes table item
104
- * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
105
- *
106
- * @returns Table item value rendered in JSON
107
- */
108
- async getTableItem(args) {
109
- return getTableItem({ aptosConfig: this.config, ...args });
110
- }
111
- /**
112
- * Queries for a Move view function
113
- * @param args.payload Payload for the view function
114
- * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
115
- *
116
- * @example
117
- * const data = await aptos.view({
118
- * payload: {
119
- * function: "0x1::coin::balance",
120
- * typeArguments: ["0x1::aptos_coin::AptosCoin"],
121
- * functionArguments: [accountAddress],
122
- * }
123
- * })
124
- *
125
- * @returns an array of Move values
126
- */
127
- async view(args) {
128
- return view({ aptosConfig: this.config, ...args });
129
- }
130
- /**
131
- * Queries top user transactions
132
- *
133
- * @example
134
- * const topUserTransactions = await aptos.getChainTopUserTransactions({limit:5})
135
- *
136
- * @param args.limit The number of transactions to return
137
- * @returns GetChainTopUserTransactionsResponse
138
- */
139
- async getChainTopUserTransactions(args) {
140
- return getChainTopUserTransactions({
141
- aptosConfig: this.config,
142
- ...args
143
- });
144
- }
145
- /**
146
- * A generic function for retrieving data from Aptos Indexer.
147
- * For more detailed queries specification see
148
- * {@link https://cloud.hasura.io/public/graphiql?endpoint=https://api.mainnet.aptoslabs.com/v1/graphql}
149
- *
150
- * @example
151
- * const topUserTransactions = await aptos.queryIndexer({
152
- * query: `query MyQuery {
153
- * ledger_infos {
154
- * chain_id
155
- * }}`;
156
- * })
157
- *
158
- * @param args.query.query A GraphQL query
159
- * @param args.query.variables The variables for the query
160
- *
161
- * @return The provided T type
162
- */
163
- async queryIndexer(args) {
164
- return queryIndexer({
165
- aptosConfig: this.config,
166
- ...args
167
- });
168
- }
169
- /**
170
- * Queries for the last successful indexer version
171
- *
172
- * This is useful to tell what ledger version the indexer is updated to, as it can be behind the full nodes.
173
- *
174
- * @example
175
- * const version = await aptos.getIndexerLastSuccessVersion()
176
- */
177
- async getIndexerLastSuccessVersion() {
178
- return getIndexerLastSuccessVersion({ aptosConfig: this.config });
179
- }
180
- /**
181
- * Query the processor status for a specific processor type.
182
- *
183
- * @example
184
- * const status = await aptos.getProcessorStatus({processorType:"account_transactions_processor"})
185
- *
186
- * @param processorType The processor type to query
187
- * @returns
188
- */
189
- async getProcessorStatus(processorType) {
190
- return getProcessorStatus({ aptosConfig: this.config, processorType });
191
- }
192
- };
193
-
194
- export {
195
- General
196
- };
197
- //# sourceMappingURL=chunk-VZQXLVEP.mjs.map
@@ -1,33 +0,0 @@
1
- import {
2
- ValidateFeePayerDataOnSimulation
3
- } from "./chunk-SIJELMDP.mjs";
4
- import {
5
- simulateTransaction
6
- } from "./chunk-IHNPN5CQ.mjs";
7
- import {
8
- __decorateClass
9
- } from "./chunk-OR7TEZ25.mjs";
10
-
11
- // src/api/transactionSubmission/simulate.ts
12
- var Simulate = class {
13
- constructor(config) {
14
- this.config = config;
15
- }
16
- async simple(args) {
17
- return simulateTransaction({ aptosConfig: this.config, ...args });
18
- }
19
- async multiAgent(args) {
20
- return simulateTransaction({ aptosConfig: this.config, ...args });
21
- }
22
- };
23
- __decorateClass([
24
- ValidateFeePayerDataOnSimulation
25
- ], Simulate.prototype, "simple", 1);
26
- __decorateClass([
27
- ValidateFeePayerDataOnSimulation
28
- ], Simulate.prototype, "multiAgent", 1);
29
-
30
- export {
31
- Simulate
32
- };
33
- //# sourceMappingURL=chunk-W76MGKZB.mjs.map
@@ -1,91 +0,0 @@
1
- import {
2
- TransactionWorker
3
- } from "./chunk-WVGO4D7K.mjs";
4
-
5
- // src/api/transactionSubmission/management.ts
6
- import EventEmitter from "eventemitter3";
7
- var TransactionManagement = class extends EventEmitter {
8
- constructor(config) {
9
- super();
10
- this.config = config;
11
- }
12
- /**
13
- * Internal function to start the transaction worker and
14
- * listen to worker events
15
- *
16
- * @param args.sender The sender account to sign and submit the transaction
17
- */
18
- start(args) {
19
- const { sender } = args;
20
- this.account = sender;
21
- this.transactionWorker = new TransactionWorker(this.config, sender);
22
- this.transactionWorker.start();
23
- this.registerToEvents();
24
- }
25
- /**
26
- * Internal function to push transaction data to the transaction worker.
27
- *
28
- * @param args.data An array of transaction payloads
29
- * @param args.options optional. Transaction generation configurations (excluding accountSequenceNumber)
30
- *
31
- * TODO - make this public once worker supports adding transactions to existing queue
32
- */
33
- push(args) {
34
- const { data, options } = args;
35
- for (const d of data) {
36
- this.transactionWorker.push(d, options);
37
- }
38
- }
39
- /**
40
- * Internal function to start listening to transaction worker events
41
- *
42
- * TODO - should we ask events to listen to as an input?
43
- */
44
- registerToEvents() {
45
- this.transactionWorker.on("transactionSent" /* TransactionSent */, async (data) => {
46
- this.emit("transactionSent" /* TransactionSent */, data);
47
- });
48
- this.transactionWorker.on("transactionSendFailed" /* TransactionSendFailed */, async (data) => {
49
- this.emit("transactionSendFailed" /* TransactionSendFailed */, data);
50
- });
51
- this.transactionWorker.on("transactionExecuted" /* TransactionExecuted */, async (data) => {
52
- this.emit("transactionExecuted" /* TransactionExecuted */, data);
53
- });
54
- this.transactionWorker.on("transactionExecutionFailed" /* TransactionExecutionFailed */, async (data) => {
55
- this.emit("transactionExecutionFailed" /* TransactionExecutionFailed */, data);
56
- });
57
- this.transactionWorker.on("executionFinish" /* ExecutionFinish */, async (data) => {
58
- this.emit("executionFinish" /* ExecutionFinish */, data);
59
- });
60
- }
61
- /**
62
- * Send batch transactions for a single account.
63
- *
64
- * This function uses a transaction worker that receives payloads to be processed
65
- * and submitted to chain.
66
- * Note that this process is best for submitting multiple transactions that
67
- * dont rely on each other, i.e batch funds, batch token mints, etc.
68
- *
69
- * If any worker failure, the functions throws an error.
70
- *
71
- * @param args.sender The sender account to sign and submit the transaction
72
- * @param args.data An array of transaction payloads
73
- * @param args.options optional. Transaction generation configurations (excluding accountSequenceNumber)
74
- *
75
- * @return void. Throws if any error
76
- */
77
- forSingleAccount(args) {
78
- try {
79
- const { sender, data, options } = args;
80
- this.start({ sender });
81
- this.push({ data, options });
82
- } catch (error) {
83
- throw new Error(`failed to submit transactions with error: ${error}`);
84
- }
85
- }
86
- };
87
-
88
- export {
89
- TransactionManagement
90
- };
91
- //# sourceMappingURL=chunk-WDRH2URB.mjs.map
@@ -1,206 +0,0 @@
1
- import {
2
- AnyPublicKey,
3
- AnySignature
4
- } from "./chunk-TLNHRJB2.mjs";
5
- import {
6
- Signature
7
- } from "./chunk-FDWJNY4U.mjs";
8
- import {
9
- AccountPublicKey
10
- } from "./chunk-FXKSE3ZP.mjs";
11
- import {
12
- AuthenticationKey
13
- } from "./chunk-UEBBLQJ5.mjs";
14
-
15
- // src/core/crypto/multiKey.ts
16
- function bitCount(byte) {
17
- let n = byte;
18
- n -= n >> 1 & 1431655765;
19
- n = (n & 858993459) + (n >> 2 & 858993459);
20
- return (n + (n >> 4) & 252645135) * 16843009 >> 24;
21
- }
22
- var MultiKey = class _MultiKey extends AccountPublicKey {
23
- // region Constructors
24
- constructor(args) {
25
- super();
26
- const { publicKeys, signaturesRequired } = args;
27
- if (signaturesRequired < 1) {
28
- throw new Error("The number of required signatures needs to be greater than 0");
29
- }
30
- if (publicKeys.length < signaturesRequired) {
31
- throw new Error(
32
- `Provided ${publicKeys.length} public keys is smaller than the ${signaturesRequired} required signatures`
33
- );
34
- }
35
- this.publicKeys = publicKeys.map(
36
- (publicKey) => publicKey instanceof AnyPublicKey ? publicKey : new AnyPublicKey(publicKey)
37
- );
38
- this.signaturesRequired = signaturesRequired;
39
- }
40
- // endregion
41
- // region AccountPublicKey
42
- // eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars
43
- verifySignature(args) {
44
- throw new Error("not implemented");
45
- }
46
- authKey() {
47
- return AuthenticationKey.fromSchemeAndBytes({
48
- scheme: 3 /* MultiKey */,
49
- input: this.toUint8Array()
50
- });
51
- }
52
- toUint8Array() {
53
- return this.bcsToBytes();
54
- }
55
- // endregion
56
- // region Serializable
57
- serialize(serializer) {
58
- serializer.serializeVector(this.publicKeys);
59
- serializer.serializeU8(this.signaturesRequired);
60
- }
61
- static deserialize(deserializer) {
62
- const keys = deserializer.deserializeVector(AnyPublicKey);
63
- const signaturesRequired = deserializer.deserializeU8();
64
- return new _MultiKey({ publicKeys: keys, signaturesRequired });
65
- }
66
- // endregion
67
- /**
68
- * Create a bitmap that holds the mapping from the original public keys
69
- * to the signatures passed in
70
- *
71
- * @param args.bits array of the index mapping to the matching public keys
72
- * @returns Uint8array bit map
73
- */
74
- createBitmap(args) {
75
- const { bits } = args;
76
- const firstBitInByte = 128;
77
- const bitmap = new Uint8Array([0, 0, 0, 0]);
78
- const dupCheckSet = /* @__PURE__ */ new Set();
79
- bits.forEach((bit, idx) => {
80
- if (idx + 1 > this.publicKeys.length) {
81
- throw new Error(`Signature index ${idx + 1} is out of public keys range, ${this.publicKeys.length}.`);
82
- }
83
- if (dupCheckSet.has(bit)) {
84
- throw new Error(`Duplicate bit ${bit} detected.`);
85
- }
86
- dupCheckSet.add(bit);
87
- const byteOffset = Math.floor(bit / 8);
88
- let byte = bitmap[byteOffset];
89
- byte |= firstBitInByte >> bit % 8;
90
- bitmap[byteOffset] = byte;
91
- });
92
- return bitmap;
93
- }
94
- /**
95
- * Get the index of the provided public key.
96
- *
97
- * @param publicKey array of the index mapping to the matching public keys
98
- * @returns the corresponding index of the publicKey, if it exists
99
- */
100
- getIndex(publicKey) {
101
- const anyPublicKey = publicKey instanceof AnyPublicKey ? publicKey : new AnyPublicKey(publicKey);
102
- const index = this.publicKeys.findIndex((pk) => pk.toString() === anyPublicKey.toString());
103
- if (index !== -1) {
104
- return index;
105
- }
106
- throw new Error("Public key not found in MultiKey");
107
- }
108
- };
109
- var _MultiKeySignature = class _MultiKeySignature extends Signature {
110
- /**
111
- * Signature for a K-of-N multi-sig transaction.
112
- *
113
- * @see {@link
114
- * https://aptos.dev/integration/creating-a-signed-transaction/#multisignature-transactions | Creating a Signed Transaction}
115
- *
116
- * @param args.signatures A list of signatures
117
- * @param args.bitmap 4 bytes, at most 32 signatures are supported. If Nth bit value is `1`, the Nth
118
- * signature should be provided in `signatures`. Bits are read from left to right
119
- */
120
- constructor(args) {
121
- super();
122
- const { signatures, bitmap } = args;
123
- if (signatures.length > _MultiKeySignature.MAX_SIGNATURES_SUPPORTED) {
124
- throw new Error(`The number of signatures cannot be greater than ${_MultiKeySignature.MAX_SIGNATURES_SUPPORTED}`);
125
- }
126
- this.signatures = signatures.map(
127
- (signature) => signature instanceof AnySignature ? signature : new AnySignature(signature)
128
- );
129
- if (!(bitmap instanceof Uint8Array)) {
130
- this.bitmap = _MultiKeySignature.createBitmap({ bits: bitmap });
131
- } else if (bitmap.length !== _MultiKeySignature.BITMAP_LEN) {
132
- throw new Error(`"bitmap" length should be ${_MultiKeySignature.BITMAP_LEN}`);
133
- } else {
134
- this.bitmap = bitmap;
135
- }
136
- const nSignatures = this.bitmap.reduce((acc, byte) => acc + bitCount(byte), 0);
137
- if (nSignatures !== this.signatures.length) {
138
- throw new Error(`Expecting ${nSignatures} signatures from the bitmap, but got ${this.signatures.length}`);
139
- }
140
- }
141
- /**
142
- * Helper method to create a bitmap out of the specified bit positions
143
- * @param args.bits The bitmap positions that should be set. A position starts at index 0.
144
- * Valid position should range between 0 and 31.
145
- * @example
146
- * Here's an example of valid `bits`
147
- * ```
148
- * [0, 2, 31]
149
- * ```
150
- * `[0, 2, 31]` means the 1st, 3rd and 32nd bits should be set in the bitmap.
151
- * The result bitmap should be 0b1010000000000000000000000000001
152
- *
153
- * @returns bitmap that is 32bit long
154
- */
155
- static createBitmap(args) {
156
- const { bits } = args;
157
- const firstBitInByte = 128;
158
- const bitmap = new Uint8Array([0, 0, 0, 0]);
159
- const dupCheckSet = /* @__PURE__ */ new Set();
160
- bits.forEach((bit) => {
161
- if (bit >= _MultiKeySignature.MAX_SIGNATURES_SUPPORTED) {
162
- throw new Error(`Cannot have a signature larger than ${_MultiKeySignature.MAX_SIGNATURES_SUPPORTED - 1}.`);
163
- }
164
- if (dupCheckSet.has(bit)) {
165
- throw new Error("Duplicate bits detected.");
166
- }
167
- dupCheckSet.add(bit);
168
- const byteOffset = Math.floor(bit / 8);
169
- let byte = bitmap[byteOffset];
170
- byte |= firstBitInByte >> bit % 8;
171
- bitmap[byteOffset] = byte;
172
- });
173
- return bitmap;
174
- }
175
- // region Signature
176
- toUint8Array() {
177
- return this.bcsToBytes();
178
- }
179
- // endregion
180
- // region Serializable
181
- serialize(serializer) {
182
- serializer.serializeVector(this.signatures);
183
- serializer.serializeBytes(this.bitmap);
184
- }
185
- static deserialize(deserializer) {
186
- const signatures = deserializer.deserializeVector(AnySignature);
187
- const bitmap = deserializer.deserializeBytes();
188
- return new _MultiKeySignature({ signatures, bitmap });
189
- }
190
- // endregion
191
- };
192
- /**
193
- * Number of bytes in the bitmap representing who signed the transaction (32-bits)
194
- */
195
- _MultiKeySignature.BITMAP_LEN = 4;
196
- /**
197
- * Maximum number of Ed25519 signatures supported
198
- */
199
- _MultiKeySignature.MAX_SIGNATURES_SUPPORTED = _MultiKeySignature.BITMAP_LEN * 8;
200
- var MultiKeySignature = _MultiKeySignature;
201
-
202
- export {
203
- MultiKey,
204
- MultiKeySignature
205
- };
206
- //# sourceMappingURL=chunk-WHBWEN6N.mjs.map
@@ -1,173 +0,0 @@
1
- import {
2
- Serializable,
3
- ensureBoolean,
4
- validateNumberInRange
5
- } from "./chunk-FQQW55X7.mjs";
6
- import {
7
- MAX_U128_BIG_INT,
8
- MAX_U16_NUMBER,
9
- MAX_U256_BIG_INT,
10
- MAX_U32_NUMBER,
11
- MAX_U64_BIG_INT,
12
- MAX_U8_NUMBER
13
- } from "./chunk-SBB4YEPT.mjs";
14
-
15
- // src/bcs/serializable/movePrimitives.ts
16
- var Bool = class _Bool extends Serializable {
17
- constructor(value) {
18
- super();
19
- ensureBoolean(value);
20
- this.value = value;
21
- }
22
- serialize(serializer) {
23
- serializer.serializeBool(this.value);
24
- }
25
- serializeForEntryFunction(serializer) {
26
- const bcsBytes = this.bcsToBytes();
27
- serializer.serializeBytes(bcsBytes);
28
- }
29
- serializeForScriptFunction(serializer) {
30
- serializer.serializeU32AsUleb128(5 /* Bool */);
31
- serializer.serialize(this);
32
- }
33
- static deserialize(deserializer) {
34
- return new _Bool(deserializer.deserializeBool());
35
- }
36
- };
37
- var U8 = class _U8 extends Serializable {
38
- constructor(value) {
39
- super();
40
- validateNumberInRange(value, 0, MAX_U8_NUMBER);
41
- this.value = value;
42
- }
43
- serialize(serializer) {
44
- serializer.serializeU8(this.value);
45
- }
46
- serializeForEntryFunction(serializer) {
47
- const bcsBytes = this.bcsToBytes();
48
- serializer.serializeBytes(bcsBytes);
49
- }
50
- serializeForScriptFunction(serializer) {
51
- serializer.serializeU32AsUleb128(0 /* U8 */);
52
- serializer.serialize(this);
53
- }
54
- static deserialize(deserializer) {
55
- return new _U8(deserializer.deserializeU8());
56
- }
57
- };
58
- var U16 = class _U16 extends Serializable {
59
- constructor(value) {
60
- super();
61
- validateNumberInRange(value, 0, MAX_U16_NUMBER);
62
- this.value = value;
63
- }
64
- serialize(serializer) {
65
- serializer.serializeU16(this.value);
66
- }
67
- serializeForEntryFunction(serializer) {
68
- const bcsBytes = this.bcsToBytes();
69
- serializer.serializeBytes(bcsBytes);
70
- }
71
- serializeForScriptFunction(serializer) {
72
- serializer.serializeU32AsUleb128(6 /* U16 */);
73
- serializer.serialize(this);
74
- }
75
- static deserialize(deserializer) {
76
- return new _U16(deserializer.deserializeU16());
77
- }
78
- };
79
- var U32 = class _U32 extends Serializable {
80
- constructor(value) {
81
- super();
82
- validateNumberInRange(value, 0, MAX_U32_NUMBER);
83
- this.value = value;
84
- }
85
- serialize(serializer) {
86
- serializer.serializeU32(this.value);
87
- }
88
- serializeForEntryFunction(serializer) {
89
- const bcsBytes = this.bcsToBytes();
90
- serializer.serializeBytes(bcsBytes);
91
- }
92
- serializeForScriptFunction(serializer) {
93
- serializer.serializeU32AsUleb128(7 /* U32 */);
94
- serializer.serialize(this);
95
- }
96
- static deserialize(deserializer) {
97
- return new _U32(deserializer.deserializeU32());
98
- }
99
- };
100
- var U64 = class _U64 extends Serializable {
101
- constructor(value) {
102
- super();
103
- validateNumberInRange(value, BigInt(0), MAX_U64_BIG_INT);
104
- this.value = BigInt(value);
105
- }
106
- serialize(serializer) {
107
- serializer.serializeU64(this.value);
108
- }
109
- serializeForEntryFunction(serializer) {
110
- const bcsBytes = this.bcsToBytes();
111
- serializer.serializeBytes(bcsBytes);
112
- }
113
- serializeForScriptFunction(serializer) {
114
- serializer.serializeU32AsUleb128(1 /* U64 */);
115
- serializer.serialize(this);
116
- }
117
- static deserialize(deserializer) {
118
- return new _U64(deserializer.deserializeU64());
119
- }
120
- };
121
- var U128 = class _U128 extends Serializable {
122
- constructor(value) {
123
- super();
124
- validateNumberInRange(value, BigInt(0), MAX_U128_BIG_INT);
125
- this.value = BigInt(value);
126
- }
127
- serialize(serializer) {
128
- serializer.serializeU128(this.value);
129
- }
130
- serializeForEntryFunction(serializer) {
131
- const bcsBytes = this.bcsToBytes();
132
- serializer.serializeBytes(bcsBytes);
133
- }
134
- serializeForScriptFunction(serializer) {
135
- serializer.serializeU32AsUleb128(2 /* U128 */);
136
- serializer.serialize(this);
137
- }
138
- static deserialize(deserializer) {
139
- return new _U128(deserializer.deserializeU128());
140
- }
141
- };
142
- var U256 = class _U256 extends Serializable {
143
- constructor(value) {
144
- super();
145
- validateNumberInRange(value, BigInt(0), MAX_U256_BIG_INT);
146
- this.value = BigInt(value);
147
- }
148
- serialize(serializer) {
149
- serializer.serializeU256(this.value);
150
- }
151
- serializeForEntryFunction(serializer) {
152
- const bcsBytes = this.bcsToBytes();
153
- serializer.serializeBytes(bcsBytes);
154
- }
155
- serializeForScriptFunction(serializer) {
156
- serializer.serializeU32AsUleb128(8 /* U256 */);
157
- serializer.serialize(this);
158
- }
159
- static deserialize(deserializer) {
160
- return new _U256(deserializer.deserializeU256());
161
- }
162
- };
163
-
164
- export {
165
- Bool,
166
- U8,
167
- U16,
168
- U32,
169
- U64,
170
- U128,
171
- U256
172
- };
173
- //# sourceMappingURL=chunk-WK5ZSNE2.mjs.map