@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,308 +1,7 @@
1
- import { HexInput, Uint8, Uint16, Uint32, Uint64, Uint128, Uint256 } from '../types/types.mjs';
1
+ export { D as Deserializable, a as Deserializer } from '../account--Q9z_xMN.mjs';
2
2
  import '../types/indexer.mjs';
3
3
  import '../types/generated/operations.mjs';
4
4
  import '../types/generated/types.mjs';
5
5
  import '../utils/apiEndpoints.mjs';
6
-
7
- /**
8
- * This interface exists to define Deserializable<T> inputs for functions that
9
- * deserialize a byte buffer into a type T.
10
- * It is not intended to be implemented or extended, because Typescript has no support
11
- * for static methods in interfaces.
12
- *
13
- * @template T - The type that this will deserialize into.
14
- * @group Implementation
15
- * @category BCS
16
- */
17
- interface Deserializable<T> {
18
- /**
19
- * Deserializes the buffered bytes into an instance of the specified class type.
20
- * This function provides an alternative syntax for deserialization, allowing users to call
21
- * `deserializer.deserialize(MyClass)` instead of `MyClass.deserialize(deserializer)`.
22
- *
23
- * @param deserializer - The deserializer instance with the buffered bytes.
24
- * @returns The deserialized value of class type T.
25
- * @example
26
- * ```typescript
27
- * const deserializer = new Deserializer(new Uint8Array([1, 2, 3]));
28
- * const value = deserializer.deserialize(MyClass); // where MyClass has a `deserialize` function
29
- * // value is now an instance of MyClass
30
- * // equivalent to `const value = MyClass.deserialize(deserializer)`
31
- * ```
32
- * @group Implementation
33
- * @category BCS
34
- */
35
- deserialize(deserializer: Deserializer): T;
36
- }
37
- /**
38
- * A class that provides methods for deserializing various data types from a byte buffer.
39
- * It supports deserialization of primitive types, strings, and complex objects using a BCS (Binary Common Serialization) layout.
40
- * @group Implementation
41
- * @category BCS
42
- */
43
- declare class Deserializer {
44
- private buffer;
45
- private offset;
46
- /**
47
- * Creates a new instance of the class with a copy of the provided data buffer.
48
- * This prevents outside mutation of the buffer.
49
- *
50
- * @param data - The data to be copied into the internal buffer as a Uint8Array.
51
- * @group Implementation
52
- * @category BCS
53
- */
54
- constructor(data: Uint8Array);
55
- static fromHex(hex: HexInput): Deserializer;
56
- /**
57
- * Reads a specified number of bytes from the buffer and advances the offset.
58
- *
59
- * @param length - The number of bytes to read from the buffer.
60
- * @throws Throws an error if the read operation exceeds the buffer's length.
61
- * @group Implementation
62
- * @category BCS
63
- */
64
- private read;
65
- /**
66
- * Returns the number of bytes remaining in the buffer.
67
- *
68
- * This information is useful to determine if there's more data to be read.
69
- *
70
- * @returns The number of bytes remaining in the buffer.
71
- * @group Implementation
72
- * @category BCS
73
- */
74
- remaining(): number;
75
- /**
76
- * Asserts that the buffer has no remaining bytes.
77
- *
78
- * @throws {Error} Throws an error if there are remaining bytes in the buffer.
79
- * @group Implementation
80
- * @category BCS
81
- */
82
- assertFinished(): void;
83
- /**
84
- * Deserializes a UTF-8 encoded string from a byte array. It first reads the length of the string in bytes,
85
- * followed by the actual byte content, and decodes it into a string.
86
- *
87
- * BCS layout for "string": string_length | string_content
88
- * where string_length is a u32 integer encoded as a uleb128 integer, equal to the number of bytes in string_content.
89
- *
90
- * @example
91
- * ```typescript
92
- * const deserializer = new Deserializer(new Uint8Array([8, 49, 50, 51, 52, 97, 98, 99, 100]));
93
- * assert(deserializer.deserializeStr() === "1234abcd");
94
- * ```
95
- * @group Implementation
96
- * @category BCS
97
- */
98
- deserializeStr(): string;
99
- /**
100
- * @deprecated use `deserializeOption("string")` instead.
101
- *
102
- * The BCS layout for Optional<String> is 0 if none, else 1 followed by the string length and string content.
103
- * @returns The deserialized string if it exists, otherwise undefined.
104
- * @example
105
- * ```typescript
106
- * const deserializer = new Deserializer(new Uint8Array([0x00]));
107
- * assert(deserializer.deserializeOptionStr() === undefined);
108
- * const deserializer = new Deserializer(new Uint8Array([1, 8, 49, 50, 51, 52, 97, 98, 99, 100]));
109
- * assert(deserializer.deserializeOptionStr() === "1234abcd");
110
- * ```
111
- */
112
- deserializeOptionStr(): string | undefined;
113
- /**
114
- * Deserializes an optional value from the buffer.
115
- *
116
- * The BCS layout for Optional<T> starts with a boolean byte (0 if none, 1 if some),
117
- * followed by the value if present.
118
- *
119
- * @template T - The type of the value to deserialize
120
- * @param type - Either a Deserializable class or one of the string literals: "string", "bytes", or "fixedBytes"
121
- * @param len - Required length when type is "fixedBytes", ignored otherwise
122
- * @returns The deserialized value if present, undefined otherwise
123
- *
124
- * @throws {Error} When "fixedBytes" is specified without a length
125
- *
126
- * @example
127
- * ```typescript
128
- * // Deserialize an optional string
129
- * const deserializer = new Deserializer(new Uint8Array([1, 3, 97, 98, 99]));
130
- * const optStr = deserializer.deserializeOption("string");
131
- * // optStr === "abc"
132
- *
133
- * // Deserialize an optional custom type
134
- * const deserializer = new Deserializer(new Uint8Array([0]));
135
- * const optValue = deserializer.deserializeOption(MyClass);
136
- * // optValue === undefined
137
- *
138
- * // Deserialize optional bytes
139
- * const deserializer = new Deserializer(new Uint8Array([1, 3, 1, 2, 3]));
140
- * const optBytes = deserializer.deserializeOption("bytes");
141
- * // optBytes === Uint8Array[1, 2, 3]
142
- *
143
- * // Deserialize optional fixed bytes
144
- * const deserializer = new Deserializer(new Uint8Array([1, 1, 2, 3, 4]));
145
- * const optBytes = deserializer.deserializeOption("fixedBytes", 4);
146
- * // optBytes === Uint8Array[1, 2, 3, 4]
147
- * ```
148
- * @group Implementation
149
- * @category BCS
150
- */
151
- deserializeOption(type: "string"): string | undefined;
152
- deserializeOption(type: "bytes"): Uint8Array | undefined;
153
- deserializeOption(type: "fixedBytes", len: number): Uint8Array | undefined;
154
- deserializeOption<T>(type: Deserializable<T>): T | undefined;
155
- /**
156
- * Deserializes an array of bytes.
157
- *
158
- * The BCS layout for "bytes" consists of a bytes_length followed by the bytes themselves, where bytes_length is a u32 integer
159
- * encoded as a uleb128 integer, indicating the length of the bytes array.
160
- *
161
- * @returns {Uint8Array} The deserialized array of bytes.
162
- * @group Implementation
163
- * @category BCS
164
- */
165
- deserializeBytes(): Uint8Array;
166
- /**
167
- * Deserializes an array of bytes of a specified length.
168
- *
169
- * @param len - The number of bytes to read from the source.
170
- * @group Implementation
171
- * @category BCS
172
- */
173
- deserializeFixedBytes(len: number): Uint8Array;
174
- /**
175
- * Deserializes a boolean value from a byte stream.
176
- *
177
- * The BCS layout for a boolean uses one byte, where "0x01" represents true and "0x00" represents false.
178
- * An error is thrown if the byte value is not valid.
179
- *
180
- * @returns The deserialized boolean value.
181
- * @throws Throws an error if the boolean value is invalid.
182
- * @group Implementation
183
- * @category BCS
184
- */
185
- deserializeBool(): boolean;
186
- /**
187
- * Deserializes a uint8 number from the binary data.
188
- *
189
- * BCS layout for "uint8": One byte. Binary format in little-endian representation.
190
- *
191
- * @returns {number} The deserialized uint8 number.
192
- * @group Implementation
193
- * @category BCS
194
- */
195
- deserializeU8(): Uint8;
196
- /**
197
- * Deserializes a uint16 number from a binary format in little-endian representation.
198
- *
199
- * BCS layout for "uint16": Two bytes.
200
- * @example
201
- * ```typescript
202
- * const deserializer = new Deserializer(new Uint8Array([0x34, 0x12]));
203
- * assert(deserializer.deserializeU16() === 4660);
204
- * ```
205
- * @group Implementation
206
- * @category BCS
207
- */
208
- deserializeU16(): Uint16;
209
- /**
210
- * Deserializes a uint32 number from a binary format in little-endian representation.
211
- *
212
- * BCS layout for "uint32": Four bytes.
213
- * @example
214
- * ```typescript
215
- * const deserializer = new Deserializer(new Uint8Array([0x78, 0x56, 0x34, 0x12]));
216
- * assert(deserializer.deserializeU32() === 305419896);
217
- * ```
218
- * @group Implementation
219
- * @category BCS
220
- */
221
- deserializeU32(): Uint32;
222
- /**
223
- * Deserializes a uint64 number.
224
- *
225
- * This function combines two 32-bit values to return a 64-bit unsigned integer in little-endian representation.
226
- * @example
227
- * ```typescript
228
- * const deserializer = new Deserializer(new Uint8Array([0x00, 0xEF, 0xCD, 0xAB, 0x78, 0x56, 0x34, 0x12]));
229
- * assert(deserializer.deserializeU64() === 1311768467750121216);
230
- * ```
231
- * @group Implementation
232
- * @category BCS
233
- */
234
- deserializeU64(): Uint64;
235
- /**
236
- * Deserializes a uint128 number from its binary representation.
237
- * This function combines two 64-bit values to return a single uint128 value in little-endian format.
238
- *
239
- * @returns {BigInt} The deserialized uint128 number.
240
- * @group Implementation
241
- * @category BCS
242
- */
243
- deserializeU128(): Uint128;
244
- /**
245
- * Deserializes a uint256 number from its binary representation.
246
- *
247
- * The BCS layout for "uint256" consists of thirty-two bytes in little-endian format.
248
- *
249
- * @returns {BigInt} The deserialized uint256 number.
250
- * @group Implementation
251
- * @category BCS
252
- */
253
- deserializeU256(): Uint256;
254
- /**
255
- * Deserializes a uleb128 encoded uint32 number.
256
- *
257
- * This function is used for interpreting lengths of variable-length sequences and tags of enum values in BCS encoding.
258
- *
259
- * @throws {Error} Throws an error if the parsed value exceeds the maximum uint32 number.
260
- * @returns {number} The deserialized uint32 value.
261
- * @group Implementation
262
- * @category BCS
263
- */
264
- deserializeUleb128AsU32(): Uint32;
265
- /**
266
- * Helper function that primarily exists to support alternative syntax for deserialization.
267
- * That is, if we have a `const deserializer: new Deserializer(...)`, instead of having to use
268
- * `MyClass.deserialize(deserializer)`, we can call `deserializer.deserialize(MyClass)`.
269
- *
270
- * @example const deserializer = new Deserializer(new Uint8Array([1, 2, 3]));
271
- * const value = deserializer.deserialize(MyClass); // where MyClass has a `deserialize` function
272
- * // value is now an instance of MyClass
273
- * // equivalent to `const value = MyClass.deserialize(deserializer)`
274
- * @param cls The BCS-deserializable class to deserialize the buffered bytes into.
275
- *
276
- * @returns the deserialized value of class type T
277
- * @group Implementation
278
- * @category BCS
279
- */
280
- deserialize<T>(cls: Deserializable<T>): T;
281
- /**
282
- * Deserializes an array of BCS Deserializable values given an existing Deserializer instance with a loaded byte buffer.
283
- *
284
- * @param cls The BCS-deserializable class to deserialize the buffered bytes into.
285
- * @returns An array of deserialized values of type T.
286
- * @example
287
- * // serialize a vector of addresses
288
- * const addresses = new Array<AccountAddress>(
289
- * AccountAddress.from("0x1"),
290
- * AccountAddress.from("0x2"),
291
- * AccountAddress.from("0xa"),
292
- * AccountAddress.from("0xb"),
293
- * );
294
- * const serializer = new Serializer();
295
- * serializer.serializeVector(addresses);
296
- * const serializedBytes = serializer.toUint8Array();
297
- *
298
- * // deserialize the bytes into an array of addresses
299
- * const deserializer = new Deserializer(serializedBytes);
300
- * const deserializedAddresses = deserializer.deserializeVector(AccountAddress);
301
- * // deserializedAddresses is now an array of AccountAddress instances
302
- * @group Implementation
303
- * @category BCS
304
- */
305
- deserializeVector<T>(cls: Deserializable<T>): Array<T>;
306
- }
307
-
308
- export { type Deserializable, Deserializer };
6
+ import '../utils/const.mjs';
7
+ import '../core/common.mjs';
@@ -1,14 +1,8 @@
1
- export { Deserializable, Deserializer } from './deserializer.mjs';
2
- export { Serializable, Serializer, ensureBoolean, outOfRangeErrorMessage, validateNumberInRange } from './serializer.mjs';
1
+ export { B as Bool, D as Deserializable, a as Deserializer, F as FixedBytes, k as MoveOption, j as MoveString, M as MoveVector, S as Serializable, i as Serialized, b as Serializer, g as U128, c as U16, h as U256, d as U32, f as U64, U as U8, e as ensureBoolean, o as outOfRangeErrorMessage, v as validateNumberInRange } from '../account--Q9z_xMN.mjs';
3
2
  export { EntryFunctionBytes } from './serializable/entryFunctionBytes.mjs';
