@aptos-labs/ts-sdk 6.3.0 → 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 +34 -19
  727. package/src/bcs/serializable/moveStructs.ts +12 -12
  728. package/src/bcs/serializer.ts +24 -5
  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 +8 -8
  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-DGpxrkAn.d.ts +0 -8156
  847. package/dist/common/chunk-2VR6ONNW.js +0 -4
  848. package/dist/common/chunk-2VR6ONNW.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-BCt2cu_M.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-Dg0ejXHy.d.mts +0 -7358
  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-2CH5QB7U.mjs +0 -4
  993. package/dist/esm/chunk-2CH5QB7U.mjs.map +0 -1
  994. package/dist/esm/chunk-2VBY2V4Z.mjs +0 -2
  995. package/dist/esm/chunk-2VBY2V4Z.mjs.map +0 -1
  996. package/dist/esm/chunk-44MMFX5F.mjs +0 -2
  997. package/dist/esm/chunk-44MMFX5F.mjs.map +0 -1
  998. package/dist/esm/chunk-4QMXOWHP.mjs +0 -1
  999. package/dist/esm/chunk-4QMXOWHP.mjs.map +0 -1
  1000. package/dist/esm/chunk-4WPQQPUF.mjs +0 -1
  1001. package/dist/esm/chunk-4WPQQPUF.mjs.map +0 -1
  1002. package/dist/esm/chunk-5HHC2YG4.mjs +0 -2
  1003. package/dist/esm/chunk-5HHC2YG4.mjs.map +0 -1
  1004. package/dist/esm/chunk-5HXLZHDW.mjs +0 -1
  1005. package/dist/esm/chunk-5HXLZHDW.mjs.map +0 -1
  1006. package/dist/esm/chunk-5LMLIRGK.mjs +0 -2
  1007. package/dist/esm/chunk-5LMLIRGK.mjs.map +0 -1
  1008. package/dist/esm/chunk-66F7RP7K.mjs +0 -2
  1009. package/dist/esm/chunk-66F7RP7K.mjs.map +0 -1
  1010. package/dist/esm/chunk-7ECCT6PK.mjs +0 -1
  1011. package/dist/esm/chunk-7ECCT6PK.mjs.map +0 -1
  1012. package/dist/esm/chunk-A5L76YP7.mjs +0 -2
  1013. package/dist/esm/chunk-A5L76YP7.mjs.map +0 -1
  1014. package/dist/esm/chunk-A7SQEK23.mjs +0 -2
  1015. package/dist/esm/chunk-A7SQEK23.mjs.map +0 -1
  1016. package/dist/esm/chunk-ASFFADWS.mjs +0 -7
  1017. package/dist/esm/chunk-ASFFADWS.mjs.map +0 -1
  1018. package/dist/esm/chunk-BT742BFQ.mjs +0 -2
  1019. package/dist/esm/chunk-BT742BFQ.mjs.map +0 -1
  1020. package/dist/esm/chunk-C2KVLMPH.mjs +0 -2
  1021. package/dist/esm/chunk-C2KVLMPH.mjs.map +0 -1
  1022. package/dist/esm/chunk-C3Q23D22.mjs +0 -2
  1023. package/dist/esm/chunk-C3Q23D22.mjs.map +0 -1
  1024. package/dist/esm/chunk-CD3EZCI5.mjs +0 -2
  1025. package/dist/esm/chunk-CD3EZCI5.mjs.map +0 -1
  1026. package/dist/esm/chunk-DE5K76I2.mjs +0 -1
  1027. package/dist/esm/chunk-DE5K76I2.mjs.map +0 -1
  1028. package/dist/esm/chunk-E3DHFXN4.mjs +0 -2
  1029. package/dist/esm/chunk-E3DHFXN4.mjs.map +0 -1
  1030. package/dist/esm/chunk-EIWPAECI.mjs +0 -2
  1031. package/dist/esm/chunk-EIWPAECI.mjs.map +0 -1
  1032. package/dist/esm/chunk-F45HI7LU.mjs +0 -2
  1033. package/dist/esm/chunk-F45HI7LU.mjs.map +0 -1
  1034. package/dist/esm/chunk-F4LHBGG2.mjs +0 -2
  1035. package/dist/esm/chunk-F4LHBGG2.mjs.map +0 -1
  1036. package/dist/esm/chunk-F5KAWYF5.mjs +0 -2
  1037. package/dist/esm/chunk-F5KAWYF5.mjs.map +0 -1
  1038. package/dist/esm/chunk-FDHHQUS3.mjs +0 -4
  1039. package/dist/esm/chunk-FDHHQUS3.mjs.map +0 -1
  1040. package/dist/esm/chunk-FZY4PMEE.mjs +0 -1
  1041. package/dist/esm/chunk-FZY4PMEE.mjs.map +0 -1
  1042. package/dist/esm/chunk-G3MHXDYA.mjs +0 -1
  1043. package/dist/esm/chunk-G3MHXDYA.mjs.map +0 -1
  1044. package/dist/esm/chunk-G5OONGWS.mjs +0 -488
  1045. package/dist/esm/chunk-G5OONGWS.mjs.map +0 -1
  1046. package/dist/esm/chunk-HGLO5LDS.mjs +0 -1
  1047. package/dist/esm/chunk-HGLO5LDS.mjs.map +0 -1
  1048. package/dist/esm/chunk-IF4UU2MT.mjs +0 -2
  1049. package/dist/esm/chunk-IF4UU2MT.mjs.map +0 -1
  1050. package/dist/esm/chunk-ITZN23GU.mjs +0 -2
  1051. package/dist/esm/chunk-ITZN23GU.mjs.map +0 -1
  1052. package/dist/esm/chunk-J73MMLF7.mjs +0 -2
  1053. package/dist/esm/chunk-J73MMLF7.mjs.map +0 -1
  1054. package/dist/esm/chunk-KDMSOCZY.mjs +0 -2
  1055. package/dist/esm/chunk-KDMSOCZY.mjs.map +0 -1
  1056. package/dist/esm/chunk-LTZRUAGD.mjs +0 -2
  1057. package/dist/esm/chunk-LTZRUAGD.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-NECL5FCQ.mjs +0 -1
  1061. package/dist/esm/chunk-NECL5FCQ.mjs.map +0 -1
  1062. package/dist/esm/chunk-NP2IAUME.mjs +0 -2
  1063. package/dist/esm/chunk-NP2IAUME.mjs.map +0 -1
  1064. package/dist/esm/chunk-NTREJSOS.mjs +0 -2
  1065. package/dist/esm/chunk-NTREJSOS.mjs.map +0 -1
  1066. package/dist/esm/chunk-OAK2V35A.mjs +0 -2
  1067. package/dist/esm/chunk-OAK2V35A.mjs.map +0 -1
  1068. package/dist/esm/chunk-ODNZJSOC.mjs +0 -2
  1069. package/dist/esm/chunk-ODNZJSOC.mjs.map +0 -1
  1070. package/dist/esm/chunk-P5HCJN3A.mjs +0 -2
  1071. package/dist/esm/chunk-P5HCJN3A.mjs.map +0 -1
  1072. package/dist/esm/chunk-POQ4FT4E.mjs +0 -2
  1073. package/dist/esm/chunk-POQ4FT4E.mjs.map +0 -1
  1074. package/dist/esm/chunk-Q5ESW36C.mjs +0 -2
  1075. package/dist/esm/chunk-Q5ESW36C.mjs.map +0 -1
  1076. package/dist/esm/chunk-QFUXOL34.mjs +0 -2
  1077. package/dist/esm/chunk-QFUXOL34.mjs.map +0 -1
  1078. package/dist/esm/chunk-QRW7MQDA.mjs +0 -2
  1079. package/dist/esm/chunk-QRW7MQDA.mjs.map +0 -1
  1080. package/dist/esm/chunk-R7PCBRRT.mjs +0 -2
  1081. package/dist/esm/chunk-R7PCBRRT.mjs.map +0 -1
  1082. package/dist/esm/chunk-STY74NUA.mjs +0 -2
  1083. package/dist/esm/chunk-STY74NUA.mjs.map +0 -1
  1084. package/dist/esm/chunk-TAHLOBRG.mjs +0 -2
  1085. package/dist/esm/chunk-TAHLOBRG.mjs.map +0 -1
  1086. package/dist/esm/chunk-TEI33TO7.mjs +0 -2
  1087. package/dist/esm/chunk-TEI33TO7.mjs.map +0 -1
  1088. package/dist/esm/chunk-TSPG5VED.mjs +0 -2
  1089. package/dist/esm/chunk-TSPG5VED.mjs.map +0 -1
  1090. package/dist/esm/chunk-UBPX6GOS.mjs +0 -2
  1091. package/dist/esm/chunk-UBPX6GOS.mjs.map +0 -1
  1092. package/dist/esm/chunk-UPHD2B4I.mjs +0 -2
  1093. package/dist/esm/chunk-UPHD2B4I.mjs.map +0 -1
  1094. package/dist/esm/chunk-UVJW4DPP.mjs +0 -2
  1095. package/dist/esm/chunk-UVJW4DPP.mjs.map +0 -1
  1096. package/dist/esm/chunk-UYG4XVVO.mjs +0 -2
  1097. package/dist/esm/chunk-UYG4XVVO.mjs.map +0 -1
  1098. package/dist/esm/chunk-UYVPNUH3.mjs +0 -1
  1099. package/dist/esm/chunk-UYVPNUH3.mjs.map +0 -1
  1100. package/dist/esm/chunk-V3MBJJTL.mjs +0 -1
  1101. package/dist/esm/chunk-V3MBJJTL.mjs.map +0 -1
  1102. package/dist/esm/chunk-WD3SPNH7.mjs +0 -2
  1103. package/dist/esm/chunk-WD3SPNH7.mjs.map +0 -1
  1104. package/dist/esm/chunk-WFZFTRRS.mjs +0 -2
  1105. package/dist/esm/chunk-WFZFTRRS.mjs.map +0 -1
  1106. package/dist/esm/chunk-WVKZFOPV.mjs +0 -2
  1107. package/dist/esm/chunk-WVKZFOPV.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-YJVBGKWM.mjs +0 -2
  1111. package/dist/esm/chunk-YJVBGKWM.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-BYLu31Sa.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/client/core.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { AptosConfig } from \"../api/aptosConfig\";\nimport { VERSION } from \"../version\";\nimport { AnyNumber, AptosRequest, AptosResponse, Client, ClientRequest, ClientResponse, MimeType } from \"../types\";\nimport { AptosApiType } from \"../utils\";\nimport { AptosApiError } from \"../errors\";\n\n/**\n * Sends a request using the specified options and returns the response.\n *\n * @param options - The options for the request.\n * @param options.url - The URL to send the request to.\n * @param options.method - The HTTP method to use for the request.\n * @param options.body - The body of the request.\n * @param options.contentType - The content type of the request.\n * @param options.params - The query parameters to include in the request.\n * @param options.overrides - Additional overrides for the request.\n * @param options.overrides.HEADERS - Custom headers to include in the request.\n * @param options.overrides.AUTH_TOKEN - The authorization token for the request.\n * @param options.overrides.API_KEY - The API key for the request.\n * @param options.overrides.http2 - Whether to use HTTP/2 for the request.\n * @param options.originMethod - The origin method for the request.\n * @param client - The client used to make the request.\n *\n * @returns The response from the request.\n * @group Implementation\n * @category Client\n */\nexport async function request<Req, Res>(options: ClientRequest<Req>, client: Client): Promise<ClientResponse<Res>> {\n const { url, method, body, contentType, params, overrides, originMethod } = options;\n const headers: Record<string, string | AnyNumber | boolean | undefined> = {\n ...overrides?.HEADERS,\n \"x-aptos-client\": `aptos-typescript-sdk/${VERSION}`,\n \"content-type\": contentType ?? MimeType.JSON,\n \"x-aptos-typescript-sdk-origin-method\": originMethod,\n };\n\n if (overrides?.AUTH_TOKEN) {\n headers.Authorization = `Bearer ${overrides?.AUTH_TOKEN}`;\n }\n if (overrides?.API_KEY) {\n headers.Authorization = `Bearer ${overrides?.API_KEY}`;\n }\n\n /*\n * make a call using the @aptos-labs/aptos-client package\n * {@link https://www.npmjs.com/package/@aptos-labs/aptos-client}\n */\n return client.provider<Req, Res>({\n url,\n method,\n body,\n params,\n headers,\n overrides,\n http2: overrides?.http2,\n });\n}\n\n/**\n * The main function to use when making an API request, returning the response or throwing an AptosApiError on failure.\n *\n * @param aptosRequestOpts - Options for the Aptos request, including the URL and path.\n * @param aptosConfig - The configuration information for the SDK client instance.\n * @param apiType - The type of API being accessed, which determines how the response is handled.\n * @returns The response from the API request or throws an AptosApiError if the request fails.\n * @group Implementation\n * @category Client\n */\nexport async function aptosRequest<Req extends {}, Res extends {}>(\n aptosRequestOpts: AptosRequest,\n aptosConfig: AptosConfig,\n apiType: AptosApiType,\n): Promise<AptosResponse<Req, Res>> {\n const { url, path } = aptosRequestOpts;\n const fullUrl = path ? `${url}/${path}` : url;\n const clientResponse = await request<Req, Res>({ ...aptosRequestOpts, url: fullUrl }, aptosConfig.client);\n\n const aptosResponse: AptosResponse<Req, Res> = {\n status: clientResponse.status,\n statusText: clientResponse.statusText ?? \"No status text provided\",\n data: clientResponse.data,\n headers: clientResponse.headers,\n config: clientResponse.config,\n request: clientResponse.request,\n url: fullUrl,\n };\n\n // Handle case for `Unauthorized` error (i.e. API_KEY error)\n if (aptosResponse.status === 401) {\n throw new AptosApiError({ apiType, aptosRequest: aptosRequestOpts, aptosResponse });\n }\n\n // to support both fullnode and indexer responses,\n // check if it is an indexer query, and adjust response.data\n if (apiType === AptosApiType.INDEXER) {\n const indexerResponse = aptosResponse.data as any;\n // Handle Indexer general errors\n if (indexerResponse.errors) {\n throw new AptosApiError({\n apiType,\n aptosRequest: aptosRequestOpts,\n aptosResponse,\n });\n }\n aptosResponse.data = indexerResponse.data as Res;\n } else if (apiType === AptosApiType.PEPPER || apiType === AptosApiType.PROVER) {\n if (aptosResponse.status >= 400) {\n throw new AptosApiError({ apiType, aptosRequest: aptosRequestOpts, aptosResponse });\n }\n }\n\n if (aptosResponse.status >= 200 && aptosResponse.status < 300) {\n return aptosResponse;\n }\n\n // We have to explicitly check for all request types, because if the error is a non-indexer error, but\n // comes from an indexer request (e.g. 404), we'll need to mention it appropriately\n throw new AptosApiError({ apiType, aptosRequest: aptosRequestOpts, aptosResponse });\n}\n"],"mappings":"kFA8BA,eAAsBA,EAAkBC,EAA6BC,EAA8C,CACjH,GAAM,CAAE,IAAAC,EAAK,OAAAC,EAAQ,KAAAC,EAAM,YAAAC,EAAa,OAAAC,EAAQ,UAAAC,EAAW,aAAAC,CAAa,EAAIR,EACtES,EAAoE,CACxE,GAAGF,GAAW,QACd,iBAAkB,wBAAwBG,CAAO,GACjD,eAAgBL,GAAe,mBAC/B,uCAAwCG,CAC1C,EAEA,OAAID,GAAW,aACbE,EAAQ,cAAgB,UAAUF,GAAW,UAAU,IAErDA,GAAW,UACbE,EAAQ,cAAgB,UAAUF,GAAW,OAAO,IAO/CN,EAAO,SAAmB,CAC/B,IAAAC,EACA,OAAAC,EACA,KAAAC,EACA,OAAAE,EACA,QAAAG,EACA,UAAAF,EACA,MAAOA,GAAW,KACpB,CAAC,CACH,CAYA,eAAsBI,EACpBC,EACAC,EACAC,EACkC,CAClC,GAAM,CAAE,IAAAZ,EAAK,KAAAa,CAAK,EAAIH,EAChBI,EAAUD,EAAO,GAAGb,CAAG,IAAIa,CAAI,GAAKb,EACpCe,EAAiB,MAAMlB,EAAkB,CAAE,GAAGa,EAAkB,IAAKI,CAAQ,EAAGH,EAAY,MAAM,EAElGK,EAAyC,CAC7C,OAAQD,EAAe,OACvB,WAAYA,EAAe,YAAc,0BACzC,KAAMA,EAAe,KACrB,QAASA,EAAe,QACxB,OAAQA,EAAe,OACvB,QAASA,EAAe,QACxB,IAAKD,CACP,EAGA,GAAIE,EAAc,SAAW,IAC3B,MAAM,IAAIC,EAAc,CAAE,QAAAL,EAAS,aAAcF,EAAkB,cAAAM,CAAc,CAAC,EAKpF,GAAIJ,IAAY,UAAsB,CACpC,IAAMM,EAAkBF,EAAc,KAEtC,GAAIE,EAAgB,OAClB,MAAM,IAAID,EAAc,CACtB,QAAAL,EACA,aAAcF,EACd,cAAAM,CACF,CAAC,EAEHA,EAAc,KAAOE,EAAgB,IACvC,UAAWN,IAAY,UAAuBA,IAAY,WACpDI,EAAc,QAAU,IAC1B,MAAM,IAAIC,EAAc,CAAE,QAAAL,EAAS,aAAcF,EAAkB,cAAAM,CAAc,CAAC,EAItF,GAAIA,EAAc,QAAU,KAAOA,EAAc,OAAS,IACxD,OAAOA,EAKT,MAAM,IAAIC,EAAc,CAAE,QAAAL,EAAS,aAAcF,EAAkB,cAAAM,CAAc,CAAC,CACpF","names":["request","options","client","url","method","body","contentType","params","overrides","originMethod","headers","VERSION","aptosRequest","aptosRequestOpts","aptosConfig","apiType","path","fullUrl","clientResponse","aptosResponse","AptosApiError","indexerResponse"]}
