@aptos-labs/ts-sdk 6.3.1 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1405) hide show
  1. package/README.md +125 -24
  2. package/dist/account/AbstractKeylessAccount.d.ts +326 -0
  3. package/dist/account/AbstractKeylessAccount.d.ts.map +1 -0
  4. package/dist/account/AbstractKeylessAccount.js +440 -0
  5. package/dist/account/AbstractKeylessAccount.js.map +1 -0
  6. package/dist/account/AbstractedAccount.d.ts +61 -0
  7. package/dist/account/AbstractedAccount.d.ts.map +1 -0
  8. package/dist/account/AbstractedAccount.js +71 -0
  9. package/dist/account/AbstractedAccount.js.map +1 -0
  10. package/dist/account/Account.d.ts +302 -0
  11. package/dist/account/Account.d.ts.map +1 -0
  12. package/dist/account/Account.js +104 -0
  13. package/dist/account/Account.js.map +1 -0
  14. package/dist/account/AccountUtils.d.ts +25 -0
  15. package/dist/account/AccountUtils.d.ts.map +1 -0
  16. package/dist/account/AccountUtils.js +202 -0
  17. package/dist/account/AccountUtils.js.map +1 -0
  18. package/dist/account/DerivableAbstractedAccount.d.ts +51 -0
  19. package/dist/account/DerivableAbstractedAccount.d.ts.map +1 -0
  20. package/dist/account/DerivableAbstractedAccount.js +61 -0
  21. package/dist/account/DerivableAbstractedAccount.js.map +1 -0
  22. package/dist/account/Ed25519Account.d.ts +161 -0
  23. package/dist/account/Ed25519Account.d.ts.map +1 -0
  24. package/dist/account/Ed25519Account.js +149 -0
  25. package/dist/account/Ed25519Account.js.map +1 -0
  26. package/dist/account/EphemeralKeyPair.d.ts +159 -0
  27. package/dist/account/EphemeralKeyPair.d.ts.map +1 -0
  28. package/dist/account/EphemeralKeyPair.js +246 -0
  29. package/dist/account/EphemeralKeyPair.js.map +1 -0
  30. package/dist/account/FederatedKeylessAccount.d.ts +107 -0
  31. package/dist/account/FederatedKeylessAccount.d.ts.map +1 -0
  32. package/dist/account/FederatedKeylessAccount.js +129 -0
  33. package/dist/account/FederatedKeylessAccount.js.map +1 -0
  34. package/dist/account/KeylessAccount.d.ts +112 -0
  35. package/dist/account/KeylessAccount.d.ts.map +1 -0
  36. package/dist/account/KeylessAccount.js +133 -0
  37. package/dist/account/KeylessAccount.js.map +1 -0
  38. package/dist/account/MultiEd25519Account.d.ts +100 -0
  39. package/dist/account/MultiEd25519Account.d.ts.map +1 -0
  40. package/dist/account/MultiEd25519Account.js +134 -0
  41. package/dist/account/MultiEd25519Account.js.map +1 -0
  42. package/dist/account/MultiKeyAccount.d.ts +197 -0
  43. package/dist/account/MultiKeyAccount.d.ts.map +1 -0
  44. package/dist/account/MultiKeyAccount.js +233 -0
  45. package/dist/account/MultiKeyAccount.js.map +1 -0
  46. package/dist/account/SingleKeyAccount.d.ts +189 -0
  47. package/dist/account/SingleKeyAccount.d.ts.map +1 -0
  48. package/dist/account/SingleKeyAccount.js +182 -0
  49. package/dist/account/SingleKeyAccount.js.map +1 -0
  50. package/dist/account/index.d.ts +9 -0
  51. package/dist/account/index.d.ts.map +1 -0
  52. package/dist/account/index.js +17 -0
  53. package/dist/account/index.js.map +1 -0
  54. package/dist/account/keylessSigner.d.ts +22 -0
  55. package/dist/account/keylessSigner.d.ts.map +1 -0
  56. package/dist/account/keylessSigner.js +9 -0
  57. package/dist/account/keylessSigner.js.map +1 -0
  58. package/dist/account/utils.d.ts +8 -0
  59. package/dist/account/utils.d.ts.map +1 -0
  60. package/dist/account/utils.js +12 -0
  61. package/dist/account/utils.js.map +1 -0
  62. package/dist/api/account/abstraction.d.ts +176 -0
  63. package/dist/api/account/abstraction.d.ts.map +1 -0
  64. package/dist/api/account/abstraction.js +203 -0
  65. package/dist/api/account/abstraction.js.map +1 -0
  66. package/dist/api/account.d.ts +845 -0
  67. package/dist/api/account.d.ts.map +1 -0
  68. package/dist/api/account.js +965 -0
  69. package/dist/api/account.js.map +1 -0
  70. package/dist/api/ans.d.ts +565 -0
  71. package/dist/api/ans.d.ts.map +1 -0
  72. package/dist/api/ans.js +537 -0
  73. package/dist/api/ans.js.map +1 -0
  74. package/dist/api/aptos.d.ts +73 -0
  75. package/dist/api/aptos.d.ts.map +1 -0
  76. package/dist/api/aptos.js +162 -0
  77. package/dist/api/aptos.js.map +1 -0
  78. package/dist/api/aptosConfig.d.ts +215 -0
  79. package/dist/api/aptosConfig.d.ts.map +1 -0
  80. package/dist/api/aptosConfig.js +316 -0
  81. package/dist/api/aptosConfig.js.map +1 -0
  82. package/dist/api/coin.d.ts +77 -0
  83. package/dist/api/coin.d.ts.map +1 -0
  84. package/dist/api/coin.js +73 -0
  85. package/dist/api/coin.js.map +1 -0
  86. package/dist/api/digitalAsset.d.ts +1026 -0
  87. package/dist/api/digitalAsset.d.ts.map +1 -0
  88. package/dist/api/digitalAsset.js +987 -0
  89. package/dist/api/digitalAsset.js.map +1 -0
  90. package/dist/api/faucet.d.ts +74 -0
  91. package/dist/api/faucet.d.ts.map +1 -0
  92. package/dist/api/faucet.js +86 -0
  93. package/dist/api/faucet.js.map +1 -0
  94. package/dist/api/fungibleAsset.d.ts +285 -0
  95. package/dist/api/fungibleAsset.d.ts.map +1 -0
  96. package/dist/api/fungibleAsset.js +314 -0
  97. package/dist/api/fungibleAsset.js.map +1 -0
  98. package/dist/api/general.d.ts +298 -0
  99. package/dist/api/general.d.ts.map +1 -0
  100. package/dist/api/general.js +311 -0
  101. package/dist/api/general.js.map +1 -0
  102. package/dist/api/index.d.ts +3 -0
  103. package/dist/api/index.d.ts.map +1 -0
  104. package/dist/api/index.js +5 -0
  105. package/dist/api/index.js.map +1 -0
  106. package/dist/api/keyless.d.ts +160 -0
  107. package/dist/api/keyless.d.ts.map +1 -0
  108. package/dist/api/keyless.js +176 -0
  109. package/dist/api/keyless.js.map +1 -0
  110. package/dist/api/object.d.ts +74 -0
  111. package/dist/api/object.d.ts.map +1 -0
  112. package/dist/api/object.js +84 -0
  113. package/dist/api/object.js.map +1 -0
  114. package/dist/api/staking.d.ts +128 -0
  115. package/dist/api/staking.d.ts.map +1 -0
  116. package/dist/api/staking.js +143 -0
  117. package/dist/api/staking.js.map +1 -0
  118. package/dist/api/table.d.ts +163 -0
  119. package/dist/api/table.d.ts.map +1 -0
  120. package/dist/api/table.js +171 -0
  121. package/dist/api/table.js.map +1 -0
  122. package/dist/api/transaction.d.ts +672 -0
  123. package/dist/api/transaction.d.ts.map +1 -0
  124. package/dist/api/transaction.js +694 -0
  125. package/dist/api/transaction.js.map +1 -0
  126. package/dist/api/transactionSubmission/build.d.ts +137 -0
  127. package/dist/api/transactionSubmission/build.d.ts.map +1 -0
  128. package/dist/api/transactionSubmission/build.js +130 -0
  129. package/dist/api/transactionSubmission/build.js.map +1 -0
  130. package/dist/api/transactionSubmission/helpers.d.ts +91 -0
  131. package/dist/api/transactionSubmission/helpers.d.ts.map +1 -0
  132. package/dist/api/transactionSubmission/helpers.js +99 -0
  133. package/dist/api/transactionSubmission/helpers.js.map +1 -0
  134. package/dist/api/transactionSubmission/management.d.ts +159 -0
  135. package/dist/api/transactionSubmission/management.d.ts.map +1 -0
  136. package/dist/api/transactionSubmission/management.js +192 -0
  137. package/dist/api/transactionSubmission/management.js.map +1 -0
  138. package/dist/api/transactionSubmission/sign.d.ts +117 -0
  139. package/dist/api/transactionSubmission/sign.d.ts.map +1 -0
  140. package/dist/api/transactionSubmission/sign.js +130 -0
  141. package/dist/api/transactionSubmission/sign.js.map +1 -0
  142. package/dist/api/transactionSubmission/simulate.d.ts +176 -0
  143. package/dist/api/transactionSubmission/simulate.d.ts.map +1 -0
  144. package/dist/api/transactionSubmission/simulate.js +183 -0
  145. package/dist/api/transactionSubmission/simulate.js.map +1 -0
  146. package/dist/api/transactionSubmission/submit.d.ts +136 -0
  147. package/dist/api/transactionSubmission/submit.d.ts.map +1 -0
  148. package/dist/api/transactionSubmission/submit.js +136 -0
  149. package/dist/api/transactionSubmission/submit.js.map +1 -0
  150. package/dist/api/utils.d.ts +39 -0
  151. package/dist/api/utils.d.ts.map +1 -0
  152. package/dist/api/utils.js +41 -0
  153. package/dist/api/utils.js.map +1 -0
  154. package/dist/bcs/consts.d.ts +20 -0
  155. package/dist/bcs/consts.d.ts.map +1 -0
  156. package/dist/bcs/consts.js +24 -0
  157. package/dist/bcs/consts.js.map +1 -0
  158. package/dist/bcs/deserializer.d.ts +365 -0
  159. package/dist/bcs/deserializer.d.ts.map +1 -0
  160. package/dist/bcs/deserializer.js +470 -0
  161. package/dist/bcs/deserializer.js.map +1 -0
  162. package/dist/bcs/index.d.ts +7 -0
  163. package/dist/bcs/index.d.ts.map +1 -0
  164. package/dist/bcs/index.js +9 -0
  165. package/dist/bcs/index.js.map +1 -0
  166. package/dist/bcs/serializable/entryFunctionBytes.d.ts +60 -0
  167. package/dist/bcs/serializable/entryFunctionBytes.d.ts.map +1 -0
  168. package/dist/bcs/serializable/entryFunctionBytes.js +82 -0
  169. package/dist/bcs/serializable/entryFunctionBytes.js.map +1 -0
  170. package/dist/bcs/serializable/fixedBytes.d.ts +86 -0
  171. package/dist/bcs/serializable/fixedBytes.d.ts.map +1 -0
  172. package/dist/bcs/serializable/fixedBytes.js +98 -0
  173. package/dist/bcs/serializable/fixedBytes.js.map +1 -0
  174. package/dist/bcs/serializable/movePrimitives.d.ts +267 -0
  175. package/dist/bcs/serializable/movePrimitives.d.ts.map +1 -0
  176. package/dist/bcs/serializable/movePrimitives.js +448 -0
  177. package/dist/bcs/serializable/movePrimitives.js.map +1 -0
  178. package/dist/bcs/serializable/moveStructs.d.ts +596 -0
  179. package/dist/bcs/serializable/moveStructs.d.ts.map +1 -0
  180. package/dist/bcs/serializable/moveStructs.js +748 -0
  181. package/dist/bcs/serializable/moveStructs.js.map +1 -0
  182. package/dist/bcs/serializer.d.ts +442 -0
  183. package/dist/bcs/serializer.d.ts.map +1 -0
  184. package/dist/bcs/serializer.js +747 -0
  185. package/dist/bcs/serializer.js.map +1 -0
  186. package/dist/cli/index.d.ts +3 -0
  187. package/dist/cli/index.d.ts.map +1 -0
  188. package/dist/cli/index.js +3 -0
  189. package/dist/cli/index.js.map +1 -0
  190. package/dist/cli/localNode.d.ts +65 -0
  191. package/dist/cli/localNode.d.ts.map +1 -0
  192. package/dist/cli/localNode.js +149 -0
  193. package/dist/cli/localNode.js.map +1 -0
  194. package/dist/cli/move.d.ts +250 -0
  195. package/dist/cli/move.d.ts.map +1 -0
  196. package/dist/cli/move.js +364 -0
  197. package/dist/cli/move.js.map +1 -0
  198. package/dist/client/core.d.ts +37 -0
  199. package/dist/client/core.d.ts.map +1 -0
  200. package/dist/client/core.js +116 -0
  201. package/dist/client/core.js.map +1 -0
  202. package/dist/client/get.d.ts +119 -0
  203. package/dist/client/get.d.ts.map +1 -0
  204. package/dist/client/get.js +165 -0
  205. package/dist/client/get.js.map +1 -0
  206. package/dist/client/index.d.ts +4 -0
  207. package/dist/client/index.d.ts.map +1 -0
  208. package/dist/client/index.js +6 -0
  209. package/dist/client/index.js.map +1 -0
  210. package/dist/client/post.d.ts +155 -0
  211. package/dist/client/post.d.ts.map +1 -0
  212. package/dist/client/post.js +151 -0
  213. package/dist/client/post.js.map +1 -0
  214. package/dist/core/account/index.d.ts +2 -0
  215. package/dist/core/account/index.d.ts.map +1 -0
  216. package/dist/core/account/index.js +2 -0
  217. package/dist/core/account/index.js.map +1 -0
  218. package/dist/core/account/utils/address.d.ts +47 -0
  219. package/dist/core/account/utils/address.d.ts.map +1 -0
  220. package/dist/core/account/utils/address.js +68 -0
  221. package/dist/core/account/utils/address.js.map +1 -0
  222. package/dist/core/account/utils/index.d.ts +2 -0
  223. package/dist/core/account/utils/index.d.ts.map +1 -0
  224. package/dist/core/account/utils/index.js +2 -0
  225. package/dist/core/account/utils/index.js.map +1 -0
  226. package/dist/core/accountAddress.d.ts +327 -0
  227. package/dist/core/accountAddress.d.ts.map +1 -0
  228. package/dist/core/accountAddress.js +457 -0
  229. package/dist/core/accountAddress.js.map +1 -0
  230. package/dist/core/authenticationKey.d.ts +129 -0
  231. package/dist/core/authenticationKey.d.ts.map +1 -0
  232. package/dist/core/authenticationKey.js +155 -0
  233. package/dist/core/authenticationKey.js.map +1 -0
  234. package/dist/core/common.d.ts +51 -0
  235. package/dist/core/common.d.ts.map +1 -0
  236. package/dist/core/common.js +30 -0
  237. package/dist/core/common.js.map +1 -0
  238. package/dist/core/crypto/abstraction.d.ts +21 -0
  239. package/dist/core/crypto/abstraction.d.ts.map +1 -0
  240. package/dist/core/crypto/abstraction.js +37 -0
  241. package/dist/core/crypto/abstraction.js.map +1 -0
  242. package/dist/core/crypto/anyKeyRegistry.d.ts +45 -0
  243. package/dist/core/crypto/anyKeyRegistry.d.ts.map +1 -0
  244. package/dist/core/crypto/anyKeyRegistry.js +59 -0
  245. package/dist/core/crypto/anyKeyRegistry.js.map +1 -0
  246. package/dist/core/crypto/deserializationUtils.d.ts +22 -0
  247. package/dist/core/crypto/deserializationUtils.d.ts.map +1 -0
  248. package/dist/core/crypto/deserializationUtils.js +89 -0
  249. package/dist/core/crypto/deserializationUtils.js.map +1 -0
  250. package/dist/core/crypto/ed25519.d.ts +330 -0
  251. package/dist/core/crypto/ed25519.d.ts.map +1 -0
  252. package/dist/core/crypto/ed25519.js +502 -0
  253. package/dist/core/crypto/ed25519.js.map +1 -0
  254. package/dist/core/crypto/encryption/ciphertext.d.ts +49 -0
  255. package/dist/core/crypto/encryption/ciphertext.d.ts.map +1 -0
  256. package/dist/core/crypto/encryption/ciphertext.js +166 -0
  257. package/dist/core/crypto/encryption/ciphertext.js.map +1 -0
  258. package/dist/core/crypto/encryption/curveSerialization.d.ts +17 -0
  259. package/dist/core/crypto/encryption/curveSerialization.d.ts.map +1 -0
  260. package/dist/core/crypto/encryption/curveSerialization.js +38 -0
  261. package/dist/core/crypto/encryption/curveSerialization.js.map +1 -0
  262. package/dist/core/crypto/encryption/fieldSerialization.d.ts +12 -0
  263. package/dist/core/crypto/encryption/fieldSerialization.d.ts.map +1 -0
  264. package/dist/core/crypto/encryption/fieldSerialization.js +70 -0
  265. package/dist/core/crypto/encryption/fieldSerialization.js.map +1 -0
  266. package/dist/core/crypto/encryption/index.d.ts +11 -0
  267. package/dist/core/crypto/encryption/index.d.ts.map +1 -0
  268. package/dist/core/crypto/encryption/index.js +13 -0
  269. package/dist/core/crypto/encryption/index.js.map +1 -0
  270. package/dist/core/crypto/encryption/symmetric.d.ts +38 -0
  271. package/dist/core/crypto/encryption/symmetric.d.ts.map +1 -0
  272. package/dist/core/crypto/encryption/symmetric.js +124 -0
  273. package/dist/core/crypto/encryption/symmetric.js.map +1 -0
  274. package/dist/core/crypto/ephemeral.d.ts +112 -0
  275. package/dist/core/crypto/ephemeral.d.ts.map +1 -0
  276. package/dist/core/crypto/ephemeral.js +170 -0
  277. package/dist/core/crypto/ephemeral.js.map +1 -0
  278. package/dist/core/crypto/federatedKeyless.d.ts +106 -0
  279. package/dist/core/crypto/federatedKeyless.d.ts.map +1 -0
  280. package/dist/core/crypto/federatedKeyless.js +125 -0
  281. package/dist/core/crypto/federatedKeyless.js.map +1 -0
  282. package/dist/core/crypto/hdKey.d.ts +90 -0
  283. package/dist/core/crypto/hdKey.d.ts.map +1 -0
  284. package/dist/core/crypto/hdKey.js +118 -0
  285. package/dist/core/crypto/hdKey.js.map +1 -0
  286. package/dist/core/crypto/index.d.ts +13 -0
  287. package/dist/core/crypto/index.d.ts.map +1 -0
  288. package/dist/core/crypto/index.js +26 -0
  289. package/dist/core/crypto/index.js.map +1 -0
  290. package/dist/core/crypto/keyless.d.ts +788 -0
  291. package/dist/core/crypto/keyless.d.ts.map +1 -0
  292. package/dist/core/crypto/keyless.js +1482 -0
  293. package/dist/core/crypto/keyless.js.map +1 -0
  294. package/dist/core/crypto/keylessRegistration.d.ts +2 -0
  295. package/dist/core/crypto/keylessRegistration.d.ts.map +1 -0
  296. package/dist/core/crypto/keylessRegistration.js +16 -0
  297. package/dist/core/crypto/keylessRegistration.js.map +1 -0
  298. package/dist/core/crypto/multiEd25519.d.ts +228 -0
  299. package/dist/core/crypto/multiEd25519.d.ts.map +1 -0
  300. package/dist/core/crypto/multiEd25519.js +361 -0
  301. package/dist/core/crypto/multiEd25519.js.map +1 -0
  302. package/dist/core/crypto/multiKey.d.ts +248 -0
  303. package/dist/core/crypto/multiKey.d.ts.map +1 -0
  304. package/dist/core/crypto/multiKey.js +417 -0
  305. package/dist/core/crypto/multiKey.js.map +1 -0
  306. package/dist/core/crypto/poseidon.d.ts +58 -0
  307. package/dist/core/crypto/poseidon.d.ts.map +1 -0
  308. package/dist/core/crypto/poseidon.js +196 -0
  309. package/dist/core/crypto/poseidon.js.map +1 -0
  310. package/dist/core/crypto/privateKey.d.ts +64 -0
  311. package/dist/core/crypto/privateKey.d.ts.map +1 -0
  312. package/dist/core/crypto/privateKey.js +74 -0
  313. package/dist/core/crypto/privateKey.js.map +1 -0
  314. package/dist/core/crypto/proof.d.ts +10 -0
  315. package/dist/core/crypto/proof.d.ts.map +1 -0
  316. package/dist/core/crypto/proof.js +10 -0
  317. package/dist/core/crypto/proof.js.map +1 -0
  318. package/dist/core/crypto/publicKey.d.ts +92 -0
  319. package/dist/core/crypto/publicKey.d.ts.map +1 -0
  320. package/dist/core/crypto/publicKey.js +54 -0
  321. package/dist/core/crypto/publicKey.js.map +1 -0
  322. package/dist/core/crypto/secp256k1.d.ts +303 -0
  323. package/dist/core/crypto/secp256k1.d.ts.map +1 -0
  324. package/dist/core/crypto/secp256k1.js +455 -0
  325. package/dist/core/crypto/secp256k1.js.map +1 -0
  326. package/dist/core/crypto/secp256r1.d.ts +304 -0
  327. package/dist/core/crypto/secp256r1.d.ts.map +1 -0
  328. package/dist/core/crypto/secp256r1.js +444 -0
  329. package/dist/core/crypto/secp256r1.js.map +1 -0
  330. package/dist/core/crypto/signature.d.ts +35 -0
  331. package/dist/core/crypto/signature.d.ts.map +1 -0
  332. package/dist/core/crypto/signature.js +55 -0
  333. package/dist/core/crypto/signature.js.map +1 -0
  334. package/dist/core/crypto/singleKey.d.ts +175 -0
  335. package/dist/core/crypto/singleKey.d.ts.map +1 -0
  336. package/dist/core/crypto/singleKey.js +324 -0
  337. package/dist/core/crypto/singleKey.js.map +1 -0
  338. package/dist/core/crypto/types.d.ts +6 -0
  339. package/dist/core/crypto/types.d.ts.map +1 -0
  340. package/dist/core/crypto/types.js +2 -0
  341. package/dist/core/crypto/types.js.map +1 -0
  342. package/dist/core/crypto/utils.d.ts +16 -0
  343. package/dist/core/crypto/utils.d.ts.map +1 -0
  344. package/dist/core/crypto/utils.js +64 -0
  345. package/dist/core/crypto/utils.js.map +1 -0
  346. package/dist/core/hex.d.ts +154 -0
  347. package/dist/core/hex.d.ts.map +1 -0
  348. package/dist/core/hex.js +219 -0
  349. package/dist/core/hex.js.map +1 -0
  350. package/dist/core/index.d.ts +7 -0
  351. package/dist/core/index.d.ts.map +1 -0
  352. package/dist/core/index.js +9 -0
  353. package/dist/core/index.js.map +1 -0
  354. package/dist/errors/index.d.ts +125 -0
  355. package/dist/errors/index.d.ts.map +1 -0
  356. package/dist/errors/index.js +367 -0
  357. package/dist/errors/index.js.map +1 -0
  358. package/dist/functions/abstraction.d.ts +4 -0
  359. package/dist/functions/abstraction.d.ts.map +1 -0
  360. package/dist/functions/abstraction.js +6 -0
  361. package/dist/functions/abstraction.js.map +1 -0
  362. package/dist/functions/account.d.ts +8 -0
  363. package/dist/functions/account.d.ts.map +1 -0
  364. package/dist/functions/account.js +10 -0
  365. package/dist/functions/account.js.map +1 -0
  366. package/dist/functions/ans.d.ts +4 -0
  367. package/dist/functions/ans.d.ts.map +1 -0
  368. package/dist/functions/ans.js +6 -0
  369. package/dist/functions/ans.js.map +1 -0
  370. package/dist/functions/coin.d.ts +4 -0
  371. package/dist/functions/coin.d.ts.map +1 -0
  372. package/dist/functions/coin.js +6 -0
  373. package/dist/functions/coin.js.map +1 -0
  374. package/dist/functions/digitalAsset.d.ts +4 -0
  375. package/dist/functions/digitalAsset.d.ts.map +1 -0
  376. package/dist/functions/digitalAsset.js +6 -0
  377. package/dist/functions/digitalAsset.js.map +1 -0
  378. package/dist/functions/faucet.d.ts +4 -0
  379. package/dist/functions/faucet.d.ts.map +1 -0
  380. package/dist/functions/faucet.js +6 -0
  381. package/dist/functions/faucet.js.map +1 -0
  382. package/dist/functions/fungibleAsset.d.ts +4 -0
  383. package/dist/functions/fungibleAsset.d.ts.map +1 -0
  384. package/dist/functions/fungibleAsset.js +6 -0
  385. package/dist/functions/fungibleAsset.js.map +1 -0
  386. package/dist/functions/general.d.ts +4 -0
  387. package/dist/functions/general.d.ts.map +1 -0
  388. package/dist/functions/general.js +6 -0
  389. package/dist/functions/general.js.map +1 -0
  390. package/dist/functions/index.d.ts +18 -0
  391. package/dist/functions/index.d.ts.map +1 -0
  392. package/dist/functions/index.js +20 -0
  393. package/dist/functions/index.js.map +1 -0
  394. package/dist/functions/keyless.d.ts +16 -0
  395. package/dist/functions/keyless.d.ts.map +1 -0
  396. package/dist/functions/keyless.js +23 -0
  397. package/dist/functions/keyless.js.map +1 -0
  398. package/dist/functions/object.d.ts +4 -0
  399. package/dist/functions/object.d.ts.map +1 -0
  400. package/dist/functions/object.js +6 -0
  401. package/dist/functions/object.js.map +1 -0
  402. package/dist/functions/staking.d.ts +4 -0
  403. package/dist/functions/staking.d.ts.map +1 -0
  404. package/dist/functions/staking.js +6 -0
  405. package/dist/functions/staking.js.map +1 -0
  406. package/dist/functions/table.d.ts +4 -0
  407. package/dist/functions/table.d.ts.map +1 -0
  408. package/dist/functions/table.js +6 -0
  409. package/dist/functions/table.js.map +1 -0
  410. package/dist/functions/transaction.d.ts +5 -0
  411. package/dist/functions/transaction.d.ts.map +1 -0
  412. package/dist/functions/transaction.js +7 -0
  413. package/dist/functions/transaction.js.map +1 -0
  414. package/dist/functions/view.d.ts +3 -0
  415. package/dist/functions/view.d.ts.map +1 -0
  416. package/dist/functions/view.js +5 -0
  417. package/dist/functions/view.js.map +1 -0
  418. package/dist/index.d.ts +12 -0
  419. package/dist/index.d.ts.map +1 -0
  420. package/dist/index.js +29 -0
  421. package/dist/index.js.map +1 -0
  422. package/dist/internal/abstraction.d.ts +22 -0
  423. package/dist/internal/abstraction.d.ts.map +1 -0
  424. package/dist/internal/abstraction.js +54 -0
  425. package/dist/internal/abstraction.js.map +1 -0
  426. package/dist/internal/account.d.ts +457 -0
  427. package/dist/internal/account.d.ts.map +1 -0
  428. package/dist/internal/account.js +1164 -0
  429. package/dist/internal/account.js.map +1 -0
  430. package/dist/internal/ans.d.ts +414 -0
  431. package/dist/internal/ans.d.ts.map +1 -0
  432. package/dist/internal/ans.js +769 -0
  433. package/dist/internal/ans.js.map +1 -0
  434. package/dist/internal/coin.d.ts +27 -0
  435. package/dist/internal/coin.d.ts.map +1 -0
  436. package/dist/internal/coin.js +36 -0
  437. package/dist/internal/coin.js.map +1 -0
  438. package/dist/internal/digitalAsset.d.ts +577 -0
  439. package/dist/internal/digitalAsset.d.ts.map +1 -0
  440. package/dist/internal/digitalAsset.js +900 -0
  441. package/dist/internal/digitalAsset.js.map +1 -0
  442. package/dist/internal/encryptionKey.d.ts +20 -0
  443. package/dist/internal/encryptionKey.d.ts.map +1 -0
  444. package/dist/internal/encryptionKey.js +33 -0
  445. package/dist/internal/encryptionKey.js.map +1 -0
  446. package/dist/internal/faucet.d.ts +35 -0
  447. package/dist/internal/faucet.d.ts.map +1 -0
  448. package/dist/internal/faucet.js +53 -0
  449. package/dist/internal/faucet.js.map +1 -0
  450. package/dist/internal/fungibleAsset.d.ts +108 -0
  451. package/dist/internal/fungibleAsset.d.ts.map +1 -0
  452. package/dist/internal/fungibleAsset.js +155 -0
  453. package/dist/internal/fungibleAsset.js.map +1 -0
  454. package/dist/internal/general.d.ts +87 -0
  455. package/dist/internal/general.d.ts.map +1 -0
  456. package/dist/internal/general.js +136 -0
  457. package/dist/internal/general.js.map +1 -0
  458. package/dist/internal/keyless.d.ts +101 -0
  459. package/dist/internal/keyless.d.ts.map +1 -0
  460. package/dist/internal/keyless.js +191 -0
  461. package/dist/internal/keyless.js.map +1 -0
  462. package/dist/internal/object.d.ts +37 -0
  463. package/dist/internal/object.d.ts.map +1 -0
  464. package/dist/internal/object.js +53 -0
  465. package/dist/internal/object.js.map +1 -0
  466. package/dist/internal/staking.d.ts +53 -0
  467. package/dist/internal/staking.d.ts.map +1 -0
  468. package/dist/internal/staking.js +71 -0
  469. package/dist/internal/staking.js.map +1 -0
  470. package/dist/internal/table.d.ts +60 -0
  471. package/dist/internal/table.d.ts.map +1 -0
  472. package/dist/internal/table.js +86 -0
  473. package/dist/internal/table.js.map +1 -0
  474. package/dist/internal/transaction.d.ts +192 -0
  475. package/dist/internal/transaction.d.ts.map +1 -0
  476. package/dist/internal/transaction.js +399 -0
  477. package/dist/internal/transaction.js.map +1 -0
  478. package/dist/internal/transactionSubmission.d.ts +177 -0
  479. package/dist/internal/transactionSubmission.d.ts.map +1 -0
  480. package/dist/internal/transactionSubmission.js +411 -0
  481. package/dist/internal/transactionSubmission.js.map +1 -0
  482. package/dist/internal/utils/index.d.ts +2 -0
  483. package/dist/internal/utils/index.d.ts.map +1 -0
  484. package/dist/internal/utils/index.js +4 -0
  485. package/dist/internal/utils/index.js.map +1 -0
  486. package/dist/internal/utils/utils.d.ts +35 -0
  487. package/dist/internal/utils/utils.d.ts.map +1 -0
  488. package/dist/internal/utils/utils.js +63 -0
  489. package/dist/internal/utils/utils.js.map +1 -0
  490. package/dist/internal/view.d.ts +14 -0
  491. package/dist/internal/view.d.ts.map +1 -0
  492. package/dist/internal/view.js +41 -0
  493. package/dist/internal/view.js.map +1 -0
  494. package/dist/transactions/authenticator/account.d.ts +193 -0
  495. package/dist/transactions/authenticator/account.d.ts.map +1 -0
  496. package/dist/transactions/authenticator/account.js +346 -0
  497. package/dist/transactions/authenticator/account.js.map +1 -0
  498. package/dist/transactions/authenticator/index.d.ts +3 -0
  499. package/dist/transactions/authenticator/index.d.ts.map +1 -0
  500. package/dist/transactions/authenticator/index.js +5 -0
  501. package/dist/transactions/authenticator/index.js.map +1 -0
  502. package/dist/transactions/authenticator/transaction.d.ts +148 -0
  503. package/dist/transactions/authenticator/transaction.d.ts.map +1 -0
  504. package/dist/transactions/authenticator/transaction.js +239 -0
  505. package/dist/transactions/authenticator/transaction.js.map +1 -0
  506. package/dist/transactions/index.d.ts +7 -0
  507. package/dist/transactions/index.d.ts.map +1 -0
  508. package/dist/transactions/index.js +9 -0
  509. package/dist/transactions/index.js.map +1 -0
  510. package/dist/transactions/instances/chainId.d.ts +39 -0
  511. package/dist/transactions/instances/chainId.d.ts.map +1 -0
  512. package/dist/transactions/instances/chainId.js +48 -0
  513. package/dist/transactions/instances/chainId.js.map +1 -0
  514. package/dist/transactions/instances/encryptedPayload.d.ts +65 -0
  515. package/dist/transactions/instances/encryptedPayload.d.ts.map +1 -0
  516. package/dist/transactions/instances/encryptedPayload.js +122 -0
  517. package/dist/transactions/instances/encryptedPayload.js.map +1 -0
  518. package/dist/transactions/instances/identifier.d.ts +40 -0
  519. package/dist/transactions/instances/identifier.d.ts.map +1 -0
  520. package/dist/transactions/instances/identifier.js +49 -0
  521. package/dist/transactions/instances/identifier.js.map +1 -0
  522. package/dist/transactions/instances/index.d.ts +12 -0
  523. package/dist/transactions/instances/index.d.ts.map +1 -0
  524. package/dist/transactions/instances/index.js +14 -0
  525. package/dist/transactions/instances/index.js.map +1 -0
  526. package/dist/transactions/instances/moduleId.d.ts +52 -0
  527. package/dist/transactions/instances/moduleId.d.ts.map +1 -0
  528. package/dist/transactions/instances/moduleId.js +69 -0
  529. package/dist/transactions/instances/moduleId.js.map +1 -0
  530. package/dist/transactions/instances/multiAgentTransaction.d.ts +50 -0
  531. package/dist/transactions/instances/multiAgentTransaction.d.ts.map +1 -0
  532. package/dist/transactions/instances/multiAgentTransaction.js +75 -0
  533. package/dist/transactions/instances/multiAgentTransaction.js.map +1 -0
  534. package/dist/transactions/instances/rawTransaction.d.ts +142 -0
  535. package/dist/transactions/instances/rawTransaction.d.ts.map +1 -0
  536. package/dist/transactions/instances/rawTransaction.js +202 -0
  537. package/dist/transactions/instances/rawTransaction.js.map +1 -0
  538. package/dist/transactions/instances/rotationProofChallenge.d.ts +54 -0
  539. package/dist/transactions/instances/rotationProofChallenge.d.ts.map +1 -0
  540. package/dist/transactions/instances/rotationProofChallenge.js +70 -0
  541. package/dist/transactions/instances/rotationProofChallenge.js.map +1 -0
  542. package/dist/transactions/instances/signedTransaction.d.ts +53 -0
  543. package/dist/transactions/instances/signedTransaction.d.ts.map +1 -0
  544. package/dist/transactions/instances/signedTransaction.js +65 -0
  545. package/dist/transactions/instances/signedTransaction.js.map +1 -0
  546. package/dist/transactions/instances/simpleTransaction.d.ts +49 -0
  547. package/dist/transactions/instances/simpleTransaction.d.ts.map +1 -0
  548. package/dist/transactions/instances/simpleTransaction.js +73 -0
  549. package/dist/transactions/instances/simpleTransaction.js.map +1 -0
  550. package/dist/transactions/instances/transactionArgument.d.ts +71 -0
  551. package/dist/transactions/instances/transactionArgument.d.ts.map +1 -0
  552. package/dist/transactions/instances/transactionArgument.js +4 -0
  553. package/dist/transactions/instances/transactionArgument.js.map +1 -0
  554. package/dist/transactions/instances/transactionPayload.d.ts +369 -0
  555. package/dist/transactions/instances/transactionPayload.d.ts.map +1 -0
  556. package/dist/transactions/instances/transactionPayload.js +668 -0
  557. package/dist/transactions/instances/transactionPayload.js.map +1 -0
  558. package/dist/transactions/management/accountSequenceNumber.d.ts +114 -0
  559. package/dist/transactions/management/accountSequenceNumber.d.ts.map +1 -0
  560. package/dist/transactions/management/accountSequenceNumber.js +197 -0
  561. package/dist/transactions/management/accountSequenceNumber.js.map +1 -0
  562. package/dist/transactions/management/asyncQueue.d.ts +76 -0
  563. package/dist/transactions/management/asyncQueue.d.ts.map +1 -0
  564. package/dist/transactions/management/asyncQueue.js +105 -0
  565. package/dist/transactions/management/asyncQueue.js.map +1 -0
  566. package/dist/transactions/management/index.d.ts +3 -0
  567. package/dist/transactions/management/index.d.ts.map +1 -0
  568. package/dist/transactions/management/index.js +3 -0
  569. package/dist/transactions/management/index.js.map +1 -0
  570. package/dist/transactions/management/transactionWorker.d.ts +213 -0
  571. package/dist/transactions/management/transactionWorker.d.ts.map +1 -0
  572. package/dist/transactions/management/transactionWorker.js +347 -0
  573. package/dist/transactions/management/transactionWorker.js.map +1 -0
  574. package/dist/transactions/transactionBuilder/encryptPayload.d.ts +21 -0
  575. package/dist/transactions/transactionBuilder/encryptPayload.d.ts.map +1 -0
  576. package/dist/transactions/transactionBuilder/encryptPayload.js +157 -0
  577. package/dist/transactions/transactionBuilder/encryptPayload.js.map +1 -0
  578. package/dist/transactions/transactionBuilder/helpers.d.ts +184 -0
  579. package/dist/transactions/transactionBuilder/helpers.d.ts.map +1 -0
  580. package/dist/transactions/transactionBuilder/helpers.js +344 -0
  581. package/dist/transactions/transactionBuilder/helpers.js.map +1 -0
  582. package/dist/transactions/transactionBuilder/index.d.ts +6 -0
  583. package/dist/transactions/transactionBuilder/index.d.ts.map +1 -0
  584. package/dist/transactions/transactionBuilder/index.js +8 -0
  585. package/dist/transactions/transactionBuilder/index.js.map +1 -0
  586. package/dist/transactions/transactionBuilder/remoteAbi.d.ts +167 -0
  587. package/dist/transactions/transactionBuilder/remoteAbi.d.ts.map +1 -0
  588. package/dist/transactions/transactionBuilder/remoteAbi.js +1088 -0
  589. package/dist/transactions/transactionBuilder/remoteAbi.js.map +1 -0
  590. package/dist/transactions/transactionBuilder/signingMessage.d.ts +55 -0
  591. package/dist/transactions/transactionBuilder/signingMessage.d.ts.map +1 -0
  592. package/dist/transactions/transactionBuilder/signingMessage.js +94 -0
  593. package/dist/transactions/transactionBuilder/signingMessage.js.map +1 -0
  594. package/dist/transactions/transactionBuilder/structEnumParser.d.ts +225 -0
  595. package/dist/transactions/transactionBuilder/structEnumParser.d.ts.map +1 -0
  596. package/dist/transactions/transactionBuilder/structEnumParser.js +690 -0
  597. package/dist/transactions/transactionBuilder/structEnumParser.js.map +1 -0
  598. package/dist/transactions/transactionBuilder/transactionBuilder.d.ts +198 -0
  599. package/dist/transactions/transactionBuilder/transactionBuilder.d.ts.map +1 -0
  600. package/dist/transactions/transactionBuilder/transactionBuilder.js +586 -0
  601. package/dist/transactions/transactionBuilder/transactionBuilder.js.map +1 -0
  602. package/dist/transactions/typeTag/index.d.ts +544 -0
  603. package/dist/transactions/typeTag/index.d.ts.map +1 -0
  604. package/dist/transactions/typeTag/index.js +826 -0
  605. package/dist/transactions/typeTag/index.js.map +1 -0
  606. package/dist/transactions/typeTag/parser.d.ts +73 -0
  607. package/dist/transactions/typeTag/parser.d.ts.map +1 -0
  608. package/dist/transactions/typeTag/parser.js +368 -0
  609. package/dist/transactions/typeTag/parser.js.map +1 -0
  610. package/dist/transactions/types.d.ts +477 -0
  611. package/dist/transactions/types.d.ts.map +1 -0
  612. package/dist/transactions/types.js +4 -0
  613. package/dist/transactions/types.js.map +1 -0
  614. package/dist/types/abstraction.d.ts +14 -0
  615. package/dist/types/abstraction.d.ts.map +1 -0
  616. package/dist/types/abstraction.js +16 -0
  617. package/dist/types/abstraction.js.map +1 -0
  618. package/dist/types/ans.d.ts +113 -0
  619. package/dist/types/ans.d.ts.map +1 -0
  620. package/dist/types/ans.js +36 -0
  621. package/dist/types/ans.js.map +1 -0
  622. package/dist/types/generated/operations.d.ts +702 -0
  623. package/dist/types/generated/operations.d.ts.map +1 -0
  624. package/dist/types/generated/operations.js +2 -0
  625. package/dist/types/generated/operations.js.map +1 -0
  626. package/dist/types/generated/queries.d.ts +64 -0
  627. package/dist/types/generated/queries.d.ts.map +1 -0
  628. package/dist/types/generated/queries.js +729 -0
  629. package/dist/types/generated/queries.js.map +1 -0
  630. package/dist/types/generated/types.d.ts +9678 -0
  631. package/dist/types/generated/types.d.ts.map +1 -0
  632. package/dist/types/generated/types.js +1265 -0
  633. package/dist/types/generated/types.js.map +1 -0
  634. package/dist/types/index.d.ts +4 -0
  635. package/dist/types/index.d.ts.map +1 -0
  636. package/dist/types/index.js +4 -0
  637. package/dist/types/index.js.map +1 -0
  638. package/dist/types/indexer.d.ts +182 -0
  639. package/dist/types/indexer.d.ts.map +1 -0
  640. package/dist/types/indexer.js +4 -0
  641. package/dist/types/indexer.js.map +1 -0
  642. package/dist/types/keyless.d.ts +101 -0
  643. package/dist/types/keyless.d.ts.map +1 -0
  644. package/dist/types/keyless.js +2 -0
  645. package/dist/types/keyless.js.map +1 -0
  646. package/dist/types/types.d.ts +1572 -0
  647. package/dist/types/types.d.ts.map +1 -0
  648. package/dist/types/types.js +464 -0
  649. package/dist/types/types.js.map +1 -0
  650. package/dist/utils/apiEndpoints.d.ts +50 -0
  651. package/dist/utils/apiEndpoints.d.ts.map +1 -0
  652. package/dist/utils/apiEndpoints.js +100 -0
  653. package/dist/utils/apiEndpoints.js.map +1 -0
  654. package/dist/utils/const.d.ts +117 -0
  655. package/dist/utils/const.d.ts.map +1 -0
  656. package/dist/utils/const.js +121 -0
  657. package/dist/utils/const.js.map +1 -0
  658. package/dist/utils/helpers.d.ts +203 -0
  659. package/dist/utils/helpers.d.ts.map +1 -0
  660. package/dist/utils/helpers.js +330 -0
  661. package/dist/utils/helpers.js.map +1 -0
  662. package/dist/utils/index.d.ts +5 -0
  663. package/dist/utils/index.d.ts.map +1 -0
  664. package/dist/utils/index.js +5 -0
  665. package/dist/utils/index.js.map +1 -0
  666. package/dist/utils/memoize.d.ts +47 -0
  667. package/dist/utils/memoize.d.ts.map +1 -0
  668. package/dist/utils/memoize.js +195 -0
  669. package/dist/utils/memoize.js.map +1 -0
  670. package/dist/utils/normalizeBundle.d.ts +27 -0
  671. package/dist/utils/normalizeBundle.d.ts.map +1 -0
  672. package/dist/utils/normalizeBundle.js +18 -0
  673. package/dist/utils/normalizeBundle.js.map +1 -0
  674. package/dist/utils/runtime.d.ts +44 -0
  675. package/dist/utils/runtime.d.ts.map +1 -0
  676. package/dist/utils/runtime.js +71 -0
  677. package/dist/utils/runtime.js.map +1 -0
  678. package/dist/version.d.ts +7 -0
  679. package/dist/version.d.ts.map +1 -0
  680. package/dist/version.js +9 -0
  681. package/dist/version.js.map +1 -0
  682. package/package.json +107 -47
  683. package/src/account/AbstractKeylessAccount.ts +24 -30
  684. package/src/account/AbstractedAccount.ts +18 -16
  685. package/src/account/Account.ts +12 -9
  686. package/src/account/AccountUtils.ts +17 -20
  687. package/src/account/DerivableAbstractedAccount.ts +12 -10
  688. package/src/account/Ed25519Account.ts +8 -8
  689. package/src/account/EphemeralKeyPair.ts +9 -14
  690. package/src/account/FederatedKeylessAccount.ts +7 -7
  691. package/src/account/KeylessAccount.ts +12 -7
  692. package/src/account/MultiEd25519Account.ts +9 -9
  693. package/src/account/MultiKeyAccount.ts +15 -16
  694. package/src/account/SingleKeyAccount.ts +10 -13
  695. package/src/account/index.ts +17 -12
  696. package/src/account/keylessSigner.ts +34 -0
  697. package/src/account/utils.ts +3 -3
  698. package/src/api/account/abstraction.ts +12 -12
  699. package/src/api/account.ts +12 -12
  700. package/src/api/ans.ts +6 -6
  701. package/src/api/aptos.ts +115 -88
  702. package/src/api/aptosConfig.ts +6 -4
  703. package/src/api/coin.ts +6 -6
  704. package/src/api/digitalAsset.ts +9 -9
  705. package/src/api/faucet.ts +6 -6
  706. package/src/api/fungibleAsset.ts +10 -10
  707. package/src/api/general.ts +7 -7
  708. package/src/api/index.ts +2 -2
  709. package/src/api/keyless.ts +11 -7
  710. package/src/api/object.ts +6 -6
  711. package/src/api/staking.ts +11 -6
  712. package/src/api/table.ts +6 -6
  713. package/src/api/transaction.ts +13 -13
  714. package/src/api/transactionSubmission/build.ts +6 -6
  715. package/src/api/transactionSubmission/helpers.ts +2 -2
  716. package/src/api/transactionSubmission/management.ts +9 -5
  717. package/src/api/transactionSubmission/sign.ts +4 -4
  718. package/src/api/transactionSubmission/simulate.ts +6 -6
  719. package/src/api/transactionSubmission/submit.ts +5 -5
  720. package/src/api/utils.ts +4 -4
  721. package/src/bcs/consts.ts +14 -1
  722. package/src/bcs/deserializer.ts +3 -3
  723. package/src/bcs/index.ts +6 -6
  724. package/src/bcs/serializable/entryFunctionBytes.ts +5 -5
  725. package/src/bcs/serializable/fixedBytes.ts +5 -5
  726. package/src/bcs/serializable/movePrimitives.ts +14 -5
  727. package/src/bcs/serializable/moveStructs.ts +8 -8
  728. package/src/bcs/serializer.ts +6 -6
  729. package/src/cli/index.ts +2 -2
  730. package/src/cli/localNode.ts +1 -1
  731. package/src/cli/move.ts +6 -10
  732. package/src/client/core.ts +30 -15
  733. package/src/client/get.ts +6 -8
  734. package/src/client/index.ts +3 -3
  735. package/src/client/post.ts +4 -4
  736. package/src/core/account/index.ts +1 -1
  737. package/src/core/account/utils/address.ts +4 -4
  738. package/src/core/account/utils/index.ts +1 -1
  739. package/src/core/accountAddress.ts +6 -6
  740. package/src/core/authenticationKey.ts +22 -10
  741. package/src/core/crypto/abstraction.ts +7 -7
  742. package/src/core/crypto/anyKeyRegistry.ts +90 -0
  743. package/src/core/crypto/deserializationUtils.ts +11 -19
  744. package/src/core/crypto/ed25519.ts +22 -13
  745. package/src/core/crypto/encryption/ciphertext.ts +210 -0
  746. package/src/core/crypto/encryption/curveSerialization.ts +46 -0
  747. package/src/core/crypto/encryption/fieldSerialization.ts +82 -0
  748. package/src/core/crypto/encryption/index.ts +14 -0
  749. package/src/core/crypto/encryption/symmetric.ts +148 -0
  750. package/src/core/crypto/ephemeral.ts +7 -7
  751. package/src/core/crypto/federatedKeyless.ts +8 -8
  752. package/src/core/crypto/hdKey.ts +7 -3
  753. package/src/core/crypto/index.ts +24 -17
  754. package/src/core/crypto/keyless.ts +33 -33
  755. package/src/core/crypto/keylessRegistration.ts +34 -0
  756. package/src/core/crypto/multiEd25519.ts +7 -7
  757. package/src/core/crypto/multiKey.ts +8 -8
  758. package/src/core/crypto/poseidon.ts +2 -2
  759. package/src/core/crypto/privateKey.ts +5 -5
  760. package/src/core/crypto/proof.ts +1 -1
  761. package/src/core/crypto/publicKey.ts +6 -6
  762. package/src/core/crypto/secp256k1.ts +26 -19
  763. package/src/core/crypto/secp256r1.ts +26 -19
  764. package/src/core/crypto/signature.ts +2 -2
  765. package/src/core/crypto/singleKey.ts +58 -39
  766. package/src/core/crypto/types.ts +4 -4
  767. package/src/core/crypto/utils.ts +16 -12
  768. package/src/core/hex.ts +3 -3
  769. package/src/core/index.ts +6 -6
  770. package/src/errors/index.ts +3 -3
  771. package/src/functions/abstraction.ts +11 -0
  772. package/src/functions/account.ts +38 -0
  773. package/src/functions/ans.ts +26 -0
  774. package/src/functions/coin.ts +7 -0
  775. package/src/functions/digitalAsset.ts +32 -0
  776. package/src/functions/faucet.ts +7 -0
  777. package/src/functions/fungibleAsset.ts +13 -0
  778. package/src/functions/general.ts +14 -0
  779. package/src/functions/index.ts +21 -0
  780. package/src/functions/keyless.ts +42 -0
  781. package/src/functions/object.ts +10 -0
  782. package/src/functions/staking.ts +11 -0
  783. package/src/functions/table.ts +11 -0
  784. package/src/functions/transaction.ts +32 -0
  785. package/src/functions/view.ts +6 -0
  786. package/src/index.ts +36 -10
  787. package/src/internal/abstraction.ts +10 -10
  788. package/src/internal/account.ts +79 -51
  789. package/src/internal/ans.ts +31 -24
  790. package/src/internal/coin.ts +8 -8
  791. package/src/internal/digitalAsset.ts +14 -15
  792. package/src/internal/encryptionKey.ts +53 -0
  793. package/src/internal/faucet.ts +6 -6
  794. package/src/internal/fungibleAsset.ts +11 -11
  795. package/src/internal/general.ts +12 -7
  796. package/src/internal/keyless.ts +21 -18
  797. package/src/internal/object.ts +7 -7
  798. package/src/internal/staking.ts +6 -6
  799. package/src/internal/table.ts +7 -7
  800. package/src/internal/transaction.ts +11 -10
  801. package/src/internal/transactionSubmission.ts +92 -32
  802. package/src/internal/utils/index.ts +1 -1
  803. package/src/internal/utils/utils.ts +5 -5
  804. package/src/internal/view.ts +5 -5
  805. package/src/transactions/authenticator/account.ts +12 -12
  806. package/src/transactions/authenticator/index.ts +2 -2
  807. package/src/transactions/authenticator/transaction.ts +6 -6
  808. package/src/transactions/index.ts +6 -6
  809. package/src/transactions/instances/chainId.ts +2 -2
  810. package/src/transactions/instances/encryptedPayload.ts +149 -0
  811. package/src/transactions/instances/identifier.ts +2 -2
  812. package/src/transactions/instances/index.ts +11 -10
  813. package/src/transactions/instances/moduleId.ts +5 -5
  814. package/src/transactions/instances/multiAgentTransaction.ts +4 -4
  815. package/src/transactions/instances/rawTransaction.ts +6 -6
  816. package/src/transactions/instances/rotationProofChallenge.ts +5 -5
  817. package/src/transactions/instances/signedTransaction.ts +4 -4
  818. package/src/transactions/instances/simpleTransaction.ts +4 -4
  819. package/src/transactions/instances/transactionArgument.ts +2 -2
  820. package/src/transactions/instances/transactionPayload.ts +127 -28
  821. package/src/transactions/management/accountSequenceNumber.ts +13 -14
  822. package/src/transactions/management/index.ts +2 -2
  823. package/src/transactions/management/transactionWorker.ts +10 -10
  824. package/src/transactions/transactionBuilder/encryptPayload.ts +235 -0
  825. package/src/transactions/transactionBuilder/helpers.ts +8 -5
  826. package/src/transactions/transactionBuilder/index.ts +5 -4
  827. package/src/transactions/transactionBuilder/remoteAbi.ts +664 -25
  828. package/src/transactions/transactionBuilder/signingMessage.ts +6 -6
  829. package/src/transactions/transactionBuilder/structEnumParser.ts +848 -0
  830. package/src/transactions/transactionBuilder/transactionBuilder.ts +130 -72
  831. package/src/transactions/typeTag/index.ts +5 -5
  832. package/src/transactions/typeTag/parser.ts +3 -3
  833. package/src/transactions/types.ts +103 -19
  834. package/src/types/ans.ts +13 -5
  835. package/src/types/generated/operations.ts +4 -3
  836. package/src/types/generated/queries.ts +1 -1
  837. package/src/types/index.ts +3 -3
  838. package/src/types/indexer.ts +1 -1
  839. package/src/types/types.ts +74 -6
  840. package/src/utils/const.ts +14 -1
  841. package/src/utils/helpers.ts +58 -18
  842. package/src/utils/index.ts +4 -4
  843. package/src/utils/normalizeBundle.ts +1 -1
  844. package/src/utils/runtime.ts +86 -0
  845. package/src/version.ts +1 -1
  846. package/dist/common/account-2FUAPVPW.d.ts +0 -8167
  847. package/dist/common/chunk-L5DUJTE3.js +0 -4
  848. package/dist/common/chunk-L5DUJTE3.js.map +0 -1
  849. package/dist/common/cli/index.d.ts +0 -316
  850. package/dist/common/cli/index.js +0 -2
  851. package/dist/common/cli/index.js.map +0 -1
  852. package/dist/common/index.d.ts +0 -10912
  853. package/dist/common/index.js +0 -476
  854. package/dist/common/index.js.map +0 -1
  855. package/dist/esm/Ed25519Account-DpZh3fRy.d.mts +0 -628
  856. package/dist/esm/account/AbstractKeylessAccount.d.mts +0 -336
  857. package/dist/esm/account/AbstractKeylessAccount.mjs +0 -2
  858. package/dist/esm/account/AbstractKeylessAccount.mjs.map +0 -1
  859. package/dist/esm/account/AbstractedAccount.d.mts +0 -64
  860. package/dist/esm/account/AbstractedAccount.mjs +0 -2
  861. package/dist/esm/account/AbstractedAccount.mjs.map +0 -1
  862. package/dist/esm/account/Account.d.mts +0 -8
  863. package/dist/esm/account/Account.mjs +0 -2
  864. package/dist/esm/account/Account.mjs.map +0 -1
  865. package/dist/esm/account/AccountUtils.d.mts +0 -38
  866. package/dist/esm/account/AccountUtils.mjs +0 -2
  867. package/dist/esm/account/AccountUtils.mjs.map +0 -1
  868. package/dist/esm/account/DerivableAbstractedAccount.d.mts +0 -59
  869. package/dist/esm/account/DerivableAbstractedAccount.mjs +0 -2
  870. package/dist/esm/account/DerivableAbstractedAccount.mjs.map +0 -1
  871. package/dist/esm/account/Ed25519Account.d.mts +0 -8
  872. package/dist/esm/account/Ed25519Account.mjs +0 -2
  873. package/dist/esm/account/Ed25519Account.mjs.map +0 -1
  874. package/dist/esm/account/EphemeralKeyPair.d.mts +0 -165
  875. package/dist/esm/account/EphemeralKeyPair.mjs +0 -2
  876. package/dist/esm/account/EphemeralKeyPair.mjs.map +0 -1
  877. package/dist/esm/account/FederatedKeylessAccount.d.mts +0 -118
  878. package/dist/esm/account/FederatedKeylessAccount.mjs +0 -2
  879. package/dist/esm/account/FederatedKeylessAccount.mjs.map +0 -1
  880. package/dist/esm/account/KeylessAccount.d.mts +0 -124
  881. package/dist/esm/account/KeylessAccount.mjs +0 -2
  882. package/dist/esm/account/KeylessAccount.mjs.map +0 -1
  883. package/dist/esm/account/MultiEd25519Account.d.mts +0 -102
  884. package/dist/esm/account/MultiEd25519Account.mjs +0 -2
  885. package/dist/esm/account/MultiEd25519Account.mjs.map +0 -1
  886. package/dist/esm/account/MultiKeyAccount.d.mts +0 -206
  887. package/dist/esm/account/MultiKeyAccount.mjs +0 -2
  888. package/dist/esm/account/MultiKeyAccount.mjs.map +0 -1
  889. package/dist/esm/account/SingleKeyAccount.d.mts +0 -8
  890. package/dist/esm/account/SingleKeyAccount.mjs +0 -2
  891. package/dist/esm/account/SingleKeyAccount.mjs.map +0 -1
  892. package/dist/esm/account/index.d.mts +0 -24
  893. package/dist/esm/account/index.mjs +0 -2
  894. package/dist/esm/account/index.mjs.map +0 -1
  895. package/dist/esm/account/utils.d.mts +0 -14
  896. package/dist/esm/account/utils.mjs +0 -2
  897. package/dist/esm/account/utils.mjs.map +0 -1
  898. package/dist/esm/account-sIOs_9XJ.d.mts +0 -7369
  899. package/dist/esm/api/account/abstraction.d.mts +0 -181
  900. package/dist/esm/api/account/abstraction.mjs +0 -2
  901. package/dist/esm/api/account/abstraction.mjs.map +0 -1
  902. package/dist/esm/api/account.d.mts +0 -852
  903. package/dist/esm/api/account.mjs +0 -2
  904. package/dist/esm/api/account.mjs.map +0 -1
  905. package/dist/esm/api/ans.d.mts +0 -570
  906. package/dist/esm/api/ans.mjs +0 -2
  907. package/dist/esm/api/ans.mjs.map +0 -1
  908. package/dist/esm/api/aptos.d.mts +0 -114
  909. package/dist/esm/api/aptos.mjs +0 -2
  910. package/dist/esm/api/aptos.mjs.map +0 -1
  911. package/dist/esm/api/aptosConfig.d.mts +0 -7
  912. package/dist/esm/api/aptosConfig.mjs +0 -2
  913. package/dist/esm/api/aptosConfig.mjs.map +0 -1
  914. package/dist/esm/api/coin.d.mts +0 -81
  915. package/dist/esm/api/coin.mjs +0 -2
  916. package/dist/esm/api/coin.mjs.map +0 -1
  917. package/dist/esm/api/digitalAsset.d.mts +0 -1030
  918. package/dist/esm/api/digitalAsset.mjs +0 -2
  919. package/dist/esm/api/digitalAsset.mjs.map +0 -1
  920. package/dist/esm/api/faucet.d.mts +0 -80
  921. package/dist/esm/api/faucet.mjs +0 -2
  922. package/dist/esm/api/faucet.mjs.map +0 -1
  923. package/dist/esm/api/fungibleAsset.d.mts +0 -288
  924. package/dist/esm/api/fungibleAsset.mjs +0 -2
  925. package/dist/esm/api/fungibleAsset.mjs.map +0 -1
  926. package/dist/esm/api/general.d.mts +0 -303
  927. package/dist/esm/api/general.mjs +0 -2
  928. package/dist/esm/api/general.mjs.map +0 -1
  929. package/dist/esm/api/index.d.mts +0 -47
  930. package/dist/esm/api/index.mjs +0 -2
  931. package/dist/esm/api/index.mjs.map +0 -1
  932. package/dist/esm/api/keyless.d.mts +0 -170
  933. package/dist/esm/api/keyless.mjs +0 -2
  934. package/dist/esm/api/keyless.mjs.map +0 -1
  935. package/dist/esm/api/object.d.mts +0 -80
  936. package/dist/esm/api/object.mjs +0 -2
  937. package/dist/esm/api/object.mjs.map +0 -1
  938. package/dist/esm/api/staking.d.mts +0 -134
  939. package/dist/esm/api/staking.mjs +0 -2
  940. package/dist/esm/api/staking.mjs.map +0 -1
  941. package/dist/esm/api/table.d.mts +0 -169
  942. package/dist/esm/api/table.mjs +0 -2
  943. package/dist/esm/api/table.mjs.map +0 -1
  944. package/dist/esm/api/transaction.d.mts +0 -681
  945. package/dist/esm/api/transaction.mjs +0 -2
  946. package/dist/esm/api/transaction.mjs.map +0 -1
  947. package/dist/esm/api/transactionSubmission/build.d.mts +0 -141
  948. package/dist/esm/api/transactionSubmission/build.mjs +0 -2
  949. package/dist/esm/api/transactionSubmission/build.mjs.map +0 -1
  950. package/dist/esm/api/transactionSubmission/helpers.d.mts +0 -98
  951. package/dist/esm/api/transactionSubmission/helpers.mjs +0 -2
  952. package/dist/esm/api/transactionSubmission/helpers.mjs.map +0 -1
  953. package/dist/esm/api/transactionSubmission/management.d.mts +0 -168
  954. package/dist/esm/api/transactionSubmission/management.mjs +0 -2
  955. package/dist/esm/api/transactionSubmission/management.mjs.map +0 -1
  956. package/dist/esm/api/transactionSubmission/sign.d.mts +0 -124
  957. package/dist/esm/api/transactionSubmission/sign.mjs +0 -2
  958. package/dist/esm/api/transactionSubmission/sign.mjs.map +0 -1
  959. package/dist/esm/api/transactionSubmission/simulate.d.mts +0 -181
  960. package/dist/esm/api/transactionSubmission/simulate.mjs +0 -2
  961. package/dist/esm/api/transactionSubmission/simulate.mjs.map +0 -1
  962. package/dist/esm/api/transactionSubmission/submit.d.mts +0 -142
  963. package/dist/esm/api/transactionSubmission/submit.mjs +0 -2
  964. package/dist/esm/api/transactionSubmission/submit.mjs.map +0 -1
  965. package/dist/esm/api/utils.d.mts +0 -45
  966. package/dist/esm/api/utils.mjs +0 -2
  967. package/dist/esm/api/utils.mjs.map +0 -1
  968. package/dist/esm/bcs/consts.d.mts +0 -28
  969. package/dist/esm/bcs/consts.mjs +0 -2
  970. package/dist/esm/bcs/consts.mjs.map +0 -1
  971. package/dist/esm/bcs/deserializer.d.mts +0 -7
  972. package/dist/esm/bcs/deserializer.mjs +0 -2
  973. package/dist/esm/bcs/deserializer.mjs.map +0 -1
  974. package/dist/esm/bcs/index.d.mts +0 -8
  975. package/dist/esm/bcs/index.mjs +0 -2
  976. package/dist/esm/bcs/index.mjs.map +0 -1
  977. package/dist/esm/bcs/serializable/entryFunctionBytes.d.mts +0 -65
  978. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +0 -2
  979. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs.map +0 -1
  980. package/dist/esm/bcs/serializable/fixedBytes.d.mts +0 -7
  981. package/dist/esm/bcs/serializable/fixedBytes.mjs +0 -2
  982. package/dist/esm/bcs/serializable/fixedBytes.mjs.map +0 -1
  983. package/dist/esm/bcs/serializable/movePrimitives.d.mts +0 -7
  984. package/dist/esm/bcs/serializable/movePrimitives.mjs +0 -2
  985. package/dist/esm/bcs/serializable/movePrimitives.mjs.map +0 -1
  986. package/dist/esm/bcs/serializable/moveStructs.d.mts +0 -7
  987. package/dist/esm/bcs/serializable/moveStructs.mjs +0 -2
  988. package/dist/esm/bcs/serializable/moveStructs.mjs.map +0 -1
  989. package/dist/esm/bcs/serializer.d.mts +0 -7
  990. package/dist/esm/bcs/serializer.mjs +0 -2
  991. package/dist/esm/bcs/serializer.mjs.map +0 -1
  992. package/dist/esm/chunk-226FBOWQ.mjs +0 -2
  993. package/dist/esm/chunk-226FBOWQ.mjs.map +0 -1
  994. package/dist/esm/chunk-2DQRUJUC.mjs +0 -2
  995. package/dist/esm/chunk-2DQRUJUC.mjs.map +0 -1
  996. package/dist/esm/chunk-2EBXCCLB.mjs +0 -2
  997. package/dist/esm/chunk-2EBXCCLB.mjs.map +0 -1
  998. package/dist/esm/chunk-2YA4KQUV.mjs +0 -2
  999. package/dist/esm/chunk-2YA4KQUV.mjs.map +0 -1
  1000. package/dist/esm/chunk-3ZC6F5SJ.mjs +0 -2
  1001. package/dist/esm/chunk-3ZC6F5SJ.mjs.map +0 -1
  1002. package/dist/esm/chunk-44MMFX5F.mjs +0 -2
  1003. package/dist/esm/chunk-44MMFX5F.mjs.map +0 -1
  1004. package/dist/esm/chunk-4KEZEYCV.mjs +0 -2
  1005. package/dist/esm/chunk-4KEZEYCV.mjs.map +0 -1
  1006. package/dist/esm/chunk-4QMXOWHP.mjs +0 -1
  1007. package/dist/esm/chunk-4QMXOWHP.mjs.map +0 -1
  1008. package/dist/esm/chunk-4WPQQPUF.mjs +0 -1
  1009. package/dist/esm/chunk-4WPQQPUF.mjs.map +0 -1
  1010. package/dist/esm/chunk-5HXLZHDW.mjs +0 -1
  1011. package/dist/esm/chunk-5HXLZHDW.mjs.map +0 -1
  1012. package/dist/esm/chunk-6T2OBPIF.mjs +0 -4
  1013. package/dist/esm/chunk-6T2OBPIF.mjs.map +0 -1
  1014. package/dist/esm/chunk-7ECCT6PK.mjs +0 -1
  1015. package/dist/esm/chunk-7ECCT6PK.mjs.map +0 -1
  1016. package/dist/esm/chunk-A5H5VKUI.mjs +0 -2
  1017. package/dist/esm/chunk-A5H5VKUI.mjs.map +0 -1
  1018. package/dist/esm/chunk-A5L76YP7.mjs +0 -2
  1019. package/dist/esm/chunk-A5L76YP7.mjs.map +0 -1
  1020. package/dist/esm/chunk-C3Q23D22.mjs +0 -2
  1021. package/dist/esm/chunk-C3Q23D22.mjs.map +0 -1
  1022. package/dist/esm/chunk-DE5K76I2.mjs +0 -1
  1023. package/dist/esm/chunk-DE5K76I2.mjs.map +0 -1
  1024. package/dist/esm/chunk-DPHBSAZQ.mjs +0 -2
  1025. package/dist/esm/chunk-DPHBSAZQ.mjs.map +0 -1
  1026. package/dist/esm/chunk-F45HI7LU.mjs +0 -2
  1027. package/dist/esm/chunk-F45HI7LU.mjs.map +0 -1
  1028. package/dist/esm/chunk-F4RJMSAW.mjs +0 -2
  1029. package/dist/esm/chunk-F4RJMSAW.mjs.map +0 -1
  1030. package/dist/esm/chunk-FAOLAKLJ.mjs +0 -2
  1031. package/dist/esm/chunk-FAOLAKLJ.mjs.map +0 -1
  1032. package/dist/esm/chunk-FZY4PMEE.mjs +0 -1
  1033. package/dist/esm/chunk-FZY4PMEE.mjs.map +0 -1
  1034. package/dist/esm/chunk-G3MHXDYA.mjs +0 -1
  1035. package/dist/esm/chunk-G3MHXDYA.mjs.map +0 -1
  1036. package/dist/esm/chunk-G5OONGWS.mjs +0 -488
  1037. package/dist/esm/chunk-G5OONGWS.mjs.map +0 -1
  1038. package/dist/esm/chunk-GJYLYE6R.mjs +0 -2
  1039. package/dist/esm/chunk-GJYLYE6R.mjs.map +0 -1
  1040. package/dist/esm/chunk-GYYSHYO5.mjs +0 -2
  1041. package/dist/esm/chunk-GYYSHYO5.mjs.map +0 -1
  1042. package/dist/esm/chunk-HGLO5LDS.mjs +0 -1
  1043. package/dist/esm/chunk-HGLO5LDS.mjs.map +0 -1
  1044. package/dist/esm/chunk-IEW452EO.mjs +0 -7
  1045. package/dist/esm/chunk-IEW452EO.mjs.map +0 -1
  1046. package/dist/esm/chunk-IF4UU2MT.mjs +0 -2
  1047. package/dist/esm/chunk-IF4UU2MT.mjs.map +0 -1
  1048. package/dist/esm/chunk-ITZN23GU.mjs +0 -2
  1049. package/dist/esm/chunk-ITZN23GU.mjs.map +0 -1
  1050. package/dist/esm/chunk-IZF6POVR.mjs +0 -4
  1051. package/dist/esm/chunk-IZF6POVR.mjs.map +0 -1
  1052. package/dist/esm/chunk-KDMSOCZY.mjs +0 -2
  1053. package/dist/esm/chunk-KDMSOCZY.mjs.map +0 -1
  1054. package/dist/esm/chunk-KKPH2JUV.mjs +0 -2
  1055. package/dist/esm/chunk-KKPH2JUV.mjs.map +0 -1
  1056. package/dist/esm/chunk-LVZ7QMUH.mjs +0 -2
  1057. package/dist/esm/chunk-LVZ7QMUH.mjs.map +0 -1
  1058. package/dist/esm/chunk-M65PXVDO.mjs +0 -2
  1059. package/dist/esm/chunk-M65PXVDO.mjs.map +0 -1
  1060. package/dist/esm/chunk-MKTR4U2R.mjs +0 -2
  1061. package/dist/esm/chunk-MKTR4U2R.mjs.map +0 -1
  1062. package/dist/esm/chunk-NECL5FCQ.mjs +0 -1
  1063. package/dist/esm/chunk-NECL5FCQ.mjs.map +0 -1
  1064. package/dist/esm/chunk-NHRPXEUE.mjs +0 -2
  1065. package/dist/esm/chunk-NHRPXEUE.mjs.map +0 -1
  1066. package/dist/esm/chunk-NNXTS2GB.mjs +0 -2
  1067. package/dist/esm/chunk-NNXTS2GB.mjs.map +0 -1
  1068. package/dist/esm/chunk-NP2IAUME.mjs +0 -2
  1069. package/dist/esm/chunk-NP2IAUME.mjs.map +0 -1
  1070. package/dist/esm/chunk-NPWYZVHE.mjs +0 -2
  1071. package/dist/esm/chunk-NPWYZVHE.mjs.map +0 -1
  1072. package/dist/esm/chunk-NTMFADQ7.mjs +0 -2
  1073. package/dist/esm/chunk-NTMFADQ7.mjs.map +0 -1
  1074. package/dist/esm/chunk-ODNZJSOC.mjs +0 -2
  1075. package/dist/esm/chunk-ODNZJSOC.mjs.map +0 -1
  1076. package/dist/esm/chunk-P5HCJN3A.mjs +0 -2
  1077. package/dist/esm/chunk-P5HCJN3A.mjs.map +0 -1
  1078. package/dist/esm/chunk-Q5ESW36C.mjs +0 -2
  1079. package/dist/esm/chunk-Q5ESW36C.mjs.map +0 -1
  1080. package/dist/esm/chunk-QE5MOGUI.mjs +0 -2
  1081. package/dist/esm/chunk-QE5MOGUI.mjs.map +0 -1
  1082. package/dist/esm/chunk-RB2GC7FW.mjs +0 -2
  1083. package/dist/esm/chunk-RB2GC7FW.mjs.map +0 -1
  1084. package/dist/esm/chunk-RUKFK3OC.mjs +0 -2
  1085. package/dist/esm/chunk-RUKFK3OC.mjs.map +0 -1
  1086. package/dist/esm/chunk-RYCI4VKO.mjs +0 -2
  1087. package/dist/esm/chunk-RYCI4VKO.mjs.map +0 -1
  1088. package/dist/esm/chunk-RZNP3WG4.mjs +0 -2
  1089. package/dist/esm/chunk-RZNP3WG4.mjs.map +0 -1
  1090. package/dist/esm/chunk-STY74NUA.mjs +0 -2
  1091. package/dist/esm/chunk-STY74NUA.mjs.map +0 -1
  1092. package/dist/esm/chunk-TAHLOBRG.mjs +0 -2
  1093. package/dist/esm/chunk-TAHLOBRG.mjs.map +0 -1
  1094. package/dist/esm/chunk-TBIK7DML.mjs +0 -2
  1095. package/dist/esm/chunk-TBIK7DML.mjs.map +0 -1
  1096. package/dist/esm/chunk-UVJW4DPP.mjs +0 -2
  1097. package/dist/esm/chunk-UVJW4DPP.mjs.map +0 -1
  1098. package/dist/esm/chunk-UVNAHETD.mjs +0 -2
  1099. package/dist/esm/chunk-UVNAHETD.mjs.map +0 -1
  1100. package/dist/esm/chunk-UYVPNUH3.mjs +0 -1
  1101. package/dist/esm/chunk-UYVPNUH3.mjs.map +0 -1
  1102. package/dist/esm/chunk-V3MBJJTL.mjs +0 -1
  1103. package/dist/esm/chunk-V3MBJJTL.mjs.map +0 -1
  1104. package/dist/esm/chunk-WOPHK7LB.mjs +0 -2
  1105. package/dist/esm/chunk-WOPHK7LB.mjs.map +0 -1
  1106. package/dist/esm/chunk-WZZ7PJ3X.mjs +0 -2
  1107. package/dist/esm/chunk-WZZ7PJ3X.mjs.map +0 -1
  1108. package/dist/esm/chunk-X2TPNKLV.mjs +0 -2
  1109. package/dist/esm/chunk-X2TPNKLV.mjs.map +0 -1
  1110. package/dist/esm/chunk-ZOSOF6ST.mjs +0 -2
  1111. package/dist/esm/chunk-ZOSOF6ST.mjs.map +0 -1
  1112. package/dist/esm/chunk-ZP4DWSQA.mjs +0 -2
  1113. package/dist/esm/chunk-ZP4DWSQA.mjs.map +0 -1
  1114. package/dist/esm/cli/index.d.mts +0 -10
  1115. package/dist/esm/cli/index.mjs +0 -2
  1116. package/dist/esm/cli/index.mjs.map +0 -1
  1117. package/dist/esm/cli/localNode.d.mts +0 -67
  1118. package/dist/esm/cli/localNode.mjs +0 -2
  1119. package/dist/esm/cli/localNode.mjs.map +0 -1
  1120. package/dist/esm/cli/move.d.mts +0 -257
  1121. package/dist/esm/cli/move.mjs +0 -2
  1122. package/dist/esm/cli/move.mjs.map +0 -1
  1123. package/dist/esm/client/core.d.mts +0 -43
  1124. package/dist/esm/client/core.mjs +0 -2
  1125. package/dist/esm/client/core.mjs.map +0 -1
  1126. package/dist/esm/client/get.d.mts +0 -125
  1127. package/dist/esm/client/get.mjs +0 -2
  1128. package/dist/esm/client/get.mjs.map +0 -1
  1129. package/dist/esm/client/index.d.mts +0 -10
  1130. package/dist/esm/client/index.mjs +0 -2
  1131. package/dist/esm/client/index.mjs.map +0 -1
  1132. package/dist/esm/client/post.d.mts +0 -161
  1133. package/dist/esm/client/post.mjs +0 -2
  1134. package/dist/esm/client/post.mjs.map +0 -1
  1135. package/dist/esm/core/account/index.d.mts +0 -8
  1136. package/dist/esm/core/account/index.mjs +0 -2
  1137. package/dist/esm/core/account/index.mjs.map +0 -1
  1138. package/dist/esm/core/account/utils/address.d.mts +0 -55
  1139. package/dist/esm/core/account/utils/address.mjs +0 -2
  1140. package/dist/esm/core/account/utils/address.mjs.map +0 -1
  1141. package/dist/esm/core/account/utils/index.d.mts +0 -8
  1142. package/dist/esm/core/account/utils/index.mjs +0 -2
  1143. package/dist/esm/core/account/utils/index.mjs.map +0 -1
  1144. package/dist/esm/core/accountAddress.d.mts +0 -7
  1145. package/dist/esm/core/accountAddress.mjs +0 -2
  1146. package/dist/esm/core/accountAddress.mjs.map +0 -1
  1147. package/dist/esm/core/authenticationKey.d.mts +0 -7
  1148. package/dist/esm/core/authenticationKey.mjs +0 -2
  1149. package/dist/esm/core/authenticationKey.mjs.map +0 -1
  1150. package/dist/esm/core/common.d.mts +0 -52
  1151. package/dist/esm/core/common.mjs +0 -2
  1152. package/dist/esm/core/common.mjs.map +0 -1
  1153. package/dist/esm/core/crypto/abstraction.d.mts +0 -24
  1154. package/dist/esm/core/crypto/abstraction.mjs +0 -2
  1155. package/dist/esm/core/crypto/abstraction.mjs.map +0 -1
  1156. package/dist/esm/core/crypto/deserializationUtils.d.mts +0 -28
  1157. package/dist/esm/core/crypto/deserializationUtils.mjs +0 -2
  1158. package/dist/esm/core/crypto/deserializationUtils.mjs.map +0 -1
  1159. package/dist/esm/core/crypto/ed25519.d.mts +0 -7
  1160. package/dist/esm/core/crypto/ed25519.mjs +0 -2
  1161. package/dist/esm/core/crypto/ed25519.mjs.map +0 -1
  1162. package/dist/esm/core/crypto/ephemeral.d.mts +0 -116
  1163. package/dist/esm/core/crypto/ephemeral.mjs +0 -2
  1164. package/dist/esm/core/crypto/ephemeral.mjs.map +0 -1
  1165. package/dist/esm/core/crypto/federatedKeyless.d.mts +0 -13
  1166. package/dist/esm/core/crypto/federatedKeyless.mjs +0 -2
  1167. package/dist/esm/core/crypto/federatedKeyless.mjs.map +0 -1
  1168. package/dist/esm/core/crypto/hdKey.d.mts +0 -95
  1169. package/dist/esm/core/crypto/hdKey.mjs +0 -2
  1170. package/dist/esm/core/crypto/hdKey.mjs.map +0 -1
  1171. package/dist/esm/core/crypto/index.d.mts +0 -19
  1172. package/dist/esm/core/crypto/index.mjs +0 -2
  1173. package/dist/esm/core/crypto/index.mjs.map +0 -1
  1174. package/dist/esm/core/crypto/keyless.d.mts +0 -13
  1175. package/dist/esm/core/crypto/keyless.mjs +0 -2
  1176. package/dist/esm/core/crypto/keyless.mjs.map +0 -1
  1177. package/dist/esm/core/crypto/multiEd25519.d.mts +0 -7
  1178. package/dist/esm/core/crypto/multiEd25519.mjs +0 -2
  1179. package/dist/esm/core/crypto/multiEd25519.mjs.map +0 -1
  1180. package/dist/esm/core/crypto/multiKey.d.mts +0 -7
  1181. package/dist/esm/core/crypto/multiKey.mjs +0 -2
  1182. package/dist/esm/core/crypto/multiKey.mjs.map +0 -1
  1183. package/dist/esm/core/crypto/poseidon.d.mts +0 -59
  1184. package/dist/esm/core/crypto/poseidon.mjs +0 -2
  1185. package/dist/esm/core/crypto/poseidon.mjs.map +0 -1
  1186. package/dist/esm/core/crypto/privateKey.d.mts +0 -7
  1187. package/dist/esm/core/crypto/privateKey.mjs +0 -2
  1188. package/dist/esm/core/crypto/privateKey.mjs.map +0 -1
  1189. package/dist/esm/core/crypto/proof.d.mts +0 -18
  1190. package/dist/esm/core/crypto/proof.mjs +0 -2
  1191. package/dist/esm/core/crypto/proof.mjs.map +0 -1
  1192. package/dist/esm/core/crypto/publicKey.d.mts +0 -7
  1193. package/dist/esm/core/crypto/publicKey.mjs +0 -2
  1194. package/dist/esm/core/crypto/publicKey.mjs.map +0 -1
  1195. package/dist/esm/core/crypto/secp256k1.d.mts +0 -7
  1196. package/dist/esm/core/crypto/secp256k1.mjs +0 -2
  1197. package/dist/esm/core/crypto/secp256k1.mjs.map +0 -1
  1198. package/dist/esm/core/crypto/secp256r1.d.mts +0 -306
  1199. package/dist/esm/core/crypto/secp256r1.mjs +0 -2
  1200. package/dist/esm/core/crypto/secp256r1.mjs.map +0 -1
  1201. package/dist/esm/core/crypto/signature.d.mts +0 -7
  1202. package/dist/esm/core/crypto/signature.mjs +0 -2
  1203. package/dist/esm/core/crypto/signature.mjs.map +0 -1
  1204. package/dist/esm/core/crypto/singleKey.d.mts +0 -7
  1205. package/dist/esm/core/crypto/singleKey.mjs +0 -2
  1206. package/dist/esm/core/crypto/singleKey.mjs.map +0 -1
  1207. package/dist/esm/core/crypto/types.d.mts +0 -11
  1208. package/dist/esm/core/crypto/types.mjs +0 -2
  1209. package/dist/esm/core/crypto/types.mjs.map +0 -1
  1210. package/dist/esm/core/crypto/utils.d.mts +0 -23
  1211. package/dist/esm/core/crypto/utils.mjs +0 -2
  1212. package/dist/esm/core/crypto/utils.mjs.map +0 -1
  1213. package/dist/esm/core/hex.d.mts +0 -7
  1214. package/dist/esm/core/hex.mjs +0 -2
  1215. package/dist/esm/core/hex.mjs.map +0 -1
  1216. package/dist/esm/core/index.d.mts +0 -20
  1217. package/dist/esm/core/index.mjs +0 -2
  1218. package/dist/esm/core/index.mjs.map +0 -1
  1219. package/dist/esm/errors/index.d.mts +0 -131
  1220. package/dist/esm/errors/index.mjs +0 -2
  1221. package/dist/esm/errors/index.mjs.map +0 -1
  1222. package/dist/esm/federatedKeyless-Cuo0IGJ6.d.mts +0 -880
  1223. package/dist/esm/index.d.mts +0 -72
  1224. package/dist/esm/index.mjs +0 -2
  1225. package/dist/esm/index.mjs.map +0 -1
  1226. package/dist/esm/internal/abstraction.d.mts +0 -27
  1227. package/dist/esm/internal/abstraction.mjs +0 -2
  1228. package/dist/esm/internal/abstraction.mjs.map +0 -1
  1229. package/dist/esm/internal/account.d.mts +0 -453
  1230. package/dist/esm/internal/account.mjs +0 -2
  1231. package/dist/esm/internal/account.mjs.map +0 -1
  1232. package/dist/esm/internal/ans.d.mts +0 -417
  1233. package/dist/esm/internal/ans.mjs +0 -2
  1234. package/dist/esm/internal/ans.mjs.map +0 -1
  1235. package/dist/esm/internal/coin.d.mts +0 -31
  1236. package/dist/esm/internal/coin.mjs +0 -2
  1237. package/dist/esm/internal/coin.mjs.map +0 -1
  1238. package/dist/esm/internal/digitalAsset.d.mts +0 -580
  1239. package/dist/esm/internal/digitalAsset.mjs +0 -2
  1240. package/dist/esm/internal/digitalAsset.mjs.map +0 -1
  1241. package/dist/esm/internal/faucet.d.mts +0 -42
  1242. package/dist/esm/internal/faucet.mjs +0 -2
  1243. package/dist/esm/internal/faucet.mjs.map +0 -1
  1244. package/dist/esm/internal/fungibleAsset.d.mts +0 -112
  1245. package/dist/esm/internal/fungibleAsset.mjs +0 -2
  1246. package/dist/esm/internal/fungibleAsset.mjs.map +0 -1
  1247. package/dist/esm/internal/general.d.mts +0 -94
  1248. package/dist/esm/internal/general.mjs +0 -2
  1249. package/dist/esm/internal/general.mjs.map +0 -1
  1250. package/dist/esm/internal/keyless.d.mts +0 -111
  1251. package/dist/esm/internal/keyless.mjs +0 -2
  1252. package/dist/esm/internal/keyless.mjs.map +0 -1
  1253. package/dist/esm/internal/object.d.mts +0 -42
  1254. package/dist/esm/internal/object.mjs +0 -2
  1255. package/dist/esm/internal/object.mjs.map +0 -1
  1256. package/dist/esm/internal/staking.d.mts +0 -60
  1257. package/dist/esm/internal/staking.mjs +0 -2
  1258. package/dist/esm/internal/staking.mjs.map +0 -1
  1259. package/dist/esm/internal/table.d.mts +0 -66
  1260. package/dist/esm/internal/table.mjs +0 -2
  1261. package/dist/esm/internal/table.mjs.map +0 -1
  1262. package/dist/esm/internal/transaction.d.mts +0 -199
  1263. package/dist/esm/internal/transaction.mjs +0 -2
  1264. package/dist/esm/internal/transaction.mjs.map +0 -1
  1265. package/dist/esm/internal/transactionSubmission.d.mts +0 -165
  1266. package/dist/esm/internal/transactionSubmission.mjs +0 -2
  1267. package/dist/esm/internal/transactionSubmission.mjs.map +0 -1
  1268. package/dist/esm/internal/utils/index.d.mts +0 -8
  1269. package/dist/esm/internal/utils/index.mjs +0 -2
  1270. package/dist/esm/internal/utils/index.mjs.map +0 -1
  1271. package/dist/esm/internal/utils/utils.d.mts +0 -41
  1272. package/dist/esm/internal/utils/utils.mjs +0 -2
  1273. package/dist/esm/internal/utils/utils.mjs.map +0 -1
  1274. package/dist/esm/internal/view.d.mts +0 -20
  1275. package/dist/esm/internal/view.mjs +0 -2
  1276. package/dist/esm/internal/view.mjs.map +0 -1
  1277. package/dist/esm/transactions/authenticator/account.d.mts +0 -7
  1278. package/dist/esm/transactions/authenticator/account.mjs +0 -2
  1279. package/dist/esm/transactions/authenticator/account.mjs.map +0 -1
  1280. package/dist/esm/transactions/authenticator/index.d.mts +0 -8
  1281. package/dist/esm/transactions/authenticator/index.mjs +0 -2
  1282. package/dist/esm/transactions/authenticator/index.mjs.map +0 -1
  1283. package/dist/esm/transactions/authenticator/transaction.d.mts +0 -152
  1284. package/dist/esm/transactions/authenticator/transaction.mjs +0 -2
  1285. package/dist/esm/transactions/authenticator/transaction.mjs.map +0 -1
  1286. package/dist/esm/transactions/index.d.mts +0 -15
  1287. package/dist/esm/transactions/index.mjs +0 -2
  1288. package/dist/esm/transactions/index.mjs.map +0 -1
  1289. package/dist/esm/transactions/instances/chainId.d.mts +0 -7
  1290. package/dist/esm/transactions/instances/chainId.mjs +0 -2
  1291. package/dist/esm/transactions/instances/chainId.mjs.map +0 -1
  1292. package/dist/esm/transactions/instances/identifier.d.mts +0 -7
  1293. package/dist/esm/transactions/instances/identifier.mjs +0 -2
  1294. package/dist/esm/transactions/instances/identifier.mjs.map +0 -1
  1295. package/dist/esm/transactions/instances/index.d.mts +0 -10
  1296. package/dist/esm/transactions/instances/index.mjs +0 -2
  1297. package/dist/esm/transactions/instances/index.mjs.map +0 -1
  1298. package/dist/esm/transactions/instances/moduleId.d.mts +0 -7
  1299. package/dist/esm/transactions/instances/moduleId.mjs +0 -2
  1300. package/dist/esm/transactions/instances/moduleId.mjs.map +0 -1
  1301. package/dist/esm/transactions/instances/multiAgentTransaction.d.mts +0 -7
  1302. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +0 -2
  1303. package/dist/esm/transactions/instances/multiAgentTransaction.mjs.map +0 -1
  1304. package/dist/esm/transactions/instances/rawTransaction.d.mts +0 -7
  1305. package/dist/esm/transactions/instances/rawTransaction.mjs +0 -2
  1306. package/dist/esm/transactions/instances/rawTransaction.mjs.map +0 -1
  1307. package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +0 -58
  1308. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +0 -2
  1309. package/dist/esm/transactions/instances/rotationProofChallenge.mjs.map +0 -1
  1310. package/dist/esm/transactions/instances/signedTransaction.d.mts +0 -59
  1311. package/dist/esm/transactions/instances/signedTransaction.mjs +0 -2
  1312. package/dist/esm/transactions/instances/signedTransaction.mjs.map +0 -1
  1313. package/dist/esm/transactions/instances/simpleTransaction.d.mts +0 -7
  1314. package/dist/esm/transactions/instances/simpleTransaction.mjs +0 -2
  1315. package/dist/esm/transactions/instances/simpleTransaction.mjs.map +0 -1
  1316. package/dist/esm/transactions/instances/transactionArgument.d.mts +0 -7
  1317. package/dist/esm/transactions/instances/transactionArgument.mjs +0 -2
  1318. package/dist/esm/transactions/instances/transactionArgument.mjs.map +0 -1
  1319. package/dist/esm/transactions/instances/transactionPayload.d.mts +0 -7
  1320. package/dist/esm/transactions/instances/transactionPayload.mjs +0 -2
  1321. package/dist/esm/transactions/instances/transactionPayload.mjs.map +0 -1
  1322. package/dist/esm/transactions/management/accountSequenceNumber.d.mts +0 -123
  1323. package/dist/esm/transactions/management/accountSequenceNumber.mjs +0 -2
  1324. package/dist/esm/transactions/management/accountSequenceNumber.mjs.map +0 -1
  1325. package/dist/esm/transactions/management/asyncQueue.d.mts +0 -77
  1326. package/dist/esm/transactions/management/asyncQueue.mjs +0 -2
  1327. package/dist/esm/transactions/management/asyncQueue.mjs.map +0 -1
  1328. package/dist/esm/transactions/management/index.d.mts +0 -12
  1329. package/dist/esm/transactions/management/index.mjs +0 -2
  1330. package/dist/esm/transactions/management/index.mjs.map +0 -1
  1331. package/dist/esm/transactions/management/transactionWorker.d.mts +0 -218
  1332. package/dist/esm/transactions/management/transactionWorker.mjs +0 -2
  1333. package/dist/esm/transactions/management/transactionWorker.mjs.map +0 -1
  1334. package/dist/esm/transactions/transactionBuilder/helpers.d.mts +0 -189
  1335. package/dist/esm/transactions/transactionBuilder/helpers.mjs +0 -2
  1336. package/dist/esm/transactions/transactionBuilder/helpers.mjs.map +0 -1
  1337. package/dist/esm/transactions/transactionBuilder/index.d.mts +0 -11
  1338. package/dist/esm/transactions/transactionBuilder/index.mjs +0 -2
  1339. package/dist/esm/transactions/transactionBuilder/index.mjs.map +0 -1
  1340. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +0 -105
  1341. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +0 -2
  1342. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs.map +0 -1
  1343. package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +0 -62
  1344. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +0 -2
  1345. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs.map +0 -1
  1346. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +0 -192
  1347. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +0 -2
  1348. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs.map +0 -1
  1349. package/dist/esm/transactions/typeTag/index.d.mts +0 -7
  1350. package/dist/esm/transactions/typeTag/index.mjs +0 -2
  1351. package/dist/esm/transactions/typeTag/index.mjs.map +0 -1
  1352. package/dist/esm/transactions/typeTag/parser.d.mts +0 -81
  1353. package/dist/esm/transactions/typeTag/parser.mjs +0 -2
  1354. package/dist/esm/transactions/typeTag/parser.mjs.map +0 -1
  1355. package/dist/esm/transactions/types.d.mts +0 -7
  1356. package/dist/esm/transactions/types.mjs +0 -2
  1357. package/dist/esm/transactions/types.mjs.map +0 -1
  1358. package/dist/esm/types/abstraction.d.mts +0 -15
  1359. package/dist/esm/types/abstraction.mjs +0 -2
  1360. package/dist/esm/types/abstraction.mjs.map +0 -1
  1361. package/dist/esm/types/ans.d.mts +0 -109
  1362. package/dist/esm/types/ans.mjs +0 -2
  1363. package/dist/esm/types/ans.mjs.map +0 -1
  1364. package/dist/esm/types/generated/operations.d.mts +0 -703
  1365. package/dist/esm/types/generated/operations.mjs +0 -1
  1366. package/dist/esm/types/generated/operations.mjs.map +0 -1
  1367. package/dist/esm/types/generated/queries.d.mts +0 -66
  1368. package/dist/esm/types/generated/queries.mjs +0 -2
  1369. package/dist/esm/types/generated/queries.mjs.map +0 -1
  1370. package/dist/esm/types/generated/types.d.mts +0 -9679
  1371. package/dist/esm/types/generated/types.mjs +0 -2
  1372. package/dist/esm/types/generated/types.mjs.map +0 -1
  1373. package/dist/esm/types/index.d.mts +0 -8
  1374. package/dist/esm/types/index.mjs +0 -2
  1375. package/dist/esm/types/index.mjs.map +0 -1
  1376. package/dist/esm/types/indexer.d.mts +0 -186
  1377. package/dist/esm/types/indexer.mjs +0 -2
  1378. package/dist/esm/types/indexer.mjs.map +0 -1
  1379. package/dist/esm/types/keyless.d.mts +0 -102
  1380. package/dist/esm/types/keyless.mjs +0 -1
  1381. package/dist/esm/types/keyless.mjs.map +0 -1
  1382. package/dist/esm/types/types.d.mts +0 -7
  1383. package/dist/esm/types/types.mjs +0 -2
  1384. package/dist/esm/types/types.mjs.map +0 -1
  1385. package/dist/esm/utils/apiEndpoints.d.mts +0 -51
  1386. package/dist/esm/utils/apiEndpoints.mjs +0 -2
  1387. package/dist/esm/utils/apiEndpoints.mjs.map +0 -1
  1388. package/dist/esm/utils/const.d.mts +0 -104
  1389. package/dist/esm/utils/const.mjs +0 -2
  1390. package/dist/esm/utils/const.mjs.map +0 -1
  1391. package/dist/esm/utils/helpers.d.mts +0 -193
  1392. package/dist/esm/utils/helpers.mjs +0 -2
  1393. package/dist/esm/utils/helpers.mjs.map +0 -1
  1394. package/dist/esm/utils/index.d.mts +0 -9
  1395. package/dist/esm/utils/index.mjs +0 -2
  1396. package/dist/esm/utils/index.mjs.map +0 -1
  1397. package/dist/esm/utils/memoize.d.mts +0 -48
  1398. package/dist/esm/utils/memoize.mjs +0 -2
  1399. package/dist/esm/utils/memoize.mjs.map +0 -1
  1400. package/dist/esm/utils/normalizeBundle.d.mts +0 -35
  1401. package/dist/esm/utils/normalizeBundle.mjs +0 -2
  1402. package/dist/esm/utils/normalizeBundle.mjs.map +0 -1
  1403. package/dist/esm/version.d.mts +0 -8
  1404. package/dist/esm/version.mjs +0 -2
  1405. package/dist/esm/version.mjs.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/bcs/serializer.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport {\n MAX_U128_BIG_INT,\n MAX_U16_NUMBER,\n MAX_U32_NUMBER,\n MAX_U64_BIG_INT,\n MAX_U8_NUMBER,\n MAX_U256_BIG_INT,\n MIN_I8_NUMBER,\n MAX_I8_NUMBER,\n MIN_I16_NUMBER,\n MAX_I16_NUMBER,\n MIN_I32_NUMBER,\n MAX_I32_NUMBER,\n MIN_I64_BIG_INT,\n MAX_I64_BIG_INT,\n MIN_I128_BIG_INT,\n MAX_I128_BIG_INT,\n MIN_I256_BIG_INT,\n MAX_I256_BIG_INT,\n} from \"./consts\";\nimport { Hex } from \"../core/hex\";\nimport { AnyNumber, Uint16, Uint32, Uint8 } from \"../types\";\nimport { TEXT_ENCODER } from \"../utils/const\";\n\n/**\n * This class serves as a base class for all serializable types. It facilitates\n * composable serialization of complex types and enables the serialization of\n * instances to their BCS (Binary Canonical Serialization) representation.\n * @group Implementation\n * @category BCS\n */\nexport abstract class Serializable {\n abstract serialize(serializer: Serializer): void;\n\n /**\n * Serializes a `Serializable` value to its BCS representation.\n * This function is the TypeScript SDK equivalent of `bcs::to_bytes` in Move.\n * @returns the BCS representation of the Serializable instance as a byte buffer.\n * @group Implementation\n * @category BCS\n */\n bcsToBytes(): Uint8Array {\n const serializer = new Serializer();\n this.serialize(serializer);\n return serializer.toUint8Array();\n }\n\n /**\n * Converts the BCS-serialized bytes of a value into a Hex instance.\n * This function provides a Hex representation of the BCS-serialized data for easier handling and manipulation.\n * @returns A Hex instance with the BCS-serialized bytes loaded into its underlying Uint8Array.\n * @group Implementation\n * @category BCS\n */\n bcsToHex(): Hex {\n const bcsBytes = this.bcsToBytes();\n return Hex.fromHexInput(bcsBytes);\n }\n\n /**\n * Returns the hex string representation of the `Serializable` value without the 0x prefix.\n * @returns the hex format as a string without `0x` prefix.\n */\n toStringWithoutPrefix(): string {\n return this.bcsToHex().toStringWithoutPrefix();\n }\n\n /**\n * Returns the hex string representation of the `Serializable` value with the 0x prefix.\n * @returns the hex formatas a string prefixed by `0x`.\n */\n toString(): string {\n return `0x${this.toStringWithoutPrefix()}`;\n }\n}\n\n/**\n * Serialize a Serializable value as length-prefixed bytes into a Serializer,\n * with backwards compatibility for older Serializer implementations that lack\n * the `serializeAsBytes` method. This is critical for cross-version compatibility\n * when SDK objects built with a newer SDK are serialized by an older SDK's Serializer\n * (e.g., wallet extensions bundling an older SDK version).\n *\n * @param serializer - The serializer to write into (may be from any SDK version).\n * @param value - The Serializable value to serialize as bytes.\n */\nexport function serializeEntryFunctionBytesCompat(serializer: Serializer, value: Serializable): void {\n if (typeof (serializer as { serializeAsBytes?: unknown }).serializeAsBytes === \"function\") {\n serializer.serializeAsBytes(value);\n } else {\n const bcsBytes = value.bcsToBytes();\n serializer.serializeBytes(bcsBytes);\n }\n}\n\n/**\n * Minimum buffer growth increment to avoid too many small reallocations.\n */\nconst MIN_BUFFER_GROWTH = 256;\n\n/**\n * Pool of reusable Serializer instances for temporary serialization operations.\n * This reduces allocations when using serializeAsBytes() repeatedly.\n */\nconst serializerPool: Serializer[] = [];\nconst MAX_POOL_SIZE = 8;\n\n/**\n * Acquires a Serializer from the pool or creates a new one.\n * @internal\n */\nfunction acquireSerializer(): Serializer {\n const serializer = serializerPool.pop();\n if (serializer) {\n serializer.reset();\n return serializer;\n }\n return new Serializer();\n}\n\n/**\n * Returns a Serializer to the pool for reuse.\n * @internal\n */\nfunction releaseSerializer(serializer: Serializer): void {\n if (serializerPool.length < MAX_POOL_SIZE) {\n serializerPool.push(serializer);\n }\n}\n\n/**\n * A class for serializing various data types into a binary format.\n * It provides methods to serialize strings, bytes, numbers, and other serializable objects\n * using the Binary Coded Serialization (BCS) layout. The serialized data can be retrieved as a\n * Uint8Array.\n * @group Implementation\n * @category BCS\n */\nexport class Serializer {\n private buffer: ArrayBuffer;\n\n private offset: number;\n\n /**\n * Reusable DataView instance to reduce allocations during serialization.\n * Recreated when buffer is resized.\n */\n private dataView: DataView;\n\n /**\n * Constructs a serializer with a buffer of size `length` bytes, 64 bytes by default.\n * The `length` must be greater than 0.\n *\n * @param length - The size of the buffer in bytes.\n * @group Implementation\n * @category BCS\n */\n constructor(length: number = 64) {\n if (length <= 0) {\n throw new Error(\"Length needs to be greater than 0\");\n }\n this.buffer = new ArrayBuffer(length);\n this.dataView = new DataView(this.buffer);\n this.offset = 0;\n }\n\n /**\n * Ensures that the internal buffer can accommodate the specified number of bytes.\n * This function dynamically resizes the buffer using a growth factor of 1.5x with\n * a minimum growth increment to balance memory usage and reallocation frequency.\n *\n * @param bytes - The number of bytes to ensure the buffer can handle.\n * @group Implementation\n * @category BCS\n */\n private ensureBufferWillHandleSize(bytes: number) {\n const requiredSize = this.offset + bytes;\n if (this.buffer.byteLength >= requiredSize) {\n return;\n }\n\n // Calculate new size: max of (1.5x current size) or (current + required + MIN_GROWTH)\n // Using 1.5x instead of 2x provides better memory efficiency\n const growthSize = Math.max(Math.floor(this.buffer.byteLength * 1.5), requiredSize + MIN_BUFFER_GROWTH);\n\n const newBuffer = new ArrayBuffer(growthSize);\n new Uint8Array(newBuffer).set(new Uint8Array(this.buffer, 0, this.offset));\n this.buffer = newBuffer;\n this.dataView = new DataView(this.buffer);\n }\n\n /**\n * Appends the specified values to the buffer, ensuring that the buffer can accommodate the new data.\n *\n * @param {Uint8Array} values - The values to be appended to the buffer.\n * @group Implementation\n * @category BCS\n */\n protected appendToBuffer(values: Uint8Array) {\n this.ensureBufferWillHandleSize(values.length);\n new Uint8Array(this.buffer, this.offset).set(values);\n this.offset += values.length;\n }\n\n /**\n * Serializes a value into the buffer using the provided function, ensuring the buffer can accommodate the size.\n * Uses the cached DataView instance for better performance.\n *\n * @param fn - The function to serialize the value, which takes a byte offset, the value to serialize, and an optional little-endian flag.\n * @param fn.byteOffset - The byte offset at which to write the value.\n * @param fn.value - The numeric value to serialize into the buffer.\n * @param fn.littleEndian - Optional flag indicating whether to use little-endian byte order (defaults to true).\n * @group Implementation\n * @category BCS\n */\n // TODO: JSDoc bytesLength and value\n private serializeWithFunction(\n fn: (byteOffset: number, value: number, littleEndian?: boolean) => void,\n bytesLength: number,\n value: number,\n ) {\n this.ensureBufferWillHandleSize(bytesLength);\n fn.apply(this.dataView, [this.offset, value, true]);\n this.offset += bytesLength;\n }\n\n /**\n * Serializes a string. UTF8 string is supported.\n * The number of bytes in the string content is serialized first, as a uleb128-encoded u32 integer.\n * Then the string content is serialized as UTF8 encoded bytes.\n *\n * BCS layout for \"string\": string_length | string_content\n * where string_length is a u32 integer encoded as a uleb128 integer, equal to the number of bytes in string_content.\n *\n * @param value - The string to serialize.\n *\n * @example\n * ```typescript\n * const serializer = new Serializer();\n * serializer.serializeStr(\"1234abcd\");\n * assert(serializer.toUint8Array() === new Uint8Array([8, 49, 50, 51, 52, 97, 98, 99, 100]));\n * ```\n * @group Implementation\n * @category BCS\n */\n serializeStr(value: string) {\n this.serializeBytes(TEXT_ENCODER.encode(value));\n }\n\n /**\n * Serializes an array of bytes.\n *\n * This function encodes the length of the byte array as a u32 integer in uleb128 format, followed by the byte array itself.\n * BCS layout for \"bytes\": bytes_length | bytes\n * where bytes_length is a u32 integer encoded as a uleb128 integer, equal to the length of the bytes array.\n * @param value - The byte array to serialize.\n * @group Implementation\n * @category BCS\n */\n serializeBytes(value: Uint8Array) {\n this.serializeU32AsUleb128(value.length);\n this.appendToBuffer(value);\n }\n\n /**\n * Serializes an array of bytes with a known length, allowing for efficient deserialization without needing to serialize the\n * length itself.\n * When deserializing, the number of bytes to deserialize needs to be passed in.\n\n * @param value - The Uint8Array to be serialized.\n * @group Implementation\n * @category BCS\n */\n serializeFixedBytes(value: Uint8Array) {\n this.appendToBuffer(value);\n }\n\n /**\n * Serializes a boolean value into a byte representation.\n *\n * The BCS layout for a boolean uses one byte, where \"0x01\" represents true and \"0x00\" represents false.\n *\n * @param value - The boolean value to serialize.\n * @group Implementation\n * @category BCS\n */\n serializeBool(value: boolean) {\n /**\n * Ensures that the provided value is a boolean.\n * This function throws an error if the value is not a boolean, helping to enforce type safety in your code.\n *\n * @param value - The value to be checked for boolean type.\n * @throws {Error} Throws an error if the value is not a boolean.\n * @group Implementation\n * @category BCS\n */\n ensureBoolean(value);\n const byteValue = value ? 1 : 0;\n this.appendToBuffer(new Uint8Array([byteValue]));\n }\n\n /**\n * Serializes a Uint8 value and appends it to the buffer.\n * BCS layout for \"uint8\": One byte. Binary format in little-endian representation.\n *\n * @param value - The Uint8 value to serialize.\n * @group Implementation\n * @category BCS\n */\n @checkNumberRange(0, MAX_U8_NUMBER)\n serializeU8(value: Uint8) {\n this.appendToBuffer(new Uint8Array([value]));\n }\n\n /**\n * Serializes a uint16 number.\n *\n * @group Implementation\n * @category BCS\n\n */\n\n /**\n * Serializes a 16-bit unsigned integer value into a binary format.\n * BCS layout for \"uint16\": Two bytes. Binary format in little-endian representation.\n *\n * @param value - The 16-bit unsigned integer value to serialize.\n * @example\n * ```typescript\n * const serializer = new Serializer();\n * serializer.serializeU16(4660);\n * assert(serializer.toUint8Array() === new Uint8Array([0x34, 0x12]));\n * ```\n * @group Implementation\n * @category BCS\n */\n @checkNumberRange(0, MAX_U16_NUMBER)\n serializeU16(value: Uint16) {\n this.serializeWithFunction(DataView.prototype.setUint16, 2, value);\n }\n\n /**\n * Serializes a 32-bit unsigned integer value into a binary format.\n * This function is useful for encoding data that needs to be stored or transmitted in a compact form.\n * @example\n * ```typescript\n * const serializer = new Serializer();\n * serializer.serializeU32(305419896);\n * assert(serializer.toUint8Array() === new Uint8Array([0x78, 0x56, 0x34, 0x12]));\n * ```\n * @param value - The 32-bit unsigned integer value to serialize.\n * @group Implementation\n * @category BCS\n */\n @checkNumberRange(0, MAX_U32_NUMBER)\n serializeU32(value: Uint32) {\n this.serializeWithFunction(DataView.prototype.setUint32, 4, value);\n }\n\n /**\n * Serializes a 64-bit unsigned integer into a format suitable for storage or transmission.\n * This function breaks down the value into two 32-bit components and writes them in little-endian order.\n *\n * @param value - The 64-bit unsigned integer to serialize, represented as a number.\n * @example\n * ```ts\n * const serializer = new Serializer();\n * serializer.serializeU64(1311768467750121216);\n * assert(serializer.toUint8Array() === new Uint8Array([0x00, 0xEF, 0xCD, 0xAB, 0x78, 0x56, 0x34, 0x12]));\n * ```\n * @group Implementation\n * @category BCS\n */\n @checkNumberRange(BigInt(0), MAX_U64_BIG_INT)\n serializeU64(value: AnyNumber) {\n const low = BigInt(value) & BigInt(MAX_U32_NUMBER);\n const high = BigInt(value) >> BigInt(32);\n\n // write little endian number\n this.serializeU32(Number(low));\n this.serializeU32(Number(high));\n }\n\n /**\n * Serializes a U128 value into a format suitable for storage or transmission.\n *\n * @param value - The U128 value to serialize, represented as a number.\n * @group Implementation\n * @category BCS\n */\n @checkNumberRange(BigInt(0), MAX_U128_BIG_INT)\n serializeU128(value: AnyNumber) {\n const low = BigInt(value) & MAX_U64_BIG_INT;\n const high = BigInt(value) >> BigInt(64);\n\n // write little endian number\n this.serializeU64(low);\n this.serializeU64(high);\n }\n\n /**\n * Serializes a U256 value into a byte representation.\n * This function is essential for encoding large numbers in a compact format suitable for transmission or storage.\n *\n * @param value - The U256 value to serialize, represented as an AnyNumber.\n * @group Implementation\n * @category BCS\n */\n @checkNumberRange(BigInt(0), MAX_U256_BIG_INT)\n serializeU256(value: AnyNumber) {\n const low = BigInt(value) & MAX_U128_BIG_INT;\n const high = BigInt(value) >> BigInt(128);\n\n // write little endian number\n this.serializeU128(low);\n this.serializeU128(high);\n }\n\n /**\n * Serializes an 8-bit signed integer value.\n * BCS layout for \"int8\": One byte. Binary format in little-endian representation.\n *\n * @param value - The 8-bit signed integer value to serialize.\n * @group Implementation\n * @category BCS\n */\n @checkNumberRange(MIN_I8_NUMBER, MAX_I8_NUMBER)\n serializeI8(value: number) {\n this.serializeWithFunction(DataView.prototype.setInt8, 1, value);\n }\n\n /**\n * Serializes a 16-bit signed integer value into a binary format.\n * BCS layout for \"int16\": Two bytes. Binary format in little-endian representation.\n *\n * @param value - The 16-bit signed integer value to serialize.\n * @group Implementation\n * @category BCS\n */\n @checkNumberRange(MIN_I16_NUMBER, MAX_I16_NUMBER)\n serializeI16(value: number) {\n this.serializeWithFunction(DataView.prototype.setInt16, 2, value);\n }\n\n /**\n * Serializes a 32-bit signed integer value into a binary format.\n *\n * @param value - The 32-bit signed integer value to serialize.\n * @group Implementation\n * @category BCS\n */\n @checkNumberRange(MIN_I32_NUMBER, MAX_I32_NUMBER)\n serializeI32(value: number) {\n this.serializeWithFunction(DataView.prototype.setInt32, 4, value);\n }\n\n /**\n * Serializes a 64-bit signed integer into a format suitable for storage or transmission.\n * This function uses two's complement representation for negative values.\n *\n * @param value - The 64-bit signed integer to serialize.\n * @group Implementation\n * @category BCS\n */\n @checkNumberRange(MIN_I64_BIG_INT, MAX_I64_BIG_INT)\n serializeI64(value: AnyNumber) {\n const val = BigInt(value);\n // Convert to unsigned representation using two's complement\n const unsigned = val < 0 ? (BigInt(1) << BigInt(64)) + val : val;\n const low = unsigned & BigInt(MAX_U32_NUMBER);\n const high = unsigned >> BigInt(32);\n\n // write little endian number\n this.serializeU32(Number(low));\n this.serializeU32(Number(high));\n }\n\n /**\n * Serializes a 128-bit signed integer value.\n *\n * @param value - The 128-bit signed integer value to serialize.\n * @group Implementation\n * @category BCS\n */\n @checkNumberRange(MIN_I128_BIG_INT, MAX_I128_BIG_INT)\n serializeI128(value: AnyNumber) {\n const val = BigInt(value);\n // Convert to unsigned representation using two's complement\n const unsigned = val < 0 ? (BigInt(1) << BigInt(128)) + val : val;\n const low = unsigned & MAX_U64_BIG_INT;\n const high = unsigned >> BigInt(64);\n\n // write little endian number\n this.serializeU64(low);\n this.serializeU64(high);\n }\n\n /**\n * Serializes a 256-bit signed integer value.\n *\n * @param value - The 256-bit signed integer value to serialize.\n * @group Implementation\n * @category BCS\n */\n @checkNumberRange(MIN_I256_BIG_INT, MAX_I256_BIG_INT)\n serializeI256(value: AnyNumber) {\n const val = BigInt(value);\n // Convert to unsigned representation using two's complement\n const unsigned = val < 0 ? (BigInt(1) << BigInt(256)) + val : val;\n const low = unsigned & MAX_U128_BIG_INT;\n const high = unsigned >> BigInt(128);\n\n // write little endian number\n this.serializeU128(low);\n this.serializeU128(high);\n }\n\n /**\n * Serializes a 32-bit unsigned integer as a variable-length ULEB128 encoded byte array.\n * BCS uses uleb128 encoding in two cases: (1) lengths of variable-length sequences and (2) tags of enum values\n *\n * @param val - The 32-bit unsigned integer value to be serialized.\n * @group Implementation\n * @category BCS\n */\n @checkNumberRange(0, MAX_U32_NUMBER)\n serializeU32AsUleb128(val: Uint32) {\n let value = val;\n const valueArray = [];\n while (value >>> 7 !== 0) {\n valueArray.push((value & 0x7f) | 0x80);\n value >>>= 7;\n }\n valueArray.push(value);\n this.appendToBuffer(new Uint8Array(valueArray));\n }\n\n /**\n * Returns the buffered bytes as a Uint8Array.\n *\n * This function allows you to retrieve the byte representation of the buffer up to the current offset.\n * For better performance, returns a view when the buffer is exactly the right size, or copies\n * only the used portion otherwise.\n *\n * @returns Uint8Array - The byte array representation of the buffer.\n * @group Implementation\n * @category BCS\n */\n toUint8Array(): Uint8Array {\n // Return a copy of only the used portion of the buffer\n // Using subarray + slice pattern for efficiency\n return new Uint8Array(this.buffer, 0, this.offset).slice();\n }\n\n /**\n * Resets the serializer to its initial state, allowing the buffer to be reused.\n * This clears the buffer contents to prevent data leakage between uses.\n *\n * @group Implementation\n * @category BCS\n */\n reset(): void {\n // Clear buffer contents to prevent data leakage when reusing pooled serializers\n // Only clear the portion that was used (up to offset) for efficiency\n if (this.offset > 0) {\n new Uint8Array(this.buffer, 0, this.offset).fill(0);\n }\n this.offset = 0;\n }\n\n /**\n * Returns the current number of bytes written to the serializer.\n *\n * @returns The number of bytes written.\n * @group Implementation\n * @category BCS\n */\n getOffset(): number {\n return this.offset;\n }\n\n /**\n * Returns a view of the serialized bytes without copying.\n * WARNING: The returned view is only valid until the next write operation.\n * Use toUint8Array() if you need a persistent copy.\n *\n * @returns A Uint8Array view of the buffer (not a copy).\n * @group Implementation\n * @category BCS\n */\n toUint8ArrayView(): Uint8Array {\n return new Uint8Array(this.buffer, 0, this.offset);\n }\n\n /**\n * Serializes a `Serializable` value, facilitating composable serialization.\n *\n * @param value The Serializable value to serialize.\n *\n * @returns the serializer instance\n * @group Implementation\n * @category BCS\n */\n serialize<T extends Serializable>(value: T): void {\n // NOTE: The `serialize` method called by `value` is defined in `value`'s\n // Serializable interface, not the one defined in this class.\n value.serialize(this);\n }\n\n /**\n * Serializes a Serializable value as a byte array with a length prefix.\n * This is the optimized pattern for entry function argument serialization.\n *\n * Instead of:\n * ```typescript\n * const bcsBytes = value.bcsToBytes(); // Creates new Serializer, copies bytes\n * serializer.serializeBytes(bcsBytes);\n * ```\n *\n * Use:\n * ```typescript\n * serializer.serializeAsBytes(value); // Uses pooled Serializer, avoids extra copy\n * ```\n *\n * This method uses a pooled Serializer instance to reduce allocations and\n * directly appends the serialized bytes with a length prefix.\n *\n * @param value - The Serializable value to serialize as bytes.\n * @group Implementation\n * @category BCS\n */\n serializeAsBytes<T extends Serializable>(value: T): void {\n // Acquire a pooled serializer for temporary use\n const tempSerializer = acquireSerializer();\n\n try {\n // Serialize the value to the temporary serializer\n value.serialize(tempSerializer);\n\n // Get the serialized bytes (as a view to avoid copying)\n const bytes = tempSerializer.toUint8ArrayView();\n\n // Serialize with length prefix to this serializer\n this.serializeBytes(bytes);\n } finally {\n // Return the serializer to the pool for reuse\n releaseSerializer(tempSerializer);\n }\n }\n\n /**\n * Serializes an array of BCS Serializable values to a serializer instance.\n * The bytes are added to the serializer instance's byte buffer.\n *\n * @param values The array of BCS Serializable values\n * @example\n * const addresses = new Array<AccountAddress>(\n * AccountAddress.from(\"0x1\"),\n * AccountAddress.from(\"0x2\"),\n * AccountAddress.from(\"0xa\"),\n * AccountAddress.from(\"0xb\"),\n * );\n * const serializer = new Serializer();\n * serializer.serializeVector(addresses);\n * const serializedBytes = serializer.toUint8Array();\n * // serializedBytes is now the BCS-serialized bytes\n * // The equivalent value in Move would be:\n * // `bcs::to_bytes(&vector<address> [@0x1, @0x2, @0xa, @0xb])`;\n * @group Implementation\n * @category BCS\n */\n serializeVector<T extends Serializable>(values: Array<T>): void {\n this.serializeU32AsUleb128(values.length);\n values.forEach((item) => {\n item.serialize(this);\n });\n }\n\n /**\n * Serializes an optional value which can be a Serializable, string, or Uint8Array.\n * For strings and Uint8Arrays, it uses the appropriate serialization method.\n *\n * @param value The value to serialize (Serializable, string, Uint8Array, or undefined)\n * @param len Optional fixed length for Uint8Array serialization. If provided, uses serializeFixedBytes instead of serializeBytes\n *\n * @example\n * ```typescript\n * const serializer = new Serializer();\n * serializer.serializeOption(\"hello\"); // Serializes optional string\n * serializer.serializeOption(new Uint8Array([1, 2, 3])); // Serializes optional bytes\n * serializer.serializeOption(new Uint8Array([1, 2, 3]), 3); // Serializes optional fixed-length bytes\n * serializer.serializeOption(new AccountAddress(...)); // Serializes optional Serializable\n * serializer.serializeOption(undefined); // Serializes none case\n * ```\n * @group Implementation\n * @category BCS\n */\n serializeOption<T extends Serializable | string | Uint8Array>(value?: T, len?: number): void {\n const hasValue = value !== undefined;\n this.serializeBool(hasValue);\n if (hasValue) {\n if (typeof value === \"string\") {\n this.serializeStr(value);\n } else if (value instanceof Uint8Array) {\n if (len !== undefined) {\n this.serializeFixedBytes(value);\n } else {\n this.serializeBytes(value);\n }\n } else {\n value.serialize(this);\n }\n }\n }\n\n /**\n * @deprecated use `serializeOption` instead.\n * Serializes an optional string, supporting UTF8 encoding.\n * The function encodes the existence of the string first, followed by the length and content if it exists.\n *\n * BCS layout for optional \"string\": 1 | string_length | string_content\n * where string_length is a u32 integer encoded as a uleb128 integer, equal to the number of bytes in string_content.\n * BCS layout for undefined: 0\n *\n * @param value - The optional string to serialize. If undefined, it will serialize as 0.\n * @group Implementation\n * @category BCS\n */\n serializeOptionStr(value?: string): void {\n if (value === undefined) {\n this.serializeU32AsUleb128(0);\n } else {\n this.serializeU32AsUleb128(1);\n this.serializeStr(value);\n }\n }\n}\n\n/**\n * @group Implementation\n * @category BCS\n */\nexport function ensureBoolean(value: unknown): asserts value is boolean {\n if (typeof value !== \"boolean\") {\n throw new Error(`${value} is not a boolean value`);\n }\n}\n/**\n * @group Implementation\n * @category BCS\n */\nexport const outOfRangeErrorMessage = (value: AnyNumber, min: AnyNumber, max: AnyNumber) =>\n `${value} is out of range: [${min}, ${max}]`;\n\n/**\n * Validates that a given number is within a specified range.\n * This function throws an error if the value is outside the defined minimum and maximum bounds.\n *\n * @param value - The number to validate.\n * @param minValue - The minimum allowable value (inclusive).\n * @param maxValue - The maximum allowable value (inclusive).\n * @group Implementation\n * @category BCS\n */\nexport function validateNumberInRange<T extends AnyNumber>(value: T, minValue: T, maxValue: T) {\n const valueBigInt = BigInt(value);\n if (valueBigInt > BigInt(maxValue) || valueBigInt < BigInt(minValue)) {\n throw new Error(outOfRangeErrorMessage(value, minValue, maxValue));\n }\n}\n\n/**\n * A decorator that validates that the input argument for a function is within a specified range.\n * This ensures that the function is only called with valid input values, preventing potential errors.\n *\n * @param minValue - The input argument must be greater than or equal to this value.\n * @param maxValue - The input argument must be less than or equal to this value.\n * @group Implementation\n * @category BCS\n */\nfunction checkNumberRange<T extends AnyNumber>(minValue: T, maxValue: T) {\n return (target: unknown, propertyKey: string, descriptor: PropertyDescriptor) => {\n const childFunction = descriptor.value;\n\n descriptor.value = function deco(value: AnyNumber) {\n validateNumberInRange(value, minValue, maxValue);\n return childFunction.apply(this, [value]);\n };\n\n return descriptor;\n };\n}\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,IAYpC,SAASC,EAA2CjD,EAAUkD,EAAaC,EAAa,CAC7F,IAAMC,EAAc,OAAOpD,CAAK,EAChC,GAAIoD,EAAc,OAAOD,CAAQ,GAAKC,EAAc,OAAOF,CAAQ,EACjE,MAAM,IAAI,MAAMJ,EAAuB9C,EAAOkD,EAAUC,CAAQ,CAAC,CAErE,CAWA,SAASrB,EAAsCoB,EAAaC,EAAa,CACvE,MAAO,CAACE,EAAiBC,EAAqBC,IAAmC,CAC/E,IAAMC,EAAgBD,EAAW,MAEjC,OAAAA,EAAW,MAAQ,SAAcvD,EAAkB,CACjD,OAAAiD,EAAsBjD,EAAOkD,EAAUC,CAAQ,EACxCK,EAAc,MAAM,KAAM,CAACxD,CAAK,CAAC,CAC1C,EAEOuD,CACT,CACF","names":["Serializable","serializer","Serializer","bcsBytes","Hex","serializeEntryFunctionBytesCompat","value","MIN_BUFFER_GROWTH","serializerPool","MAX_POOL_SIZE","acquireSerializer","releaseSerializer","length","bytes","requiredSize","growthSize","newBuffer","values","fn","bytesLength","TEXT_ENCODER","ensureBoolean","byteValue","low","MAX_U32_NUMBER","high","MAX_U64_BIG_INT","MAX_U128_BIG_INT","val","unsigned","valueArray","tempSerializer","item","len","hasValue","__decorateClass","checkNumberRange","MAX_U8_NUMBER","MAX_U16_NUMBER","MAX_U256_BIG_INT","MIN_I8_NUMBER","MAX_I8_NUMBER","MIN_I16_NUMBER","MAX_I16_NUMBER","MIN_I32_NUMBER","MAX_I32_NUMBER","MIN_I64_BIG_INT","MAX_I64_BIG_INT","MIN_I128_BIG_INT","MAX_I128_BIG_INT","MIN_I256_BIG_INT","MAX_I256_BIG_INT","outOfRangeErrorMessage","min","max","validateNumberInRange","minValue","maxValue","valueBigInt","target","propertyKey","descriptor","childFunction"]}