4
- export { FixedBytes } from './serializable/fixedBytes.mjs';
5
- export { Bool, U128, U16, U256, U32, U64, U8 } from './serializable/movePrimitives.mjs';
6
- export { MoveOption, MoveString, MoveVector, Serialized } from './serializable/moveStructs.mjs';
7
- import '../types/types.mjs';
8
3
  import '../types/indexer.mjs';
9
4
  import '../types/generated/operations.mjs';
10
5
  import '../types/generated/types.mjs';
11
6
  import '../utils/apiEndpoints.mjs';
12
- import '../core/hex.mjs';
7
+ import '../utils/const.mjs';
13
8
  import '../core/common.mjs';
14
- import '../transactions/instances/transactionArgument.mjs';
@@ -1,2 +1,2 @@
1
- import"../chunk-FZY4PMEE.mjs";import{a as p,b as q,c as r,d as s}from"../chunk-Q4W3WJ2U.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n,g as o}from"../chunk-ORMOQWWH.mjs";import{a as h}from"../chunk-TOBQ5UE6.mjs";import{a as g}from"../chunk-MT2RJ7H3.mjs";import{a}from"../chunk-FLZPUYXQ.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-ODAAZLPK.mjs";import"../chunk-4WPQQPUF.mjs";import{a as b,b as c,c as d,d as e,e as f}from"../chunk-EBMEXURY.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-KDMSOCZY.mjs";export{i as Bool,a as Deserializer,h as EntryFunctionBytes,g as FixedBytes,s as MoveOption,r as MoveString,p as MoveVector,b as Serializable,q as Serialized,c as Serializer,n as U128,k as U16,o as U256,l as U32,m as U64,j as U8,d as ensureBoolean,e as outOfRangeErrorMessage,f as validateNumberInRange};
1
+ import"../chunk-FZY4PMEE.mjs";import{a as p,b as q,c as r,d as s}from"../chunk-2BOHKN33.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n,g as o}from"../chunk-ORMOQWWH.mjs";import{a as h}from"../chunk-TOBQ5UE6.mjs";import{a as g}from"../chunk-MT2RJ7H3.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-IJE2LVZG.mjs";import"../chunk-4WPQQPUF.mjs";import{a as b,b as c,c as d,d as e,e as f}from"../chunk-EBMEXURY.mjs";import{a}from"../chunk-FLZPUYXQ.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-KDMSOCZY.mjs";export{i as Bool,a as Deserializer,h as EntryFunctionBytes,g as FixedBytes,s as MoveOption,r as MoveString,p as MoveVector,b as Serializable,q as Serialized,c as Serializer,n as U128,k as U16,o as U256,l as U32,m as U64,j as U8,d as ensureBoolean,e as outOfRangeErrorMessage,f as validateNumberInRange};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,14 +1,10 @@
1
- import { Serializable, Serializer } from '../serializer.mjs';
2
- import { Deserializer } from '../deserializer.mjs';
3
- import { FixedBytes } from './fixedBytes.mjs';
4
- import { EntryFunctionArgument } from '../../transactions/instances/transactionArgument.mjs';
5
- import '../../core/hex.mjs';
6
- import '../../core/common.mjs';
7
- import '../../types/types.mjs';
1
+ import { S as Serializable, a9 as EntryFunctionArgument, F as FixedBytes, b as Serializer, a as Deserializer } from '../../account--Q9z_xMN.mjs';
8
2
  import '../../types/indexer.mjs';
