@aptos-labs/ts-sdk 0.0.4 → 0.0.6

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 (462) hide show
  1. package/README.md +3 -3
  2. package/dist/{cjs → browser}/index.d.ts +357 -297
  3. package/dist/browser/index.global.js +72 -47
  4. package/dist/browser/index.global.js.map +1 -1
  5. package/dist/{esm → common}/index.d.ts +357 -297
  6. package/dist/common/index.js +406 -0
  7. package/dist/common/index.js.map +1 -0
  8. package/dist/esm/api/account.d.mts +292 -0
  9. package/dist/esm/api/account.mjs +2 -0
  10. package/dist/esm/api/account.mjs.map +1 -0
  11. package/dist/esm/api/ans.d.mts +79 -0
  12. package/dist/esm/api/ans.mjs +2 -0
  13. package/dist/esm/api/ans.mjs.map +1 -0
  14. package/dist/esm/api/aptos.d.mts +72 -0
  15. package/dist/esm/api/aptos.mjs +2 -0
  16. package/dist/esm/api/aptos.mjs.map +1 -0
  17. package/dist/esm/api/aptosConfig.d.mts +51 -0
  18. package/dist/esm/api/aptosConfig.mjs +2 -0
  19. package/dist/esm/api/aptosConfig.mjs.map +1 -0
  20. package/dist/esm/api/coin.d.mts +59 -0
  21. package/dist/esm/api/coin.mjs +2 -0
  22. package/dist/esm/api/coin.mjs.map +1 -0
  23. package/dist/esm/api/digitalAsset.d.mts +174 -0
  24. package/dist/esm/api/digitalAsset.mjs +2 -0
  25. package/dist/esm/api/digitalAsset.mjs.map +1 -0
  26. package/dist/esm/api/event.d.mts +74 -0
  27. package/dist/esm/api/event.mjs +2 -0
  28. package/dist/esm/api/event.mjs.map +1 -0
  29. package/dist/esm/api/faucet.d.mts +37 -0
  30. package/dist/esm/api/faucet.mjs +2 -0
  31. package/dist/esm/api/faucet.mjs.map +1 -0
  32. package/dist/esm/api/fungibleAsset.d.mts +72 -0
  33. package/dist/esm/api/fungibleAsset.mjs +2 -0
  34. package/dist/esm/api/fungibleAsset.mjs.map +1 -0
  35. package/dist/esm/api/general.d.mts +150 -0
  36. package/dist/esm/api/general.mjs +2 -0
  37. package/dist/esm/api/general.mjs.map +1 -0
  38. package/dist/esm/api/index.d.mts +46 -0
  39. package/dist/esm/api/index.mjs +2 -0
  40. package/dist/esm/api/index.mjs.map +1 -0
  41. package/dist/esm/api/staking.d.mts +53 -0
  42. package/dist/esm/api/staking.mjs +2 -0
  43. package/dist/esm/api/staking.mjs.map +1 -0
  44. package/dist/esm/api/transaction.d.mts +101 -0
  45. package/dist/esm/api/transaction.mjs +2 -0
  46. package/dist/esm/api/transaction.mjs.map +1 -0
  47. package/dist/esm/api/transactionSubmission.d.mts +142 -0
  48. package/dist/esm/api/transactionSubmission.mjs +2 -0
  49. package/dist/esm/api/transactionSubmission.mjs.map +1 -0
  50. package/dist/esm/bcs/consts.d.mts +14 -0
  51. package/dist/esm/bcs/consts.mjs +2 -0
  52. package/dist/esm/bcs/consts.mjs.map +1 -0
  53. package/dist/esm/bcs/deserializer.d.mts +150 -0
  54. package/dist/esm/bcs/deserializer.mjs +2 -0
  55. package/dist/esm/bcs/deserializer.mjs.map +1 -0
  56. package/dist/esm/bcs/index.d.mts +14 -0
  57. package/dist/esm/bcs/index.mjs +2 -0
  58. package/dist/esm/bcs/index.mjs.map +1 -0
  59. package/dist/esm/bcs/serializable/entryFunctionBytes.d.mts +40 -0
  60. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +2 -0
  61. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs.map +1 -0
  62. package/dist/esm/bcs/serializable/fixedBytes.d.mts +52 -0
  63. package/dist/esm/bcs/serializable/fixedBytes.mjs +2 -0
  64. package/dist/esm/bcs/serializable/fixedBytes.mjs.map +1 -0
  65. package/dist/esm/bcs/serializable/movePrimitives.d.mts +69 -0
  66. package/dist/esm/bcs/serializable/movePrimitives.mjs +2 -0
  67. package/dist/esm/bcs/serializable/movePrimitives.mjs.map +1 -0
  68. package/dist/esm/bcs/serializable/moveStructs.d.mts +284 -0
  69. package/dist/esm/bcs/serializable/moveStructs.mjs +2 -0
  70. package/dist/esm/bcs/serializable/moveStructs.mjs.map +1 -0
  71. package/dist/esm/bcs/serializer.d.mts +192 -0
  72. package/dist/esm/bcs/serializer.mjs +2 -0
  73. package/dist/esm/bcs/serializer.mjs.map +1 -0
  74. package/dist/esm/chunk-2W744GUN.mjs +2 -0
  75. package/dist/esm/chunk-2W744GUN.mjs.map +1 -0
  76. package/dist/esm/chunk-3JPVQHOR.mjs +2 -0
  77. package/dist/esm/chunk-3JPVQHOR.mjs.map +1 -0
  78. package/dist/esm/chunk-3JVGSFHP.mjs +2 -0
  79. package/dist/esm/chunk-3JVGSFHP.mjs.map +1 -0
  80. package/dist/esm/chunk-44MGBJ73.mjs +2 -0
  81. package/dist/esm/chunk-44MGBJ73.mjs.map +1 -0
  82. package/dist/esm/chunk-4ADA5BE7.mjs +2 -0
  83. package/dist/esm/chunk-4ADA5BE7.mjs.map +1 -0
  84. package/dist/esm/chunk-4RVIA63I.mjs +2 -0
  85. package/dist/esm/chunk-4RVIA63I.mjs.map +1 -0
  86. package/dist/esm/chunk-4WPQQPUF.mjs +1 -0
  87. package/dist/esm/chunk-4WPQQPUF.mjs.map +1 -0
  88. package/dist/esm/chunk-62SCW5NH.mjs +2 -0
  89. package/dist/esm/chunk-62SCW5NH.mjs.map +1 -0
  90. package/dist/esm/chunk-6FBKUTGF.mjs +2 -0
  91. package/dist/esm/chunk-6FBKUTGF.mjs.map +1 -0
  92. package/dist/esm/chunk-7MNEEVXY.mjs +2 -0
  93. package/dist/esm/chunk-7MNEEVXY.mjs.map +1 -0
  94. package/dist/esm/chunk-AAIBCWZY.mjs +2 -0
  95. package/dist/esm/chunk-AAIBCWZY.mjs.map +1 -0
  96. package/dist/esm/chunk-AH44UPM4.mjs +2 -0
  97. package/dist/esm/chunk-AH44UPM4.mjs.map +1 -0
  98. package/dist/esm/chunk-ARVSIDVB.mjs +2 -0
  99. package/dist/esm/chunk-ARVSIDVB.mjs.map +1 -0
  100. package/dist/esm/chunk-BFSEVKNA.mjs +2 -0
  101. package/dist/esm/chunk-BFSEVKNA.mjs.map +1 -0
  102. package/dist/esm/chunk-BP5ZO7NK.mjs +2 -0
  103. package/dist/esm/chunk-BP5ZO7NK.mjs.map +1 -0
  104. package/dist/esm/chunk-BPYLPPEQ.mjs +2 -0
  105. package/dist/esm/chunk-BPYLPPEQ.mjs.map +1 -0
  106. package/dist/esm/chunk-BSCOVLWS.mjs +1 -0
  107. package/dist/esm/chunk-BSCOVLWS.mjs.map +1 -0
  108. package/dist/esm/chunk-BV4OOU5Y.mjs +2 -0
  109. package/dist/esm/chunk-BV4OOU5Y.mjs.map +1 -0
  110. package/dist/esm/chunk-BWMNPUTK.mjs +2 -0
  111. package/dist/esm/chunk-BWMNPUTK.mjs.map +1 -0
  112. package/dist/esm/chunk-CYDWEPFL.mjs +1 -0
  113. package/dist/esm/chunk-CYDWEPFL.mjs.map +1 -0
  114. package/dist/esm/chunk-DNDWTM7A.mjs +2 -0
  115. package/dist/esm/chunk-DNDWTM7A.mjs.map +1 -0
  116. package/dist/esm/chunk-E7FWVXGX.mjs +1 -0
  117. package/dist/esm/chunk-E7FWVXGX.mjs.map +1 -0
  118. package/dist/esm/chunk-EFIYW4WK.mjs +2 -0
  119. package/dist/esm/chunk-EFIYW4WK.mjs.map +1 -0
  120. package/dist/esm/chunk-EGOYLZBU.mjs +2 -0
  121. package/dist/esm/chunk-EGOYLZBU.mjs.map +1 -0
  122. package/dist/esm/chunk-EQ5BEDJ7.mjs +2 -0
  123. package/dist/esm/chunk-EQ5BEDJ7.mjs.map +1 -0
  124. package/dist/esm/chunk-EWTHPMEE.mjs +2 -0
  125. package/dist/esm/chunk-EWTHPMEE.mjs.map +1 -0
  126. package/dist/esm/chunk-EYXHVA6W.mjs +2 -0
  127. package/dist/esm/chunk-EYXHVA6W.mjs.map +1 -0
  128. package/dist/esm/chunk-FBPNHF54.mjs +2 -0
  129. package/dist/esm/chunk-FBPNHF54.mjs.map +1 -0
  130. package/dist/esm/chunk-FYIFBLHU.mjs +2 -0
  131. package/dist/esm/chunk-FYIFBLHU.mjs.map +1 -0
  132. package/dist/esm/chunk-FZY4PMEE.mjs +1 -0
  133. package/dist/esm/chunk-FZY4PMEE.mjs.map +1 -0
  134. package/dist/esm/chunk-GEFQFRL3.mjs +2 -0
  135. package/dist/esm/chunk-GEFQFRL3.mjs.map +1 -0
  136. package/dist/esm/chunk-GTC7WHMV.mjs +2 -0
  137. package/dist/esm/chunk-GTC7WHMV.mjs.map +1 -0
  138. package/dist/esm/chunk-HA6JD5R6.mjs +2 -0
  139. package/dist/esm/chunk-HA6JD5R6.mjs.map +1 -0
  140. package/dist/esm/chunk-HTZTTZQJ.mjs +1 -0
  141. package/dist/esm/chunk-HTZTTZQJ.mjs.map +1 -0
  142. package/dist/esm/chunk-HVADSXTB.mjs +2 -0
  143. package/dist/esm/chunk-HVADSXTB.mjs.map +1 -0
  144. package/dist/esm/chunk-I5OYNCZS.mjs +1 -0
  145. package/dist/esm/chunk-I5OYNCZS.mjs.map +1 -0
  146. package/dist/esm/chunk-IG5CHHSI.mjs +2 -0
  147. package/dist/esm/chunk-IG5CHHSI.mjs.map +1 -0
  148. package/dist/esm/chunk-IXMB2GOK.mjs +2 -0
  149. package/dist/esm/chunk-IXMB2GOK.mjs.map +1 -0
  150. package/dist/esm/chunk-J5ZFOJN2.mjs +2 -0
  151. package/dist/esm/chunk-J5ZFOJN2.mjs.map +1 -0
  152. package/dist/esm/chunk-JDS7K2WI.mjs +2 -0
  153. package/dist/esm/chunk-JDS7K2WI.mjs.map +1 -0
  154. package/dist/esm/chunk-JZNLZMUC.mjs +2 -0
  155. package/dist/esm/chunk-JZNLZMUC.mjs.map +1 -0
  156. package/dist/esm/chunk-KC64ESLO.mjs +2 -0
  157. package/dist/esm/chunk-KC64ESLO.mjs.map +1 -0
  158. package/dist/esm/chunk-KQXRH5FK.mjs +2 -0
  159. package/dist/esm/chunk-KQXRH5FK.mjs.map +1 -0
  160. package/dist/esm/chunk-LR65XHSF.mjs +2 -0
  161. package/dist/esm/chunk-LR65XHSF.mjs.map +1 -0
  162. package/dist/esm/chunk-LV33NV4J.mjs +2 -0
  163. package/dist/esm/chunk-LV33NV4J.mjs.map +1 -0
  164. package/dist/esm/chunk-N2FKVZ4D.mjs +1 -0
  165. package/dist/esm/chunk-N2FKVZ4D.mjs.map +1 -0
  166. package/dist/esm/chunk-NGCFPQ22.mjs +2 -0
  167. package/dist/esm/chunk-NGCFPQ22.mjs.map +1 -0
  168. package/dist/esm/chunk-NTD3H2S4.mjs +2 -0
  169. package/dist/esm/chunk-NTD3H2S4.mjs.map +1 -0
  170. package/dist/esm/chunk-NYFVEKF6.mjs +2 -0
  171. package/dist/esm/chunk-NYFVEKF6.mjs.map +1 -0
  172. package/dist/esm/chunk-NZIJV4O2.mjs +2 -0
  173. package/dist/esm/chunk-NZIJV4O2.mjs.map +1 -0
  174. package/dist/esm/chunk-P32MY5YF.mjs +2 -0
  175. package/dist/esm/chunk-P32MY5YF.mjs.map +1 -0
  176. package/dist/esm/chunk-Q6N6QACD.mjs +2 -0
  177. package/dist/esm/chunk-Q6N6QACD.mjs.map +1 -0
  178. package/dist/esm/chunk-QWVR4RCV.mjs +2 -0
  179. package/dist/esm/chunk-QWVR4RCV.mjs.map +1 -0
  180. package/dist/esm/chunk-R26XML3D.mjs +2 -0
  181. package/dist/esm/chunk-R26XML3D.mjs.map +1 -0
  182. package/dist/esm/chunk-R3KWVOFG.mjs +2 -0
  183. package/dist/esm/chunk-R3KWVOFG.mjs.map +1 -0
  184. package/dist/esm/chunk-R7G3CLRI.mjs +1 -0
  185. package/dist/esm/chunk-R7G3CLRI.mjs.map +1 -0
  186. package/dist/esm/chunk-RMMOF53Q.mjs +1 -0
  187. package/dist/esm/chunk-RMMOF53Q.mjs.map +1 -0
  188. package/dist/esm/chunk-RYETO74W.mjs +2 -0
  189. package/dist/esm/chunk-RYETO74W.mjs.map +1 -0
  190. package/dist/esm/chunk-S36IYY6K.mjs +2 -0
  191. package/dist/esm/chunk-S36IYY6K.mjs.map +1 -0
  192. package/dist/esm/chunk-TCTZCPQ6.mjs +1 -0
  193. package/dist/esm/chunk-TCTZCPQ6.mjs.map +1 -0
  194. package/dist/esm/chunk-TIH6ARYP.mjs +2 -0
  195. package/dist/esm/chunk-TIH6ARYP.mjs.map +1 -0
  196. package/dist/esm/chunk-TQD4IGUM.mjs +2 -0
  197. package/dist/esm/chunk-TQD4IGUM.mjs.map +1 -0
  198. package/dist/esm/chunk-U25N2VWA.mjs +2 -0
  199. package/dist/esm/chunk-U25N2VWA.mjs.map +1 -0
  200. package/dist/esm/chunk-U3LO2FSJ.mjs +2 -0
  201. package/dist/esm/chunk-U3LO2FSJ.mjs.map +1 -0
  202. package/dist/esm/chunk-U6SZNNVL.mjs +2 -0
  203. package/dist/esm/chunk-U6SZNNVL.mjs.map +1 -0
  204. package/dist/esm/chunk-UAAI3NCA.mjs +2 -0
  205. package/dist/esm/chunk-UAAI3NCA.mjs.map +1 -0
  206. package/dist/esm/chunk-UNQNACJT.mjs +2 -0
  207. package/dist/esm/chunk-UNQNACJT.mjs.map +1 -0
  208. package/dist/esm/chunk-UPLWWSB4.mjs +2 -0
  209. package/dist/esm/chunk-UPLWWSB4.mjs.map +1 -0
  210. package/dist/esm/chunk-UYVPNUH3.mjs +1 -0
  211. package/dist/esm/chunk-UYVPNUH3.mjs.map +1 -0
  212. package/dist/esm/chunk-V3MBJJTL.mjs +1 -0
  213. package/dist/esm/chunk-V3MBJJTL.mjs.map +1 -0
  214. package/dist/esm/chunk-V45RFKH7.mjs +2 -0
  215. package/dist/esm/chunk-V45RFKH7.mjs.map +1 -0
  216. package/dist/esm/chunk-VMQWW5UT.mjs +2 -0
  217. package/dist/esm/chunk-VMQWW5UT.mjs.map +1 -0
  218. package/dist/esm/chunk-VOYW2TZW.mjs +2 -0
  219. package/dist/esm/chunk-VOYW2TZW.mjs.map +1 -0
  220. package/dist/esm/chunk-VWVEDCBM.mjs +2 -0
  221. package/dist/esm/chunk-VWVEDCBM.mjs.map +1 -0
  222. package/dist/esm/chunk-VYAVLUPJ.mjs +2 -0
  223. package/dist/esm/chunk-VYAVLUPJ.mjs.map +1 -0
  224. package/dist/esm/chunk-WKY5ENCK.mjs +2 -0
  225. package/dist/esm/chunk-WKY5ENCK.mjs.map +1 -0
  226. package/dist/esm/chunk-WX43AJTD.mjs +406 -0
  227. package/dist/esm/chunk-WX43AJTD.mjs.map +1 -0
  228. package/dist/esm/chunk-X32O46IB.mjs +2 -0
  229. package/dist/esm/chunk-X32O46IB.mjs.map +1 -0
  230. package/dist/esm/chunk-Y5DJPHJT.mjs +2 -0
  231. package/dist/esm/chunk-Y5DJPHJT.mjs.map +1 -0
  232. package/dist/esm/chunk-Y7VR7X5W.mjs +2 -0
  233. package/dist/esm/chunk-Y7VR7X5W.mjs.map +1 -0
  234. package/dist/esm/chunk-YYRDFZE6.mjs +2 -0
  235. package/dist/esm/chunk-YYRDFZE6.mjs.map +1 -0
  236. package/dist/esm/chunk-Z2UDRTHA.mjs +2 -0
  237. package/dist/esm/chunk-Z2UDRTHA.mjs.map +1 -0
  238. package/dist/esm/chunk-ZWH2ESXT.mjs +2 -0
  239. package/dist/esm/chunk-ZWH2ESXT.mjs.map +1 -0
  240. package/dist/esm/client/core.d.mts +24 -0
  241. package/dist/esm/client/core.mjs +2 -0
  242. package/dist/esm/client/core.mjs.map +1 -0
  243. package/dist/esm/client/get.d.mts +55 -0
  244. package/dist/esm/client/get.mjs +2 -0
  245. package/dist/esm/client/get.mjs.map +1 -0
  246. package/dist/esm/client/index.d.mts +11 -0
  247. package/dist/esm/client/index.mjs +2 -0
  248. package/dist/esm/client/index.mjs.map +1 -0
  249. package/dist/esm/client/post.d.mts +60 -0
  250. package/dist/esm/client/post.mjs +2 -0
  251. package/dist/esm/client/post.mjs.map +1 -0
  252. package/dist/esm/client/types.d.mts +46 -0
  253. package/dist/esm/client/types.mjs +2 -0
  254. package/dist/esm/client/types.mjs.map +1 -0
  255. package/dist/esm/core/account.d.mts +184 -0
  256. package/dist/esm/core/account.mjs +2 -0
  257. package/dist/esm/core/account.mjs.map +1 -0
  258. package/dist/esm/core/accountAddress.d.mts +244 -0
  259. package/dist/esm/core/accountAddress.mjs +2 -0
  260. package/dist/esm/core/accountAddress.mjs.map +1 -0
  261. package/dist/esm/core/authenticationKey.d.mts +74 -0
  262. package/dist/esm/core/authenticationKey.mjs +2 -0
  263. package/dist/esm/core/authenticationKey.mjs.map +1 -0
  264. package/dist/esm/core/common.d.mts +32 -0
  265. package/dist/esm/core/common.mjs +2 -0
  266. package/dist/esm/core/common.mjs.map +1 -0
  267. package/dist/esm/core/crypto/anyPublicKey.d.mts +54 -0
  268. package/dist/esm/core/crypto/anyPublicKey.mjs +2 -0
  269. package/dist/esm/core/crypto/anyPublicKey.mjs.map +1 -0
  270. package/dist/esm/core/crypto/anySignature.d.mts +31 -0
  271. package/dist/esm/core/crypto/anySignature.mjs +2 -0
  272. package/dist/esm/core/crypto/anySignature.mjs.map +1 -0
  273. package/dist/esm/core/crypto/asymmetricCrypto.d.mts +74 -0
  274. package/dist/esm/core/crypto/asymmetricCrypto.mjs +2 -0
  275. package/dist/esm/core/crypto/asymmetricCrypto.mjs.map +1 -0
  276. package/dist/esm/core/crypto/ed25519.d.mts +173 -0
  277. package/dist/esm/core/crypto/ed25519.mjs +2 -0
  278. package/dist/esm/core/crypto/ed25519.mjs.map +1 -0
  279. package/dist/esm/core/crypto/hdKey.d.mts +65 -0
  280. package/dist/esm/core/crypto/hdKey.mjs +2 -0
  281. package/dist/esm/core/crypto/hdKey.mjs.map +1 -0
  282. package/dist/esm/core/crypto/index.d.mts +17 -0
  283. package/dist/esm/core/crypto/index.mjs +2 -0
  284. package/dist/esm/core/crypto/index.mjs.map +1 -0
  285. package/dist/esm/core/crypto/multiEd25519.d.mts +126 -0
  286. package/dist/esm/core/crypto/multiEd25519.mjs +2 -0
  287. package/dist/esm/core/crypto/multiEd25519.mjs.map +1 -0
  288. package/dist/esm/core/crypto/multiKey.d.mts +52 -0
  289. package/dist/esm/core/crypto/multiKey.mjs +2 -0
  290. package/dist/esm/core/crypto/multiKey.mjs.map +1 -0
  291. package/dist/esm/core/crypto/secp256k1.d.mts +161 -0
  292. package/dist/esm/core/crypto/secp256k1.mjs +2 -0
  293. package/dist/esm/core/crypto/secp256k1.mjs.map +1 -0
  294. package/dist/esm/core/hex.d.mts +105 -0
  295. package/dist/esm/core/hex.mjs +2 -0
  296. package/dist/esm/core/hex.mjs.map +1 -0
  297. package/dist/esm/core/index.d.mts +21 -0
  298. package/dist/esm/core/index.mjs +2 -0
  299. package/dist/esm/core/index.mjs.map +1 -0
  300. package/dist/esm/index.d.mts +60 -0
  301. package/dist/esm/index.mjs +1 -5706
  302. package/dist/esm/index.mjs.map +1 -1
  303. package/dist/esm/internal/account.d.mts +143 -0
  304. package/dist/esm/internal/account.mjs +2 -0
  305. package/dist/esm/internal/account.mjs.map +1 -0
  306. package/dist/esm/internal/ans.d.mts +83 -0
  307. package/dist/esm/internal/ans.mjs +2 -0
  308. package/dist/esm/internal/ans.mjs.map +1 -0
  309. package/dist/esm/internal/coin.d.mts +43 -0
  310. package/dist/esm/internal/coin.mjs +2 -0
  311. package/dist/esm/internal/coin.mjs.map +1 -0
  312. package/dist/esm/internal/digitalAsset.d.mts +118 -0
  313. package/dist/esm/internal/digitalAsset.mjs +2 -0
  314. package/dist/esm/internal/digitalAsset.mjs.map +1 -0
  315. package/dist/esm/internal/event.d.mts +45 -0
  316. package/dist/esm/internal/event.mjs +2 -0
  317. package/dist/esm/internal/event.mjs.map +1 -0
  318. package/dist/esm/internal/faucet.d.mts +29 -0
  319. package/dist/esm/internal/faucet.mjs +2 -0
  320. package/dist/esm/internal/faucet.mjs.map +1 -0
  321. package/dist/esm/internal/fungibleAsset.d.mts +38 -0
  322. package/dist/esm/internal/fungibleAsset.mjs +2 -0
  323. package/dist/esm/internal/fungibleAsset.mjs.map +1 -0
  324. package/dist/esm/internal/general.d.mts +60 -0
  325. package/dist/esm/internal/general.mjs +2 -0
  326. package/dist/esm/internal/general.mjs.map +1 -0
  327. package/dist/esm/internal/staking.d.mts +38 -0
  328. package/dist/esm/internal/staking.mjs +2 -0
  329. package/dist/esm/internal/staking.mjs.map +1 -0
  330. package/dist/esm/internal/transaction.d.mts +57 -0
  331. package/dist/esm/internal/transaction.mjs +2 -0
  332. package/dist/esm/internal/transaction.mjs.map +1 -0
  333. package/dist/esm/internal/transactionSubmission.d.mts +148 -0
  334. package/dist/esm/internal/transactionSubmission.mjs +2 -0
  335. package/dist/esm/internal/transactionSubmission.mjs.map +1 -0
  336. package/dist/esm/transactions/authenticator/account.d.mts +79 -0
  337. package/dist/esm/transactions/authenticator/account.mjs +2 -0
  338. package/dist/esm/transactions/authenticator/account.mjs.map +1 -0
  339. package/dist/esm/transactions/authenticator/index.d.mts +19 -0
  340. package/dist/esm/transactions/authenticator/index.mjs +2 -0
  341. package/dist/esm/transactions/authenticator/index.mjs.map +1 -0
  342. package/dist/esm/transactions/authenticator/transaction.d.mts +105 -0
  343. package/dist/esm/transactions/authenticator/transaction.mjs +2 -0
  344. package/dist/esm/transactions/authenticator/transaction.mjs.map +1 -0
  345. package/dist/esm/transactions/index.d.mts +39 -0
  346. package/dist/esm/transactions/index.mjs +2 -0
  347. package/dist/esm/transactions/index.mjs.map +1 -0
  348. package/dist/esm/transactions/instances/chainId.d.mts +21 -0
  349. package/dist/esm/transactions/instances/chainId.mjs +2 -0
  350. package/dist/esm/transactions/instances/chainId.mjs.map +1 -0
  351. package/dist/esm/transactions/instances/identifier.d.mts +23 -0
  352. package/dist/esm/transactions/instances/identifier.mjs +2 -0
  353. package/dist/esm/transactions/instances/identifier.mjs.map +1 -0
  354. package/dist/esm/transactions/instances/index.d.mts +29 -0
  355. package/dist/esm/transactions/instances/index.mjs +2 -0
  356. package/dist/esm/transactions/instances/index.mjs.map +1 -0
  357. package/dist/esm/transactions/instances/moduleId.d.mts +37 -0
  358. package/dist/esm/transactions/instances/moduleId.mjs +2 -0
  359. package/dist/esm/transactions/instances/moduleId.mjs.map +1 -0
  360. package/dist/esm/transactions/instances/rawTransaction.d.mts +98 -0
  361. package/dist/esm/transactions/instances/rawTransaction.mjs +2 -0
  362. package/dist/esm/transactions/instances/rawTransaction.mjs.map +1 -0
  363. package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +37 -0
  364. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +2 -0
  365. package/dist/esm/transactions/instances/rotationProofChallenge.mjs.map +1 -0
  366. package/dist/esm/transactions/instances/signedTransaction.d.mts +46 -0
  367. package/dist/esm/transactions/instances/signedTransaction.mjs +2 -0
  368. package/dist/esm/transactions/instances/signedTransaction.mjs.map +1 -0
  369. package/dist/esm/transactions/instances/transactionArgument.d.mts +40 -0
  370. package/dist/esm/transactions/instances/transactionArgument.mjs +2 -0
  371. package/dist/esm/transactions/instances/transactionArgument.mjs.map +1 -0
  372. package/dist/esm/transactions/instances/transactionPayload.d.mts +211 -0
  373. package/dist/esm/transactions/instances/transactionPayload.mjs +2 -0
  374. package/dist/esm/transactions/instances/transactionPayload.mjs.map +1 -0
  375. package/dist/esm/transactions/transactionBuilder/helpers.d.mts +63 -0
  376. package/dist/esm/transactions/transactionBuilder/helpers.mjs +2 -0
  377. package/dist/esm/transactions/transactionBuilder/helpers.mjs.map +1 -0
  378. package/dist/esm/transactions/transactionBuilder/index.d.mts +35 -0
  379. package/dist/esm/transactions/transactionBuilder/index.mjs +2 -0
  380. package/dist/esm/transactions/transactionBuilder/index.mjs.map +1 -0
  381. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +54 -0
  382. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +2 -0
  383. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs.map +1 -0
  384. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +126 -0
  385. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +2 -0
  386. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs.map +1 -0
  387. package/dist/esm/transactions/typeTag/index.d.mts +127 -0
  388. package/dist/esm/transactions/typeTag/index.mjs +2 -0
  389. package/dist/esm/transactions/typeTag/index.mjs.map +1 -0
  390. package/dist/esm/transactions/typeTag/parser.d.mts +48 -0
  391. package/dist/esm/transactions/typeTag/parser.mjs +2 -0
  392. package/dist/esm/transactions/typeTag/parser.mjs.map +1 -0
  393. package/dist/esm/transactions/types.d.mts +242 -0
  394. package/dist/esm/transactions/types.mjs +2 -0
  395. package/dist/esm/transactions/types.mjs.map +1 -0
  396. package/dist/esm/types/generated/operations.d.mts +604 -0
  397. package/dist/esm/types/generated/operations.mjs +1 -0
  398. package/dist/esm/types/generated/operations.mjs.map +1 -0
  399. package/dist/esm/types/generated/queries.d.mts +55 -0
  400. package/dist/esm/types/generated/queries.mjs +2 -0
  401. package/dist/esm/types/generated/queries.mjs.map +1 -0
  402. package/dist/esm/types/generated/types.d.mts +9496 -0
  403. package/dist/esm/types/generated/types.mjs +2 -0
  404. package/dist/esm/types/generated/types.mjs.map +1 -0
  405. package/dist/esm/types/index.d.mts +886 -0
  406. package/dist/esm/types/index.mjs +2 -0
  407. package/dist/esm/types/index.mjs.map +1 -0
  408. package/dist/esm/types/indexer.d.mts +62 -0
  409. package/dist/esm/types/indexer.mjs +2 -0
  410. package/dist/esm/types/indexer.mjs.map +1 -0
  411. package/dist/esm/utils/apiEndpoints.d.mts +14 -0
  412. package/dist/esm/utils/apiEndpoints.mjs +2 -0
  413. package/dist/esm/utils/apiEndpoints.mjs.map +1 -0
  414. package/dist/esm/utils/const.d.mts +42 -0
  415. package/dist/esm/utils/const.mjs +2 -0
  416. package/dist/esm/utils/const.mjs.map +1 -0
  417. package/dist/esm/utils/helpers.d.mts +7 -0
  418. package/dist/esm/utils/helpers.mjs +2 -0
  419. package/dist/esm/utils/helpers.mjs.map +1 -0
  420. package/dist/esm/utils/index.d.mts +2 -0
  421. package/dist/esm/utils/index.mjs +2 -0
  422. package/dist/esm/utils/index.mjs.map +1 -0
  423. package/dist/esm/utils/memoize.d.mts +20 -0
  424. package/dist/esm/utils/memoize.mjs +2 -0
  425. package/dist/esm/utils/memoize.mjs.map +1 -0
  426. package/dist/esm/version.d.mts +8 -0
  427. package/dist/esm/version.mjs +2 -0
  428. package/dist/esm/version.mjs.map +1 -0
  429. package/package.json +43 -40
  430. package/src/api/account.ts +2 -2
  431. package/src/api/coin.ts +2 -2
  432. package/src/api/event.ts +2 -2
  433. package/src/api/general.ts +4 -4
  434. package/src/api/transactionSubmission.ts +20 -3
  435. package/src/bcs/serializable/moveStructs.ts +8 -4
  436. package/src/client/core.ts +7 -5
  437. package/src/client/get.ts +6 -2
  438. package/src/client/post.ts +12 -4
  439. package/src/core/account.ts +7 -4
  440. package/src/index.ts +1 -1
  441. package/src/internal/account.ts +2 -2
  442. package/src/internal/ans.ts +4 -6
  443. package/src/internal/coin.ts +2 -2
  444. package/src/internal/event.ts +3 -3
  445. package/src/internal/general.ts +7 -6
  446. package/src/internal/queries/getEvents.graphql +1 -0
  447. package/src/internal/transactionSubmission.ts +41 -3
  448. package/src/transactions/transactionBuilder/helpers.ts +2 -2
  449. package/src/transactions/transactionBuilder/remoteAbi.ts +1 -1
  450. package/src/transactions/transactionBuilder/transactionBuilder.ts +15 -20
  451. package/src/transactions/typeTag/parser.ts +10 -2
  452. package/src/transactions/types.ts +5 -14
  453. package/src/types/generated/operations.ts +52 -51
  454. package/src/types/generated/queries.ts +42 -41
  455. package/src/types/generated/types.ts +2257 -2249
  456. package/src/types/index.ts +20 -12
  457. package/src/utils/index.ts +2 -0
  458. package/dist/cjs/index.js +0 -5901
  459. package/dist/cjs/index.js.map +0 -1
  460. package/dist/types/index.d.ts +0 -1310
  461. package/dist/types/index.js +0 -176
  462. package/dist/types/index.js.map +0 -1