@@ -1,2 +0,0 @@
1
- import{b as a}from"./chunk-STY74NUA.mjs";import{c as n}from"./chunk-X2TPNKLV.mjs";var f=new TextDecoder,o=10*1024*1024,d=class l{constructor(e){this.buffer=new ArrayBuffer(e.length),new Uint8Array(this.buffer).set(e,0),this.offset=0}static fromHex(e){let i=a.hexInputToUint8Array(e);return new l(i)}read(e){if(this.offset+e>this.buffer.byteLength)throw new Error("Reached to the end of buffer");let i=new Uint8Array(this.buffer,this.offset,e);return this.offset+=e,i}remaining(){return this.buffer.byteLength-this.offset}assertFinished(){if(this.remaining()!==0)throw new Error("Buffer has remaining bytes")}deserializeStr(){let e=this.deserializeBytes();return f.decode(e)}deserializeOptionStr(){return this.deserializeOption("string")}deserializeOption(e,i){if(this.deserializeBool()){if(e==="string")return this.deserializeStr();if(e==="bytes")return this.deserializeBytes();if(e==="fixedBytes"){if(i===void 0)throw new Error("Fixed bytes length not provided");return this.deserializeFixedBytes(i)}return this.deserialize(e)}}deserializeBytes(){let e=this.deserializeUleb128AsU32();if(e>o)throw new Error(`Deserialization error: byte array length ${e} exceeds maximum allowed ${o}`);return this.read(e).slice()}deserializeFixedBytes(e){return this.read(e).slice()}deserializeBool(){let e=this.read(1)[0];if(e!==1&&e!==0)throw new Error("Invalid boolean value");return e===1}deserializeU8(){return this.read(1)[0]}deserializeU16(){let e=this.read(2);return new DataView(e.buffer,e.byteOffset,e.byteLength).getUint16(0,!0)}deserializeU32(){let e=this.read(4);return new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(0,!0)}deserializeU64(){let e=this.deserializeU32(),i=this.deserializeU32();return BigInt(BigInt(i)<<BigInt(32)|BigInt(e))}deserializeU128(){let e=this.deserializeU64(),i=this.deserializeU64();return BigInt(i<<BigInt(64)|e)}deserializeU256(){let e=this.deserializeU128(),i=this.deserializeU128();return BigInt(i<<BigInt(128)|e)}deserializeI8(){let e=this.read(1);return new DataView(e.buffer,e.byteOffset,e.byteLength).getInt8(0)}deserializeI16(){let e=this.read(2);return new DataView(e.buffer,e.byteOffset,e.byteLength).getInt16(0,!0)}deserializeI32(){let e=this.read(4);return new DataView(e.buffer,e.byteOffset,e.byteLength).getInt32(0,!0)}deserializeI64(){let e=this.deserializeU32(),i=this.deserializeU32(),t=BigInt(BigInt(i)<<BigInt(32)|BigInt(e)),r=BigInt(1)<<BigInt(63);return t>=r?t-(BigInt(1)<<BigInt(64)):t}deserializeI128(){let e=this.deserializeU64(),i=this.deserializeU64(),t=BigInt(i<<BigInt(64)|e),r=BigInt(1)<<BigInt(127);return t>=r?t-(BigInt(1)<<BigInt(128)):t}deserializeI256(){let e=this.deserializeU128(),i=this.deserializeU128(),t=BigInt(i<<BigInt(128)|e),r=BigInt(1)<<BigInt(255);return t>=r?t-(BigInt(1)<<BigInt(256)):t}deserializeUleb128AsU32(){let e=BigInt(0),i=0,t=5,r=0;for(;r<t;){let s=this.deserializeU8();if(r+=1,e|=BigInt(s&127)<<BigInt(i),e>n)throw new Error("Overflow while parsing uleb128-encoded uint32 value");if((s&128)===0)break;i+=7}if(r===t&&e>n)throw new Error("Overflow while parsing uleb128-encoded uint32 value");return Number(e)}deserialize(e){return e.deserialize(this)}deserializeVector(e){let i=this.deserializeUleb128AsU32(),t=new Array;for(let r=0;r<i;r+=1)t.push(this.deserialize(e));return t}};export{d as a};
2
- //# sourceMappingURL=chunk-M65PXVDO.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/bcs/deserializer.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { MAX_U32_NUMBER } from \"./consts\";\nimport { Uint8, Uint16, Uint32, Uint64, Uint128, Uint256, HexInput } from \"../types\";\nimport { Hex } from \"../core/hex\";\n\n/**\n * Shared TextDecoder instance for string deserialization to avoid repeated instantiation.\n */\nconst TEXT_DECODER = new TextDecoder();\n\n/**\n * Maximum allowed length for deserialized byte arrays and strings.\n * This prevents memory exhaustion attacks from malformed BCS data.\n * Set to 10MB which should be sufficient for any legitimate use case.\n */\nconst MAX_DESERIALIZE_BYTES_LENGTH = 10 * 1024 * 1024; // 10MB\n\n/**\n * This interface exists to define Deserializable<T> inputs for functions that\n * deserialize a byte buffer into a type T.\n * It is not intended to be implemented or extended, because Typescript has no support\n * for static methods in interfaces.\n *\n * @template T - The type that this will deserialize into.\n * @group Implementation\n * @category BCS\n */\nexport interface Deserializable<T> {\n /**\n * Deserializes the buffered bytes into an instance of the specified class type.\n * This function provides an alternative syntax for deserialization, allowing users to call\n * `deserializer.deserialize(MyClass)` instead of `MyClass.deserialize(deserializer)`.\n *\n * @param deserializer - The deserializer instance with the buffered bytes.\n * @returns The deserialized value of class type T.\n * @example\n * ```typescript\n * const deserializer = new Deserializer(new Uint8Array([1, 2, 3]));\n * const value = deserializer.deserialize(MyClass); // where MyClass has a `deserialize` function\n * // value is now an instance of MyClass\n * // equivalent to `const value = MyClass.deserialize(deserializer)`\n * ```\n * @group Implementation\n * @category BCS\n */\n deserialize(deserializer: Deserializer): T;\n}\n\n/**\n * A class that provides methods for deserializing various data types from a byte buffer.\n * It supports deserialization of primitive types, strings, and complex objects using a BCS (Binary Common Serialization) layout.\n * @group Implementation\n * @category BCS\n */\nexport class Deserializer {\n private buffer: ArrayBuffer;\n\n private offset: number;\n\n /**\n * Creates a new instance of the class with a copy of the provided data buffer.\n * This prevents outside mutation of the buffer.\n *\n * @param data - The data to be copied into the internal buffer as a Uint8Array.\n * @group Implementation\n * @category BCS\n */\n constructor(data: Uint8Array) {\n // copies data to prevent outside mutation of buffer.\n this.buffer = new ArrayBuffer(data.length);\n new Uint8Array(this.buffer).set(data, 0);\n this.offset = 0;\n }\n\n static fromHex(hex: HexInput): Deserializer {\n const data = Hex.hexInputToUint8Array(hex);\n return new Deserializer(data);\n }\n\n /**\n * Reads a specified number of bytes from the buffer and advances the offset.\n * Returns a view into the buffer rather than copying for better performance.\n *\n * SECURITY NOTE: This returns a view, not a copy. Callers that expose the result\n * externally MUST call .slice() to create a copy. Internal numeric deserializers\n * (deserializeU8, deserializeU16, etc.) only read values and don't expose the view.\n * deserializeBytes() and deserializeFixedBytes() call .slice() before returning.\n *\n * @param length - The number of bytes to read from the buffer.\n * @throws Throws an error if the read operation exceeds the buffer's length.\n * @group Implementation\n * @category BCS\n */\n private read(length: number): Uint8Array {\n if (this.offset + length > this.buffer.byteLength) {\n throw new Error(\"Reached to the end of buffer\");\n }\n\n // Use subarray to return a view instead of slice which copies\n // SECURITY: View is safe because numeric deserializers only read values,\n // and byte deserializers call .slice() before returning to caller\n const bytes = new Uint8Array(this.buffer, this.offset, length);\n this.offset += length;\n return bytes;\n }\n\n /**\n * Returns the number of bytes remaining in the buffer.\n *\n * This information is useful to determine if there's more data to be read.\n *\n * @returns The number of bytes remaining in the buffer.\n * @group Implementation\n * @category BCS\n */\n remaining(): number {\n return this.buffer.byteLength - this.offset;\n }\n\n /**\n * Asserts that the buffer has no remaining bytes.\n *\n * @throws {Error} Throws an error if there are remaining bytes in the buffer.\n * @group Implementation\n * @category BCS\n */\n assertFinished(): void {\n if (this.remaining() !== 0) {\n throw new Error(\"Buffer has remaining bytes\");\n }\n }\n\n /**\n * Deserializes a UTF-8 encoded string from a byte array. It first reads the length of the string in bytes,\n * followed by the actual byte content, and decodes it into a string.\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 * @example\n * ```typescript\n * const deserializer = new Deserializer(new Uint8Array([8, 49, 50, 51, 52, 97, 98, 99, 100]));\n * assert(deserializer.deserializeStr() === \"1234abcd\");\n * ```\n * @group Implementation\n * @category BCS\n */\n deserializeStr(): string {\n const value = this.deserializeBytes();\n return TEXT_DECODER.decode(value);\n }\n\n /**\n * @deprecated use `deserializeOption(\"string\")` instead.\n *\n * The BCS layout for Optional<String> is 0 if none, else 1 followed by the string length and string content.\n * @returns The deserialized string if it exists, otherwise undefined.\n * @example\n * ```typescript\n * const deserializer = new Deserializer(new Uint8Array([0x00]));\n * assert(deserializer.deserializeOptionStr() === undefined);\n * const deserializer = new Deserializer(new Uint8Array([1, 8, 49, 50, 51, 52, 97, 98, 99, 100]));\n * assert(deserializer.deserializeOptionStr() === \"1234abcd\");\n * ```\n */\n deserializeOptionStr(): string | undefined {\n return this.deserializeOption(\"string\");\n }\n\n /**\n * Deserializes an optional value from the buffer.\n *\n * The BCS layout for Optional<T> starts with a boolean byte (0 if none, 1 if some),\n * followed by the value if present.\n *\n * @template T - The type of the value to deserialize\n * @param type - Either a Deserializable class or one of the string literals: \"string\", \"bytes\", or \"fixedBytes\"\n * @param len - Required length when type is \"fixedBytes\", ignored otherwise\n * @returns The deserialized value if present, undefined otherwise\n *\n * @throws {Error} When \"fixedBytes\" is specified without a length\n *\n * @example\n * ```typescript\n * // Deserialize an optional string\n * const deserializer = new Deserializer(new Uint8Array([1, 3, 97, 98, 99]));\n * const optStr = deserializer.deserializeOption(\"string\");\n * // optStr === \"abc\"\n *\n * // Deserialize an optional custom type\n * const deserializer = new Deserializer(new Uint8Array([0]));\n * const optValue = deserializer.deserializeOption(MyClass);\n * // optValue === undefined\n *\n * // Deserialize optional bytes\n * const deserializer = new Deserializer(new Uint8Array([1, 3, 1, 2, 3]));\n * const optBytes = deserializer.deserializeOption(\"bytes\");\n * // optBytes === Uint8Array[1, 2, 3]\n *\n * // Deserialize optional fixed bytes\n * const deserializer = new Deserializer(new Uint8Array([1, 1, 2, 3, 4]));\n * const optBytes = deserializer.deserializeOption(\"fixedBytes\", 4);\n * // optBytes === Uint8Array[1, 2, 3, 4]\n * ```\n * @group Implementation\n * @category BCS\n */\n deserializeOption(type: \"string\"): string | undefined;\n deserializeOption(type: \"bytes\"): Uint8Array | undefined;\n deserializeOption(type: \"fixedBytes\", len: number): Uint8Array | undefined;\n deserializeOption<T>(type: Deserializable<T>): T | undefined;\n deserializeOption<T>(\n type: Deserializable<T> | \"string\" | \"bytes\" | \"fixedBytes\",\n len?: number,\n ): T | string | Uint8Array | undefined {\n const exists = this.deserializeBool();\n if (!exists) return undefined;\n\n if (type === \"string\") {\n return this.deserializeStr();\n }\n if (type === \"bytes\") {\n return this.deserializeBytes();\n }\n if (type === \"fixedBytes\") {\n if (len === undefined) {\n throw new Error(\"Fixed bytes length not provided\");\n }\n return this.deserializeFixedBytes(len);\n }\n\n return this.deserialize(type);\n }\n\n /**\n * Deserializes an array of bytes.\n *\n * The BCS layout for \"bytes\" consists of a bytes_length followed by the bytes themselves, where bytes_length is a u32 integer\n * encoded as a uleb128 integer, indicating the length of the bytes array.\n *\n * @returns {Uint8Array} The deserialized array of bytes (a copy, safe to modify).\n * @throws {Error} If the length exceeds the maximum allowed (10MB) to prevent memory exhaustion.\n * @group Implementation\n * @category BCS\n */\n deserializeBytes(): Uint8Array {\n const len = this.deserializeUleb128AsU32();\n // Security: Prevent memory exhaustion from malformed data\n if (len > MAX_DESERIALIZE_BYTES_LENGTH) {\n throw new Error(\n `Deserialization error: byte array length ${len} exceeds maximum allowed ${MAX_DESERIALIZE_BYTES_LENGTH}`,\n );\n }\n // Return a copy so caller can safely modify without affecting buffer\n return this.read(len).slice();\n }\n\n /**\n * Deserializes an array of bytes of a specified length.\n *\n * @param len - The number of bytes to read from the source.\n * @returns {Uint8Array} The deserialized array of bytes (a copy, safe to modify).\n * @group Implementation\n * @category BCS\n */\n deserializeFixedBytes(len: number): Uint8Array {\n // Return a copy so caller can safely modify without affecting buffer\n return this.read(len).slice();\n }\n\n /**\n * Deserializes a boolean value from a byte stream.\n *\n * The BCS layout for a boolean uses one byte, where \"0x01\" represents true and \"0x00\" represents false.\n * An error is thrown if the byte value is not valid.\n *\n * @returns The deserialized boolean value.\n * @throws Throws an error if the boolean value is invalid.\n * @group Implementation\n * @category BCS\n */\n deserializeBool(): boolean {\n const bool = this.read(1)[0];\n if (bool !== 1 && bool !== 0) {\n throw new Error(\"Invalid boolean value\");\n }\n return bool === 1;\n }\n\n /**\n * Deserializes a uint8 number from the binary data.\n *\n * BCS layout for \"uint8\": One byte. Binary format in little-endian representation.\n *\n * @returns {number} The deserialized uint8 number.\n * @group Implementation\n * @category BCS\n */\n deserializeU8(): Uint8 {\n return this.read(1)[0];\n }\n\n /**\n * Deserializes a uint16 number from a binary format in little-endian representation.\n *\n * BCS layout for \"uint16\": Two bytes.\n * @example\n * ```typescript\n * const deserializer = new Deserializer(new Uint8Array([0x34, 0x12]));\n * assert(deserializer.deserializeU16() === 4660);\n * ```\n * @group Implementation\n * @category BCS\n */\n deserializeU16(): Uint16 {\n const bytes = this.read(2);\n return new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength).getUint16(0, true);\n }\n\n /**\n * Deserializes a uint32 number from a binary format in little-endian representation.\n *\n * BCS layout for \"uint32\": Four bytes.\n * @example\n * ```typescript\n * const deserializer = new Deserializer(new Uint8Array([0x78, 0x56, 0x34, 0x12]));\n * assert(deserializer.deserializeU32() === 305419896);\n * ```\n * @group Implementation\n * @category BCS\n */\n deserializeU32(): Uint32 {\n const bytes = this.read(4);\n return new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength).getUint32(0, true);\n }\n\n /**\n * Deserializes a uint64 number.\n *\n * This function combines two 32-bit values to return a 64-bit unsigned integer in little-endian representation.\n * @example\n * ```typescript\n * const deserializer = new Deserializer(new Uint8Array([0x00, 0xEF, 0xCD, 0xAB, 0x78, 0x56, 0x34, 0x12]));\n * assert(deserializer.deserializeU64() === 1311768467750121216);\n * ```\n * @group Implementation\n * @category BCS\n */\n deserializeU64(): Uint64 {\n const low = this.deserializeU32();\n const high = this.deserializeU32();\n\n // combine the two 32-bit values and return (little endian)\n return BigInt((BigInt(high) << BigInt(32)) | BigInt(low));\n }\n\n /**\n * Deserializes a uint128 number from its binary representation.\n * This function combines two 64-bit values to return a single uint128 value in little-endian format.\n *\n * @returns {BigInt} The deserialized uint128 number.\n * @group Implementation\n * @category BCS\n */\n deserializeU128(): Uint128 {\n const low = this.deserializeU64();\n const high = this.deserializeU64();\n\n // combine the two 64-bit values and return (little endian)\n return BigInt((high << BigInt(64)) | low);\n }\n\n /**\n * Deserializes a uint256 number from its binary representation.\n *\n * The BCS layout for \"uint256\" consists of thirty-two bytes in little-endian format.\n *\n * @returns {BigInt} The deserialized uint256 number.\n * @group Implementation\n * @category BCS\n */\n deserializeU256(): Uint256 {\n const low = this.deserializeU128();\n const high = this.deserializeU128();\n\n // combine the two 128-bit values and return (little endian)\n return BigInt((high << BigInt(128)) | low);\n }\n\n /**\n * Deserializes an 8-bit signed integer from the binary data.\n * BCS layout for \"int8\": One byte. Binary format in little-endian representation.\n *\n * @returns {number} The deserialized int8 number.\n * @group Implementation\n * @category BCS\n */\n deserializeI8(): number {\n const bytes = this.read(1);\n return new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength).getInt8(0);\n }\n\n /**\n * Deserializes a 16-bit signed integer from a binary format in little-endian representation.\n * BCS layout for \"int16\": Two bytes.\n *\n * @returns {number} The deserialized int16 number.\n * @group Implementation\n * @category BCS\n */\n deserializeI16(): number {\n const bytes = this.read(2);\n return new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength).getInt16(0, true);\n }\n\n /**\n * Deserializes a 32-bit signed integer from a binary format in little-endian representation.\n * BCS layout for \"int32\": Four bytes.\n *\n * @returns {number} The deserialized int32 number.\n * @group Implementation\n * @category BCS\n */\n deserializeI32(): number {\n const bytes = this.read(4);\n return new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength).getInt32(0, true);\n }\n\n /**\n * Deserializes a 64-bit signed integer.\n * This function combines two 32-bit values to return a 64-bit signed integer in little-endian representation.\n *\n * @returns {bigint} The deserialized int64 number.\n * @group Implementation\n * @category BCS\n */\n deserializeI64(): bigint {\n const low = this.deserializeU32();\n const high = this.deserializeU32();\n\n // combine the two 32-bit values (little endian)\n const unsigned = BigInt((BigInt(high) << BigInt(32)) | BigInt(low));\n\n // Convert from unsigned to signed using two's complement\n const signBit = BigInt(1) << BigInt(63);\n if (unsigned >= signBit) {\n return unsigned - (BigInt(1) << BigInt(64));\n }\n return unsigned;\n }\n\n /**\n * Deserializes a 128-bit signed integer from its binary representation.\n * This function combines two 64-bit values to return a single int128 value in little-endian format.\n *\n * @returns {bigint} The deserialized int128 number.\n * @group Implementation\n * @category BCS\n */\n deserializeI128(): bigint {\n const low = this.deserializeU64();\n const high = this.deserializeU64();\n\n // combine the two 64-bit values (little endian)\n const unsigned = BigInt((high << BigInt(64)) | low);\n\n // Convert from unsigned to signed using two's complement\n const signBit = BigInt(1) << BigInt(127);\n if (unsigned >= signBit) {\n return unsigned - (BigInt(1) << BigInt(128));\n }\n return unsigned;\n }\n\n /**\n * Deserializes a 256-bit signed integer from its binary representation.\n * BCS layout for \"int256\": Thirty-two bytes in little-endian format.\n *\n * @returns {bigint} The deserialized int256 number.\n * @group Implementation\n * @category BCS\n */\n deserializeI256(): bigint {\n const low = this.deserializeU128();\n const high = this.deserializeU128();\n\n // combine the two 128-bit values (little endian)\n const unsigned = BigInt((high << BigInt(128)) | low);\n\n // Convert from unsigned to signed using two's complement\n const signBit = BigInt(1) << BigInt(255);\n if (unsigned >= signBit) {\n return unsigned - (BigInt(1) << BigInt(256));\n }\n return unsigned;\n }\n\n /**\n * Deserializes a uleb128 encoded uint32 number.\n *\n * This function is used for interpreting lengths of variable-length sequences and tags of enum values in BCS encoding.\n *\n * @throws {Error} Throws an error if the parsed value exceeds the maximum uint32 number.\n * @throws {Error} Throws an error if the uleb128 encoding is malformed (too many bytes).\n * @returns {number} The deserialized uint32 value.\n * @group Implementation\n * @category BCS\n */\n deserializeUleb128AsU32(): Uint32 {\n let value: bigint = BigInt(0);\n let shift = 0;\n // Maximum 5 bytes for uleb128-encoded u32 (7 bits per byte, 5*7=35 bits > 32 bits needed)\n const MAX_ULEB128_BYTES = 5;\n let bytesRead = 0;\n\n while (bytesRead < MAX_ULEB128_BYTES) {\n const byte = this.deserializeU8();\n bytesRead += 1;\n\n value |= BigInt(byte & 0x7f) << BigInt(shift);\n\n // Early overflow check before continuing\n if (value > MAX_U32_NUMBER) {\n throw new Error(\"Overflow while parsing uleb128-encoded uint32 value\");\n }\n\n if ((byte & 0x80) === 0) {\n break;\n }\n\n shift += 7;\n }\n\n // If we read MAX_ULEB128_BYTES and the last byte had continuation bit set, it's malformed\n if (bytesRead === MAX_ULEB128_BYTES && value > MAX_U32_NUMBER) {\n throw new Error(\"Overflow while parsing uleb128-encoded uint32 value\");\n }\n\n return Number(value);\n }\n\n /**\n * Helper function that primarily exists to support alternative syntax for deserialization.\n * That is, if we have a `const deserializer: new Deserializer(...)`, instead of having to use\n * `MyClass.deserialize(deserializer)`, we can call `deserializer.deserialize(MyClass)`.\n *\n * @example const deserializer = new Deserializer(new Uint8Array([1, 2, 3]));\n * const value = deserializer.deserialize(MyClass); // where MyClass has a `deserialize` function\n * // value is now an instance of MyClass\n * // equivalent to `const value = MyClass.deserialize(deserializer)`\n * @param cls The BCS-deserializable class to deserialize the buffered bytes into.\n *\n * @returns the deserialized value of class type T\n * @group Implementation\n * @category BCS\n */\n deserialize<T>(cls: Deserializable<T>): T {\n // NOTE: `deserialize` in `cls.deserialize(this)` here is a static method defined in `cls`,\n // It is separate from the `deserialize` instance method defined here in Deserializer.\n return cls.deserialize(this);\n }\n\n /**\n * Deserializes an array of BCS Deserializable values given an existing Deserializer instance with a loaded byte buffer.\n *\n * @param cls The BCS-deserializable class to deserialize the buffered bytes into.\n * @returns An array of deserialized values of type T.\n * @example\n * // serialize a vector of addresses\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 *\n * // deserialize the bytes into an array of addresses\n * const deserializer = new Deserializer(serializedBytes);\n * const deserializedAddresses = deserializer.deserializeVector(AccountAddress);\n * // deserializedAddresses is now an array of AccountAddress instances\n * @group Implementation\n * @category BCS\n */\n deserializeVector<T>(cls: Deserializable<T>): Array<T> {\n const length = this.deserializeUleb128AsU32();\n const vector = new Array<T>();\n for (let i = 0; i < length; i += 1) {\n vector.push(this.deserialize(cls));\n }\n return vector;\n }\n}\n"],"mappings":"kFAUA,IAAMA,EAAe,IAAI,YAOnBC,EAA+B,GAAK,KAAO,KAuCpCC,EAAN,MAAMC,CAAa,CAaxB,YAAYC,EAAkB,CAE5B,KAAK,OAAS,IAAI,YAAYA,EAAK,MAAM,EACzC,IAAI,WAAW,KAAK,MAAM,EAAE,IAAIA,EAAM,CAAC,EACvC,KAAK,OAAS,CAChB,CAEA,OAAO,QAAQC,EAA6B,CAC1C,IAAMD,EAAOE,EAAI,qBAAqBD,CAAG,EACzC,OAAO,IAAIF,EAAaC,CAAI,CAC9B,CAgBQ,KAAKG,EAA4B,CACvC,GAAI,KAAK,OAASA,EAAS,KAAK,OAAO,WACrC,MAAM,IAAI,MAAM,8BAA8B,EAMhD,IAAMC,EAAQ,IAAI,WAAW,KAAK,OAAQ,KAAK,OAAQD,CAAM,EAC7D,YAAK,QAAUA,EACRC,CACT,CAWA,WAAoB,CAClB,OAAO,KAAK,OAAO,WAAa,KAAK,MACvC,CASA,gBAAuB,CACrB,GAAI,KAAK,UAAU,IAAM,EACvB,MAAM,IAAI,MAAM,4BAA4B,CAEhD,CAiBA,gBAAyB,CACvB,IAAMC,EAAQ,KAAK,iBAAiB,EACpC,OAAOT,EAAa,OAAOS,CAAK,CAClC,CAeA,sBAA2C,CACzC,OAAO,KAAK,kBAAkB,QAAQ,CACxC,CA4CA,kBACEC,EACAC,EACqC,CAErC,GADe,KAAK,gBAAgB,EAGpC,IAAID,IAAS,SACX,OAAO,KAAK,eAAe,EAE7B,GAAIA,IAAS,QACX,OAAO,KAAK,iBAAiB,EAE/B,GAAIA,IAAS,aAAc,CACzB,GAAIC,IAAQ,OACV,MAAM,IAAI,MAAM,iCAAiC,EAEnD,OAAO,KAAK,sBAAsBA,CAAG,CACvC,CAEA,OAAO,KAAK,YAAYD,CAAI,EAC9B,CAaA,kBAA+B,CAC7B,IAAMC,EAAM,KAAK,wBAAwB,EAEzC,GAAIA,EAAMV,EACR,MAAM,IAAI,MACR,4CAA4CU,CAAG,4BAA4BV,CAA4B,EACzG,EAGF,OAAO,KAAK,KAAKU,CAAG,EAAE,MAAM,CAC9B,CAUA,sBAAsBA,EAAyB,CAE7C,OAAO,KAAK,KAAKA,CAAG,EAAE,MAAM,CAC9B,CAaA,iBAA2B,CACzB,IAAMC,EAAO,KAAK,KAAK,CAAC,EAAE,CAAC,EAC3B,GAAIA,IAAS,GAAKA,IAAS,EACzB,MAAM,IAAI,MAAM,uBAAuB,EAEzC,OAAOA,IAAS,CAClB,CAWA,eAAuB,CACrB,OAAO,KAAK,KAAK,CAAC,EAAE,CAAC,CACvB,CAcA,gBAAyB,CACvB,IAAMJ,EAAQ,KAAK,KAAK,CAAC,EACzB,OAAO,IAAI,SAASA,EAAM,OAAQA,EAAM,WAAYA,EAAM,UAAU,EAAE,UAAU,EAAG,EAAI,CACzF,CAcA,gBAAyB,CACvB,IAAMA,EAAQ,KAAK,KAAK,CAAC,EACzB,OAAO,IAAI,SAASA,EAAM,OAAQA,EAAM,WAAYA,EAAM,UAAU,EAAE,UAAU,EAAG,EAAI,CACzF,CAcA,gBAAyB,CACvB,IAAMK,EAAM,KAAK,eAAe,EAC1BC,EAAO,KAAK,eAAe,EAGjC,OAAO,OAAQ,OAAOA,CAAI,GAAK,OAAO,EAAE,EAAK,OAAOD,CAAG,CAAC,CAC1D,CAUA,iBAA2B,CACzB,IAAMA,EAAM,KAAK,eAAe,EAC1BC,EAAO,KAAK,eAAe,EAGjC,OAAO,OAAQA,GAAQ,OAAO,EAAE,EAAKD,CAAG,CAC1C,CAWA,iBAA2B,CACzB,IAAMA,EAAM,KAAK,gBAAgB,EAC3BC,EAAO,KAAK,gBAAgB,EAGlC,OAAO,OAAQA,GAAQ,OAAO,GAAG,EAAKD,CAAG,CAC3C,CAUA,eAAwB,CACtB,IAAML,EAAQ,KAAK,KAAK,CAAC,EACzB,OAAO,IAAI,SAASA,EAAM,OAAQA,EAAM,WAAYA,EAAM,UAAU,EAAE,QAAQ,CAAC,CACjF,CAUA,gBAAyB,CACvB,IAAMA,EAAQ,KAAK,KAAK,CAAC,EACzB,OAAO,IAAI,SAASA,EAAM,OAAQA,EAAM,WAAYA,EAAM,UAAU,EAAE,SAAS,EAAG,EAAI,CACxF,CAUA,gBAAyB,CACvB,IAAMA,EAAQ,KAAK,KAAK,CAAC,EACzB,OAAO,IAAI,SAASA,EAAM,OAAQA,EAAM,WAAYA,EAAM,UAAU,EAAE,SAAS,EAAG,EAAI,CACxF,CAUA,gBAAyB,CACvB,IAAMK,EAAM,KAAK,eAAe,EAC1BC,EAAO,KAAK,eAAe,EAG3BC,EAAW,OAAQ,OAAOD,CAAI,GAAK,OAAO,EAAE,EAAK,OAAOD,CAAG,CAAC,EAG5DG,EAAU,OAAO,CAAC,GAAK,OAAO,EAAE,EACtC,OAAID,GAAYC,EACPD,GAAY,OAAO,CAAC,GAAK,OAAO,EAAE,GAEpCA,CACT,CAUA,iBAA0B,CACxB,IAAMF,EAAM,KAAK,eAAe,EAC1BC,EAAO,KAAK,eAAe,EAG3BC,EAAW,OAAQD,GAAQ,OAAO,EAAE,EAAKD,CAAG,EAG5CG,EAAU,OAAO,CAAC,GAAK,OAAO,GAAG,EACvC,OAAID,GAAYC,EACPD,GAAY,OAAO,CAAC,GAAK,OAAO,GAAG,GAErCA,CACT,CAUA,iBAA0B,CACxB,IAAMF,EAAM,KAAK,gBAAgB,EAC3BC,EAAO,KAAK,gBAAgB,EAG5BC,EAAW,OAAQD,GAAQ,OAAO,GAAG,EAAKD,CAAG,EAG7CG,EAAU,OAAO,CAAC,GAAK,OAAO,GAAG,EACvC,OAAID,GAAYC,EACPD,GAAY,OAAO,CAAC,GAAK,OAAO,GAAG,GAErCA,CACT,CAaA,yBAAkC,CAChC,IAAIN,EAAgB,OAAO,CAAC,EACxBQ,EAAQ,EAENC,EAAoB,EACtBC,EAAY,EAEhB,KAAOA,EAAYD,GAAmB,CACpC,IAAME,EAAO,KAAK,cAAc,EAMhC,GALAD,GAAa,EAEbV,GAAS,OAAOW,EAAO,GAAI,GAAK,OAAOH,CAAK,EAGxCR,EAAQY,EACV,MAAM,IAAI,MAAM,qDAAqD,EAGvE,IAAKD,EAAO,OAAU,EACpB,MAGFH,GAAS,CACX,CAGA,GAAIE,IAAcD,GAAqBT,EAAQY,EAC7C,MAAM,IAAI,MAAM,qDAAqD,EAGvE,OAAO,OAAOZ,CAAK,CACrB,CAiBA,YAAea,EAA2B,CAGxC,OAAOA,EAAI,YAAY,IAAI,CAC7B,CA0BA,kBAAqBA,EAAkC,CACrD,IAAMf,EAAS,KAAK,wBAAwB,EACtCgB,EAAS,IAAI,MACnB,QAASC,EAAI,EAAGA,EAAIjB,EAAQiB,GAAK,EAC/BD,EAAO,KAAK,KAAK,YAAYD,CAAG,CAAC,EAEnC,OAAOC,CACT,CACF","names":["TEXT_DECODER","MAX_DESERIALIZE_BYTES_LENGTH","Deserializer","_Deserializer","data","hex","Hex","length","bytes","value","type","len","bool","low","high","unsigned","signBit","shift","MAX_ULEB128_BYTES","bytesRead","byte","MAX_U32_NUMBER","cls","vector","i"]}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=chunk-NECL5FCQ.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +0,0 @@
1
- var r=(e=>(e[e.Independent=0]="Independent",e[e.FollowsDomain=1]="FollowsDomain",e))(r||{}),t=(n=>(n.Expired="expired",n.InGracePeriod="in_grace_period",n.Active="active",n))(t||{});export{r as a,t as b};
2
- //# sourceMappingURL=chunk-NP2IAUME.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/types/ans.ts"],"sourcesContent":["import { type GetANSNameResponse } from \"./indexer\";\n\nexport type RawANSName = GetANSNameResponse[0];\n\n/**\n * The token standard for the ANS name. v1 is the original token standard, v2 is\n * the new token standard. v1 has been deprecated.\n */\nexport type AnsTokenStandard = \"v1\" | \"v2\";\n\n/**\n * Policy for determining how subdomains expire in relation to their parent domain.\n */\nexport enum SubdomainExpirationPolicy {\n /**\n * The subdomain will expire independently of the domain. The owner of the\n * domain can manually set when the subdomain expires.\n */\n Independent = 0,\n /**\n * The subdomain will expire at the same time as the domain.\n */\n FollowsDomain = 1,\n}\n\n/**\n * The status of the name.\n */\nexport enum ExpirationStatus {\n /**\n * The name no longer functions as a primary or target name. It is open to\n * being claimed by the public.\n */\n Expired = \"expired\",\n /**\n * The name is past it's expiration date, but only claimable by the current\n * owner of the name. It does not function as a primary or target name.\n */\n InGracePeriod = \"in_grace_period\",\n /**\n * The name is in good standing.\n */\n Active = \"active\",\n}\n\nexport interface AnsName extends RawANSName {\n /**\n * The domain name. ie \"aptos.apt\" would have a domain of \"aptos\"\n */\n domain: string;\n /**\n * The subdomain name, if the name is a subdomain. ie \"name.aptos.apt\" would have a subdomain of \"name\"\n */\n subdomain?: string;\n /**\n * The expiration timestamp of the name in milliseconds since epoch. Note, if\n * the name is not a subdomain, this will be the same as the domain expiration\n * timestamp.\n */\n expiration_timestamp: string;\n /**\n * The expiration timestamp of the domain in milliseconds since epoch.\n */\n domain_expiration_timestamp: string;\n /**\n * This is a derived date value. It takes into consideration if the name is a\n * subdomain and its expiration policy.\n */\n expiration: Date;\n\n /**\n * The status of the name's expiration.\n *\n * 1. Expired: The name has expired and is no longer resolvable.\n * 2. InGracePeriod: The name is within the grace period and is still\n * resolvable if it is renewed.\n * 3. Active: The name is active and is resolvable.\n *\n * @see {@link ExpirationStatus}\n */\n expiration_status: ExpirationStatus;\n /**\n * The address that the name points to. For example, if you send a transaction\n * to \"aptos.apt\" with a target address of \"0x1\", the registered_address will\n * be \"0x1\".\n */\n registered_address?: string;\n /**\n * The token standard for the name. See {@link AnsTokenStandard} for more details.\n */\n token_standard: AnsTokenStandard;\n /**\n * If the name is registered as a primary name for _any_ account. It is\n * possible to have multiple primary names returned in a single query.\n */\n is_primary: boolean;\n /**\n * The address of the wallet that owns the name.\n */\n owner_address?: string;\n /**\n * The expiration policy for the subdomain. See {@link SubdomainExpirationPolicy} for more details.\n */\n subdomain_expiration_policy: SubdomainExpirationPolicy;\n /**\n * Whether the name is in the renewable period. This incorporates leading time\n * before the name expires and the grace period after the name expires.\n */\n isInRenewablePeriod: boolean;\n}\n"],"mappings":"AAaO,IAAKA,OAKVA,IAAA,YAAc,GAAd,cAIAA,IAAA,cAAgB,GAAhB,gBATUA,OAAA,IAeAC,OAKVA,EAAA,QAAU,UAKVA,EAAA,cAAgB,kBAIhBA,EAAA,OAAS,SAdCA,OAAA","names":["SubdomainExpirationPolicy","ExpirationStatus"]}
@@ -1,2 +0,0 @@
1
- import{c as s}from"./chunk-J73MMLF7.mjs";import{y as i,z as m}from"./chunk-G5OONGWS.mjs";import{b as n}from"./chunk-QFUXOL34.mjs";async function b(t){let{aptosConfig:a,handle:e,data:o,options:r}=t;return(await n({aptosConfig:a,originMethod:"getTableItem",path:`tables/${e}/item`,params:{ledger_version:r?.ledgerVersion},body:o})).data}async function f(t){let{aptosConfig:a,options:e}=t,o={query:i,variables:{where_condition:e?.where,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await s({aptosConfig:a,query:o,originMethod:"getTableItemsData"})).table_items}async function T(t){let{aptosConfig:a,options:e}=t,o={query:m,variables:{where_condition:e?.where,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await s({aptosConfig:a,query:o,originMethod:"getTableItemsMetadata"})).table_metadatas}export{b as a,f as b,T as c};
2
- //# sourceMappingURL=chunk-NTREJSOS.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/internal/table.ts"],"sourcesContent":["import { AptosConfig } from \"../api/aptosConfig\";\nimport { postAptosFullNode } from \"../client\";\nimport {\n TableItemRequest,\n LedgerVersionArg,\n PaginationArgs,\n WhereArg,\n OrderByArg,\n GetTableItemsDataResponse,\n GetTableItemsMetadataResponse,\n} from \"../types\";\nimport { GetTableItemsDataQuery, GetTableItemsMetadataQuery } from \"../types/generated/operations\";\nimport { GetTableItemsData, GetTableItemsMetadata } from \"../types/generated/queries\";\nimport { TableItemsBoolExp, TableMetadatasBoolExp } from \"../types/generated/types\";\nimport { queryIndexer } from \"./general\";\n\n/**\n * Retrieves a specific item from a table in the Aptos blockchain.\n *\n * @param args - The arguments for retrieving the table item.\n * @param args.aptosConfig - The configuration for connecting to the Aptos blockchain.\n * @param args.handle - The identifier for the table from which to retrieve the item.\n * @param args.data - The request data for the table item.\n * @param args.options - Optional parameters for the request, including ledger version.\n * @group Implementation\n */\nexport async function getTableItem<T>(args: {\n aptosConfig: AptosConfig;\n handle: string;\n data: TableItemRequest;\n options?: LedgerVersionArg;\n}): Promise<T> {\n const { aptosConfig, handle, data, options } = args;\n const response = await postAptosFullNode<TableItemRequest, any>({\n aptosConfig,\n originMethod: \"getTableItem\",\n path: `tables/${handle}/item`,\n params: { ledger_version: options?.ledgerVersion },\n body: data,\n });\n return response.data as T;\n}\n\n/**\n * Retrieves table items data based on specified conditions and pagination options.\n *\n * @param args - The arguments for retrieving table items data.\n * @param args.aptosConfig - The configuration object for Aptos.\n * @param args.options - Optional parameters for pagination and filtering.\n * @param args.options.offset - The number of items to skip before starting to collect the result set.\n * @param args.options.limit - The maximum number of items to return.\n * @param args.options.where - Conditions to filter the table items.\n * @param args.options.orderBy - The criteria to sort the results.\n * @group Implementation\n */\nexport async function getTableItemsData(args: {\n aptosConfig: AptosConfig;\n options?: PaginationArgs & WhereArg<TableItemsBoolExp> & OrderByArg<GetTableItemsDataResponse[0]>;\n}) {\n const { aptosConfig, options } = args;\n\n const graphqlQuery = {\n query: GetTableItemsData,\n variables: {\n where_condition: options?.where,\n offset: options?.offset,\n limit: options?.limit,\n order_by: options?.orderBy,\n },\n };\n\n const data = await queryIndexer<GetTableItemsDataQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getTableItemsData\",\n });\n\n return data.table_items;\n}\n\n/**\n * Retrieves metadata for table items based on specified options.\n *\n * @param args - The arguments for retrieving table items metadata.\n * @param args.aptosConfig - The configuration object for Aptos.\n * @param args.options - Optional parameters for pagination and filtering.\n * @param args.options.offset - The number of items to skip before starting to collect the result set.\n * @param args.options.limit - The maximum number of items to return.\n * @param args.options.where - Conditions to filter the results.\n * @param args.options.orderBy - The order in which to return the results.\n * @returns A promise that resolves to an array of table metadata.\n * @group Implementation\n */\nexport async function getTableItemsMetadata(args: {\n aptosConfig: AptosConfig;\n options?: PaginationArgs & WhereArg<TableMetadatasBoolExp> & OrderByArg<GetTableItemsMetadataResponse[0]>;\n}): Promise<GetTableItemsMetadataResponse> {\n const { aptosConfig, options } = args;\n\n const graphqlQuery = {\n query: GetTableItemsMetadata,\n variables: {\n where_condition: options?.where,\n offset: options?.offset,\n limit: options?.limit,\n order_by: options?.orderBy,\n },\n };\n\n const data = await queryIndexer<GetTableItemsMetadataQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getTableItemsMetadata\",\n });\n\n return data.table_metadatas;\n}\n"],"mappings":"kIA0BA,eAAsBA,EAAgBC,EAKvB,CACb,GAAM,CAAE,YAAAC,EAAa,OAAAC,EAAQ,KAAAC,EAAM,QAAAC,CAAQ,EAAIJ,EAQ/C,OAPiB,MAAMK,EAAyC,CAC9D,YAAAJ,EACA,aAAc,eACd,KAAM,UAAUC,CAAM,QACtB,OAAQ,CAAE,eAAgBE,GAAS,aAAc,EACjD,KAAMD,CACR,CAAC,GACe,IAClB,CAcA,eAAsBG,EAAkBN,EAGrC,CACD,GAAM,CAAE,YAAAC,EAAa,QAAAG,CAAQ,EAAIJ,EAE3BO,EAAe,CACnB,MAAOC,EACP,UAAW,CACT,gBAAiBJ,GAAS,MAC1B,OAAQA,GAAS,OACjB,MAAOA,GAAS,MAChB,SAAUA,GAAS,OACrB,CACF,EAQA,OANa,MAAMK,EAAqC,CACtD,YAAAR,EACA,MAAOM,EACP,aAAc,mBAChB,CAAC,GAEW,WACd,CAeA,eAAsBG,EAAsBV,EAGD,CACzC,GAAM,CAAE,YAAAC,EAAa,QAAAG,CAAQ,EAAIJ,EAE3BO,EAAe,CACnB,MAAOI,EACP,UAAW,CACT,gBAAiBP,GAAS,MAC1B,OAAQA,GAAS,OACjB,MAAOA,GAAS,MAChB,SAAUA,GAAS,OACrB,CACF,EAQA,OANa,MAAMK,EAAyC,CAC1D,YAAAR,EACA,MAAOM,EACP,aAAc,uBAChB,CAAC,GAEW,eACd","names":["getTableItem","args","aptosConfig","handle","data","options","postAptosFullNode","getTableItemsData","graphqlQuery","GetTableItemsData","queryIndexer","getTableItemsMetadata","GetTableItemsMetadata"]}
@@ -1,2 +0,0 @@
1
- import{a as d}from"./chunk-ODNZJSOC.mjs";import{b as s}from"./chunk-TEI33TO7.mjs";import{b as r}from"./chunk-FDHHQUS3.mjs";async function g(o){let{aptosConfig:e,accountAddress:t}=o,{data:n}=await s({aptosConfig:e,originMethod:"getInfo",path:`accounts/${r.from(t).toString()}`});return n}async function f(o){return o.options?.ledgerVersion!==void 0?c(o):d(async()=>c(o),`module-${o.accountAddress}-${o.moduleName}`,1e3*60*5)()}async function c(o){let{aptosConfig:e,accountAddress:t,moduleName:n,options:i}=o,{data:u}=await s({aptosConfig:e,originMethod:"getModule",path:`accounts/${r.from(t).toString()}/module/${n}`,params:{ledger_version:i?.ledgerVersion}});return u}export{g as a,f as b};
2
- //# sourceMappingURL=chunk-OAK2V35A.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/internal/utils/utils.ts"],"sourcesContent":["import { AccountAddress, AccountAddressInput } from \"../../core/accountAddress\";\nimport { MoveModuleBytecode, LedgerVersionArg, AccountData } from \"../../types/types\";\nimport { AptosConfig } from \"../../api/aptosConfig\";\nimport { getAptosFullNode } from \"../../client\";\nimport { memoizeAsync } from \"../../utils/memoize\";\n\n/**\n * Retrieves account information for a specified account address.\n *\n * @param args - The arguments for retrieving account information.\n * @param args.aptosConfig - The configuration object for Aptos.\n * @param args.accountAddress - The address of the account to retrieve information for.\n * @group Implementation\n */\nexport async function getInfo(args: {\n aptosConfig: AptosConfig;\n accountAddress: AccountAddressInput;\n}): Promise<AccountData> {\n const { aptosConfig, accountAddress } = args;\n const { data } = await getAptosFullNode<{}, AccountData>({\n aptosConfig,\n originMethod: \"getInfo\",\n path: `accounts/${AccountAddress.from(accountAddress).toString()}`,\n });\n return data;\n}\n\n/**\n * Queries for a move module given an account address and module name.\n * This function can help you retrieve the module's ABI and other relevant information.\n *\n * @param args - The arguments for retrieving the module.\n * @param args.aptosConfig - The configuration for the Aptos client.\n * @param args.accountAddress - The account address in hex-encoded 32 byte format.\n * @param args.moduleName - The name of the module to retrieve.\n * @param args.options - Optional parameters for the request.\n * @param args.options.ledgerVersion - Specifies the ledger version of transactions. By default, the latest version will be used.\n * @returns The move module.\n * @group Implementation\n */\nexport async function getModule(args: {\n aptosConfig: AptosConfig;\n accountAddress: AccountAddressInput;\n moduleName: string;\n options?: LedgerVersionArg;\n}): Promise<MoveModuleBytecode> {\n // We don't memoize the account module by ledger version, as it's not a common use case, this would be handled\n // by the developer directly\n if (args.options?.ledgerVersion !== undefined) {\n return getModuleInner(args);\n }\n\n return memoizeAsync(\n async () => getModuleInner(args),\n `module-${args.accountAddress}-${args.moduleName}`,\n 1000 * 60 * 5, // 5 minutes\n )();\n}\n\n/**\n * Retrieves the bytecode of a specified module from a given account address.\n *\n * @param args - The parameters for retrieving the module bytecode.\n * @param args.aptosConfig - The configuration for connecting to the Aptos network.\n * @param args.accountAddress - The address of the account from which to retrieve the module.\n * @param args.moduleName - The name of the module to retrieve.\n * @param args.options - Optional parameters for specifying the ledger version.\n * @param args.options.ledgerVersion - The specific ledger version to query.\n * @group Implementation\n */\nasync function getModuleInner(args: {\n aptosConfig: AptosConfig;\n accountAddress: AccountAddressInput;\n moduleName: string;\n options?: LedgerVersionArg;\n}): Promise<MoveModuleBytecode> {\n const { aptosConfig, accountAddress, moduleName, options } = args;\n\n const { data } = await getAptosFullNode<{}, MoveModuleBytecode>({\n aptosConfig,\n originMethod: \"getModule\",\n path: `accounts/${AccountAddress.from(accountAddress).toString()}/module/${moduleName}`,\n params: { ledger_version: options?.ledgerVersion },\n });\n return data;\n}\n"],"mappings":"2HAcA,eAAsBA,EAAQC,EAGL,CACvB,GAAM,CAAE,YAAAC,EAAa,eAAAC,CAAe,EAAIF,EAClC,CAAE,KAAAG,CAAK,EAAI,MAAMC,EAAkC,CACvD,YAAAH,EACA,aAAc,UACd,KAAM,YAAYI,EAAe,KAAKH,CAAc,EAAE,SAAS,CAAC,EAClE,CAAC,EACD,OAAOC,CACT,CAeA,eAAsBG,EAAUN,EAKA,CAG9B,OAAIA,EAAK,SAAS,gBAAkB,OAC3BO,EAAeP,CAAI,EAGrBQ,EACL,SAAYD,EAAeP,CAAI,EAC/B,UAAUA,EAAK,cAAc,IAAIA,EAAK,UAAU,GAChD,IAAO,GAAK,CACd,EAAE,CACJ,CAaA,eAAeO,EAAeP,EAKE,CAC9B,GAAM,CAAE,YAAAC,EAAa,eAAAC,EAAgB,WAAAO,EAAY,QAAAC,CAAQ,EAAIV,EAEvD,CAAE,KAAAG,CAAK,EAAI,MAAMC,EAAyC,CAC9D,YAAAH,EACA,aAAc,YACd,KAAM,YAAYI,EAAe,KAAKH,CAAc,EAAE,SAAS,CAAC,WAAWO,CAAU,GACrF,OAAQ,CAAE,eAAgBC,GAAS,aAAc,CACnD,CAAC,EACD,OAAOP,CACT","names":["getInfo","args","aptosConfig","accountAddress","data","getAptosFullNode","AccountAddress","getModule","getModuleInner","memoizeAsync","moduleName","options"]}
@@ -1,2 +0,0 @@
1
- var m=new Set;function l(s){if(!s||typeof s!="string")throw new Error("Cache key must be a non-empty string");if(s.length<10)throw new Error(`Cache key "${s}" is too short. Keys should be at least 10 characters and include a namespace prefix.`);let e=s.match(/^([a-z]+-[a-z]+-)/i);e&&m.add(e[1])}var n=new Map,a=null;function u(){a===null&&(a=setInterval(()=>{let s=Date.now(),e=[];n.forEach((t,i)=>{t.ttlMs!==void 0&&s-t.timestamp>t.ttlMs&&e.push(i)}),e.forEach(t=>n.delete(t)),n.size===0&&a!==null&&(clearInterval(a),a=null)},6e4),typeof a=="object"&&"unref"in a&&a.unref())}function f(){if(n.size>=1e3){let s=Math.ceil(100),e=Array.from(n.entries()).sort((t,i)=>t[1].lastAccess-i[1].lastAccess);for(let t=0;t<s&&t<e.length;t+=1)n.delete(e[t][0])}}function d(s,e,t){return l(e),async(...i)=>{let r=Date.now();if(n.has(e)){let o=n.get(e);if(t===void 0||r-o.timestamp<=t)return o.lastAccess=r,o.value;n.delete(e)}let c=await s(...i);return f(),n.set(e,{value:c,timestamp:r,lastAccess:r,ttlMs:t}),u(),c}}function h(s,e,t){return l(e),(...i)=>{let r=Date.now();if(n.has(e)){let o=n.get(e);if(t===void 0||r-o.timestamp<=t)return o.lastAccess=r,o.value;n.delete(e)}let c=s(...i);return f(),n.set(e,{value:c,timestamp:r,lastAccess:r,ttlMs:t}),u(),c}}function p(){n.clear()}function E(){return n.size}export{d as a,h as b,p as c,E as d};
2
- //# sourceMappingURL=chunk-ODNZJSOC.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/memoize.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * Maximum number of entries to keep in the cache to prevent unbounded memory growth.\n * When this limit is exceeded, the oldest entries are evicted.\n */\nconst MAX_CACHE_SIZE = 1000;\n\n/**\n * Interval in milliseconds for periodic cleanup of expired cache entries.\n */\nconst CLEANUP_INTERVAL_MS = 60000; // 1 minute\n\n/**\n * Minimum required key length to help ensure uniqueness.\n * Keys should include a namespace prefix (e.g., \"module-abi-\", \"ledger-info-\").\n */\nconst MIN_KEY_LENGTH = 10;\n\n/**\n * Set of known cache key prefixes to help detect potential collisions.\n * Each caller should use a unique prefix.\n */\nconst knownKeyPrefixes = new Set<string>();\n\n/**\n * Validates a cache key for basic security requirements.\n * @param key - The cache key to validate\n * @throws Error if the key is invalid\n */\nfunction validateCacheKey(key: string): void {\n if (!key || typeof key !== \"string\") {\n throw new Error(\"Cache key must be a non-empty string\");\n }\n if (key.length < MIN_KEY_LENGTH) {\n throw new Error(\n `Cache key \"${key}\" is too short. Keys should be at least ${MIN_KEY_LENGTH} characters and include a namespace prefix.`,\n );\n }\n // Extract prefix (everything before the last hyphen or the first 10 chars)\n const prefixMatch = key.match(/^([a-z]+-[a-z]+-)/i);\n if (prefixMatch) {\n knownKeyPrefixes.add(prefixMatch[1]);\n }\n}\n\n/**\n * Cache entry structure with value, timestamp, and last access time for LRU eviction.\n */\ninterface CacheEntry<T> {\n value: T;\n timestamp: number;\n lastAccess: number;\n ttlMs?: number;\n}\n\n/**\n * The global cache Map shared across all functions with LRU eviction support.\n * SECURITY: All cache keys should include a unique namespace prefix to prevent\n * collisions between different caching use cases (e.g., \"module-abi-\", \"ledger-info-\").\n * @group Implementation\n * @category Utils\n */\nconst cache = new Map<string, CacheEntry<any>>();\n\n/**\n * Track whether cleanup interval is set up.\n */\nlet cleanupIntervalId: ReturnType<typeof setInterval> | null = null;\n\n/**\n * Sets up periodic cleanup of expired cache entries if not already running.\n * This prevents memory leaks from accumulating expired entries.\n */\nfunction ensureCleanupInterval(): void {\n if (cleanupIntervalId === null) {\n cleanupIntervalId = setInterval(() => {\n const now = Date.now();\n const keysToDelete: string[] = [];\n\n cache.forEach((entry, key) => {\n // Remove entries that have expired\n if (entry.ttlMs !== undefined && now - entry.timestamp > entry.ttlMs) {\n keysToDelete.push(key);\n }\n });\n\n keysToDelete.forEach((key) => cache.delete(key));\n\n // If cache is empty, stop the cleanup interval to avoid unnecessary overhead\n if (cache.size === 0 && cleanupIntervalId !== null) {\n clearInterval(cleanupIntervalId);\n cleanupIntervalId = null;\n }\n }, CLEANUP_INTERVAL_MS);\n\n // Ensure the interval doesn't prevent Node.js from exiting\n if (typeof cleanupIntervalId === \"object\" && \"unref\" in cleanupIntervalId) {\n cleanupIntervalId.unref();\n }\n }\n}\n\n/**\n * Evicts the least recently used entries when cache exceeds maximum size.\n */\nfunction evictIfNeeded(): void {\n if (cache.size >= MAX_CACHE_SIZE) {\n // Find and remove the least recently accessed entries (remove ~10% of cache)\n const entriesToRemove = Math.ceil(MAX_CACHE_SIZE * 0.1);\n const entries = Array.from(cache.entries()).sort((a, b) => a[1].lastAccess - b[1].lastAccess);\n\n for (let i = 0; i < entriesToRemove && i < entries.length; i += 1) {\n cache.delete(entries[i][0]);\n }\n }\n}\n\n/**\n * A memoize higher-order function to cache the response of an async function.\n * This function helps to improve performance by avoiding repeated calls to the same async function with the same arguments\n * within a specified time-to-live (TTL).\n *\n * Features:\n * - LRU eviction when cache exceeds MAX_CACHE_SIZE entries\n * - Periodic cleanup of expired entries to prevent memory leaks\n *\n * @param func The async function to cache the result of.\n * @param key The cache key used to store the result.\n * @param ttlMs The time-to-live in milliseconds for cached data.\n * @returns The cached or latest result.\n * @group Implementation\n * @category Utils\n */\nexport function memoizeAsync<T>(\n func: (...args: any[]) => Promise<T>,\n key: string,\n ttlMs?: number,\n): (...args: any[]) => Promise<T> {\n // Validate key format on first call to catch misuse early\n validateCacheKey(key);\n\n return async (...args: any[]) => {\n const now = Date.now();\n\n // Check if the cached result exists and is within TTL\n if (cache.has(key)) {\n const entry = cache.get(key)!;\n if (ttlMs === undefined || now - entry.timestamp <= ttlMs) {\n // Update last access time for LRU\n entry.lastAccess = now;\n return entry.value;\n }\n // Entry expired, remove it\n cache.delete(key);\n }\n\n // If not cached or TTL expired, compute the result\n const result = await func(...args);\n\n // Evict old entries if needed before adding new one\n evictIfNeeded();\n\n // Cache the result with a timestamp\n cache.set(key, { value: result, timestamp: now, lastAccess: now, ttlMs });\n\n // Ensure cleanup is running\n ensureCleanupInterval();\n\n return result;\n };\n}\n\n/**\n * Caches the result of a function call to improve performance on subsequent calls with the same arguments.\n *\n * Features:\n * - LRU eviction when cache exceeds MAX_CACHE_SIZE entries\n * - Periodic cleanup of expired entries to prevent memory leaks\n *\n * @param key - The key to cache on, all accesses by this key will return the cached value.\n * @param func - The function whose result will be cached.\n * @param ttlMs - The time-to-live in milliseconds for cached data.\n * @returns A memoized version of the provided function that returns the cached result if available and within TTL.\n * @group Implementation\n * @category Utils\n */\nexport function memoize<T>(func: (...args: any[]) => T, key: string, ttlMs?: number): (...args: any[]) => T {\n // Validate key format on first call to catch misuse early\n validateCacheKey(key);\n\n return (...args: any[]) => {\n const now = Date.now();\n\n // Check if the cached result exists and is within TTL\n if (cache.has(key)) {\n const entry = cache.get(key)!;\n if (ttlMs === undefined || now - entry.timestamp <= ttlMs) {\n // Update last access time for LRU\n entry.lastAccess = now;\n return entry.value;\n }\n // Entry expired, remove it\n cache.delete(key);\n }\n\n // If not cached or TTL expired, compute the result\n const result = func(...args);\n\n // Evict old entries if needed before adding new one\n evictIfNeeded();\n\n // Cache the result with a timestamp\n cache.set(key, { value: result, timestamp: now, lastAccess: now, ttlMs });\n\n // Ensure cleanup is running\n ensureCleanupInterval();\n\n return result;\n };\n}\n\n/**\n * Clears all entries from the memoization cache.\n * Useful for testing or when you need to force fresh data.\n * @group Implementation\n * @category Utils\n */\nexport function clearMemoizeCache(): void {\n cache.clear();\n}\n\n/**\n * Returns the current size of the memoization cache.\n * Useful for monitoring and debugging.\n * @group Implementation\n * @category Utils\n */\nexport function getMemoizeCacheSize(): number {\n return cache.size;\n}\n"],"mappings":"AAwBA,IAAMA,EAAmB,IAAI,IAO7B,SAASC,EAAiBC,EAAmB,CAC3C,GAAI,CAACA,GAAO,OAAOA,GAAQ,SACzB,MAAM,IAAI,MAAM,sCAAsC,EAExD,GAAIA,EAAI,OAAS,GACf,MAAM,IAAI,MACR,cAAcA,CAAG,uFACnB,EAGF,IAAMC,EAAcD,EAAI,MAAM,oBAAoB,EAC9CC,GACFH,EAAiB,IAAIG,EAAY,CAAC,CAAC,CAEvC,CAmBA,IAAMC,EAAQ,IAAI,IAKdC,EAA2D,KAM/D,SAASC,GAA8B,CACjCD,IAAsB,OACxBA,EAAoB,YAAY,IAAM,CACpC,IAAME,EAAM,KAAK,IAAI,EACfC,EAAyB,CAAC,EAEhCJ,EAAM,QAAQ,CAACK,EAAOP,IAAQ,CAExBO,EAAM,QAAU,QAAaF,EAAME,EAAM,UAAYA,EAAM,OAC7DD,EAAa,KAAKN,CAAG,CAEzB,CAAC,EAEDM,EAAa,QAASN,GAAQE,EAAM,OAAOF,CAAG,CAAC,EAG3CE,EAAM,OAAS,GAAKC,IAAsB,OAC5C,cAAcA,CAAiB,EAC/BA,EAAoB,KAExB,EAAG,GAAmB,EAGlB,OAAOA,GAAsB,UAAY,UAAWA,GACtDA,EAAkB,MAAM,EAG9B,CAKA,SAASK,GAAsB,CAC7B,GAAIN,EAAM,MAAQ,IAAgB,CAEhC,IAAMO,EAAkB,KAAK,KAAK,GAAoB,EAChDC,EAAU,MAAM,KAAKR,EAAM,QAAQ,CAAC,EAAE,KAAK,CAACS,EAAGC,IAAMD,EAAE,CAAC,EAAE,WAAaC,EAAE,CAAC,EAAE,UAAU,EAE5F,QAASC,EAAI,EAAGA,EAAIJ,GAAmBI,EAAIH,EAAQ,OAAQG,GAAK,EAC9DX,EAAM,OAAOQ,EAAQG,CAAC,EAAE,CAAC,CAAC,CAE9B,CACF,CAkBO,SAASC,EACdC,EACAf,EACAgB,EACgC,CAEhC,OAAAjB,EAAiBC,CAAG,EAEb,SAAUiB,IAAgB,CAC/B,IAAMZ,EAAM,KAAK,IAAI,EAGrB,GAAIH,EAAM,IAAIF,CAAG,EAAG,CAClB,IAAMO,EAAQL,EAAM,IAAIF,CAAG,EAC3B,GAAIgB,IAAU,QAAaX,EAAME,EAAM,WAAaS,EAElD,OAAAT,EAAM,WAAaF,EACZE,EAAM,MAGfL,EAAM,OAAOF,CAAG,CAClB,CAGA,IAAMkB,EAAS,MAAMH,EAAK,GAAGE,CAAI,EAGjC,OAAAT,EAAc,EAGdN,EAAM,IAAIF,EAAK,CAAE,MAAOkB,EAAQ,UAAWb,EAAK,WAAYA,EAAK,MAAAW,CAAM,CAAC,EAGxEZ,EAAsB,EAEfc,CACT,CACF,CAgBO,SAASC,EAAWJ,EAA6Bf,EAAagB,EAAuC,CAE1G,OAAAjB,EAAiBC,CAAG,EAEb,IAAIiB,IAAgB,CACzB,IAAMZ,EAAM,KAAK,IAAI,EAGrB,GAAIH,EAAM,IAAIF,CAAG,EAAG,CAClB,IAAMO,EAAQL,EAAM,IAAIF,CAAG,EAC3B,GAAIgB,IAAU,QAAaX,EAAME,EAAM,WAAaS,EAElD,OAAAT,EAAM,WAAaF,EACZE,EAAM,MAGfL,EAAM,OAAOF,CAAG,CAClB,CAGA,IAAMkB,EAASH,EAAK,GAAGE,CAAI,EAG3B,OAAAT,EAAc,EAGdN,EAAM,IAAIF,EAAK,CAAE,MAAOkB,EAAQ,UAAWb,EAAK,WAAYA,EAAK,MAAAW,CAAM,CAAC,EAGxEZ,EAAsB,EAEfc,CACT,CACF,CAQO,SAASE,GAA0B,CACxClB,EAAM,MAAM,CACd,CAQO,SAASmB,GAA8B,CAC5C,OAAOnB,EAAM,IACf","names":["knownKeyPrefixes","validateCacheKey","key","prefixMatch","cache","cleanupIntervalId","ensureCleanupInterval","now","keysToDelete","entry","evictIfNeeded","entriesToRemove","entries","a","b","i","memoizeAsync","func","ttlMs","args","result","memoize","clearMemoizeCache","getMemoizeCacheSize"]}
@@ -1,2 +0,0 @@
1
- var s={mainnet:"https://api.mainnet.aptoslabs.com/v1/graphql",testnet:"https://api.testnet.aptoslabs.com/v1/graphql",devnet:"https://api.devnet.aptoslabs.com/v1/graphql",shelbynet:"https://api.shelbynet.shelby.xyz/v1/graphql",netna:"https://api.netna.staging.aptoslabs.com/v1/graphql",local:"http://127.0.0.1:8090/v1/graphql"},p={mainnet:"https://api.mainnet.aptoslabs.com/v1",testnet:"https://api.testnet.aptoslabs.com/v1",devnet:"https://api.devnet.aptoslabs.com/v1",shelbynet:"https://api.shelbynet.shelby.xyz/v1",netna:"https://api.netna.staging.aptoslabs.com/v1",local:"http://127.0.0.1:8080/v1"},a={devnet:"https://faucet.devnet.aptoslabs.com",shelbynet:"https://faucet.shelbynet.shelby.xyz",netna:"https://faucet-dev-netna-us-central1-410192433417.us-central1.run.app",local:"http://127.0.0.1:8081"},n={mainnet:"https://api.mainnet.aptoslabs.com/keyless/pepper/v0",testnet:"https://api.testnet.aptoslabs.com/keyless/pepper/v0",devnet:"https://api.devnet.aptoslabs.com/keyless/pepper/v0",shelbynet:"https://api.shelbynet.aptoslabs.com/keyless/pepper/v0",netna:"https://api.devnet.aptoslabs.com/keyless/pepper/v0",local:"https://api.devnet.aptoslabs.com/keyless/pepper/v0"},o={mainnet:"https://api.mainnet.aptoslabs.com/keyless/prover/v0",testnet:"https://api.testnet.aptoslabs.com/keyless/prover/v0",devnet:"https://api.devnet.aptoslabs.com/keyless/prover/v0",shelbynet:"https://api.shelbynet.aptoslabs.com/keyless/prover/v0",netna:"https://api.devnet.aptoslabs.com/keyless/prover/v0",local:"https://api.devnet.aptoslabs.com/keyless/prover/v0"},e=(t=>(t.MAINNET="mainnet",t.TESTNET="testnet",t.DEVNET="devnet",t.SHELBYNET="shelbynet",t.NETNA="netna",t.LOCAL="local",t.CUSTOM="custom",t))(e||{}),l={mainnet:1,testnet:2,local:4},r={mainnet:"mainnet",testnet:"testnet",devnet:"devnet",shelbynet:"shelbynet",netna:"netna",local:"local",custom:"custom"};export{s as a,p as b,a as c,n as d,o as e,e as f,l as g,r as h};
2
- //# sourceMappingURL=chunk-P5HCJN3A.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/apiEndpoints.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * @group Implementation\n * @category Network\n */\nexport const NetworkToIndexerAPI: Record<string, string> = {\n mainnet: \"https://api.mainnet.aptoslabs.com/v1/graphql\",\n testnet: \"https://api.testnet.aptoslabs.com/v1/graphql\",\n devnet: \"https://api.devnet.aptoslabs.com/v1/graphql\",\n shelbynet: \"https://api.shelbynet.shelby.xyz/v1/graphql\",\n netna: \"https://api.netna.staging.aptoslabs.com/v1/graphql\",\n local: \"http://127.0.0.1:8090/v1/graphql\",\n};\n\n/**\n * @group Implementation\n * @category Network\n */\nexport const NetworkToNodeAPI: Record<string, string> = {\n mainnet: \"https://api.mainnet.aptoslabs.com/v1\",\n testnet: \"https://api.testnet.aptoslabs.com/v1\",\n devnet: \"https://api.devnet.aptoslabs.com/v1\",\n shelbynet: \"https://api.shelbynet.shelby.xyz/v1\",\n netna: \"https://api.netna.staging.aptoslabs.com/v1\",\n local: \"http://127.0.0.1:8080/v1\",\n};\n\n/**\n * @group Implementation\n * @category Network\n */\nexport const NetworkToFaucetAPI: Record<string, string> = {\n devnet: \"https://faucet.devnet.aptoslabs.com\",\n shelbynet: \"https://faucet.shelbynet.shelby.xyz\",\n netna: \"https://faucet-dev-netna-us-central1-410192433417.us-central1.run.app\",\n local: \"http://127.0.0.1:8081\",\n};\n\n/**\n * @group Implementation\n * @category Network\n */\nexport const NetworkToPepperAPI: Record<string, string> = {\n mainnet: \"https://api.mainnet.aptoslabs.com/keyless/pepper/v0\",\n testnet: \"https://api.testnet.aptoslabs.com/keyless/pepper/v0\",\n devnet: \"https://api.devnet.aptoslabs.com/keyless/pepper/v0\",\n shelbynet: \"https://api.shelbynet.aptoslabs.com/keyless/pepper/v0\",\n netna: \"https://api.devnet.aptoslabs.com/keyless/pepper/v0\",\n // Use the devnet service for local environment\n local: \"https://api.devnet.aptoslabs.com/keyless/pepper/v0\",\n};\n\n/**\n * @group Implementation\n * @category Network\n */\nexport const NetworkToProverAPI: Record<string, string> = {\n mainnet: \"https://api.mainnet.aptoslabs.com/keyless/prover/v0\",\n testnet: \"https://api.testnet.aptoslabs.com/keyless/prover/v0\",\n devnet: \"https://api.devnet.aptoslabs.com/keyless/prover/v0\",\n shelbynet: \"https://api.shelbynet.aptoslabs.com/keyless/prover/v0\",\n netna: \"https://api.devnet.aptoslabs.com/keyless/prover/v0\",\n // Use the devnet service for local environment\n local: \"https://api.devnet.aptoslabs.com/keyless/prover/v0\",\n};\n\n/**\n * Different network environments for connecting to services, ranging from production to development setups.\n * @group Implementation\n * @category Network\n */\nexport enum Network {\n MAINNET = \"mainnet\",\n TESTNET = \"testnet\",\n DEVNET = \"devnet\",\n SHELBYNET = \"shelbynet\",\n NETNA = \"netna\",\n LOCAL = \"local\",\n CUSTOM = \"custom\",\n}\n\n/**\n * @group Implementation\n * @category Network\n */\nexport const NetworkToChainId: Record<string, number> = {\n mainnet: 1,\n testnet: 2,\n local: 4,\n};\n\n/**\n * @group Implementation\n * @category Network\n */\nexport const NetworkToNetworkName: Record<string, Network> = {\n mainnet: Network.MAINNET,\n testnet: Network.TESTNET,\n devnet: Network.DEVNET,\n shelbynet: Network.SHELBYNET,\n netna: Network.NETNA,\n local: Network.LOCAL,\n custom: Network.CUSTOM,\n};\n"],"mappings":"AAOO,IAAMA,EAA8C,CACzD,QAAS,+CACT,QAAS,+CACT,OAAQ,8CACR,UAAW,8CACX,MAAO,qDACP,MAAO,kCACT,EAMaC,EAA2C,CACtD,QAAS,uCACT,QAAS,uCACT,OAAQ,sCACR,UAAW,sCACX,MAAO,6CACP,MAAO,0BACT,EAMaC,EAA6C,CACxD,OAAQ,sCACR,UAAW,sCACX,MAAO,wEACP,MAAO,uBACT,EAMaC,EAA6C,CACxD,QAAS,sDACT,QAAS,sDACT,OAAQ,qDACR,UAAW,wDACX,MAAO,qDAEP,MAAO,oDACT,EAMaC,EAA6C,CACxD,QAAS,sDACT,QAAS,sDACT,OAAQ,qDACR,UAAW,wDACX,MAAO,qDAEP,MAAO,oDACT,EAOYC,OACVA,EAAA,QAAU,UACVA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,UAAY,YACZA,EAAA,MAAQ,QACRA,EAAA,MAAQ,QACRA,EAAA,OAAS,SAPCA,OAAA,IAcCC,EAA2C,CACtD,QAAS,EACT,QAAS,EACT,MAAO,CACT,EAMaC,EAAgD,CAC3D,QAAS,UACT,QAAS,UACT,OAAQ,SACR,UAAW,YACX,MAAO,QACP,MAAO,QACP,OAAQ,QACV","names":["NetworkToIndexerAPI","NetworkToNodeAPI","NetworkToFaucetAPI","NetworkToPepperAPI","NetworkToProverAPI","Network","NetworkToChainId","NetworkToNetworkName"]}
@@ -1,2 +0,0 @@
1
- import{a as i}from"./chunk-66F7RP7K.mjs";var r=class a extends i{constructor(e){super(),this.chainId=e}serialize(e){e.serializeU8(this.chainId)}static deserialize(e){let s=e.deserializeU8();return new a(s)}};export{r as a};
2
- //# sourceMappingURL=chunk-POQ4FT4E.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/transactions/instances/chainId.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Serializer, Serializable } from \"../../bcs/serializer\";\nimport { Deserializer } from \"../../bcs/deserializer\";\n\n/**\n * Represents a ChainId that can be serialized and deserialized.\n *\n * @extends Serializable\n * @group Implementation\n * @category Transactions\n */\nexport class ChainId extends Serializable {\n public readonly chainId: number;\n\n /**\n * Initializes a new instance of the class with the specified chain ID.\n *\n * @param chainId - The ID of the blockchain network to be used.\n * @group Implementation\n * @category Transactions\n */\n constructor(chainId: number) {\n super();\n this.chainId = chainId;\n }\n\n /**\n * Serializes the current object using the provided serializer.\n * This function helps in converting the object 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 Transactions\n */\n serialize(serializer: Serializer): void {\n serializer.serializeU8(this.chainId);\n }\n\n /**\n * Deserializes a ChainId from the provided deserializer.\n * This function allows you to reconstruct a ChainId object from serialized data.\n *\n * @param deserializer - The deserializer instance used to read the serialized data.\n * @group Implementation\n * @category Transactions\n */\n static deserialize(deserializer: Deserializer): ChainId {\n const chainId = deserializer.deserializeU8();\n return new ChainId(chainId);\n }\n}\n"],"mappings":"yCAaO,IAAMA,EAAN,MAAMC,UAAgBC,CAAa,CAUxC,YAAYC,EAAiB,CAC3B,MAAM,EACN,KAAK,QAAUA,CACjB,CAUA,UAAUC,EAA8B,CACtCA,EAAW,YAAY,KAAK,OAAO,CACrC,CAUA,OAAO,YAAYC,EAAqC,CACtD,IAAMF,EAAUE,EAAa,cAAc,EAC3C,OAAO,IAAIJ,EAAQE,CAAO,CAC5B,CACF","names":["ChainId","_ChainId","Serializable","chainId","serializer","deserializer"]}
@@ -1,2 +0,0 @@
1
- var u=(o=>(o.JSON="application/json",o.BCS="application/x-bcs",o.BCS_SIGNED_TRANSACTION="application/x.aptos.signed_transaction+bcs",o.BCS_VIEW_FUNCTION="application/x.aptos.view_function+bcs",o))(u||{}),a=(e=>(e[e.Bool=0]="Bool",e[e.U8=1]="U8",e[e.U64=2]="U64",e[e.U128=3]="U128",e[e.Address=4]="Address",e[e.Signer=5]="Signer",e[e.Vector=6]="Vector",e[e.Struct=7]="Struct",e[e.U16=8]="U16",e[e.U32=9]="U32",e[e.U256=10]="U256",e[e.I8=11]="I8",e[e.I16=12]="I16",e[e.I32=13]="I32",e[e.I64=14]="I64",e[e.I128=15]="I128",e[e.I256=16]="I256",e[e.Reference=254]="Reference",e[e.Generic=255]="Generic",e))(a||{}),d=(n=>(n[n.U8=0]="U8",n[n.U64=1]="U64",n[n.U128=2]="U128",n[n.Address=3]="Address",n[n.U8Vector=4]="U8Vector",n[n.Bool=5]="Bool",n[n.U16=6]="U16",n[n.U32=7]="U32",n[n.U256=8]="U256",n[n.Serialized=9]="Serialized",n[n.I8=10]="I8",n[n.I16=11]="I16",n[n.I32=12]="I32",n[n.I64=13]="I64",n[n.I128=14]="I128",n[n.I256=15]="I256",n))(d||{}),l=(o=>(o[o.Script=0]="Script",o[o.EntryFunction=2]="EntryFunction",o[o.Multisig=3]="Multisig",o[o.Payload=4]="Payload",o))(l||{}),c=(i=>(i[i.V1=0]="V1",i))(c||{}),_=(p=>(p[p.Script=0]="Script",p[p.EntryFunction=1]="EntryFunction",p[p.Empty=2]="Empty",p))(_||{}),x=(i=>(i[i.V1=0]="V1",i))(x||{}),h=(g=>(g[g.MultiAgentTransaction=0]="MultiAgentTransaction",g[g.FeePayerTransaction=1]="FeePayerTransaction",g))(h||{}),v=(t=>(t[t.Ed25519=0]="Ed25519",t[t.MultiEd25519=1]="MultiEd25519",t[t.MultiAgent=2]="MultiAgent",t[t.FeePayer=3]="FeePayer",t[t.SingleSender=4]="SingleSender",t))(v||{}),M=(r=>(r[r.Ed25519=0]="Ed25519",r[r.MultiEd25519=1]="MultiEd25519",r[r.SingleKey=2]="SingleKey",r[r.MultiKey=3]="MultiKey",r[r.NoAccountAuthenticator=4]="NoAccountAuthenticator",r[r.Abstraction=5]="Abstraction",r))(M||{}),b=(p=>(p.Ed25519="ed25519",p.Secp256k1="secp256k1",p.Secp256r1="secp256r1",p))(b||{}),m=(r=>(r[r.Ed25519=0]="Ed25519",r[r.Secp256k1=1]="Secp256k1",r[r.Secp256r1=2]="Secp256r1",r[r.Keyless=3]="Keyless",r[r.FederatedKeyless=4]="FederatedKeyless",r[r.SlhDsaSha2_128s=5]="SlhDsaSha2_128s",r))(m||{});function G(s){switch(s){case 0:return"ed25519";case 1:return"secp256k1";case 2:return"secp256r1";case 3:return"keyless";case 4:return"federated_keyless";case 5:return"slh_dsa_sha2_128s";default:throw new Error("Unknown public key variant")}}var R=(t=>(t[t.Ed25519=0]="Ed25519",t[t.Secp256k1=1]="Secp256k1",t[t.WebAuthn=2]="WebAuthn",t[t.Keyless=3]="Keyless",t[t.SlhDsaSha2_128s=4]="SlhDsaSha2_128s",t))(R||{}),S=(i=>(i[i.Ed25519=0]="Ed25519",i))(S||{}),k=(i=>(i[i.Ed25519=0]="Ed25519",i))(k||{}),f=(i=>(i[i.ZkProof=0]="ZkProof",i))(f||{}),C=(i=>(i[i.Groth16=0]="Groth16",i))(C||{}),I=(y=>(y.Pending="pending_transaction",y.User="user_transaction",y.Genesis="genesis_transaction",y.BlockMetadata="block_metadata_transaction",y.StateCheckpoint="state_checkpoint_transaction",y.Validator="validator_transaction",y.BlockEpilogue="block_epilogue_transaction",y))(I||{});function O(s){return s.type==="pending_transaction"}function N(s){return s.type==="user_transaction"}function P(s){return s.type==="genesis_transaction"}function D(s){return s.type==="block_metadata_transaction"}function A(s){return s.type==="state_checkpoint_transaction"}function q(s){return s.type==="validator_transaction"}function w(s){return s.type==="block_epilogue_transaction"}function H(s){return"signature"in s&&s.type==="ed25519_signature"}function j(s){return"signature"in s&&s.signature==="secp256k1_ecdsa_signature"}function L(s){return s.type==="multi_agent_signature"}function K(s){return s.type==="fee_payer_signature"}function $(s){return s.type==="multi_ed25519_signature"}function z(s){return s.type==="single_sender"}var E=(p=>(p.PRIVATE="private",p.PUBLIC="public",p.FRIEND="friend",p))(E||{}),T=(o=>(o.STORE="store",o.DROP="drop",o.KEY="key",o.COPY="copy",o))(T||{}),U=(g=>(g.VALIDATOR="validator",g.FULL_NODE="full_node",g))(U||{}),W=(o=>(o[o.Ed25519=0]="Ed25519",o[o.MultiEd25519=1]="MultiEd25519",o[o.SingleKey=2]="SingleKey",o[o.MultiKey=3]="MultiKey",o))(W||{}),F=(g=>(g[g.Ed25519=0]="Ed25519",g[g.Secp256k1Ecdsa=2]="Secp256k1Ecdsa",g))(F||{}),B=(t=>(t[t.DeriveAuid=251]="DeriveAuid",t[t.DeriveObjectAddressFromObject=252]="DeriveObjectAddressFromObject",t[t.DeriveObjectAddressFromGuid=253]="DeriveObjectAddressFromGuid",t[t.DeriveObjectAddressFromSeed=254]="DeriveObjectAddressFromSeed",t[t.DeriveResourceAccountAddress=255]="DeriveResourceAccountAddress",t))(B||{});export{u as a,a as b,d as c,l as d,c as e,_ as f,x as g,h,v as i,M as j,b as k,m as l,G as m,R as n,S as o,k as p,f as q,C as r,I as s,O as t,N as u,P as v,D as w,A as x,q as y,w as z,H as A,j as B,L as C,K as D,$ as E,z as F,E as G,T as H,U as I,W as J,F as K,B as L};
2
- //# sourceMappingURL=chunk-Q5ESW36C.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/types/types.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { AptosConfig } from \"../api\";\nimport { InputSubmitTransactionData } from \"../transactions\";\nimport { Network } from \"../utils/apiEndpoints\";\nimport { OrderBy, TokenStandard } from \"./indexer\";\n\n/**\n * Different MIME types used for data interchange in transactions and responses.\n */\nexport enum MimeType {\n /**\n * JSON representation, used for transaction submission and accept type JSON output\n */\n JSON = \"application/json\",\n /**\n * BCS representation, used for accept type BCS output\n */\n BCS = \"application/x-bcs\",\n /**\n * BCS representation, used for transaction submission in BCS input\n */\n BCS_SIGNED_TRANSACTION = \"application/x.aptos.signed_transaction+bcs\",\n BCS_VIEW_FUNCTION = \"application/x.aptos.view_function+bcs\",\n}\n\n/**\n * Hexadecimal data input for functions, supporting both string and Uint8Array formats.\n */\nexport type HexInput = string | Uint8Array;\n\n/**\n * Variants of type tags used in the system, encompassing various data types and structures.\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/third_party/move/move-core/types/src/language_storage.rs#L27}\n */\nexport enum TypeTagVariants {\n Bool = 0,\n U8 = 1,\n U64 = 2,\n U128 = 3,\n Address = 4,\n Signer = 5,\n Vector = 6,\n Struct = 7,\n U16 = 8,\n U32 = 9,\n U256 = 10,\n I8 = 11,\n I16 = 12,\n I32 = 13,\n I64 = 14,\n I128 = 15,\n I256 = 16,\n Reference = 254, // This is specifically a placeholder and does not represent a real type\n Generic = 255, // This is specifically a placeholder and does not represent a real type\n}\n\n/**\n * Variants of script transaction arguments used in Rust, encompassing various data types for transaction processing.\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/third_party/move/move-core/types/src/transaction_argument.rs#L11}\n */\nexport enum ScriptTransactionArgumentVariants {\n U8 = 0,\n U64 = 1,\n U128 = 2,\n Address = 3,\n U8Vector = 4,\n Bool = 5,\n U16 = 6,\n U32 = 7,\n U256 = 8,\n Serialized = 9,\n // NOTE: Added in bytecode version v9, do not reorder!\n I8 = 10,\n I16 = 11,\n I32 = 12,\n I64 = 13,\n I128 = 14,\n I256 = 15,\n}\n\n/**\n * The payload for various transaction types in the system.\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/mod.rs#L478}\n */\nexport enum TransactionPayloadVariants {\n Script = 0,\n EntryFunction = 2,\n Multisig = 3,\n Payload = 4,\n}\n\n/**\n * The inner payload type to support orderless transactions and all future transaction types.\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/mod.rs#L478}\n */\nexport enum TransactionInnerPayloadVariants {\n V1 = 0,\n}\n\n/**\n * Executable types for transactions, which can be either a script or an entry function.\n *\n * Empty is reserved for Multisig voting transactions, which do not have an executable payload.\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/mod.rs#L685}\n */\nexport enum TransactionExecutableVariants {\n Script = 0,\n EntryFunction = 1,\n Empty = 2,\n}\n\n/**\n * Variants of transaction extra configurations, which can include additional settings or parameters.\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/mod.rs#L737}\n */\nexport enum TransactionExtraConfigVariants {\n V1 = 0,\n}\n\n/**\n * Variants of transactions used in the system.\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/mod.rs#L440}\n */\nexport enum TransactionVariants {\n MultiAgentTransaction = 0,\n FeePayerTransaction = 1,\n}\n\n/**\n * Variants of transaction authenticators used in the system.\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs#L44}\n */\nexport enum TransactionAuthenticatorVariant {\n Ed25519 = 0,\n MultiEd25519 = 1,\n MultiAgent = 2,\n FeePayer = 3,\n SingleSender = 4,\n}\n\n/**\n * Variants of account authenticators used in transactions.\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs#L414}\n */\nexport enum AccountAuthenticatorVariant {\n Ed25519 = 0,\n MultiEd25519 = 1,\n SingleKey = 2,\n MultiKey = 3,\n NoAccountAuthenticator = 4,\n Abstraction = 5,\n}\n\n/**\n * Variants of private keys that can comply with the AIP-80 standard.\n * {@link https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-80.md}\n */\nexport enum PrivateKeyVariants {\n Ed25519 = \"ed25519\",\n Secp256k1 = \"secp256k1\",\n Secp256r1 = \"secp256r1\",\n}\n\n/**\n * Variants of public keys used in cryptographic operations.\n */\nexport enum AnyPublicKeyVariant {\n Ed25519 = 0,\n Secp256k1 = 1,\n Secp256r1 = 2,\n Keyless = 3,\n FederatedKeyless = 4,\n /**\n * Post-quantum signature scheme (SLH-DSA-SHA2-128s).\n * Note: Full implementation not yet available in this SDK.\n */\n SlhDsaSha2_128s = 5,\n}\n\nexport function anyPublicKeyVariantToString(variant: AnyPublicKeyVariant): string {\n switch (variant) {\n case AnyPublicKeyVariant.Ed25519:\n return \"ed25519\";\n case AnyPublicKeyVariant.Secp256k1:\n return \"secp256k1\";\n case AnyPublicKeyVariant.Secp256r1:\n return \"secp256r1\";\n case AnyPublicKeyVariant.Keyless:\n return \"keyless\";\n case AnyPublicKeyVariant.FederatedKeyless:\n return \"federated_keyless\";\n case AnyPublicKeyVariant.SlhDsaSha2_128s:\n return \"slh_dsa_sha2_128s\";\n default:\n throw new Error(\"Unknown public key variant\");\n }\n}\n\n/**\n * Variants of signature types used for cryptographic operations.\n */\nexport enum AnySignatureVariant {\n Ed25519 = 0,\n Secp256k1 = 1,\n WebAuthn = 2,\n Keyless = 3,\n /**\n * Post-quantum signature scheme (SLH-DSA-SHA2-128s).\n * Note: Full implementation not yet available in this SDK.\n */\n SlhDsaSha2_128s = 4,\n}\n\n/**\n * Variants of ephemeral public keys used in cryptographic operations.\n */\nexport enum EphemeralPublicKeyVariant {\n Ed25519 = 0,\n}\n\n/**\n * Variants of ephemeral signatures used for secure communication.\n */\nexport enum EphemeralSignatureVariant {\n Ed25519 = 0,\n}\n\n/**\n * Variants of ephemeral certificates used in secure transactions.\n */\nexport enum EphemeralCertificateVariant {\n ZkProof = 0,\n}\n\n/**\n * Variants of zero-knowledge proofs used in cryptographic operations.\n */\nexport enum ZkpVariant {\n Groth16 = 0,\n}\n\n/**\n * BCS types\n */\nexport type Uint8 = number;\n\n/**\n * A 16-bit unsigned integer.\n */\nexport type Uint16 = number;\n\n/**\n * A 32-bit unsigned integer.\n */\nexport type Uint32 = number;\n\n/**\n * A 64-bit unsigned integer value.\n */\nexport type Uint64 = bigint;\n\n/**\n * A 128-bit unsigned integer used for precise arithmetic operations.\n */\nexport type Uint128 = bigint;\n\n/**\n * A 256-bit unsigned integer used for precise numerical calculations.\n */\nexport type Uint256 = bigint;\n\n/**\n * A signed 8-bit integer.\n */\nexport type Int8 = number;\n\n/**\n * A signed 16-bit integer.\n */\nexport type Int16 = number;\n\n/**\n * A signed 32-bit integer.\n */\nexport type Int32 = number;\n\n/**\n * A signed 64-bit integer.\n */\nexport type Int64 = bigint;\n\n/**\n * A signed 128-bit integer.\n */\nexport type Int128 = bigint;\n\n/**\n * A signed 256-bit integer.\n */\nexport type Int256 = bigint;\n\n/**\n * A number or a bigint value.\n */\nexport type AnyNumber = number | bigint;\n\n/**\n * Configuration options for initializing the SDK, allowing customization of its behavior and interaction with the Aptos network.\n */\nexport type AptosSettings = {\n readonly network?: Network;\n\n readonly fullnode?: string;\n\n readonly faucet?: string;\n\n readonly indexer?: string;\n\n readonly pepper?: string;\n\n readonly prover?: string;\n\n readonly clientConfig?: ClientConfig;\n\n readonly client?: Client;\n\n readonly fullnodeConfig?: FullNodeConfig;\n\n readonly indexerConfig?: IndexerConfig;\n\n readonly faucetConfig?: FaucetConfig;\n\n readonly transactionGenerationConfig?: TransactionGenerationConfig;\n\n readonly pluginSettings?: PluginSettings;\n};\n\n/**\n * Defines the parameters for paginating query results, including the starting position and maximum number of items to return.\n * @param offset Specifies the starting position of the query result. Default is 0.\n * @param limit Specifies the maximum number of items to return. Default is 25.\n */\nexport interface PaginationArgs {\n offset?: AnyNumber;\n limit?: number;\n}\n\n/**\n * Defines the parameters for paginating query results, including the starting position and maximum number of items to return.\n * @param cursor Specifies the starting position of the query result. Default is at the beginning if undefined. This is not a number and must come from the API.\n * @param limit Specifies the maximum number of items to return. Default is 25.\n */\nexport interface CursorPaginationArgs {\n cursor?: string;\n limit?: number;\n}\n\n/**\n * Represents the arguments for specifying a token standard.\n *\n * @param tokenStandard - Optional standard of the token.\n */\nexport interface TokenStandardArg {\n tokenStandard?: TokenStandard;\n}\n\nexport interface OrderByArg<T extends {}> {\n orderBy?: OrderBy<T>;\n}\n\nexport interface WhereArg<T extends {}> {\n where?: T;\n}\n\n/**\n * QUERY TYPES\n */\n\n/**\n * A configuration object for requests to the server, including API key, extra headers, and cookie handling options.\n *\n * Security Note: Consider implementing client-side rate limiting in your application to prevent\n * accidental API abuse. You can use libraries like 'bottleneck' or 'p-queue' to limit request rates.\n *\n * @example\n * ```typescript\n * import Bottleneck from 'bottleneck';\n *\n * // Create a limiter that allows 10 requests per second\n * const limiter = new Bottleneck({ minTime: 100, maxConcurrent: 5 });\n *\n * // Wrap your Aptos calls with the limiter\n * const result = await limiter.schedule(() => aptos.getAccountInfo({ accountAddress }));\n * ```\n */\nexport type ClientConfig = ClientHeadersType & {\n WITH_CREDENTIALS?: boolean;\n API_KEY?: string;\n http2?: boolean;\n};\n\n/**\n * A configuration object for a Fullnode, allowing for the inclusion of extra headers in requests.\n */\nexport type FullNodeConfig = ClientHeadersType;\n\n/**\n * An Indexer configuration object for sending requests with additional headers.\n */\nexport type IndexerConfig = ClientHeadersType;\n\n/**\n * A configuration object for a faucet, including optional authentication and headers for requests.\n */\nexport type FaucetConfig = ClientHeadersType & {\n AUTH_TOKEN?: string;\n};\n\n/**\n * A configuration object for default parameters for transaction generation.\n */\nexport type TransactionGenerationConfig = {\n defaultMaxGasAmount?: number;\n defaultTxnExpirySecFromNow?: number;\n};\n\n/**\n * General type definition for client headers.\n */\nexport type ClientHeadersType = {\n HEADERS?: Record<string, string | number | boolean>;\n};\n\n/**\n * Config for plugins. This can be used to override certain client behavior.\n */\nexport type PluginConfig = {\n /**\n * If given, this will be used for submitting transactions instead of the default\n * implementation (which submits transactions directly via a node).\n */\n TRANSACTION_SUBMITTER?: TransactionSubmitter;\n\n /**\n * If true, we won't use the TRANSACTION_SUBMITTER if set.\n */\n IGNORE_TRANSACTION_SUBMITTER?: boolean;\n};\n\nexport type PluginSettings = Omit<PluginConfig, \"IGNORE_TRANSACTION_SUBMITTER\">;\n\n/**\n * You can implement this interface and set it in {@link PluginSettings} when building a\n * client to override the default transaction submission behavior. This is useful if\n * you'd like to submit transactions via a gas station for example.\n *\n * @example\n * ```typescript\n * class MyGasStationClient implements TransactionSubmitter {\n * async submitTransaction(\n * args: { aptosConfig: AptosConfig } & InputSubmitTransactionData,\n * ): Promise<PendingTransactionResponse> {\n * // TODO: Implement the logic to submit the transaction to the gas station\n * }\n * }\n *\n * const network = Network.MAINNET;\n * const myGasStationClient = new MyGasStationClient(network);\n * const config = new AptosConfig({\n * network,\n * pluginConfig: {\n * transactionSubmitter: myGasStationClient,\n * },\n * });\n * const aptos = new Aptos(config);\n * ```\n */\nexport interface TransactionSubmitter {\n /**\n * Submit a transaction to the Aptos blockchain or something that will do it on your\n * behalf, for example a gas station. See the comments of {@link TransactionSubmitter} for more.\n *\n * @param args - The arguments for submitting the transaction.\n * @param args.aptosConfig - The configuration for connecting to the Aptos network.\n * @param args.transaction - The Aptos transaction data to be submitted.\n * @param args.senderAuthenticator - The account authenticator of the transaction sender.\n * @param args.secondarySignerAuthenticators - Optional. Authenticators for additional signers in a multi-signer transaction.\n * @param args.pluginParams - Optional. Additional parameters for the plugin.\n * @param args.transactionSubmitter - Optional. An override for the transaction submitter.\n *\n * @returns PendingTransactionResponse - The response containing the status of the submitted transaction.\n * @group Implementation\n */\n submitTransaction(\n args: {\n aptosConfig: AptosConfig;\n } & Omit<InputSubmitTransactionData, \"transactionSubmitter\">,\n ): Promise<PendingTransactionResponse>;\n}\n\n/**\n * Represents a client for making requests to a service provider.\n *\n * @param Req - The type of the request payload.\n * @param Res - The type of the response payload.\n */\nexport interface ClientRequest<Req> {\n url: string;\n method: \"GET\" | \"POST\";\n originMethod?: string;\n body?: Req;\n contentType?: string;\n params?: any;\n overrides?: ClientConfig & FullNodeConfig & IndexerConfig & FaucetConfig;\n headers?: Record<string, any>;\n http2?: boolean;\n}\n\nexport interface ClientResponse<Res> {\n status: number;\n statusText: string;\n data: Res;\n config?: any;\n request?: any;\n response?: any;\n headers?: any;\n}\n\nexport interface Client {\n /**\n * Sends a request to the specified URL with the given options.\n *\n * @param requestOptions - The options for the request.\n * @param requestOptions.url - The URL to send the request to.\n * @param requestOptions.method - The HTTP method to use, either \"GET\" or \"POST\".\n * @param requestOptions.path - An optional path to append to the URL.\n * @param requestOptions.body - The body of the request, applicable for POST requests.\n * @param requestOptions.contentType - The content type of the request body.\n * @param requestOptions.acceptType - The expected content type of the response.\n * @param requestOptions.params - Optional parameters to include in the request.\n * @param requestOptions.originMethod - An optional method to specify the origin of the request.\n * @param requestOptions.overrides - Optional configuration overrides for the request.\n */\n provider<Req, Res>(requestOptions: ClientRequest<Req>): Promise<ClientResponse<Res>>;\n}\n\n/**\n * The API request type\n *\n * @param url - the url to make the request to, i.e. https://fullnode.devnet.aptoslabs.com/v1\n * @param method - the request method \"GET\" | \"POST\"\n * @param endpoint (optional) - the endpoint to make the request to, i.e. transactions\n * @param body (optional) - the body of the request\n * @param contentType (optional) - the content type to set the `content-type` header to,\n * by default is set to `application/json`\n * @param params (optional) - query params to add to the request\n * @param originMethod (optional) - the local method the request came from\n * @param overrides (optional) - a `ClientConfig` object type to override request data\n */\nexport type AptosRequest = {\n url: string;\n method: \"GET\" | \"POST\";\n path?: string;\n body?: any;\n contentType?: string;\n acceptType?: string;\n params?: Record<string, string | AnyNumber | boolean | undefined>;\n originMethod?: string;\n overrides?: ClientConfig & FullNodeConfig & IndexerConfig & FaucetConfig;\n};\n\n/**\n * The API response type\n *\n * @param status - the response status. i.e. 200\n * @param statusText - the response message\n * @param data the response data\n * @param url the url the request was made to\n * @param headers the response headers\n * @param config (optional) - the request object\n * @param request (optional) - the request object\n */\nexport interface AptosResponse<Req, Res> {\n status: number;\n statusText: string;\n data: Res;\n url: string;\n headers: any;\n config?: any;\n request?: Req;\n}\n\n/**\n * The ledger version of transactions, defaulting to the latest version if not specified.\n */\nexport type LedgerVersionArg = {\n ledgerVersion?: AnyNumber;\n};\n\n/**\n * RESPONSE TYPES\n */\n\n/**\n * The output of the estimate gas API, including the deprioritized estimate for the gas unit price.\n */\nexport type GasEstimation = {\n /**\n * The deprioritized estimate for the gas unit price\n */\n deprioritized_gas_estimate?: number;\n /**\n * The current estimate for the gas unit price\n */\n gas_estimate: number;\n /**\n * The prioritized estimate for the gas unit price\n */\n prioritized_gas_estimate?: number;\n};\n\nexport type MoveResource<T = {}> = {\n type: MoveStructId;\n data: T;\n};\n\n/**\n * The data associated with an account, including its sequence number.\n */\nexport type AccountData = {\n sequence_number: string;\n authentication_key: string;\n};\n\n/**\n * A Move module containing an address.\n */\nexport type MoveModuleBytecode = {\n bytecode: string;\n abi?: MoveModule;\n};\n\n/**\n * TRANSACTION TYPES\n */\n\n/**\n * Different types of transaction responses that can occur in the system.\n */\nexport enum TransactionResponseType {\n Pending = \"pending_transaction\",\n User = \"user_transaction\",\n Genesis = \"genesis_transaction\",\n BlockMetadata = \"block_metadata_transaction\",\n StateCheckpoint = \"state_checkpoint_transaction\",\n Validator = \"validator_transaction\",\n BlockEpilogue = \"block_epilogue_transaction\",\n}\n\n/**\n * The response for a transaction, which can be either pending or committed.\n */\nexport type TransactionResponse = PendingTransactionResponse | CommittedTransactionResponse;\n\n/**\n * The response for a committed transaction, which can be one of several transaction types.\n */\nexport type CommittedTransactionResponse =\n | UserTransactionResponse\n | GenesisTransactionResponse\n | BlockMetadataTransactionResponse\n | StateCheckpointTransactionResponse\n | ValidatorTransactionResponse\n | BlockEpilogueTransactionResponse;\n\n/**\n * Determine if the given transaction response is currently pending.\n *\n * @param response - The transaction response to evaluate.\n * @returns A boolean indicating whether the transaction is pending.\n */\nexport function isPendingTransactionResponse(response: TransactionResponse): response is PendingTransactionResponse {\n return response.type === TransactionResponseType.Pending;\n}\n\n/**\n * Determines if the given transaction response is a user transaction.\n *\n * @param response - The transaction response to evaluate.\n * @returns A boolean indicating whether the transaction is of type User.\n */\nexport function isUserTransactionResponse(response: TransactionResponse): response is UserTransactionResponse {\n return response.type === TransactionResponseType.User;\n}\n\n/**\n * Determines if the given transaction response is a Genesis transaction.\n *\n * @param response - The transaction response to evaluate.\n * @returns A boolean indicating whether the transaction is a Genesis transaction.\n */\nexport function isGenesisTransactionResponse(response: TransactionResponse): response is GenesisTransactionResponse {\n return response.type === TransactionResponseType.Genesis;\n}\n\n/**\n * Determine if the given transaction response is of type BlockMetadata.\n *\n * @param response - The transaction response to evaluate.\n * @returns A boolean indicating whether the response is a BlockMetadata transaction.\n */\nexport function isBlockMetadataTransactionResponse(\n response: TransactionResponse,\n): response is BlockMetadataTransactionResponse {\n return response.type === TransactionResponseType.BlockMetadata;\n}\n\n/**\n * Determines if the provided transaction response is a state checkpoint transaction.\n *\n * @param response - The transaction response to evaluate.\n * @returns A boolean indicating whether the transaction response is of type StateCheckpoint.\n */\nexport function isStateCheckpointTransactionResponse(\n response: TransactionResponse,\n): response is StateCheckpointTransactionResponse {\n return response.type === TransactionResponseType.StateCheckpoint;\n}\n\n/**\n * Determine if the given transaction response is of type Validator.\n *\n * @param response - The transaction response to evaluate.\n * @returns A boolean indicating whether the transaction response is a Validator type.\n */\nexport function isValidatorTransactionResponse(\n response: TransactionResponse,\n): response is ValidatorTransactionResponse {\n return response.type === TransactionResponseType.Validator;\n}\n\n/**\n * Determines if the given transaction response is of the type Block Epilogue.\n *\n * @param response - The transaction response to evaluate.\n * @returns A boolean indicating whether the response is a Block Epilogue transaction.\n */\nexport function isBlockEpilogueTransactionResponse(\n response: TransactionResponse,\n): response is BlockEpilogueTransactionResponse {\n return response.type === TransactionResponseType.BlockEpilogue;\n}\n\n/**\n * The response for a pending transaction, indicating that the transaction is still being processed.\n */\nexport type PendingTransactionResponse = {\n type: TransactionResponseType.Pending;\n hash: string;\n sender: string;\n sequence_number: string;\n max_gas_amount: string;\n gas_unit_price: string;\n expiration_timestamp_secs: string;\n payload: TransactionPayloadResponse;\n signature?: TransactionSignature;\n};\n\n/**\n * The response structure for a user transaction.\n */\nexport type UserTransactionResponse = {\n type: TransactionResponseType.User;\n version: string;\n hash: string;\n state_change_hash: string;\n event_root_hash: string;\n state_checkpoint_hash: string | null;\n gas_used: string;\n /**\n * Whether the transaction was successful\n */\n success: boolean;\n /**\n * The VM status of the transaction, can tell useful information in a failure\n */\n vm_status: string;\n accumulator_root_hash: string;\n /**\n * Final state of resources changed by the transaction\n */\n changes: Array<WriteSetChange>;\n sender: string;\n sequence_number: string;\n replay_protection_nonce: string;\n max_gas_amount: string;\n gas_unit_price: string;\n expiration_timestamp_secs: string;\n payload: TransactionPayloadResponse;\n signature?: TransactionSignature;\n /**\n * Events generated by the transaction\n */\n events: Array<Event>;\n timestamp: string;\n};\n\n/**\n * The response for a genesis transaction, indicating the type of transaction.\n */\nexport type GenesisTransactionResponse = {\n type: TransactionResponseType.Genesis;\n version: string;\n hash: string;\n state_change_hash: string;\n event_root_hash: string;\n state_checkpoint_hash?: string;\n gas_used: string;\n /**\n * Whether the transaction was successful\n */\n success: boolean;\n /**\n * The VM status of the transaction, can tell useful information in a failure\n */\n vm_status: string;\n accumulator_root_hash: string;\n /**\n * Final state of resources changed by the transaction\n */\n changes: Array<WriteSetChange>;\n payload: GenesisPayload;\n /**\n * Events emitted during genesis\n */\n events: Array<Event>;\n};\n\n/**\n * The structure representing a blockchain block with its height.\n */\nexport type BlockMetadataTransactionResponse = {\n type: TransactionResponseType.BlockMetadata;\n version: string;\n hash: string;\n state_change_hash: string;\n event_root_hash: string;\n state_checkpoint_hash: string | null;\n gas_used: string;\n /**\n * Whether the transaction was successful\n */\n success: boolean;\n /**\n * The VM status of the transaction, can tell useful information in a failure\n */\n vm_status: string;\n accumulator_root_hash: string;\n /**\n * Final state of resources changed by the transaction\n */\n changes: Array<WriteSetChange>;\n id: string;\n epoch: string;\n round: string;\n /**\n * The events emitted at the block creation\n */\n events: Array<Event>;\n /**\n * Previous block votes\n */\n previous_block_votes_bitvec: Array<number>;\n proposer: string;\n /**\n * The indices of the proposers who failed to propose\n */\n failed_proposer_indices: Array<number>;\n timestamp: string;\n};\n\n/**\n * The response for a state checkpoint transaction, indicating the type of transaction.\n */\nexport type StateCheckpointTransactionResponse = {\n type: TransactionResponseType.StateCheckpoint;\n version: string;\n hash: string;\n state_change_hash: string;\n event_root_hash: string;\n state_checkpoint_hash: string | null;\n gas_used: string;\n /**\n * Whether the transaction was successful\n */\n success: boolean;\n /**\n * The VM status of the transaction, can tell useful information in a failure\n */\n vm_status: string;\n accumulator_root_hash: string;\n /**\n * Final state of resources changed by the transaction\n */\n changes: Array<WriteSetChange>;\n timestamp: string;\n};\n\n/**\n * The response for a validator transaction, indicating the type of transaction.\n */\nexport type ValidatorTransactionResponse = {\n type: TransactionResponseType.Validator;\n version: string;\n hash: string;\n state_change_hash: string;\n event_root_hash: string;\n state_checkpoint_hash: string | null;\n gas_used: string;\n /**\n * Whether the transaction was successful\n */\n success: boolean;\n /**\n * The VM status of the transaction, can tell useful information in a failure\n */\n vm_status: string;\n accumulator_root_hash: string;\n /**\n * Final state of resources changed by the transaction\n */\n changes: Array<WriteSetChange>;\n /**\n * The events emitted by the validator transaction\n */\n events: Array<Event>;\n timestamp: string;\n};\n\n/**\n * Describes the gas state of the block, indicating whether the block gas limit has been reached.\n */\nexport type BlockEndInfo = {\n block_gas_limit_reached: boolean;\n block_output_limit_reached: boolean;\n block_effective_block_gas_units: number;\n block_approx_output_size: number;\n};\n\n/**\n * A transaction executed at the end of a block that tracks data from the entire block.\n */\nexport type BlockEpilogueTransactionResponse = {\n type: TransactionResponseType.BlockEpilogue;\n version: string;\n hash: string;\n state_change_hash: string;\n event_root_hash: string;\n state_checkpoint_hash: string | null;\n gas_used: string;\n /**\n * Whether the transaction was successful\n */\n success: boolean;\n /**\n * The VM status of the transaction, can tell useful information in a failure\n */\n vm_status: string;\n accumulator_root_hash: string;\n /**\n * Final state of resources changed by the transaction\n */\n changes: Array<WriteSetChange>;\n timestamp: string;\n block_end_info: BlockEndInfo | null;\n};\n\n/**\n * WRITESET CHANGE TYPES\n */\n\n/**\n * A union type that encompasses both script and direct write sets for data operations.\n */\nexport type WriteSetChange =\n | WriteSetChangeDeleteModule\n | WriteSetChangeDeleteResource\n | WriteSetChangeDeleteTableItem\n | WriteSetChangeWriteModule\n | WriteSetChangeWriteResource\n | WriteSetChangeWriteTableItem;\n\n/**\n * The structure for a module deletion change in a write set.\n */\nexport type WriteSetChangeDeleteModule = {\n type: string;\n address: string;\n /**\n * State key hash\n */\n state_key_hash: string;\n module: MoveModuleId;\n};\n\n/**\n * The payload for a resource deletion in a write set change.\n */\nexport type WriteSetChangeDeleteResource = {\n type: string;\n address: string;\n state_key_hash: string;\n resource: string;\n};\n\n/**\n * The payload for a write set change that deletes a table item.\n */\nexport type WriteSetChangeDeleteTableItem = {\n type: string;\n state_key_hash: string;\n handle: string;\n key: string;\n data?: DeletedTableData;\n};\n\n/**\n * The structure for a write module change in a write set.\n */\nexport type WriteSetChangeWriteModule = {\n type: string;\n address: string;\n state_key_hash: string;\n data: MoveModuleBytecode;\n};\n\n/**\n * The resource associated with a write set change, identified by its type.\n */\nexport type WriteSetChangeWriteResource = {\n type: string;\n address: string;\n state_key_hash: string;\n data: MoveResource;\n};\n\n/**\n * The structure for a write operation on a table in a write set change.\n */\nexport type WriteSetChangeWriteTableItem = {\n type: string;\n state_key_hash: string;\n handle: string;\n key: string;\n value: string;\n data?: DecodedTableData;\n};\n\n/**\n * The decoded data for a table, including its key in JSON format.\n */\nexport type DecodedTableData = {\n /**\n * Key of table in JSON\n */\n key: any;\n /**\n * Type of key\n */\n key_type: string;\n /**\n * Value of table in JSON\n */\n value: any;\n /**\n * Type of value\n */\n value_type: string;\n};\n\n/**\n * Data for a deleted table entry.\n */\nexport type DeletedTableData = {\n /**\n * Deleted key\n */\n key: any;\n /**\n * Deleted key type\n */\n key_type: string;\n};\n\n/**\n * The payload for a transaction response, which can be an entry function, script, or multisig payload.\n */\nexport type TransactionPayloadResponse = EntryFunctionPayloadResponse | ScriptPayloadResponse | MultisigPayloadResponse;\n\n/**\n * The response payload for an entry function, containing the type of the entry.\n */\nexport type EntryFunctionPayloadResponse = {\n type: string;\n function: MoveFunctionId;\n /**\n * Type arguments of the function\n */\n type_arguments: Array<string>;\n /**\n * Arguments of the function\n */\n arguments: Array<any>;\n};\n\n/**\n * The payload for a script response, containing the type of the script.\n */\nexport type ScriptPayloadResponse = {\n type: string;\n code: MoveScriptBytecode;\n /**\n * Type arguments of the function\n */\n type_arguments: Array<string>;\n /**\n * Arguments of the function\n */\n arguments: Array<any>;\n};\n\n/**\n * The response payload for a multisig transaction, containing the type of the transaction.\n */\nexport type MultisigPayloadResponse = {\n type: string;\n multisig_address: string;\n transaction_payload?: EntryFunctionPayloadResponse;\n};\n\n/**\n * The payload for the genesis block containing the type of the payload.\n */\nexport type GenesisPayload = {\n type: string;\n write_set: WriteSet;\n};\n\n/**\n * The bytecode for a Move script.\n */\nexport type MoveScriptBytecode = {\n bytecode: string;\n abi?: MoveFunction;\n};\n\n/**\n * JSON representations of transaction signatures returned from the node API.\n */\nexport type TransactionSignature =\n | TransactionEd25519Signature\n | TransactionSecp256k1Signature\n | TransactionMultiEd25519Signature\n | TransactionMultiAgentSignature\n | TransactionFeePayerSignature\n | TransactionSingleSenderSignature;\n\n/**\n * Determine if the provided signature is an Ed25519 signature.\n * This function checks for the presence of the \"signature\" property\n * and verifies that its value is \"ed25519_signature\".\n *\n * @param signature - The transaction signature to be checked.\n * @returns A boolean indicating whether the signature is an Ed25519 signature.\n */\nexport function isEd25519Signature(signature: TransactionSignature): signature is TransactionEd25519Signature {\n return \"signature\" in signature && signature.type === \"ed25519_signature\";\n}\n\n/**\n * Determine if the provided signature is a valid secp256k1 ECDSA signature.\n *\n * @param signature - The transaction signature to validate.\n * @returns A boolean indicating whether the signature is a secp256k1 ECDSA signature.\n */\nexport function isSecp256k1Signature(signature: TransactionSignature): signature is TransactionFeePayerSignature {\n return \"signature\" in signature && signature.signature === \"secp256k1_ecdsa_signature\";\n}\n\n/**\n * Determine if the provided transaction signature is a multi-agent signature.\n *\n * @param signature - The transaction signature to evaluate.\n * @returns A boolean indicating whether the signature is a multi-agent signature.\n */\nexport function isMultiAgentSignature(signature: TransactionSignature): signature is TransactionMultiAgentSignature {\n return signature.type === \"multi_agent_signature\";\n}\n\n/**\n * Determine if the provided signature is a fee payer signature.\n *\n * @param signature - The transaction signature to evaluate.\n * @returns A boolean indicating whether the signature is a fee payer signature.\n */\nexport function isFeePayerSignature(signature: TransactionSignature): signature is TransactionFeePayerSignature {\n return signature.type === \"fee_payer_signature\";\n}\n\n/**\n * Determine if the provided signature is of type \"multi_ed25519_signature\".\n *\n * @param signature - The transaction signature to check.\n * @returns A boolean indicating whether the signature is a multi-ed25519 signature.\n */\nexport function isMultiEd25519Signature(\n signature: TransactionSignature,\n): signature is TransactionMultiEd25519Signature {\n return signature.type === \"multi_ed25519_signature\";\n}\n\n/**\n * Determine if the provided signature is of type \"single_sender\".\n *\n * @param signature - The transaction signature to check.\n * @returns A boolean indicating whether the signature is a single-sender signature.\n */\nexport function isSingleSenderSignature(\n signature: TransactionSignature,\n): signature is TransactionSingleSenderSignature {\n return signature.type === \"single_sender\";\n}\n\n/**\n * The signature for a transaction using the Ed25519 algorithm.\n */\nexport type TransactionEd25519Signature = {\n type: string;\n public_key: string;\n signature: \"ed25519_signature\";\n};\n\n/**\n * The structure for a Secp256k1 signature in a transaction.\n */\nexport type TransactionSecp256k1Signature = {\n type: string;\n public_key: string;\n signature: \"secp256k1_ecdsa_signature\";\n};\n\n/**\n * The structure for a multi-signature transaction using Ed25519.\n */\nexport type TransactionSingleSenderSignature = {\n type: \"single_sender\";\n public_key: { value: string; type: string };\n signature: { value: string; type: string };\n};\n\n/**\n * The structure for a multi-signature transaction using Ed25519.\n */\nexport type TransactionMultiEd25519Signature = {\n type: \"multi_ed25519_signature\";\n /**\n * The public keys for the Ed25519 signature\n */\n public_keys: Array<string>;\n /**\n * Signature associated with the public keys in the same order\n */\n signatures: Array<string>;\n /**\n * The number of signatures required for a successful transaction\n */\n threshold: number;\n bitmap: string;\n};\n\n/**\n * The structure for a multi-agent signature in a transaction.\n */\nexport type TransactionMultiAgentSignature = {\n type: \"multi_agent_signature\";\n sender: AccountSignature;\n /**\n * The other involved parties' addresses\n */\n secondary_signer_addresses: Array<string>;\n /**\n * The associated signatures, in the same order as the secondary addresses\n */\n secondary_signers: Array<AccountSignature>;\n};\n\n/**\n * The signature of the fee payer in a transaction.\n */\nexport type TransactionFeePayerSignature = {\n type: \"fee_payer_signature\";\n sender: AccountSignature;\n /**\n * The other involved parties' addresses\n */\n secondary_signer_addresses: Array<string>;\n /**\n * The associated signatures, in the same order as the secondary addresses\n */\n secondary_signers: Array<AccountSignature>;\n fee_payer_address: string;\n fee_payer_signer: AccountSignature;\n};\n\n/**\n * The union of all single account signatures, including Ed25519, Secp256k1, and MultiEd25519 signatures.\n */\nexport type AccountSignature =\n | TransactionEd25519Signature\n | TransactionSecp256k1Signature\n | TransactionMultiEd25519Signature;\n\nexport type WriteSet = ScriptWriteSet | DirectWriteSet;\n\n/**\n * The set of properties for writing scripts, including the type of script.\n */\nexport type ScriptWriteSet = {\n type: string;\n execute_as: string;\n script: ScriptPayloadResponse;\n};\n\n/**\n * The set of direct write operations, identified by a type string.\n */\nexport type DirectWriteSet = {\n type: string;\n changes: Array<WriteSetChange>;\n events: Array<Event>;\n};\n\n/**\n * The structure for an event's unique identifier, including its creation number.\n */\n\n/**\n * The structure for an event, identified by a unique GUID.\n */\nexport type EventGuid = {\n creation_number: string;\n account_address: string;\n};\n\nexport type Event = {\n guid: EventGuid;\n sequence_number: string;\n type: string;\n /**\n * The JSON representation of the event\n */\n data: any;\n};\n\n/**\n * A number representing a Move uint8 type.\n */\nexport type MoveUint8Type = number;\n\n/**\n * A 16-bit unsigned integer used in the Move programming language.\n */\nexport type MoveUint16Type = number;\n\n/**\n * A 32-bit unsigned integer type used in Move programming.\n */\nexport type MoveUint32Type = number;\n\n/**\n * A string representation of a 64-bit unsigned integer used in Move programming.\n */\nexport type MoveUint64Type = string;\n\n/**\n * A string representing a 128-bit unsigned integer in the Move programming language.\n */\nexport type MoveUint128Type = string;\n\n/**\n * A string representation of a 256-bit unsigned integer used in Move programming.\n */\nexport type MoveUint256Type = string;\n\n/**\n * A number representing a Move int8 type.\n */\nexport type MoveInt8Type = number;\n\n/**\n * A 16-bit signed integer used in the Move programming language.\n */\nexport type MoveInt16Type = number;\n\n/**\n * A 32-bit signed integer type used in Move programming.\n */\nexport type MoveInt32Type = number;\n\n/**\n * A string representation of a 64-bit signed integer used in Move programming.\n */\nexport type MoveInt64Type = string;\n\n/**\n * A string representing a 128-bit signed integer in the Move programming language.\n */\nexport type MoveInt128Type = string;\n\n/**\n * A string representation of a 256-bit signed integer used in Move programming.\n */\nexport type MoveInt256Type = string;\n\n/**\n * A string representing a Move address.\n */\nexport type MoveAddressType = string;\n\n/**\n * The type for identifying objects to be moved within the system.\n */\nexport type MoveObjectType = string;\n\n/**\n * The type for move options, which can be a MoveType, null, or undefined.\n */\nexport type MoveOptionType = MoveType | null | undefined;\n\n/**\n * A structure representing a move with a name.\n */\nexport type MoveStructId = `${string}::${string}::${string}`;\n\n/**\n * The move function containing its name. Same as MoveStructId since it reads weird to take a StructId for a Function.\n */\nexport type MoveFunctionId = MoveStructId;\n\n// TODO: Add support for looking up ABI to add proper typing\nexport type MoveStructType = {};\n\n/**\n * A union type that encompasses various data types used in Move, including primitive types, address types, object types, and\n * arrays of MoveType.\n */\nexport type MoveType =\n | boolean\n | string\n | MoveUint8Type\n | MoveUint16Type\n | MoveUint32Type\n | MoveUint64Type\n | MoveUint128Type\n | MoveUint256Type\n | MoveInt8Type\n | MoveInt16Type\n | MoveInt32Type\n | MoveInt64Type\n | MoveInt128Type\n | MoveInt256Type\n | MoveAddressType\n | MoveObjectType\n | MoveStructType\n | Array<MoveType>;\n\n/**\n * Possible Move values acceptable by move functions (entry, view)\n *\n * Map of a Move value to the corresponding TypeScript value\n *\n * `Bool -> boolean`\n *\n * `u8, u16, u32 -> number`\n *\n * `u64, u128, u256 -> string`\n *\n * `i8, i16, i32 -> number`\n *\n * `i64, i128, i256 -> string`\n *\n * `String -> string`\n *\n * `Address -> 0x${string}`\n *\n * `Struct - 0x${string}::${string}::${string}`\n *\n * `Object -> 0x${string}`\n *\n * `Vector -> Array<MoveValue>`\n *\n * `Option -> MoveValue | null | undefined`\n */\nexport type MoveValue =\n | boolean\n | string\n | MoveUint8Type\n | MoveUint16Type\n | MoveUint32Type\n | MoveUint64Type\n | MoveUint128Type\n | MoveUint256Type\n | MoveInt8Type\n | MoveInt16Type\n | MoveInt32Type\n | MoveInt64Type\n | MoveInt128Type\n | MoveInt256Type\n | MoveAddressType\n | MoveObjectType\n | MoveStructId\n | MoveOptionType\n | Array<MoveValue>;\n\n/**\n * A string representation of a Move module, formatted as `module_name::function_name`.\n * Module names are case-sensitive.\n */\nexport type MoveModuleId = `${string}::${string}`;\n\n/**\n * Specifies the visibility levels for move functions, controlling access permissions.\n */\nexport enum MoveFunctionVisibility {\n PRIVATE = \"private\",\n PUBLIC = \"public\",\n FRIEND = \"friend\",\n}\n\n/**\n * Abilities related to moving items within the system.\n */\nexport enum MoveAbility {\n STORE = \"store\",\n DROP = \"drop\",\n KEY = \"key\",\n COPY = \"copy\",\n}\n\n/**\n * Move abilities associated with the generic type parameter of a function.\n */\nexport type MoveFunctionGenericTypeParam = {\n constraints: Array<MoveAbility>;\n};\n\n/**\n * A field in a Move struct, identified by its name.\n */\nexport type MoveStructField = {\n name: string;\n type: string;\n};\n\n/**\n * A Move module\n */\nexport type MoveModule = {\n address: string;\n name: string;\n /**\n * Friends of the module\n */\n friends: Array<MoveModuleId>;\n /**\n * Public functions of the module\n */\n exposed_functions: Array<MoveFunction>;\n /**\n * Structs of the module\n */\n structs: Array<MoveStruct>;\n};\n\n/**\n * A move struct\n */\nexport type MoveStruct = {\n name: string;\n /**\n * Whether the struct is a native struct of Move\n */\n is_native: boolean;\n /**\n * Whether the struct is a module event (aka v2 event). This will be false for v1\n * events because the value is derived from the #[event] attribute on the struct in\n * the Move source code. This attribute is only relevant for v2 events.\n */\n is_event: boolean;\n /**\n * True if the struct is an enum (e.g. enum MyEnum { A, B, C }), false if it is a\n * regular struct (e.g. struct MyStruct { a: u8, b: u8 }).\n */\n is_enum: boolean;\n /**\n * Abilities associated with the struct\n */\n abilities: Array<MoveAbility>;\n /**\n * Generic types associated with the struct\n */\n generic_type_params: Array<MoveFunctionGenericTypeParam>;\n /**\n * Fields associated with the struct\n */\n fields: Array<MoveStructField>;\n};\n\n/**\n * Move function\n */\nexport type MoveFunction = {\n name: string;\n visibility: MoveFunctionVisibility;\n /**\n * Whether the function can be called as an entry function directly in a transaction\n */\n is_entry: boolean;\n /**\n * Whether the function is a view function or not\n */\n is_view: boolean;\n /**\n * Generic type params associated with the Move function\n */\n generic_type_params: Array<MoveFunctionGenericTypeParam>;\n /**\n * Parameters associated with the move function\n */\n params: Array<string>;\n /**\n * Return type of the function\n */\n return: Array<string>;\n};\n\n/**\n * Roles that can be assigned within the system, indicating different levels of access and functionality.\n */\nexport enum RoleType {\n VALIDATOR = \"validator\",\n FULL_NODE = \"full_node\",\n}\n\n/**\n * Information about the current blockchain ledger, including its chain ID.\n */\nexport type LedgerInfo = {\n /**\n * Chain ID of the current chain\n */\n chain_id: number;\n epoch: string;\n ledger_version: string;\n oldest_ledger_version: string;\n ledger_timestamp: string;\n node_role: RoleType;\n oldest_block_height: string;\n block_height: string;\n /**\n * Git hash of the build of the API endpoint. Can be used to determine the exact\n * software version used by the API endpoint.\n */\n git_hash?: string;\n};\n\n/**\n * A Block type\n */\nexport type Block = {\n block_height: string;\n block_hash: string;\n block_timestamp: string;\n first_version: string;\n last_version: string;\n /**\n * The transactions in the block in sequential order\n */\n transactions?: Array<TransactionResponse>;\n};\n\n// REQUEST TYPES\n\n/**\n * The request payload for the GetTableItem API.\n */\nexport type TableItemRequest = {\n key_type: MoveValue;\n value_type: MoveValue;\n /**\n * The value of the table item's key\n */\n key: any;\n};\n\n/**\n * A list of supported Authentication Key schemes in Aptos, consisting of combinations of signing schemes and derive schemes.\n */\nexport type AuthenticationKeyScheme = SigningScheme | DeriveScheme;\n\n/**\n * Different schemes for signing keys used in cryptographic operations.\n */\nexport enum SigningScheme {\n /**\n * For Ed25519PublicKey\n */\n Ed25519 = 0,\n /**\n * For MultiEd25519PublicKey\n */\n MultiEd25519 = 1,\n /**\n * For SingleKey ecdsa\n */\n SingleKey = 2,\n\n MultiKey = 3,\n}\n\n/**\n * Specifies the signing schemes available for cryptographic operations.\n */\nexport enum SigningSchemeInput {\n /**\n * For Ed25519PublicKey\n */\n Ed25519 = 0,\n /**\n * For Secp256k1Ecdsa\n */\n Secp256k1Ecdsa = 2,\n}\n\n/**\n * Specifies the schemes for deriving account addresses from various data sources.\n */\nexport enum DeriveScheme {\n /**\n * Derives an address using an AUID, used for objects\n */\n DeriveAuid = 251,\n /**\n * Derives an address from another object address\n */\n DeriveObjectAddressFromObject = 252,\n /**\n * Derives an address from a GUID, used for objects\n */\n DeriveObjectAddressFromGuid = 253,\n /**\n * Derives an address from seed bytes, used for named objects\n */\n DeriveObjectAddressFromSeed = 254,\n /**\n * Derives an address from seed bytes, used for resource accounts\n */\n DeriveResourceAccountAddress = 255,\n}\n\n/**\n * Options for configuring the behavior of the waitForTransaction() function.\n */\nexport type WaitForTransactionOptions = {\n timeoutSecs?: number;\n checkSuccess?: boolean;\n // Default behavior is to wait for the indexer. Set this to false to disable waiting.\n waitForIndexer?: boolean;\n};\n\n/**\n * Input type to generate an account using the Ed25519 signing scheme.\n */\nexport type GenerateAccountWithEd25519 = {\n scheme: SigningSchemeInput.Ed25519;\n legacy: boolean;\n};\n\n/**\n * Input type to generate an account with a Single Signer using Secp256k1.\n */\nexport type GenerateAccountWithSingleSignerSecp256k1Key = {\n scheme: SigningSchemeInput.Secp256k1Ecdsa;\n legacy?: false;\n};\n\nexport type GenerateAccount = GenerateAccountWithEd25519 | GenerateAccountWithSingleSignerSecp256k1Key;\n"],"mappings":"AAWO,IAAKA,OAIVA,EAAA,KAAO,mBAIPA,EAAA,IAAM,oBAINA,EAAA,uBAAyB,6CACzBA,EAAA,kBAAoB,wCAbVA,OAAA,IAyBAC,OACVA,IAAA,KAAO,GAAP,OACAA,IAAA,GAAK,GAAL,KACAA,IAAA,IAAM,GAAN,MACAA,IAAA,KAAO,GAAP,OACAA,IAAA,QAAU,GAAV,UACAA,IAAA,OAAS,GAAT,SACAA,IAAA,OAAS,GAAT,SACAA,IAAA,OAAS,GAAT,SACAA,IAAA,IAAM,GAAN,MACAA,IAAA,IAAM,GAAN,MACAA,IAAA,KAAO,IAAP,OACAA,IAAA,GAAK,IAAL,KACAA,IAAA,IAAM,IAAN,MACAA,IAAA,IAAM,IAAN,MACAA,IAAA,IAAM,IAAN,MACAA,IAAA,KAAO,IAAP,OACAA,IAAA,KAAO,IAAP,OACAA,IAAA,UAAY,KAAZ,YACAA,IAAA,QAAU,KAAV,UAnBUA,OAAA,IA0BAC,OACVA,IAAA,GAAK,GAAL,KACAA,IAAA,IAAM,GAAN,MACAA,IAAA,KAAO,GAAP,OACAA,IAAA,QAAU,GAAV,UACAA,IAAA,SAAW,GAAX,WACAA,IAAA,KAAO,GAAP,OACAA,IAAA,IAAM,GAAN,MACAA,IAAA,IAAM,GAAN,MACAA,IAAA,KAAO,GAAP,OACAA,IAAA,WAAa,GAAb,aAEAA,IAAA,GAAK,IAAL,KACAA,IAAA,IAAM,IAAN,MACAA,IAAA,IAAM,IAAN,MACAA,IAAA,IAAM,IAAN,MACAA,IAAA,KAAO,IAAP,OACAA,IAAA,KAAO,IAAP,OAjBUA,OAAA,IAwBAC,OACVA,IAAA,OAAS,GAAT,SACAA,IAAA,cAAgB,GAAhB,gBACAA,IAAA,SAAW,GAAX,WACAA,IAAA,QAAU,GAAV,UAJUA,OAAA,IAWAC,OACVA,IAAA,GAAK,GAAL,KADUA,OAAA,IAUAC,OACVA,IAAA,OAAS,GAAT,SACAA,IAAA,cAAgB,GAAhB,gBACAA,IAAA,MAAQ,GAAR,QAHUA,OAAA,IAUAC,OACVA,IAAA,GAAK,GAAL,KADUA,OAAA,IAQAC,OACVA,IAAA,sBAAwB,GAAxB,wBACAA,IAAA,oBAAsB,GAAtB,sBAFUA,OAAA,IASAC,OACVA,IAAA,QAAU,GAAV,UACAA,IAAA,aAAe,GAAf,eACAA,IAAA,WAAa,GAAb,aACAA,IAAA,SAAW,GAAX,WACAA,IAAA,aAAe,GAAf,eALUA,OAAA,IAYAC,OACVA,IAAA,QAAU,GAAV,UACAA,IAAA,aAAe,GAAf,eACAA,IAAA,UAAY,GAAZ,YACAA,IAAA,SAAW,GAAX,WACAA,IAAA,uBAAyB,GAAzB,yBACAA,IAAA,YAAc,GAAd,cANUA,OAAA,IAaAC,OACVA,EAAA,QAAU,UACVA,EAAA,UAAY,YACZA,EAAA,UAAY,YAHFA,OAAA,IASAC,OACVA,IAAA,QAAU,GAAV,UACAA,IAAA,UAAY,GAAZ,YACAA,IAAA,UAAY,GAAZ,YACAA,IAAA,QAAU,GAAV,UACAA,IAAA,iBAAmB,GAAnB,mBAKAA,IAAA,gBAAkB,GAAlB,kBAVUA,OAAA,IAaL,SAASC,EAA4BC,EAAsC,CAChF,OAAQA,EAAS,CACf,IAAK,GACH,MAAO,UACT,IAAK,GACH,MAAO,YACT,IAAK,GACH,MAAO,YACT,IAAK,GACH,MAAO,UACT,IAAK,GACH,MAAO,oBACT,IAAK,GACH,MAAO,oBACT,QACE,MAAM,IAAI,MAAM,4BAA4B,CAChD,CACF,CAKO,IAAKC,OACVA,IAAA,QAAU,GAAV,UACAA,IAAA,UAAY,GAAZ,YACAA,IAAA,SAAW,GAAX,WACAA,IAAA,QAAU,GAAV,UAKAA,IAAA,gBAAkB,GAAlB,kBATUA,OAAA,IAeAC,OACVA,IAAA,QAAU,GAAV,UADUA,OAAA,IAOAC,OACVA,IAAA,QAAU,GAAV,UADUA,OAAA,IAOAC,OACVA,IAAA,QAAU,GAAV,UADUA,OAAA,IAOAC,OACVA,IAAA,QAAU,GAAV,UADUA,OAAA,IA4ZAC,OACVA,EAAA,QAAU,sBACVA,EAAA,KAAO,mBACPA,EAAA,QAAU,sBACVA,EAAA,cAAgB,6BAChBA,EAAA,gBAAkB,+BAClBA,EAAA,UAAY,wBACZA,EAAA,cAAgB,6BAPNA,OAAA,IAgCL,SAASC,EAA6BC,EAAuE,CAClH,OAAOA,EAAS,OAAS,qBAC3B,CAQO,SAASC,EAA0BD,EAAoE,CAC5G,OAAOA,EAAS,OAAS,kBAC3B,CAQO,SAASE,EAA6BF,EAAuE,CAClH,OAAOA,EAAS,OAAS,qBAC3B,CAQO,SAASG,EACdH,EAC8C,CAC9C,OAAOA,EAAS,OAAS,4BAC3B,CAQO,SAASI,EACdJ,EACgD,CAChD,OAAOA,EAAS,OAAS,8BAC3B,CAQO,SAASK,EACdL,EAC0C,CAC1C,OAAOA,EAAS,OAAS,uBAC3B,CAQO,SAASM,EACdN,EAC8C,CAC9C,OAAOA,EAAS,OAAS,4BAC3B,CAwaO,SAASO,EAAmBC,EAA2E,CAC5G,MAAO,cAAeA,GAAaA,EAAU,OAAS,mBACxD,CAQO,SAASC,EAAqBD,EAA4E,CAC/G,MAAO,cAAeA,GAAaA,EAAU,YAAc,2BAC7D,CAQO,SAASE,EAAsBF,EAA8E,CAClH,OAAOA,EAAU,OAAS,uBAC5B,CAQO,SAASG,EAAoBH,EAA4E,CAC9G,OAAOA,EAAU,OAAS,qBAC5B,CAQO,SAASI,EACdJ,EAC+C,CAC/C,OAAOA,EAAU,OAAS,yBAC5B,CAQO,SAASK,EACdL,EAC+C,CAC/C,OAAOA,EAAU,OAAS,eAC5B,CA8SO,IAAKM,OACVA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,OAAS,SAHCA,OAAA,IASAC,OACVA,EAAA,MAAQ,QACRA,EAAA,KAAO,OACPA,EAAA,IAAM,MACNA,EAAA,KAAO,OAJGA,OAAA,IA2GAC,OACVA,EAAA,UAAY,YACZA,EAAA,UAAY,YAFFA,OAAA,IAgEAC,OAIVA,IAAA,QAAU,GAAV,UAIAA,IAAA,aAAe,GAAf,eAIAA,IAAA,UAAY,GAAZ,YAEAA,IAAA,SAAW,GAAX,WAdUA,OAAA,IAoBAC,OAIVA,IAAA,QAAU,GAAV,UAIAA,IAAA,eAAiB,GAAjB,iBARUA,OAAA,IAcAC,OAIVA,IAAA,WAAa,KAAb,aAIAA,IAAA,8BAAgC,KAAhC,gCAIAA,IAAA,4BAA8B,KAA9B,8BAIAA,IAAA,4BAA8B,KAA9B,8BAIAA,IAAA,6BAA+B,KAA/B,+BApBUA,OAAA","names":["MimeType","TypeTagVariants","ScriptTransactionArgumentVariants","TransactionPayloadVariants","TransactionInnerPayloadVariants","TransactionExecutableVariants","TransactionExtraConfigVariants","TransactionVariants","TransactionAuthenticatorVariant","AccountAuthenticatorVariant","PrivateKeyVariants","AnyPublicKeyVariant","anyPublicKeyVariantToString","variant","AnySignatureVariant","EphemeralPublicKeyVariant","EphemeralSignatureVariant","EphemeralCertificateVariant","ZkpVariant","TransactionResponseType","isPendingTransactionResponse","response","isUserTransactionResponse","isGenesisTransactionResponse","isBlockMetadataTransactionResponse","isStateCheckpointTransactionResponse","isValidatorTransactionResponse","isBlockEpilogueTransactionResponse","isEd25519Signature","signature","isSecp256k1Signature","isMultiAgentSignature","isFeePayerSignature","isMultiEd25519Signature","isSingleSenderSignature","MoveFunctionVisibility","MoveAbility","RoleType","SigningScheme","SigningSchemeInput","DeriveScheme"]}
@@ -1,2 +0,0 @@
1
- import{b as p}from"./chunk-LTZRUAGD.mjs";async function o(e){let{type:t,originMethod:s,path:i,body:r,acceptType:R,contentType:f,params:c,aptosConfig:n,overrides:A}=e,d=n.getRequestUrl(t);return p({url:d,method:"POST",originMethod:s,path:i,body:r,contentType:f,acceptType:R,params:c,overrides:A},n,e.type)}async function q(e){let{aptosConfig:t}=e;return o({...e,type:"Fullnode",overrides:{...t.clientConfig,...t.fullnodeConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.fullnodeConfig?.HEADERS}}})}async function C(e){let{aptosConfig:t}=e;return o({...e,type:"Indexer",overrides:{...t.clientConfig,...t.indexerConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.indexerConfig?.HEADERS}}})}async function E(e){let{aptosConfig:t}=e,s={...t,clientConfig:{...t.clientConfig}};return delete s?.clientConfig?.API_KEY,o({...e,type:"Faucet",overrides:{...s.clientConfig,...s.faucetConfig,...e.overrides,HEADERS:{...s.clientConfig?.HEADERS,...s.faucetConfig?.HEADERS}}})}async function a(e){return o({...e,type:"Pepper"})}async function m(e){return o({...e,type:"Prover"})}export{o as a,q as b,C as c,E as d,a as e,m as f};
2
- //# sourceMappingURL=chunk-QFUXOL34.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/client/post.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { 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 POST request, including the API client configuration.\n * @group Implementation\n * @category Client\n */\nexport type PostRequestOptions = {\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 * The body of the request, should match the content type of the request\n * @group Implementation\n * @category Client\n */\n body?: any;\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 posting a request to Aptos, excluding the type field.\n * @group Implementation\n * @category Client\n */\nexport type PostAptosRequestOptions = Omit<PostRequestOptions, \"type\">;\n\n/**\n * Executes a POST request to the specified URL with the provided options.\n *\n * @param options - The options for the POST request.\n * @param options.type - The type of the request.\n * @param options.originMethod - The original method that initiated the request.\n * @param options.path - The path for the request.\n * @param options.body - The body content to be sent with the request.\n * @param options.acceptType - The type of response expected from the server.\n * @param options.contentType - The content type of the request body.\n * @param options.params - Additional parameters to include in the request.\n * @param options.aptosConfig - Configuration settings for the Aptos request.\n * @param options.overrides - Any overrides for the default request behavior.\n * @returns The response from the POST request.\n * @group Implementation\n * @category Client\n */\nexport async function post<Req extends {}, Res extends {}>(\n options: PostRequestOptions,\n): Promise<AptosResponse<Req, Res>> {\n const { type, originMethod, path, body, acceptType, contentType, params, aptosConfig, overrides } = options;\n const url = aptosConfig.getRequestUrl(type);\n\n return aptosRequest<Req, Res>(\n {\n url,\n method: \"POST\",\n originMethod,\n path,\n body,\n contentType,\n acceptType,\n params,\n overrides,\n },\n aptosConfig,\n options.type,\n );\n}\n\n/**\n * Sends a request to the Aptos full node using the specified options.\n * This function allows you to interact with the Aptos blockchain by sending requests to the full node.\n *\n * @param options - The options for the request.\n * @param options.aptosConfig - Configuration settings for the Aptos client.\n * @param options.aptosConfig.clientConfig - Client-specific configuration settings.\n * @param options.aptosConfig.fullnodeConfig - Full node-specific configuration settings.\n * @param options.overrides - Additional overrides for the request.\n * @group Implementation\n * @category Client\n */\nexport async function postAptosFullNode<Req extends {}, Res extends {}>(\n options: PostAptosRequestOptions,\n): Promise<AptosResponse<Req, Res>> {\n const { aptosConfig } = options;\n\n return post<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 * Sends a request to the Aptos indexer with the specified options.\n * This function allows you to interact with the Aptos indexer and customize the request using various configurations.\n *\n * @param options - The options for the request to the Aptos indexer.\n * @param options.aptosConfig - Configuration settings specific to the Aptos client and indexer.\n * @param options.aptosConfig.clientConfig - The client configuration settings.\n * @param options.aptosConfig.indexerConfig - The indexer configuration settings.\n * @param options.overrides - Additional overrides for the request.\n * @param options.overrides.HEADERS - Custom headers to include in the request.\n * @group Implementation\n * @category Client\n */\nexport async function postAptosIndexer<Req extends {}, Res extends {}>(\n options: PostAptosRequestOptions,\n): Promise<AptosResponse<Req, Res>> {\n const { aptosConfig } = options;\n\n return post<Req, Res>({\n ...options,\n type: AptosApiType.INDEXER,\n overrides: {\n ...aptosConfig.clientConfig,\n ...aptosConfig.indexerConfig,\n ...options.overrides,\n HEADERS: { ...aptosConfig.clientConfig?.HEADERS, ...aptosConfig.indexerConfig?.HEADERS },\n },\n });\n}\n\n/**\n * Sends a request to the Aptos faucet to obtain test tokens.\n * This function modifies the provided configuration to ensure that the API_KEY is not included in the request.\n *\n * Note that only devnet has a publicly accessible faucet. For testnet, you must use\n * the minting page at https://aptos.dev/network/faucet.\n *\n * @param options - The options for the request.\n * @param options.aptosConfig - The configuration settings for the Aptos client.\n * @param options.aptosConfig.clientConfig - The client-specific configuration settings.\n * @param options.aptosConfig.clientConfig.HEADERS - Optional headers to include in the request.\n * @param options.aptosConfig.faucetConfig - The configuration settings specific to the faucet.\n * @param options.overrides - Additional overrides for the request configuration.\n * @group Implementation\n * @category Client\n */\nexport async function postAptosFaucet<Req extends {}, Res extends {}>(\n options: PostAptosRequestOptions,\n): Promise<AptosResponse<Req, Res>> {\n const { aptosConfig } = options;\n // Faucet does not support API_KEY\n // Create a new object with the desired modification\n const modifiedAptosConfig = {\n ...aptosConfig,\n clientConfig: { ...aptosConfig.clientConfig },\n };\n // Delete API_KEY config\n delete modifiedAptosConfig?.clientConfig?.API_KEY;\n\n return post<Req, Res>({\n ...options,\n type: AptosApiType.FAUCET,\n overrides: {\n ...modifiedAptosConfig.clientConfig,\n ...modifiedAptosConfig.faucetConfig,\n ...options.overrides,\n HEADERS: { ...modifiedAptosConfig.clientConfig?.HEADERS, ...modifiedAptosConfig.faucetConfig?.HEADERS },\n },\n });\n}\n\n/**\n * Makes a post request to the pepper service.\n *\n * @param options - The options for the request.\n * @param options.url - The URL to which the request is sent.\n * @param options.headers - The headers to include in the request.\n * @param options.body - The body of the request.\n * @returns A promise that resolves to the response from the pepper service.\n * @group Implementation\n * @category Client\n */\nexport async function postAptosPepperService<Req extends {}, Res extends {}>(\n options: PostAptosRequestOptions,\n): Promise<AptosResponse<Req, Res>> {\n return post<Req, Res>({ ...options, type: AptosApiType.PEPPER });\n}\n\n/**\n * Sends a request to the Aptos proving service with the specified options.\n *\n * @param options - The options for the request to the Aptos proving service.\n * @param options.type - The type of the request, which should be set to AptosApiType.PROVER.\n * @param options.data - The data to be included in the request.\n * @group Implementation\n * @category Client\n */\nexport async function postAptosProvingService<Req extends {}, Res extends {}>(\n options: PostAptosRequestOptions,\n): Promise<AptosResponse<Req, Res>> {\n return post<Req, Res>({ ...options, type: AptosApiType.PROVER });\n}\n"],"mappings":"yCA8FA,eAAsBA,EACpBC,EACkC,CAClC,GAAM,CAAE,KAAAC,EAAM,aAAAC,EAAc,KAAAC,EAAM,KAAAC,EAAM,WAAAC,EAAY,YAAAC,EAAa,OAAAC,EAAQ,YAAAC,EAAa,UAAAC,CAAU,EAAIT,EAC9FU,EAAMF,EAAY,cAAcP,CAAI,EAE1C,OAAOU,EACL,CACE,IAAAD,EACA,OAAQ,OACR,aAAAR,EACA,KAAAC,EACA,KAAAC,EACA,YAAAE,EACA,WAAAD,EACA,OAAAE,EACA,UAAAE,CACF,EACAD,EACAR,EAAQ,IACV,CACF,CAcA,eAAsBY,EACpBZ,EACkC,CAClC,GAAM,CAAE,YAAAQ,CAAY,EAAIR,EAExB,OAAOD,EAAe,CACpB,GAAGC,EACH,gBACA,UAAW,CACT,GAAGQ,EAAY,aACf,GAAGA,EAAY,eACf,GAAGR,EAAQ,UACX,QAAS,CAAE,GAAGQ,EAAY,cAAc,QAAS,GAAGA,EAAY,gBAAgB,OAAQ,CAC1F,CACF,CAAC,CACH,CAeA,eAAsBK,EACpBb,EACkC,CAClC,GAAM,CAAE,YAAAQ,CAAY,EAAIR,EAExB,OAAOD,EAAe,CACpB,GAAGC,EACH,eACA,UAAW,CACT,GAAGQ,EAAY,aACf,GAAGA,EAAY,cACf,GAAGR,EAAQ,UACX,QAAS,CAAE,GAAGQ,EAAY,cAAc,QAAS,GAAGA,EAAY,eAAe,OAAQ,CACzF,CACF,CAAC,CACH,CAkBA,eAAsBM,EACpBd,EACkC,CAClC,GAAM,CAAE,YAAAQ,CAAY,EAAIR,EAGlBe,EAAsB,CAC1B,GAAGP,EACH,aAAc,CAAE,GAAGA,EAAY,YAAa,CAC9C,EAEA,cAAOO,GAAqB,cAAc,QAEnChB,EAAe,CACpB,GAAGC,EACH,cACA,UAAW,CACT,GAAGe,EAAoB,aACvB,GAAGA,EAAoB,aACvB,GAAGf,EAAQ,UACX,QAAS,CAAE,GAAGe,EAAoB,cAAc,QAAS,GAAGA,EAAoB,cAAc,OAAQ,CACxG,CACF,CAAC,CACH,CAaA,eAAsBC,EACpBhB,EACkC,CAClC,OAAOD,EAAe,CAAE,GAAGC,EAAS,aAA0B,CAAC,CACjE,CAWA,eAAsBiB,EACpBjB,EACkC,CAClC,OAAOD,EAAe,CAAE,GAAGC,EAAS,aAA0B,CAAC,CACjE","names":["post","options","type","originMethod","path","body","acceptType","contentType","params","aptosConfig","overrides","url","aptosRequest","postAptosFullNode","postAptosIndexer","postAptosFaucet","modifiedAptosConfig","postAptosPepperService","postAptosProvingService"]}
@@ -1,2 +0,0 @@
1
- import{a as s}from"./chunk-EIWPAECI.mjs";import{b as o}from"./chunk-2VBY2V4Z.mjs";import{a as t}from"./chunk-TSPG5VED.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-QRW7MQDA.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
- import{a as e}from"./chunk-66F7RP7K.mjs";var r=class t extends e{constructor(i){super(),this.identifier=i}serialize(i){i.serializeStr(this.identifier)}static deserialize(i){let s=i.deserializeStr();return new t(s)}};export{r as a};
2
- //# sourceMappingURL=chunk-R7PCBRRT.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/transactions/instances/identifier.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Deserializer } from \"../../bcs/deserializer\";\nimport { Serializable, Serializer } from \"../../bcs/serializer\";\n\n/**\n * Represents an Identifier that can be serialized and deserialized.\n * This class is used to denote the module \"name\" in \"ModuleId\" and\n * the \"function name\" in \"EntryFunction\".\n *\n * @extends Serializable\n * @group Implementation\n * @category Transactions\n */\nexport class Identifier extends Serializable {\n public identifier: string;\n\n /**\n * Creates an instance of the class with a specified identifier.\n *\n * @param identifier - The unique identifier for the instance.\n * @group Implementation\n * @category Transactions\n */\n constructor(identifier: string) {\n super();\n this.identifier = identifier;\n }\n\n /**\n * Serializes the identifier of the current instance using the provided serializer.\n *\n * @param serializer - The serializer instance used to perform the serialization.\n * @group Implementation\n * @category Transactions\n */\n public serialize(serializer: Serializer): void {\n serializer.serializeStr(this.identifier);\n }\n\n /**\n * Deserializes an identifier from the provided deserializer.\n * This function is useful for reconstructing an Identifier object from a serialized format.\n *\n * @param deserializer - The deserializer instance used to read the serialized data.\n * @group Implementation\n * @category Transactions\n */\n static deserialize(deserializer: Deserializer): Identifier {\n const identifier = deserializer.deserializeStr();\n return new Identifier(identifier);\n }\n}\n"],"mappings":"yCAeO,IAAMA,EAAN,MAAMC,UAAmBC,CAAa,CAU3C,YAAYC,EAAoB,CAC9B,MAAM,EACN,KAAK,WAAaA,CACpB,CASO,UAAUC,EAA8B,CAC7CA,EAAW,aAAa,KAAK,UAAU,CACzC,CAUA,OAAO,YAAYC,EAAwC,CACzD,IAAMF,EAAaE,EAAa,eAAe,EAC/C,OAAO,IAAIJ,EAAWE,CAAU,CAClC,CACF","names":["Identifier","_Identifier","Serializable","identifier","serializer","deserializer"]}
@@ -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]);\n }\n}\n\nexport const hexToAsciiString = (hex: string) => new TextDecoder().decode(Hex.fromHexInput(hex).toUint8Array());\n"],"mappings":"yCAGA,OAAS,cAAAA,EAAY,cAAAC,MAAkB,sBAShC,IAAKC,OACVA,EAAA,UAAY,YACZA,EAAA,eAAiB,iBACjBA,EAAA,kBAAoB,oBAHVA,OAAA,IAgCCC,EAAN,MAAMC,CAAI,CAUf,YAAYC,EAAkB,CAC5B,KAAK,KAAOA,CACd,CAaA,cAA2B,CACzB,OAAO,KAAK,IACd,CASA,uBAAgC,CAC9B,OAAOC,EAAW,KAAK,IAAI,CAC7B,CASA,UAAmB,CACjB,MAAO,KAAK,KAAK,sBAAsB,CAAC,EAC1C,CAiBA,OAAO,cAAcC,EAAkB,CACrC,IAAIC,EAAQD,EAMZ,GAJIC,EAAM,WAAW,IAAI,IACvBA,EAAQA,EAAM,MAAM,CAAC,GAGnBA,EAAM,SAAW,EACnB,MAAM,IAAIC,EACR,4FACA,WACF,EAGF,GAAID,EAAM,OAAS,IAAM,EACvB,MAAM,IAAIC,EAAa,uDAAwD,gBAA+B,EAGhH,GAAI,CACF,OAAO,IAAIL,EAAIM,EAAWF,CAAK,CAAC,CAClC,OAASG,EAAY,CACnB,MAAM,IAAIF,EACR,+CAA+CE,GAAO,OAAO,GAC7D,mBACF,CACF,CACF,CAWA,OAAO,aAAaC,EAAyB,CAC3C,OAAIA,aAAoB,WAAmB,IAAIR,EAAIQ,CAAQ,EACpDR,EAAI,cAAcQ,CAAQ,CACnC,CAQA,OAAO,qBAAqBA,EAAgC,CAC1D,OAAIA,aAAoB,WAAmBA,EACpCR,EAAI,cAAcQ,CAAQ,EAAE,aAAa,CAClD,CAeA,OAAO,iBAAiBA,EAA4B,CAClD,OAAOR,EAAI,aAAaQ,CAAQ,EAAE,SAAS,CAC7C,CAeA,OAAO,8BAA8BA,EAA4B,CAC/D,OAAOR,EAAI,aAAaQ,CAAQ,EAAE,sBAAsB,CAC1D,CAkBA,OAAO,QAAQL,EAA8C,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-LTZRUAGD.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-TEI33TO7.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,GAAGA,EAAY,gBAAgB,OAAQ,CAC1F,CACF,CAAC,CACH,CAYA,eAAsBW,EACpBZ,EACkC,CAClC,OAAOD,EAAc,CAAE,GAAGC,EAAS,aAA0B,CAAC,CAChE,CAOA,eAAsBa,EACpBb,EACc,CACd,IAAIc,EAAW,CAAC,EACZC,EACEC,EAAgBhB,EAAQ,OAC9B,EAAG,CACD,IAAMiB,EAAW,MAAMlB,EAAc,CACnC,gBACA,YAAaC,EAAQ,YACrB,aAAcA,EAAQ,aACtB,KAAMA,EAAQ,KACd,OAAQgB,EACR,UAAWhB,EAAQ,SACrB,CAAC,EAQDe,EAASE,EAAS,QAAQ,gBAAgB,EAG1C,OAAOA,EAAS,QAEhBH,EAAMA,EAAI,OAAOG,EAAS,IAAI,EAC9BD,EAAc,MAAQD,CACxB,OAASA,GAAW,MACpB,OAAOD,CACT,CAGA,eAAsBI,EACpBlB,EACc,CACd,IAAIc,EAAW,CAAC,EACZC,EACEC,EAAgBhB,EAAQ,OACxBmB,EAAaH,EAAc,MACjC,EAAG,CACD,GAAM,CAAE,SAAAC,EAAU,OAAQG,CAAU,EAAI,MAAMC,EAAsC,CAAE,GAAGrB,CAAQ,CAAC,EAelG,GARAe,EAASK,EAETN,EAAMA,EAAI,OAAOG,EAAS,IAAI,EAC1BjB,GAAS,SACXA,EAAQ,OAAO,MAAQe,GAIrBI,IAAe,OAAW,CAC5B,IAAMG,EAAWH,EAAaL,EAAI,OAClC,GAAIQ,GAAY,EACd,MAEFN,EAAc,MAAQM,CACxB,CACF,OAASP,GAAW,MACpB,OAAOD,CACT,CAEA,eAAsBO,EACpBrB,EAC4E,CAC5E,IAAMgB,EAAoD,CAAC,EAIvD,OAAOhB,EAAQ,QAAQ,QAAW,WACpCgB,EAAc,MAAQhB,EAAQ,OAAO,QAEnC,OAAOA,EAAQ,QAAQ,OAAU,WACnCgB,EAAc,MAAQhB,EAAQ,OAAO,OAGvC,IAAMiB,EAAW,MAAMlB,EAAc,CACnC,gBACA,YAAaC,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
- import{b as c}from"./chunk-FDHHQUS3.mjs";import{a as o}from"./chunk-66F7RP7K.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-TSPG5VED.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":"2HAGA,OAAS,YAAYA,MAAgB,qBAmB9B,IAAMC,EAAN,MAAMA,UAA0BC,CAAa,CA4BlD,YAAYC,EAA0B,CACpC,MAAM,EACN,GAAM,CAAE,KAAAC,CAAK,EAAID,EACXE,EAAMC,EAAI,aAAaF,CAAI,EACjC,GAAIC,EAAI,aAAa,EAAE,SAAWJ,EAAkB,OAClD,MAAM,IAAI,MAAM,uCAAuCA,EAAkB,MAAM,EAAE,EAEnF,KAAK,KAAOI,CACd,CASA,UAAUE,EAA8B,CACtCA,EAAW,oBAAoB,KAAK,KAAK,aAAa,CAAC,CACzD,CASA,OAAO,YAAYC,EAA+C,CAChE,IAAMC,EAAQD,EAAa,sBAAsBP,EAAkB,MAAM,EACzE,OAAO,IAAIA,EAAkB,CAAE,KAAMQ,CAAM,CAAC,CAC9C,CAWA,cAA2B,CACzB,OAAO,KAAK,KAAK,aAAa,CAChC,CAaA,OAAO,mBAAmBN,EAA+E,CACvG,GAAM,CAAE,OAAAO,EAAQ,MAAAC,CAAM,EAAIR,EACpBS,EAAaN,EAAI,aAAaK,CAAK,EAAE,aAAa,EAClDE,EAAY,IAAI,WAAW,CAAC,GAAGD,EAAYF,CAAM,CAAC,EAClDI,EAAOC,EAAS,OAAO,EAC7BD,EAAK,OAAOD,CAAS,EACrB,IAAMG,EAAaF,EAAK,OAAO,EAC/B,OAAO,IAAIb,EAAkB,CAAE,KAAMe,CAAW,CAAC,CACnD,CAYA,OAAc,uBAAuBb,EAAwE,CAC3G,GAAM,CAAE,UAAAc,CAAU,EAAId,EACtB,OAAOc,EAAU,QAAQ,CAC3B,CAWA,OAAO,cAAcd,EAA0D,CAC7E,GAAM,CAAE,UAAAc,CAAU,EAAId,EACtB,OAAOc,EAAU,QAAQ,CAC3B,CASA,gBAAiC,CAC/B,OAAO,IAAIC,EAAe,KAAK,KAAK,aAAa,CAAC,CACpD,CACF,EAtIajB,EAQK,OAAiB,GAR5B,IAAMkB,EAANlB","names":["sha3Hash","_AuthenticationKey","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 o,b as r,c as s}from"./chunk-NTREJSOS.mjs";import{a as t}from"./chunk-WD3SPNH7.mjs";var a=class{constructor(e){this.config=e}async getTableItem(e){return o({aptosConfig:this.config,...e})}async getTableItemsData(e){return await t({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"default_processor"}),r({aptosConfig:this.config,...e})}async getTableItemsMetadata(e){return await t({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"default_processor"}),s({aptosConfig:this.config,...e})}};export{a};
2
- //# sourceMappingURL=chunk-UBPX6GOS.mjs.map