9
3
  import '../../types/generated/operations.mjs';
10
4
  import '../../types/generated/types.mjs';
11
5
  import '../../utils/apiEndpoints.mjs';
6
+ import '../../utils/const.mjs';
7
+ import '../../core/common.mjs';
12
8
 
13
9
  /**
14
10
  * This class exists solely to represent a sequence of fixed bytes as a serialized entry function, because
@@ -1,94 +1,7 @@
1
- import { Serializable, Serializer } from '../serializer.mjs';
2
- import { Deserializer } from '../deserializer.mjs';
3
- import { HexInput } from '../../types/types.mjs';
4
- import { TransactionArgument } from '../../transactions/instances/transactionArgument.mjs';
5
- import '../../core/hex.mjs';
6
- import '../../core/common.mjs';
1
+ export { F as FixedBytes } from '../../account--Q9z_xMN.mjs';
7
2
  import '../../types/indexer.mjs';
8
3
  import '../../types/generated/operations.mjs';
9
4
  import '../../types/generated/types.mjs';
10
5
  import '../../utils/apiEndpoints.mjs';
11
-
12
- /**
13
- * Represents a contiguous sequence of already serialized BCS bytes.
14
- *
15
- * This class differs from most other Serializable classes in that its internal byte buffer is serialized to BCS
16
- * bytes exactly as-is, without prepending the length of the bytes. It is ideal for scenarios where custom serialization
17
- * is required, such as passing serialized bytes as transaction arguments. Additionally, it serves as a representation
18
- * of type-agnostic BCS bytes, akin to a vector<u8>.
19
- *
20
- * An example use case includes handling bytes resulting from entry function arguments that have been serialized
21
- * for an entry function.
22
- *
23
- * @example
24
- * const yourCustomSerializedBytes = new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]);
25
- * const fixedBytes = new FixedBytes(yourCustomSerializedBytes);
26
- * const payload = await generateTransactionPayload({
27
- * function: "0xbeefcafe::your_module::your_function_that_requires_custom_serialization",
28
- * functionArguments: [yourCustomBytes],
29
- * });
30
- *
31
- * This class is particularly useful when you want to handle a fixed-size byte array without the overhead of
32
- * length prepending, such as when dealing with 32-byte addresses stored as U8 in a MoveVector<U8>.
33
-
34
- * For example, if you store each of the 32 bytes for an address as a U8 in a MoveVector<U8>, when you
35
- * serialize that MoveVector<U8>, it will be serialized to 33 bytes. If you solely want to pass around
36
- * the 32 bytes as a Serializable class that *does not* prepend the length to the BCS-serialized representation,
37
- * use this class.*
38
- * @param value - HexInput representing a sequence of Uint8 bytes.
39
- * @returns A Serializable FixedBytes instance, which when serialized, does not prepend the length of the bytes.
40
- * @see EntryFunctionBytes
41
- * @group Implementation
42
- * @category BCS
43
- */
44
- declare class FixedBytes extends Serializable implements TransactionArgument {
45
- value: Uint8Array;
46
- /**
47
- * Creates an instance of the class with a specified hexadecimal input.
48
- * The value is converted from hexadecimal format to a Uint8Array.
49
- *
50
- * @param value - The hexadecimal input to be converted.
51
- * @group Implementation
52
- * @category BCS
53
- */
54
- constructor(value: HexInput);
55
- /**
56
- * Serializes the fixed bytes value using the provided serializer.
57
- * This function is essential for converting the fixed bytes into a format suitable for storage or transmission.
58
- *
59
- * @param serializer - The serializer instance used for serialization.
60
- * @group Implementation
61
- * @category BCS
62
- */
63
- serialize(serializer: Serializer): void;
64
- /**
65
- * Serializes the current instance for an entry function using the provided serializer.
66
- * This allows the instance to be converted into a format suitable for transmission or storage.
67
- *
68
- * @param serializer - The serializer used to perform the serialization.
69
- * @group Implementation
70
- * @category BCS
71
- */
72
- serializeForEntryFunction(serializer: Serializer): void;
73
- /**
74
- * Serializes the current instance using the provided serializer.
75
- * This function is essential for preparing data to be passed as arguments in script functions.
76
- *
77
- * @param serializer - The serializer instance used to perform the serialization.
78
- * @group Implementation
79
- * @category BCS
80
- */
81
- serializeForScriptFunction(serializer: Serializer): void;
82
- /**
83
- * Deserializes a fixed-length byte array from the provided deserializer.
84
- * This function helps in reconstructing a FixedBytes object from the serialized data.
85
- *
86
- * @param deserializer - The deserializer instance used to read the byte data.
87
- * @param length - The length of the byte array to be deserialized.
88
- * @group Implementation
89
- * @category BCS
90
- */
91
- static deserialize(deserializer: Deserializer, length: number): FixedBytes;
92
- }
93
-
94
- export { FixedBytes };
6
+ import '../../utils/const.mjs';
7
+ import '../../core/common.mjs';
@@ -1,172 +1,7 @@
1
- import { Deserializer } from '../deserializer.mjs';
2
- import { Serializable, Serializer } from '../serializer.mjs';
3
- import { TransactionArgument } from '../../transactions/instances/transactionArgument.mjs';
4
- import { AnyNumber, Uint8, Uint16, Uint32 } from '../../types/types.mjs';
1
+ export { B as Bool, g as U128, c as U16, h as U256, d as U32, f as U64, U as U8 } from '../../account--Q9z_xMN.mjs';
5
2
  import '../../types/indexer.mjs';