@@ -1,2 +0,0 @@
1
- var o="6.3.1";export{o as a};
2
- //# sourceMappingURL=chunk-RYCI4VKO.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/version.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * The current version of the SDK\n *\n * hardcoded for now, we would want to have it injected dynamically\n */\nexport const VERSION = \"6.3.1\";\n"],"mappings":"AAQO,IAAMA,EAAU","names":["VERSION"]}
@@ -1,2 +0,0 @@
1
- import{b as c}from"./chunk-6T2OBPIF.mjs";import{a as o}from"./chunk-RUKFK3OC.mjs";import{b as n}from"./chunk-STY74NUA.mjs";import{sha3_256 as d}from"@noble/hashes/sha3";var r=class r extends o{constructor(t){super();let{data:e}=t,i=n.fromHexInput(e);if(i.toUint8Array().length!==r.LENGTH)throw new Error(`Authentication Key length should be ${r.LENGTH}`);this.data=i}serialize(t){t.serializeFixedBytes(this.data.toUint8Array())}static deserialize(t){let e=t.deserializeFixedBytes(r.LENGTH);return new r({data:e})}toUint8Array(){return this.data.toUint8Array()}static fromSchemeAndBytes(t){let{scheme:e,input:i}=t,u=n.fromHexInput(i).toUint8Array(),h=new Uint8Array([...u,e]),a=d.create();a.update(h);let y=a.digest();return new r({data:y})}static fromPublicKeyAndScheme(t){let{publicKey:e}=t;return e.authKey()}static fromPublicKey(t){let{publicKey:e}=t;return e.authKey()}derivedAddress(){return new c(this.data.toUint8Array())}};r.LENGTH=32;var s=r;export{s as a};
2
- //# sourceMappingURL=chunk-RZNP3WG4.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/core/authenticationKey.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { sha3_256 as sha3Hash } from \"@noble/hashes/sha3\";\nimport { AccountAddress } from \"./accountAddress\";\nimport type { AccountPublicKey } from \"./crypto\";\nimport { Hex } from \"./hex\";\nimport { AuthenticationKeyScheme, HexInput } from \"../types\";\nimport { Serializable, Serializer } from \"../bcs/serializer\";\nimport { Deserializer } from \"../bcs/deserializer\";\n\n/**\n * Represents an authentication key used for account management. Each account stores an authentication key that enables account\n * owners to rotate their private key(s) without changing the address that hosts their account. The authentication key is a\n * SHA3-256 hash of data and is always 32 bytes in length.\n *\n * @see {@link https://aptos.dev/concepts/accounts | Account Basics}\n *\n * Account addresses can be derived from the AuthenticationKey.\n * @group Implementation\n * @category Serialization\n */\nexport class AuthenticationKey extends Serializable {\n /**\n * An authentication key is always a SHA3-256 hash of data, and is always 32 bytes.\n *\n * The data to hash depends on the underlying public key type and the derivation scheme.\n * @group Implementation\n * @category Serialization\n */\n static readonly LENGTH: number = 32;\n\n /**\n * The raw bytes of the authentication key.\n * @group Implementation\n * @category Serialization\n */\n public readonly data: Hex;\n\n /**\n * Creates an instance of the AuthenticationKey using the provided hex input.\n * This ensures that the hex input is valid and conforms to the required length for an Authentication Key.\n *\n * @param args - The arguments for constructing the AuthenticationKey.\n * @param args.data - The hex input data to be used for the Authentication Key.\n * @throws {Error} Throws an error if the length of the provided hex input is not equal to the required Authentication Key\n * length.\n * @group Implementation\n * @category Serialization\n */\n constructor(args: { data: HexInput }) {\n super();\n const { data } = args;\n const hex = Hex.fromHexInput(data);\n if (hex.toUint8Array().length !== AuthenticationKey.LENGTH) {\n throw new Error(`Authentication Key length should be ${AuthenticationKey.LENGTH}`);\n }\n this.data = hex;\n }\n\n /**\n * Serializes the fixed bytes data into a format suitable for transmission or storage.\n *\n * @param serializer - The serializer instance used to perform the serialization.\n * @group Implementation\n * @category Serialization\n */\n serialize(serializer: Serializer): void {\n serializer.serializeFixedBytes(this.data.toUint8Array());\n }\n\n /**\n * Deserialize an AuthenticationKey from the byte buffer in a Deserializer instance.\n * @param deserializer - The deserializer to deserialize the AuthenticationKey from.\n * @returns An instance of AuthenticationKey.\n * @group Implementation\n * @category Serialization\n */\n static deserialize(deserializer: Deserializer): AuthenticationKey {\n const bytes = deserializer.deserializeFixedBytes(AuthenticationKey.LENGTH);\n return new AuthenticationKey({ data: bytes });\n }\n\n /**\n * Convert the internal data representation to a Uint8Array.\n *\n * This function is useful for obtaining a byte representation of the data, which can be utilized for serialization or transmission.\n *\n * @returns Uint8Array representation of the internal data.\n * @group Implementation\n * @category Serialization\n */\n toUint8Array(): Uint8Array {\n return this.data.toUint8Array();\n }\n\n /**\n * Generates an AuthenticationKey from the specified scheme and input bytes.\n * This function is essential for creating a valid authentication key based on a given scheme.\n *\n * @param args - The arguments for generating the AuthenticationKey.\n * @param args.scheme - The authentication key scheme to use.\n * @param args.input - The input data in hexadecimal format to derive the key.\n * @returns An instance of AuthenticationKey containing the generated key data.\n * @group Implementation\n * @category Serialization\n */\n static fromSchemeAndBytes(args: { scheme: AuthenticationKeyScheme; input: HexInput }): AuthenticationKey {\n const { scheme, input } = args;\n const inputBytes = Hex.fromHexInput(input).toUint8Array();\n const hashInput = new Uint8Array([...inputBytes, scheme]);\n const hash = sha3Hash.create();\n hash.update(hashInput);\n const hashDigest = hash.digest();\n return new AuthenticationKey({ data: hashDigest });\n }\n\n /**\n * Derives an AuthenticationKey from the provided public key using a specified derivation scheme.\n *\n * @deprecated Use `fromPublicKey` instead.\n * @param args - The arguments for deriving the authentication key.\n * @param args.publicKey - The public key used for the derivation.\n * @param args.scheme - The scheme to use for deriving the authentication key.\n * @group Implementation\n * @category Serialization\n */\n public static fromPublicKeyAndScheme(args: { publicKey: AccountPublicKey; scheme: AuthenticationKeyScheme }) {\n const { publicKey } = args;\n return publicKey.authKey();\n }\n\n /**\n * Converts a PublicKey to an AuthenticationKey using the derivation scheme inferred from the provided PublicKey instance.\n *\n * @param args - The arguments for the function.\n * @param args.publicKey - The PublicKey to be converted.\n * @returns AuthenticationKey - The derived AuthenticationKey.\n * @group Implementation\n * @category Serialization\n */\n static fromPublicKey(args: { publicKey: AccountPublicKey }): AuthenticationKey {\n const { publicKey } = args;\n return publicKey.authKey();\n }\n\n /**\n * Derives an account address from an AuthenticationKey by translating the AuthenticationKey bytes directly to an AccountAddress.\n *\n * @returns AccountAddress - The derived account address.\n * @group Implementation\n * @category Serialization\n */\n derivedAddress(): AccountAddress {\n return new AccountAddress(this.data.toUint8Array());\n }\n}\n"],"mappings":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serializable","args","data","hex","Hex","serializer","deserializer","bytes","scheme","input","inputBytes","hashInput","hash","sha3Hash","hashDigest","publicKey","AccountAddress","AuthenticationKey"]}
@@ -1,2 +0,0 @@
1
- import{a as i}from"./chunk-IF4UU2MT.mjs";import{bytesToHex as o,hexToBytes as s}from"@noble/hashes/utils";var u=(n=>(n.TOO_SHORT="too_short",n.INVALID_LENGTH="invalid_length",n.INVALID_HEX_CHARS="invalid_hex_chars",n))(u||{}),a=class e{constructor(t){this.data=t}toUint8Array(){return this.data}toStringWithoutPrefix(){return o(this.data)}toString(){return`0x${this.toStringWithoutPrefix()}`}static fromHexString(t){let r=t;if(r.startsWith("0x")&&(r=r.slice(2)),r.length===0)throw new i("Hex string is too short, must be at least 1 char long, excluding the optional leading 0x.","too_short");if(r.length%2!==0)throw new i("Hex string must be an even number of hex characters.","invalid_length");try{return new e(s(r))}catch(n){throw new i(`Hex string contains invalid hex characters: ${n?.message}`,"invalid_hex_chars")}}static fromHexInput(t){return t instanceof Uint8Array?new e(t):e.fromHexString(t)}static hexInputToUint8Array(t){return t instanceof Uint8Array?t:e.fromHexString(t).toUint8Array()}static hexInputToString(t){return e.fromHexInput(t).toString()}static hexInputToStringWithoutPrefix(t){return e.fromHexInput(t).toStringWithoutPrefix()}static isValid(t){try{return e.fromHexString(t),{valid:!0}}catch(r){return{valid:!1,invalidReason:r?.invalidReason,invalidReasonMessage:r?.message}}}equals(t){return this.data.length!==t.data.length?!1:this.data.every((r,n)=>r===t.data[n])}},l=e=>new TextDecoder().decode(a.fromHexInput(e).toUint8Array());export{u as a,a as b,l as c};
2
- //# sourceMappingURL=chunk-STY74NUA.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/core/hex.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { bytesToHex, hexToBytes } from \"@noble/hashes/utils\";\nimport { ParsingError, ParsingResult } from \"./common\";\nimport { HexInput } from \"../types\";\n\n/**\n * Provides reasons for parsing failures related to hexadecimal values.\n * @group Implementation\n * @category Serialization\n */\nexport enum HexInvalidReason {\n TOO_SHORT = \"too_short\",\n INVALID_LENGTH = \"invalid_length\",\n INVALID_HEX_CHARS = \"invalid_hex_chars\",\n}\n\n/**\n * NOTE: Do not use this class when working with account addresses; use AccountAddress instead.\n * When accepting hex data as input to a function, prefer to accept HexInput and\n *\n * A helper class for working with hex data. Hex data, when represented as a string,\n * generally looks like this, for example: 0xaabbcc, 45cd32, etc.\n *\n * then use the static helper methods of this class to convert it into the desired\n * format. This enables the greatest flexibility for the developer.\n *\n * Example usage:\n * ```typescript\n * getTransactionByHash(txnHash: HexInput): Promise<Transaction> {\n * const txnHashString = Hex.fromHexInput(txnHash).toString();\n * return await getTransactionByHashInner(txnHashString);\n * }\n * ```\n * This call to `Hex.fromHexInput().toString()` converts the HexInput to a hex string\n * with a leading 0x prefix, regardless of what the input format was.\n *\n * Other ways to chain the functions together:\n * - `Hex.fromHexString({ hexInput: \"0x1f\" }).toUint8Array()`\n * - `new Hex([1, 3]).toStringWithoutPrefix()`\n * @group Implementation\n * @category Serialization\n */\nexport class Hex {\n private readonly data: Uint8Array;\n\n /**\n * Create a new Hex instance from a Uint8Array.\n *\n * @param data - The Uint8Array containing the data to initialize the Hex instance.\n * @group Implementation\n * @category Serialization\n */\n constructor(data: Uint8Array) {\n this.data = data;\n }\n\n // ===\n // Methods for representing an instance of Hex as other types.\n // ===\n\n /**\n * Get the inner hex data as a Uint8Array. The inner data is already a Uint8Array, so no conversion takes place.\n *\n * @returns Hex data as Uint8Array\n * @group Implementation\n * @category Serialization\n */\n toUint8Array(): Uint8Array {\n return this.data;\n }\n\n /**\n * Get the hex data as a string without the 0x prefix.\n *\n * @returns Hex string without 0x prefix\n * @group Implementation\n * @category Serialization\n */\n toStringWithoutPrefix(): string {\n return bytesToHex(this.data);\n }\n\n /**\n * Get the hex data as a string with the 0x prefix.\n *\n * @returns Hex string with 0x prefix\n * @group Implementation\n * @category Serialization\n */\n toString(): string {\n return `0x${this.toStringWithoutPrefix()}`;\n }\n\n // ===\n // Methods for creating an instance of Hex from other types.\n // ===\n\n /**\n * Converts a hex string into a Hex instance, allowing for both prefixed and non-prefixed formats.\n *\n * @param str - A hex string, with or without the 0x prefix.\n *\n * @throws ParsingError - If the hex string is too short, has an odd number of characters, or contains invalid hex characters.\n *\n * @returns Hex - The resulting Hex instance created from the provided string.\n * @group Implementation\n * @category Serialization\n */\n static fromHexString(str: string): Hex {\n let input = str;\n\n if (input.startsWith(\"0x\")) {\n input = input.slice(2);\n }\n\n if (input.length === 0) {\n throw new ParsingError(\n \"Hex string is too short, must be at least 1 char long, excluding the optional leading 0x.\",\n HexInvalidReason.TOO_SHORT,\n );\n }\n\n if (input.length % 2 !== 0) {\n throw new ParsingError(\"Hex string must be an even number of hex characters.\", HexInvalidReason.INVALID_LENGTH);\n }\n\n try {\n return new Hex(hexToBytes(input));\n } catch (error: any) {\n throw new ParsingError(\n `Hex string contains invalid hex characters: ${error?.message}`,\n HexInvalidReason.INVALID_HEX_CHARS,\n );\n }\n }\n\n /**\n * Converts an instance of HexInput, which can be a string or a Uint8Array, into a Hex instance.\n * This function is useful for transforming hexadecimal representations into a structured Hex object for further manipulation.\n *\n * @param hexInput - A HexInput which can be a string or Uint8Array.\n * @returns A Hex instance created from the provided hexInput.\n * @group Implementation\n * @category Serialization\n */\n static fromHexInput(hexInput: HexInput): Hex {\n if (hexInput instanceof Uint8Array) return new Hex(hexInput);\n return Hex.fromHexString(hexInput);\n }\n\n /**\n * Converts an instance of HexInput, which can be a string or a Uint8Array, into a Uint8Array.\n *\n * @param hexInput - A HexInput which can be a string or Uint8Array.\n * @returns A Uint8Array created from the provided hexInput.\n */\n static hexInputToUint8Array(hexInput: HexInput): Uint8Array {\n if (hexInput instanceof Uint8Array) return hexInput;\n return Hex.fromHexString(hexInput).toUint8Array();\n }\n\n /**\n * Converts a HexInput (string or Uint8Array) to a hex string with '0x' prefix.\n *\n * @param hexInput - The input to convert, either a hex string (with/without '0x' prefix) or Uint8Array\n * @returns A hex string with '0x' prefix (e.g., \"0x1234\")\n *\n * @example\n * ```typescript\n * Hex.hexInputToString(\"1234\") // returns \"0x1234\"\n * Hex.hexInputToString(\"0x1234\") // returns \"0x1234\"\n * Hex.hexInputToString(new Uint8Array([0x12, 0x34])) // returns \"0x1234\"\n * ```\n */\n static hexInputToString(hexInput: HexInput): string {\n return Hex.fromHexInput(hexInput).toString();\n }\n\n /**\n * Converts a HexInput (string or Uint8Array) to a hex string without '0x' prefix.\n *\n * @param hexInput - The input to convert, either a hex string (with/without '0x' prefix) or Uint8Array\n * @returns A hex string without '0x' prefix (e.g., \"1234\")\n *\n * @example\n * ```typescript\n * Hex.hexInputToStringWithoutPrefix(\"1234\") // returns \"1234\"\n * Hex.hexInputToStringWithoutPrefix(\"0x1234\") // returns \"1234\"\n * Hex.hexInputToStringWithoutPrefix(new Uint8Array([0x12, 0x34])) // returns \"1234\"\n * ```\n */\n static hexInputToStringWithoutPrefix(hexInput: HexInput): string {\n return Hex.fromHexInput(hexInput).toStringWithoutPrefix();\n }\n\n // ===\n // Methods for checking validity.\n // ===\n\n /**\n * Check if the provided string is a valid hexadecimal representation.\n *\n * @param str - A hex string representing byte data.\n *\n * @returns An object containing:\n * - valid: A boolean indicating whether the string is valid.\n * - invalidReason: The reason for invalidity if the string is not valid.\n * - invalidReasonMessage: A message explaining why the string is invalid.\n * @group Implementation\n * @category Serialization\n */\n static isValid(str: string): ParsingResult<HexInvalidReason> {\n try {\n Hex.fromHexString(str);\n return { valid: true };\n } catch (error: any) {\n return {\n valid: false,\n invalidReason: error?.invalidReason,\n invalidReasonMessage: error?.message,\n };\n }\n }\n\n /**\n * Determine if two Hex instances are equal by comparing their underlying byte data.\n *\n * @param other The Hex instance to compare to.\n * @returns true if the Hex instances are equal, false if not.\n * @group Implementation\n * @category Serialization\n */\n equals(other: Hex): boolean {\n if (this.data.length !== other.data.length) return false;\n return this.data.every((value, index) => value === other.data[index]);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A8C,CAC3D,GAAI,CACF,OAAAH,EAAI,cAAcG,CAAG,EACd,CAAE,MAAO,EAAK,CACvB,OAASI,EAAY,CACnB,MAAO,CACL,MAAO,GACP,cAAeA,GAAO,cACtB,qBAAsBA,GAAO,OAC/B,CACF,CACF,CAUA,OAAOE,EAAqB,CAC1B,OAAI,KAAK,KAAK,SAAWA,EAAM,KAAK,OAAe,GAC5C,KAAK,KAAK,MAAM,CAACC,EAAOC,IAAUD,IAAUD,EAAM,KAAKE,CAAK,CAAC,CACtE,CACF,EAEaC,EAAoBC,GAAgB,IAAI,YAAY,EAAE,OAAOd,EAAI,aAAac,CAAG,EAAE,aAAa,CAAC","names":["bytesToHex","hexToBytes","HexInvalidReason","Hex","_Hex","data","bytesToHex","str","input","ParsingError","hexToBytes","error","hexInput","other","value","index","hexToAsciiString","hex"]}
@@ -1,2 +0,0 @@
1
- var S=(t=>(t.FULLNODE="Fullnode",t.INDEXER="Indexer",t.FAUCET="Faucet",t.PEPPER="Pepper",t.PROVER="Prover",t))(S||{}),o=2e6,A=2e3,E=20,n=20,R="0x1::aptos_coin::AptosCoin",T="0x000000000000000000000000000000000000000000000000000000000000000a",N="APTOS::RawTransaction",r="APTOS::RawTransactionWithData",C="APTOS::AASigningData",O=(_=>(_.ACCOUNT_RESTORATION_PROCESSOR="account_restoration_processor",_.ACCOUNT_TRANSACTION_PROCESSOR="account_transactions_processor",_.DEFAULT="default_processor",_.EVENTS_PROCESSOR="events_processor",_.FUNGIBLE_ASSET_PROCESSOR="fungible_asset_processor",_.STAKE_PROCESSOR="stake_processor",_.TOKEN_V2_PROCESSOR="token_v2_processor",_.USER_TRANSACTION_PROCESSOR="user_transaction_processor",_.OBJECT_PROCESSOR="objects_processor",_))(O||{}),c=/^https:\/\/securetoken\.google\.com\/[a-zA-Z0-9-_]+$/,e=new TextEncoder;export{S as a,o as b,A as c,E as d,n as e,R as f,T as g,N as h,r as i,C as j,O as k,c as l,e as m};
2
- //# sourceMappingURL=chunk-TAHLOBRG.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/const.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * Types of API endpoints used for routing requests in the Aptos network.\n * @group Implementation\n * @category Utils\n */\nexport enum AptosApiType {\n FULLNODE = \"Fullnode\",\n INDEXER = \"Indexer\",\n FAUCET = \"Faucet\",\n PEPPER = \"Pepper\",\n PROVER = \"Prover\",\n}\n\n/**\n * The default max gas amount when none is given.\n *\n * This is the maximum number of gas units that will be used by a transaction before being rejected.\n *\n * Note that max gas amount varies based on the transaction. A larger transaction will go over this\n * default gas amount, and the value will need to be changed for the specific transaction.\n * @group Implementation\n * @category Utils\n */\nexport const DEFAULT_MAX_GAS_AMOUNT = 2000000;\n\n/**\n * The minimum max gas amount that the SDK will allow for a transaction.\n *\n * This value acts as a floor to prevent transactions from being built with a max gas amount\n * below the network's minimum transaction gas units, which would cause\n * MAX_GAS_UNITS_BELOW_MIN_TRANSACTION_GAS_UNITS errors.\n * @group Implementation\n * @category Utils\n */\nexport const MIN_MAX_GAS_AMOUNT = 2000;\n\n/**\n * The default transaction expiration seconds from now.\n *\n * This time is how long until the blockchain nodes will reject the transaction.\n *\n * Note that the transaction expiration time varies based on network connection and network load. It may need to be\n * increased for the transaction to be processed.\n * @group Implementation\n * @category Utils\n */\nexport const DEFAULT_TXN_EXP_SEC_FROM_NOW = 20;\n\n/**\n * The default number of seconds to wait for a transaction to be processed.\n *\n * This time is the amount of time that the SDK will wait for a transaction to be processed when waiting for\n * the results of the transaction. It may take longer based on network connection and network load.\n * @group Implementation\n * @category Utils\n */\nexport const DEFAULT_TXN_TIMEOUT_SEC = 20;\n\n/**\n * The default gas currency for the network.\n * @group Implementation\n * @category Utils\n */\nexport const APTOS_COIN = \"0x1::aptos_coin::AptosCoin\";\n/**\n * @group Implementation\n * @category Utils\n */\nexport const APTOS_FA = \"0x000000000000000000000000000000000000000000000000000000000000000a\";\n/**\n * @group Implementation\n * @category Utils\n */\nexport const RAW_TRANSACTION_SALT = \"APTOS::RawTransaction\";\n/**\n * @group Implementation\n * @category Utils\n */\nexport const RAW_TRANSACTION_WITH_DATA_SALT = \"APTOS::RawTransactionWithData\";\n\nexport const ACCOUNT_ABSTRACTION_SIGNING_DATA_SALT = \"APTOS::AASigningData\";\n\n/**\n * Supported processor types for the indexer API, sourced from the processor_status table in the indexer database.\n * {@link https://cloud.hasura.io/public/graphiql?endpoint=https://api.mainnet.aptoslabs.com/v1/graphql}\n * @group Implementation\n * @category Utils\n */\nexport enum ProcessorType {\n ACCOUNT_RESTORATION_PROCESSOR = \"account_restoration_processor\",\n ACCOUNT_TRANSACTION_PROCESSOR = \"account_transactions_processor\",\n DEFAULT = \"default_processor\",\n EVENTS_PROCESSOR = \"events_processor\",\n // Fungible asset processor also handles coins\n FUNGIBLE_ASSET_PROCESSOR = \"fungible_asset_processor\",\n STAKE_PROCESSOR = \"stake_processor\",\n // Token V2 processor replaces Token processor (not only for digital assets)\n TOKEN_V2_PROCESSOR = \"token_v2_processor\",\n USER_TRANSACTION_PROCESSOR = \"user_transaction_processor\",\n OBJECT_PROCESSOR = \"objects_processor\",\n}\n\n/**\n * Regular expression pattern for Firebase Auth issuer URLs\n * Matches URLs in the format: https://securetoken.google.com/[project-id]\n * where project-id can contain letters, numbers, hyphens, and underscores\n */\nexport const FIREBASE_AUTH_ISS_PATTERN = /^https:\\/\\/securetoken\\.google\\.com\\/[a-zA-Z0-9-_]+$/;\n\n/**\n * Shared TextEncoder instance for string serialization to avoid repeated instantiation.\n */\nexport const TEXT_ENCODER = new TextEncoder();\n"],"mappings":"AAQO,IAAKA,OACVA,EAAA,SAAW,WACXA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,OAAS,SACTA,EAAA,OAAS,SALCA,OAAA,IAkBCC,EAAyB,IAWzBC,EAAqB,IAYrBC,EAA+B,GAU/BC,EAA0B,GAO1BC,EAAa,6BAKbC,EAAW,qEAKXC,EAAuB,wBAKvBC,EAAiC,gCAEjCC,EAAwC,uBAQzCC,OACVA,EAAA,8BAAgC,gCAChCA,EAAA,8BAAgC,iCAChCA,EAAA,QAAU,oBACVA,EAAA,iBAAmB,mBAEnBA,EAAA,yBAA2B,2BAC3BA,EAAA,gBAAkB,kBAElBA,EAAA,mBAAqB,qBACrBA,EAAA,2BAA6B,6BAC7BA,EAAA,iBAAmB,oBAXTA,OAAA,IAmBCC,EAA4B,uDAK5BC,EAAe,IAAI","names":["AptosApiType","DEFAULT_MAX_GAS_AMOUNT","MIN_MAX_GAS_AMOUNT","DEFAULT_TXN_EXP_SEC_FROM_NOW","DEFAULT_TXN_TIMEOUT_SEC","APTOS_COIN","APTOS_FA","RAW_TRANSACTION_SALT","RAW_TRANSACTION_WITH_DATA_SALT","ACCOUNT_ABSTRACTION_SIGNING_DATA_SALT","ProcessorType","FIREBASE_AUTH_ISS_PATTERN","TEXT_ENCODER"]}
@@ -1,2 +0,0 @@
1
- import{b as u}from"./chunk-2DQRUJUC.mjs";async function i(e){let{aptosConfig:t,overrides:s,params:r,contentType:n,acceptType:a,path:p,originMethod:o,type:R}=e,d=t.getRequestUrl(R);return u({url:d,method:"GET",originMethod:o,path:p,contentType:n,acceptType:a,params:r,overrides:{...t.clientConfig,...s}},t,e.type)}async function l(e){let{aptosConfig:t}=e;return i({...e,type:"Fullnode",overrides:{...t.clientConfig,...t.fullnodeConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.fullnodeConfig?.HEADERS}}})}async function y(e){return i({...e,type:"Pepper"})}async function q(e){let t=[],s,r=e.params;do{let n=await i({type:"Fullnode",aptosConfig:e.aptosConfig,originMethod:e.originMethod,path:e.path,params:r,overrides:e.overrides});s=n.headers["x-aptos-cursor"],delete n.headers,t=t.concat(n.data),r.start=s}while(s!=null);return t}async function A(e){let t=[],s,r=e.params,n=r.limit;do{let{response:a,cursor:p}=await c({...e});if(s=p,t=t.concat(a.data),e?.params&&(e.params.start=s),n!==void 0){let o=n-t.length;if(o<=0)break;r.limit=o}}while(s!=null);return t}async function c(e){let t={};typeof e.params?.cursor=="string"&&(t.start=e.params.cursor),typeof e.params?.limit=="number"&&(t.limit=e.params.limit);let s=await i({type:"Fullnode",aptosConfig:e.aptosConfig,originMethod:e.originMethod,path:e.path,params:t,overrides:e.overrides}),r=s.headers["x-aptos-cursor"]??void 0;return{response:s,cursor:r}}export{i as a,l as b,y as c,q as d,A as e,c as f};
2
- //# sourceMappingURL=chunk-TBIK7DML.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/client/get.ts"],"sourcesContent":["import { AptosConfig } from \"../api/aptosConfig\";\nimport { aptosRequest } from \"./core\";\nimport { AptosResponse, AnyNumber, ClientConfig, MimeType } from \"../types\";\nimport { AptosApiType } from \"../utils/const\";\n\n/**\n * Options for making a GET request, including configuration for the API client.\n * @group Implementation\n * @category Client\n */\nexport type GetRequestOptions = {\n /**\n * The config for the API client\n * @group Implementation\n * @category Client\n */\n aptosConfig: AptosConfig;\n /**\n * The type of API endpoint to call e.g. fullnode, indexer, etc\n * @group Implementation\n * @category Client\n */\n type: AptosApiType;\n /**\n * The name of the API method\n * @group Implementation\n * @category Client\n */\n originMethod: string;\n /**\n * The URL path to the API method\n * @group Implementation\n * @category Client\n */\n path: string;\n /**\n * The content type of the request body\n * @group Implementation\n * @category Client\n */\n contentType?: MimeType;\n /**\n * The accepted content type of the response of the API\n * @group Implementation\n * @category Client\n */\n acceptType?: MimeType;\n /**\n * The query parameters for the request\n * @group Implementation\n * @category Client\n */\n params?: Record<string, string | AnyNumber | boolean | undefined>;\n /**\n * Specific client overrides for this request to override aptosConfig\n * @group Implementation\n * @category Client\n */\n overrides?: ClientConfig;\n};\n\n/**\n * Options for making a request to the Aptos API, excluding the \"type\" field.\n * @group Implementation\n * @category Client\n */\nexport type GetAptosRequestOptions = Omit<GetRequestOptions, \"type\">;\n\n/**\n * Executes a GET request to retrieve data based on the provided options.\n *\n * @param options - The options for the GET request.\n * @param options.aptosConfig - The configuration object for Aptos requests.\n * @param options.overrides - Optional overrides for the request configuration.\n * @param options.params - Query parameters to include in the request.\n * @param options.contentType - The content type of the request.\n * @param options.acceptType - The accepted response type.\n * @param options.path - The specific path for the request.\n * @param options.originMethod - The original method of the request.\n * @param options.type - The type of request being made.\n * @returns The response from the GET request.\n * @group Implementation\n * @category Client\n */\nexport async function get<Req extends {}, Res extends {}>(\n options: GetRequestOptions,\n): Promise<AptosResponse<Req, Res>> {\n const { aptosConfig, overrides, params, contentType, acceptType, path, originMethod, type } = options;\n const url = aptosConfig.getRequestUrl(type);\n\n return aptosRequest<Req, Res>(\n {\n url,\n method: \"GET\",\n originMethod,\n path,\n contentType,\n acceptType,\n params,\n overrides: {\n ...aptosConfig.clientConfig,\n ...overrides,\n },\n },\n aptosConfig,\n options.type,\n );\n}\n\n/**\n * Retrieves data from the Aptos full node using the provided options.\n *\n * @param options - The options for the request to the Aptos full node.\n * @param options.aptosConfig - Configuration settings specific to the Aptos client and full node.\n * @param options.aptosConfig.clientConfig - The client configuration settings.\n * @param options.aptosConfig.fullnodeConfig - The full node configuration settings.\n * @param options.overrides - Additional overrides for the request.\n * @param options.type - The type of API request being made.\n *\n * @returns A promise that resolves with the response from the Aptos full node.\n * @group Implementation\n * @category Client\n */\nexport async function getAptosFullNode<Req extends {}, Res extends {}>(\n options: GetAptosRequestOptions,\n): Promise<AptosResponse<Req, Res>> {\n const { aptosConfig } = options;\n\n return get<Req, Res>({\n ...options,\n type: AptosApiType.FULLNODE,\n overrides: {\n ...aptosConfig.clientConfig,\n ...aptosConfig.fullnodeConfig,\n ...options.overrides,\n HEADERS: { ...aptosConfig.clientConfig?.HEADERS, ...aptosConfig.fullnodeConfig?.HEADERS },\n },\n });\n}\n\n/**\n * Makes a GET request to the Aptos Pepper service to retrieve data.\n *\n * @param options - The options for the request.\n * @param options.param1 - Description of param1.\n * @param options.param2 - Description of param2.\n * @returns AptosResponse - The response from the Aptos Pepper service.\n * @group Implementation\n * @category Client\n */\nexport async function getAptosPepperService<Req extends {}, Res extends {}>(\n options: GetAptosRequestOptions,\n): Promise<AptosResponse<Req, Res>> {\n return get<Req, Res>({ ...options, type: AptosApiType.PEPPER });\n}\n\n/**\n * This function is a helper for paginating using a function wrapping an API\n * @group Implementation\n * @category Client\n */\nexport async function paginateWithCursor<Req extends Record<string, any>, Res extends Array<{}>>(\n options: GetAptosRequestOptions,\n): Promise<Res> {\n let out: Res = [] as unknown as Res;\n let cursor: string | undefined;\n const requestParams = options.params as { start?: string; limit?: number };\n do {\n const response = await get<Req, Res>({\n type: AptosApiType.FULLNODE,\n aptosConfig: options.aptosConfig,\n originMethod: options.originMethod,\n path: options.path,\n params: requestParams,\n overrides: options.overrides,\n });\n /**\n * the cursor is a \"state key\" from the API perspective. Client\n * should not need to \"care\" what it represents but just use it\n * to query the next chunk of data.\n * @group Implementation\n * @category Client\n */\n cursor = response.headers[\"x-aptos-cursor\"];\n // Now that we have the cursor (if any), we remove the headers before\n // adding these to the output of this function.\n delete response.headers;\n // Use concat instead of push(...) for better performance with large arrays\n out = out.concat(response.data) as Res;\n requestParams.start = cursor;\n } while (cursor !== null && cursor !== undefined);\n return out;\n}\n\n/// This function is a helper for paginating using a function wrapping an API using offset instead of start\nexport async function paginateWithObfuscatedCursor<Req extends Record<string, any>, Res extends Array<{}>>(\n options: GetAptosRequestOptions,\n): Promise<Res> {\n let out: Res = [] as unknown as Res;\n let cursor: string | undefined;\n const requestParams = options.params as { start?: string; limit?: number };\n const totalLimit = requestParams.limit;\n do {\n const { response, cursor: newCursor } = await getPageWithObfuscatedCursor<Req, Res>({ ...options });\n\n /**\n * the cursor is a \"state key\" from the API perspective. Client\n * should not need to \"care\" what it represents but just use it\n * to query the next chunk of data.\n */\n cursor = newCursor;\n // Use concat instead of push(...) for better performance with large arrays\n out = out.concat(response.data) as Res;\n if (options?.params) {\n options.params.start = cursor;\n }\n\n // Re-evaluate length\n if (totalLimit !== undefined) {\n const newLimit = totalLimit - out.length;\n if (newLimit <= 0) {\n break;\n }\n requestParams.limit = newLimit;\n }\n } while (cursor !== null && cursor !== undefined);\n return out;\n}\n\nexport async function getPageWithObfuscatedCursor<Req extends Record<string, any>, Res extends Array<{}>>(\n options: GetAptosRequestOptions,\n): Promise<{ response: AptosResponse<Req, Res>; cursor: string | undefined }> {\n const requestParams: { start?: string; limit?: number } = {};\n\n // Drop any other values\n // TODO: Throw error if cursor is not a string\n if (typeof options.params?.cursor === \"string\") {\n requestParams.start = options.params.cursor;\n }\n if (typeof options.params?.limit === \"number\") {\n requestParams.limit = options.params.limit;\n }\n\n const response = await get<Req, Res>({\n type: AptosApiType.FULLNODE,\n aptosConfig: options.aptosConfig,\n originMethod: options.originMethod,\n path: options.path,\n params: requestParams,\n overrides: options.overrides,\n });\n\n /**\n * the cursor is a \"state key\" from the API perspective. Client\n * should not need to \"care\" what it represents but just use it\n * to query the next chunk of data.\n */\n const cursor = response.headers[\"x-aptos-cursor\"] ?? undefined;\n return { response, cursor };\n}\n"],"mappings":"yCAoFA,eAAsBA,EACpBC,EACkC,CAClC,GAAM,CAAE,YAAAC,EAAa,UAAAC,EAAW,OAAAC,EAAQ,YAAAC,EAAa,WAAAC,EAAY,KAAAC,EAAM,aAAAC,EAAc,KAAAC,CAAK,EAAIR,EACxFS,EAAMR,EAAY,cAAcO,CAAI,EAE1C,OAAOE,EACL,CACE,IAAAD,EACA,OAAQ,MACR,aAAAF,EACA,KAAAD,EACA,YAAAF,EACA,WAAAC,EACA,OAAAF,EACA,UAAW,CACT,GAAGF,EAAY,aACf,GAAGC,CACL,CACF,EACAD,EACAD,EAAQ,IACV,CACF,CAgBA,eAAsBW,EACpBX,EACkC,CAClC,GAAM,CAAE,YAAAC,CAAY,EAAID,EAExB,OAAOD,EAAc,CACnB,GAAGC,EACH,gBACA,UAAW,CACT,GAAGC,EAAY,aACf,GAAGA,EAAY,eACf,GAAGD,EAAQ,UACX,QAAS,CAAE,GAAGC,EAAY,cAAc,QAAS,GA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,EAAQ,YACrB,aAAcA,EAAQ,aACtB,KAAMA,EAAQ,KACd,OAAQgB,EACR,UAAWhB,EAAQ,SACrB,CAAC,EAOKe,EAASE,EAAS,QAAQ,gBAAgB,GAAK,OACrD,MAAO,CAAE,SAAAA,EAAU,OAAAF,CAAO,CAC5B","names":["get","options","aptosConfig","overrides","params","contentType","acceptType","path","originMethod","type","url","aptosRequest","getAptosFullNode","getAptosPepperService","paginateWithCursor","out","cursor","requestParams","response","paginateWithObfuscatedCursor","totalLimit","newCursor","getPageWithObfuscatedCursor","newLimit"]}
@@ -1,2 +0,0 @@
1
- function i(a,t){if(!(a.getTransactionSubmitter()!==void 0||t.transactionSubmitter!==void 0)&&t.transaction.feePayerAddress&&!t.feePayerAuthenticator)throw new Error("You are submitting a Fee Payer transaction but missing the feePayerAuthenticator")}function o(a,t,n){let e=n.value;return n.value=async function(...r){return e.apply(this,r)},n}export{i as a,o as b};
2
- //# sourceMappingURL=chunk-UVJW4DPP.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/api/transactionSubmission/helpers.ts"],"sourcesContent":["import { AccountAuthenticator, AnyRawTransaction, InputTransactionPluginData } from \"../../transactions\";\nimport { AptosConfig } from \"../aptosConfig\";\n\n/**\n * Validates the fee payer data when submitting a transaction to ensure that the fee\n * payer authenticator is provided if a fee payer address is specified. This helps\n * prevent errors in transaction submission related to fee payer authentication.\n *\n * The validation is skipped if a custom transaction submitter is defined.\n *\n * @param config - The Aptos configuration that may contain a transaction submitter.\n * @param args - The method arguments containing transaction data and optional transaction submitter.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * class TransactionHandler {\n * async submitTransaction(methodArgs: { transaction: { feePayerAddress: string }, feePayerAuthenticator?: string }) {\n * validateFeePayerDataOnSubmission(this.config, methodArgs);\n * // Logic to submit the transaction\n * }\n * }\n *\n * async function runExample() {\n * const handler = new TransactionHandler();\n *\n * // Attempt to submit a transaction without a fee payer authenticator\n * try {\n * await handler.submitTransaction({\n * transaction: { feePayerAddress: \"0x1\" }, // replace with a real fee payer address\n * });\n * } catch (error) {\n * console.error(error.message); // Should log the error message\n * }\n *\n * // Submit a transaction with a fee payer authenticator\n * await handler.submitTransaction({\n * transaction: { feePayerAddress: \"0x1\" }, // replace with a real fee payer address\n * feePayerAuthenticator: \"authenticatorValue\", // replace with a real authenticator\n * });\n *\n * console.log(\"Transaction submitted successfully.\");\n * }\n * runExample().catch(console.error);\n * ```\n * @group Implementation\n */\nexport function validateFeePayerDataOnSubmission(\n config: AptosConfig,\n args: {\n transaction: AnyRawTransaction;\n senderAuthenticator: AccountAuthenticator;\n feePayerAuthenticator?: AccountAuthenticator;\n } & InputTransactionPluginData,\n): void {\n // Skip validation if a transaction submitter is defined.\n if (config.getTransactionSubmitter() !== undefined || args.transactionSubmitter !== undefined) {\n return;\n }\n\n if (args.transaction.feePayerAddress && !args.feePayerAuthenticator) {\n throw new Error(\"You are submitting a Fee Payer transaction but missing the feePayerAuthenticator\");\n }\n}\n\n/**\n * Validates that the fee payer public key is provided when simulating a Fee Payer transaction.\n * This ensures that all necessary data is present for the simulation to proceed correctly.\n *\n * @param target - The target object where the method is defined.\n * @param propertyKey - The name of the method being decorated.\n * @param descriptor - The property descriptor for the method.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * const methodArgs = {\n * transaction: {\n * feePayerAddress: \"0x1\", // replace with a real fee payer address\n * },\n * feePayerPublicKey: undefined, // missing fee payer public key\n * };\n *\n * try {\n * // This will throw an error due to missing feePayerPublicKey\n * await aptos.someMethod(methodArgs);\n * } catch (error) {\n * console.error(error.message); // Output the error message\n * }\n * }\n * runExample().catch(console.error);\n * ```\n * @group Implementation\n */\nexport function ValidateFeePayerDataOnSimulation(target: unknown, propertyKey: string, descriptor: PropertyDescriptor) {\n const originalMethod = descriptor.value;\n descriptor.value = async function (...args: any[]) {\n return originalMethod.apply(this, args);\n };\n\n return descriptor;\n}\n"],"mappings":"AAmDO,SAASA,EACdC,EACAC,EAKM,CAEN,GAAI,EAAAD,EAAO,wBAAwB,IAAM,QAAaC,EAAK,uBAAyB,SAIhFA,EAAK,YAAY,iBAAmB,CAACA,EAAK,sBAC5C,MAAM,IAAI,MAAM,kFAAkF,CAEtG,CAoCO,SAASC,EAAiCC,EAAiBC,EAAqBC,EAAgC,CACrH,IAAMC,EAAiBD,EAAW,MAClC,OAAAA,EAAW,MAAQ,kBAAmBJ,EAAa,CACjD,OAAOK,EAAe,MAAM,KAAML,CAAI,CACxC,EAEOI,CACT","names":["validateFeePayerDataOnSubmission","config","args","ValidateFeePayerDataOnSimulation","target","propertyKey","descriptor","originalMethod"]}
@@ -1,2 +0,0 @@
1
- import{a as l}from"./chunk-LVZ7QMUH.mjs";import{a as h}from"./chunk-NHRPXEUE.mjs";import{a as x}from"./chunk-A5H5VKUI.mjs";import{a as m}from"./chunk-RZNP3WG4.mjs";import{c}from"./chunk-RUKFK3OC.mjs";import{b as n}from"./chunk-STY74NUA.mjs";import{sha3_256 as A}from"@noble/hashes/sha3";import{p256 as y}from"@noble/curves/nist";var s=class s extends x{constructor(e){super();this.keyType="secp256r1";let r=n.fromHexInput(e),i=r.toUint8Array().length;if(i!==s.LENGTH&&i!==s.COMPRESSED_LENGTH)throw new Error(`PublicKey length should be ${s.LENGTH} or ${s.COMPRESSED_LENGTH}, received ${i}`);if(i===s.COMPRESSED_LENGTH){let u=y.ProjectivePoint.fromHex(r.toUint8Array());this.key=n.fromHexInput(u.toRawBytes(!1))}else this.key=r}toUint8Array(){return this.key.toUint8Array()}toString(){return this.key.toString()}bcsToBytes(){let e=new c;return this.serialize(e),e.toUint8Array()}verifySignature(e){let{message:r,signature:i}=e,u=n.fromHexInput(r).toUint8Array(),f=A(u),U=i.toUint8Array();return y.verify(U,f,this.toUint8Array())}async verifySignatureAsync(e){return this.verifySignature({message:e.message,signature:e.signature})}serialize(e){e.serializeBytes(this.key.toUint8Array())}static deserialize(e){let r=e.deserializeBytes();return new s(r)}static load(e){let r=e.deserializeBytes();return new s(r)}static isInstance(e){return"key"in e&&e.key?.data?.length===s.LENGTH&&"keyType"in e&&e.keyType==="secp256r1"}authKey(){let e=new c;return e.serializeU32AsUleb128(2),e.serializeFixedBytes(this.bcsToBytes()),m.fromSchemeAndBytes({scheme:2,input:e.toUint8Array()})}};s.LENGTH=65,s.COMPRESSED_LENGTH=33;var g=s,a=class a extends l{constructor(t,e){super();let r=l.parseHexInput(t,"secp256r1",e),i=r.toUint8Array().length;if(i!==a.LENGTH)throw new Error(`PrivateKey length should be ${a.LENGTH}, received ${i}`);this.key=r}toUint8Array(){return this.key.toUint8Array()}toString(){return l.formatPrivateKey(this.key.toString(),"secp256r1")}toHexString(){return this.key.toString()}sign(t){let e=n.fromHexInput(t),r=A(e.toUint8Array()),i=y.sign(r,this.key.toUint8Array());return new p(i.toCompactRawBytes())}serialize(t){t.serializeBytes(this.toUint8Array())}static deserialize(t){let e=t.deserializeBytes();return new a(e)}static generate(){let t=y.utils.randomPrivateKey();return new a(t)}publicKey(){let t=y.getPublicKey(this.key.toUint8Array(),!1);return new g(t)}};a.LENGTH=32;var H=a,S=class d extends h{constructor(t,e,r){super(),this.signature=n.fromHexInput(t),this.authenticatorData=n.fromHexInput(e),this.clientDataJSON=n.fromHexInput(r)}toUint8Array(){return this.signature.toUint8Array()}serialize(t){t.serializeU32AsUleb128(0),t.serializeBytes(this.signature.toUint8Array()),t.serializeBytes(this.authenticatorData.toUint8Array()),t.serializeBytes(this.clientDataJSON.toUint8Array())}bcsToBytes(){let t=new c;return this.serialize(t),t.toUint8Array()}bcsToHex(){return n.fromHexInput(this.bcsToBytes())}toStringWithoutPrefix(){return n.fromHexInput(this.bcsToBytes()).toString()}static deserialize(t){let e=t.deserializeUleb128AsU32();if(e!==0)throw new Error(`Invalid id for WebAuthnSignature: ${e}`);let r=t.deserializeBytes(),i=t.deserializeBytes(),u=t.deserializeBytes();return new d(r,i,u)}},o=class o extends h{constructor(t){super();let e=n.fromHexInput(t),r=e.toUint8Array().length;if(r!==o.LENGTH)throw new Error(`Signature length should be ${o.LENGTH}, received ${r}`);let i=y.Signature.fromCompact(e.toUint8Array()).normalizeS().toCompactRawBytes();this.data=n.fromHexInput(i)}toUint8Array(){return this.data.toUint8Array()}toString(){return this.data.toString()}serialize(t){t.serializeBytes(this.data.toUint8Array())}static deserialize(t){let e=t.deserializeBytes();return new o(e)}};o.LENGTH=64;var p=o;export{g as a,H as b,S as c,p as d};
2
- //# sourceMappingURL=chunk-UVNAHETD.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/core/crypto/secp256r1.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { sha3_256 } from \"@noble/hashes/sha3\";\nimport { p256 } from \"@noble/curves/nist\";\nimport { Deserializer, Serializer } from \"../../bcs\";\nimport { Hex } from \"../hex\";\nimport {\n HexInput,\n PrivateKeyVariants,\n SigningScheme as AuthenticationKeyScheme,\n AnyPublicKeyVariant,\n} from \"../../types\";\nimport { PublicKey, VerifySignatureAsyncArgs } from \"./publicKey\";\nimport { PrivateKey } from \"./privateKey\";\nimport { Signature } from \"./signature\";\nimport { AuthenticationKey } from \"../authenticationKey\";\n\n/**\n * Represents a Secp256r1 ECDSA public key.\n *\n * @extends PublicKey\n * @property LENGTH - The length of the Secp256r1 public key in bytes.\n * @group Implementation\n * @category Serialization\n */\nexport class Secp256r1PublicKey extends PublicKey {\n // Secp256r1 ecdsa public keys contain a prefix indicating compression and two 32-byte coordinates.\n static readonly LENGTH: number = 65;\n\n // If it's compressed, it is only 33 bytes\n static readonly COMPRESSED_LENGTH: number = 33;\n\n // Hex value of the public key\n private readonly key: Hex;\n\n // Identifier to distinguish from Secp256k1PublicKey\n public readonly keyType: string = \"secp256r1\";\n\n /**\n * Create a new PublicKey instance from a HexInput, which can be a string or Uint8Array.\n * This constructor validates the length of the provided public key data.\n *\n * @param hexInput - A HexInput (string or Uint8Array) representing the public key data.\n * @throws Error if the length of the public key data is not equal to Secp256r1PublicKey.LENGTH or COMPRESSED_LENGTH.\n * @group Implementation\n * @category Serialization\n */\n constructor(hexInput: HexInput) {\n super();\n\n const hex = Hex.fromHexInput(hexInput);\n const keyLength = hex.toUint8Array().length;\n if (keyLength !== Secp256r1PublicKey.LENGTH && keyLength !== Secp256r1PublicKey.COMPRESSED_LENGTH) {\n throw new Error(\n `PublicKey length should be ${Secp256r1PublicKey.LENGTH} or ${Secp256r1PublicKey.COMPRESSED_LENGTH}, received ${keyLength}`,\n );\n }\n\n if (keyLength === Secp256r1PublicKey.COMPRESSED_LENGTH) {\n const point = p256.ProjectivePoint.fromHex(hex.toUint8Array());\n this.key = Hex.fromHexInput(point.toRawBytes(false));\n } else {\n this.key = hex;\n }\n }\n\n /**\n * Get the data as a Uint8Array representation.\n *\n * @returns Uint8Array representation of the data.\n * @group Implementation\n * @category Serialization\n */\n toUint8Array(): Uint8Array {\n return this.key.toUint8Array();\n }\n\n /**\n * Get the public key as a hex string with the 0x prefix.\n *\n * @returns string representation of the public key.\n * @group Implementation\n * @category Serialization\n */\n toString(): string {\n return this.key.toString();\n }\n\n /**\n * Converts the public key to BCS (Binary Canonical Serialization) bytes.\n * This function serializes the public key data into a byte array format suitable for transmission or storage.\n *\n * @returns Uint8Array representation of the serialized public key.\n * @group Implementation\n * @category Serialization\n */\n bcsToBytes() {\n const serializer = new Serializer();\n this.serialize(serializer);\n return serializer.toUint8Array();\n }\n\n /**\n * Verifies a Secp256r1 signature against the public key.\n *\n * This function checks the validity of a signature for a given message.\n *\n * @param args - The arguments for verifying the signature.\n * @param args.message - The message that was signed.\n * @param args.signature - The signature to verify against the public key.\n * @group Implementation\n * @category Serialization\n */\n verifySignature(args: { message: HexInput; signature: Signature }): boolean {\n const { message, signature } = args;\n\n const msgHex = Hex.fromHexInput(message).toUint8Array();\n const sha3Message = sha3_256(msgHex);\n const rawSignature = signature.toUint8Array();\n\n return p256.verify(rawSignature, sha3Message, this.toUint8Array());\n }\n\n /**\n * Note: Secp256r1Signatures can be verified synchronously.\n *\n * Verifies the provided signature against the given message.\n * This function helps ensure the integrity and authenticity of the message by confirming that the signature is valid.\n *\n * @param args - The arguments for signature verification.\n * @param args.message - The message that was signed.\n * @param args.signature - The signature to verify, which must be an instance of Secp256r1Signature.\n * @returns A boolean indicating whether the signature is valid for the given message.\n * @group Implementation\n * @category Serialization\n */\n async verifySignatureAsync(args: VerifySignatureAsyncArgs): Promise<boolean> {\n return this.verifySignature({ message: args.message, signature: args.signature });\n }\n\n /**\n * Serializes the data into a byte array using the provided serializer.\n * This function is essential for converting data into a format suitable for transmission or storage.\n *\n * @param serializer - The serializer instance used to convert the data.\n * @group Implementation\n * @category Serialization\n */\n serialize(serializer: Serializer): void {\n serializer.serializeBytes(this.key.toUint8Array());\n }\n\n /**\n * Deserializes a Secp256r1PublicKey from the provided deserializer.\n * This function allows you to reconstruct a Secp256r1PublicKey object from its serialized byte representation.\n *\n * @param deserializer - The deserializer instance used to read the serialized data.\n * @group Implementation\n * @category Serialization\n */\n static deserialize(deserializer: Deserializer): Secp256r1PublicKey {\n const bytes = deserializer.deserializeBytes();\n return new Secp256r1PublicKey(bytes);\n }\n\n /**\n * Loads a Secp256r1PublicKey from the provided deserializer.\n *\n * @param deserializer - The deserializer instance used to read the serialized data.\n * @group Implementation\n * @category Serialization\n */\n static load(deserializer: Deserializer): Secp256r1PublicKey {\n const bytes = deserializer.deserializeBytes();\n return new Secp256r1PublicKey(bytes);\n }\n\n /**\n * Determines if the provided public key is a valid instance of a Secp256r1 public key.\n * This function checks for the presence of a \"key\" property and validates the length of the key data.\n *\n * @param publicKey - The public key to validate.\n * @returns A boolean indicating whether the public key is a valid Secp256r1 public key.\n * @group Implementation\n * @category Serialization\n */\n static isInstance(publicKey: PublicKey): publicKey is Secp256r1PublicKey {\n return (\n \"key\" in publicKey &&\n (publicKey.key as any)?.data?.length === Secp256r1PublicKey.LENGTH &&\n \"keyType\" in publicKey &&\n (publicKey as any).keyType === \"secp256r1\"\n );\n }\n\n /**\n * Generates an authentication key from the public key using the Secp256r1 scheme.\n * This function is essential for creating a secure authentication key that can be used for further cryptographic operations.\n *\n * @returns {AuthenticationKey} The generated authentication key.\n * @group Implementation\n * @category Serialization\n */\n authKey(): AuthenticationKey {\n const serializer = new Serializer();\n serializer.serializeU32AsUleb128(AnyPublicKeyVariant.Secp256r1);\n serializer.serializeFixedBytes(this.bcsToBytes());\n return AuthenticationKey.fromSchemeAndBytes({\n scheme: AuthenticationKeyScheme.SingleKey,\n input: serializer.toUint8Array(),\n });\n }\n}\n\n/**\n * Represents a Secp256r1 ECDSA private key, providing functionality to create, sign messages,\n * derive public keys, and serialize/deserialize the key.\n * @group Implementation\n * @category Serialization\n */\nexport class Secp256r1PrivateKey extends PrivateKey {\n /**\n * Length of Secp256r1 ecdsa private key\n * @group Implementation\n * @category Serialization\n */\n static readonly LENGTH: number = 32;\n\n /**\n * The private key bytes\n * @private\n * @group Implementation\n * @category Serialization\n */\n private readonly key: Hex;\n\n /**\n * Create a new PrivateKey instance from a Uint8Array or String.\n *\n * [Read about AIP-80](https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-80.md)\n *\n * @param hexInput A HexInput (string or Uint8Array)\n * @param strict If true, private key must AIP-80 compliant.\n * @group Implementation\n * @category Serialization\n */\n constructor(hexInput: HexInput, strict?: boolean) {\n super();\n\n const privateKeyHex = PrivateKey.parseHexInput(hexInput, PrivateKeyVariants.Secp256r1, strict);\n const keyLength = privateKeyHex.toUint8Array().length;\n if (keyLength !== Secp256r1PrivateKey.LENGTH) {\n throw new Error(`PrivateKey length should be ${Secp256r1PrivateKey.LENGTH}, received ${keyLength}`);\n }\n\n this.key = privateKeyHex;\n }\n\n /**\n * Get the private key in bytes (Uint8Array).\n *\n * @returns\n * @group Implementation\n * @category Serialization\n */\n toUint8Array(): Uint8Array {\n return this.key.toUint8Array();\n }\n\n /**\n * Get the private key as a string representation.\n *\n * @returns string representation of the private key\n * @group Implementation\n * @category Serialization\n */\n toString(): string {\n return PrivateKey.formatPrivateKey(this.key.toString(), PrivateKeyVariants.Secp256r1);\n }\n\n /**\n * Get the private key as a hex string with the 0x prefix.\n *\n * @returns string representation of the private key.\n */\n toHexString(): string {\n return this.key.toString();\n }\n\n /**\n * Sign the given message with the private key.\n * This function generates a cryptographic signature for the provided message.\n *\n * @param message - A message in HexInput format to be signed.\n * @returns Signature - The generated signature for the provided message.\n * @group Implementation\n * @category Serialization\n */\n sign(message: HexInput): Secp256r1Signature {\n const msgHex = Hex.fromHexInput(message);\n const sha3Message = sha3_256(msgHex.toUint8Array());\n const signature = p256.sign(sha3Message, this.key.toUint8Array());\n return new Secp256r1Signature(signature.toCompactRawBytes());\n }\n\n /**\n * Serializes the data into a byte array using the provided serializer.\n * This function is essential for converting data into a format suitable for transmission or storage.\n *\n * @param serializer - The serializer instance used to convert the data.\n * @group Implementation\n * @category Serialization\n */\n serialize(serializer: Serializer): void {\n serializer.serializeBytes(this.toUint8Array());\n }\n\n /**\n * Deserializes a Secp256r1PrivateKey from the provided deserializer.\n * This function allows you to reconstruct a Secp256r1PrivateKey object from its serialized byte representation.\n *\n * @param deserializer - The deserializer instance used to read the serialized data.\n * @group Implementation\n * @category Serialization\n */\n static deserialize(deserializer: Deserializer): Secp256r1PrivateKey {\n const bytes = deserializer.deserializeBytes();\n return new Secp256r1PrivateKey(bytes);\n }\n\n /**\n * Generate a new random private key.\n *\n * @returns Secp256r1PrivateKey - A newly generated Secp256r1 private key.\n * @group Implementation\n * @category Serialization\n */\n static generate(): Secp256r1PrivateKey {\n const hexInput = p256.utils.randomPrivateKey();\n return new Secp256r1PrivateKey(hexInput);\n }\n\n /**\n * Derive the Secp256r1PublicKey from this private key.\n *\n * @returns Secp256r1PublicKey The derived public key.\n * @group Implementation\n * @category Serialization\n */\n publicKey(): Secp256r1PublicKey {\n const bytes = p256.getPublicKey(this.key.toUint8Array(), false);\n return new Secp256r1PublicKey(bytes);\n }\n}\n\nexport class WebAuthnSignature extends Signature {\n signature: Hex;\n\n authenticatorData: Hex;\n\n clientDataJSON: Hex;\n\n constructor(signature: HexInput, authenticatorData: HexInput, clientDataJSON: HexInput) {\n super();\n this.signature = Hex.fromHexInput(signature);\n this.authenticatorData = Hex.fromHexInput(authenticatorData);\n this.clientDataJSON = Hex.fromHexInput(clientDataJSON);\n }\n\n toUint8Array() {\n return this.signature.toUint8Array();\n }\n\n serialize(serializer: Serializer) {\n serializer.serializeU32AsUleb128(0);\n serializer.serializeBytes(this.signature.toUint8Array());\n serializer.serializeBytes(this.authenticatorData.toUint8Array());\n serializer.serializeBytes(this.clientDataJSON.toUint8Array());\n }\n\n bcsToBytes() {\n const serializer = new Serializer();\n this.serialize(serializer);\n return serializer.toUint8Array();\n }\n\n bcsToHex() {\n return Hex.fromHexInput(this.bcsToBytes());\n }\n\n toStringWithoutPrefix() {\n return Hex.fromHexInput(this.bcsToBytes()).toString();\n }\n\n static deserialize(deserializer: Deserializer) {\n const id = deserializer.deserializeUleb128AsU32();\n if (id !== 0) {\n throw new Error(`Invalid id for WebAuthnSignature: ${id}`);\n }\n const signature = deserializer.deserializeBytes();\n const authenticatorData = deserializer.deserializeBytes();\n const clientDataJSON = deserializer.deserializeBytes();\n return new WebAuthnSignature(signature, authenticatorData, clientDataJSON);\n }\n}\n\n/**\n * Represents a signature of a message signed using a Secp256r1 ECDSA private key.\n *\n * @group Implementation\n * @category Serialization\n */\nexport class Secp256r1Signature extends Signature {\n /**\n * Secp256r1 ecdsa signatures are 256-bit.\n * @group Implementation\n * @category Serialization\n */\n static readonly LENGTH = 64;\n\n /**\n * The signature bytes\n * @private\n * @group Implementation\n * @category Serialization\n */\n private readonly data: Hex;\n\n /**\n * Create a new Signature instance from a Uint8Array or String.\n *\n * @param hexInput A HexInput (string or Uint8Array)\n * @group Implementation\n * @category Serialization\n */\n constructor(hexInput: HexInput) {\n super();\n\n const hex = Hex.fromHexInput(hexInput);\n const signatureLength = hex.toUint8Array().length;\n if (signatureLength !== Secp256r1Signature.LENGTH) {\n throw new Error(`Signature length should be ${Secp256r1Signature.LENGTH}, received ${signatureLength}`);\n }\n const signature = p256.Signature.fromCompact(hex.toUint8Array()).normalizeS().toCompactRawBytes();\n this.data = Hex.fromHexInput(signature);\n }\n\n /**\n * Get the signature in bytes (Uint8Array).\n *\n * @returns Uint8Array representation of the signature\n * @group Implementation\n * @category Serialization\n */\n toUint8Array(): Uint8Array {\n return this.data.toUint8Array();\n }\n\n /**\n * Get the signature as a hex string with the 0x prefix.\n *\n * @returns string representation of the signature\n * @group Implementation\n * @category Serialization\n */\n toString(): string {\n return this.data.toString();\n }\n\n /**\n * Serializes the data into a byte array using the provided serializer.\n * This function is essential for converting data into a format suitable for transmission or storage.\n *\n * @param serializer - The serializer instance used to convert the data.\n * @group Implementation\n * @category Serialization\n */\n serialize(serializer: Serializer): void {\n serializer.serializeBytes(this.data.toUint8Array());\n }\n\n /**\n * Deserializes a Secp256r1Signature from the provided deserializer.\n * This function allows you to reconstruct a Secp256r1Signature object from its serialized byte representation.\n *\n * @param deserializer - The deserializer instance used to read the serialized data.\n * @group Implementation\n * @category Serialization\n */\n static deserialize(deserializer: Deserializer): Secp256r1Signature {\n const hex = deserializer.deserializeBytes();\n return new Secp256r1Signature(hex);\n }\n}\n"],"mappings":"iPAGA,OAAS,YAAAA,MAAgB,qBACzB,OAAS,QAAAC,MAAY,qBAsBd,IAAMC,EAAN,MAAMA,UAA2BC,CAAU,CAsBhD,YAAYC,EAAoB,CAC9B,MAAM,EAZR,KAAgB,QAAkB,YAchC,IAAMC,EAAMC,EAAI,aAAaF,CAAQ,EAC/BG,EAAYF,EAAI,aAAa,EAAE,OACrC,GAAIE,IAAcL,EAAmB,QAAUK,IAAcL,E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,EAAkBhC,EAAI,aAAa,EAAE,OAC3C,GAAIgC,IAAoBD,EAAmB,OACzC,MAAM,IAAI,MAAM,8BAA8BA,EAAmB,MAAM,cAAcC,CAAe,EAAE,EAExG,IAAMvB,EAAYL,EAAK,UAAU,YAAYJ,EAAI,aAAa,CAAC,EAAE,WAAW,EAAE,kBAAkB,EAChG,KAAK,KAAOC,EAAI,aAAaQ,CAAS,CACxC,CASA,cAA2B,CACzB,OAAO,KAAK,KAAK,aAAa,CAChC,CASA,UAAmB,CACjB,OAAO,KAAK,KAAK,SAAS,CAC5B,CAUA,UAAUJ,EAA8B,CACtCA,EAAW,eAAe,KAAK,KAAK,aAAa,CAAC,CACpD,CAUA,OAAO,YAAYS,EAAgD,CACjE,IAAMd,EAAMc,EAAa,iBAAiB,EAC1C,OAAO,IAAIiB,EAAmB/B,CAAG,CACnC,CACF,EAjFa+B,EAMK,OAAS,GANpB,IAAMR,EAANQ","names":["sha3_256","p256","_Secp256r1PublicKey","PublicKey","hexInput","hex","Hex","keyLength","point","p256","serializer","Serializer","args","message","signature","msgHex","sha3Message","sha3_256","rawSignature","deserializer","bytes","publicKey","AuthenticationKey","Secp256r1PublicKey","_Secp256r1PrivateKey","PrivateKey","strict","privateKeyHex","Secp256r1Signature","Secp256r1PrivateKey","WebAuthnSignature","_WebAuthnSignature","Signature","authenticatorData","clientDataJSON","id","_Secp256r1Signature","signatureLength"]}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=chunk-UYVPNUH3.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=chunk-V3MBJJTL.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +0,0 @@
1
- import{a as i}from"./chunk-F4RJMSAW.mjs";import{a as r}from"./chunk-RUKFK3OC.mjs";var t=class l extends r{constructor(e){super(),this.value=new i(e)}serialize(e){e.serialize(this.value)}serializeForEntryFunction(e){e.serializeU32AsUleb128(this.value.value.length),e.serialize(this)}static deserialize(e,s){let a=i.deserialize(e,s);return new l(a.value)}};export{t as a};
2
- //# sourceMappingURL=chunk-WOPHK7LB.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/bcs/serializable/entryFunctionBytes.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Serializer, Serializable } from \"../serializer\";\nimport { Deserializer } from \"../deserializer\";\nimport { FixedBytes } from \"./fixedBytes\";\nimport { EntryFunctionArgument } from \"../../transactions/instances/transactionArgument\";\nimport { HexInput } from \"../../types\";\n\n/**\n * This class exists solely to represent a sequence of fixed bytes as a serialized entry function, because\n * serializing an entry function appends a prefix that's *only* used for entry function arguments.\n *\n * NOTE: Using this class for serialized script functions will lead to erroneous and unexpected behavior.\n *\n * If you wish to convert this class back to a TransactionArgument, you must know the type\n * of the argument beforehand, and use the appropriate class to deserialize the bytes within\n * an instance of this class.\n * @group Implementation\n * @category BCS\n */\nexport class EntryFunctionBytes extends Serializable implements EntryFunctionArgument {\n public readonly value: FixedBytes;\n\n /**\n * Creates an instance of the class with a specified hexadecimal input value.\n *\n * @param value - The hexadecimal input to be converted into FixedBytes.\n * @group Implementation\n * @category BCS\n */\n private constructor(value: HexInput) {\n super();\n this.value = new FixedBytes(value);\n }\n\n // Note that to see the Move, BCS-serialized representation of the underlying fixed byte vector,\n // we must not serialize the length prefix.\n //\n // In other words, this class is only used to represent a sequence of bytes that are already\n // BCS-serialized as a type. To represent those bytes accurately, the BCS-serialized form is the same exact\n // representation.\n\n /**\n * Serializes the value using the provided serializer.\n * This function is essential for accurately representing a sequence of bytes that are already BCS-serialized as a type.\n *\n * Note that to see the Move, BCS-serialized representation of the underlying fixed byte vector,\n * we must not serialize the length prefix.\n *\n * @param serializer - The serializer instance used to perform the serialization.\n * @group Implementation\n * @category BCS\n */\n serialize(serializer: Serializer): void {\n serializer.serialize(this.value);\n }\n\n // When we serialize these bytes as an entry function argument, we need to\n // serialize the length prefix. This essentially converts the underlying fixed byte vector to a type-agnostic\n // byte vector to an `any` type.\n // NOTE: This, and the lack of a `serializeForScriptFunction`, is the only meaningful difference between this\n // class and FixedBytes.\n\n /**\n * Serializes the current instance for use as an entry function argument by converting the underlying fixed byte vector to a\n * type-agnostic byte vector.\n * This process includes serializing the length prefix of the byte vector.\n *\n * @param serializer - The serializer instance used to perform the serialization.\n * @group Implementation\n * @category BCS\n */\n serializeForEntryFunction(serializer: Serializer): void {\n serializer.serializeU32AsUleb128(this.value.value.length);\n serializer.serialize(this);\n }\n\n /**\n * The only way to create an instance of this class is to use this static method.\n * This function should only be used when deserializing a sequence of EntryFunctionPayload arguments.\n * @param deserializer - The deserializer instance with the buffered bytes.\n * @param length - The length of the bytes to deserialize.\n * @returns An instance of this class, which will now only be usable as an EntryFunctionArgument.\n * @group Implementation\n * @category BCS\n */\n static deserialize(deserializer: Deserializer, length: number): EntryFunctionBytes {\n const fixedBytes = FixedBytes.deserialize(deserializer, length);\n return new EntryFunctionBytes(fixedBytes.value);\n }\n}\n"],"mappings":"kFAqBO,IAAMA,EAAN,MAAMC,UAA2BC,CAA8C,CAU5E,YAAYC,EAAiB,CACnC,MAAM,EACN,KAAK,MAAQ,IAAIC,EAAWD,CAAK,CACnC,CAoBA,UAAUE,EAA8B,CACtCA,EAAW,UAAU,KAAK,KAAK,CACjC,CAiBA,0BAA0BA,EAA8B,CACtDA,EAAW,sBAAsB,KAAK,MAAM,MAAM,MAAM,EACxDA,EAAW,UAAU,IAAI,CAC3B,CAWA,OAAO,YAAYC,EAA4BC,EAAoC,CACjF,IAAMC,EAAaJ,EAAW,YAAYE,EAAcC,CAAM,EAC9D,OAAO,IAAIN,EAAmBO,EAAW,KAAK,CAChD,CACF","names":["EntryFunctionBytes","_EntryFunctionBytes","Serializable","value","FixedBytes","serializer","deserializer","length","fixedBytes"]}
@@ -1,2 +0,0 @@
1
- import{e as x,f as B}from"./chunk-MKTR4U2R.mjs";import{a as k}from"./chunk-ODNZJSOC.mjs";import{b as f,d as A}from"./chunk-TBIK7DML.mjs";import{e as b}from"./chunk-IEW452EO.mjs";import{c as d}from"./chunk-GJYLYE6R.mjs";import{e as C}from"./chunk-TAHLOBRG.mjs";async function H(o){let{aptosConfig:n,options:t}=o;return A({aptosConfig:n,originMethod:"getTransactions",path:"transactions",params:{start:t?.offset,limit:t?.limit}})}async function W(o){let{aptosConfig:n}=o;return k(async()=>{let{data:t}=await f({aptosConfig:n,originMethod:"getGasPriceEstimation",path:"estimate_gas_price"});return t},`gas-price-${n.network}`,1e3*60*5)()}async function O(o){let{aptosConfig:n,ledgerVersion:t}=o,{data:s}=await f({aptosConfig:n,originMethod:"getTransactionByVersion",path:`transactions/by_version/${t}`});return s}async function y(o){let{aptosConfig:n,transactionHash:t}=o,{data:s}=await f({aptosConfig:n,path:`transactions/by_hash/${t}`,originMethod:"getTransactionByHash"});return s}async function q(o){let{aptosConfig:n,transactionHash:t}=o;try{return(await y({aptosConfig:n,transactionHash:t})).type==="pending_transaction"}catch(s){if(s?.status===404)return!0;throw s}}async function R(o){let{aptosConfig:n,transactionHash:t}=o,{data:s}=await f({aptosConfig:n,path:`transactions/wait_by_hash/${t}`,originMethod:"longWaitForTransaction"});return s}async function z(o){let{aptosConfig:n,transactionHash:t,options:s}=o,r=s?.timeoutSecs??20,u=s?.checkSuccess??!0,e=!0,p=0,i,g,l=200,h=1.5;function c(a){if(!(a instanceof b)||(g=a,a.status!==404&&a.status>=400&&a.status<500))throw a}try{i=await y({aptosConfig:n,transactionHash:t}),e=i.type==="pending_transaction"}catch(a){c(a)}if(e){let a=Date.now();try{i=await R({aptosConfig:n,transactionHash:t}),e=i.type==="pending_transaction"}catch(w){c(w)}p=(Date.now()-a)/1e3}for(;e&&!(p>=r);){try{if(i=await y({aptosConfig:n,transactionHash:t}),e=i.type==="pending_transaction",!e)break}catch(a){c(a)}await d(l),p+=l/1e3,l*=h}if(i===void 0)throw g||new m(`Fetching transaction ${t} failed and timed out after ${r} seconds`,i);if(i.type==="pending_transaction")throw new m(`Transaction ${t} timed out in pending state after ${r} seconds`,i);if(!u)return i;if(!i.success)throw new T(`Transaction ${t} failed with an error: ${i.vm_status}`,i);return i}async function U(o){let{aptosConfig:n,processorType:t}=o,s=BigInt(o.minimumLedgerVersion),r=3e3,u=Date.now(),e=BigInt(-1);for(;e<s;){if(Date.now()-u>r)throw new Error("waitForLastSuccessIndexerVersionSync timeout");if(t===void 0?e=await x({aptosConfig:n}):e=(await B({aptosConfig:n,processorType:t})).last_success_version,e>=s)break;await d(200)}}var m=class extends Error{constructor(n,t){super(n),this.lastSubmittedTransaction=t}},T=class extends Error{constructor(n,t){super(n),this.transaction=t}};async function X(o){let{aptosConfig:n,ledgerVersion:t,options:s}=o,{data:r}=await f({aptosConfig:n,originMethod:"getBlockByVersion",path:`blocks/by_version/${t}`,params:{with_transactions:s?.withTransactions}});return P({block:r,...o})}async function j(o){let{aptosConfig:n,blockHeight:t,options:s}=o,{data:r}=await f({aptosConfig:n,originMethod:"getBlockByHeight",path:`blocks/by_height/${t}`,params:{with_transactions:s?.withTransactions}});return P({block:r,...o})}async function P(o){let{aptosConfig:n,block:t,options:s}=o;if(s?.withTransactions){t.transactions=t.transactions??[];let r=t.transactions[t.transactions.length-1],u=BigInt(t.first_version),e=BigInt(t.last_version),p=r?.version,i;if(p===void 0?i=u-1n:i=BigInt(p),i===e)return t;let g=[],l=100n;for(let c=i+1n;c<e;c+=BigInt(100))g.push(H({aptosConfig:n,options:{offset:c,limit:Math.min(Number(l),Number(e-c+1n))}}));let h=await Promise.all(g);for(let c of h)t.transactions.push(...c)}return t}export{H as a,W as b,O as c,y as d,q as e,R as f,z as g,U as h,m as i,T as j,X as k,j as l};
2
- //# sourceMappingURL=chunk-WZZ7PJ3X.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/internal/transaction.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * This file contains the underlying implementations for exposed API surface in\n * the {@link api/transaction}. By moving the methods out into a separate file,\n * other namespaces and processes can access these methods without depending on the entire\n * transaction namespace and without having a dependency cycle error.\n * @group Implementation\n */\n\nimport { AptosConfig } from \"../api/aptosConfig\";\nimport { getAptosFullNode, paginateWithCursor } from \"../client\";\nimport { AptosApiError } from \"../errors\";\nimport {\n TransactionResponseType,\n type AnyNumber,\n type GasEstimation,\n type HexInput,\n type PaginationArgs,\n type TransactionResponse,\n WaitForTransactionOptions,\n CommittedTransactionResponse,\n Block,\n} from \"../types\";\nimport { DEFAULT_TXN_TIMEOUT_SEC, ProcessorType } from \"../utils/const\";\nimport { sleep } from \"../utils/helpers\";\nimport { memoizeAsync } from \"../utils/memoize\";\nimport { getIndexerLastSuccessVersion, getProcessorStatus } from \"./general\";\n\n/**\n * Retrieve a list of transactions based on the specified options.\n *\n * @param {Object} args - The parameters for retrieving transactions.\n * @param {Object} args.aptosConfig - The configuration object for Aptos.\n * @param {Object} args.options - The options for pagination.\n * @param {number} args.options.offset - The number of transactions to skip before starting to collect the result set.\n * @param {number} args.options.limit - The maximum number of transactions to return.\n * @group Implementation\n */\nexport async function getTransactions(args: {\n aptosConfig: AptosConfig;\n options?: PaginationArgs;\n}): Promise<TransactionResponse[]> {\n const { aptosConfig, options } = args;\n return paginateWithCursor<{}, TransactionResponse[]>({\n aptosConfig,\n originMethod: \"getTransactions\",\n path: \"transactions\",\n params: { start: options?.offset, limit: options?.limit },\n });\n}\n\n/**\n * Retrieves the estimated gas price for transactions on the Aptos network.\n * This function helps users understand the current gas price, which is essential for transaction planning and cost estimation.\n *\n * @param args - The configuration parameters for the Aptos network.\n * @param args.aptosConfig - The configuration object containing network details.\n * @group Implementation\n */\nexport async function getGasPriceEstimation(args: { aptosConfig: AptosConfig }) {\n const { aptosConfig } = args;\n\n return memoizeAsync(\n async () => {\n const { data } = await getAptosFullNode<{}, GasEstimation>({\n aptosConfig,\n originMethod: \"getGasPriceEstimation\",\n path: \"estimate_gas_price\",\n });\n return data;\n },\n `gas-price-${aptosConfig.network}`,\n 1000 * 60 * 5, // 5 minutes\n )();\n}\n\n/**\n * Retrieves the transaction details associated with a specific ledger version.\n *\n * @param args - The arguments for the transaction retrieval.\n * @param args.aptosConfig - The configuration settings for the Aptos client.\n * @param args.ledgerVersion - The ledger version for which to retrieve the transaction.\n * @returns The transaction details for the specified ledger version.\n * @group Implementation\n */\nexport async function getTransactionByVersion(args: {\n aptosConfig: AptosConfig;\n ledgerVersion: AnyNumber;\n}): Promise<TransactionResponse> {\n const { aptosConfig, ledgerVersion } = args;\n const { data } = await getAptosFullNode<{}, TransactionResponse>({\n aptosConfig,\n originMethod: \"getTransactionByVersion\",\n path: `transactions/by_version/${ledgerVersion}`,\n });\n return data;\n}\n\n/**\n * Retrieves transaction details using the specified transaction hash.\n *\n * @param args - The arguments for retrieving the transaction.\n * @param args.aptosConfig - The configuration settings for the Aptos client.\n * @param args.transactionHash - The hash of the transaction to retrieve.\n * @returns A promise that resolves to the transaction details.\n * @group Implementation\n */\nexport async function getTransactionByHash(args: {\n aptosConfig: AptosConfig;\n transactionHash: HexInput;\n}): Promise<TransactionResponse> {\n const { aptosConfig, transactionHash } = args;\n const { data } = await getAptosFullNode<{}, TransactionResponse>({\n aptosConfig,\n path: `transactions/by_hash/${transactionHash}`,\n originMethod: \"getTransactionByHash\",\n });\n return data;\n}\n\n/**\n * Checks if a transaction is currently pending based on its hash.\n * This function helps determine the status of a transaction in the Aptos network.\n *\n * @param args - The arguments for checking the transaction status.\n * @param args.aptosConfig - The configuration settings for connecting to the Aptos network.\n * @param args.transactionHash - The hash of the transaction to check.\n * @returns A boolean indicating whether the transaction is pending.\n * @throws An error if the transaction cannot be retrieved due to reasons other than a 404 status.\n * @group Implementation\n */\nexport async function isTransactionPending(args: {\n aptosConfig: AptosConfig;\n transactionHash: HexInput;\n}): Promise<boolean> {\n const { aptosConfig, transactionHash } = args;\n try {\n const transaction = await getTransactionByHash({ aptosConfig, transactionHash });\n return transaction.type === TransactionResponseType.Pending;\n } catch (e: any) {\n if (e?.status === 404) {\n return true;\n }\n throw e;\n }\n}\n\n/**\n * Waits for a transaction to be confirmed by its hash.\n * This function allows you to monitor the status of a transaction until it is finalized.\n *\n * @param args - The arguments for the function.\n * @param args.aptosConfig - The configuration settings for the Aptos client.\n * @param args.transactionHash - The hash of the transaction to wait for.\n * @group Implementation\n */\nexport async function longWaitForTransaction(args: {\n aptosConfig: AptosConfig;\n transactionHash: HexInput;\n}): Promise<TransactionResponse> {\n const { aptosConfig, transactionHash } = args;\n const { data } = await getAptosFullNode<{}, TransactionResponse>({\n aptosConfig,\n path: `transactions/wait_by_hash/${transactionHash}`,\n originMethod: \"longWaitForTransaction\",\n });\n return data;\n}\n\n/**\n * Waits for a transaction to be confirmed on the blockchain and handles potential errors during the process.\n * This function allows you to monitor the status of a transaction until it is either confirmed or fails.\n *\n * @param args - The arguments for waiting for a transaction.\n * @param args.aptosConfig - The configuration settings for Aptos.\n * @param args.transactionHash - The hash of the transaction to wait for.\n * @param args.options - Optional settings for waiting, including timeout and success check.\n * @param args.options.timeoutSecs - The maximum time to wait for the transaction in seconds. Defaults to a predefined value.\n * @param args.options.checkSuccess - A flag indicating whether to check the success status of the transaction. Defaults to true.\n * @returns A promise that resolves to the transaction response once the transaction is confirmed.\n * @throws WaitForTransactionError if the transaction times out or remains pending.\n * @throws FailedTransactionError if the transaction fails.\n * @group Implementation\n */\nexport async function waitForTransaction(args: {\n aptosConfig: AptosConfig;\n transactionHash: HexInput;\n options?: WaitForTransactionOptions;\n}): Promise<CommittedTransactionResponse> {\n const { aptosConfig, transactionHash, options } = args;\n const timeoutSecs = options?.timeoutSecs ?? DEFAULT_TXN_TIMEOUT_SEC;\n const checkSuccess = options?.checkSuccess ?? true;\n\n let isPending = true;\n let timeElapsed = 0;\n let lastTxn: TransactionResponse | undefined;\n let lastError: AptosApiError | undefined;\n let backoffIntervalMs = 200;\n const backoffMultiplier = 1.5;\n\n /**\n * Handles API errors by throwing the last error or a timeout error for a failed transaction.\n *\n * @param e - The error object that occurred during the API call.\n * @throws {Error} Throws the last error if it exists; otherwise, throws a WaitForTransactionError indicating a timeout.\n * @group Implementation\n */\n function handleAPIError(e: any) {\n // In short, this means we will retry if it was an AptosApiError and the code was 404 or 5xx.\n const isAptosApiError = e instanceof AptosApiError;\n if (!isAptosApiError) {\n throw e; // This would be unexpected\n }\n lastError = e;\n const isRequestError = e.status !== 404 && e.status >= 400 && e.status < 500;\n if (isRequestError) {\n throw e;\n }\n }\n\n // check to see if the txn is already on the blockchain\n try {\n lastTxn = await getTransactionByHash({ aptosConfig, transactionHash });\n isPending = lastTxn.type === TransactionResponseType.Pending;\n } catch (e) {\n handleAPIError(e);\n }\n\n // If the transaction is pending, we do a long wait once to avoid polling\n if (isPending) {\n const startTime = Date.now();\n try {\n lastTxn = await longWaitForTransaction({ aptosConfig, transactionHash });\n isPending = lastTxn.type === TransactionResponseType.Pending;\n } catch (e) {\n handleAPIError(e);\n }\n timeElapsed = (Date.now() - startTime) / 1000;\n }\n\n // Now we do polling to see if the transaction is still pending\n while (isPending) {\n if (timeElapsed >= timeoutSecs) {\n break;\n }\n try {\n lastTxn = await getTransactionByHash({ aptosConfig, transactionHash });\n\n isPending = lastTxn.type === TransactionResponseType.Pending;\n\n if (!isPending) {\n break;\n }\n } catch (e) {\n handleAPIError(e);\n }\n\n await sleep(backoffIntervalMs);\n timeElapsed += backoffIntervalMs / 1000; // Convert to seconds\n backoffIntervalMs *= backoffMultiplier;\n }\n\n // There is a chance that lastTxn is still undefined. Let's throw the last error otherwise a WaitForTransactionError\n if (lastTxn === undefined) {\n if (lastError) {\n throw lastError;\n } else {\n throw new WaitForTransactionError(\n `Fetching transaction ${transactionHash} failed and timed out after ${timeoutSecs} seconds`,\n lastTxn,\n );\n }\n }\n\n if (lastTxn.type === TransactionResponseType.Pending) {\n throw new WaitForTransactionError(\n `Transaction ${transactionHash} timed out in pending state after ${timeoutSecs} seconds`,\n lastTxn,\n );\n }\n if (!checkSuccess) {\n return lastTxn;\n }\n if (!lastTxn.success) {\n throw new FailedTransactionError(\n `Transaction ${transactionHash} failed with an error: ${lastTxn.vm_status}`,\n lastTxn,\n );\n }\n\n return lastTxn;\n}\n\n/**\n * Waits for the indexer to sync up to the specified ledger version. The timeout is 3 seconds.\n *\n * @param args - The arguments for the function.\n * @param args.aptosConfig - The configuration object for Aptos.\n * @param args.minimumLedgerVersion - The minimum ledger version that the indexer should sync to.\n * @param args.processorType - (Optional) The type of processor to check the last success version from.\n * @group Implementation\n */\nexport async function waitForIndexer(args: {\n aptosConfig: AptosConfig;\n minimumLedgerVersion: AnyNumber;\n processorType?: ProcessorType;\n}): Promise<void> {\n const { aptosConfig, processorType } = args;\n const minimumLedgerVersion = BigInt(args.minimumLedgerVersion);\n const timeoutMilliseconds = 3000; // 3 seconds\n const startTime = Date.now();\n let indexerVersion = BigInt(-1);\n\n while (indexerVersion < minimumLedgerVersion) {\n // check for timeout\n if (Date.now() - startTime > timeoutMilliseconds) {\n throw new Error(\"waitForLastSuccessIndexerVersionSync timeout\");\n }\n\n if (processorType === undefined) {\n // Get the last success version from all processor\n\n indexerVersion = await getIndexerLastSuccessVersion({ aptosConfig });\n } else {\n // Get the last success version from the specific processor\n\n const processor = await getProcessorStatus({ aptosConfig, processorType });\n indexerVersion = processor.last_success_version;\n }\n\n if (indexerVersion >= minimumLedgerVersion) {\n // break out immediately if we are synced\n break;\n }\n\n await sleep(200);\n }\n}\n\n/**\n * Represents an error that occurs when waiting for a transaction to complete.\n * This error is thrown by the `waitForTransaction` function when a transaction\n * times out or when the transaction response is undefined.\n *\n * @param message - A descriptive message for the error.\n * @param lastSubmittedTransaction - The last submitted transaction response, if available.\n * @group Implementation\n */\nexport class WaitForTransactionError extends Error {\n public readonly lastSubmittedTransaction: TransactionResponse | undefined;\n\n /**\n * Constructs an instance of the class with a specified message and transaction response.\n *\n * @param message - The message associated with the transaction.\n * @param lastSubmittedTransaction - The transaction response object containing details about the transaction.\n * @group Implementation\n */\n constructor(message: string, lastSubmittedTransaction: TransactionResponse | undefined) {\n super(message);\n this.lastSubmittedTransaction = lastSubmittedTransaction;\n }\n}\n\n/**\n * Represents an error that occurs when a transaction fails.\n * This error is thrown by the `waitForTransaction` function when the `checkSuccess` parameter is set to true.\n *\n * @param message - A description of the error.\n * @param transaction - The transaction response associated with the failure.\n * @group Implementation\n */\nexport class FailedTransactionError extends Error {\n public readonly transaction: TransactionResponse;\n\n constructor(message: string, transaction: TransactionResponse) {\n super(message);\n this.transaction = transaction;\n }\n}\n\n/**\n * Retrieves a block from the Aptos blockchain by its ledger version.\n * This function allows you to obtain detailed information about a specific block, including its transactions if requested.\n *\n * @param args - The arguments for retrieving the block.\n * @param args.aptosConfig - The configuration object for connecting to the Aptos node.\n * @param args.ledgerVersion - The ledger version of the block to retrieve.\n * @param args.options - Optional parameters for the request.\n * @param args.options.withTransactions - Indicates whether to include transactions in the block data.\n * @group Implementation\n */\nexport async function getBlockByVersion(args: {\n aptosConfig: AptosConfig;\n ledgerVersion: AnyNumber;\n options?: { withTransactions?: boolean };\n}): Promise<Block> {\n const { aptosConfig, ledgerVersion, options } = args;\n const { data: block } = await getAptosFullNode<{}, Block>({\n aptosConfig,\n originMethod: \"getBlockByVersion\",\n path: `blocks/by_version/${ledgerVersion}`,\n params: { with_transactions: options?.withTransactions },\n });\n\n return fillBlockTransactions({ block, ...args });\n}\n\n/**\n * Retrieves a block from the Aptos blockchain by its height.\n *\n * @param args - The parameters for retrieving the block.\n * @param args.aptosConfig - The configuration object for connecting to the Aptos network.\n * @param args.blockHeight - The height of the block to retrieve.\n * @param args.options - Optional parameters for the request.\n * @param args.options.withTransactions - Indicates whether to include transactions in the block data.\n * @returns A promise that resolves to the block data, potentially including its transactions.\n * @group Implementation\n */\nexport async function getBlockByHeight(args: {\n aptosConfig: AptosConfig;\n blockHeight: AnyNumber;\n options?: { withTransactions?: boolean };\n}): Promise<Block> {\n const { aptosConfig, blockHeight, options } = args;\n const { data: block } = await getAptosFullNode<{}, Block>({\n aptosConfig,\n originMethod: \"getBlockByHeight\",\n path: `blocks/by_height/${blockHeight}`,\n params: { with_transactions: options?.withTransactions },\n });\n return fillBlockTransactions({ block, ...args });\n}\n\n/**\n * Fills in the block with transactions if not enough were returned. This function ensures that the block contains all relevant\n * transactions by fetching any missing ones based on the specified options.\n * @param args - The arguments for filling the block transactions.\n * @param args.aptosConfig - The configuration settings for Aptos.\n * @param args.block - The block object that will be filled with transactions.\n * @param args.options - Optional settings for fetching transactions.\n * @param args.options.withTransactions - Indicates whether to include transactions in the block.\n * @group Implementation\n */\nasync function fillBlockTransactions(args: {\n aptosConfig: AptosConfig;\n block: Block;\n options?: { withTransactions?: boolean };\n}) {\n const { aptosConfig, block, options } = args;\n if (options?.withTransactions) {\n // Transactions should be filled, but this ensures it\n block.transactions = block.transactions ?? [];\n\n const lastTxn = block.transactions[block.transactions.length - 1];\n const firstVersion = BigInt(block.first_version);\n const lastVersion = BigInt(block.last_version);\n\n // Convert the transaction to the type\n const curVersion: string | undefined = (lastTxn as any)?.version;\n let latestVersion;\n\n // This time, if we don't have any transactions, we will try once with the start of the block\n if (curVersion === undefined) {\n latestVersion = firstVersion - 1n;\n } else {\n latestVersion = BigInt(curVersion);\n }\n\n // If we have all the transactions in the block, we can skip out, otherwise we need to fill the transactions\n if (latestVersion === lastVersion) {\n return block;\n }\n\n // For now, we will grab all the transactions in groups of 100, but we can make this more efficient by trying larger\n // amounts\n const fetchFutures = [];\n const pageSize = 100n;\n for (let i = latestVersion + 1n; i < lastVersion; i += BigInt(100)) {\n fetchFutures.push(\n getTransactions({\n aptosConfig,\n options: {\n offset: i,\n limit: Math.min(Number(pageSize), Number(lastVersion - i + 1n)),\n },\n }),\n );\n }\n\n // Combine all the futures\n const responses = await Promise.all(fetchFutures);\n for (const txns of responses) {\n block.transactions.push(...txns);\n }\n }\n\n return block;\n}\n"],"mappings":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AM,aAAa,KAAK,GAAGY,CAAI,CAEnC,CAEA,OAAOZ,CACT","names":["getTransactions","args","aptosConfig","options","paginateWithCursor","getGasPriceEstimation","memoizeAsync","data","getAptosFullNode","getTransactionByVersion","ledgerVersion","getTransactionByHash","transactionHash","isTransactionPending","e","longWaitForTransaction","waitForTransaction","timeoutSecs","checkSuccess","isPending","timeElapsed","lastTxn","lastError","backoffIntervalMs","backoffMultiplier","handleAPIError","AptosApiError","startTime","sleep","WaitForTransactionError","FailedTransactionError","waitForIndexer","processorType","minimumLedgerVersion","timeoutMilliseconds","indexerVersion","getIndexerLastSuccessVersion","getProcessorStatus","message","lastSubmittedTransaction","transaction","getBlockByVersion","block","fillBlockTransactions","getBlockByHeight","blockHeight","firstVersion","lastVersion","curVersion","latestVersion","fetchFutures","pageSize","i","responses","txns"]}
@@ -1,2 +0,0 @@
1
- var t=255,n=65535,I=4294967295,_=18446744073709551615n,o=340282366920938463463374607431768211455n,M=115792089237316195423570985008687907853269984665640564039457584007913129639935n,U=-128,N=127,r=-32768,p=32767,c=-2147483648,e=2147483647,s=-9223372036854775808n,x=9223372036854775807n,B=-170141183460469231731687303715884105728n,i=170141183460469231731687303715884105727n,A=-57896044618658097711785492504343953926634992332820282019728792003956564819968n,X=57896044618658097711785492504343953926634992332820282019728792003956564819967n;export{t as a,n as b,I as c,_ as d,o as e,M as f,U as g,N as h,r as i,p as j,c as k,e as l,s as m,x as n,B as o,i as p,A as q,X as r};
2
- //# sourceMappingURL=chunk-X2TPNKLV.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/bcs/consts.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Uint8, Uint16, Uint32, Uint64, Uint128, Uint256, Int8, Int16, Int32, Int64, Int128, Int256 } from \"../types\";\n\n// Upper bound values for uint8, uint16, uint64 etc. These are all derived as\n// 2^N - 1, where N is the number of bits in the type.\nexport const MAX_U8_NUMBER: Uint8 = 255;\nexport const MAX_U16_NUMBER: Uint16 = 65535;\nexport const MAX_U32_NUMBER: Uint32 = 4294967295;\nexport const MAX_U64_BIG_INT: Uint64 = 18446744073709551615n;\nexport const MAX_U128_BIG_INT: Uint128 = 340282366920938463463374607431768211455n;\nexport const MAX_U256_BIG_INT: Uint256 =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935n;\n\n// Signed integer bounds\nexport const MIN_I8_NUMBER: Int8 = -128;\nexport const MAX_I8_NUMBER: Int8 = 127;\nexport const MIN_I16_NUMBER: Int16 = -32768;\nexport const MAX_I16_NUMBER: Int16 = 32767;\nexport const MIN_I32_NUMBER: Int32 = -2147483648;\nexport const MAX_I32_NUMBER: Int32 = 2147483647;\nexport const MIN_I64_BIG_INT: Int64 = -9223372036854775808n;\nexport const MAX_I64_BIG_INT: Int64 = 9223372036854775807n;\nexport const MIN_I128_BIG_INT: Int128 = -170141183460469231731687303715884105728n;\nexport const MAX_I128_BIG_INT: Int128 = 170141183460469231731687303715884105727n;\nexport const MIN_I256_BIG_INT: Int256 = -57896044618658097711785492504343953926634992332820282019728792003956564819968n;\nexport const MAX_I256_BIG_INT: Int256 = 57896044618658097711785492504343953926634992332820282019728792003956564819967n;\n"],"mappings":"AAOO,IAAMA,EAAuB,IACvBC,EAAyB,MACzBC,EAAyB,WACzBC,EAA0B,sBAC1BC,EAA4B,yCAC5BC,EACX,gFAGWC,EAAsB,KACtBC,EAAsB,IACtBC,EAAwB,OACxBC,EAAwB,MACxBC,EAAwB,YACxBC,EAAwB,WACxBC,EAAyB,CAAC,qBAC1BC,EAAyB,qBACzBC,EAA2B,CAAC,yCAC5BC,EAA2B,yCAC3BC,EAA2B,CAAC,+EAC5BC,EAA2B","names":["MAX_U8_NUMBER","MAX_U16_NUMBER","MAX_U32_NUMBER","MAX_U64_BIG_INT","MAX_U128_BIG_INT","MAX_U256_BIG_INT","MIN_I8_NUMBER","MAX_I8_NUMBER","MIN_I16_NUMBER","MAX_I16_NUMBER","MIN_I32_NUMBER","MAX_I32_NUMBER","MIN_I64_BIG_INT","MAX_I64_BIG_INT","MIN_I128_BIG_INT","MAX_I128_BIG_INT","MIN_I256_BIG_INT","MAX_I256_BIG_INT"]}
@@ -1,2 +0,0 @@
1
- import{a as s}from"./chunk-NHRPXEUE.mjs";import{b as o}from"./chunk-A5H5VKUI.mjs";import{a as t}from"./chunk-RZNP3WG4.mjs";import{b as i}from"./chunk-STY74NUA.mjs";var n=class e extends s{constructor(r){super(),this.value=i.fromHexInput(r).toUint8Array()}serialize(r){r.serializeBytes(this.value)}static deserialize(r){return new e(r.deserializeBytes())}},a=class extends o{constructor(r){super(),this.accountAddress=r}authKey(){return new t({data:this.accountAddress.toUint8Array()})}verifySignature(r){throw new Error("This function is not implemented for AbstractPublicKey.")}async verifySignatureAsync(r){throw new Error("This function is not implemented for AbstractPublicKey.")}serialize(r){throw new Error("This function is not implemented for AbstractPublicKey.")}};export{n as a,a as b};
2
- //# sourceMappingURL=chunk-ZOSOF6ST.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/core/crypto/abstraction.ts"],"sourcesContent":["import { Deserializer, Serializer } from \"../../bcs\";\nimport { HexInput } from \"../../types\";\nimport { AccountAddress } from \"../accountAddress\";\nimport { AuthenticationKey } from \"../authenticationKey\";\nimport { Hex } from \"../hex\";\nimport { AccountPublicKey, VerifySignatureArgs, VerifySignatureAsyncArgs } from \"./publicKey\";\nimport { Signature } from \"./signature\";\n\nexport class AbstractSignature extends Signature {\n readonly value: Uint8Array;\n\n constructor(value: HexInput) {\n super();\n this.value = Hex.fromHexInput(value).toUint8Array();\n }\n\n serialize(serializer: Serializer): void {\n serializer.serializeBytes(this.value);\n }\n\n static deserialize(deserializer: Deserializer): AbstractSignature {\n return new AbstractSignature(deserializer.deserializeBytes());\n }\n}\n\nexport class AbstractPublicKey extends AccountPublicKey {\n readonly accountAddress: AccountAddress;\n\n constructor(accountAddress: AccountAddress) {\n super();\n this.accountAddress = accountAddress;\n }\n\n authKey(): AuthenticationKey {\n return new AuthenticationKey({ data: this.accountAddress.toUint8Array() });\n }\n\n verifySignature(args: VerifySignatureArgs): boolean {\n throw new Error(\"This function is not implemented for AbstractPublicKey.\");\n }\n\n async verifySignatureAsync(args: VerifySignatureAsyncArgs): Promise<boolean> {\n throw new Error(\"This function is not implemented for AbstractPublicKey.\");\n }\n\n serialize(serializer: Serializer): void {\n throw new Error(\"This function is not implemented for AbstractPublicKey.\");\n }\n}\n"],"mappings":"oKAQO,IAAMA,EAAN,MAAMC,UAA0BC,CAAU,CAG/C,YAAYC,EAAiB,CAC3B,MAAM,EACN,KAAK,MAAQC,EAAI,aAAaD,CAAK,EAAE,aAAa,CACpD,CAEA,UAAUE,EAA8B,CACtCA,EAAW,eAAe,KAAK,KAAK,CACtC,CAEA,OAAO,YAAYC,EAA+C,CAChE,OAAO,IAAIL,EAAkBK,EAAa,iBAAiB,CAAC,CAC9D,CACF,EAEaC,EAAN,cAAgCC,CAAiB,CAGtD,YAAYC,EAAgC,CAC1C,MAAM,EACN,KAAK,eAAiBA,CACxB,CAEA,SAA6B,CAC3B,OAAO,IAAIC,EAAkB,CAAE,KAAM,KAAK,eAAe,aAAa,CAAE,CAAC,CAC3E,CAEA,gBAAgBC,EAAoC,CAClD,MAAM,IAAI,MAAM,yDAAyD,CAC3E,CAEA,MAAM,qBAAqBA,EAAkD,CAC3E,MAAM,IAAI,MAAM,yDAAyD,CAC3E,CAEA,UAAUN,EAA8B,CACtC,MAAM,IAAI,MAAM,yDAAyD,CAC3E,CACF","names":["AbstractSignature","_AbstractSignature","Signature","value","Hex","serializer","deserializer","AbstractPublicKey","AccountPublicKey","accountAddress","AuthenticationKey","args"]}
@@ -1,2 +0,0 @@
1
- var p=(e=>(e[e.V1=0]="V1",e[e.DerivableV1=1]="DerivableV1",e))(p||{}),x=(m=>(m[m.V1=0]="V1",m))(x||{});export{p as a,x as b};
2
- //# sourceMappingURL=chunk-ZP4DWSQA.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/types/abstraction.ts"],"sourcesContent":["/**\n * The variant for the AbstractAuthenticationData enum.\n */\nexport enum AbstractAuthenticationDataVariant {\n V1 = 0,\n DerivableV1 = 1,\n}\n\n/**\n * The variant for the AASigningData enum.\n */\nexport enum AASigningDataVariant {\n V1 = 0,\n}\n"],"mappings":"AAGO,IAAKA,OACVA,IAAA,GAAK,GAAL,KACAA,IAAA,YAAc,GAAd,cAFUA,OAAA,IAQAC,OACVA,IAAA,GAAK,GAAL,KADUA,OAAA","names":["AbstractAuthenticationDataVariant","AASigningDataVariant"]}
@@ -1,10 +0,0 @@
1
- export { LocalNode } from './localNode.mjs';
2
- export { Move } from './move.mjs';
3
- import 'node:child_process';
4
- import '../account-sIOs_9XJ.mjs';
5
- import '../types/indexer.mjs';
6
- import '../types/generated/operations.mjs';
7
- import '../types/generated/types.mjs';
8
- import '../utils/apiEndpoints.mjs';
9
- import '../utils/const.mjs';
10
- import '../core/common.mjs';
@@ -1,2 +0,0 @@
1
- import{a as o}from"../chunk-QE5MOGUI.mjs";import{a as r}from"../chunk-44MMFX5F.mjs";import"../chunk-GJYLYE6R.mjs";import"../chunk-GYYSHYO5.mjs";import"../chunk-6T2OBPIF.mjs";import"../chunk-DE5K76I2.mjs";import"../chunk-Q5ESW36C.mjs";import"../chunk-NP2IAUME.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-RUKFK3OC.mjs";import"../chunk-TAHLOBRG.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-X2TPNKLV.mjs";import"../chunk-KDMSOCZY.mjs";export{o as LocalNode,r as Move};
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,67 +0,0 @@
1
- import { ChildProcessWithoutNullStreams } from 'node:child_process';
2
-
3
- /**
4
- * Represents a local node for running a localnet environment.
5
- * This class provides methods to start, stop, and check the status of the localnet process.
6
- * It manages the lifecycle of the node process and ensures that it is operational before executing tests.
7
- * @group Implementation
8
- * @category CLI
9
- */
10
- declare class LocalNode {
11
- readonly MAXIMUM_WAIT_TIME_SEC = 75;
12
- readonly READINESS_ENDPOINT = "http://127.0.0.1:8070/";
13
- showStdout: boolean;
14
- process: ChildProcessWithoutNullStreams | null;
15
- extraArgs: string[];
16
- constructor(args?: {
17
- showStdout?: boolean;
18
- extraArgs?: string[];
19
- });
20
- /**
21
- * Kills the current process and all its descendant processes.
22
- *
23
- * @returns {Promise<void>} A promise that resolves to true if the process was successfully killed.
24
- * @throws {Error} If there is an error while attempting to kill the process.
25
- * @group Implementation
26
- * @category CLI
27
- */
28
- stop(): Promise<void>;
29
- /**
30
- * Runs a localnet and waits for the process to be up.
31
- * If the local node process is already running, it returns without starting the process.
32
- *
33
- * @returns {Promise<void>} A promise that resolves when the process is up.
34
- * @group Implementation
35
- * @category CLI
36
- */
37
- run(): Promise<void>;
38
- /**
39
- * Starts the localnet by running the Aptos node with the specified command-line arguments.
40
- *
41
- * @returns {void}
42
- *
43
- * @throws {Error} If there is an issue starting the localnet.
44
- * @group Implementation
45
- * @category CLI
46
- */
47
- start(): void;
48
- /**
49
- * Waits for the localnet process to be operational within a specified maximum wait time.
50
- * This function continuously checks if the process is up and will throw an error if it fails to start.
51
- *
52
- * @returns Promise<boolean> - Resolves to true if the process is up, otherwise throws an error.
53
- * @group Implementation
54
- * @category CLI
55
- */
56
- waitUntilProcessIsUp(): Promise<boolean>;
57
- /**
58
- * Checks if the localnet is up by querying the readiness endpoint.
59
- *
60
- * @returns Promise<boolean> - A promise that resolves to true if the localnet is up, otherwise false.
61
- * @group Implementation
62
- * @category CLI
63
- */
64
- checkIfProcessIsUp(): Promise<boolean>;
65
- }
66
-
67
- export { LocalNode };
@@ -1,2 +0,0 @@
1
- import{a}from"../chunk-QE5MOGUI.mjs";import"../chunk-GJYLYE6R.mjs";import"../chunk-GYYSHYO5.mjs";import"../chunk-6T2OBPIF.mjs";import"../chunk-DE5K76I2.mjs";import"../chunk-Q5ESW36C.mjs";import"../chunk-NP2IAUME.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-RUKFK3OC.mjs";import"../chunk-TAHLOBRG.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-X2TPNKLV.mjs";import"../chunk-KDMSOCZY.mjs";export{a as LocalNode};
2
- //# sourceMappingURL=localNode.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}