@aptos-labs/ts-sdk 1.35.0-zeta.2 → 1.36.0-zeta.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 (596) hide show
  1. package/dist/common/{accountAddress-Ce4Cv60D.d.ts → accountAddress-C685VEzA.d.ts} +11 -99
  2. package/dist/common/chunk-5GUWOXQG.js +4 -0
  3. package/dist/common/chunk-5GUWOXQG.js.map +1 -0
  4. package/dist/common/cli/index.d.ts +1 -1
  5. package/dist/common/cli/index.js +1 -486
  6. package/dist/common/cli/index.js.map +1 -1
  7. package/dist/common/index.d.ts +9105 -8699
  8. package/dist/common/index.js +436 -18333
  9. package/dist/common/index.js.map +1 -1
  10. package/dist/esm/{Ed25519Account-D4j3_WIS.d.mts → Ed25519Account-6KGApCPu.d.mts} +3 -3
  11. package/dist/esm/account/AbstractKeylessAccount.d.mts +23 -13
  12. package/dist/esm/account/AbstractKeylessAccount.mjs +1 -75
  13. package/dist/esm/account/AbstractedAccount.d.mts +10 -10
  14. package/dist/esm/account/AbstractedAccount.mjs +1 -74
  15. package/dist/esm/account/Account.d.mts +6 -6
  16. package/dist/esm/account/Account.mjs +1 -72
  17. package/dist/esm/account/AccountUtils.d.mts +11 -10
  18. package/dist/esm/account/AccountUtils.mjs +1 -78
  19. package/dist/esm/account/Ed25519Account.d.mts +5 -5
  20. package/dist/esm/account/Ed25519Account.mjs +1 -70
  21. package/dist/esm/account/EphemeralKeyPair.d.mts +3 -1
  22. package/dist/esm/account/EphemeralKeyPair.mjs +1 -50
  23. package/dist/esm/account/FederatedKeylessAccount.d.mts +12 -11
  24. package/dist/esm/account/FederatedKeylessAccount.mjs +1 -72
  25. package/dist/esm/account/KeylessAccount.d.mts +12 -11
  26. package/dist/esm/account/KeylessAccount.mjs +1 -72
  27. package/dist/esm/account/MultiEd25519Account.d.mts +9 -9
  28. package/dist/esm/account/MultiEd25519Account.mjs +1 -70
  29. package/dist/esm/account/MultiKeyAccount.d.mts +34 -12
  30. package/dist/esm/account/MultiKeyAccount.mjs +1 -74
  31. package/dist/esm/account/SingleKeyAccount.d.mts +5 -5
  32. package/dist/esm/account/SingleKeyAccount.mjs +1 -72
  33. package/dist/esm/account/index.d.mts +7 -6
  34. package/dist/esm/account/index.mjs +1 -119
  35. package/dist/esm/account/utils.mjs +1 -54
  36. package/dist/esm/api/account/abstraction.d.mts +9 -9
  37. package/dist/esm/api/account/abstraction.mjs +1 -101
  38. package/dist/esm/api/account.d.mts +4 -20
  39. package/dist/esm/api/account.mjs +1 -105
  40. package/dist/esm/api/ans.d.mts +13 -13
  41. package/dist/esm/api/ans.mjs +1 -101
  42. package/dist/esm/api/aptos.d.mts +6 -5
  43. package/dist/esm/api/aptos.mjs +1 -139
  44. package/dist/esm/api/aptosConfig.mjs +1 -9
  45. package/dist/esm/api/coin.d.mts +9 -9
  46. package/dist/esm/api/coin.mjs +1 -100
  47. package/dist/esm/api/digitalAsset.d.mts +5 -5
  48. package/dist/esm/api/digitalAsset.mjs +1 -101
  49. package/dist/esm/api/event.mjs +1 -59
  50. package/dist/esm/api/experimental.d.mts +7 -7
  51. package/dist/esm/api/experimental.mjs +1 -85
  52. package/dist/esm/api/faucet.mjs +1 -58
  53. package/dist/esm/api/fungibleAsset.d.mts +13 -13
  54. package/dist/esm/api/fungibleAsset.mjs +1 -101
  55. package/dist/esm/api/general.d.mts +7 -7
  56. package/dist/esm/api/general.mjs +1 -85
  57. package/dist/esm/api/index.d.mts +6 -5
  58. package/dist/esm/api/index.mjs +1 -143
  59. package/dist/esm/api/keyless.d.mts +20 -19
  60. package/dist/esm/api/keyless.mjs +1 -102
  61. package/dist/esm/api/object.mjs +1 -59
  62. package/dist/esm/api/staking.mjs +1 -59
  63. package/dist/esm/api/table.mjs +1 -38
  64. package/dist/esm/api/transaction.d.mts +4 -4
  65. package/dist/esm/api/transaction.mjs +1 -110
  66. package/dist/esm/api/transactionSubmission/build.d.mts +9 -9
  67. package/dist/esm/api/transactionSubmission/build.mjs +1 -99
  68. package/dist/esm/api/transactionSubmission/helpers.mjs +1 -9
  69. package/dist/esm/api/transactionSubmission/management.d.mts +8 -8
  70. package/dist/esm/api/transactionSubmission/management.mjs +1 -105
  71. package/dist/esm/api/transactionSubmission/sign.d.mts +3 -3
  72. package/dist/esm/api/transactionSubmission/sign.mjs +1 -218
  73. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  74. package/dist/esm/api/transactionSubmission/simulate.d.mts +9 -9
  75. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -100
  76. package/dist/esm/api/transactionSubmission/submit.d.mts +3 -3
  77. package/dist/esm/api/transactionSubmission/submit.mjs +1 -100
  78. package/dist/esm/api/utils.mjs +1 -36
  79. package/dist/esm/bcs/consts.mjs +1 -17
  80. package/dist/esm/bcs/deserializer.mjs +1 -10
  81. package/dist/esm/bcs/index.mjs +1 -60
  82. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -12
  83. package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -11
  84. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -26
  85. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -22
  86. package/dist/esm/bcs/serializer.mjs +1 -18
  87. package/dist/esm/chunk-2V636AYW.mjs +2 -0
  88. package/dist/esm/{chunk-3IWV2Q3K.mjs.map → chunk-2V636AYW.mjs.map} +1 -1
  89. package/dist/esm/chunk-35CO4BP4.mjs +2 -0
  90. package/dist/esm/chunk-35CO4BP4.mjs.map +1 -0
  91. package/dist/esm/chunk-35DKMW7Q.mjs +2 -0
  92. package/dist/esm/{chunk-GUA5YTIK.mjs.map → chunk-35DKMW7Q.mjs.map} +1 -1
  93. package/dist/esm/chunk-3EUHEZND.mjs +2 -0
  94. package/dist/esm/{chunk-G34CJDST.mjs.map → chunk-3EUHEZND.mjs.map} +1 -1
  95. package/dist/esm/chunk-3OLFJ65O.mjs +2 -0
  96. package/dist/esm/{chunk-G4NBRMZ2.mjs.map → chunk-3OLFJ65O.mjs.map} +1 -1
  97. package/dist/esm/chunk-3RVAGHAA.mjs +2 -0
  98. package/dist/esm/{chunk-XQFUKBY7.mjs.map → chunk-3RVAGHAA.mjs.map} +1 -1
  99. package/dist/esm/chunk-4RXKALLC.mjs +2 -0
  100. package/dist/esm/{chunk-SFLQPB72.mjs.map → chunk-4RXKALLC.mjs.map} +1 -1
  101. package/dist/esm/chunk-56CNRT2K.mjs +2 -0
  102. package/dist/esm/{chunk-SBB4YEPT.mjs.map → chunk-56CNRT2K.mjs.map} +1 -1
  103. package/dist/esm/chunk-6KE4JZD6.mjs +2 -0
  104. package/dist/esm/chunk-6KE4JZD6.mjs.map +1 -0
  105. package/dist/esm/chunk-7CRQNXR5.mjs +2 -0
  106. package/dist/esm/{chunk-YU65LNIC.mjs.map → chunk-7CRQNXR5.mjs.map} +1 -1
  107. package/dist/esm/chunk-7YTGBTWH.mjs +2 -0
  108. package/dist/esm/chunk-7YTGBTWH.mjs.map +1 -0
  109. package/dist/esm/chunk-A3VO773Q.mjs +2 -0
  110. package/dist/esm/{chunk-KLUO6XPE.mjs.map → chunk-A3VO773Q.mjs.map} +1 -1
  111. package/dist/esm/chunk-A5L76YP7.mjs +2 -0
  112. package/dist/esm/{chunk-PT2QHUB6.mjs.map → chunk-A5L76YP7.mjs.map} +1 -1
  113. package/dist/esm/chunk-AEGA5N2W.mjs +2 -0
  114. package/dist/esm/{chunk-QJ6CGH7N.mjs.map → chunk-AEGA5N2W.mjs.map} +1 -1
  115. package/dist/esm/chunk-AIPHJFJL.mjs +2 -0
  116. package/dist/esm/{chunk-6I37A76G.mjs.map → chunk-AIPHJFJL.mjs.map} +1 -1
  117. package/dist/esm/chunk-BMPHQ3E7.mjs +2 -0
  118. package/dist/esm/{chunk-MWXBQ6HR.mjs.map → chunk-BMPHQ3E7.mjs.map} +1 -1
  119. package/dist/esm/chunk-C3Q23D22.mjs +2 -0
  120. package/dist/esm/{chunk-F7W7KS5C.mjs.map → chunk-C3Q23D22.mjs.map} +1 -1
  121. package/dist/esm/chunk-CWL7ZA3P.mjs +2 -0
  122. package/dist/esm/{chunk-6T3V5LXK.mjs.map → chunk-CWL7ZA3P.mjs.map} +1 -1
  123. package/dist/esm/chunk-DOVH6HPL.mjs +2 -0
  124. package/dist/esm/{chunk-THWEBWUC.mjs.map → chunk-DOVH6HPL.mjs.map} +1 -1
  125. package/dist/esm/chunk-EODSU3YN.mjs +2 -0
  126. package/dist/esm/{chunk-WXQUBQK4.mjs.map → chunk-EODSU3YN.mjs.map} +1 -1
  127. package/dist/esm/chunk-ERLDXTIY.mjs +2 -0
  128. package/dist/esm/{chunk-6ASWESA2.mjs.map → chunk-ERLDXTIY.mjs.map} +1 -1
  129. package/dist/esm/chunk-GOXRBEIJ.mjs +2 -0
  130. package/dist/esm/{chunk-APM7OSLS.mjs.map → chunk-GOXRBEIJ.mjs.map} +1 -1
  131. package/dist/esm/chunk-HHWJHOFZ.mjs +2 -0
  132. package/dist/esm/{chunk-KSK3XIGF.mjs.map → chunk-HHWJHOFZ.mjs.map} +1 -1
  133. package/dist/esm/chunk-IF4UU2MT.mjs +2 -0
  134. package/dist/esm/{chunk-QPT4BSAB.mjs.map → chunk-IF4UU2MT.mjs.map} +1 -1
  135. package/dist/esm/chunk-IMTC3J2M.mjs +2 -0
  136. package/dist/esm/{chunk-LJRNGZMY.mjs.map → chunk-IMTC3J2M.mjs.map} +1 -1
  137. package/dist/esm/chunk-KDMSOCZY.mjs +2 -0
  138. package/dist/esm/chunk-KSLLV3ZC.mjs +2 -0
  139. package/dist/esm/{chunk-OFUNBTK4.mjs.map → chunk-KSLLV3ZC.mjs.map} +1 -1
  140. package/dist/esm/chunk-KXVD52Y6.mjs +2 -0
  141. package/dist/esm/{chunk-YT7V6AVJ.mjs.map → chunk-KXVD52Y6.mjs.map} +1 -1
  142. package/dist/esm/chunk-LGC2JORV.mjs +2 -0
  143. package/dist/esm/chunk-LGC2JORV.mjs.map +1 -0
  144. package/dist/esm/chunk-LQOSHBB7.mjs +4 -0
  145. package/dist/esm/{chunk-CXLXUSCG.mjs.map → chunk-LQOSHBB7.mjs.map} +1 -1
  146. package/dist/esm/chunk-LS3IDL2N.mjs +2 -0
  147. package/dist/esm/{chunk-MYEYZ7PF.mjs.map → chunk-LS3IDL2N.mjs.map} +1 -1
  148. package/dist/esm/chunk-MIW45ADL.mjs +2 -0
  149. package/dist/esm/chunk-MIW45ADL.mjs.map +1 -0
  150. package/dist/esm/chunk-NFPNWY6Z.mjs +4 -0
  151. package/dist/esm/chunk-NFPNWY6Z.mjs.map +1 -0
  152. package/dist/esm/chunk-PDAWVDI7.mjs +2 -0
  153. package/dist/esm/{chunk-MFFBZ43D.mjs.map → chunk-PDAWVDI7.mjs.map} +1 -1
  154. package/dist/esm/chunk-PSZYS4RG.mjs +2 -0
  155. package/dist/esm/{chunk-YK66QBML.mjs.map → chunk-PSZYS4RG.mjs.map} +1 -1
  156. package/dist/esm/chunk-R6QCPXQG.mjs +2 -0
  157. package/dist/esm/{chunk-SQNS4SFV.mjs.map → chunk-R6QCPXQG.mjs.map} +1 -1
  158. package/dist/esm/chunk-RIINVEZA.mjs +2 -0
  159. package/dist/esm/{chunk-Y3ENAKRC.mjs.map → chunk-RIINVEZA.mjs.map} +1 -1
  160. package/dist/esm/chunk-RJ7F4JDV.mjs +2 -0
  161. package/dist/esm/chunk-RJ7F4JDV.mjs.map +1 -0
  162. package/dist/esm/chunk-RXHER6EA.mjs +2 -0
  163. package/dist/esm/{chunk-C7T6GW5P.mjs.map → chunk-RXHER6EA.mjs.map} +1 -1
  164. package/dist/esm/chunk-RXMLONF7.mjs +2 -0
  165. package/dist/esm/{chunk-BU43ZFDJ.mjs.map → chunk-RXMLONF7.mjs.map} +1 -1
  166. package/dist/esm/chunk-TBY3VMMV.mjs +2 -0
  167. package/dist/esm/chunk-TBY3VMMV.mjs.map +1 -0
  168. package/dist/esm/chunk-TKXEVD7A.mjs +2 -0
  169. package/dist/esm/{chunk-QSYWLSSN.mjs.map → chunk-TKXEVD7A.mjs.map} +1 -1
  170. package/dist/esm/chunk-TNWABITK.mjs +2 -0
  171. package/dist/esm/{chunk-FRLS4GRM.mjs.map → chunk-TNWABITK.mjs.map} +1 -1
  172. package/dist/esm/chunk-TTY5GFMN.mjs +2 -0
  173. package/dist/esm/{chunk-PKUXOBIV.mjs.map → chunk-TTY5GFMN.mjs.map} +1 -1
  174. package/dist/esm/chunk-VHNX2NUR.mjs +473 -0
  175. package/dist/esm/chunk-VHNX2NUR.mjs.map +1 -0
  176. package/dist/esm/chunk-VHY6ZATX.mjs +2 -0
  177. package/dist/esm/{chunk-BDM6FBUO.mjs.map → chunk-VHY6ZATX.mjs.map} +1 -1
  178. package/dist/esm/chunk-W4BSN6SK.mjs +2 -0
  179. package/dist/esm/{chunk-ZWCTF3NQ.mjs.map → chunk-W4BSN6SK.mjs.map} +1 -1
  180. package/dist/esm/chunk-WB26DWOY.mjs +7 -0
  181. package/dist/esm/chunk-WB26DWOY.mjs.map +1 -0
  182. package/dist/esm/chunk-X5YB74NB.mjs +2 -0
  183. package/dist/esm/{chunk-I25AX6PQ.mjs.map → chunk-X5YB74NB.mjs.map} +1 -1
  184. package/dist/esm/chunk-XLDMPCLF.mjs +2 -0
  185. package/dist/esm/{chunk-WLTQHGIJ.mjs.map → chunk-XLDMPCLF.mjs.map} +1 -1
  186. package/dist/esm/chunk-YOZBVVKL.mjs +2 -0
  187. package/dist/esm/{chunk-BEYIOC2H.mjs.map → chunk-YOZBVVKL.mjs.map} +1 -1
  188. package/dist/esm/chunk-ZD2TY5N3.mjs +2 -0
  189. package/dist/esm/{chunk-NUT2VOX2.mjs.map → chunk-ZD2TY5N3.mjs.map} +1 -1
  190. package/dist/esm/chunk-ZELTLAUN.mjs +2 -0
  191. package/dist/esm/chunk-ZELTLAUN.mjs.map +1 -0
  192. package/dist/esm/cli/index.mjs +1 -20
  193. package/dist/esm/cli/localNode.mjs +1 -16
  194. package/dist/esm/cli/move.mjs +1 -7
  195. package/dist/esm/client/core.mjs +1 -34
  196. package/dist/esm/client/get.mjs +1 -41
  197. package/dist/esm/client/index.mjs +1 -69
  198. package/dist/esm/client/post.mjs +1 -43
  199. package/dist/esm/core/account/index.mjs +1 -21
  200. package/dist/esm/core/account/utils/address.mjs +1 -19
  201. package/dist/esm/core/account/utils/index.mjs +1 -20
  202. package/dist/esm/core/accountAddress.mjs +1 -16
  203. package/dist/esm/core/authenticationKey.d.mts +3 -1
  204. package/dist/esm/core/authenticationKey.mjs +1 -15
  205. package/dist/esm/core/common.mjs +1 -7
  206. package/dist/esm/core/crypto/abstraction.d.mts +4 -1
  207. package/dist/esm/core/crypto/abstraction.mjs +1 -26
  208. package/dist/esm/core/crypto/ed25519.d.mts +18 -1
  209. package/dist/esm/core/crypto/ed25519.mjs +1 -33
  210. package/dist/esm/core/crypto/ephemeral.d.mts +8 -1
  211. package/dist/esm/core/crypto/ephemeral.mjs +1 -30
  212. package/dist/esm/core/crypto/federatedKeyless.d.mts +11 -87
  213. package/dist/esm/core/crypto/federatedKeyless.mjs +1 -44
  214. package/dist/esm/core/crypto/hdKey.mjs +1 -25
  215. package/dist/esm/core/crypto/index.d.mts +8 -6
  216. package/dist/esm/core/crypto/index.mjs +1 -173
  217. package/dist/esm/core/crypto/keyless.d.mts +13 -586
  218. package/dist/esm/core/crypto/keyless.mjs +1 -83
  219. package/dist/esm/core/crypto/multiEd25519.d.mts +14 -4
  220. package/dist/esm/core/crypto/multiEd25519.mjs +1 -50
  221. package/dist/esm/core/crypto/multiKey.d.mts +39 -3
  222. package/dist/esm/core/crypto/multiKey.mjs +1 -51
  223. package/dist/esm/core/crypto/poseidon.mjs +1 -15
  224. package/dist/esm/core/crypto/privateKey.d.mts +3 -1
  225. package/dist/esm/core/crypto/privateKey.mjs +1 -12
  226. package/dist/esm/core/crypto/proof.mjs +1 -20
  227. package/dist/esm/core/crypto/publicKey.d.mts +3 -1
  228. package/dist/esm/core/crypto/publicKey.mjs +1 -22
  229. package/dist/esm/core/crypto/secp256k1.d.mts +26 -2
  230. package/dist/esm/core/crypto/secp256k1.mjs +1 -29
  231. package/dist/esm/core/crypto/signature.mjs +1 -20
  232. package/dist/esm/core/crypto/singleKey.d.mts +27 -5
  233. package/dist/esm/core/crypto/singleKey.mjs +1 -48
  234. package/dist/esm/core/crypto/utils.mjs +1 -9
  235. package/dist/esm/core/hex.mjs +1 -12
  236. package/dist/esm/core/index.d.mts +8 -6
  237. package/dist/esm/core/index.mjs +1 -202
  238. package/dist/esm/errors/index.d.mts +10 -2
  239. package/dist/esm/errors/index.mjs +1 -25
  240. package/dist/esm/federatedKeyless-Qe_j8OqV.d.mts +875 -0
  241. package/dist/esm/index.d.mts +11 -10
  242. package/dist/esm/index.mjs +1 -798
  243. package/dist/esm/internal/abstraction.d.mts +9 -9
  244. package/dist/esm/internal/abstraction.mjs +1 -103
  245. package/dist/esm/internal/account.d.mts +7 -24
  246. package/dist/esm/internal/account.mjs +1 -142
  247. package/dist/esm/internal/ans.d.mts +13 -13
  248. package/dist/esm/internal/ans.mjs +1 -138
  249. package/dist/esm/internal/coin.d.mts +7 -7
  250. package/dist/esm/internal/coin.mjs +1 -99
  251. package/dist/esm/internal/digitalAsset.d.mts +2 -2
  252. package/dist/esm/internal/digitalAsset.mjs +1 -145
  253. package/dist/esm/internal/event.mjs +1 -62
  254. package/dist/esm/internal/experimental.d.mts +7 -7
  255. package/dist/esm/internal/experimental.mjs +1 -84
  256. package/dist/esm/internal/faucet.mjs +1 -57
  257. package/dist/esm/internal/fungibleAsset.d.mts +2 -2
  258. package/dist/esm/internal/fungibleAsset.mjs +1 -105
  259. package/dist/esm/internal/general.mjs +1 -43
  260. package/dist/esm/internal/keyless.d.mts +10 -20
  261. package/dist/esm/internal/keyless.mjs +1 -107
  262. package/dist/esm/internal/object.mjs +1 -58
  263. package/dist/esm/internal/staking.mjs +1 -60
  264. package/dist/esm/internal/table.mjs +1 -38
  265. package/dist/esm/internal/transaction.mjs +1 -57
  266. package/dist/esm/internal/transactionSubmission.d.mts +6 -6
  267. package/dist/esm/internal/transactionSubmission.mjs +1 -118
  268. package/dist/esm/internal/utils/index.mjs +1 -38
  269. package/dist/esm/internal/utils/utils.mjs +1 -37
  270. package/dist/esm/internal/view.d.mts +7 -7
  271. package/dist/esm/internal/view.mjs +1 -86
  272. package/dist/esm/{publicKey-BMtGNNLg.d.mts → publicKey-pDHBAZlT.d.mts} +27 -1
  273. package/dist/esm/transactions/authenticator/account.d.mts +3 -1
  274. package/dist/esm/transactions/authenticator/account.mjs +1 -67
  275. package/dist/esm/transactions/authenticator/index.d.mts +3 -1
  276. package/dist/esm/transactions/authenticator/index.mjs +1 -82
  277. package/dist/esm/transactions/authenticator/transaction.d.mts +4 -2
  278. package/dist/esm/transactions/authenticator/transaction.mjs +1 -66
  279. package/dist/esm/transactions/index.d.mts +4 -4
  280. package/dist/esm/transactions/index.mjs +1 -296
  281. package/dist/esm/transactions/instances/chainId.mjs +1 -11
  282. package/dist/esm/transactions/instances/identifier.mjs +1 -11
  283. package/dist/esm/transactions/instances/index.d.mts +4 -2
  284. package/dist/esm/transactions/instances/index.mjs +1 -114
  285. package/dist/esm/transactions/instances/moduleId.mjs +1 -55
  286. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -60
  287. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -65
  288. package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +3 -1
  289. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -21
  290. package/dist/esm/transactions/instances/signedTransaction.d.mts +3 -1
  291. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -63
  292. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -60
  293. package/dist/esm/transactions/instances/transactionArgument.mjs +1 -1
  294. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -73
  295. package/dist/esm/transactions/management/accountSequenceNumber.d.mts +2 -2
  296. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -101
  297. package/dist/esm/transactions/management/asyncQueue.mjs +1 -9
  298. package/dist/esm/transactions/management/index.d.mts +2 -2
  299. package/dist/esm/transactions/management/index.mjs +1 -111
  300. package/dist/esm/transactions/management/transactionWorker.d.mts +3 -3
  301. package/dist/esm/transactions/management/transactionWorker.mjs +1 -107
  302. package/dist/esm/transactions/scriptComposer/index.d.mts +7 -7
  303. package/dist/esm/transactions/scriptComposer/index.mjs +1 -80
  304. package/dist/esm/transactions/transactionBuilder/helpers.d.mts +8 -8
  305. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -92
  306. package/dist/esm/transactions/transactionBuilder/index.d.mts +8 -8
  307. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -166
  308. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +34 -23
  309. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -74
  310. package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +7 -7
  311. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -75
  312. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +8 -8
  313. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -97
  314. package/dist/esm/transactions/typeTag/index.d.mts +16 -0
  315. package/dist/esm/transactions/typeTag/index.mjs +1 -91
  316. package/dist/esm/transactions/typeTag/parser.mjs +1 -60
  317. package/dist/esm/transactions/types.d.mts +5 -5
  318. package/dist/esm/transactions/types.mjs +1 -1
  319. package/dist/esm/types/abstraction.mjs +1 -7
  320. package/dist/esm/types/generated/operations.d.mts +10 -63
  321. package/dist/esm/types/generated/queries.d.mts +2 -10
  322. package/dist/esm/types/generated/queries.mjs +1 -69
  323. package/dist/esm/types/generated/types.d.mts +1054 -824
  324. package/dist/esm/types/generated/types.mjs +1 -774
  325. package/dist/esm/types/generated/types.mjs.map +1 -1
  326. package/dist/esm/types/index.d.mts +2 -2
  327. package/dist/esm/types/index.mjs +1 -82
  328. package/dist/esm/types/indexer.d.mts +2 -14
  329. package/dist/esm/types/indexer.mjs +1 -1
  330. package/dist/esm/types/keyless.d.mts +1 -1
  331. package/dist/esm/types/types.d.mts +3 -58
  332. package/dist/esm/types/types.mjs +1 -77
  333. package/dist/esm/utils/apiEndpoints.mjs +1 -21
  334. package/dist/esm/utils/const.d.mts +1 -1
  335. package/dist/esm/utils/const.mjs +1 -25
  336. package/dist/esm/utils/helpers.d.mts +2 -1
  337. package/dist/esm/utils/helpers.mjs +1 -37
  338. package/dist/esm/utils/index.d.mts +1 -1
  339. package/dist/esm/utils/index.mjs +1 -88
  340. package/dist/esm/utils/memoize.mjs +1 -9
  341. package/dist/esm/utils/normalizeBundle.mjs +1 -20
  342. package/dist/esm/version.d.mts +1 -1
  343. package/dist/esm/version.mjs +1 -7
  344. package/package.json +3 -3
  345. package/src/account/AbstractKeylessAccount.ts +33 -49
  346. package/src/account/MultiKeyAccount.ts +23 -16
  347. package/src/api/account.ts +2 -56
  348. package/src/cli/localNode.ts +6 -15
  349. package/src/core/crypto/abstraction.ts +6 -1
  350. package/src/core/crypto/ed25519.ts +19 -1
  351. package/src/core/crypto/ephemeral.ts +9 -0
  352. package/src/core/crypto/federatedKeyless.ts +40 -4
  353. package/src/core/crypto/index.ts +4 -3
  354. package/src/core/crypto/keyless.ts +577 -17
  355. package/src/core/crypto/multiEd25519.ts +11 -3
  356. package/src/core/crypto/multiKey.ts +74 -4
  357. package/src/core/crypto/publicKey.ts +28 -0
  358. package/src/core/crypto/secp256k1.ts +25 -2
  359. package/src/core/crypto/singleKey.ts +32 -7
  360. package/src/errors/index.ts +50 -0
  361. package/src/internal/account.ts +2 -395
  362. package/src/internal/keyless.ts +9 -17
  363. package/src/transactions/scriptComposer/index.ts +19 -6
  364. package/src/transactions/transactionBuilder/remoteAbi.ts +107 -35
  365. package/src/transactions/typeTag/index.ts +22 -0
  366. package/src/types/codegen.yaml +1 -1
  367. package/src/types/generated/operations.ts +8 -69
  368. package/src/types/generated/queries.ts +0 -111
  369. package/src/types/generated/types.ts +1159 -951
  370. package/src/types/indexer.ts +0 -16
  371. package/src/types/keyless.ts +1 -1
  372. package/src/types/types.ts +3 -62
  373. package/src/utils/const.ts +1 -1
  374. package/src/utils/helpers.ts +11 -0
  375. package/src/version.ts +1 -1
  376. package/dist/common/chunk-JMOQXLED.js +0 -1305
  377. package/dist/common/chunk-JMOQXLED.js.map +0 -1
  378. package/dist/esm/chunk-2FTF6J7F.mjs +0 -97
  379. package/dist/esm/chunk-2FTF6J7F.mjs.map +0 -1
  380. package/dist/esm/chunk-2HL7JEFC.mjs +0 -829
  381. package/dist/esm/chunk-2HL7JEFC.mjs.map +0 -1
  382. package/dist/esm/chunk-2WBJAKBO.mjs +0 -53
  383. package/dist/esm/chunk-2WBJAKBO.mjs.map +0 -1
  384. package/dist/esm/chunk-32UQAST6.mjs +0 -296
  385. package/dist/esm/chunk-32UQAST6.mjs.map +0 -1
  386. package/dist/esm/chunk-3DAVHDK4.mjs +0 -195
  387. package/dist/esm/chunk-3DAVHDK4.mjs.map +0 -1
  388. package/dist/esm/chunk-3IWV2Q3K.mjs +0 -12
  389. package/dist/esm/chunk-3TUV6YMI.mjs +0 -305
  390. package/dist/esm/chunk-3TUV6YMI.mjs.map +0 -1
  391. package/dist/esm/chunk-4NMDYPUD.mjs +0 -1
  392. package/dist/esm/chunk-56UCIGTO.mjs +0 -21
  393. package/dist/esm/chunk-56UCIGTO.mjs.map +0 -1
  394. package/dist/esm/chunk-5ORUQZAR.mjs +0 -100
  395. package/dist/esm/chunk-5ORUQZAR.mjs.map +0 -1
  396. package/dist/esm/chunk-5QHMFYVL.mjs +0 -42
  397. package/dist/esm/chunk-5QHMFYVL.mjs.map +0 -1
  398. package/dist/esm/chunk-62LC4PPC.mjs +0 -128
  399. package/dist/esm/chunk-62LC4PPC.mjs.map +0 -1
  400. package/dist/esm/chunk-6ASWESA2.mjs +0 -77
  401. package/dist/esm/chunk-6I37A76G.mjs +0 -29
  402. package/dist/esm/chunk-6OFCIXWS.mjs +0 -379
  403. package/dist/esm/chunk-6OFCIXWS.mjs.map +0 -1
  404. package/dist/esm/chunk-6SNGKTWE.mjs +0 -91
  405. package/dist/esm/chunk-6SNGKTWE.mjs.map +0 -1
  406. package/dist/esm/chunk-6T3V5LXK.mjs +0 -119
  407. package/dist/esm/chunk-7F32C225.mjs +0 -219
  408. package/dist/esm/chunk-7F32C225.mjs.map +0 -1
  409. package/dist/esm/chunk-7WW735TU.mjs +0 -276
  410. package/dist/esm/chunk-7WW735TU.mjs.map +0 -1
  411. package/dist/esm/chunk-A33OBGVN.mjs +0 -1014
  412. package/dist/esm/chunk-A33OBGVN.mjs.map +0 -1
  413. package/dist/esm/chunk-A7LYGPFL.mjs +0 -208
  414. package/dist/esm/chunk-A7LYGPFL.mjs.map +0 -1
  415. package/dist/esm/chunk-AGKEC2IM.mjs +0 -250
  416. package/dist/esm/chunk-AGKEC2IM.mjs.map +0 -1
  417. package/dist/esm/chunk-AKXCFBYF.mjs +0 -49
  418. package/dist/esm/chunk-AKXCFBYF.mjs.map +0 -1
  419. package/dist/esm/chunk-APM7OSLS.mjs +0 -122
  420. package/dist/esm/chunk-BDM6FBUO.mjs +0 -198
  421. package/dist/esm/chunk-BEYIOC2H.mjs +0 -34
  422. package/dist/esm/chunk-BMM72IIP.mjs +0 -250
  423. package/dist/esm/chunk-BMM72IIP.mjs.map +0 -1
  424. package/dist/esm/chunk-BSCOVLWS.mjs +0 -1
  425. package/dist/esm/chunk-BSCOVLWS.mjs.map +0 -1
  426. package/dist/esm/chunk-BU43ZFDJ.mjs +0 -281
  427. package/dist/esm/chunk-C7EEG6SW.mjs +0 -689
  428. package/dist/esm/chunk-C7EEG6SW.mjs.map +0 -1
  429. package/dist/esm/chunk-C7T6GW5P.mjs +0 -376
  430. package/dist/esm/chunk-CXLXUSCG.mjs +0 -417
  431. package/dist/esm/chunk-D4MW64RH.mjs +0 -188
  432. package/dist/esm/chunk-D4MW64RH.mjs.map +0 -1
  433. package/dist/esm/chunk-D6RXVCE3.mjs +0 -86
  434. package/dist/esm/chunk-D6RXVCE3.mjs.map +0 -1
  435. package/dist/esm/chunk-DDZGHA66.mjs +0 -495
  436. package/dist/esm/chunk-DDZGHA66.mjs.map +0 -1
  437. package/dist/esm/chunk-DGDZNHUJ.mjs +0 -72
  438. package/dist/esm/chunk-DGDZNHUJ.mjs.map +0 -1
  439. package/dist/esm/chunk-DMFRIING.mjs +0 -286
  440. package/dist/esm/chunk-DMFRIING.mjs.map +0 -1
  441. package/dist/esm/chunk-E7FWVXGX.mjs +0 -1
  442. package/dist/esm/chunk-E7FWVXGX.mjs.map +0 -1
  443. package/dist/esm/chunk-EBFKT35C.mjs +0 -66
  444. package/dist/esm/chunk-EBFKT35C.mjs.map +0 -1
  445. package/dist/esm/chunk-ECTX2FGD.mjs +0 -355
  446. package/dist/esm/chunk-ECTX2FGD.mjs.map +0 -1
  447. package/dist/esm/chunk-EPTUAWRA.mjs +0 -895
  448. package/dist/esm/chunk-EPTUAWRA.mjs.map +0 -1
  449. package/dist/esm/chunk-F4VI7BNX.mjs +0 -58
  450. package/dist/esm/chunk-F4VI7BNX.mjs.map +0 -1
  451. package/dist/esm/chunk-F7W7KS5C.mjs +0 -52
  452. package/dist/esm/chunk-FDMI4BUL.mjs +0 -611
  453. package/dist/esm/chunk-FDMI4BUL.mjs.map +0 -1
  454. package/dist/esm/chunk-FMNMYKYH.mjs +0 -71
  455. package/dist/esm/chunk-FMNMYKYH.mjs.map +0 -1
  456. package/dist/esm/chunk-FRLS4GRM.mjs +0 -62
  457. package/dist/esm/chunk-G34CJDST.mjs +0 -139
  458. package/dist/esm/chunk-G4NBRMZ2.mjs +0 -7
  459. package/dist/esm/chunk-G6R77JKO.mjs +0 -121
  460. package/dist/esm/chunk-G6R77JKO.mjs.map +0 -1
  461. package/dist/esm/chunk-G7BB6K4B.mjs +0 -167
  462. package/dist/esm/chunk-G7BB6K4B.mjs.map +0 -1
  463. package/dist/esm/chunk-GCQK2S5Q.mjs +0 -43
  464. package/dist/esm/chunk-GCQK2S5Q.mjs.map +0 -1
  465. package/dist/esm/chunk-GFPEB22G.mjs +0 -1
  466. package/dist/esm/chunk-GFPEB22G.mjs.map +0 -1
  467. package/dist/esm/chunk-GUA5YTIK.mjs +0 -362
  468. package/dist/esm/chunk-HBXBODME.mjs +0 -84
  469. package/dist/esm/chunk-HBXBODME.mjs.map +0 -1
  470. package/dist/esm/chunk-HEZ2ZYZA.mjs +0 -1
  471. package/dist/esm/chunk-HEZ2ZYZA.mjs.map +0 -1
  472. package/dist/esm/chunk-HKQY5GXT.mjs +0 -231
  473. package/dist/esm/chunk-HKQY5GXT.mjs.map +0 -1
  474. package/dist/esm/chunk-HL337SEM.mjs +0 -219
  475. package/dist/esm/chunk-HL337SEM.mjs.map +0 -1
  476. package/dist/esm/chunk-HQDHSKVS.mjs +0 -74
  477. package/dist/esm/chunk-HQDHSKVS.mjs.map +0 -1
  478. package/dist/esm/chunk-I25AX6PQ.mjs +0 -7
  479. package/dist/esm/chunk-I5G7XFGT.mjs +0 -86
  480. package/dist/esm/chunk-I5G7XFGT.mjs.map +0 -1
  481. package/dist/esm/chunk-IHYTP2EW.mjs +0 -1
  482. package/dist/esm/chunk-IHYTP2EW.mjs.map +0 -1
  483. package/dist/esm/chunk-IJ7XCPP3.mjs +0 -480
  484. package/dist/esm/chunk-IJ7XCPP3.mjs.map +0 -1
  485. package/dist/esm/chunk-ILTEOGFF.mjs +0 -407
  486. package/dist/esm/chunk-ILTEOGFF.mjs.map +0 -1
  487. package/dist/esm/chunk-IP7GATDH.mjs +0 -322
  488. package/dist/esm/chunk-IP7GATDH.mjs.map +0 -1
  489. package/dist/esm/chunk-IPUAVRGL.mjs +0 -248
  490. package/dist/esm/chunk-IPUAVRGL.mjs.map +0 -1
  491. package/dist/esm/chunk-IQVHXOD3.mjs +0 -192
  492. package/dist/esm/chunk-IQVHXOD3.mjs.map +0 -1
  493. package/dist/esm/chunk-JAZJE3OR.mjs +0 -45
  494. package/dist/esm/chunk-JAZJE3OR.mjs.map +0 -1
  495. package/dist/esm/chunk-JEVGHYEP.mjs +0 -162
  496. package/dist/esm/chunk-JEVGHYEP.mjs.map +0 -1
  497. package/dist/esm/chunk-JFMFZ2IL.mjs +0 -147
  498. package/dist/esm/chunk-JFMFZ2IL.mjs.map +0 -1
  499. package/dist/esm/chunk-JQIRRM7G.mjs +0 -195
  500. package/dist/esm/chunk-JQIRRM7G.mjs.map +0 -1
  501. package/dist/esm/chunk-JXCZTOYC.mjs +0 -1
  502. package/dist/esm/chunk-JXCZTOYC.mjs.map +0 -1
  503. package/dist/esm/chunk-K5OCDM3W.mjs +0 -207
  504. package/dist/esm/chunk-K5OCDM3W.mjs.map +0 -1
  505. package/dist/esm/chunk-KLUO6XPE.mjs +0 -33
  506. package/dist/esm/chunk-KSK3XIGF.mjs +0 -502
  507. package/dist/esm/chunk-KW64NP2F.mjs +0 -71
  508. package/dist/esm/chunk-KW64NP2F.mjs.map +0 -1
  509. package/dist/esm/chunk-LJRNGZMY.mjs +0 -10
  510. package/dist/esm/chunk-MFFBZ43D.mjs +0 -45
  511. package/dist/esm/chunk-MWXBQ6HR.mjs +0 -15
  512. package/dist/esm/chunk-MYEYZ7PF.mjs +0 -46
  513. package/dist/esm/chunk-NUT2VOX2.mjs +0 -317
  514. package/dist/esm/chunk-OFUNBTK4.mjs +0 -169
  515. package/dist/esm/chunk-ORCQEMJL.mjs +0 -51
  516. package/dist/esm/chunk-ORCQEMJL.mjs.map +0 -1
  517. package/dist/esm/chunk-PGFEUN7K.mjs +0 -129
  518. package/dist/esm/chunk-PGFEUN7K.mjs.map +0 -1
  519. package/dist/esm/chunk-PKUXOBIV.mjs +0 -138
  520. package/dist/esm/chunk-PT2QHUB6.mjs +0 -96
  521. package/dist/esm/chunk-QJ6CGH7N.mjs +0 -71
  522. package/dist/esm/chunk-QPT4BSAB.mjs +0 -20
  523. package/dist/esm/chunk-QSYWLSSN.mjs +0 -216
  524. package/dist/esm/chunk-QYNYDQE3.mjs +0 -288
  525. package/dist/esm/chunk-QYNYDQE3.mjs.map +0 -1
  526. package/dist/esm/chunk-R45SPK6Q.mjs +0 -61
  527. package/dist/esm/chunk-R45SPK6Q.mjs.map +0 -1
  528. package/dist/esm/chunk-R4JTQQBX.mjs +0 -37
  529. package/dist/esm/chunk-R4JTQQBX.mjs.map +0 -1
  530. package/dist/esm/chunk-RCXGTN36.mjs +0 -58
  531. package/dist/esm/chunk-RCXGTN36.mjs.map +0 -1
  532. package/dist/esm/chunk-RMMOF53Q.mjs +0 -1
  533. package/dist/esm/chunk-RMMOF53Q.mjs.map +0 -1
  534. package/dist/esm/chunk-RQS33JAS.mjs +0 -77
  535. package/dist/esm/chunk-RQS33JAS.mjs.map +0 -1
  536. package/dist/esm/chunk-SAWN7RJP.mjs +0 -15
  537. package/dist/esm/chunk-SAWN7RJP.mjs.map +0 -1
  538. package/dist/esm/chunk-SBB4YEPT.mjs +0 -17
  539. package/dist/esm/chunk-SFLQPB72.mjs +0 -63
  540. package/dist/esm/chunk-SPI2HO3E.mjs +0 -177
  541. package/dist/esm/chunk-SPI2HO3E.mjs.map +0 -1
  542. package/dist/esm/chunk-SPVJXZL5.mjs +0 -865
  543. package/dist/esm/chunk-SPVJXZL5.mjs.map +0 -1
  544. package/dist/esm/chunk-SQNS4SFV.mjs +0 -232
  545. package/dist/esm/chunk-SRXIHVZE.mjs +0 -50
  546. package/dist/esm/chunk-SRXIHVZE.mjs.map +0 -1
  547. package/dist/esm/chunk-T4BFWV46.mjs +0 -63
  548. package/dist/esm/chunk-T4BFWV46.mjs.map +0 -1
  549. package/dist/esm/chunk-T573PCIR.mjs +0 -700
  550. package/dist/esm/chunk-T573PCIR.mjs.map +0 -1
  551. package/dist/esm/chunk-TDLL7QX5.mjs +0 -239
  552. package/dist/esm/chunk-TDLL7QX5.mjs.map +0 -1
  553. package/dist/esm/chunk-TFW6N66T.mjs +0 -415
  554. package/dist/esm/chunk-TFW6N66T.mjs.map +0 -1
  555. package/dist/esm/chunk-THWEBWUC.mjs +0 -20
  556. package/dist/esm/chunk-TJDF4CXI.mjs +0 -513
  557. package/dist/esm/chunk-TJDF4CXI.mjs.map +0 -1
  558. package/dist/esm/chunk-TL4Z4KHK.mjs +0 -70
  559. package/dist/esm/chunk-TL4Z4KHK.mjs.map +0 -1
  560. package/dist/esm/chunk-UGFIWCJQ.mjs +0 -130
  561. package/dist/esm/chunk-UGFIWCJQ.mjs.map +0 -1
  562. package/dist/esm/chunk-UGKZQUGE.mjs +0 -367
  563. package/dist/esm/chunk-UGKZQUGE.mjs.map +0 -1
  564. package/dist/esm/chunk-UIRAXHDH.mjs +0 -1
  565. package/dist/esm/chunk-UIRAXHDH.mjs.map +0 -1
  566. package/dist/esm/chunk-UK7SPHIE.mjs +0 -420
  567. package/dist/esm/chunk-UK7SPHIE.mjs.map +0 -1
  568. package/dist/esm/chunk-UOHCJOXI.mjs +0 -150
  569. package/dist/esm/chunk-UOHCJOXI.mjs.map +0 -1
  570. package/dist/esm/chunk-WHSS6I7T.mjs +0 -90
  571. package/dist/esm/chunk-WHSS6I7T.mjs.map +0 -1
  572. package/dist/esm/chunk-WLTQHGIJ.mjs +0 -177
  573. package/dist/esm/chunk-WUM247HF.mjs +0 -125
  574. package/dist/esm/chunk-WUM247HF.mjs.map +0 -1
  575. package/dist/esm/chunk-WXQUBQK4.mjs +0 -19
  576. package/dist/esm/chunk-X4N5BN3S.mjs +0 -40
  577. package/dist/esm/chunk-X4N5BN3S.mjs.map +0 -1
  578. package/dist/esm/chunk-XIBOO3WF.mjs +0 -168
  579. package/dist/esm/chunk-XIBOO3WF.mjs.map +0 -1
  580. package/dist/esm/chunk-XQFUKBY7.mjs +0 -136
  581. package/dist/esm/chunk-XX6C2QGI.mjs +0 -160
  582. package/dist/esm/chunk-XX6C2QGI.mjs.map +0 -1
  583. package/dist/esm/chunk-Y3ENAKRC.mjs +0 -73
  584. package/dist/esm/chunk-Y3M32DIB.mjs +0 -79
  585. package/dist/esm/chunk-Y3M32DIB.mjs.map +0 -1
  586. package/dist/esm/chunk-YK66QBML.mjs +0 -89
  587. package/dist/esm/chunk-YT7V6AVJ.mjs +0 -66
  588. package/dist/esm/chunk-YU65LNIC.mjs +0 -72
  589. package/dist/esm/chunk-ZRBUAZZD.mjs +0 -36
  590. package/dist/esm/chunk-ZRBUAZZD.mjs.map +0 -1
  591. package/dist/esm/chunk-ZWCTF3NQ.mjs +0 -25
  592. package/src/internal/queries/getAccountAddressForAuthKey.graphql +0 -8
  593. package/src/internal/queries/getAuthKeysForPublicKey.graphql +0 -9
  594. package/src/internal/queries/getMultiKeyForAuthKey.graphql +0 -9
  595. package/src/internal/queries/getSignatures.graphql +0 -13
  596. /package/dist/esm/{chunk-4NMDYPUD.mjs.map → chunk-KDMSOCZY.mjs.map} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/internal/digitalAsset.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * This file contains the underlying implementations for exposed API surface in\n * the {@link api/digitalAsset}. By moving the methods out into a separate file,\n * other namespaces and processes can access these methods without depending on the entire\n * digitalAsset namespace and without having a dependency cycle error.\n * @group Implementation\n */\n\nimport { AptosConfig } from \"../api/aptosConfig\";\nimport { Bool, MoveString, MoveVector, U64 } from \"../bcs\";\nimport { AccountAddress, AccountAddressInput } from \"../core\";\nimport { Account } from \"../account\";\nimport { EntryFunctionABI, InputGenerateTransactionOptions } from \"../transactions/types\";\nimport {\n AnyNumber,\n GetCollectionDataResponse,\n GetCurrentTokenOwnershipResponse,\n GetOwnedTokensResponse,\n GetTokenActivityResponse,\n GetTokenDataResponse,\n MoveAbility,\n MoveStructId,\n OrderByArg,\n PaginationArgs,\n TokenStandardArg,\n WhereArg,\n} from \"../types\";\nimport {\n GetCollectionDataQuery,\n GetCurrentTokenOwnershipQuery,\n GetTokenActivityQuery,\n GetTokenDataQuery,\n} from \"../types/generated/operations\";\nimport {\n GetCollectionData,\n GetCurrentTokenOwnership,\n GetTokenActivity,\n GetTokenData,\n} from \"../types/generated/queries\";\nimport { queryIndexer } from \"./general\";\nimport { generateTransaction } from \"./transactionSubmission\";\nimport { MAX_U64_BIG_INT } from \"../bcs/consts\";\nimport {\n CurrentCollectionsV2BoolExp,\n CurrentTokenOwnershipsV2BoolExp,\n TokenActivitiesV2BoolExp,\n} from \"../types/generated/types\";\nimport {\n checkOrConvertArgument,\n objectStructTag,\n parseTypeTag,\n stringStructTag,\n TypeTagAddress,\n TypeTagBool,\n TypeTagGeneric,\n TypeTagStruct,\n TypeTagU64,\n TypeTagVector,\n} from \"../transactions\";\nimport { SimpleTransaction } from \"../transactions/instances/simpleTransaction\";\n\n// A property type map for the user input and what Move expects\nconst PropertyTypeMap = {\n BOOLEAN: \"bool\",\n U8: \"u8\",\n U16: \"u16\",\n U32: \"u32\",\n U64: \"u64\",\n U128: \"u128\",\n U256: \"u256\",\n ADDRESS: \"address\",\n STRING: \"0x1::string::String\",\n ARRAY: \"vector<u8>\",\n};\n\n/**\n * The keys of the PropertyTypeMap, representing different property types.\n * @group Implementation\n */\nexport type PropertyType = keyof typeof PropertyTypeMap;\n\n/**\n * Accepted property value types for user input, including boolean, number, bigint, string, AccountAddress, and Uint8Array.\n * To pass in an Array, use Uint8Array type\n * for example `new MoveVector([new MoveString(\"hello\"), new MoveString(\"world\")]).bcsToBytes()`\n * @group Implementation\n */\nexport type PropertyValue = boolean | number | bigint | string | AccountAddress | Uint8Array;\n\n// The default digital asset type to use if non provided\nconst defaultDigitalAssetType = \"0x4::token::Token\";\n\n// FETCH QUERIES\n\n/**\n * Retrieves data for a specific digital asset using its address.\n *\n * @param args - The arguments for fetching digital asset data.\n * @param args.aptosConfig - The configuration settings for Aptos.\n * @param args.digitalAssetAddress - The address of the digital asset to retrieve data for.\n * @returns The data of the specified digital asset.\n * @group Implementation\n */\nexport async function getDigitalAssetData(args: {\n aptosConfig: AptosConfig;\n digitalAssetAddress: AccountAddressInput;\n}): Promise<GetTokenDataResponse> {\n const { aptosConfig, digitalAssetAddress } = args;\n\n const whereCondition: { token_data_id: { _eq: string } } = {\n token_data_id: { _eq: AccountAddress.from(digitalAssetAddress).toStringLong() },\n };\n\n const graphqlQuery = {\n query: GetTokenData,\n variables: {\n where_condition: whereCondition,\n },\n };\n\n const data = await queryIndexer<GetTokenDataQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getDigitalAssetData\",\n });\n\n return data.current_token_datas_v2[0];\n}\n\n/**\n * Retrieves the current ownership details of a specified digital asset.\n *\n * @param args - The arguments for the function.\n * @param args.aptosConfig - The configuration settings for Aptos.\n * @param args.digitalAssetAddress - The address of the digital asset to query ownership for.\n * @returns The current ownership details of the specified digital asset.\n * @group Implementation\n */\nexport async function getCurrentDigitalAssetOwnership(args: {\n aptosConfig: AptosConfig;\n digitalAssetAddress: AccountAddressInput;\n}): Promise<GetCurrentTokenOwnershipResponse> {\n const { aptosConfig, digitalAssetAddress } = args;\n\n const whereCondition: CurrentTokenOwnershipsV2BoolExp = {\n token_data_id: { _eq: AccountAddress.from(digitalAssetAddress).toStringLong() },\n amount: { _gt: 0 },\n };\n\n const graphqlQuery = {\n query: GetCurrentTokenOwnership,\n variables: {\n where_condition: whereCondition,\n },\n };\n\n const data = await queryIndexer<GetCurrentTokenOwnershipQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getCurrentDigitalAssetOwnership\",\n });\n\n return data.current_token_ownerships_v2[0];\n}\n\n/**\n * Retrieves the digital assets owned by a specified account address.\n *\n * @param args - The arguments for retrieving owned digital assets.\n * @param args.aptosConfig - The configuration for connecting to the Aptos network.\n * @param args.ownerAddress - The address of the account whose owned digital assets are being queried.\n * @param args.options - Optional pagination and ordering parameters for the query.\n * @param args.options.offset - The number of records to skip for pagination.\n * @param args.options.limit - The maximum number of records to return.\n * @param args.options.orderBy - The criteria for ordering the results.\n *\n * @returns An array of digital assets currently owned by the specified account.\n * @group Implementation\n */\nexport async function getOwnedDigitalAssets(args: {\n aptosConfig: AptosConfig;\n ownerAddress: AccountAddressInput;\n options?: PaginationArgs & OrderByArg<GetTokenActivityResponse[0]>;\n}): Promise<GetOwnedTokensResponse> {\n const { aptosConfig, ownerAddress, options } = args;\n\n const whereCondition: CurrentTokenOwnershipsV2BoolExp = {\n owner_address: { _eq: AccountAddress.from(ownerAddress).toStringLong() },\n amount: { _gt: 0 },\n };\n\n const graphqlQuery = {\n query: GetCurrentTokenOwnership,\n variables: {\n where_condition: whereCondition,\n offset: options?.offset,\n limit: options?.limit,\n order_by: options?.orderBy,\n },\n };\n\n const data = await queryIndexer<GetCurrentTokenOwnershipQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getOwnedDigitalAssets\",\n });\n\n return data.current_token_ownerships_v2;\n}\n\n/**\n * Retrieves the activity associated with a specific digital asset.\n * This function allows you to track the token activities for a given digital asset address.\n *\n * @param args - The arguments for retrieving digital asset activity.\n * @param args.aptosConfig - The configuration settings for Aptos.\n * @param args.digitalAssetAddress - The address of the digital asset to query.\n * @param args.options - Optional parameters for pagination and ordering.\n * @param args.options.offset - The number of records to skip before starting to collect the result set.\n * @param args.options.limit - The maximum number of records to return.\n * @param args.options.orderBy - The criteria to order the results by.\n * @returns A promise that resolves to an array of token activities for the specified digital asset.\n * @group Implementation\n */\nexport async function getDigitalAssetActivity(args: {\n aptosConfig: AptosConfig;\n digitalAssetAddress: AccountAddressInput;\n options?: PaginationArgs & OrderByArg<GetTokenActivityResponse[0]>;\n}): Promise<GetTokenActivityResponse> {\n const { aptosConfig, digitalAssetAddress, options } = args;\n\n const whereCondition: TokenActivitiesV2BoolExp = {\n token_data_id: { _eq: AccountAddress.from(digitalAssetAddress).toStringLong() },\n };\n\n const graphqlQuery = {\n query: GetTokenActivity,\n variables: {\n where_condition: whereCondition,\n offset: options?.offset,\n limit: options?.limit,\n order_by: options?.orderBy,\n },\n };\n\n const data = await queryIndexer<GetTokenActivityQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getDigitalAssetActivity\",\n });\n\n return data.token_activities_v2;\n}\n\n/**\n * Options for creating a collection, allowing customization of various attributes such as supply limits, mutability of metadata,\n * and royalty settings.\n *\n * @param maxSupply - Maximum number of tokens that can be minted in the collection.\n * @param mutableDescription - Indicates if the collection description can be changed after creation.\n * @param mutableRoyalty - Indicates if the royalty settings can be modified after creation.\n * @param mutableURI - Indicates if the collection URI can be updated.\n * @param mutableTokenDescription - Indicates if individual token descriptions can be modified.\n * @param mutableTokenName - Indicates if individual token names can be changed.\n * @param mutableTokenProperties - Indicates if individual token properties can be altered.\n * @param mutableTokenURI - Indicates if individual token URIs can be updated.\n * @param tokensBurnableByCreator - Indicates if the creator can burn tokens from the collection.\n * @param tokensFreezableByCreator - Indicates if the creator can freeze tokens in the collection.\n * @param royaltyNumerator - The numerator for calculating royalties.\n * @param royaltyDenominator - The denominator for calculating royalties.\n * @group Implementation\n */\nexport interface CreateCollectionOptions {\n maxSupply?: AnyNumber;\n mutableDescription?: boolean;\n mutableRoyalty?: boolean;\n mutableURI?: boolean;\n mutableTokenDescription?: boolean;\n mutableTokenName?: boolean;\n mutableTokenProperties?: boolean;\n mutableTokenURI?: boolean;\n tokensBurnableByCreator?: boolean;\n tokensFreezableByCreator?: boolean;\n royaltyNumerator?: number;\n royaltyDenominator?: number;\n}\n\nconst createCollectionAbi: EntryFunctionABI = {\n typeParameters: [],\n parameters: [\n new TypeTagStruct(stringStructTag()),\n new TypeTagU64(),\n new TypeTagStruct(stringStructTag()),\n new TypeTagStruct(stringStructTag()),\n new TypeTagBool(),\n new TypeTagBool(),\n new TypeTagBool(),\n new TypeTagBool(),\n new TypeTagBool(),\n new TypeTagBool(),\n new TypeTagBool(),\n new TypeTagBool(),\n new TypeTagBool(),\n new TypeTagU64(),\n new TypeTagU64(),\n ],\n};\n\n/**\n * Creates a new collection transaction on the Aptos blockchain.\n * This function allows you to define the properties of the collection, including its name, description, and URI.\n *\n * @param args - The parameters for creating the collection transaction.\n * @param args.aptosConfig - The configuration settings for the Aptos network.\n * @param args.creator - The account that will create the collection.\n * @param args.description - A description of the collection.\n * @param args.name - The name of the collection.\n * @param args.uri - The URI associated with the collection.\n * @param args.options - Optional parameters for generating the transaction.\n * @param args.maxSupply - The maximum supply of tokens in the collection (optional).\n * @param args.mutableDescription - Indicates if the collection description can be changed (optional, defaults to true).\n * @param args.mutableRoyalty - Indicates if the royalty settings can be changed (optional, defaults to true).\n * @param args.mutableURI - Indicates if the URI can be changed (optional, defaults to true).\n * @param args.mutableTokenDescription - Indicates if the token description can be changed (optional, defaults to true).\n * @param args.mutableTokenName - Indicates if the token name can be changed (optional, defaults to true).\n * @param args.mutableTokenProperties - Indicates if the token properties can be changed (optional, defaults to true).\n * @param args.mutableTokenURI - Indicates if the token URI can be changed (optional, defaults to true).\n * @param args.tokensBurnableByCreator - Indicates if tokens can be burned by the creator (optional, defaults to true).\n * @param args.tokensFreezableByCreator - Indicates if tokens can be frozen by the creator (optional, defaults to true).\n * @param args.royaltyNumerator - The numerator for calculating royalties (optional, defaults to 0).\n * @param args.royaltyDenominator - The denominator for calculating royalties (optional, defaults to 1).\n * @group Implementation\n */\nexport async function createCollectionTransaction(\n args: {\n aptosConfig: AptosConfig;\n creator: Account;\n description: string;\n name: string;\n uri: string;\n options?: InputGenerateTransactionOptions;\n } & CreateCollectionOptions,\n): Promise<SimpleTransaction> {\n const { aptosConfig, options, creator } = args;\n return generateTransaction({\n aptosConfig,\n sender: creator.accountAddress,\n data: {\n function: \"0x4::aptos_token::create_collection\",\n functionArguments: [\n // Do not change the order\n new MoveString(args.description),\n new U64(args.maxSupply ?? MAX_U64_BIG_INT),\n new MoveString(args.name),\n new MoveString(args.uri),\n new Bool(args.mutableDescription ?? true),\n new Bool(args.mutableRoyalty ?? true),\n new Bool(args.mutableURI ?? true),\n new Bool(args.mutableTokenDescription ?? true),\n new Bool(args.mutableTokenName ?? true),\n new Bool(args.mutableTokenProperties ?? true),\n new Bool(args.mutableTokenURI ?? true),\n new Bool(args.tokensBurnableByCreator ?? true),\n new Bool(args.tokensFreezableByCreator ?? true),\n new U64(args.royaltyNumerator ?? 0),\n new U64(args.royaltyDenominator ?? 1),\n ],\n abi: createCollectionAbi,\n },\n options,\n });\n}\n\n/**\n * Retrieves data for the current collections based on specified options.\n *\n * @param args - The arguments for the function.\n * @param args.aptosConfig - The configuration object for Aptos.\n * @param args.options - Optional parameters for filtering and pagination.\n * @param args.options.tokenStandard - The token standard to filter the collections (default is \"v2\").\n * @param args.options.offset - The offset for pagination.\n * @param args.options.limit - The limit for pagination.\n * @param args.options.where - The conditions to filter the collections.\n * @returns The data of the current collections.\n * @group Implementation\n */\nexport async function getCollectionData(args: {\n aptosConfig: AptosConfig;\n options?: TokenStandardArg & PaginationArgs & WhereArg<CurrentCollectionsV2BoolExp>;\n}): Promise<GetCollectionDataResponse> {\n const { aptosConfig, options } = args;\n\n const whereCondition: any = options?.where;\n\n if (options?.tokenStandard) {\n whereCondition.token_standard = { _eq: options?.tokenStandard ?? \"v2\" };\n }\n\n const graphqlQuery = {\n query: GetCollectionData,\n variables: {\n where_condition: whereCondition,\n offset: options?.offset,\n limit: options?.limit,\n },\n };\n const data = await queryIndexer<GetCollectionDataQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getCollectionData\",\n });\n\n return data.current_collections_v2[0];\n}\n\n/**\n * Retrieves collection data based on the creator's address and the collection name.\n *\n * @param args - The arguments for retrieving the collection data.\n * @param args.aptosConfig - The Aptos configuration object.\n * @param args.creatorAddress - The address of the creator whose collection data is being retrieved.\n * @param args.collectionName - The name of the collection to fetch data for.\n * @param args.options - Optional parameters for filtering the results, including token standard and pagination options.\n * @param args.options.tokenStandard - The token standard to filter the results by (optional).\n * @param args.options.pagination - Pagination options for the results (optional).\n * @group Implementation\n */\nexport async function getCollectionDataByCreatorAddressAndCollectionName(args: {\n aptosConfig: AptosConfig;\n creatorAddress: AccountAddressInput;\n collectionName: string;\n options?: TokenStandardArg & PaginationArgs;\n}): Promise<GetCollectionDataResponse> {\n const { aptosConfig, creatorAddress, collectionName, options } = args;\n const address = AccountAddress.from(creatorAddress);\n\n const whereCondition: any = {\n collection_name: { _eq: collectionName },\n creator_address: { _eq: address.toStringLong() },\n };\n if (options?.tokenStandard) {\n whereCondition.token_standard = { _eq: options?.tokenStandard ?? \"v2\" };\n }\n\n return getCollectionData({ aptosConfig, options: { ...options, where: whereCondition } });\n}\n\n/**\n * Retrieves collection data associated with a specific creator's address.\n * This function allows you to filter the collections based on the creator's address and optional token standards.\n *\n * @param args - The arguments for retrieving collection data.\n * @param args.aptosConfig - The configuration for the Aptos network.\n * @param args.creatorAddress - The address of the creator whose collection data is being retrieved.\n * @param args.options - Optional parameters for filtering the results.\n * @param args.options.tokenStandard - The token standard to filter the collections by.\n * @param args.options.pagination - Pagination options for the results.\n * @group Implementation\n */\nexport async function getCollectionDataByCreatorAddress(args: {\n aptosConfig: AptosConfig;\n creatorAddress: AccountAddressInput;\n options?: TokenStandardArg & PaginationArgs;\n}): Promise<GetCollectionDataResponse> {\n const { aptosConfig, creatorAddress, options } = args;\n const address = AccountAddress.from(creatorAddress);\n\n const whereCondition: any = {\n creator_address: { _eq: address.toStringLong() },\n };\n if (options?.tokenStandard) {\n whereCondition.token_standard = { _eq: options?.tokenStandard ?? \"v2\" };\n }\n\n return getCollectionData({ aptosConfig, options: { ...options, where: whereCondition } });\n}\n\n/**\n * Retrieves data for a specific collection using its unique identifier.\n * This function allows you to filter the collection data based on the token standard and pagination options.\n *\n * @param args - The arguments for retrieving collection data.\n * @param args.aptosConfig - The configuration settings for Aptos.\n * @param args.collectionId - The unique identifier for the collection.\n * @param args.options - Optional parameters for filtering by token standard and pagination.\n * @param args.options.tokenStandard - The standard of the token to filter the collection data.\n * @param args.options.page - The page number for pagination.\n * @param args.options.limit - The number of items per page for pagination.\n * @group Implementation\n */\nexport async function getCollectionDataByCollectionId(args: {\n aptosConfig: AptosConfig;\n collectionId: AccountAddressInput;\n options?: TokenStandardArg & PaginationArgs;\n}): Promise<GetCollectionDataResponse> {\n const { aptosConfig, collectionId, options } = args;\n const address = AccountAddress.from(collectionId);\n\n const whereCondition: any = {\n collection_id: { _eq: address.toStringLong() },\n };\n\n if (options?.tokenStandard) {\n whereCondition.token_standard = { _eq: options?.tokenStandard ?? \"v2\" };\n }\n\n return getCollectionData({ aptosConfig, options: { ...options, where: whereCondition } });\n}\n\n/**\n * Retrieves the collection ID based on the creator's address and the collection name.\n * This function helps in identifying a specific collection within the Aptos ecosystem.\n *\n * @param args - The parameters for retrieving the collection ID.\n * @param args.aptosConfig - The configuration settings for Aptos.\n * @param args.creatorAddress - The address of the creator of the collection.\n * @param args.collectionName - The name of the collection to look up.\n * @param args.options - Optional parameters for additional filtering.\n * @param args.options.tokenStandard - The token standard to filter the collection (default is \"v2\").\n * @returns The ID of the specified collection.\n * @group Implementation\n */\nexport async function getCollectionId(args: {\n aptosConfig: AptosConfig;\n creatorAddress: AccountAddressInput;\n collectionName: string;\n options?: TokenStandardArg;\n}): Promise<string> {\n const { creatorAddress, collectionName, options, aptosConfig } = args;\n const address = AccountAddress.from(creatorAddress);\n\n const whereCondition: any = {\n collection_name: { _eq: collectionName },\n creator_address: { _eq: address.toStringLong() },\n };\n if (options?.tokenStandard) {\n whereCondition.token_standard = { _eq: options?.tokenStandard ?? \"v2\" };\n }\n\n return (await getCollectionData({ aptosConfig, options: { where: whereCondition } })).collection_id;\n}\n\n// TRANSACTIONS\n\nconst mintDigitalAssetAbi: EntryFunctionABI = {\n typeParameters: [],\n parameters: [\n new TypeTagStruct(stringStructTag()),\n new TypeTagStruct(stringStructTag()),\n new TypeTagStruct(stringStructTag()),\n new TypeTagStruct(stringStructTag()),\n new TypeTagVector(new TypeTagStruct(stringStructTag())),\n new TypeTagVector(new TypeTagStruct(stringStructTag())),\n new TypeTagVector(TypeTagVector.u8()),\n ],\n};\n\n/**\n * Creates a transaction to mint a digital asset on the Aptos blockchain.\n * This function allows you to specify various attributes of the asset, including its collection, description, name, and URI.\n *\n * @param args - The arguments for minting the digital asset.\n * @param args.aptosConfig - The configuration settings for the Aptos network.\n * @param args.creator - The account that will create the digital asset.\n * @param args.collection - The name of the collection to which the asset belongs.\n * @param args.description - A brief description of the digital asset.\n * @param args.name - The name of the digital asset.\n * @param args.uri - The URI pointing to the asset's metadata.\n * @param [args.propertyKeys] - Optional array of property keys associated with the asset.\n * @param [args.propertyTypes] - Optional array of property types corresponding to the asset's properties.\n * @param [args.propertyValues] - Optional array of property values for the asset's properties.\n * @param [args.options] - Optional transaction generation options.\n * @group Implementation\n */\nexport async function mintDigitalAssetTransaction(args: {\n aptosConfig: AptosConfig;\n creator: Account;\n collection: string;\n description: string;\n name: string;\n uri: string;\n propertyKeys?: Array<string>;\n propertyTypes?: Array<PropertyType>;\n propertyValues?: Array<PropertyValue>;\n options?: InputGenerateTransactionOptions;\n}): Promise<SimpleTransaction> {\n const {\n aptosConfig,\n options,\n creator,\n collection,\n description,\n name,\n uri,\n propertyKeys,\n propertyTypes,\n propertyValues,\n } = args;\n const convertedPropertyType = propertyTypes?.map((type) => PropertyTypeMap[type]);\n return generateTransaction({\n aptosConfig,\n sender: creator.accountAddress,\n data: {\n function: \"0x4::aptos_token::mint\",\n functionArguments: [\n new MoveString(collection),\n new MoveString(description),\n new MoveString(name),\n new MoveString(uri),\n MoveVector.MoveString(propertyKeys ?? []),\n MoveVector.MoveString(convertedPropertyType ?? []),\n\n /**\n * Retrieves the raw values of specified properties from an array of property values based on their types.\n *\n * @param propertyValues - An array of property values from which to extract the raw data.\n * @param propertyTypes - An array of strings representing the types of properties to retrieve.\n * @returns An array of Uint8Array containing the raw values for the specified property types.\n * @group Implementation\n */\n getPropertyValueRaw(propertyValues ?? [], convertedPropertyType ?? []),\n ],\n abi: mintDigitalAssetAbi,\n },\n options,\n });\n}\n\nconst transferDigitalAssetAbi: EntryFunctionABI = {\n typeParameters: [{ constraints: [MoveAbility.KEY] }],\n parameters: [new TypeTagStruct(objectStructTag(new TypeTagGeneric(0))), new TypeTagAddress()],\n};\n\n/**\n * Initiates a transaction to transfer a digital asset from one account to another.\n * This function helps in executing the transfer of digital assets securely and efficiently.\n *\n * @param args - The arguments required to perform the transfer.\n * @param args.aptosConfig - Configuration settings for the Aptos client.\n * @param args.sender - The account initiating the transfer.\n * @param args.digitalAssetAddress - The address of the digital asset being transferred.\n * @param args.recipient - The address of the account receiving the digital asset.\n * @param args.digitalAssetType - (Optional) The type of the digital asset being transferred.\n * @param args.options - (Optional) Additional options for generating the transaction.\n * @group Implementation\n */\nexport async function transferDigitalAssetTransaction(args: {\n aptosConfig: AptosConfig;\n sender: Account;\n digitalAssetAddress: AccountAddressInput;\n recipient: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n}): Promise<SimpleTransaction> {\n const { aptosConfig, sender, digitalAssetAddress, recipient, digitalAssetType, options } = args;\n return generateTransaction({\n aptosConfig,\n sender: sender.accountAddress,\n data: {\n function: \"0x1::object::transfer\",\n typeArguments: [digitalAssetType ?? defaultDigitalAssetType],\n functionArguments: [AccountAddress.from(digitalAssetAddress), AccountAddress.from(recipient)],\n abi: transferDigitalAssetAbi,\n },\n options,\n });\n}\n\nconst mintSoulBoundAbi: EntryFunctionABI = {\n typeParameters: [],\n parameters: [\n new TypeTagStruct(stringStructTag()),\n new TypeTagStruct(stringStructTag()),\n new TypeTagStruct(stringStructTag()),\n new TypeTagStruct(stringStructTag()),\n new TypeTagVector(new TypeTagStruct(stringStructTag())),\n new TypeTagVector(new TypeTagStruct(stringStructTag())),\n new TypeTagVector(TypeTagVector.u8()),\n new TypeTagAddress(),\n ],\n};\n\n/**\n * Creates a transaction to mint a soul-bound token.\n * This function allows you to specify the token's attributes and recipient, facilitating the creation of unique digital assets.\n *\n * @param args - The parameters required to mint the soul-bound token.\n * @param args.aptosConfig - The configuration settings for the Aptos network.\n * @param args.account - The account initiating the minting transaction.\n * @param args.collection - The name of the collection to which the token belongs.\n * @param args.description - A description of the token being minted.\n * @param args.name - The name of the token.\n * @param args.uri - The URI pointing to the token's metadata.\n * @param args.recipient - The address of the account that will receive the minted token.\n * @param [args.propertyKeys] - Optional array of property keys associated with the token.\n * @param [args.propertyTypes] - Optional array of property types corresponding to the property keys.\n * @param [args.propertyValues] - Optional array of property values that match the property keys and types.\n * @param [args.options] - Optional transaction generation options.\n * @throws Error if the counts of property keys, property types, and property values do not match.\n * @group Implementation\n */\nexport async function mintSoulBoundTransaction(args: {\n aptosConfig: AptosConfig;\n account: Account;\n collection: string;\n description: string;\n name: string;\n uri: string;\n recipient: AccountAddressInput;\n propertyKeys?: Array<string>;\n propertyTypes?: Array<PropertyType>;\n propertyValues?: Array<PropertyValue>;\n options?: InputGenerateTransactionOptions;\n}): Promise<SimpleTransaction> {\n const {\n aptosConfig,\n account,\n collection,\n description,\n name,\n uri,\n recipient,\n propertyKeys,\n propertyTypes,\n propertyValues,\n options,\n } = args;\n if (propertyKeys?.length !== propertyValues?.length) {\n throw new Error(\"Property keys and property values counts do not match\");\n }\n if (propertyTypes?.length !== propertyValues?.length) {\n throw new Error(\"Property types and property values counts do not match\");\n }\n const convertedPropertyType = propertyTypes?.map((type) => PropertyTypeMap[type]);\n return generateTransaction({\n aptosConfig,\n sender: account.accountAddress,\n data: {\n function: \"0x4::aptos_token::mint_soul_bound\",\n functionArguments: [\n collection,\n description,\n name,\n uri,\n MoveVector.MoveString(propertyKeys ?? []),\n MoveVector.MoveString(convertedPropertyType ?? []),\n getPropertyValueRaw(propertyValues ?? [], convertedPropertyType ?? []),\n recipient,\n ],\n abi: mintSoulBoundAbi,\n },\n options,\n });\n}\n\nconst burnDigitalAssetAbi: EntryFunctionABI = {\n typeParameters: [{ constraints: [MoveAbility.KEY] }],\n parameters: [new TypeTagStruct(objectStructTag(new TypeTagGeneric(0)))],\n};\n\n/**\n * Creates a transaction to burn a specified digital asset.\n * This function allows users to permanently remove a digital asset from their account.\n *\n * @param args - The arguments for the transaction.\n * @param args.aptosConfig - The configuration settings for the Aptos network.\n * @param args.creator - The account that is initiating the burn transaction.\n * @param args.digitalAssetAddress - The address of the digital asset to be burned.\n * @param args.digitalAssetType - Optional; the type of the digital asset being burned.\n * @param args.options - Optional; additional options for generating the transaction.\n * @group Implementation\n */\nexport async function burnDigitalAssetTransaction(args: {\n aptosConfig: AptosConfig;\n creator: Account;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n}): Promise<SimpleTransaction> {\n const { aptosConfig, creator, digitalAssetAddress, digitalAssetType, options } = args;\n return generateTransaction({\n aptosConfig,\n sender: creator.accountAddress,\n data: {\n function: \"0x4::aptos_token::burn\",\n typeArguments: [digitalAssetType ?? defaultDigitalAssetType],\n functionArguments: [AccountAddress.from(digitalAssetAddress)],\n abi: burnDigitalAssetAbi,\n },\n options,\n });\n}\n\nconst freezeDigitalAssetAbi: EntryFunctionABI = {\n typeParameters: [{ constraints: [MoveAbility.KEY] }],\n parameters: [new TypeTagStruct(objectStructTag(new TypeTagGeneric(0)))],\n};\n\n/**\n * Creates a transaction to freeze the transfer of a digital asset.\n * This function helps you prevent the transfer of a specified digital asset by generating the appropriate transaction.\n *\n * @param args - The parameters for the transaction.\n * @param args.aptosConfig - The configuration settings for the Aptos client.\n * @param args.creator - The account that is creating the transaction.\n * @param args.digitalAssetAddress - The address of the digital asset to be frozen.\n * @param args.digitalAssetType - (Optional) The type of the digital asset as a Move struct ID.\n * @param args.options - (Optional) Additional options for generating the transaction.\n * @group Implementation\n */\nexport async function freezeDigitalAssetTransferTransaction(args: {\n aptosConfig: AptosConfig;\n creator: Account;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n}): Promise<SimpleTransaction> {\n const { aptosConfig, creator, digitalAssetAddress, digitalAssetType, options } = args;\n return generateTransaction({\n aptosConfig,\n sender: creator.accountAddress,\n data: {\n function: \"0x4::aptos_token::freeze_transfer\",\n typeArguments: [digitalAssetType ?? defaultDigitalAssetType],\n functionArguments: [digitalAssetAddress],\n abi: freezeDigitalAssetAbi,\n },\n options,\n });\n}\n\nconst unfreezeDigitalAssetAbi: EntryFunctionABI = {\n typeParameters: [{ constraints: [MoveAbility.KEY] }],\n parameters: [new TypeTagStruct(objectStructTag(new TypeTagGeneric(0)))],\n};\n\n/**\n * Unfreezes a digital asset transfer transaction, allowing the transfer of the specified digital asset.\n *\n * @param args - The arguments for unfreezing the digital asset transfer transaction.\n * @param args.aptosConfig - The Aptos configuration settings.\n * @param args.creator - The account that is initiating the unfreeze transaction.\n * @param args.digitalAssetAddress - The address of the digital asset to be unfrozen.\n * @param args.digitalAssetType - (Optional) The type of the digital asset being unfrozen.\n * @param args.options - (Optional) Additional options for generating the transaction.\n * @group Implementation\n */\nexport async function unfreezeDigitalAssetTransferTransaction(args: {\n aptosConfig: AptosConfig;\n creator: Account;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n}): Promise<SimpleTransaction> {\n const { aptosConfig, creator, digitalAssetAddress, digitalAssetType, options } = args;\n return generateTransaction({\n aptosConfig,\n sender: creator.accountAddress,\n data: {\n function: \"0x4::aptos_token::unfreeze_transfer\",\n typeArguments: [digitalAssetType ?? defaultDigitalAssetType],\n functionArguments: [digitalAssetAddress],\n abi: unfreezeDigitalAssetAbi,\n },\n options,\n });\n}\n\nconst setDigitalAssetDescriptionAbi: EntryFunctionABI = {\n typeParameters: [{ constraints: [MoveAbility.KEY] }],\n parameters: [new TypeTagStruct(objectStructTag(new TypeTagGeneric(0))), new TypeTagStruct(stringStructTag())],\n};\n\n/**\n * Sets the description for a digital asset, allowing users to provide additional context or information about the asset.\n *\n * @param args - The arguments for setting the digital asset description.\n * @param args.aptosConfig - The Aptos configuration to use for the transaction.\n * @param args.creator - The account that is creating the transaction.\n * @param args.description - The new description for the digital asset.\n * @param args.digitalAssetAddress - The address of the digital asset whose description is being set.\n * @param args.digitalAssetType - (Optional) The type of the digital asset.\n * @param args.options - (Optional) Additional options for generating the transaction.\n * @group Implementation\n */\nexport async function setDigitalAssetDescriptionTransaction(args: {\n aptosConfig: AptosConfig;\n creator: Account;\n description: string;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n}): Promise<SimpleTransaction> {\n const { aptosConfig, creator, description, digitalAssetAddress, digitalAssetType, options } = args;\n return generateTransaction({\n aptosConfig,\n sender: creator.accountAddress,\n data: {\n function: \"0x4::aptos_token::set_description\",\n typeArguments: [digitalAssetType ?? defaultDigitalAssetType],\n functionArguments: [AccountAddress.from(digitalAssetAddress), new MoveString(description)],\n abi: setDigitalAssetDescriptionAbi,\n },\n options,\n });\n}\n\nconst setDigitalAssetNameAbi: EntryFunctionABI = {\n typeParameters: [{ constraints: [MoveAbility.KEY] }],\n parameters: [new TypeTagStruct(objectStructTag(new TypeTagGeneric(0))), new TypeTagStruct(stringStructTag())],\n};\n\n/**\n * Sets the name of a digital asset on the Aptos blockchain.\n * This function allows you to update the name of a specified digital asset, enabling better identification and categorization.\n *\n * @param args - The parameters for setting the digital asset name.\n * @param args.aptosConfig - The configuration settings for the Aptos network.\n * @param args.creator - The account that is creating the transaction.\n * @param args.name - The new name to assign to the digital asset.\n * @param args.digitalAssetAddress - The address of the digital asset to update.\n * @param args.digitalAssetType - (Optional) The type of the digital asset, represented as a Move struct ID.\n * @param args.options - (Optional) Additional options for generating the transaction.\n * @group Implementation\n */\nexport async function setDigitalAssetNameTransaction(args: {\n aptosConfig: AptosConfig;\n creator: Account;\n name: string;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n}): Promise<SimpleTransaction> {\n const { aptosConfig, creator, name, digitalAssetAddress, digitalAssetType, options } = args;\n return generateTransaction({\n aptosConfig,\n sender: creator.accountAddress,\n data: {\n function: \"0x4::aptos_token::set_name\",\n typeArguments: [digitalAssetType ?? defaultDigitalAssetType],\n functionArguments: [AccountAddress.from(digitalAssetAddress), new MoveString(name)],\n abi: setDigitalAssetNameAbi,\n },\n options,\n });\n}\n\nconst setDigitalAssetURIAbi: EntryFunctionABI = {\n typeParameters: [{ constraints: [MoveAbility.KEY] }],\n parameters: [new TypeTagStruct(objectStructTag(new TypeTagGeneric(0))), new TypeTagStruct(stringStructTag())],\n};\n\n/**\n * Sets the URI for a digital asset, allowing you to update the metadata associated with it.\n *\n * @param args - The arguments for setting the digital asset URI.\n * @param args.aptosConfig - The configuration settings for Aptos.\n * @param args.creator - The account that is creating the transaction.\n * @param args.uri - The new URI to be set for the digital asset.\n * @param args.digitalAssetAddress - The address of the digital asset whose URI is being set.\n * @param args.digitalAssetType - The optional type of the digital asset; defaults to a predefined type if not provided.\n * @param args.options - Optional settings for generating the transaction.\n * @group Implementation\n */\nexport async function setDigitalAssetURITransaction(args: {\n aptosConfig: AptosConfig;\n creator: Account;\n uri: string;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n}): Promise<SimpleTransaction> {\n const { aptosConfig, creator, uri, digitalAssetAddress, digitalAssetType, options } = args;\n return generateTransaction({\n aptosConfig,\n sender: creator.accountAddress,\n data: {\n function: \"0x4::aptos_token::set_uri\",\n typeArguments: [digitalAssetType ?? defaultDigitalAssetType],\n functionArguments: [AccountAddress.from(digitalAssetAddress), new MoveString(uri)],\n abi: setDigitalAssetURIAbi,\n },\n options,\n });\n}\n\nconst addDigitalAssetPropertyAbi: EntryFunctionABI = {\n typeParameters: [{ constraints: [MoveAbility.KEY] }],\n parameters: [\n new TypeTagStruct(objectStructTag(new TypeTagGeneric(0))),\n new TypeTagStruct(stringStructTag()),\n new TypeTagStruct(stringStructTag()),\n TypeTagVector.u8(),\n ],\n};\n\n/**\n * Creates a transaction to add a property to a digital asset.\n * This function helps in enhancing the metadata associated with a digital asset by allowing the addition of custom properties.\n *\n * @param args - The arguments for the transaction.\n * @param args.aptosConfig - The configuration settings for Aptos.\n * @param args.creator - The account that is creating the transaction.\n * @param args.propertyKey - The key for the property being added.\n * @param args.propertyType - The type of the property being added.\n * @param args.propertyValue - The value of the property being added.\n * @param args.digitalAssetAddress - The address of the digital asset to which the property is being added.\n * @param args.digitalAssetType - The optional type of the digital asset.\n * @param args.options - Optional transaction generation options.\n * @group Implementation\n */\nexport async function addDigitalAssetPropertyTransaction(args: {\n aptosConfig: AptosConfig;\n creator: Account;\n propertyKey: string;\n propertyType: PropertyType;\n propertyValue: PropertyValue;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n}): Promise<SimpleTransaction> {\n const {\n aptosConfig,\n creator,\n propertyKey,\n propertyType,\n propertyValue,\n digitalAssetAddress,\n digitalAssetType,\n options,\n } = args;\n return generateTransaction({\n aptosConfig,\n sender: creator.accountAddress,\n data: {\n function: \"0x4::aptos_token::add_property\",\n typeArguments: [digitalAssetType ?? defaultDigitalAssetType],\n functionArguments: [\n AccountAddress.from(digitalAssetAddress),\n new MoveString(propertyKey),\n new MoveString(PropertyTypeMap[propertyType]),\n MoveVector.U8(getSinglePropertyValueRaw(propertyValue, PropertyTypeMap[propertyType])),\n ],\n abi: addDigitalAssetPropertyAbi,\n },\n options,\n });\n}\n\nconst removeDigitalAssetPropertyAbi: EntryFunctionABI = {\n typeParameters: [{ constraints: [MoveAbility.KEY] }],\n parameters: [new TypeTagStruct(objectStructTag(new TypeTagGeneric(0))), new TypeTagStruct(stringStructTag())],\n};\n\n/**\n * Removes a property from a digital asset on the Aptos blockchain.\n * This function helps in managing the attributes of digital assets by allowing the removal of specific properties.\n *\n * @param args - The arguments for the transaction.\n * @param args.aptosConfig - The configuration object for Aptos.\n * @param args.creator - The account that is creating the transaction.\n * @param args.propertyKey - The key of the property to be removed.\n * @param args.digitalAssetAddress - The address of the digital asset from which the property will be removed.\n * @param args.digitalAssetType - The type of the digital asset (optional).\n * @param args.options - Additional options for generating the transaction (optional).\n * @group Implementation\n */\nexport async function removeDigitalAssetPropertyTransaction(args: {\n aptosConfig: AptosConfig;\n creator: Account;\n propertyKey: string;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n}): Promise<SimpleTransaction> {\n const { aptosConfig, creator, propertyKey, digitalAssetAddress, digitalAssetType, options } = args;\n return generateTransaction({\n aptosConfig,\n sender: creator.accountAddress,\n data: {\n function: \"0x4::aptos_token::remove_property\",\n typeArguments: [digitalAssetType ?? defaultDigitalAssetType],\n functionArguments: [AccountAddress.from(digitalAssetAddress), new MoveString(propertyKey)],\n abi: removeDigitalAssetPropertyAbi,\n },\n options,\n });\n}\n\nconst updateDigitalAssetPropertyAbi: EntryFunctionABI = {\n typeParameters: [{ constraints: [MoveAbility.KEY] }],\n parameters: [\n new TypeTagStruct(objectStructTag(new TypeTagGeneric(0))),\n new TypeTagStruct(stringStructTag()),\n new TypeTagStruct(stringStructTag()),\n TypeTagVector.u8(),\n ],\n};\n\n/**\n * Updates a property of a digital asset by generating a transaction for the Aptos blockchain.\n * This function allows you to modify attributes of a digital asset, facilitating dynamic changes to its properties.\n *\n * @param args - The arguments for updating the digital asset property.\n * @param args.aptosConfig - The configuration settings for the Aptos blockchain.\n * @param args.creator - The account that is creating the transaction.\n * @param args.propertyKey - The key of the property to be updated.\n * @param args.propertyType - The type of the property being updated.\n * @param args.propertyValue - The new value for the property.\n * @param args.digitalAssetAddress - The address of the digital asset to update.\n * @param args.digitalAssetType - (Optional) The type of the digital asset.\n * @param args.options - (Optional) Additional options for generating the transaction.\n * @group Implementation\n */\nexport async function updateDigitalAssetPropertyTransaction(args: {\n aptosConfig: AptosConfig;\n creator: Account;\n propertyKey: string;\n propertyType: PropertyType;\n propertyValue: PropertyValue;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n}): Promise<SimpleTransaction> {\n const {\n aptosConfig,\n creator,\n propertyKey,\n propertyType,\n propertyValue,\n digitalAssetAddress,\n digitalAssetType,\n options,\n } = args;\n return generateTransaction({\n aptosConfig,\n sender: creator.accountAddress,\n data: {\n function: \"0x4::aptos_token::update_property\",\n typeArguments: [digitalAssetType ?? defaultDigitalAssetType],\n functionArguments: [\n AccountAddress.from(digitalAssetAddress),\n new MoveString(propertyKey),\n new MoveString(PropertyTypeMap[propertyType]),\n\n /**\n * Retrieves the raw byte representation of a single property value based on its type.\n *\n * @param propertyValue - The value of the property to convert.\n * @param propertyType - The type of the property, which determines how the value is processed.\n * @returns The raw byte representation of the property value.\n * @group Implementation\n */\n getSinglePropertyValueRaw(propertyValue, PropertyTypeMap[propertyType]),\n ],\n abi: updateDigitalAssetPropertyAbi,\n },\n options,\n });\n}\n\nconst addDigitalAssetTypedPropertyAbi: EntryFunctionABI = {\n typeParameters: [{ constraints: [MoveAbility.KEY] }, { constraints: [] }],\n parameters: [\n new TypeTagStruct(objectStructTag(new TypeTagGeneric(0))),\n new TypeTagStruct(stringStructTag()),\n new TypeTagGeneric(1),\n ],\n};\n\n/**\n * Creates a transaction to add a typed property to a digital asset.\n * This function helps in customizing digital assets by associating them with specific properties.\n *\n * @param args - The arguments required to create the transaction.\n * @param args.aptosConfig - The configuration settings for Aptos.\n * @param args.creator - The account that is creating the transaction.\n * @param args.propertyKey - The key for the property being added.\n * @param args.propertyType - The type of the property being added.\n * @param args.propertyValue - The value of the property being added.\n * @param args.digitalAssetAddress - The address of the digital asset to which the property is being added.\n * @param args.digitalAssetType - (Optional) The type of the digital asset.\n * @param args.options - (Optional) Additional options for generating the transaction.\n * @group Implementation\n */\nexport async function addDigitalAssetTypedPropertyTransaction(args: {\n aptosConfig: AptosConfig;\n creator: Account;\n propertyKey: string;\n propertyType: PropertyType;\n propertyValue: PropertyValue;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n}): Promise<SimpleTransaction> {\n const {\n aptosConfig,\n creator,\n propertyKey,\n propertyType,\n propertyValue,\n digitalAssetAddress,\n digitalAssetType,\n options,\n } = args;\n return generateTransaction({\n aptosConfig,\n sender: creator.accountAddress,\n data: {\n function: \"0x4::aptos_token::add_typed_property\",\n typeArguments: [digitalAssetType ?? defaultDigitalAssetType, PropertyTypeMap[propertyType]],\n functionArguments: [AccountAddress.from(digitalAssetAddress), new MoveString(propertyKey), propertyValue],\n abi: addDigitalAssetTypedPropertyAbi,\n },\n options,\n });\n}\n\nconst updateDigitalAssetTypedPropertyAbi: EntryFunctionABI = {\n typeParameters: [{ constraints: [MoveAbility.KEY] }, { constraints: [] }],\n parameters: [\n new TypeTagStruct(objectStructTag(new TypeTagGeneric(0))),\n new TypeTagStruct(stringStructTag()),\n new TypeTagGeneric(1),\n ],\n};\n\n/**\n * Updates the typed property of a digital asset by generating a transaction for the Aptos blockchain.\n *\n * @param args - The arguments for updating the digital asset typed property.\n * @param args.aptosConfig - The configuration settings for the Aptos network.\n * @param args.creator - The account that is creating the transaction.\n * @param args.propertyKey - The key of the property to be updated.\n * @param args.propertyType - The type of the property being updated.\n * @param args.propertyValue - The new value for the property.\n * @param args.digitalAssetAddress - The address of the digital asset to be updated.\n * @param args.digitalAssetType - Optional. The type of the digital asset, if not provided, defaults to the standard type.\n * @param args.options - Optional. Additional options for generating the transaction.\n * @group Implementation\n */\nexport async function updateDigitalAssetTypedPropertyTransaction(args: {\n aptosConfig: AptosConfig;\n creator: Account;\n propertyKey: string;\n propertyType: PropertyType;\n propertyValue: PropertyValue;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n}): Promise<SimpleTransaction> {\n const {\n aptosConfig,\n creator,\n propertyKey,\n propertyType,\n propertyValue,\n digitalAssetAddress,\n digitalAssetType,\n options,\n } = args;\n return generateTransaction({\n aptosConfig,\n sender: creator.accountAddress,\n data: {\n function: \"0x4::aptos_token::update_typed_property\",\n typeArguments: [digitalAssetType ?? defaultDigitalAssetType, PropertyTypeMap[propertyType]],\n functionArguments: [AccountAddress.from(digitalAssetAddress), new MoveString(propertyKey), propertyValue],\n abi: updateDigitalAssetTypedPropertyAbi,\n },\n options,\n });\n}\n\nfunction getPropertyValueRaw(propertyValues: Array<PropertyValue>, propertyTypes: Array<string>): Array<Uint8Array> {\n const results = new Array<Uint8Array>();\n propertyTypes.forEach((typ, index) => {\n results.push(getSinglePropertyValueRaw(propertyValues[index], typ));\n });\n\n return results;\n}\n\nfunction getSinglePropertyValueRaw(propertyValue: PropertyValue, propertyType: string): Uint8Array {\n const typeTag = parseTypeTag(propertyType);\n const res = checkOrConvertArgument(propertyValue, typeTag, 0, []);\n return res.bcsToBytes();\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiEA,IAAM,kBAAkB;AAAA,EACtB,SAAS;AAAA,EACT,IAAI;AAAA,EACJ,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,MAAM;AAAA,EACN,MAAM;AAAA,EACN,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,OAAO;AACT;AAiBA,IAAM,0BAA0B;AAahC,eAAsB,oBAAoB,MAGR;AAChC,QAAM,EAAE,aAAa,oBAAoB,IAAI;AAE7C,QAAM,iBAAqD;AAAA,IACzD,eAAe,EAAE,KAAK,eAAe,KAAK,mBAAmB,EAAE,aAAa,EAAE;AAAA,EAChF;AAEA,QAAM,eAAe;AAAA,IACnB,OAAO;AAAA,IACP,WAAW;AAAA,MACT,iBAAiB;AAAA,IACnB;AAAA,EACF;AAEA,QAAM,OAAO,MAAM,aAAgC;AAAA,IACjD;AAAA,IACA,OAAO;AAAA,IACP,cAAc;AAAA,EAChB,CAAC;AAED,SAAO,KAAK,uBAAuB,CAAC;AACtC;AAWA,eAAsB,gCAAgC,MAGR;AAC5C,QAAM,EAAE,aAAa,oBAAoB,IAAI;AAE7C,QAAM,iBAAkD;AAAA,IACtD,eAAe,EAAE,KAAK,eAAe,KAAK,mBAAmB,EAAE,aAAa,EAAE;AAAA,IAC9E,QAAQ,EAA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O,IAAI,WAAW;AACxB;","names":[]}