6
3
  import '../../types/generated/operations.mjs';
7
4
  import '../../types/generated/types.mjs';
8
5
  import '../../utils/apiEndpoints.mjs';
9
- import '../../core/hex.mjs';
6
+ import '../../utils/const.mjs';
10
7
  import '../../core/common.mjs';
11
-
12
- /**
13
- * Represents a boolean value that can be serialized and deserialized.
14
- * This class extends the Serializable class and provides methods to serialize
15
- * the boolean value for different contexts, such as entry functions and script functions.
16
- *
17
- * @extends Serializable
18
- * @group Implementation
19
- * @category BCS
20
- */
21
- declare class Bool extends Serializable implements TransactionArgument {
22
- readonly value: boolean;
23
- /**
24
- * Constructs a new instance with a specified value.
25
- * This ensures that the value is validated to be within the acceptable range.
26
- *
27
- * @param value - The number to be validated and assigned, which must be between 0 and MAX_U256_BIG_INT.
28
- * @group Implementation
29
- * @category BCS
30
- */
31
- constructor(value: boolean);
32
- /**
33
- * Serializes the value using the provided serializer.
34
- * This function is essential for converting the value into a format suitable for transmission or storage.
35
- *
36
- * @param serializer - The serializer instance used to perform the serialization.
37
- * @group Implementation
38
- * @category BCS
39
- */
40
- serialize(serializer: Serializer): void;
41
- /**
42
- * Serializes the current instance for use in an entry function by converting it to a byte sequence.
43
- * This allows the instance to be properly formatted for serialization in transactions.
44
- *
45
- * @param serializer - The serializer instance used to serialize the byte sequence.
46
- * @group Implementation
47
- * @category BCS
48
- */
49
- serializeForEntryFunction(serializer: Serializer): void;
50
- /**
51
- * Serializes the current instance for use in a script function.
52
- * This allows for the conversion of the instance into a format suitable for transmission or storage.
53
- *
54
- * @param serializer - The serializer used to perform the serialization.
55
- * @group Implementation
56
- * @category BCS
57
- */
58
- serializeForScriptFunction(serializer: Serializer): void;
59
- /**
60
- * Deserializes a U256 value from the provided deserializer.
61
- *
62
- * @param deserializer - The deserializer instance used to read the U256 data.
63
- * @group Implementation
64
- * @category BCS
65
- */
66
- deserialize(deserializer: Deserializer): U256;
67
- static deserialize(deserializer: Deserializer): Bool;
68
- }
69
- /**
70
- * Represents an unsigned 8-bit integer (U8) value.
71
- * This class extends the Serializable class and provides methods for serialization and deserialization of U8 values.
72
- *
73
- * @extends Serializable
74
- * @group Implementation
75
- * @category BCS
76
- */
77
- declare class U8 extends Serializable implements TransactionArgument {
78
- readonly value: Uint8;
79
- constructor(value: Uint8);
80
- serialize(serializer: Serializer): void;
81
- serializeForEntryFunction(serializer: Serializer): void;
82
- serializeForScriptFunction(serializer: Serializer): void;
83
- static deserialize(deserializer: Deserializer): U8;
84
- }
85
- /**
86
- * Represents a 16-bit unsigned integer (U16) value.
87
- * This class extends the Serializable class and provides methods for serialization
88
- * and deserialization of the U16 value.
89
- *
90
- * @extends Serializable
91
- * @group Implementation
92
- * @category BCS
93
- */
94
- declare class U16 extends Serializable implements TransactionArgument {
95
- readonly value: Uint16;
96
- constructor(value: Uint16);
97
- serialize(serializer: Serializer): void;
98
- serializeForEntryFunction(serializer: Serializer): void;
99
- serializeForScriptFunction(serializer: Serializer): void;
100
- static deserialize(deserializer: Deserializer): U16;
101
- }
102
- /**
103
- * Represents a 32-bit unsigned integer (U32) that can be serialized and deserialized.
104
- * This class ensures that the value is within the valid range for a U32.
105
- *
106
- * @extends Serializable
107
- * @group Implementation
108
- * @category BCS
109
- */
110
- declare class U32 extends Serializable implements TransactionArgument {
111
- readonly value: Uint32;
112
- constructor(value: Uint32);
113
- serialize(serializer: Serializer): void;
114
- serializeForEntryFunction(serializer: Serializer): void;
115
- serializeForScriptFunction(serializer: Serializer): void;
116
- static deserialize(deserializer: Deserializer): U32;
117
- }
118
- /**
119
- * Represents a 64-bit unsigned integer (U64) and provides methods for serialization.
120
- *
121
- * This class ensures that the value is within the valid range for a U64 and provides
122
- * functionality to serialize the value for various use cases, including entry functions
123
- * and script functions.
124
- *
125
- * @extends Serializable
126
- * @group Implementation
127
- * @category BCS
128
- */
129
- declare class U64 extends Serializable implements TransactionArgument {
130
- readonly value: bigint;
131
- constructor(value: AnyNumber);
132
- serialize(serializer: Serializer): void;
133
- serializeForEntryFunction(serializer: Serializer): void;
134
- serializeForScriptFunction(serializer: Serializer): void;
135
- static deserialize(deserializer: Deserializer): U64;
136
- }
137
- /**
138
- * Represents a 128-bit unsigned integer value.
139
- * This class provides methods for serialization and deserialization
140
- * of U128 values, ensuring that the values are within the valid range.
141
- *
142
- * @extends Serializable
143
- * @group Implementation
144
- * @category BCS
145
- */
146
- declare class U128 extends Serializable implements TransactionArgument {
147
- readonly value: bigint;
148
- constructor(value: AnyNumber);
149
- serialize(serializer: Serializer): void;
150
- serializeForEntryFunction(serializer: Serializer): void;
151
- serializeForScriptFunction(serializer: Serializer): void;
152
- static deserialize(deserializer: Deserializer): U128;
153
- }
154
- /**
155
- * Represents a 256-bit unsigned integer (U256) that extends the Serializable class.
156
- * This class provides methods for serialization and deserialization of U256 values,
157
- * ensuring that the values are within the valid range.
158
- *
159
- * @extends Serializable
160
- * @group Implementation
161
- * @category BCS
162
- */
163
- declare class U256 extends Serializable implements TransactionArgument {
164
- readonly value: bigint;
165
- constructor(value: AnyNumber);
166
- serialize(serializer: Serializer): void;
167
- serializeForEntryFunction(serializer: Serializer): void;
168
- serializeForScriptFunction(serializer: Serializer): void;
169
- static deserialize(deserializer: Deserializer): U256;
170
- }
171
-
172
- export { Bool, U128, U16, U256, U32, U64, U8 };
@@ -1,2 +1,2 @@
1
- import{a,b,c,d,e,f,g}from"../../chunk-ORMOQWWH.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{a as Bool,f as U128,c as U16,g as U256,d as U32,e as U64,b as U8};
1
+ import{a,b,c,d,e,f,g}from"../../chunk-ORMOQWWH.mjs";import"../../chunk-FD6FGKYY.mjs";import"../../chunk-IJE2LVZG.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{a as Bool,f as U128,c as U16,g as U256,d as U32,e as U64,b as U8};
2
2
  //# sourceMappingURL=movePrimitives.mjs.map