@@ -0,0 +1,244 @@
1
+ import { Serializable, Serializer } from '../bcs/serializer.mjs';
2
+ import { Deserializer } from '../bcs/deserializer.mjs';
3
+ import { ParsingResult } from './common.mjs';
4
+ import { TransactionArgument } from '../transactions/instances/transactionArgument.mjs';
5
+ import { HexInput } from '../types/index.mjs';
6
+ import './hex.mjs';
7
+ import '../utils/apiEndpoints.mjs';
8
+ import '../types/indexer.mjs';
9
+ import '../types/generated/operations.mjs';
10
+ import '../types/generated/types.mjs';
11
+
12
+ /**
13
+ * This enum is used to explain why an address was invalid.
14
+ */
15
+ declare enum AddressInvalidReason {
16
+ INCORRECT_NUMBER_OF_BYTES = "incorrect_number_of_bytes",
17
+ INVALID_HEX_CHARS = "invalid_hex_chars",
18
+ TOO_SHORT = "too_short",
19
+ TOO_LONG = "too_long",
20
+ LEADING_ZERO_X_REQUIRED = "leading_zero_x_required",
21
+ LONG_FORM_REQUIRED_UNLESS_SPECIAL = "long_form_required_unless_special",
22
+ INVALID_PADDING_ZEROES = "INVALID_PADDING_ZEROES"
23
+ }
24
+ type AccountAddressInput = HexInput | AccountAddress;
25
+ /**
26
+ * NOTE: Only use this class for account addresses. For other hex data, e.g. transaction
27
+ * hashes, use the Hex class.
28
+ *
29
+ * AccountAddress is used for working with account addresses. Account addresses, when
30
+ * represented as a string, generally look like these examples:
31
+ * - 0x1
32
+ * - 0xaa86fe99004361f747f91342ca13c426ca0cccb0c1217677180c9493bad6ef0c
33
+ *
34
+ * Proper formatting and parsing of account addresses is defined by AIP-40.
35
+ * To learn more about the standard, read the AIP here:
36
+ * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.
37
+ *
38
+ * The comments in this class make frequent reference to the LONG and SHORT formats,
39
+ * as well as "special" addresses. To learn what these refer to see AIP-40.
40
+ */
41
+ declare class AccountAddress extends Serializable implements TransactionArgument {
42
+ /**
43
+ * This is the internal representation of an account address.
44
+ */
45
+ readonly data: Uint8Array;
46
+ /**
47
+ * The number of bytes that make up an account address.
48
+ */
49
+ static readonly LENGTH: number;
50
+ /**
51
+ * The length of an address string in LONG form without a leading 0x.
52
+ */
53
+ static readonly LONG_STRING_LENGTH: number;
54
+ static ZERO: AccountAddress;
55
+ static ONE: AccountAddress;
56
+ static TWO: AccountAddress;
57
+ static THREE: AccountAddress;
58
+ static FOUR: AccountAddress;
59
+ /**
60
+ * Creates an instance of AccountAddress from a Uint8Array.
61
+ *
62
+ * @param args.data A Uint8Array representing an account address.
63
+ */
64
+ constructor(input: Uint8Array);
65
+ /**
66
+ * Returns whether an address is special, where special is defined as 0x0 to 0xf
67
+ * inclusive. In other words, the last byte of the address must be < 0b10000 (16)
68
+ * and every other byte must be zero.
69
+ *
70
+ * For more information on how special addresses are defined see AIP-40:
71
+ * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.
72
+ *
73
+ * @returns true if the address is special, false if not.
74
+ */
75
+ isSpecial(): boolean;
76
+ /**
77
+ * Return the AccountAddress as a string as per AIP-40.
78
+ * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.
79
+ *
80
+ * In short, it means that special addresses are represented in SHORT form, meaning
81
+ * 0x0 through to 0xf inclusive, and every other address is represented in LONG form,
82
+ * meaning 0x + 64 hex characters.
83
+ *
84
+ * @returns AccountAddress as a string conforming to AIP-40.
85
+ */
86
+ toString(): `0x${string}`;
87
+ /**
88
+ * NOTE: Prefer to use `toString` where possible.
89
+ *
90
+ * Return the AccountAddress as a string as per AIP-40 but without the leading 0x.
91
+ *
92
+ * Learn more by reading the docstring of `toString`.
93
+ *
94
+ * @returns AccountAddress as a string conforming to AIP-40 but without the leading 0x.
95
+ */
96
+ toStringWithoutPrefix(): string;
97
+ /**
98
+ * NOTE: Prefer to use `toString` where possible.
99
+ *
100
+ * Whereas toString will format special addresses (as defined by isSpecial) using the
101
+ * SHORT form (no leading 0s), this format the address in the LONG format
102
+ * unconditionally.
103
+ *
104
+ * This means it will be 0x + 64 hex characters.
105
+ *
106
+ * @returns AccountAddress as a string in LONG form.
107
+ */
108
+ toStringLong(): `0x${string}`;
109
+ /**
110
+ * NOTE: Prefer to use `toString` where possible.
111
+ *
112
+ * Whereas toString will format special addresses (as defined by isSpecial) using the
113
+ * SHORT form (no leading 0s), this function will include leading zeroes. The string
114
+ * will not have a leading zero.
115
+ *
116
+ * This means it will be 64 hex characters without a leading 0x.
117
+ *
118
+ * @returns AccountAddress as a string in LONG form without a leading 0x.
119
+ */
120
+ toStringLongWithoutPrefix(): string;
121
+ /**
122
+ * Get the inner hex data. The inner data is already a Uint8Array so no conversion
123
+ * is taking place here, it just returns the inner data.
124
+ *
125
+ * @returns Hex data as Uint8Array
126
+ */
127
+ toUint8Array(): Uint8Array;
128
+ /**
129
+ * Serialize the AccountAddress to a Serializer instance's data buffer.
130
+ * @param serializer The serializer to serialize the AccountAddress to.
131
+ * @returns void
132
+ * @example
133
+ * const serializer = new Serializer();
134
+ * const address = AccountAddress.fromString("0x1");
135
+ * address.serialize(serializer);
136
+ * const bytes = serializer.toUint8Array();
137
+ * // `bytes` is now the BCS-serialized address.
138
+ */
139
+ serialize(serializer: Serializer): void;
140
+ serializeForEntryFunction(serializer: Serializer): void;
141
+ serializeForScriptFunction(serializer: Serializer): void;
142
+ /**
143
+ * Deserialize an AccountAddress from the byte buffer in a Deserializer instance.
144
+ * @param deserializer The deserializer to deserialize the AccountAddress from.
145
+ * @returns An instance of AccountAddress.
146
+ * @example
147
+ * const bytes = hexToBytes("0x0102030405060708091011121314151617181920212223242526272829303132");
148
+ * const deserializer = new Deserializer(bytes);
149
+ * const address = AccountAddress.deserialize(deserializer);
150
+ * // `address` is now an instance of AccountAddress.
151
+ */
152
+ static deserialize(deserializer: Deserializer): AccountAddress;
153
+ /**
154
+ * NOTE: This function has strict parsing behavior. For relaxed behavior, please use
155
+ * the `fromStringRelaxed` function.
156
+ *
157
+ * Creates an instance of AccountAddress from a hex string.
158
+ *
159
+ * This function allows only the strictest formats defined by AIP-40. In short this
160
+ * means only the following formats are accepted:
161
+ *
162
+ * - LONG
163
+ * - SHORT for special addresses
164
+ *
165
+ * Where:
166
+ * - LONG is defined as 0x + 64 hex characters.
167
+ * - SHORT for special addresses is 0x0 to 0xf inclusive without padding zeroes.
168
+ *
169
+ * This means the following are not accepted:
170
+ * - SHORT for non-special addresses.
171
+ * - Any address without a leading 0x.
172
+ *
173
+ * Learn more about the different address formats by reading AIP-40:
174
+ * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.
175
+ *
176
+ * @param input A hex string representing an account address.
177
+ *
178
+ * @returns An instance of AccountAddress.
179
+ */
180
+ static fromString(input: string): AccountAddress;
181
+ /**
182
+ * NOTE: This function has relaxed parsing behavior. For strict behavior, please use
183
+ * the `fromString` function. Where possible use `fromString` rather than this
184
+ * function, `fromStringRelaxed` is only provided for backwards compatibility.
185
+ *
186
+ * Creates an instance of AccountAddress from a hex string.
187
+ *
188
+ * This function allows all formats defined by AIP-40. In short this means the
189
+ * following formats are accepted:
190
+ *
191
+ * - LONG, with or without leading 0x
192
+ * - SHORT, with or without leading 0x
193
+ *
194
+ * Where:
195
+ * - LONG is 64 hex characters.
196
+ * - SHORT is 1 to 63 hex characters inclusive.
197
+ * - Padding zeroes are allowed, e.g. 0x0123 is valid.
198
+ *
199
+ * Learn more about the different address formats by reading AIP-40:
200
+ * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.
201
+ *
202
+ * @param input A hex string representing an account address.
203
+ *
204
+ * @returns An instance of AccountAddress.
205
+ */
206
+ static fromStringRelaxed(input: string): AccountAddress;
207
+ /**
208
+ * Convenience method for creating an AccountAddress from all known inputs.
209
+ *
210
+ * This handles, Uint8array, string, and AccountAddress itself
211
+ * @param input
212
+ */
213
+ static fromRelaxed(input: AccountAddressInput): AccountAddress;
214
+ /**
215
+ * Convenience method for creating an AccountAddress from all known inputs.
216
+ *
217
+ * This handles, Uint8array, string, and AccountAddress itself
218
+ * @param input
219
+ */
220
+ static from(input: AccountAddressInput): AccountAddress;
221
+ /**
222
+ * Check if the string is a valid AccountAddress.
223
+ *
224
+ * @param args.input A hex string representing an account address.
225
+ * @param args.relaxed If true, use relaxed parsing behavior. If false, use strict parsing behavior.
226
+ *
227
+ * @returns valid = true if the string is valid, valid = false if not. If the string
228
+ * is not valid, invalidReason will be set explaining why it is invalid.
229
+ */
230
+ static isValid(args: {
231
+ input: AccountAddressInput;
232
+ relaxed?: boolean;
233
+ }): ParsingResult<AddressInvalidReason>;
234
+ /**
235
+ * Return whether AccountAddresses are equal. AccountAddresses are considered equal
236
+ * if their underlying byte data is identical.
237
+ *
238
+ * @param other The AccountAddress to compare to.
239
+ * @returns true if the AccountAddresses are equal, false if not.
240
+ */
241
+ equals(other: AccountAddress): boolean;
242
+ }
243
+
244
+ export { AccountAddress, AccountAddressInput, AddressInvalidReason };
@@ -0,0 +1,2 @@
1
+ import{a,b}from"../chunk-NZIJV4O2.mjs";import"../chunk-HA6JD5R6.mjs";import"../chunk-DNDWTM7A.mjs";import"../chunk-TIH6ARYP.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-Y7VR7X5W.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-ZWH2ESXT.mjs";export{b as AccountAddress,a as AddressInvalidReason};
2
+ //# sourceMappingURL=accountAddress.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,74 @@
1
+ import { AccountAddress } from './accountAddress.mjs';
2
+ import { PublicKey } from './crypto/asymmetricCrypto.mjs';
3
+ import { Hex } from './hex.mjs';
4
+ import { HexInput, AuthenticationKeyScheme } from '../types/index.mjs';
5
+ import { Serializable, Serializer } from '../bcs/serializer.mjs';
6
+ import { Deserializer } from '../bcs/deserializer.mjs';
7
+ import './common.mjs';
8
+ import '../transactions/instances/transactionArgument.mjs';
9
+ import '../utils/apiEndpoints.mjs';
10
+ import '../types/indexer.mjs';
11
+ import '../types/generated/operations.mjs';
12
+ import '../types/generated/types.mjs';
13
+
14
+ /**
15
+ * Each account stores an authentication key. Authentication key enables account owners to rotate
16
+ * their private key(s) associated with the account without changing the address that hosts their account.
17
+ * @see {@link https://aptos.dev/concepts/accounts | Account Basics}
18
+ *
19
+ * Account addresses can be derived from AuthenticationKey
20
+ */
21
+ declare class AuthenticationKey extends Serializable {
22
+ /**
23
+ * An authentication key is always a SHA3-256 hash of data, and is always 32 bytes.
24
+ *
25
+ * The data to hash depends on the underlying public key type and the derivation scheme.
26
+ */
27
+ static readonly LENGTH: number;
28
+ /**
29
+ * The raw bytes of the authentication key.
30
+ */
31
+ readonly data: Hex;
32
+ constructor(args: {
33
+ data: HexInput;
34
+ });
35
+ serialize(serializer: Serializer): void;
36
+ /**
37
+ * Deserialize an AuthenticationKey from the byte buffer in a Deserializer instance.
38
+ * @param deserializer The deserializer to deserialize the AuthenticationKey from.
39
+ * @returns An instance of AuthenticationKey.
40
+ */
41
+ static deserialize(deserializer: Deserializer): AuthenticationKey;
42
+ toString(): string;
43
+ toUint8Array(): Uint8Array;
44
+ /**
45
+ * Derives an AuthenticationKey from the public key seed bytes and an explicit derivation scheme.
46
+ *
47
+ * This facilitates targeting a specific scheme for deriving an authentication key from a public key.
48
+ *
49
+ * @param args - the public key and scheme to use for the derivation
50
+ */
51
+ static fromPublicKeyAndScheme(args: {
52
+ publicKey: PublicKey;
53
+ scheme: AuthenticationKeyScheme;
54
+ }): AuthenticationKey;
55
+ /**
56
+ * Converts a PublicKey(s) to an AuthenticationKey, using the derivation scheme inferred from the
57
+ * instance of the PublicKey type passed in.
58
+ *
59
+ * @param args.publicKey
60
+ * @returns AuthenticationKey
61
+ */
62
+ static fromPublicKey(args: {
63
+ publicKey: PublicKey;
64
+ }): AuthenticationKey;
65
+ /**
66
+ * Derives an account address from an AuthenticationKey. Since an AccountAddress is also 32 bytes,
67
+ * the AuthenticationKey bytes are directly translated to an AccountAddress.
68
+ *
69
+ * @returns AccountAddress
70
+ */
71
+ derivedAddress(): AccountAddress;
72
+ }
73
+
74
+ export { AuthenticationKey };
@@ -0,0 +1,2 @@
1
+ import{a}from"../chunk-U3LO2FSJ.mjs";import"../chunk-U25N2VWA.mjs";import"../chunk-44MGBJ73.mjs";import"../chunk-YYRDFZE6.mjs";import"../chunk-62SCW5NH.mjs";import"../chunk-RYETO74W.mjs";import"../chunk-EFIYW4WK.mjs";import"../chunk-LR65XHSF.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-HVADSXTB.mjs";import"../chunk-BPYLPPEQ.mjs";import"../chunk-4ADA5BE7.mjs";import"../chunk-X32O46IB.mjs";import"../chunk-GTC7WHMV.mjs";import"../chunk-NZIJV4O2.mjs";import"../chunk-HA6JD5R6.mjs";import"../chunk-DNDWTM7A.mjs";import"../chunk-TIH6ARYP.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-Y7VR7X5W.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-ZWH2ESXT.mjs";export{a as AuthenticationKey};
2
+ //# sourceMappingURL=authenticationKey.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * This error is used to explain why parsing failed.
3
+ */
4
+ declare class ParsingError<T> extends Error {
5
+ /**
6
+ * This provides a programmatic way to access why parsing failed. Downstream devs
7
+ * might want to use this to build their own error messages if the default error
8
+ * messages are not suitable for their use case. This should be an enum.
9
+ */
10
+ invalidReason: T;
11
+ constructor(message: string, invalidReason: T);
12
+ }
13
+ /**
14
+ * Whereas ParsingError is thrown when parsing fails, e.g. in a fromString function,
15
+ * this type is returned from "defensive" functions like isValid.
16
+ */
17
+ type ParsingResult<T> = {
18
+ /**
19
+ * True if valid, false otherwise.
20
+ */
21
+ valid: boolean;
22
+ /**
23
+ * If valid is false, this will be a code explaining why parsing failed.
24
+ */
25
+ invalidReason?: T;
26
+ /**
27
+ * If valid is false, this will be a string explaining why parsing failed.
28
+ */
29
+ invalidReasonMessage?: string;
30
+ };
31
+
32
+ export { ParsingError, ParsingResult };
@@ -0,0 +1,2 @@
1
+ import{a}from"../chunk-FBPNHF54.mjs";import"../chunk-ZWH2ESXT.mjs";export{a as ParsingError};
2
+ //# sourceMappingURL=common.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,54 @@
1
+ import { Deserializer } from '../../bcs/deserializer.mjs';
2
+ import { Serializer } from '../../bcs/serializer.mjs';
3
+ import { HexInput } from '../../types/index.mjs';
4
+ import { AnySignature } from './anySignature.mjs';
5
+ import { PublicKey } from './asymmetricCrypto.mjs';
6
+ import '../../utils/apiEndpoints.mjs';
7
+ import '../../types/indexer.mjs';
8
+ import '../../types/generated/operations.mjs';
9
+ import '../../types/generated/types.mjs';
10
+ import '../hex.mjs';
11
+ import '../common.mjs';
12
+
13
+ /**
14
+ * Represents any public key supported by Aptos.
15
+ *
16
+ * Since [AIP-55](https://github.com/aptos-foundation/AIPs/pull/263) Aptos supports
17
+ * `Legacy` and `Unified` authentication keys.
18
+ *
19
+ * Any unified authentication key is represented in the SDK as `AnyPublicKey`.
20
+ */
21
+ declare class AnyPublicKey extends PublicKey {
22
+ /**
23
+ * Reference to the inner public key
24
+ */
25
+ readonly publicKey: PublicKey;
26
+ constructor(publicKey: PublicKey);
27
+ /**
28
+ * Get the public key in bytes (Uint8Array).
29
+ *
30
+ * @returns Uint8Array representation of the public key
31
+ */
32
+ toUint8Array(): Uint8Array;
33
+ /**
34
+ * Get the public key as a hex string with the 0x prefix.
35
+ *
36
+ * @returns string representation of the public key
37
+ */
38
+ toString(): string;
39
+ /**
40
+ * Verifies a signed data with a public key
41
+ *
42
+ * @param args.message message
43
+ * @param args.signature The signature
44
+ * @returns true if the signature is valid
45
+ */
46
+ verifySignature(args: {
47
+ message: HexInput;
48
+ signature: AnySignature;
49
+ }): boolean;
50
+ serialize(serializer: Serializer): void;
51
+ static deserialize(deserializer: Deserializer): AnyPublicKey;
52
+ }
53
+
54
+ export { AnyPublicKey };
@@ -0,0 +1,2 @@
1
+ import{a}from"../../chunk-YYRDFZE6.mjs";import"../../chunk-62SCW5NH.mjs";import"../../chunk-RYETO74W.mjs";import"../../chunk-EFIYW4WK.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-HVADSXTB.mjs";import"../../chunk-BPYLPPEQ.mjs";import"../../chunk-4ADA5BE7.mjs";import"../../chunk-X32O46IB.mjs";import"../../chunk-GTC7WHMV.mjs";import"../../chunk-HA6JD5R6.mjs";import"../../chunk-DNDWTM7A.mjs";import"../../chunk-TIH6ARYP.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-Y7VR7X5W.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-ZWH2ESXT.mjs";export{a as AnyPublicKey};
2
+ //# sourceMappingURL=anyPublicKey.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,31 @@
1
+ import { Deserializer } from '../../bcs/deserializer.mjs';
2
+ import { Serializer } from '../../bcs/serializer.mjs';
3
+ import { Signature } from './asymmetricCrypto.mjs';
4
+ import '../../types/index.mjs';
5
+ import '../../utils/apiEndpoints.mjs';
6
+ import '../../types/indexer.mjs';
7
+ import '../../types/generated/operations.mjs';
8
+ import '../../types/generated/types.mjs';
9
+ import '../hex.mjs';
10
+ import '../common.mjs';
11
+
12
+ declare class AnySignature extends Signature {
13
+ readonly signature: Signature;
14
+ constructor(signature: Signature);
15
+ /**
16
+ * Get the public key in bytes (Uint8Array).
17
+ *
18
+ * @returns Uint8Array representation of the public key
19
+ */
20
+ toUint8Array(): Uint8Array;
21
+ /**
22
+ * Get the public key as a hex string with the 0x prefix.
23
+ *
24
+ * @returns string representation of the public key
25
+ */
26
+ toString(): string;
27
+ serialize(serializer: Serializer): void;
28
+ static deserialize(deserializer: Deserializer): AnySignature;
29
+ }
30
+
31
+ export { AnySignature };
@@ -0,0 +1,2 @@
1
+ import{a}from"../../chunk-QWVR4RCV.mjs";import"../../chunk-62SCW5NH.mjs";import"../../chunk-RYETO74W.mjs";import"../../chunk-EFIYW4WK.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-HVADSXTB.mjs";import"../../chunk-BPYLPPEQ.mjs";import"../../chunk-4ADA5BE7.mjs";import"../../chunk-X32O46IB.mjs";import"../../chunk-GTC7WHMV.mjs";import"../../chunk-HA6JD5R6.mjs";import"../../chunk-DNDWTM7A.mjs";import"../../chunk-TIH6ARYP.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-Y7VR7X5W.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-ZWH2ESXT.mjs";export{a as AnySignature};
2
+ //# sourceMappingURL=anySignature.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,74 @@
1
+ import { HexInput } from '../../types/index.mjs';
2
+ import { Serializable, Serializer } from '../../bcs/serializer.mjs';
3
+ import '../../utils/apiEndpoints.mjs';
4
+ import '../../types/indexer.mjs';
5
+ import '../../types/generated/operations.mjs';
6
+ import '../../types/generated/types.mjs';
7
+ import '../hex.mjs';
8
+ import '../common.mjs';
9
+
10
+ /**
11
+ * An abstract representation of a public key. All Asymmetric key pairs will use this to
12
+ * verify signatures and for authentication keys.
13
+ */
14
+ declare abstract class PublicKey extends Serializable {
15
+ /**
16
+ * Verifies that the private key associated with this public key signed the message with the given signature.
17
+ * @param args.message The message that was signed
18
+ * @param args.signature The signature to verify
19
+ */
20
+ abstract verifySignature(args: {
21
+ message: HexInput;
22
+ signature: Signature;
23
+ }): boolean;
24
+ /**
25
+ * Get the raw public key bytes
26
+ */
27
+ abstract toUint8Array(): Uint8Array;
28
+ /**
29
+ * Get the public key as a hex string with a 0x prefix e.g. 0x123456...
30
+ */
31
+ abstract toString(): string;
32
+ abstract serialize(serializer: Serializer): void;
33
+ }
34
+ /**
35
+ * An abstract representation of a private key. This is used to sign transactions and
36
+ * derive the public key associated.
37
+ */
38
+ declare abstract class PrivateKey extends Serializable {
39
+ /**
40
+ * Sign a message with the key
41
+ * @param message The message to sign
42
+ */
43
+ abstract sign(message: HexInput): Signature;
44
+ /**
45
+ * Get the raw private key bytes
46
+ */
47
+ abstract toUint8Array(): Uint8Array;
48
+ /**
49
+ * Get the private key as a hex string with a 0x prefix e.g. 0x123456...
50
+ */
51
+ abstract toString(): string;
52
+ abstract serialize(serializer: Serializer): void;
53
+ /**
54
+ * Derives the public key associated with the private key
55
+ */
56
+ abstract publicKey(): PublicKey;
57
+ }
58
+ /**
59
+ * An abstract representation of a signature. This is the product of signing a
60
+ * message and can be used with the PublicKey to verify the signature.
61
+ */
62
+ declare abstract class Signature extends Serializable {
63
+ /**
64
+ * Get the raw signature bytes
65
+ */
66
+ abstract toUint8Array(): Uint8Array;
67
+ /**
68
+ * Get the signature as a hex string with a 0x prefix e.g. 0x123456...
69
+ */
70
+ abstract toString(): string;
71
+ abstract serialize(serializer: Serializer): void;
72
+ }
73
+
74
+ export { PrivateKey, PublicKey, Signature };
@@ -0,0 +1,2 @@
1
+ import{a,b,c}from"../../chunk-EFIYW4WK.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-HVADSXTB.mjs";import"../../chunk-BPYLPPEQ.mjs";import"../../chunk-4ADA5BE7.mjs";import"../../chunk-X32O46IB.mjs";import"../../chunk-GTC7WHMV.mjs";import"../../chunk-HA6JD5R6.mjs";import"../../chunk-DNDWTM7A.mjs";import"../../chunk-TIH6ARYP.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-Y7VR7X5W.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-ZWH2ESXT.mjs";export{b as PrivateKey,a as PublicKey,c as Signature};
2
+ //# sourceMappingURL=asymmetricCrypto.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}