@aptos-labs/ts-sdk 2.0.1 → 3.1.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 (343) hide show
  1. package/dist/common/account-Bb5REyaT.d.ts +7412 -0
  2. package/dist/common/chunk-6MMUUJHX.js +4 -0
  3. package/dist/common/{chunk-ZMDE3DNL.js.map → chunk-6MMUUJHX.js.map} +1 -1
  4. package/dist/common/cli/index.d.ts +1 -1
  5. package/dist/common/cli/index.js +1 -1
  6. package/dist/common/index.d.ts +5876 -9769
  7. package/dist/common/index.js +55 -32
  8. package/dist/common/index.js.map +1 -1
  9. package/dist/esm/{Ed25519Account-D9XrCLfE.d.mts → Ed25519Account-ndmdpFe9.d.mts} +1 -9
  10. package/dist/esm/account/AbstractKeylessAccount.d.mts +4 -31
  11. package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
  12. package/dist/esm/account/AbstractedAccount.d.mts +5 -32
  13. package/dist/esm/account/AbstractedAccount.mjs +1 -1
  14. package/dist/esm/account/Account.d.mts +3 -30
  15. package/dist/esm/account/Account.mjs +1 -1
  16. package/dist/esm/account/AccountUtils.d.mts +4 -31
  17. package/dist/esm/account/AccountUtils.mjs +1 -1
  18. package/dist/esm/account/DerivableAbstractedAccount.d.mts +5 -32
  19. package/dist/esm/account/DerivableAbstractedAccount.mjs +1 -1
  20. package/dist/esm/account/Ed25519Account.d.mts +3 -30
  21. package/dist/esm/account/Ed25519Account.mjs +1 -1
  22. package/dist/esm/account/EphemeralKeyPair.d.mts +2 -11
  23. package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
  24. package/dist/esm/account/FederatedKeylessAccount.d.mts +5 -31
  25. package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
  26. package/dist/esm/account/KeylessAccount.d.mts +5 -31
  27. package/dist/esm/account/KeylessAccount.mjs +1 -1
  28. package/dist/esm/account/MultiEd25519Account.d.mts +3 -30
  29. package/dist/esm/account/MultiEd25519Account.mjs +1 -1
  30. package/dist/esm/account/MultiKeyAccount.d.mts +5 -32
  31. package/dist/esm/account/MultiKeyAccount.mjs +1 -1
  32. package/dist/esm/account/SingleKeyAccount.d.mts +3 -30
  33. package/dist/esm/account/SingleKeyAccount.mjs +1 -1
  34. package/dist/esm/account/index.d.mts +4 -31
  35. package/dist/esm/account/index.mjs +1 -1
  36. package/dist/esm/account/utils.d.mts +2 -6
  37. package/dist/esm/account/utils.mjs +1 -1
  38. package/dist/esm/account--Q9z_xMN.d.mts +6625 -0
  39. package/dist/esm/api/account/abstraction.d.mts +2 -29
  40. package/dist/esm/api/account/abstraction.mjs +1 -1
  41. package/dist/esm/api/account.d.mts +95 -31
  42. package/dist/esm/api/account.mjs +1 -1
  43. package/dist/esm/api/ans.d.mts +3 -30
  44. package/dist/esm/api/ans.mjs +1 -1
  45. package/dist/esm/api/aptos.d.mts +8 -32
  46. package/dist/esm/api/aptos.mjs +1 -1
  47. package/dist/esm/api/aptosConfig.d.mts +4 -187
  48. package/dist/esm/api/aptosConfig.mjs +1 -1
  49. package/dist/esm/api/coin.d.mts +2 -29
  50. package/dist/esm/api/coin.mjs +1 -1
  51. package/dist/esm/api/digitalAsset.d.mts +3 -30
  52. package/dist/esm/api/digitalAsset.mjs +1 -1
  53. package/dist/esm/api/event.d.mts +2 -8
  54. package/dist/esm/api/event.mjs +1 -1
  55. package/dist/esm/api/faucet.d.mts +2 -8
  56. package/dist/esm/api/faucet.mjs +1 -1
  57. package/dist/esm/api/fungibleAsset.d.mts +2 -29
  58. package/dist/esm/api/fungibleAsset.mjs +1 -1
  59. package/dist/esm/api/general.d.mts +2 -29
  60. package/dist/esm/api/general.mjs +1 -1
  61. package/dist/esm/api/index.d.mts +6 -31
  62. package/dist/esm/api/index.mjs +1 -1
  63. package/dist/esm/api/keyless.d.mts +4 -31
  64. package/dist/esm/api/keyless.mjs +1 -1
  65. package/dist/esm/api/object.d.mts +2 -8
  66. package/dist/esm/api/object.mjs +1 -1
  67. package/dist/esm/api/staking.d.mts +2 -8
  68. package/dist/esm/api/staking.mjs +1 -1
  69. package/dist/esm/api/table.d.mts +2 -2
  70. package/dist/esm/api/table.mjs +1 -1
  71. package/dist/esm/api/transaction.d.mts +7 -33
  72. package/dist/esm/api/transaction.mjs +1 -1
  73. package/dist/esm/api/transactionSubmission/build.d.mts +2 -29
  74. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  75. package/dist/esm/api/transactionSubmission/management.d.mts +2 -29
  76. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  77. package/dist/esm/api/transactionSubmission/sign.d.mts +3 -30
  78. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  79. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  80. package/dist/esm/api/transactionSubmission/simulate.d.mts +2 -29
  81. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  82. package/dist/esm/api/transactionSubmission/submit.d.mts +4 -31
  83. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  84. package/dist/esm/api/utils.d.mts +2 -2
  85. package/dist/esm/api/utils.mjs +1 -1
  86. package/dist/esm/bcs/consts.d.mts +3 -1
  87. package/dist/esm/bcs/deserializer.d.mts +3 -304
  88. package/dist/esm/bcs/index.d.mts +2 -8
  89. package/dist/esm/bcs/index.mjs +1 -1
  90. package/dist/esm/bcs/serializable/entryFunctionBytes.d.mts +3 -7
  91. package/dist/esm/bcs/serializable/fixedBytes.d.mts +3 -90
  92. package/dist/esm/bcs/serializable/movePrimitives.d.mts +2 -167
  93. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  94. package/dist/esm/bcs/serializable/moveStructs.d.mts +2 -430
  95. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  96. package/dist/esm/bcs/serializer.d.mts +3 -325
  97. package/dist/esm/{chunk-Q4W3WJ2U.mjs → chunk-2BOHKN33.mjs} +2 -2
  98. package/dist/esm/{chunk-AMAPBD4D.mjs → chunk-4COLMDT3.mjs} +2 -2
  99. package/dist/esm/chunk-5HXLZHDW.mjs +1 -0
  100. package/dist/esm/chunk-5HXLZHDW.mjs.map +1 -0
  101. package/dist/esm/{chunk-UOP7GBXB.mjs → chunk-5URUYE6H.mjs} +2 -2
  102. package/dist/esm/chunk-ACNHLCQQ.mjs +6 -0
  103. package/dist/esm/chunk-ACNHLCQQ.mjs.map +1 -0
  104. package/dist/esm/{chunk-V74WPKSY.mjs → chunk-FYYEPFML.mjs} +2 -2
  105. package/dist/esm/chunk-HUWKPKPQ.mjs +2 -0
  106. package/dist/esm/{chunk-VEGW6HP5.mjs.map → chunk-HUWKPKPQ.mjs.map} +1 -1
  107. package/dist/esm/chunk-IJE2LVZG.mjs +2 -0
  108. package/dist/esm/chunk-IJE2LVZG.mjs.map +1 -0
  109. package/dist/esm/chunk-JCFTAG5Z.mjs +2 -0
  110. package/dist/esm/{chunk-RJ7F4JDV.mjs.map → chunk-JCFTAG5Z.mjs.map} +1 -1
  111. package/dist/esm/{chunk-CZYH3G7E.mjs → chunk-MML57K5H.mjs} +2 -2
  112. package/dist/esm/{chunk-57J5YBMT.mjs → chunk-MNDTFHDB.mjs} +2 -2
  113. package/dist/esm/{chunk-U7HD6PQV.mjs → chunk-SLWIGOQL.mjs} +2 -2
  114. package/dist/esm/{chunk-V2QSMVJ5.mjs → chunk-TYYVB2A6.mjs} +2 -2
  115. package/dist/esm/{chunk-HETYL3WN.mjs → chunk-U3GMNXO4.mjs} +2 -2
  116. package/dist/esm/{chunk-VHNX2NUR.mjs → chunk-UL777LTI.mjs} +47 -26
  117. package/dist/esm/chunk-UL777LTI.mjs.map +1 -0
  118. package/dist/esm/{chunk-GBNAG7KK.mjs → chunk-XZ75T7Q7.mjs} +2 -2
  119. package/dist/esm/chunk-Y7ZQTLH4.mjs +2 -0
  120. package/dist/esm/chunk-Y7ZQTLH4.mjs.map +1 -0
  121. package/dist/esm/{chunk-KRBZ54CY.mjs → chunk-Z5URUE4U.mjs} +2 -2
  122. package/dist/esm/cli/index.d.mts +3 -7
  123. package/dist/esm/cli/index.mjs +1 -1
  124. package/dist/esm/cli/localNode.mjs +1 -1
  125. package/dist/esm/cli/move.d.mts +3 -7
  126. package/dist/esm/client/core.d.mts +3 -3
  127. package/dist/esm/client/core.mjs +1 -1
  128. package/dist/esm/client/get.d.mts +3 -3
  129. package/dist/esm/client/get.mjs +1 -1
  130. package/dist/esm/client/index.d.mts +2 -2
  131. package/dist/esm/client/index.mjs +1 -1
  132. package/dist/esm/client/post.d.mts +3 -3
  133. package/dist/esm/client/post.mjs +1 -1
  134. package/dist/esm/core/account/index.d.mts +3 -7
  135. package/dist/esm/core/account/index.mjs +1 -1
  136. package/dist/esm/core/account/utils/address.d.mts +3 -7
  137. package/dist/esm/core/account/utils/address.mjs +1 -1
  138. package/dist/esm/core/account/utils/index.d.mts +3 -7
  139. package/dist/esm/core/account/utils/index.mjs +1 -1
  140. package/dist/esm/core/accountAddress.d.mts +3 -329
  141. package/dist/esm/core/accountAddress.mjs +1 -1
  142. package/dist/esm/core/authenticationKey.d.mts +2 -10
  143. package/dist/esm/core/authenticationKey.mjs +1 -1
  144. package/dist/esm/core/crypto/abstraction.d.mts +2 -10
  145. package/dist/esm/core/crypto/abstraction.mjs +1 -1
  146. package/dist/esm/core/crypto/deserializationUtils.d.mts +2 -10
  147. package/dist/esm/core/crypto/deserializationUtils.mjs +1 -1
  148. package/dist/esm/core/crypto/ed25519.d.mts +2 -301
  149. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  150. package/dist/esm/core/crypto/ephemeral.d.mts +2 -10
  151. package/dist/esm/core/crypto/ephemeral.mjs +1 -1
  152. package/dist/esm/core/crypto/federatedKeyless.d.mts +4 -12
  153. package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
  154. package/dist/esm/core/crypto/index.d.mts +4 -17
  155. package/dist/esm/core/crypto/index.mjs +1 -1
  156. package/dist/esm/core/crypto/keyless.d.mts +3 -11
  157. package/dist/esm/core/crypto/keyless.mjs +1 -1
  158. package/dist/esm/core/crypto/multiEd25519.d.mts +2 -228
  159. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  160. package/dist/esm/core/crypto/multiKey.d.mts +2 -254
  161. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  162. package/dist/esm/core/crypto/privateKey.d.mts +2 -71
  163. package/dist/esm/core/crypto/privateKey.mjs +1 -1
  164. package/dist/esm/core/crypto/proof.d.mts +3 -4
  165. package/dist/esm/core/crypto/proof.mjs +1 -1
  166. package/dist/esm/core/crypto/publicKey.d.mts +2 -10
  167. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  168. package/dist/esm/core/crypto/secp256k1.d.mts +2 -274
  169. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  170. package/dist/esm/core/crypto/signature.d.mts +3 -31
  171. package/dist/esm/core/crypto/signature.mjs +1 -1
  172. package/dist/esm/core/crypto/singleKey.d.mts +2 -182
  173. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  174. package/dist/esm/core/crypto/types.d.mts +11 -0
  175. package/dist/esm/core/crypto/types.mjs +2 -0
  176. package/dist/esm/core/crypto/types.mjs.map +1 -0
  177. package/dist/esm/core/crypto/utils.d.mts +3 -1
  178. package/dist/esm/core/hex.d.mts +3 -156
  179. package/dist/esm/core/index.d.mts +3 -16
  180. package/dist/esm/core/index.mjs +1 -1
  181. package/dist/esm/errors/index.d.mts +2 -1
  182. package/dist/esm/errors/index.mjs +1 -1
  183. package/dist/esm/{federatedKeyless-DAYXjY2Y.d.mts → federatedKeyless-CiyplsOB.d.mts} +1 -7
  184. package/dist/esm/index.d.mts +7 -32
  185. package/dist/esm/index.mjs +1 -1
  186. package/dist/esm/internal/abstraction.d.mts +2 -29
  187. package/dist/esm/internal/abstraction.mjs +1 -1
  188. package/dist/esm/internal/account.d.mts +39 -36
  189. package/dist/esm/internal/account.mjs +1 -1
  190. package/dist/esm/internal/ans.d.mts +3 -30
  191. package/dist/esm/internal/ans.mjs +1 -1
  192. package/dist/esm/internal/coin.d.mts +3 -30
  193. package/dist/esm/internal/coin.mjs +1 -1
  194. package/dist/esm/internal/digitalAsset.d.mts +3 -30
  195. package/dist/esm/internal/digitalAsset.mjs +1 -1
  196. package/dist/esm/internal/event.d.mts +2 -8
  197. package/dist/esm/internal/event.mjs +1 -1
  198. package/dist/esm/internal/faucet.d.mts +3 -9
  199. package/dist/esm/internal/faucet.mjs +1 -1
  200. package/dist/esm/internal/fungibleAsset.d.mts +3 -30
  201. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  202. package/dist/esm/internal/general.d.mts +2 -2
  203. package/dist/esm/internal/general.mjs +1 -1
  204. package/dist/esm/internal/keyless.d.mts +14 -32
  205. package/dist/esm/internal/keyless.mjs +1 -1
  206. package/dist/esm/internal/object.d.mts +2 -8
  207. package/dist/esm/internal/object.mjs +1 -1
  208. package/dist/esm/internal/staking.d.mts +2 -8
  209. package/dist/esm/internal/staking.mjs +1 -1
  210. package/dist/esm/internal/table.d.mts +2 -2
  211. package/dist/esm/internal/table.mjs +1 -1
  212. package/dist/esm/internal/transaction.d.mts +3 -3
  213. package/dist/esm/internal/transaction.mjs +1 -1
  214. package/dist/esm/internal/transactionSubmission.d.mts +6 -33
  215. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  216. package/dist/esm/internal/utils/index.d.mts +2 -8
  217. package/dist/esm/internal/utils/index.mjs +1 -1
  218. package/dist/esm/internal/utils/utils.d.mts +2 -8
  219. package/dist/esm/internal/utils/utils.mjs +1 -1
  220. package/dist/esm/internal/view.d.mts +1 -28
  221. package/dist/esm/internal/view.mjs +1 -1
  222. package/dist/esm/transactions/authenticator/account.d.mts +2 -179
  223. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  224. package/dist/esm/transactions/authenticator/index.d.mts +2 -17
  225. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  226. package/dist/esm/transactions/authenticator/transaction.d.mts +2 -17
  227. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  228. package/dist/esm/transactions/index.d.mts +3 -30
  229. package/dist/esm/transactions/index.mjs +1 -1
  230. package/dist/esm/transactions/instances/chainId.d.mts +3 -44
  231. package/dist/esm/transactions/instances/identifier.d.mts +2 -44
  232. package/dist/esm/transactions/instances/index.d.mts +2 -27
  233. package/dist/esm/transactions/instances/index.mjs +1 -1
  234. package/dist/esm/transactions/instances/moduleId.d.mts +3 -57
  235. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  236. package/dist/esm/transactions/instances/multiAgentTransaction.d.mts +2 -60
  237. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  238. package/dist/esm/transactions/instances/rawTransaction.d.mts +2 -150
  239. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  240. package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +2 -12
  241. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  242. package/dist/esm/transactions/instances/signedTransaction.d.mts +2 -23
  243. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  244. package/dist/esm/transactions/instances/simpleTransaction.d.mts +2 -59
  245. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  246. package/dist/esm/transactions/instances/transactionArgument.d.mts +2 -74
  247. package/dist/esm/transactions/instances/transactionPayload.d.mts +2 -300
  248. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  249. package/dist/esm/transactions/management/accountSequenceNumber.d.mts +2 -29
  250. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  251. package/dist/esm/transactions/management/index.d.mts +2 -29
  252. package/dist/esm/transactions/management/index.mjs +1 -1
  253. package/dist/esm/transactions/management/transactionWorker.d.mts +2 -29
  254. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  255. package/dist/esm/transactions/transactionBuilder/helpers.d.mts +3 -30
  256. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  257. package/dist/esm/transactions/transactionBuilder/index.d.mts +2 -29
  258. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  259. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +2 -29
  260. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  261. package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +1 -28
  262. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
  263. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +3 -29
  264. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  265. package/dist/esm/transactions/typeTag/index.d.mts +2 -462
  266. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  267. package/dist/esm/transactions/typeTag/parser.d.mts +2 -8
  268. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  269. package/dist/esm/transactions/types.d.mts +3 -399
  270. package/dist/esm/types/generated/operations.d.mts +37 -10
  271. package/dist/esm/types/generated/queries.d.mts +6 -2
  272. package/dist/esm/types/generated/queries.mjs +1 -1
  273. package/dist/esm/types/generated/types.d.mts +584 -1172
  274. package/dist/esm/types/generated/types.mjs +1 -1
  275. package/dist/esm/types/generated/types.mjs.map +1 -1
  276. package/dist/esm/types/index.d.mts +4 -2
  277. package/dist/esm/types/index.mjs +1 -1
  278. package/dist/esm/types/indexer.d.mts +8 -2
  279. package/dist/esm/types/types.d.mts +5 -1298
  280. package/dist/esm/types/types.mjs +1 -1
  281. package/dist/esm/utils/const.d.mts +1 -0
  282. package/dist/esm/utils/const.mjs +1 -1
  283. package/dist/esm/utils/helpers.d.mts +2 -6
  284. package/dist/esm/utils/helpers.mjs +1 -1
  285. package/dist/esm/utils/index.d.mts +1 -6
  286. package/dist/esm/utils/index.mjs +1 -1
  287. package/dist/esm/utils/normalizeBundle.d.mts +2 -4
  288. package/dist/esm/utils/normalizeBundle.mjs +1 -1
  289. package/dist/esm/version.d.mts +1 -1
  290. package/dist/esm/version.mjs +1 -1
  291. package/package.json +1 -1
  292. package/src/account/FederatedKeylessAccount.ts +7 -1
  293. package/src/account/KeylessAccount.ts +17 -2
  294. package/src/api/account.ts +135 -2
  295. package/src/api/aptos.ts +6 -2
  296. package/src/api/aptosConfig.ts +73 -2
  297. package/src/api/transaction.ts +10 -6
  298. package/src/api/transactionSubmission/build.ts +5 -1
  299. package/src/api/transactionSubmission/submit.ts +16 -12
  300. package/src/core/crypto/index.ts +1 -0
  301. package/src/core/crypto/multiEd25519.ts +26 -0
  302. package/src/core/crypto/multiKey.ts +20 -1
  303. package/src/core/crypto/types.ts +9 -0
  304. package/src/internal/account.ts +526 -59
  305. package/src/internal/keyless.ts +10 -0
  306. package/src/internal/queries/getAccountAddressesForAuthKey.graphql +8 -0
  307. package/src/internal/queries/getAuthKeysForPublicKey.graphql +11 -0
  308. package/src/internal/transactionSubmission.ts +20 -10
  309. package/src/transactions/instances/transactionPayload.ts +165 -2
  310. package/src/transactions/management/transactionWorker.ts +1 -1
  311. package/src/transactions/transactionBuilder/transactionBuilder.ts +64 -5
  312. package/src/transactions/types.ts +61 -10
  313. package/src/types/codegen.yaml +1 -1
  314. package/src/types/generated/operations.ts +39 -8
  315. package/src/types/generated/queries.ts +53 -0
  316. package/src/types/generated/types.ts +620 -1239
  317. package/src/types/indexer.ts +8 -0
  318. package/src/types/types.ts +151 -3
  319. package/src/utils/const.ts +1 -0
  320. package/src/version.ts +1 -1
  321. package/dist/common/accountAddress-AL8HRxQC.d.ts +0 -3148
  322. package/dist/common/chunk-ZMDE3DNL.js +0 -4
  323. package/dist/esm/chunk-BK56GLTP.mjs +0 -4
  324. package/dist/esm/chunk-BK56GLTP.mjs.map +0 -1
  325. package/dist/esm/chunk-ODAAZLPK.mjs +0 -2
  326. package/dist/esm/chunk-ODAAZLPK.mjs.map +0 -1
  327. package/dist/esm/chunk-RJ7F4JDV.mjs +0 -2
  328. package/dist/esm/chunk-VEGW6HP5.mjs +0 -2
  329. package/dist/esm/chunk-VHNX2NUR.mjs.map +0 -1
  330. package/dist/esm/chunk-XTMUMN74.mjs +0 -2
  331. package/dist/esm/chunk-XTMUMN74.mjs.map +0 -1
  332. package/dist/esm/publicKey-CJOcUwJK.d.mts +0 -213
  333. /package/dist/esm/{chunk-Q4W3WJ2U.mjs.map → chunk-2BOHKN33.mjs.map} +0 -0
  334. /package/dist/esm/{chunk-AMAPBD4D.mjs.map → chunk-4COLMDT3.mjs.map} +0 -0
  335. /package/dist/esm/{chunk-UOP7GBXB.mjs.map → chunk-5URUYE6H.mjs.map} +0 -0
  336. /package/dist/esm/{chunk-V74WPKSY.mjs.map → chunk-FYYEPFML.mjs.map} +0 -0
  337. /package/dist/esm/{chunk-CZYH3G7E.mjs.map → chunk-MML57K5H.mjs.map} +0 -0
  338. /package/dist/esm/{chunk-57J5YBMT.mjs.map → chunk-MNDTFHDB.mjs.map} +0 -0
  339. /package/dist/esm/{chunk-U7HD6PQV.mjs.map → chunk-SLWIGOQL.mjs.map} +0 -0
  340. /package/dist/esm/{chunk-V2QSMVJ5.mjs.map → chunk-TYYVB2A6.mjs.map} +0 -0
  341. /package/dist/esm/{chunk-HETYL3WN.mjs.map → chunk-U3GMNXO4.mjs.map} +0 -0
  342. /package/dist/esm/{chunk-GBNAG7KK.mjs.map → chunk-XZ75T7Q7.mjs.map} +0 -0
  343. /package/dist/esm/{chunk-KRBZ54CY.mjs.map → chunk-Z5URUE4U.mjs.map} +0 -0