@@ -1,376 +0,0 @@
1
- import {
2
- Hex
3
- } from "./chunk-BDM6FBUO.mjs";
4
- import {
5
- MAX_U128_BIG_INT,
6
- MAX_U16_NUMBER,
7
- MAX_U256_BIG_INT,
8
- MAX_U32_NUMBER,
9
- MAX_U64_BIG_INT,
10
- MAX_U8_NUMBER
11
- } from "./chunk-SBB4YEPT.mjs";
12
- import {
13
- __decorateClass
14
- } from "./chunk-SAWN7RJP.mjs";
15
-
16
- // src/bcs/serializer.ts
17
- var Serializable = class {
18
- /**
19
- * Serializes a `Serializable` value to its BCS representation.
20
- * This function is the TypeScript SDK equivalent of `bcs::to_bytes` in Move.
21
- * @returns the BCS representation of the Serializable instance as a byte buffer.
22
- * @group Implementation
23
- * @category BCS
24
- */
25
- bcsToBytes() {
26
- const serializer = new Serializer();
27
- this.serialize(serializer);
28
- return serializer.toUint8Array();
29
- }
30
- /**
31
- * Converts the BCS-serialized bytes of a value into a Hex instance.
32
- * This function provides a Hex representation of the BCS-serialized data for easier handling and manipulation.
33
- * @returns A Hex instance with the BCS-serialized bytes loaded into its underlying Uint8Array.
34
- * @group Implementation
35
- * @category BCS
36
- */
37
- bcsToHex() {
38
- const bcsBytes = this.bcsToBytes();
39
- return Hex.fromHexInput(bcsBytes);
40
- }
41
- /**
42
- * Returns the hex string representation of the `Serializable` value without the 0x prefix.
43
- * @returns the hex format as a string without `0x` prefix.
44
- */
45
- toStringWithoutPrefix() {
46
- return this.bcsToHex().toStringWithoutPrefix();
47
- }
48
- /**
49
- * Returns the hex string representation of the `Serializable` value with the 0x prefix.
50
- * @returns the hex formatas a string prefixed by `0x`.
51
- */
52
- toString() {
53
- return `0x${this.toStringWithoutPrefix()}`;
54
- }
55
- };
56
- var Serializer = class {
57
- /**
58
- * Constructs a serializer with a buffer of size `length` bytes, 64 bytes by default.
59
- * The `length` must be greater than 0.
60
- *
61
- * @param length - The size of the buffer in bytes.
62
- * @group Implementation
63
- * @category BCS
64
- */
65
- constructor(length = 64) {
66
- if (length <= 0) {
67
- throw new Error("Length needs to be greater than 0");
68
- }
69
- this.buffer = new ArrayBuffer(length);
70
- this.offset = 0;
71
- }
72
- /**
73
- * Ensures that the internal buffer can accommodate the specified number of bytes.
74
- * This function dynamically resizes the buffer if the current size is insufficient.
75
- *
76
- * @param bytes - The number of bytes to ensure the buffer can handle.
77
- * @group Implementation
78
- * @category BCS
79
- */
80
- ensureBufferWillHandleSize(bytes) {
81
- while (this.buffer.byteLength < this.offset + bytes) {
82
- const newBuffer = new ArrayBuffer(this.buffer.byteLength * 2);
83
- new Uint8Array(newBuffer).set(new Uint8Array(this.buffer));
84
- this.buffer = newBuffer;
85
- }
86
- }
87
- /**
88
- * Appends the specified values to the buffer, ensuring that the buffer can accommodate the new data.
89
- *
90
- * @param {Uint8Array} values - The values to be appended to the buffer.
91
- * @group Implementation
92
- * @category BCS
93
- */
94
- appendToBuffer(values) {
95
- this.ensureBufferWillHandleSize(values.length);
96
- new Uint8Array(this.buffer, this.offset).set(values);
97
- this.offset += values.length;
98
- }
99
- /**
100
- * Serializes a value into the buffer using the provided function, ensuring the buffer can accommodate the size.
101
- *
102
- * @param fn - The function to serialize the value, which takes a byte offset, the value to serialize, and an optional little-endian flag.
103
- * @param fn.byteOffset - The byte offset at which to write the value.
104
- * @param fn.value - The numeric value to serialize into the buffer.
105
- * @param fn.littleEndian - Optional flag indicating whether to use little-endian byte order (defaults to true).
106
- * @group Implementation
107
- * @category BCS
108
- */
109
- // TODO: JSDoc bytesLength and value
110
- serializeWithFunction(fn, bytesLength, value) {
111
- this.ensureBufferWillHandleSize(bytesLength);
112
- const dv = new DataView(this.buffer, this.offset);
113
- fn.apply(dv, [0, value, true]);
114
- this.offset += bytesLength;
115
- }
116
- /**
117
- * Serializes a string. UTF8 string is supported.
118
- * The number of bytes in the string content is serialized first, as a uleb128-encoded u32 integer.
119
- * Then the string content is serialized as UTF8 encoded bytes.
120
- *
121
- * BCS layout for "string": string_length | string_content
122
- * where string_length is a u32 integer encoded as a uleb128 integer, equal to the number of bytes in string_content.
123
- *
124
- * @param value - The string to serialize.
125
- *
126
- * @example
127
- * ```typescript
128
- * const serializer = new Serializer();
129
- * serializer.serializeStr("1234abcd");
130
- * assert(serializer.toUint8Array() === new Uint8Array([8, 49, 50, 51, 52, 97, 98, 99, 100]));
131
- * ```
132
- * @group Implementation
133
- * @category BCS
134
- */
135
- serializeStr(value) {
136
- const textEncoder = new TextEncoder();
137
- this.serializeBytes(textEncoder.encode(value));
138
- }
139
- /**
140
- * Serializes an array of bytes.
141
- *
142
- * This function encodes the length of the byte array as a u32 integer in uleb128 format, followed by the byte array itself.
143
- * BCS layout for "bytes": bytes_length | bytes
144
- * where bytes_length is a u32 integer encoded as a uleb128 integer, equal to the length of the bytes array.
145
- * @param value - The byte array to serialize.
146
- * @group Implementation
147
- * @category BCS
148
- */
149
- serializeBytes(value) {
150
- this.serializeU32AsUleb128(value.length);
151
- this.appendToBuffer(value);
152
- }
153
- /**
154
- * Serializes an array of bytes with a known length, allowing for efficient deserialization without needing to serialize the
155
- * length itself.
156
- * When deserializing, the number of bytes to deserialize needs to be passed in.
157
-
158
- * @param value - The Uint8Array to be serialized.
159
- * @group Implementation
160
- * @category BCS
161
- */
162
- serializeFixedBytes(value) {
163
- this.appendToBuffer(value);
164
- }
165
- /**
166
- * Serializes a boolean value into a byte representation.
167
- *
168
- * The BCS layout for a boolean uses one byte, where "0x01" represents true and "0x00" represents false.
169
- *
170
- * @param value - The boolean value to serialize.
171
- * @group Implementation
172
- * @category BCS
173
- */
174
- serializeBool(value) {
175
- ensureBoolean(value);
176
- const byteValue = value ? 1 : 0;
177
- this.appendToBuffer(new Uint8Array([byteValue]));
178
- }
179
- serializeU8(value) {
180
- this.appendToBuffer(new Uint8Array([value]));
181
- }
182
- serializeU16(value) {
183
- this.serializeWithFunction(DataView.prototype.setUint16, 2, value);
184
- }
185
- serializeU32(value) {
186
- this.serializeWithFunction(DataView.prototype.setUint32, 4, value);
187
- }
188
- serializeU64(value) {
189
- const low = BigInt(value) & BigInt(MAX_U32_NUMBER);
190
- const high = BigInt(value) >> BigInt(32);
191
- this.serializeU32(Number(low));
192
- this.serializeU32(Number(high));
193
- }
194
- serializeU128(value) {
195
- const low = BigInt(value) & MAX_U64_BIG_INT;
196
- const high = BigInt(value) >> BigInt(64);
197
- this.serializeU64(low);
198
- this.serializeU64(high);
199
- }
200
- serializeU256(value) {
201
- const low = BigInt(value) & MAX_U128_BIG_INT;
202
- const high = BigInt(value) >> BigInt(128);
203
- this.serializeU128(low);
204
- this.serializeU128(high);
205
- }
206
- serializeU32AsUleb128(val) {
207
- let value = val;
208
- const valueArray = [];
209
- while (value >>> 7 !== 0) {
210
- valueArray.push(value & 127 | 128);
211
- value >>>= 7;
212
- }
213
- valueArray.push(value);
214
- this.appendToBuffer(new Uint8Array(valueArray));
215
- }
216
- /**
217
- * Returns the buffered bytes as a Uint8Array.
218
- *
219
- * This function allows you to retrieve the byte representation of the buffer up to the current offset.
220
- *
221
- * @returns Uint8Array - The byte array representation of the buffer.
222
- * @group Implementation
223
- * @category BCS
224
- */
225
- toUint8Array() {
226
- return new Uint8Array(this.buffer).slice(0, this.offset);
227
- }
228
- /**
229
- * Serializes a `Serializable` value, facilitating composable serialization.
230
- *
231
- * @param value The Serializable value to serialize.
232
- *
233
- * @returns the serializer instance
234
- * @group Implementation
235
- * @category BCS
236
- */
237
- serialize(value) {
238
- value.serialize(this);
239
- }
240
- /**
241
- * Serializes an array of BCS Serializable values to a serializer instance.
242
- * The bytes are added to the serializer instance's byte buffer.
243
- *
244
- * @param values The array of BCS Serializable values
245
- * @example
246
- * const addresses = new Array<AccountAddress>(
247
- * AccountAddress.from("0x1"),
248
- * AccountAddress.from("0x2"),
249
- * AccountAddress.from("0xa"),
250
- * AccountAddress.from("0xb"),
251
- * );
252
- * const serializer = new Serializer();
253
- * serializer.serializeVector(addresses);
254
- * const serializedBytes = serializer.toUint8Array();
255
- * // serializedBytes is now the BCS-serialized bytes
256
- * // The equivalent value in Move would be:
257
- * // `bcs::to_bytes(&vector<address> [@0x1, @0x2, @0xa, @0xb])`;
258
- * @group Implementation
259
- * @category BCS
260
- */
261
- serializeVector(values) {
262
- this.serializeU32AsUleb128(values.length);
263
- values.forEach((item) => {
264
- item.serialize(this);
265
- });
266
- }
267
- /**
268
- * Serializes an optional value which can be a Serializable, string, or Uint8Array.
269
- * For strings and Uint8Arrays, it uses the appropriate serialization method.
270
- *
271
- * @param value The value to serialize (Serializable, string, Uint8Array, or undefined)
272
- * @param len Optional fixed length for Uint8Array serialization. If provided, uses serializeFixedBytes instead of serializeBytes
273
- *
274
- * @example
275
- * ```typescript
276
- * const serializer = new Serializer();
277
- * serializer.serializeOption("hello"); // Serializes optional string
278
- * serializer.serializeOption(new Uint8Array([1, 2, 3])); // Serializes optional bytes
279
- * serializer.serializeOption(new Uint8Array([1, 2, 3]), 3); // Serializes optional fixed-length bytes
280
- * serializer.serializeOption(new AccountAddress(...)); // Serializes optional Serializable
281
- * serializer.serializeOption(undefined); // Serializes none case
282
- * ```
283
- * @group Implementation
284
- * @category BCS
285
- */
286
- serializeOption(value, len) {
287
- const hasValue = value !== void 0;
288
- this.serializeBool(hasValue);
289
- if (hasValue) {
290
- if (typeof value === "string") {
291
- this.serializeStr(value);
292
- } else if (value instanceof Uint8Array) {
293
- if (len !== void 0) {
294
- this.serializeFixedBytes(value);
295
- } else {
296
- this.serializeBytes(value);
297
- }
298
- } else {
299
- value.serialize(this);
300
- }
301
- }
302
- }
303
- /**
304
- * @deprecated use `serializeOption` instead.
305
- * Serializes an optional string, supporting UTF8 encoding.
306
- * The function encodes the existence of the string first, followed by the length and content if it exists.
307
- *
308
- * BCS layout for optional "string": 1 | string_length | string_content
309
- * where string_length is a u32 integer encoded as a uleb128 integer, equal to the number of bytes in string_content.
310
- * BCS layout for undefined: 0
311
- *
312
- * @param value - The optional string to serialize. If undefined, it will serialize as 0.
313
- * @group Implementation
314
- * @category BCS
315
- */
316
- serializeOptionStr(value) {
317
- if (value === void 0) {
318
- this.serializeU32AsUleb128(0);
319
- } else {
320
- this.serializeU32AsUleb128(1);
321
- this.serializeStr(value);
322
- }
323
- }
324
- };
325
- __decorateClass([
326
- checkNumberRange(0, MAX_U8_NUMBER)
327
- ], Serializer.prototype, "serializeU8", 1);
328
- __decorateClass([
329
- checkNumberRange(0, MAX_U16_NUMBER)
330
- ], Serializer.prototype, "serializeU16", 1);
331
- __decorateClass([
332
- checkNumberRange(0, MAX_U32_NUMBER)
333
- ], Serializer.prototype, "serializeU32", 1);
334
- __decorateClass([
335
- checkNumberRange(BigInt(0), MAX_U64_BIG_INT)
336
- ], Serializer.prototype, "serializeU64", 1);
337
- __decorateClass([
338
- checkNumberRange(BigInt(0), MAX_U128_BIG_INT)
339
- ], Serializer.prototype, "serializeU128", 1);
340
- __decorateClass([
341
- checkNumberRange(BigInt(0), MAX_U256_BIG_INT)
342
- ], Serializer.prototype, "serializeU256", 1);
343
- __decorateClass([
344
- checkNumberRange(0, MAX_U32_NUMBER)
345
- ], Serializer.prototype, "serializeU32AsUleb128", 1);
346
- function ensureBoolean(value) {
347
- if (typeof value !== "boolean") {
348
- throw new Error(`${value} is not a boolean value`);
349
- }
350
- }
351
- var outOfRangeErrorMessage = (value, min, max) => `${value} is out of range: [${min}, ${max}]`;
352
- function validateNumberInRange(value, minValue, maxValue) {
353
- const valueBigInt = BigInt(value);
354
- if (valueBigInt > BigInt(maxValue) || valueBigInt < BigInt(minValue)) {
355
- throw new Error(outOfRangeErrorMessage(value, minValue, maxValue));
356
- }
357
- }
358
- function checkNumberRange(minValue, maxValue) {
359
- return (target, propertyKey, descriptor) => {
360
- const childFunction = descriptor.value;
361
- descriptor.value = function deco(value) {
362
- validateNumberInRange(value, minValue, maxValue);
363
- return childFunction.apply(this, [value]);
364
- };
365
- return descriptor;
366
- };
367
- }
368
-
369
- export {
370
- Serializable,
371
- Serializer,
372
- ensureBoolean,
373
- outOfRangeErrorMessage,
374
- validateNumberInRange
375
- };
376
- //# sourceMappingURL=chunk-C7T6GW5P.mjs.map