@@ -1,435 +1,7 @@
1
- import { U8, U16, U32, U64, U128, U256, Bool } from './movePrimitives.mjs';
2
- import { Serializable, Serializer } from '../serializer.mjs';
3
- import { Deserializer, Deserializable } from '../deserializer.mjs';
4
- import { HexInput, AnyNumber } from '../../types/types.mjs';
5
- import { EntryFunctionArgument, TransactionArgument } from '../../transactions/instances/transactionArgument.mjs';
1
+ export { k as MoveOption, j as MoveString, M as MoveVector, i as Serialized } from '../../account--Q9z_xMN.mjs';
6
2
  import '../../types/indexer.mjs';
7
3
  import '../../types/generated/operations.mjs';
8
4
  import '../../types/generated/types.mjs';
9
5
  import '../../utils/apiEndpoints.mjs';
10
- import '../../core/hex.mjs';
6
+ import '../../utils/const.mjs';
11
7
  import '../../core/common.mjs';
12
-
13
- /**
14
- * This class is the Aptos Typescript SDK representation of a Move `vector<T>`,
15
- * where `T` represents either a primitive type (`bool`, `u8`, `u64`, ...)
16
- * or a BCS-serializable struct itself.
17
- *
18
- * It is a BCS-serializable, array-like type that contains an array of values of type `T`,
19
- * where `T` is a class that implements `Serializable`.
20
- *
21
- * The purpose of this class is to facilitate easy construction of BCS-serializable
22
- * Move `vector<T>` types.
23
- *
24
- * @example
25
- * // in Move: `vector<u8> [1, 2, 3, 4];`
26
- * const vecOfU8s = new MoveVector<U8>([new U8(1), new U8(2), new U8(3), new U8(4)]);
27
- * // in Move: `std::bcs::to_bytes(vector<u8> [1, 2, 3, 4]);`
28
- * const bcsBytes = vecOfU8s.toUint8Array();
29
- *
30
- * // vector<vector<u8>> [ vector<u8> [1], vector<u8> [1, 2, 3, 4], vector<u8> [5, 6, 7, 8] ];
31
- * const vecOfVecs = new MoveVector<MoveVector<U8>>([
32
- * new MoveVector<U8>([new U8(1)]),
33
- * MoveVector.U8([1, 2, 3, 4]),
34
- * MoveVector.U8([5, 6, 7, 8]),
35
- * ]);
36
- *
37
- * // vector<Option<u8>> [ std::option::some<u8>(1), std::option::some<u8>(2) ];
38
- * const vecOfOptionU8s = new MoveVector<MoveOption<U8>>([
39
- * MoveOption.U8(1),
40
- * MoveOption.U8(2),
41
- * ]);
42
- *
43
- * // vector<MoveString> [ std::string::utf8(b"hello"), std::string::utf8(b"world") ];
44
- * const vecOfStrings = new MoveVector([new MoveString("hello"), new MoveString("world")]);
45
- * const vecOfStrings2 = MoveVector.MoveString(["hello", "world"]);
46
- *
47
- * @param values an Array<T> of values where T is a class that implements Serializable
48
- * @returns a `MoveVector<T>` with the values `values`
49
- * @group Implementation
50
- * @category BCS
51
- */
52
- declare class MoveVector<T extends Serializable & EntryFunctionArgument> extends Serializable implements TransactionArgument {
53
- values: Array<T>;
54
- /**
55
- * Initializes a new instance of the class with an optional value.
56
- * This constructor sets up the internal vector based on the provided value.
57
- *
58
- * @param values - The initial value to be stored in the vector, or null to initialize an empty vector.
59
- * @group Implementation
60
- * @category BCS
61
- */
62
- constructor(values: Array<T>);
63
- /**
64
- * Serializes the current instance into a byte sequence suitable for entry functions.
65
- * This allows the data to be properly formatted for transmission or storage.
66
- *
67
- * @param serializer - The serializer instance used to serialize the byte sequence.
68
- * @group Implementation
69
- * @category BCS
70
- */
71
- serializeForEntryFunction(serializer: Serializer): void;
72
- /**
73
- * NOTE: This function will only work when the inner values in the `MoveVector` are `U8`s.
74
- * @param serializer
75
- * @group Implementation
76
- * @category BCS
77
- */
78
- /**
79
- * Serialize the string as a fixed byte string without the length prefix for use in a script function.
80
- * @param serializer - The serializer used to convert the byte vector into a format suitable for a script function.
81
- * @group Implementation
82
- * @category BCS
83
- */
84
- serializeForScriptFunction(serializer: Serializer): void;
85
- /**
86
- * Factory method to generate a MoveVector<U8> from a `number` or `undefined`.
87
- *
88
- * This method allows you to create a MoveVector that encapsulates a U8 value, enabling you to handle optional U8 values
89
- * effectively.
90
- *
91
- * @param values - The values used to fill the MoveVector. If `values` is undefined or null, the resulting MoveVector's
92
- * `.isSome()` method will return false.
93
- * @returns A MoveVector<U8> with an inner value `value`.
94
- *
95
- * @example
96
- * ```typescript
97
- * const v = MoveVector.U8([1, 2, 3, 4]);
98
- * ```
99
- * @group Implementation
100
- * @category BCS
101
- */
102
- static U8(values: Array<number> | HexInput): MoveVector<U8>;
103
- /**
104
- * Factory method to generate a MoveOption<U16> from a `number` or `null`.
105
- *
106
- * This method allows you to create a MoveVector that can either hold a U16 value or be empty.
107
- *
108
- * @param values - The value used to fill the MoveVector. If `value` is null or undefined, the resulting MoveVector's
109
- * `.isSome()` method will return false.
110
- * @returns A MoveVector<U16> with an inner value `value`.
111
- * @example
112
- * ```typescript
113
- * const v = MoveVector.U16([1, 2, 3, 4]);
114
- * ```
115
- * @group Implementation
116
- * @category BCS
117
-
118
- */
119
- static U16(values: Array<number>): MoveVector<U16>;
120
- /**
121
- * Factory method to generate a MoveVector<U32> from a `number` or `null`.
122
- *
123
- * This method allows you to create a MoveVector that can either hold a U32 value or be empty.
124
- *
125
- * @param values - The value used to fill the MoveVector. If `value` is null or undefined,
126
- * the resulting MoveVector's .isSome() method will return false.
127
- * @returns A MoveVector<U32> with an inner value `value`.
128
- *
129
- * @example
130
- * ```
131
- * const v = MoveVector.U32([1, 2, 3, 4]);
132
- * ```
133
- * @group Implementation
134
- * @category BCS
135
-
136
- */
137
- static U32(values: Array<number>): MoveVector<U32>;
138
- /**
139
- * Factory method to generate a MoveVector<U64> from a number, bigint, or null/undefined.
140
- * This allows for the creation of an optional U64 value that can be checked for presence.
141
- *
142
- * @param values - The value used to fill the MoveVector. If `value` is undefined or null, the resulting MoveVector's
143
- * `.isSome()` method will return false.
144
- * @returns A MoveVector<U64> with an inner value `value`.
145
- *
146
- * @example
147
- * ```typescript
148
- * const v = MoveVector.U64([1, 2, 3, 4]);
149
- * ```
150
- * @group Implementation
151
- * @category BCS
152
- */
153
- static U64(values: Array<AnyNumber>): MoveVector<U64>;
154
- /**
155
- * Factory method to generate a MoveVector<U128> from a number, bigint, or undefined.
156
- *
157
- * @param values - The value used to fill the MoveVector. If `value` is undefined, the resulting MoveVector's `.isSome()`
158
- * method will return false.
159
- * @returns A MoveVector<U128> with an inner value `value`.
160
- *
161
- * @example
162
- * ```typescript
163
- * const v = MoveVector.U128([1, 2, 3, 4]);
164
- * ```
165
- * @group Implementation
166
- * @category BCS
167
- */
168
- static U128(values: Array<AnyNumber>): MoveVector<U128>;
169
- /**
170
- * Factory method to generate a MoveVector<U256> from a number, bigint, or null/undefined.
171
- * This allows for the creation of an optional U256 value, enabling checks for presence or absence of a value.
172
- *
173
- * @param values - The value used to fill the MoveVector. If `value` is undefined or null,
174
- * the resulting MoveVector's .isSome() method will return false.
175
- * @returns A MoveVector<U256> with an inner value `value`.
176
- *
177
- * @example
178
- * ```typescript
179
- * const v = MoveVector.U256([1, 2, 3, 4]);
180
- * ```
181
- * @group Implementation
182
- * @category BCS
183
- */
184
- static U256(values: Array<AnyNumber>): MoveVector<U256>;
185
- /**
186
- * Factory method to generate a MoveVector<Bool> from a `boolean` or `undefined`.
187
- * This method allows you to create an optional boolean value that can be used in various contexts where a boolean may or may
188
- * not be present.
189
- *
190
- * @param values - The value used to fill the MoveVector. If `value` is undefined, the resulting MoveVector's .isSome() method
191
- * will return false.
192
- * @returns A MoveVector<Bool> with an inner value `value`.
193
- *
194
- * @example
195
- * * const v = MoveVector.Bool([true, false, true, false]);
196
- * @group Implementation
197
- * @category BCS
198
- */
199
- static Bool(values: Array<boolean>): MoveVector<Bool>;
200
- /**
201
- * Factory method to generate a MoveVector<MoveString> from a `string` or `undefined`.
202
- * This function creates a MoveVector that encapsulates a MoveString if the provided value is not null or undefined.
203
- *
204
- * @param values - The value used to fill the MoveVector. If `value` is undefined, the resulting MoveVector's .isSome() method
205
- * will return false.
206
- * @returns A MoveVector<MoveString> with an inner value `value`.
207
- *
208
- * @example
209
- * const v = MoveVector.MoveString(["hello", "world"]);
210
- * @group Implementation
211
- * @category BCS
212
- */
213
- static MoveString(values: Array<string>): MoveVector<MoveString>;
214
- /**
215
- * Serializes the current object using the provided serializer.
216
- * This function will serialize the value if it is present.
217
- *
218
- * @param serializer - The serializer instance used to perform the serialization.
219
- * @group Implementation
220
- * @category BCS
221
- */
222
- serialize(serializer: Serializer): void;
223
- /**
224
- * Deserialize a MoveVector of type T, specifically where T is a Serializable and Deserializable type.
225
- *
226
- * NOTE: This only works with a depth of one. Generics will not work.
227
- *
228
- * NOTE: This will not work with types that aren't of the Serializable class.
229
- *
230
- * If you're looking for a more flexible deserialization function, you can use the deserializeVector function
231
- * in the Deserializer class.
232
- *
233
- * @example
234
- * const vec = MoveVector.deserialize(deserializer, U64);
235
- * @param deserializer the Deserializer instance to use, with bytes loaded into it already.
236
- * @param cls the class to typecast the input values to, must be a Serializable and Deserializable type.
237
- * @returns a MoveVector of the corresponding class T
238
- *
239
- * @group Implementation
240
- * @category BCS
241
- */
242
- static deserialize<T extends Serializable & EntryFunctionArgument>(deserializer: Deserializer, cls: Deserializable<T>): MoveVector<T>;
243
- }
244
- /**
245
- * Represents a serialized data structure that encapsulates a byte array.
246
- * This class extends the Serializable class and provides methods for serialization
247
- * and deserialization of byte data, as well as converting to a MoveVector.
248
- *
249
- * @extends Serializable
250
- * @group Implementation
251
- * @category BCS
252
- */
253
- declare class Serialized extends Serializable implements TransactionArgument {
254
- readonly value: Uint8Array;
255
- constructor(value: HexInput);
256
- serialize(serializer: Serializer): void;
257
- serializeForEntryFunction(serializer: Serializer): void;
258
- serializeForScriptFunction(serializer: Serializer): void;
259
- static deserialize(deserializer: Deserializer): Serialized;
260
- /**
261
- * Deserialize the bytecode into a MoveVector of the specified type.
262
- * This function allows you to convert serialized data into a usable MoveVector format.
263
- *
264
- * @param cls - The class type of the elements in the MoveVector.
265
- * @group Implementation
266
- * @category BCS
267
- */
268
- toMoveVector<T extends Serializable & EntryFunctionArgument>(cls: Deserializable<T>): MoveVector<T>;
269
- }
270
- /**
271
- * Represents a string value that can be serialized and deserialized.
272
- * This class extends the Serializable base class and provides methods
273
- * for serializing the string in different contexts, such as for entry
274
- * functions and script functions.
275
- *
276
- * @extends Serializable
277
- * @group Implementation
278
- * @category BCS
279
- */
280
- declare class MoveString extends Serializable implements TransactionArgument {
281
- value: string;
282
- constructor(value: string);
283
- serialize(serializer: Serializer): void;
284
- serializeForEntryFunction(serializer: Serializer): void;
285
- serializeForScriptFunction(serializer: Serializer): void;
286
- static deserialize(deserializer: Deserializer): MoveString;
287
- }
288
- declare class MoveOption<T extends Serializable & EntryFunctionArgument> extends Serializable implements EntryFunctionArgument {
289
- private vec;
290
- readonly value?: T;
291
- constructor(value?: T | null);
292
- serializeForEntryFunction(serializer: Serializer): void;
293
- /**
294
- * Retrieves the inner value of the MoveOption.
295
- *
296
- * This method is inspired by Rust's `Option<T>.unwrap()`, where attempting to unwrap a `None` value results in a panic.
297
- * This method will throw an error if the value is not present.
298
- *
299
- * @example
300
- * const option = new MoveOption<Bool>(new Bool(true));
301
- * const value = option.unwrap(); // Returns the Bool instance
302
- *
303
- * @throws {Error} Throws an error if the MoveOption does not contain a value.
304
- *
305
- * @returns {T} The contained value if present.
306
- * @group Implementation
307
- * @category BCS
308
- */
309
- unwrap(): T;
310
- /**
311
- * Check if the MoveOption has a value.
312
- *
313
- * @returns {boolean} Returns true if there is exactly one value in the MoveOption.
314
- * @group Implementation
315
- * @category BCS
316
- */
317
- isSome(): boolean;
318
- serialize(serializer: Serializer): void;
319
- /**
320
- * Factory method to generate a MoveOption<U8> from a `number` or `undefined`.
321
- *
322
- * @example
323
- * MoveOption.U8(1).isSome() === true;
324
- * MoveOption.U8().isSome() === false;
325
- * MoveOption.U8(undefined).isSome() === false;
326
- * @param value the value used to fill the MoveOption. If `value` is undefined
327
- * the resulting MoveOption's .isSome() method will return false.
328
- * @returns a MoveOption<U8> with an inner value `value`
329
- * @group Implementation
330
- * @category BCS
331
- */
332
- static U8(value?: number | null): MoveOption<U8>;
333
- /**
334
- * Factory method to generate a MoveOption<U16> from a `number` or `undefined`.
335
- *
336
- * @example
337
- * MoveOption.U16(1).isSome() === true;
338
- * MoveOption.U16().isSome() === false;
339
- * MoveOption.U16(undefined).isSome() === false;
340
- * @param value the value used to fill the MoveOption. If `value` is undefined
341
- * the resulting MoveOption's .isSome() method will return false.
342
- * @returns a MoveOption<U16> with an inner value `value`
343
- * @group Implementation
344
- * @category BCS
345
- */
346
- static U16(value?: number | null): MoveOption<U16>;
347
- /**
348
- * Factory method to generate a MoveOption<U32> from a `number` or `undefined`.
349
- *
350
- * @example
351
- * MoveOption.U32(1).isSome() === true;
352
- * MoveOption.U32().isSome() === false;
353
- * MoveOption.U32(undefined).isSome() === false;
354
- * @param value the value used to fill the MoveOption. If `value` is undefined
355
- * the resulting MoveOption's .isSome() method will return false.
356
- * @returns a MoveOption<U32> with an inner value `value`
357
- * @group Implementation
358
- * @category BCS
359
- */
360
- static U32(value?: number | null): MoveOption<U32>;
361
- /**
362
- * Factory method to generate a MoveOption<U64> from a `number` or a `bigint` or `undefined`.
363
- *
364
- * @example
365
- * MoveOption.U64(1).isSome() === true;
366
- * MoveOption.U64().isSome() === false;
367
- * MoveOption.U64(undefined).isSome() === false;
368
- * @param value the value used to fill the MoveOption. If `value` is undefined
369
- * the resulting MoveOption's .isSome() method will return false.
370
- * @returns a MoveOption<U64> with an inner value `value`
371
- * @group Implementation
372
- * @category BCS
373
- */
374
- static U64(value?: AnyNumber | null): MoveOption<U64>;
375
- /**
376
- * Factory method to generate a MoveOption<U128> from a `number` or a `bigint` or `undefined`.
377
- *
378
- * @example
379
- * MoveOption.U128(1).isSome() === true;
380
- * MoveOption.U128().isSome() === false;
381
- * MoveOption.U128(undefined).isSome() === false;
382
- * @param value the value used to fill the MoveOption. If `value` is undefined
383
- * the resulting MoveOption's .isSome() method will return false.
384
- * @returns a MoveOption<U128> with an inner value `value`
385
- * @group Implementation
386
- * @category BCS
387
- */
388
- static U128(value?: AnyNumber | null): MoveOption<U128>;
389
- /**
390
- * Factory method to generate a MoveOption<U256> from a `number` or a `bigint` or `undefined`.
391
- *
392
- * @example
393
- * MoveOption.U256(1).isSome() === true;
394
- * MoveOption.U256().isSome() === false;
395
- * MoveOption.U256(undefined).isSome() === false;
396
- * @param value the value used to fill the MoveOption. If `value` is undefined
397
- * the resulting MoveOption's .isSome() method will return false.
398
- * @returns a MoveOption<U256> with an inner value `value`
399
- * @group Implementation
400
- * @category BCS
401
- */
402
- static U256(value?: AnyNumber | null): MoveOption<U256>;
403
- /**
404
- * Factory method to generate a MoveOption<Bool> from a `boolean` or `undefined`.
405
- *
406
- * @example
407
- * MoveOption.Bool(true).isSome() === true;
408
- * MoveOption.Bool().isSome() === false;
409
- * MoveOption.Bool(undefined).isSome() === false;
410
- * @param value the value used to fill the MoveOption. If `value` is undefined
411
- * the resulting MoveOption's .isSome() method will return false.
412
- * @returns a MoveOption<Bool> with an inner value `value`
413
- * @group Implementation
414
- * @category BCS
415
- */
416
- static Bool(value?: boolean | null): MoveOption<Bool>;
417
- /**
418
- * Factory method to generate a MoveOption<MoveString> from a `string` or `undefined`.
419
- *
420
- * @example
421
- * MoveOption.MoveString("hello").isSome() === true;
422
- * MoveOption.MoveString("").isSome() === true;
423
- * MoveOption.MoveString().isSome() === false;
424
- * MoveOption.MoveString(undefined).isSome() === false;
425
- * @param value the value used to fill the MoveOption. If `value` is undefined
426
- * the resulting MoveOption's .isSome() method will return false.
427
- * @returns a MoveOption<MoveString> with an inner value `value`
428
- * @group Implementation
429
- * @category BCS
430
- */
431
- static MoveString(value?: string | null): MoveOption<MoveString>;
432
- static deserialize<U extends Serializable & EntryFunctionArgument>(deserializer: Deserializer, cls: Deserializable<U>): MoveOption<U>;
433
- }
434
-
435
- export { MoveOption, MoveString, MoveVector, Serialized };
@@ -1,2 +1,2 @@
1
- import{a,b,c,d}from"../../chunk-Q4W3WJ2U.mjs";import"../../chunk-ORMOQWWH.mjs";import"../../chunk-FLZPUYXQ.mjs";import"../../chunk-FD6FGKYY.mjs";import"../../chunk-ODAAZLPK.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-EBMEXURY.mjs";import"../../chunk-STY74NUA.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-KDMSOCZY.mjs";export{d as MoveOption,c as MoveString,a as MoveVector,b as Serialized};
1
+ import{a,b,c,d}from"../../chunk-2BOHKN33.mjs";import"../../chunk-ORMOQWWH.mjs";import"../../chunk-FD6FGKYY.mjs";import"../../chunk-IJE2LVZG.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-EBMEXURY.mjs";import"../../chunk-FLZPUYXQ.mjs";import"../../chunk-STY74NUA.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-KDMSOCZY.mjs";export{d as MoveOption,c as MoveString,a as MoveVector,b as Serialized};
2
2
  //# sourceMappingURL=moveStructs.mjs.map