@aptos-labs/ts-sdk 5.1.2 → 5.1.3

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 (294) hide show
  1. package/dist/common/{account-147vfOGb.d.ts → account-nCfrFDHy.d.ts} +94 -1
  2. package/dist/common/{chunk-347THBDE.js → chunk-PW6UQAB2.js} +3 -3
  3. package/dist/common/chunk-PW6UQAB2.js.map +1 -0
  4. package/dist/common/cli/index.d.ts +1 -1
  5. package/dist/common/cli/index.js +1 -1
  6. package/dist/common/cli/index.js.map +1 -1
  7. package/dist/common/index.d.ts +2 -2
  8. package/dist/common/index.js +33 -33
  9. package/dist/common/index.js.map +1 -1
  10. package/dist/esm/{Ed25519Account-CPwej6wB.d.mts → Ed25519Account-BgSyStyl.d.mts} +1 -1
  11. package/dist/esm/account/AbstractKeylessAccount.d.mts +3 -3
  12. package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
  13. package/dist/esm/account/AbstractedAccount.d.mts +2 -2
  14. package/dist/esm/account/AbstractedAccount.mjs +1 -1
  15. package/dist/esm/account/Account.d.mts +2 -2
  16. package/dist/esm/account/Account.mjs +1 -1
  17. package/dist/esm/account/AccountUtils.d.mts +3 -3
  18. package/dist/esm/account/AccountUtils.mjs +1 -1
  19. package/dist/esm/account/DerivableAbstractedAccount.d.mts +2 -2
  20. package/dist/esm/account/DerivableAbstractedAccount.mjs +1 -1
  21. package/dist/esm/account/Ed25519Account.d.mts +2 -2
  22. package/dist/esm/account/Ed25519Account.mjs +1 -1
  23. package/dist/esm/account/EphemeralKeyPair.d.mts +1 -1
  24. package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
  25. package/dist/esm/account/FederatedKeylessAccount.d.mts +3 -3
  26. package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
  27. package/dist/esm/account/KeylessAccount.d.mts +3 -3
  28. package/dist/esm/account/KeylessAccount.mjs +1 -1
  29. package/dist/esm/account/MultiEd25519Account.d.mts +2 -2
  30. package/dist/esm/account/MultiEd25519Account.mjs +1 -1
  31. package/dist/esm/account/MultiKeyAccount.d.mts +3 -3
  32. package/dist/esm/account/MultiKeyAccount.mjs +1 -1
  33. package/dist/esm/account/SingleKeyAccount.d.mts +2 -2
  34. package/dist/esm/account/SingleKeyAccount.mjs +1 -1
  35. package/dist/esm/account/index.d.mts +3 -3
  36. package/dist/esm/account/index.mjs +1 -1
  37. package/dist/esm/account/utils.d.mts +1 -1
  38. package/dist/esm/account/utils.mjs +1 -1
  39. package/dist/esm/{account-BortO8g2.d.mts → account-CAv0-Zs9.d.mts} +94 -1
  40. package/dist/esm/api/account/abstraction.d.mts +1 -1
  41. package/dist/esm/api/account/abstraction.mjs +1 -1
  42. package/dist/esm/api/account.d.mts +2 -2
  43. package/dist/esm/api/account.mjs +1 -1
  44. package/dist/esm/api/ans.d.mts +2 -2
  45. package/dist/esm/api/ans.mjs +1 -1
  46. package/dist/esm/api/aptos.d.mts +3 -3
  47. package/dist/esm/api/aptos.mjs +1 -1
  48. package/dist/esm/api/aptosConfig.d.mts +1 -1
  49. package/dist/esm/api/coin.d.mts +1 -1
  50. package/dist/esm/api/coin.mjs +1 -1
  51. package/dist/esm/api/digitalAsset.d.mts +2 -2
  52. package/dist/esm/api/digitalAsset.mjs +1 -1
  53. package/dist/esm/api/faucet.d.mts +1 -1
  54. package/dist/esm/api/faucet.mjs +1 -1
  55. package/dist/esm/api/fungibleAsset.d.mts +2 -2
  56. package/dist/esm/api/fungibleAsset.mjs +1 -1
  57. package/dist/esm/api/general.d.mts +1 -1
  58. package/dist/esm/api/general.mjs +1 -1
  59. package/dist/esm/api/index.d.mts +3 -3
  60. package/dist/esm/api/index.mjs +1 -1
  61. package/dist/esm/api/keyless.d.mts +3 -3
  62. package/dist/esm/api/keyless.mjs +1 -1
  63. package/dist/esm/api/object.d.mts +1 -1
  64. package/dist/esm/api/object.mjs +1 -1
  65. package/dist/esm/api/staking.d.mts +1 -1
  66. package/dist/esm/api/staking.mjs +1 -1
  67. package/dist/esm/api/table.d.mts +1 -1
  68. package/dist/esm/api/table.mjs +1 -1
  69. package/dist/esm/api/transaction.d.mts +2 -2
  70. package/dist/esm/api/transaction.mjs +1 -1
  71. package/dist/esm/api/transactionSubmission/build.d.mts +1 -1
  72. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  73. package/dist/esm/api/transactionSubmission/helpers.d.mts +1 -1
  74. package/dist/esm/api/transactionSubmission/management.d.mts +2 -2
  75. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  76. package/dist/esm/api/transactionSubmission/sign.d.mts +2 -2
  77. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  78. package/dist/esm/api/transactionSubmission/simulate.d.mts +1 -1
  79. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  80. package/dist/esm/api/transactionSubmission/submit.d.mts +1 -1
  81. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  82. package/dist/esm/api/utils.d.mts +1 -1
  83. package/dist/esm/api/utils.mjs +1 -1
  84. package/dist/esm/bcs/consts.d.mts +1 -1
  85. package/dist/esm/bcs/deserializer.d.mts +1 -1
  86. package/dist/esm/bcs/index.d.mts +1 -1
  87. package/dist/esm/bcs/index.mjs +1 -1
  88. package/dist/esm/bcs/serializable/entryFunctionBytes.d.mts +1 -1
  89. package/dist/esm/bcs/serializable/fixedBytes.d.mts +1 -1
  90. package/dist/esm/bcs/serializable/movePrimitives.d.mts +1 -1
  91. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  92. package/dist/esm/bcs/serializable/moveStructs.d.mts +1 -1
  93. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  94. package/dist/esm/bcs/serializer.d.mts +1 -1
  95. package/dist/esm/{chunk-V74WPKSY.mjs → chunk-2XQKGWHQ.mjs} +2 -2
  96. package/dist/esm/{chunk-2OPKZKOB.mjs → chunk-54WUP65H.mjs} +2 -2
  97. package/dist/esm/{chunk-R7FWJP3N.mjs → chunk-AGAAGA2X.mjs} +2 -2
  98. package/dist/esm/{chunk-E2U27PNC.mjs → chunk-BCTM24ZZ.mjs} +2 -2
  99. package/dist/esm/{chunk-LAPXUUHK.mjs → chunk-C2ZO2L5W.mjs} +2 -2
  100. package/dist/esm/{chunk-YS5IUILF.mjs → chunk-DRBFLEZL.mjs} +2 -2
  101. package/dist/esm/chunk-DURSBMWP.mjs +2 -0
  102. package/dist/esm/chunk-DURSBMWP.mjs.map +1 -0
  103. package/dist/esm/{chunk-RQX6JOEN.mjs → chunk-EF4FA5I6.mjs} +2 -2
  104. package/dist/esm/{chunk-FC72YL4B.mjs → chunk-EFQZGHAO.mjs} +2 -2
  105. package/dist/esm/chunk-EW45LLAP.mjs +2 -0
  106. package/dist/esm/{chunk-H3EP5CGP.mjs.map → chunk-EW45LLAP.mjs.map} +1 -1
  107. package/dist/esm/{chunk-PSSIJHHC.mjs → chunk-HX6SDBEX.mjs} +2 -2
  108. package/dist/esm/{chunk-QNARIAVM.mjs → chunk-I7XT6L7S.mjs} +2 -2
  109. package/dist/esm/chunk-M3FCWYLI.mjs +4 -0
  110. package/dist/esm/chunk-M3FCWYLI.mjs.map +1 -0
  111. package/dist/esm/{chunk-626KB2UQ.mjs → chunk-YSP6JG5G.mjs} +2 -2
  112. package/dist/esm/{chunk-AQW4BUKF.mjs → chunk-ZABLJ2JJ.mjs} +2 -2
  113. package/dist/esm/cli/index.d.mts +1 -1
  114. package/dist/esm/cli/index.mjs +1 -1
  115. package/dist/esm/cli/localNode.mjs +1 -1
  116. package/dist/esm/cli/move.d.mts +1 -1
  117. package/dist/esm/client/core.d.mts +1 -1
  118. package/dist/esm/client/core.mjs +1 -1
  119. package/dist/esm/client/get.d.mts +1 -1
  120. package/dist/esm/client/get.mjs +1 -1
  121. package/dist/esm/client/index.d.mts +1 -1
  122. package/dist/esm/client/index.mjs +1 -1
  123. package/dist/esm/client/post.d.mts +1 -1
  124. package/dist/esm/client/post.mjs +1 -1
  125. package/dist/esm/core/account/index.d.mts +1 -1
  126. package/dist/esm/core/account/index.mjs +1 -1
  127. package/dist/esm/core/account/utils/address.d.mts +1 -1
  128. package/dist/esm/core/account/utils/address.mjs +1 -1
  129. package/dist/esm/core/account/utils/index.d.mts +1 -1
  130. package/dist/esm/core/account/utils/index.mjs +1 -1
  131. package/dist/esm/core/accountAddress.d.mts +1 -1
  132. package/dist/esm/core/accountAddress.mjs +1 -1
  133. package/dist/esm/core/authenticationKey.d.mts +1 -1
  134. package/dist/esm/core/authenticationKey.mjs +1 -1
  135. package/dist/esm/core/crypto/abstraction.d.mts +1 -1
  136. package/dist/esm/core/crypto/abstraction.mjs +1 -1
  137. package/dist/esm/core/crypto/deserializationUtils.d.mts +1 -1
  138. package/dist/esm/core/crypto/deserializationUtils.mjs +1 -1
  139. package/dist/esm/core/crypto/ed25519.d.mts +1 -1
  140. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  141. package/dist/esm/core/crypto/ephemeral.d.mts +1 -1
  142. package/dist/esm/core/crypto/ephemeral.mjs +1 -1
  143. package/dist/esm/core/crypto/federatedKeyless.d.mts +2 -2
  144. package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
  145. package/dist/esm/core/crypto/index.d.mts +2 -2
  146. package/dist/esm/core/crypto/index.mjs +1 -1
  147. package/dist/esm/core/crypto/keyless.d.mts +2 -2
  148. package/dist/esm/core/crypto/keyless.mjs +1 -1
  149. package/dist/esm/core/crypto/multiEd25519.d.mts +1 -1
  150. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  151. package/dist/esm/core/crypto/multiKey.d.mts +1 -1
  152. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  153. package/dist/esm/core/crypto/privateKey.d.mts +1 -1
  154. package/dist/esm/core/crypto/privateKey.mjs +1 -1
  155. package/dist/esm/core/crypto/proof.d.mts +1 -1
  156. package/dist/esm/core/crypto/proof.mjs +1 -1
  157. package/dist/esm/core/crypto/publicKey.d.mts +1 -1
  158. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  159. package/dist/esm/core/crypto/secp256k1.d.mts +1 -1
  160. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  161. package/dist/esm/core/crypto/secp256r1.d.mts +1 -1
  162. package/dist/esm/core/crypto/secp256r1.mjs +1 -1
  163. package/dist/esm/core/crypto/signature.d.mts +1 -1
  164. package/dist/esm/core/crypto/signature.mjs +1 -1
  165. package/dist/esm/core/crypto/singleKey.d.mts +1 -1
  166. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  167. package/dist/esm/core/crypto/types.d.mts +1 -1
  168. package/dist/esm/core/crypto/utils.d.mts +1 -1
  169. package/dist/esm/core/crypto/utils.mjs +1 -1
  170. package/dist/esm/core/hex.d.mts +1 -1
  171. package/dist/esm/core/index.d.mts +2 -2
  172. package/dist/esm/core/index.mjs +1 -1
  173. package/dist/esm/errors/index.d.mts +1 -1
  174. package/dist/esm/errors/index.mjs +1 -1
  175. package/dist/esm/{federatedKeyless-CTzDAQTu.d.mts → federatedKeyless-C8KXaSM1.d.mts} +1 -1
  176. package/dist/esm/index.d.mts +3 -3
  177. package/dist/esm/index.mjs +1 -1
  178. package/dist/esm/internal/abstraction.d.mts +1 -1
  179. package/dist/esm/internal/abstraction.mjs +1 -1
  180. package/dist/esm/internal/account.d.mts +2 -2
  181. package/dist/esm/internal/account.mjs +1 -1
  182. package/dist/esm/internal/ans.d.mts +2 -2
  183. package/dist/esm/internal/ans.mjs +1 -1
  184. package/dist/esm/internal/coin.d.mts +1 -1
  185. package/dist/esm/internal/coin.mjs +1 -1
  186. package/dist/esm/internal/digitalAsset.d.mts +2 -2
  187. package/dist/esm/internal/digitalAsset.mjs +1 -1
  188. package/dist/esm/internal/faucet.d.mts +1 -1
  189. package/dist/esm/internal/faucet.mjs +1 -1
  190. package/dist/esm/internal/fungibleAsset.d.mts +2 -2
  191. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  192. package/dist/esm/internal/general.d.mts +1 -1
  193. package/dist/esm/internal/general.mjs +1 -1
  194. package/dist/esm/internal/keyless.d.mts +3 -3
  195. package/dist/esm/internal/keyless.mjs +1 -1
  196. package/dist/esm/internal/object.d.mts +1 -1
  197. package/dist/esm/internal/object.mjs +1 -1
  198. package/dist/esm/internal/staking.d.mts +1 -1
  199. package/dist/esm/internal/staking.mjs +1 -1
  200. package/dist/esm/internal/table.d.mts +1 -1
  201. package/dist/esm/internal/table.mjs +1 -1
  202. package/dist/esm/internal/transaction.d.mts +1 -1
  203. package/dist/esm/internal/transaction.mjs +1 -1
  204. package/dist/esm/internal/transactionSubmission.d.mts +2 -2
  205. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  206. package/dist/esm/internal/utils/index.d.mts +1 -1
  207. package/dist/esm/internal/utils/index.mjs +1 -1
  208. package/dist/esm/internal/utils/utils.d.mts +1 -1
  209. package/dist/esm/internal/utils/utils.mjs +1 -1
  210. package/dist/esm/internal/view.d.mts +1 -1
  211. package/dist/esm/internal/view.mjs +1 -1
  212. package/dist/esm/transactions/authenticator/account.d.mts +1 -1
  213. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  214. package/dist/esm/transactions/authenticator/index.d.mts +1 -1
  215. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  216. package/dist/esm/transactions/authenticator/transaction.d.mts +1 -1
  217. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  218. package/dist/esm/transactions/index.d.mts +1 -1
  219. package/dist/esm/transactions/index.mjs +1 -1
  220. package/dist/esm/transactions/instances/chainId.d.mts +1 -1
  221. package/dist/esm/transactions/instances/identifier.d.mts +1 -1
  222. package/dist/esm/transactions/instances/index.d.mts +1 -1
  223. package/dist/esm/transactions/instances/index.mjs +1 -1
  224. package/dist/esm/transactions/instances/moduleId.d.mts +1 -1
  225. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  226. package/dist/esm/transactions/instances/multiAgentTransaction.d.mts +1 -1
  227. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  228. package/dist/esm/transactions/instances/rawTransaction.d.mts +1 -1
  229. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  230. package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +1 -1
  231. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  232. package/dist/esm/transactions/instances/signedTransaction.d.mts +1 -1
  233. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  234. package/dist/esm/transactions/instances/simpleTransaction.d.mts +1 -1
  235. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  236. package/dist/esm/transactions/instances/transactionArgument.d.mts +1 -1
  237. package/dist/esm/transactions/instances/transactionPayload.d.mts +1 -1
  238. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  239. package/dist/esm/transactions/management/accountSequenceNumber.d.mts +2 -2
  240. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  241. package/dist/esm/transactions/management/index.d.mts +2 -2
  242. package/dist/esm/transactions/management/index.mjs +1 -1
  243. package/dist/esm/transactions/management/transactionWorker.d.mts +2 -2
  244. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  245. package/dist/esm/transactions/transactionBuilder/helpers.d.mts +1 -1
  246. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  247. package/dist/esm/transactions/transactionBuilder/index.d.mts +1 -1
  248. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  249. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +1 -1
  250. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  251. package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +1 -1
  252. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
  253. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +1 -1
  254. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  255. package/dist/esm/transactions/typeTag/index.d.mts +1 -1
  256. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  257. package/dist/esm/transactions/typeTag/parser.d.mts +1 -1
  258. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  259. package/dist/esm/transactions/types.d.mts +1 -1
  260. package/dist/esm/types/index.d.mts +1 -1
  261. package/dist/esm/types/index.mjs +1 -1
  262. package/dist/esm/types/types.d.mts +1 -1
  263. package/dist/esm/types/types.mjs +1 -1
  264. package/dist/esm/utils/helpers.d.mts +1 -1
  265. package/dist/esm/utils/helpers.mjs +1 -1
  266. package/dist/esm/utils/index.d.mts +1 -1
  267. package/dist/esm/utils/index.mjs +1 -1
  268. package/dist/esm/utils/normalizeBundle.d.mts +1 -1
  269. package/dist/esm/utils/normalizeBundle.mjs +1 -1
  270. package/dist/esm/version.d.mts +1 -1
  271. package/dist/esm/version.mjs +1 -1
  272. package/package.json +19 -18
  273. package/src/transactions/typeTag/index.ts +173 -1
  274. package/src/transactions/typeTag/parser.ts +24 -0
  275. package/src/types/types.ts +6 -0
  276. package/src/version.ts +1 -1
  277. package/dist/common/chunk-347THBDE.js.map +0 -1
  278. package/dist/esm/chunk-H3EP5CGP.mjs +0 -2
  279. package/dist/esm/chunk-MCFQE4GC.mjs +0 -2
  280. package/dist/esm/chunk-MCFQE4GC.mjs.map +0 -1
  281. package/dist/esm/chunk-PJTG745G.mjs +0 -4
  282. package/dist/esm/chunk-PJTG745G.mjs.map +0 -1
  283. /package/dist/esm/{chunk-V74WPKSY.mjs.map → chunk-2XQKGWHQ.mjs.map} +0 -0
  284. /package/dist/esm/{chunk-2OPKZKOB.mjs.map → chunk-54WUP65H.mjs.map} +0 -0
  285. /package/dist/esm/{chunk-R7FWJP3N.mjs.map → chunk-AGAAGA2X.mjs.map} +0 -0
  286. /package/dist/esm/{chunk-E2U27PNC.mjs.map → chunk-BCTM24ZZ.mjs.map} +0 -0
  287. /package/dist/esm/{chunk-LAPXUUHK.mjs.map → chunk-C2ZO2L5W.mjs.map} +0 -0
  288. /package/dist/esm/{chunk-YS5IUILF.mjs.map → chunk-DRBFLEZL.mjs.map} +0 -0
  289. /package/dist/esm/{chunk-RQX6JOEN.mjs.map → chunk-EF4FA5I6.mjs.map} +0 -0
  290. /package/dist/esm/{chunk-FC72YL4B.mjs.map → chunk-EFQZGHAO.mjs.map} +0 -0
  291. /package/dist/esm/{chunk-PSSIJHHC.mjs.map → chunk-HX6SDBEX.mjs.map} +0 -0
  292. /package/dist/esm/{chunk-QNARIAVM.mjs.map → chunk-I7XT6L7S.mjs.map} +0 -0
  293. /package/dist/esm/{chunk-626KB2UQ.mjs.map → chunk-YSP6JG5G.mjs.map} +0 -0
  294. /package/dist/esm/{chunk-AQW4BUKF.mjs.map → chunk-ZABLJ2JJ.mjs.map} +0 -0
package/package.json CHANGED
@@ -32,6 +32,23 @@
32
32
  "dist",
33
33
  "src"
34
34
  ],
35
+ "scripts": {
36
+ "build:clean": "rm -rf dist",
37
+ "build": "pnpm build:clean && tsup",
38
+ "prepublishOnly": "pnpm run build",
39
+ "_fmt": "prettier 'src/**/*.ts' 'tests/**/*.ts' 'examples/**/*.js' 'examples/**/*.ts' 'confidential-assets/**/*.ts' 'eslint.config.cjs'",
40
+ "fmt": "pnpm _fmt --write",
41
+ "lint": "eslint '**/*.{cts,mts,ts}'",
42
+ "test": "pnpm jest",
43
+ "unit-test": "pnpm jest tests/unit",
44
+ "e2e-test": "pnpm jest tests/e2e",
45
+ "indexer-codegen": "graphql-codegen --config ./src/types/codegen.yaml && pnpm fmt",
46
+ "doc": "scripts/generateDocs.sh",
47
+ "check-version": "scripts/checkVersion.sh",
48
+ "update-version": "scripts/updateVersion.sh && pnpm doc",
49
+ "spec": "pnpm build && pnpm _spec",
50
+ "_spec": "cucumber-js -p default"
51
+ },
35
52
  "dependencies": {
36
53
  "@aptos-labs/aptos-cli": "^1.0.2",
37
54
  "@aptos-labs/aptos-client": "^2.0.0",
@@ -78,21 +95,5 @@
78
95
  "typedoc-plugin-missing-exports": "^4.1.0",
79
96
  "typescript": "^5.8.3"
80
97
  },
81
- "version": "5.1.2",
82
- "scripts": {
83
- "build:clean": "rm -rf dist",
84
- "build": "pnpm build:clean && tsup",
85
- "_fmt": "prettier 'src/**/*.ts' 'tests/**/*.ts' 'examples/**/*.js' 'examples/**/*.ts' 'confidential-assets/**/*.ts' 'eslint.config.cjs'",
86
- "fmt": "pnpm _fmt --write",
87
- "lint": "eslint '**/*.{cts,mts,ts}'",
88
- "test": "pnpm jest",
89
- "unit-test": "pnpm jest tests/unit",
90
- "e2e-test": "pnpm jest tests/e2e",
91
- "indexer-codegen": "graphql-codegen --config ./src/types/codegen.yaml && pnpm fmt",
92
- "doc": "scripts/generateDocs.sh",
93
- "check-version": "scripts/checkVersion.sh",
94
- "update-version": "scripts/updateVersion.sh && pnpm doc",
95
- "spec": "pnpm build && pnpm _spec",
96
- "_spec": "cucumber-js -p default"
97
- }
98
- }
98
+ "version": "5.1.3"
99
+ }
@@ -63,6 +63,18 @@ export abstract class TypeTag extends Serializable {
63
63
  return TypeTagU32.load(deserializer);
64
64
  case TypeTagVariants.U256:
65
65
  return TypeTagU256.load(deserializer);
66
+ case TypeTagVariants.I8:
67
+ return TypeTagI8.load(deserializer);
68
+ case TypeTagVariants.I16:
69
+ return TypeTagI16.load(deserializer);
70
+ case TypeTagVariants.I32:
71
+ return TypeTagI32.load(deserializer);
72
+ case TypeTagVariants.I64:
73
+ return TypeTagI64.load(deserializer);
74
+ case TypeTagVariants.I128:
75
+ return TypeTagI128.load(deserializer);
76
+ case TypeTagVariants.I256:
77
+ return TypeTagI256.load(deserializer);
66
78
  case TypeTagVariants.Generic:
67
79
  // This is only used for ABI representation, and cannot actually be used as a type.
68
80
  return TypeTagGeneric.load(deserializer);
@@ -206,6 +218,26 @@ export abstract class TypeTag extends Serializable {
206
218
  return this instanceof TypeTagU256;
207
219
  }
208
220
 
221
+ /** Signed integer helpers */
222
+ isI8(): this is TypeTagI8 {
223
+ return this instanceof TypeTagI8;
224
+ }
225
+ isI16(): this is TypeTagI16 {
226
+ return this instanceof TypeTagI16;
227
+ }
228
+ isI32(): this is TypeTagI32 {
229
+ return this instanceof TypeTagI32;
230
+ }
231
+ isI64(): this is TypeTagI64 {
232
+ return this instanceof TypeTagI64;
233
+ }
234
+ isI128(): this is TypeTagI128 {
235
+ return this instanceof TypeTagI128;
236
+ }
237
+ isI256(): this is TypeTagI256 {
238
+ return this instanceof TypeTagI256;
239
+ }
240
+
209
241
  isPrimitive(): boolean {
210
242
  return (
211
243
  this instanceof TypeTagSigner ||
@@ -216,7 +248,13 @@ export abstract class TypeTag extends Serializable {
216
248
  this instanceof TypeTagU32 ||
217
249
  this instanceof TypeTagU64 ||
218
250
  this instanceof TypeTagU128 ||
219
- this instanceof TypeTagU256
251
+ this instanceof TypeTagU256 ||
252
+ this instanceof TypeTagI8 ||
253
+ this instanceof TypeTagI16 ||
254
+ this instanceof TypeTagI32 ||
255
+ this instanceof TypeTagI64 ||
256
+ this instanceof TypeTagI128 ||
257
+ this instanceof TypeTagI256
220
258
  );
221
259
  }
222
260
  }
@@ -290,6 +328,29 @@ export class TypeTagU8 extends TypeTag {
290
328
  }
291
329
  }
292
330
 
331
+ /**
332
+ * Represents a type tag for an 8-bit signed integer (i8).
333
+ * This class extends the base TypeTag class and provides methods
334
+ * for serialization and deserialization specific to the i8 type.
335
+ *
336
+ * @extends TypeTag
337
+ * @group Implementation
338
+ * @category Transactions
339
+ */
340
+ export class TypeTagI8 extends TypeTag {
341
+ toString(): string {
342
+ return "i8";
343
+ }
344
+
345
+ serialize(serializer: Serializer): void {
346
+ serializer.serializeU32AsUleb128(TypeTagVariants.I8);
347
+ }
348
+
349
+ static load(_deserializer: Deserializer): TypeTagI8 {
350
+ return new TypeTagI8();
351
+ }
352
+ }
353
+
293
354
  /**
294
355
  * Represents a type tag for unsigned 16-bit integers (u16).
295
356
  * This class extends the base TypeTag class and provides methods for serialization and deserialization.
@@ -312,6 +373,28 @@ export class TypeTagU16 extends TypeTag {
312
373
  }
313
374
  }
314
375
 
376
+ /**
377
+ * Represents a type tag for signed 16-bit integers (i16).
378
+ * This class extends the base TypeTag class and provides methods for serialization and deserialization.
379
+ *
380
+ * @extends TypeTag
381
+ * @group Implementation
382
+ * @category Transactions
383
+ */
384
+ export class TypeTagI16 extends TypeTag {
385
+ toString(): string {
386
+ return "i16";
387
+ }
388
+
389
+ serialize(serializer: Serializer): void {
390
+ serializer.serializeU32AsUleb128(TypeTagVariants.I16);
391
+ }
392
+
393
+ static load(_deserializer: Deserializer): TypeTagI16 {
394
+ return new TypeTagI16();
395
+ }
396
+ }
397
+
315
398
  /**
316
399
  * Represents a type tag for a 32-bit unsigned integer (u32).
317
400
  * This class extends the base TypeTag class and provides methods for serialization
@@ -335,6 +418,29 @@ export class TypeTagU32 extends TypeTag {
335
418
  }
336
419
  }
337
420
 
421
+ /**
422
+ * Represents a type tag for a 32-bit signed integer (i32).
423
+ * This class extends the base TypeTag class and provides methods for serialization
424
+ * and deserialization specific to the i32 type.
425
+ *
426
+ * @extends TypeTag
427
+ * @group Implementation
428
+ * @category Transactions
429
+ */
430
+ export class TypeTagI32 extends TypeTag {
431
+ toString(): string {
432
+ return "i32";
433
+ }
434
+
435
+ serialize(serializer: Serializer): void {
436
+ serializer.serializeU32AsUleb128(TypeTagVariants.I32);
437
+ }
438
+
439
+ static load(_deserializer: Deserializer): TypeTagI32 {
440
+ return new TypeTagI32();
441
+ }
442
+ }
443
+
338
444
  /**
339
445
  * Represents a type tag for 64-bit unsigned integers (u64).
340
446
  * This class extends the base TypeTag class and provides methods for serialization and deserialization.
@@ -357,6 +463,28 @@ export class TypeTagU64 extends TypeTag {
357
463
  }
358
464
  }
359
465
 
466
+ /**
467
+ * Represents a type tag for 64-bit signed integers (i64).
468
+ * This class extends the base TypeTag class and provides methods for serialization and deserialization.
469
+ *
470
+ * @extends TypeTag
471
+ * @group Implementation
472
+ * @category Transactions
473
+ */
474
+ export class TypeTagI64 extends TypeTag {
475
+ toString(): string {
476
+ return "i64";
477
+ }
478
+
479
+ serialize(serializer: Serializer): void {
480
+ serializer.serializeU32AsUleb128(TypeTagVariants.I64);
481
+ }
482
+
483
+ static load(_deserializer: Deserializer): TypeTagI64 {
484
+ return new TypeTagI64();
485
+ }
486
+ }
487
+
360
488
  /**
361
489
  * Represents a type tag for the u128 data type.
362
490
  * This class extends the base TypeTag class and provides methods for serialization and deserialization.
@@ -379,6 +507,28 @@ export class TypeTagU128 extends TypeTag {
379
507
  }
380
508
  }
381
509
 
510
+ /**
511
+ * Represents a type tag for the i128 data type.
512
+ * This class extends the base TypeTag class and provides methods for serialization and deserialization.
513
+ *
514
+ * @extends TypeTag
515
+ * @group Implementation
516
+ * @category Transactions
517
+ */
518
+ export class TypeTagI128 extends TypeTag {
519
+ toString(): string {
520
+ return "i128";
521
+ }
522
+
523
+ serialize(serializer: Serializer): void {
524
+ serializer.serializeU32AsUleb128(TypeTagVariants.I128);
525
+ }
526
+
527
+ static load(_deserializer: Deserializer): TypeTagI128 {
528
+ return new TypeTagI128();
529
+ }
530
+ }
531
+
382
532
  /**
383
533
  * Represents a type tag for the U256 data type.
384
534
  * This class extends the base TypeTag class and provides methods for serialization and deserialization.
@@ -401,6 +551,28 @@ export class TypeTagU256 extends TypeTag {
401
551
  }
402
552
  }
403
553
 
554
+ /**
555
+ * Represents a type tag for the I256 data type.
556
+ * This class extends the base TypeTag class and provides methods for serialization and deserialization.
557
+ *
558
+ * @extends TypeTag
559
+ * @group Implementation
560
+ * @category Transactions
561
+ */
562
+ export class TypeTagI256 extends TypeTag {
563
+ toString(): string {
564
+ return "i256";
565
+ }
566
+
567
+ serialize(serializer: Serializer): void {
568
+ serializer.serializeU32AsUleb128(TypeTagVariants.I256);
569
+ }
570
+
571
+ static load(_deserializer: Deserializer): TypeTagI256 {
572
+ return new TypeTagI256();
573
+ }
574
+ }
575
+
404
576
  /**
405
577
  * Represents a type tag for an address in the system.
406
578
  * This class extends the TypeTag class and provides functionality
@@ -16,6 +16,12 @@ import {
16
16
  TypeTagU32,
17
17
  TypeTagU64,
18
18
  TypeTagU8,
19
+ TypeTagI8,
20
+ TypeTagI16,
21
+ TypeTagI32,
22
+ TypeTagI64,
23
+ TypeTagI128,
24
+ TypeTagI256,
19
25
  TypeTagVector,
20
26
  } from ".";
21
27
  import { AccountAddress } from "../../core";
@@ -79,6 +85,12 @@ function isPrimitive(str: string) {
79
85
  case "u64":
80
86
  case "u128":
81
87
  case "u256":
88
+ case "i8":
89
+ case "i16":
90
+ case "i32":
91
+ case "i64":
92
+ case "i128":
93
+ case "i256":
82
94
  return true;
83
95
  default:
84
96
  return false;
@@ -354,6 +366,18 @@ function parseTypeTagInner(str: string, types: Array<TypeTag>, allowGenerics: bo
354
366
  return new TypeTagU128();
355
367
  case "u256":
356
368
  return new TypeTagU256();
369
+ case "i8":
370
+ return new TypeTagI8();
371
+ case "i16":
372
+ return new TypeTagI16();
373
+ case "i32":
374
+ return new TypeTagI32();
375
+ case "i64":
376
+ return new TypeTagI64();
377
+ case "i128":
378
+ return new TypeTagI128();
379
+ case "i256":
380
+ return new TypeTagI256();
357
381
  case "vector":
358
382
  if (types.length !== 1) {
359
383
  throw new TypeTagParserError(str, TypeTagParserErrorType.UnexpectedVectorTypeArgumentCount);
@@ -46,6 +46,12 @@ export enum TypeTagVariants {
46
46
  U16 = 8,
47
47
  U32 = 9,
48
48
  U256 = 10,
49
+ I8 = 11,
50
+ I16 = 12,
51
+ I32 = 13,
52
+ I64 = 14,
53
+ I128 = 15,
54
+ I256 = 16,
49
55
  Reference = 254, // This is specifically a placeholder and does not represent a real type
50
56
  Generic = 255, // This is specifically a placeholder and does not represent a real type
51
57
  }
package/src/version.ts CHANGED
@@ -6,4 +6,4 @@
6
6
  *
7
7
  * hardcoded for now, we would want to have it injected dynamically
8
8
  */
9
- export const VERSION = "5.1.2";
9
+ export const VERSION = "5.1.3";
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/Users/gabriele/workspace/aptos-ts-sdk/dist/common/chunk-347THBDE.js","../../src/core/common.ts","../../src/core/hex.ts","../../src/core/accountAddress.ts"],"names":["ParsingError","message","invalidReason","HexInvalidReason","Hex","_Hex","data","bytesToHex"],"mappings":"AAAA,ilBAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CCQhM,IAAMA,CAAAA,CAAN,MAAA,QAA8B,KAAM,CAkBzC,WAAA,CAAYC,CAAAA,CAAiBC,CAAAA,CAAkB,CAC7C,KAAA,CAAMD,CAAO,CAAA,CACb,IAAA,CAAK,aAAA,CAAgBC,CACvB,CACF,CAAA,CC3BA,4CAAuC,IAS3BC,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CACVA,CAAAA,CAAA,SAAA,CAAY,WAAA,CACZA,CAAAA,CAAA,cAAA,CAAiB,gBAAA,CACjBA,CAAAA,CAAA,iBAAA,CAAoB,mBAAA,CAHVA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAA,CAAA,CAAA,CAAA,CAgCCC,CAAAA,aAAN,MAAMC,CAAI,CAUf,WAAA,CAAYC,CAAAA,CAAkB,CAC5B,IAAA,CAAK,IAAA,CAAOA,CACd,CAaA,YAAA,CAAA,CAA2B,CACzB,OAAO,IAAA,CAAK,IACd,CASA,qBAAA,CAAA,CAAgC,CAC9B,OAAOC,+BAAAA,IAAW,CAAK,IAAI,CAC7B,CASA,QAAA,CAAA,CAAmB,CACjB,MAAO,CAAA,EAAA,EAAK,IAAA,CAAK,qBAAA,CAAsB,CAAC,CAAA,CAAA;ACkVsB;AAnWV,SAAA","file":"/Users/gabriele/workspace/aptos-ts-sdk/dist/common/chunk-347THBDE.js","sourcesContent":[null,"// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * This error is used to explain why parsing failed.\n * @group Implementation\n * @category Serialization\n */\nexport class ParsingError<T> extends Error {\n /**\n * This provides a programmatic way to access why parsing failed. Downstream devs\n * might want to use this to build their own error messages if the default error\n * messages are not suitable for their use case. This should be an enum.\n * @group Implementation\n * @category Serialization\n */\n public invalidReason: T;\n\n /**\n * Creates an instance of the error with a specified message and invalid reason.\n *\n * @param message The error message that describes the issue.\n * @param invalidReason The reason why the input is considered invalid.\n * @group Implementation\n * @category Serialization\n */\n constructor(message: string, invalidReason: T) {\n super(message);\n this.invalidReason = invalidReason;\n }\n}\n\n/**\n * Whereas ParsingError is thrown when parsing fails, e.g. in a fromString function,\n * this type is returned from \"defensive\" functions like isValid.\n * @group Implementation\n * @category Serialization\n */\nexport type ParsingResult<T> = {\n /**\n * True if valid, false otherwise.\n * @group Implementation\n * @category Serialization\n */\n valid: boolean;\n\n /**\n * If valid is false, this will be a code explaining why parsing failed.\n * @group Implementation\n * @category Serialization\n */\n invalidReason?: T;\n\n /**\n * If valid is false, this will be a string explaining why parsing failed.\n * @group Implementation\n * @category Serialization\n */\n invalidReasonMessage?: string;\n};\n","// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { bytesToHex, hexToBytes } from \"@noble/hashes/utils\";\nimport { ParsingError, ParsingResult } from \"./common\";\nimport { HexInput } from \"../types\";\n\n/**\n * Provides reasons for parsing failures related to hexadecimal values.\n * @group Implementation\n * @category Serialization\n */\nexport enum HexInvalidReason {\n TOO_SHORT = \"too_short\",\n INVALID_LENGTH = \"invalid_length\",\n INVALID_HEX_CHARS = \"invalid_hex_chars\",\n}\n\n/**\n * NOTE: Do not use this class when working with account addresses; use AccountAddress instead.\n * When accepting hex data as input to a function, prefer to accept HexInput and\n *\n * A helper class for working with hex data. Hex data, when represented as a string,\n * generally looks like this, for example: 0xaabbcc, 45cd32, etc.\n *\n * then use the static helper methods of this class to convert it into the desired\n * format. This enables the greatest flexibility for the developer.\n *\n * Example usage:\n * ```typescript\n * getTransactionByHash(txnHash: HexInput): Promise<Transaction> {\n * const txnHashString = Hex.fromHexInput(txnHash).toString();\n * return await getTransactionByHashInner(txnHashString);\n * }\n * ```\n * This call to `Hex.fromHexInput().toString()` converts the HexInput to a hex string\n * with a leading 0x prefix, regardless of what the input format was.\n *\n * Other ways to chain the functions together:\n * - `Hex.fromHexString({ hexInput: \"0x1f\" }).toUint8Array()`\n * - `new Hex([1, 3]).toStringWithoutPrefix()`\n * @group Implementation\n * @category Serialization\n */\nexport class Hex {\n private readonly data: Uint8Array;\n\n /**\n * Create a new Hex instance from a Uint8Array.\n *\n * @param data - The Uint8Array containing the data to initialize the Hex instance.\n * @group Implementation\n * @category Serialization\n */\n constructor(data: Uint8Array) {\n this.data = data;\n }\n\n // ===\n // Methods for representing an instance of Hex as other types.\n // ===\n\n /**\n * Get the inner hex data as a Uint8Array. The inner data is already a Uint8Array, so no conversion takes place.\n *\n * @returns Hex data as Uint8Array\n * @group Implementation\n * @category Serialization\n */\n toUint8Array(): Uint8Array {\n return this.data;\n }\n\n /**\n * Get the hex data as a string without the 0x prefix.\n *\n * @returns Hex string without 0x prefix\n * @group Implementation\n * @category Serialization\n */\n toStringWithoutPrefix(): string {\n return bytesToHex(this.data);\n }\n\n /**\n * Get the hex data as a string with the 0x prefix.\n *\n * @returns Hex string with 0x prefix\n * @group Implementation\n * @category Serialization\n */\n toString(): string {\n return `0x${this.toStringWithoutPrefix()}`;\n }\n\n // ===\n // Methods for creating an instance of Hex from other types.\n // ===\n\n /**\n * Converts a hex string into a Hex instance, allowing for both prefixed and non-prefixed formats.\n *\n * @param str - A hex string, with or without the 0x prefix.\n *\n * @throws ParsingError - If the hex string is too short, has an odd number of characters, or contains invalid hex characters.\n *\n * @returns Hex - The resulting Hex instance created from the provided string.\n * @group Implementation\n * @category Serialization\n */\n static fromHexString(str: string): Hex {\n let input = str;\n\n if (input.startsWith(\"0x\")) {\n input = input.slice(2);\n }\n\n if (input.length === 0) {\n throw new ParsingError(\n \"Hex string is too short, must be at least 1 char long, excluding the optional leading 0x.\",\n HexInvalidReason.TOO_SHORT,\n );\n }\n\n if (input.length % 2 !== 0) {\n throw new ParsingError(\"Hex string must be an even number of hex characters.\", HexInvalidReason.INVALID_LENGTH);\n }\n\n try {\n return new Hex(hexToBytes(input));\n } catch (error: any) {\n throw new ParsingError(\n `Hex string contains invalid hex characters: ${error?.message}`,\n HexInvalidReason.INVALID_HEX_CHARS,\n );\n }\n }\n\n /**\n * Converts an instance of HexInput, which can be a string or a Uint8Array, into a Hex instance.\n * This function is useful for transforming hexadecimal representations into a structured Hex object for further manipulation.\n *\n * @param hexInput - A HexInput which can be a string or Uint8Array.\n * @returns A Hex instance created from the provided hexInput.\n * @group Implementation\n * @category Serialization\n */\n static fromHexInput(hexInput: HexInput): Hex {\n if (hexInput instanceof Uint8Array) return new Hex(hexInput);\n return Hex.fromHexString(hexInput);\n }\n\n /**\n * Converts an instance of HexInput, which can be a string or a Uint8Array, into a Uint8Array.\n *\n * @param hexInput - A HexInput which can be a string or Uint8Array.\n * @returns A Uint8Array created from the provided hexInput.\n */\n static hexInputToUint8Array(hexInput: HexInput): Uint8Array {\n if (hexInput instanceof Uint8Array) return hexInput;\n return Hex.fromHexString(hexInput).toUint8Array();\n }\n\n /**\n * Converts a HexInput (string or Uint8Array) to a hex string with '0x' prefix.\n *\n * @param hexInput - The input to convert, either a hex string (with/without '0x' prefix) or Uint8Array\n * @returns A hex string with '0x' prefix (e.g., \"0x1234\")\n *\n * @example\n * ```typescript\n * Hex.hexInputToString(\"1234\") // returns \"0x1234\"\n * Hex.hexInputToString(\"0x1234\") // returns \"0x1234\"\n * Hex.hexInputToString(new Uint8Array([0x12, 0x34])) // returns \"0x1234\"\n * ```\n */\n static hexInputToString(hexInput: HexInput): string {\n return Hex.fromHexInput(hexInput).toString();\n }\n\n /**\n * Converts a HexInput (string or Uint8Array) to a hex string without '0x' prefix.\n *\n * @param hexInput - The input to convert, either a hex string (with/without '0x' prefix) or Uint8Array\n * @returns A hex string without '0x' prefix (e.g., \"1234\")\n *\n * @example\n * ```typescript\n * Hex.hexInputToStringWithoutPrefix(\"1234\") // returns \"1234\"\n * Hex.hexInputToStringWithoutPrefix(\"0x1234\") // returns \"1234\"\n * Hex.hexInputToStringWithoutPrefix(new Uint8Array([0x12, 0x34])) // returns \"1234\"\n * ```\n */\n static hexInputToStringWithoutPrefix(hexInput: HexInput): string {\n return Hex.fromHexInput(hexInput).toStringWithoutPrefix();\n }\n\n // ===\n // Methods for checking validity.\n // ===\n\n /**\n * Check if the provided string is a valid hexadecimal representation.\n *\n * @param str - A hex string representing byte data.\n *\n * @returns An object containing:\n * - valid: A boolean indicating whether the string is valid.\n * - invalidReason: The reason for invalidity if the string is not valid.\n * - invalidReasonMessage: A message explaining why the string is invalid.\n * @group Implementation\n * @category Serialization\n */\n static isValid(str: string): ParsingResult<HexInvalidReason> {\n try {\n Hex.fromHexString(str);\n return { valid: true };\n } catch (error: any) {\n return {\n valid: false,\n invalidReason: error?.invalidReason,\n invalidReasonMessage: error?.message,\n };\n }\n }\n\n /**\n * Determine if two Hex instances are equal by comparing their underlying byte data.\n *\n * @param other The Hex instance to compare to.\n * @returns true if the Hex instances are equal, false if not.\n * @group Implementation\n * @category Serialization\n */\n equals(other: Hex): boolean {\n if (this.data.length !== other.data.length) return false;\n return this.data.every((value, index) => value === other.data[index]);\n }\n}\n\nexport const hexToAsciiString = (hex: string) => new TextDecoder().decode(Hex.fromHexInput(hex).toUint8Array());\n","// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { bytesToHex, hexToBytes } from \"@noble/hashes/utils\";\nimport { Serializable, Serializer } from \"../bcs/serializer\";\nimport { Deserializer } from \"../bcs/deserializer\";\nimport { ParsingError, ParsingResult } from \"./common\";\nimport { TransactionArgument } from \"../transactions/instances/transactionArgument\";\nimport { HexInput, ScriptTransactionArgumentVariants } from \"../types\";\n\n/**\n * Provides reasons for an address was invalid.\n * @group Implementation\n * @category Serialization\n */\nexport enum AddressInvalidReason {\n INCORRECT_NUMBER_OF_BYTES = \"incorrect_number_of_bytes\",\n INVALID_HEX_CHARS = \"invalid_hex_chars\",\n TOO_SHORT = \"too_short\",\n TOO_LONG = \"too_long\",\n LEADING_ZERO_X_REQUIRED = \"leading_zero_x_required\",\n LONG_FORM_REQUIRED_UNLESS_SPECIAL = \"long_form_required_unless_special\",\n INVALID_PADDING_ZEROES = \"INVALID_PADDING_ZEROES\",\n INVALID_PADDING_STRICTNESS = \"INVALID_PADDING_STRICTNESS\",\n}\n\n/**\n * The input for an account address, which can be either a hexadecimal string or a standard account address.\n * @group Implementation\n * @category Serialization\n */\nexport type AccountAddressInput = HexInput | AccountAddress;\n\n/**\n * NOTE: Only use this class for account addresses. For other hex data, e.g. transaction\n * hashes, use the Hex class.\n *\n * AccountAddress is used for working with account addresses. Account addresses, when\n * represented as a string, generally look like these examples:\n * - 0x1\n * - 0xaa86fe99004361f747f91342ca13c426ca0cccb0c1217677180c9493bad6ef0c\n *\n * Proper formatting and parsing of account addresses is defined by AIP-40.\n * To learn more about the standard, read the AIP here:\n * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.\n *\n * The comments in this class make frequent reference to the LONG and SHORT formats,\n * as well as \"special\" addresses. To learn what these refer to see AIP-40.\n * @group Implementation\n * @category Serialization\n */\nexport class AccountAddress extends Serializable implements TransactionArgument {\n /**\n * This is the internal representation of an account address.\n * @group Implementation\n * @category Serialization\n */\n readonly data: Uint8Array;\n\n /**\n * The number of bytes that make up an account address.\n * @group Implementation\n * @category Serialization\n */\n static readonly LENGTH: number = 32;\n\n /**\n * The length of an address string in LONG form without a leading 0x.\n * @group Implementation\n * @category Serialization\n */\n static readonly LONG_STRING_LENGTH: number = 64;\n\n static ZERO: AccountAddress = AccountAddress.from(\"0x0\");\n\n static ONE: AccountAddress = AccountAddress.from(\"0x1\");\n\n static TWO: AccountAddress = AccountAddress.from(\"0x2\");\n\n static THREE: AccountAddress = AccountAddress.from(\"0x3\");\n\n static FOUR: AccountAddress = AccountAddress.from(\"0x4\");\n\n static A: AccountAddress = AccountAddress.from(\"0xA\");\n\n /**\n * Creates an instance of AccountAddress from a Uint8Array.\n *\n * This function ensures that the input data is exactly 32 bytes long, which is required for a valid account address.\n *\n * @param input A Uint8Array representing an account address.\n * @throws ParsingError if the input length is not equal to 32 bytes.\n * @group Implementation\n * @category Serialization\n */\n constructor(input: Uint8Array) {\n super();\n if (input.length !== AccountAddress.LENGTH) {\n throw new ParsingError(\n \"AccountAddress data should be exactly 32 bytes long\",\n AddressInvalidReason.INCORRECT_NUMBER_OF_BYTES,\n );\n }\n this.data = input;\n }\n\n /**\n * Determines if the address is classified as special, which is defined as 0x0 to 0xf inclusive.\n * In other words, the last byte of the address must be < 0b10000 (16)\n * and every other byte must be zero.\n *\n * For more information on how special addresses are defined, see AIP-40:\n * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.\n *\n * @returns true if the address is special, false otherwise.\n * @group Implementation\n * @category Serialization\n */\n isSpecial(): boolean {\n return (\n this.data.slice(0, this.data.length - 1).every((byte) => byte === 0) && this.data[this.data.length - 1] < 0b10000\n );\n }\n // ===\n // Methods for representing an instance of AccountAddress as other types.\n // ===\n\n /**\n * Return the AccountAddress as a string as per AIP-40.\n * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.\n * This representation returns special addresses in SHORT form (0xf)\n * and other addresses in LONG form (0x + 64 characters).\n *\n * @returns AccountAddress as a string conforming to AIP-40.\n * @group Implementation\n * @category Serialization\n */\n toString(): `0x${string}` {\n return `0x${this.toStringWithoutPrefix()}`;\n }\n\n /**\n * Return the AccountAddress as a string conforming to AIP-40 but without the leading 0x.\n *\n * NOTE: Prefer to use `toString` where possible.\n *\n * @returns AccountAddress as a string without the leading 0x.\n * @group Implementation\n * @category Serialization\n */\n toStringWithoutPrefix(): string {\n let hex = bytesToHex(this.data);\n if (this.isSpecial()) {\n hex = hex[hex.length - 1];\n }\n return hex;\n }\n\n /**\n * Convert the account address to a string in LONG format, which is always 0x followed by 64 hex characters.\n *\n * NOTE: Prefer to use `toString` where possible, as it formats special addresses using the SHORT form (no leading 0s).\n *\n * @returns AccountAddress as a string in LONG form.\n * @group Implementation\n * @category Serialization\n */\n toStringLong(): `0x${string}` {\n return `0x${this.toStringLongWithoutPrefix()}`;\n }\n\n /**\n * Returns the account address as a string in LONG form without a leading 0x.\n * This function will include leading zeroes and will produce a string of 64 hex characters.\n *\n * NOTE: Prefer to use `toString` where possible, as it formats special addresses using the SHORT form (no leading 0s).\n *\n * @returns {string} The account address in LONG form.\n * @group Implementation\n * @category Serialization\n */\n toStringLongWithoutPrefix(): string {\n return bytesToHex(this.data);\n }\n\n /**\n * Convert the account address to a string in SHORT format, which is 0x followed by the shortest\n * possible representation (no leading zeros).\n *\n * @returns AccountAddress as a string in SHORT form.\n * @group Implementation\n * @category Serialization\n */\n toStringShort(): `0x${string}` {\n return `0x${this.toStringShortWithoutPrefix()}`;\n }\n\n /**\n * Returns a lossless short string representation of the address by trimming leading zeros.\n * If the address consists of all zeros, returns \"0\".\n *\n * @returns A string representation of the address without leading zeros\n * @group Implementation\n * @category Serialization\n */\n toStringShortWithoutPrefix(): string {\n const hex = bytesToHex(this.data).replace(/^0+/, \"\");\n return hex === \"\" ? \"0\" : hex;\n }\n\n /**\n * Get the inner data as a Uint8Array.\n * The inner data is already a Uint8Array, so no conversion takes place.\n *\n * @returns Hex data as Uint8Array\n * @group Implementation\n * @category Serialization\n */\n toUint8Array(): Uint8Array {\n return this.data;\n }\n\n /**\n * Serialize the AccountAddress to a Serializer instance's data buffer.\n * @param serializer The serializer to serialize the AccountAddress to.\n * @returns void\n * @example\n * const serializer = new Serializer();\n * const address = AccountAddress.fromString(\"0x1\");\n * address.serialize(serializer);\n * const bytes = serializer.toUint8Array();\n * // `bytes` is now the BCS-serialized address.\n * @group Implementation\n * @category Serialization\n */\n serialize(serializer: Serializer): void {\n serializer.serializeFixedBytes(this.data);\n }\n\n /**\n * Serializes the current instance into a byte sequence suitable for entry functions.\n * This allows for the proper encoding of data when interacting with entry functions in the blockchain.\n *\n * @param serializer - The serializer instance used to convert the data into bytes.\n * @group Implementation\n * @category Serialization\n */\n serializeForEntryFunction(serializer: Serializer): void {\n const bcsBytes = this.bcsToBytes();\n serializer.serializeBytes(bcsBytes);\n }\n\n /**\n * Serializes the current instance for use in a script function by encoding it into a byte sequence.\n * This process involves serializing the variant index and the instance data, making it suitable for transmission.\n *\n * @param serializer - The serializer instance used to perform the serialization.\n * @group Implementation\n * @category Serialization\n */\n serializeForScriptFunction(serializer: Serializer): void {\n serializer.serializeU32AsUleb128(ScriptTransactionArgumentVariants.Address);\n serializer.serialize(this);\n }\n\n /**\n * Deserialize an AccountAddress from the byte buffer in a Deserializer instance.\n * This function allows you to convert a byte representation of an AccountAddress into an instance of AccountAddress.\n * @param deserializer The deserializer to deserialize the AccountAddress from.\n * @returns An instance of AccountAddress.\n * @example\n * const bytes = hexToBytes(\"0x0102030405060708091011121314151617181920212223242526272829303132\");\n * const deserializer = new Deserializer(bytes);\n * const address = AccountAddress.deserialize(deserializer);\n * // `address` is now an instance of AccountAddress.\n * @group Implementation\n * @category Serialization\n */\n static deserialize(deserializer: Deserializer): AccountAddress {\n const bytes = deserializer.deserializeFixedBytes(AccountAddress.LENGTH);\n return new AccountAddress(bytes);\n }\n\n // ===\n // Methods for creating an instance of AccountAddress from other types.\n // ===\n\n /**\n * NOTE: This function has strict parsing behavior. For relaxed behavior, please use\n * the `fromString` function.\n *\n * Creates an instance of AccountAddress from a hex string.\n *\n * This function allows only the strictest formats defined by AIP-40. In short this\n * means only the following formats are accepted:\n *\n * - LONG\n * - SHORT for special addresses\n *\n * Where:\n * - LONG is defined as 0x + 64 hex characters.\n * - SHORT for special addresses is 0x0 to 0xf inclusive without padding zeroes.\n *\n * This means the following are not accepted:\n * - SHORT for non-special addresses.\n * - Any address without a leading 0x.\n *\n * @param input - A hex string representing an account address.\n *\n * @throws {ParsingError} If the hex string does not start with 0x or is not in a valid format.\n *\n * @remarks\n *\n * This function has strict parsing behavior. For relaxed behavior, please use the `fromString` function.\n *\n * @see AIP-40 documentation for more details on address formats:\n * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.\n *\n * @returns An instance of AccountAddress.\n * @group Implementation\n * @category Serialization\n */\n static fromStringStrict(input: string): AccountAddress {\n // Assert the string starts with 0x.\n if (!input.startsWith(\"0x\")) {\n throw new ParsingError(\"Hex string must start with a leading 0x.\", AddressInvalidReason.LEADING_ZERO_X_REQUIRED);\n }\n\n const address = AccountAddress.fromString(input);\n\n // Check if the address is in LONG form. If it is not, this is only allowed for\n // special addresses, in which case we check it is in proper SHORT form.\n if (input.length !== AccountAddress.LONG_STRING_LENGTH + 2) {\n if (!address.isSpecial()) {\n throw new ParsingError(\n `The given hex string ${input} is not a special address, it must be represented as 0x + 64 chars.`,\n AddressInvalidReason.LONG_FORM_REQUIRED_UNLESS_SPECIAL,\n );\n } else if (input.length !== 3) {\n // 0x + one hex char is the only valid SHORT form for special addresses.\n throw new ParsingError(\n // eslint-disable-next-line max-len\n `The given hex string ${input} is a special address not in LONG form, it must be 0x0 to 0xf without padding zeroes.`,\n AddressInvalidReason.INVALID_PADDING_ZEROES,\n );\n }\n }\n\n return address;\n }\n\n /**\n * NOTE: This function has relaxed parsing behavior. For strict behavior, please use\n * the `fromStringStrict` function. Where possible use `fromStringStrict` rather than this\n * function, `fromString`.\n *\n * Creates an instance of AccountAddress from a hex string.\n *\n * This function allows all formats defined by AIP-40. In short this means the\n * following formats are accepted:\n *\n * - LONG, with or without leading 0x\n * - SHORT*, with or without leading 0x\n *\n * Where:\n * - LONG is 64 hex characters.\n * - SHORT* is 1 to 63 hex characters inclusive. The address can have missing values up to `maxMissingChars` before it is padded.\n * - Padding zeroes are allowed, e.g. 0x0123 is valid.\n *\n * Learn more about the different address formats by reading AIP-40:\n * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.\n *\n * @param input A hex string representing an account address.\n * @param args.maxMissingChars The number of characters that can be missing in a padded address before it is invalid.\n *\n * @returns An instance of AccountAddress.\n *\n * @throws ParsingError if the hex string is too short, too long, or contains invalid characters.\n * @group Implementation\n * @category Serialization\n */\n static fromString(input: string, { maxMissingChars = 4 }: { maxMissingChars?: number } = {}): AccountAddress {\n let parsedInput = input;\n // Remove leading 0x for parsing.\n if (input.startsWith(\"0x\")) {\n parsedInput = input.slice(2);\n }\n\n // Ensure the address string is at least 1 character long.\n if (parsedInput.length === 0) {\n throw new ParsingError(\n \"Hex string is too short, must be 1 to 64 chars long, excluding the leading 0x.\",\n AddressInvalidReason.TOO_SHORT,\n );\n }\n\n // Ensure the address string is not longer than 64 characters.\n if (parsedInput.length > 64) {\n throw new ParsingError(\n \"Hex string is too long, must be 1 to 64 chars long, excluding the leading 0x.\",\n AddressInvalidReason.TOO_LONG,\n );\n }\n\n // Ensure that the maxMissingChars is between or equal to 0 and 63.\n if (maxMissingChars > 63 || maxMissingChars < 0) {\n throw new ParsingError(\n `maxMissingChars must be between or equal to 0 and 63. Received ${maxMissingChars}`,\n AddressInvalidReason.INVALID_PADDING_STRICTNESS,\n );\n }\n\n let addressBytes: Uint8Array;\n try {\n // Pad the address with leading zeroes, so it is 64 chars long and then convert\n // the hex string to bytes. Every two characters in a hex string constitutes a\n // single byte. So a 64 length hex string becomes a 32 byte array.\n addressBytes = hexToBytes(parsedInput.padStart(64, \"0\"));\n } catch (error: any) {\n // At this point the only way this can fail is if the hex string contains\n // invalid characters.\n throw new ParsingError(`Hex characters are invalid: ${error?.message}`, AddressInvalidReason.INVALID_HEX_CHARS);\n }\n\n const address = new AccountAddress(addressBytes);\n\n // Cannot pad the address if it has more than maxMissingChars missing.\n if (parsedInput.length < 64 - maxMissingChars) {\n if (!address.isSpecial()) {\n throw new ParsingError(\n `Hex string is too short, must be ${64 - maxMissingChars} to 64 chars long, excluding the leading 0x. You may need to fix \nthe addresss by padding it with 0s before passing it to \\`fromString\\` (e.g. <addressString>.padStart(64, '0')). \nReceived ${input}`,\n AddressInvalidReason.TOO_SHORT,\n );\n }\n }\n\n return address;\n }\n\n /**\n * Convenience method for creating an AccountAddress from various input types.\n * This function accepts a string, Uint8Array, or an existing AccountAddress instance and returns the corresponding\n * AccountAddress.\n *\n * @param input - The input to convert into an AccountAddress. This can be a string representation of an address, a Uint8Array,\n * or an existing AccountAddress.\n * @param args.maxMissingChars The number of characters that can be missing in a padded address before it is invalid.\n * @group Implementation\n * @category Serialization\n */\n static from(input: AccountAddressInput, { maxMissingChars = 4 }: { maxMissingChars?: number } = {}): AccountAddress {\n if (typeof input === \"string\") {\n return AccountAddress.fromString(input, { maxMissingChars });\n }\n if (input instanceof Uint8Array) {\n return new AccountAddress(input);\n }\n return input;\n }\n\n /**\n * Create an AccountAddress from various input types, including strings, Uint8Array, and AccountAddress instances.\n *\n * @param input - The input to convert into an AccountAddress, which can be a string, a Uint8Array, or an AccountAddress.\n * @group Implementation\n * @category Serialization\n */\n static fromStrict(input: AccountAddressInput): AccountAddress {\n if (typeof input === \"string\") {\n return AccountAddress.fromStringStrict(input);\n }\n if (input instanceof Uint8Array) {\n return new AccountAddress(input);\n }\n return input;\n }\n // ===\n // Methods for checking validity.\n // ===\n\n /**\n * Check if the provided input is a valid AccountAddress.\n *\n * @param args - The arguments for validation.\n * @param args.input - A hex string representing an account address.\n * @param args.strict - If true, use strict parsing behavior; if false, use relaxed parsing behavior.\n *\n * @returns An object indicating whether the address is valid. If valid, valid = true; if not, valid = false with additional details.\n * If the address is invalid, invalidReason will explain why it is invalid, and invalidReasonMessage will provide the error message.\n * @group Implementation\n * @category Serialization\n */\n static isValid(args: { input: AccountAddressInput; strict?: boolean }): ParsingResult<AddressInvalidReason> {\n try {\n if (args.strict) {\n AccountAddress.fromStrict(args.input);\n } else {\n AccountAddress.from(args.input);\n }\n return { valid: true };\n } catch (error: any) {\n return {\n valid: false,\n invalidReason: error?.invalidReason,\n invalidReasonMessage: error?.message,\n };\n }\n }\n\n /**\n * Determine if two AccountAddresses are equal based on their underlying byte data.\n *\n * @param other - The AccountAddress to compare to.\n * @returns true if the AccountAddresses are equal, false if not.\n * @group Implementation\n * @category Serialization\n */\n equals(other: AccountAddress): boolean {\n if (this.data.length !== other.data.length) return false;\n return this.data.every((value, index) => value === other.data[index]);\n }\n}\n"]}
@@ -1,2 +0,0 @@
1
- var o="5.1.2";export{o as a};
2
- //# sourceMappingURL=chunk-H3EP5CGP.mjs.map
@@ -1,2 +0,0 @@
1
- var u=(e=>(e.JSON="application/json",e.BCS="application/x-bcs",e.BCS_SIGNED_TRANSACTION="application/x.aptos.signed_transaction+bcs",e.BCS_VIEW_FUNCTION="application/x.aptos.view_function+bcs",e))(u||{}),y=(r=>(r[r.Bool=0]="Bool",r[r.U8=1]="U8",r[r.U64=2]="U64",r[r.U128=3]="U128",r[r.Address=4]="Address",r[r.Signer=5]="Signer",r[r.Vector=6]="Vector",r[r.Struct=7]="Struct",r[r.U16=8]="U16",r[r.U32=9]="U32",r[r.U256=10]="U256",r[r.Reference=254]="Reference",r[r.Generic=255]="Generic",r))(y||{}),d=(s=>(s[s.U8=0]="U8",s[s.U64=1]="U64",s[s.U128=2]="U128",s[s.Address=3]="Address",s[s.U8Vector=4]="U8Vector",s[s.Bool=5]="Bool",s[s.U16=6]="U16",s[s.U32=7]="U32",s[s.U256=8]="U256",s[s.Serialized=9]="Serialized",s))(d||{}),c=(e=>(e[e.Script=0]="Script",e[e.EntryFunction=2]="EntryFunction",e[e.Multisig=3]="Multisig",e[e.Payload=4]="Payload",e))(c||{}),l=(o=>(o[o.V1=0]="V1",o))(l||{}),_=(i=>(i[i.Script=0]="Script",i[i.EntryFunction=1]="EntryFunction",i[i.Empty=2]="Empty",i))(_||{}),x=(o=>(o[o.V1=0]="V1",o))(x||{}),h=(p=>(p[p.MultiAgentTransaction=0]="MultiAgentTransaction",p[p.FeePayerTransaction=1]="FeePayerTransaction",p))(h||{}),m=(t=>(t[t.Ed25519=0]="Ed25519",t[t.MultiEd25519=1]="MultiEd25519",t[t.MultiAgent=2]="MultiAgent",t[t.FeePayer=3]="FeePayer",t[t.SingleSender=4]="SingleSender",t))(m||{}),v=(a=>(a[a.Ed25519=0]="Ed25519",a[a.MultiEd25519=1]="MultiEd25519",a[a.SingleKey=2]="SingleKey",a[a.MultiKey=3]="MultiKey",a[a.NoAccountAuthenticator=4]="NoAccountAuthenticator",a[a.Abstraction=5]="Abstraction",a))(v||{}),S=(i=>(i.Ed25519="ed25519",i.Secp256k1="secp256k1",i.Secp256r1="secp256r1",i))(S||{}),R=(t=>(t[t.Ed25519=0]="Ed25519",t[t.Secp256k1=1]="Secp256k1",t[t.Secp256r1=2]="Secp256r1",t[t.Keyless=3]="Keyless",t[t.FederatedKeyless=4]="FederatedKeyless",t))(R||{});function B(n){switch(n){case 0:return"ed25519";case 1:return"secp256k1";case 2:return"secp256r1";case 3:return"keyless";case 4:return"federated_keyless";default:throw new Error("Unknown public key variant")}}var b=(e=>(e[e.Ed25519=0]="Ed25519",e[e.Secp256k1=1]="Secp256k1",e[e.WebAuthn=2]="WebAuthn",e[e.Keyless=3]="Keyless",e))(b||{}),M=(o=>(o[o.Ed25519=0]="Ed25519",o))(M||{}),k=(o=>(o[o.Ed25519=0]="Ed25519",o))(k||{}),f=(o=>(o[o.ZkProof=0]="ZkProof",o))(f||{}),C=(o=>(o[o.Groth16=0]="Groth16",o))(C||{}),T=(g=>(g.Pending="pending_transaction",g.User="user_transaction",g.Genesis="genesis_transaction",g.BlockMetadata="block_metadata_transaction",g.StateCheckpoint="state_checkpoint_transaction",g.Validator="validator_transaction",g.BlockEpilogue="block_epilogue_transaction",g))(T||{});function G(n){return n.type==="pending_transaction"}function O(n){return n.type==="user_transaction"}function N(n){return n.type==="genesis_transaction"}function P(n){return n.type==="block_metadata_transaction"}function D(n){return n.type==="state_checkpoint_transaction"}function q(n){return n.type==="validator_transaction"}function w(n){return n.type==="block_epilogue_transaction"}function H(n){return"signature"in n&&n.type==="ed25519_signature"}function j(n){return"signature"in n&&n.signature==="secp256k1_ecdsa_signature"}function K(n){return n.type==="multi_agent_signature"}function L(n){return n.type==="fee_payer_signature"}function $(n){return n.type==="multi_ed25519_signature"}function z(n){return n.type==="single_sender"}var E=(i=>(i.PRIVATE="private",i.PUBLIC="public",i.FRIEND="friend",i))(E||{}),U=(e=>(e.STORE="store",e.DROP="drop",e.KEY="key",e.COPY="copy",e))(U||{}),W=(p=>(p.VALIDATOR="validator",p.FULL_NODE="full_node",p))(W||{}),I=(e=>(e[e.Ed25519=0]="Ed25519",e[e.MultiEd25519=1]="MultiEd25519",e[e.SingleKey=2]="SingleKey",e[e.MultiKey=3]="MultiKey",e))(I||{}),F=(p=>(p[p.Ed25519=0]="Ed25519",p[p.Secp256k1Ecdsa=2]="Secp256k1Ecdsa",p))(F||{}),A=(t=>(t[t.DeriveAuid=251]="DeriveAuid",t[t.DeriveObjectAddressFromObject=252]="DeriveObjectAddressFromObject",t[t.DeriveObjectAddressFromGuid=253]="DeriveObjectAddressFromGuid",t[t.DeriveObjectAddressFromSeed=254]="DeriveObjectAddressFromSeed",t[t.DeriveResourceAccountAddress=255]="DeriveResourceAccountAddress",t))(A||{});export{u as a,y as b,d as c,c as d,l as e,_ as f,x as g,h,m as i,v as j,S as k,R as l,B as m,b as n,M as o,k as p,f as q,C as r,T as s,G as t,O as u,N as v,P as w,D as x,q as y,w as z,H as A,j as B,K as C,L as D,$ as E,z as F,E as G,U as H,W as I,I as J,F as K,A as L};
2
- //# sourceMappingURL=chunk-MCFQE4GC.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/types/types.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { AptosConfig } from \"../api\";\nimport { InputSubmitTransactionData } from \"../transactions\";\nimport { Network } from \"../utils/apiEndpoints\";\nimport { OrderBy, TokenStandard } from \"./indexer\";\n\n/**\n * Different MIME types used for data interchange in transactions and responses.\n */\nexport enum MimeType {\n /**\n * JSON representation, used for transaction submission and accept type JSON output\n */\n JSON = \"application/json\",\n /**\n * BCS representation, used for accept type BCS output\n */\n BCS = \"application/x-bcs\",\n /**\n * BCS representation, used for transaction submission in BCS input\n */\n BCS_SIGNED_TRANSACTION = \"application/x.aptos.signed_transaction+bcs\",\n BCS_VIEW_FUNCTION = \"application/x.aptos.view_function+bcs\",\n}\n\n/**\n * Hexadecimal data input for functions, supporting both string and Uint8Array formats.\n */\nexport type HexInput = string | Uint8Array;\n\n/**\n * Variants of type tags used in the system, encompassing various data types and structures.\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/third_party/move/move-core/types/src/language_storage.rs#L27}\n */\nexport enum TypeTagVariants {\n Bool = 0,\n U8 = 1,\n U64 = 2,\n U128 = 3,\n Address = 4,\n Signer = 5,\n Vector = 6,\n Struct = 7,\n U16 = 8,\n U32 = 9,\n U256 = 10,\n Reference = 254, // This is specifically a placeholder and does not represent a real type\n Generic = 255, // This is specifically a placeholder and does not represent a real type\n}\n\n/**\n * Variants of script transaction arguments used in Rust, encompassing various data types for transaction processing.\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/third_party/move/move-core/types/src/transaction_argument.rs#L11}\n */\nexport enum ScriptTransactionArgumentVariants {\n U8 = 0,\n U64 = 1,\n U128 = 2,\n Address = 3,\n U8Vector = 4,\n Bool = 5,\n U16 = 6,\n U32 = 7,\n U256 = 8,\n Serialized = 9,\n}\n\n/**\n * The payload for various transaction types in the system.\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/mod.rs#L478}\n */\nexport enum TransactionPayloadVariants {\n Script = 0,\n EntryFunction = 2,\n Multisig = 3,\n Payload = 4,\n}\n\n/**\n * The inner payload type to support orderless transactions and all future transaction types.\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/mod.rs#L478}\n */\nexport enum TransactionInnerPayloadVariants {\n V1 = 0,\n}\n\n/**\n * Executable types for transactions, which can be either a script or an entry function.\n *\n * Empty is reserved for Multisig voting transactions, which do not have an executable payload.\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/mod.rs#L685}\n */\nexport enum TransactionExecutableVariants {\n Script = 0,\n EntryFunction = 1,\n Empty = 2,\n}\n\n/**\n * Variants of transaction extra configurations, which can include additional settings or parameters.\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/mod.rs#L737}\n */\nexport enum TransactionExtraConfigVariants {\n V1 = 0,\n}\n\n/**\n * Variants of transactions used in the system.\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/mod.rs#L440}\n */\nexport enum TransactionVariants {\n MultiAgentTransaction = 0,\n FeePayerTransaction = 1,\n}\n\n/**\n * Variants of transaction authenticators used in the system.\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs#L44}\n */\nexport enum TransactionAuthenticatorVariant {\n Ed25519 = 0,\n MultiEd25519 = 1,\n MultiAgent = 2,\n FeePayer = 3,\n SingleSender = 4,\n}\n\n/**\n * Variants of account authenticators used in transactions.\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs#L414}\n */\nexport enum AccountAuthenticatorVariant {\n Ed25519 = 0,\n MultiEd25519 = 1,\n SingleKey = 2,\n MultiKey = 3,\n NoAccountAuthenticator = 4,\n Abstraction = 5,\n}\n\n/**\n * Variants of private keys that can comply with the AIP-80 standard.\n * {@link https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-80.md}\n */\nexport enum PrivateKeyVariants {\n Ed25519 = \"ed25519\",\n Secp256k1 = \"secp256k1\",\n Secp256r1 = \"secp256r1\",\n}\n\n/**\n * Variants of public keys used in cryptographic operations.\n */\nexport enum AnyPublicKeyVariant {\n Ed25519 = 0,\n Secp256k1 = 1,\n Secp256r1 = 2,\n Keyless = 3,\n FederatedKeyless = 4,\n}\n\nexport function anyPublicKeyVariantToString(variant: AnyPublicKeyVariant): string {\n switch (variant) {\n case AnyPublicKeyVariant.Ed25519:\n return \"ed25519\";\n case AnyPublicKeyVariant.Secp256k1:\n return \"secp256k1\";\n case AnyPublicKeyVariant.Secp256r1:\n return \"secp256r1\";\n case AnyPublicKeyVariant.Keyless:\n return \"keyless\";\n case AnyPublicKeyVariant.FederatedKeyless:\n return \"federated_keyless\";\n default:\n throw new Error(\"Unknown public key variant\");\n }\n}\n\n/**\n * Variants of signature types used for cryptographic operations.\n */\nexport enum AnySignatureVariant {\n Ed25519 = 0,\n Secp256k1 = 1,\n WebAuthn = 2,\n Keyless = 3,\n}\n\n/**\n * Variants of ephemeral public keys used in cryptographic operations.\n */\nexport enum EphemeralPublicKeyVariant {\n Ed25519 = 0,\n}\n\n/**\n * Variants of ephemeral signatures used for secure communication.\n */\nexport enum EphemeralSignatureVariant {\n Ed25519 = 0,\n}\n\n/**\n * Variants of ephemeral certificates used in secure transactions.\n */\nexport enum EphemeralCertificateVariant {\n ZkProof = 0,\n}\n\n/**\n * Variants of zero-knowledge proofs used in cryptographic operations.\n */\nexport enum ZkpVariant {\n Groth16 = 0,\n}\n\n/**\n * BCS types\n */\nexport type Uint8 = number;\n\n/**\n * A 16-bit unsigned integer.\n */\nexport type Uint16 = number;\n\n/**\n * A 32-bit unsigned integer.\n */\nexport type Uint32 = number;\n\n/**\n * A 64-bit unsigned integer value.\n */\nexport type Uint64 = bigint;\n\n/**\n * A 128-bit unsigned integer used for precise arithmetic operations.\n */\nexport type Uint128 = bigint;\n\n/**\n * A 256-bit unsigned integer used for precise numerical calculations.\n */\nexport type Uint256 = bigint;\n\n/**\n * A number or a bigint value.\n */\nexport type AnyNumber = number | bigint;\n\n/**\n * Configuration options for initializing the SDK, allowing customization of its behavior and interaction with the Aptos network.\n */\nexport type AptosSettings = {\n readonly network?: Network;\n\n readonly fullnode?: string;\n\n readonly faucet?: string;\n\n readonly indexer?: string;\n\n readonly pepper?: string;\n\n readonly prover?: string;\n\n readonly clientConfig?: ClientConfig;\n\n readonly client?: Client;\n\n readonly fullnodeConfig?: FullNodeConfig;\n\n readonly indexerConfig?: IndexerConfig;\n\n readonly faucetConfig?: FaucetConfig;\n\n readonly transactionGenerationConfig?: TransactionGenerationConfig;\n\n readonly pluginSettings?: PluginSettings;\n};\n\n/**\n * Defines the parameters for paginating query results, including the starting position and maximum number of items to return.\n * @param offset Specifies the starting position of the query result. Default is 0.\n * @param limit Specifies the maximum number of items to return. Default is 25.\n */\nexport interface PaginationArgs {\n offset?: AnyNumber;\n limit?: number;\n}\n\n/**\n * Defines the parameters for paginating query results, including the starting position and maximum number of items to return.\n * @param cursor Specifies the starting position of the query result. Default is at the beginning if undefined. This is not a number and must come from the API.\n * @param limit Specifies the maximum number of items to return. Default is 25.\n */\nexport interface CursorPaginationArgs {\n cursor?: string;\n limit?: number;\n}\n\n/**\n * Represents the arguments for specifying a token standard.\n *\n * @param tokenStandard - Optional standard of the token.\n */\nexport interface TokenStandardArg {\n tokenStandard?: TokenStandard;\n}\n\nexport interface OrderByArg<T extends {}> {\n orderBy?: OrderBy<T>;\n}\n\nexport interface WhereArg<T extends {}> {\n where?: T;\n}\n\n/**\n * QUERY TYPES\n */\n\n/**\n * A configuration object for requests to the server, including API key, extra headers, and cookie handling options.\n */\nexport type ClientConfig = ClientHeadersType & {\n WITH_CREDENTIALS?: boolean;\n API_KEY?: string;\n};\n\n/**\n * A configuration object for a Fullnode, allowing for the inclusion of extra headers in requests.\n */\nexport type FullNodeConfig = ClientHeadersType;\n\n/**\n * An Indexer configuration object for sending requests with additional headers.\n */\nexport type IndexerConfig = ClientHeadersType;\n\n/**\n * A configuration object for a faucet, including optional authentication and headers for requests.\n */\nexport type FaucetConfig = ClientHeadersType & {\n AUTH_TOKEN?: string;\n};\n\n/**\n * A configuration object for default parameters for transaction generation.\n */\nexport type TransactionGenerationConfig = {\n defaultMaxGasAmount?: number;\n defaultTxnExpirySecFromNow?: number;\n};\n\n/**\n * General type definition for client headers.\n */\nexport type ClientHeadersType = {\n HEADERS?: Record<string, string | number | boolean>;\n};\n\n/**\n * Config for plugins. This can be used to override certain client behavior.\n */\nexport type PluginConfig = {\n /**\n * If given, this will be used for submitting transactions instead of the default\n * implementation (which submits transactions directly via a node).\n */\n TRANSACTION_SUBMITTER?: TransactionSubmitter;\n\n /**\n * If true, we won't use the TRANSACTION_SUBMITTER if set.\n */\n IGNORE_TRANSACTION_SUBMITTER?: boolean;\n};\n\nexport type PluginSettings = Omit<PluginConfig, \"IGNORE_TRANSACTION_SUBMITTER\">;\n\n/**\n * You can implement this interface and set it in {@link PluginSettings} when building a\n * client to override the default transaction submission behavior. This is useful if\n * you'd like to submit transactions via a gas station for example.\n *\n * @example\n * ```typescript\n * class MyGasStationClient implements TransactionSubmitter {\n * async submitTransaction(\n * args: { aptosConfig: AptosConfig } & InputSubmitTransactionData,\n * ): Promise<PendingTransactionResponse> {\n * // TODO: Implement the logic to submit the transaction to the gas station\n * }\n * }\n *\n * const network = Network.MAINNET;\n * const myGasStationClient = new MyGasStationClient(network);\n * const config = new AptosConfig({\n * network,\n * pluginConfig: {\n * transactionSubmitter: myGasStationClient,\n * },\n * });\n * const aptos = new Aptos(config);\n * ```\n */\nexport interface TransactionSubmitter {\n /**\n * Submit a transaction to the Aptos blockchain or something that will do it on your\n * behalf, for example a gas station. See the comments of {@link TransactionSubmitter} for more.\n *\n * @param args - The arguments for submitting the transaction.\n * @param args.aptosConfig - The configuration for connecting to the Aptos network.\n * @param args.transaction - The Aptos transaction data to be submitted.\n * @param args.senderAuthenticator - The account authenticator of the transaction sender.\n * @param args.secondarySignerAuthenticators - Optional. Authenticators for additional signers in a multi-signer transaction.\n * @param args.pluginParams - Optional. Additional parameters for the plugin.\n * @param args.transactionSubmitter - Optional. An override for the transaction submitter.\n *\n * @returns PendingTransactionResponse - The response containing the status of the submitted transaction.\n * @group Implementation\n */\n submitTransaction(\n args: {\n aptosConfig: AptosConfig;\n } & Omit<InputSubmitTransactionData, \"transactionSubmitter\">,\n ): Promise<PendingTransactionResponse>;\n}\n\n/**\n * Represents a client for making requests to a service provider.\n *\n * @param Req - The type of the request payload.\n * @param Res - The type of the response payload.\n */\nexport interface ClientRequest<Req> {\n url: string;\n method: \"GET\" | \"POST\";\n originMethod?: string;\n body?: Req;\n contentType?: string;\n params?: any;\n overrides?: ClientConfig & FullNodeConfig & IndexerConfig & FaucetConfig;\n headers?: Record<string, any>;\n}\n\nexport interface ClientResponse<Res> {\n status: number;\n statusText: string;\n data: Res;\n config?: any;\n request?: any;\n response?: any;\n headers?: any;\n}\n\nexport interface Client {\n /**\n * Sends a request to the specified URL with the given options.\n *\n * @param requestOptions - The options for the request.\n * @param requestOptions.url - The URL to send the request to.\n * @param requestOptions.method - The HTTP method to use, either \"GET\" or \"POST\".\n * @param requestOptions.path - An optional path to append to the URL.\n * @param requestOptions.body - The body of the request, applicable for POST requests.\n * @param requestOptions.contentType - The content type of the request body.\n * @param requestOptions.acceptType - The expected content type of the response.\n * @param requestOptions.params - Optional parameters to include in the request.\n * @param requestOptions.originMethod - An optional method to specify the origin of the request.\n * @param requestOptions.overrides - Optional configuration overrides for the request.\n */\n provider<Req, Res>(requestOptions: ClientRequest<Req>): Promise<ClientResponse<Res>>;\n}\n\n/**\n * The API request type\n *\n * @param url - the url to make the request to, i.e. https://fullnode.devnet.aptoslabs.com/v1\n * @param method - the request method \"GET\" | \"POST\"\n * @param endpoint (optional) - the endpoint to make the request to, i.e. transactions\n * @param body (optional) - the body of the request\n * @param contentType (optional) - the content type to set the `content-type` header to,\n * by default is set to `application/json`\n * @param params (optional) - query params to add to the request\n * @param originMethod (optional) - the local method the request came from\n * @param overrides (optional) - a `ClientConfig` object type to override request data\n */\nexport type AptosRequest = {\n url: string;\n method: \"GET\" | \"POST\";\n path?: string;\n body?: any;\n contentType?: string;\n acceptType?: string;\n params?: Record<string, string | AnyNumber | boolean | undefined>;\n originMethod?: string;\n overrides?: ClientConfig & FullNodeConfig & IndexerConfig & FaucetConfig;\n};\n\n/**\n * The API response type\n *\n * @param status - the response status. i.e. 200\n * @param statusText - the response message\n * @param data the response data\n * @param url the url the request was made to\n * @param headers the response headers\n * @param config (optional) - the request object\n * @param request (optional) - the request object\n */\nexport interface AptosResponse<Req, Res> {\n status: number;\n statusText: string;\n data: Res;\n url: string;\n headers: any;\n config?: any;\n request?: Req;\n}\n\n/**\n * The ledger version of transactions, defaulting to the latest version if not specified.\n */\nexport type LedgerVersionArg = {\n ledgerVersion?: AnyNumber;\n};\n\n/**\n * RESPONSE TYPES\n */\n\n/**\n * The output of the estimate gas API, including the deprioritized estimate for the gas unit price.\n */\nexport type GasEstimation = {\n /**\n * The deprioritized estimate for the gas unit price\n */\n deprioritized_gas_estimate?: number;\n /**\n * The current estimate for the gas unit price\n */\n gas_estimate: number;\n /**\n * The prioritized estimate for the gas unit price\n */\n prioritized_gas_estimate?: number;\n};\n\nexport type MoveResource<T = {}> = {\n type: MoveStructId;\n data: T;\n};\n\n/**\n * The data associated with an account, including its sequence number.\n */\nexport type AccountData = {\n sequence_number: string;\n authentication_key: string;\n};\n\n/**\n * A Move module containing an address.\n */\nexport type MoveModuleBytecode = {\n bytecode: string;\n abi?: MoveModule;\n};\n\n/**\n * TRANSACTION TYPES\n */\n\n/**\n * Different types of transaction responses that can occur in the system.\n */\nexport enum TransactionResponseType {\n Pending = \"pending_transaction\",\n User = \"user_transaction\",\n Genesis = \"genesis_transaction\",\n BlockMetadata = \"block_metadata_transaction\",\n StateCheckpoint = \"state_checkpoint_transaction\",\n Validator = \"validator_transaction\",\n BlockEpilogue = \"block_epilogue_transaction\",\n}\n\n/**\n * The response for a transaction, which can be either pending or committed.\n */\nexport type TransactionResponse = PendingTransactionResponse | CommittedTransactionResponse;\n\n/**\n * The response for a committed transaction, which can be one of several transaction types.\n */\nexport type CommittedTransactionResponse =\n | UserTransactionResponse\n | GenesisTransactionResponse\n | BlockMetadataTransactionResponse\n | StateCheckpointTransactionResponse\n | ValidatorTransactionResponse\n | BlockEpilogueTransactionResponse;\n\n/**\n * Determine if the given transaction response is currently pending.\n *\n * @param response - The transaction response to evaluate.\n * @returns A boolean indicating whether the transaction is pending.\n */\nexport function isPendingTransactionResponse(response: TransactionResponse): response is PendingTransactionResponse {\n return response.type === TransactionResponseType.Pending;\n}\n\n/**\n * Determines if the given transaction response is a user transaction.\n *\n * @param response - The transaction response to evaluate.\n * @returns A boolean indicating whether the transaction is of type User.\n */\nexport function isUserTransactionResponse(response: TransactionResponse): response is UserTransactionResponse {\n return response.type === TransactionResponseType.User;\n}\n\n/**\n * Determines if the given transaction response is a Genesis transaction.\n *\n * @param response - The transaction response to evaluate.\n * @returns A boolean indicating whether the transaction is a Genesis transaction.\n */\nexport function isGenesisTransactionResponse(response: TransactionResponse): response is GenesisTransactionResponse {\n return response.type === TransactionResponseType.Genesis;\n}\n\n/**\n * Determine if the given transaction response is of type BlockMetadata.\n *\n * @param response - The transaction response to evaluate.\n * @returns A boolean indicating whether the response is a BlockMetadata transaction.\n */\nexport function isBlockMetadataTransactionResponse(\n response: TransactionResponse,\n): response is BlockMetadataTransactionResponse {\n return response.type === TransactionResponseType.BlockMetadata;\n}\n\n/**\n * Determines if the provided transaction response is a state checkpoint transaction.\n *\n * @param response - The transaction response to evaluate.\n * @returns A boolean indicating whether the transaction response is of type StateCheckpoint.\n */\nexport function isStateCheckpointTransactionResponse(\n response: TransactionResponse,\n): response is StateCheckpointTransactionResponse {\n return response.type === TransactionResponseType.StateCheckpoint;\n}\n\n/**\n * Determine if the given transaction response is of type Validator.\n *\n * @param response - The transaction response to evaluate.\n * @returns A boolean indicating whether the transaction response is a Validator type.\n */\nexport function isValidatorTransactionResponse(\n response: TransactionResponse,\n): response is ValidatorTransactionResponse {\n return response.type === TransactionResponseType.Validator;\n}\n\n/**\n * Determines if the given transaction response is of the type Block Epilogue.\n *\n * @param response - The transaction response to evaluate.\n * @returns A boolean indicating whether the response is a Block Epilogue transaction.\n */\nexport function isBlockEpilogueTransactionResponse(\n response: TransactionResponse,\n): response is BlockEpilogueTransactionResponse {\n return response.type === TransactionResponseType.BlockEpilogue;\n}\n\n/**\n * The response for a pending transaction, indicating that the transaction is still being processed.\n */\nexport type PendingTransactionResponse = {\n type: TransactionResponseType.Pending;\n hash: string;\n sender: string;\n sequence_number: string;\n max_gas_amount: string;\n gas_unit_price: string;\n expiration_timestamp_secs: string;\n payload: TransactionPayloadResponse;\n signature?: TransactionSignature;\n};\n\n/**\n * The response structure for a user transaction.\n */\nexport type UserTransactionResponse = {\n type: TransactionResponseType.User;\n version: string;\n hash: string;\n state_change_hash: string;\n event_root_hash: string;\n state_checkpoint_hash: string | null;\n gas_used: string;\n /**\n * Whether the transaction was successful\n */\n success: boolean;\n /**\n * The VM status of the transaction, can tell useful information in a failure\n */\n vm_status: string;\n accumulator_root_hash: string;\n /**\n * Final state of resources changed by the transaction\n */\n changes: Array<WriteSetChange>;\n sender: string;\n sequence_number: string;\n replay_protection_nonce: string;\n max_gas_amount: string;\n gas_unit_price: string;\n expiration_timestamp_secs: string;\n payload: TransactionPayloadResponse;\n signature?: TransactionSignature;\n /**\n * Events generated by the transaction\n */\n events: Array<Event>;\n timestamp: string;\n};\n\n/**\n * The response for a genesis transaction, indicating the type of transaction.\n */\nexport type GenesisTransactionResponse = {\n type: TransactionResponseType.Genesis;\n version: string;\n hash: string;\n state_change_hash: string;\n event_root_hash: string;\n state_checkpoint_hash?: string;\n gas_used: string;\n /**\n * Whether the transaction was successful\n */\n success: boolean;\n /**\n * The VM status of the transaction, can tell useful information in a failure\n */\n vm_status: string;\n accumulator_root_hash: string;\n /**\n * Final state of resources changed by the transaction\n */\n changes: Array<WriteSetChange>;\n payload: GenesisPayload;\n /**\n * Events emitted during genesis\n */\n events: Array<Event>;\n};\n\n/**\n * The structure representing a blockchain block with its height.\n */\nexport type BlockMetadataTransactionResponse = {\n type: TransactionResponseType.BlockMetadata;\n version: string;\n hash: string;\n state_change_hash: string;\n event_root_hash: string;\n state_checkpoint_hash: string | null;\n gas_used: string;\n /**\n * Whether the transaction was successful\n */\n success: boolean;\n /**\n * The VM status of the transaction, can tell useful information in a failure\n */\n vm_status: string;\n accumulator_root_hash: string;\n /**\n * Final state of resources changed by the transaction\n */\n changes: Array<WriteSetChange>;\n id: string;\n epoch: string;\n round: string;\n /**\n * The events emitted at the block creation\n */\n events: Array<Event>;\n /**\n * Previous block votes\n */\n previous_block_votes_bitvec: Array<number>;\n proposer: string;\n /**\n * The indices of the proposers who failed to propose\n */\n failed_proposer_indices: Array<number>;\n timestamp: string;\n};\n\n/**\n * The response for a state checkpoint transaction, indicating the type of transaction.\n */\nexport type StateCheckpointTransactionResponse = {\n type: TransactionResponseType.StateCheckpoint;\n version: string;\n hash: string;\n state_change_hash: string;\n event_root_hash: string;\n state_checkpoint_hash: string | null;\n gas_used: string;\n /**\n * Whether the transaction was successful\n */\n success: boolean;\n /**\n * The VM status of the transaction, can tell useful information in a failure\n */\n vm_status: string;\n accumulator_root_hash: string;\n /**\n * Final state of resources changed by the transaction\n */\n changes: Array<WriteSetChange>;\n timestamp: string;\n};\n\n/**\n * The response for a validator transaction, indicating the type of transaction.\n */\nexport type ValidatorTransactionResponse = {\n type: TransactionResponseType.Validator;\n version: string;\n hash: string;\n state_change_hash: string;\n event_root_hash: string;\n state_checkpoint_hash: string | null;\n gas_used: string;\n /**\n * Whether the transaction was successful\n */\n success: boolean;\n /**\n * The VM status of the transaction, can tell useful information in a failure\n */\n vm_status: string;\n accumulator_root_hash: string;\n /**\n * Final state of resources changed by the transaction\n */\n changes: Array<WriteSetChange>;\n /**\n * The events emitted by the validator transaction\n */\n events: Array<Event>;\n timestamp: string;\n};\n\n/**\n * Describes the gas state of the block, indicating whether the block gas limit has been reached.\n */\nexport type BlockEndInfo = {\n block_gas_limit_reached: boolean;\n block_output_limit_reached: boolean;\n block_effective_block_gas_units: number;\n block_approx_output_size: number;\n};\n\n/**\n * A transaction executed at the end of a block that tracks data from the entire block.\n */\nexport type BlockEpilogueTransactionResponse = {\n type: TransactionResponseType.BlockEpilogue;\n version: string;\n hash: string;\n state_change_hash: string;\n event_root_hash: string;\n state_checkpoint_hash: string | null;\n gas_used: string;\n /**\n * Whether the transaction was successful\n */\n success: boolean;\n /**\n * The VM status of the transaction, can tell useful information in a failure\n */\n vm_status: string;\n accumulator_root_hash: string;\n /**\n * Final state of resources changed by the transaction\n */\n changes: Array<WriteSetChange>;\n timestamp: string;\n block_end_info: BlockEndInfo | null;\n};\n\n/**\n * WRITESET CHANGE TYPES\n */\n\n/**\n * A union type that encompasses both script and direct write sets for data operations.\n */\nexport type WriteSetChange =\n | WriteSetChangeDeleteModule\n | WriteSetChangeDeleteResource\n | WriteSetChangeDeleteTableItem\n | WriteSetChangeWriteModule\n | WriteSetChangeWriteResource\n | WriteSetChangeWriteTableItem;\n\n/**\n * The structure for a module deletion change in a write set.\n */\nexport type WriteSetChangeDeleteModule = {\n type: string;\n address: string;\n /**\n * State key hash\n */\n state_key_hash: string;\n module: MoveModuleId;\n};\n\n/**\n * The payload for a resource deletion in a write set change.\n */\nexport type WriteSetChangeDeleteResource = {\n type: string;\n address: string;\n state_key_hash: string;\n resource: string;\n};\n\n/**\n * The payload for a write set change that deletes a table item.\n */\nexport type WriteSetChangeDeleteTableItem = {\n type: string;\n state_key_hash: string;\n handle: string;\n key: string;\n data?: DeletedTableData;\n};\n\n/**\n * The structure for a write module change in a write set.\n */\nexport type WriteSetChangeWriteModule = {\n type: string;\n address: string;\n state_key_hash: string;\n data: MoveModuleBytecode;\n};\n\n/**\n * The resource associated with a write set change, identified by its type.\n */\nexport type WriteSetChangeWriteResource = {\n type: string;\n address: string;\n state_key_hash: string;\n data: MoveResource;\n};\n\n/**\n * The structure for a write operation on a table in a write set change.\n */\nexport type WriteSetChangeWriteTableItem = {\n type: string;\n state_key_hash: string;\n handle: string;\n key: string;\n value: string;\n data?: DecodedTableData;\n};\n\n/**\n * The decoded data for a table, including its key in JSON format.\n */\nexport type DecodedTableData = {\n /**\n * Key of table in JSON\n */\n key: any;\n /**\n * Type of key\n */\n key_type: string;\n /**\n * Value of table in JSON\n */\n value: any;\n /**\n * Type of value\n */\n value_type: string;\n};\n\n/**\n * Data for a deleted table entry.\n */\nexport type DeletedTableData = {\n /**\n * Deleted key\n */\n key: any;\n /**\n * Deleted key type\n */\n key_type: string;\n};\n\n/**\n * The payload for a transaction response, which can be an entry function, script, or multisig payload.\n */\nexport type TransactionPayloadResponse = EntryFunctionPayloadResponse | ScriptPayloadResponse | MultisigPayloadResponse;\n\n/**\n * The response payload for an entry function, containing the type of the entry.\n */\nexport type EntryFunctionPayloadResponse = {\n type: string;\n function: MoveFunctionId;\n /**\n * Type arguments of the function\n */\n type_arguments: Array<string>;\n /**\n * Arguments of the function\n */\n arguments: Array<any>;\n};\n\n/**\n * The payload for a script response, containing the type of the script.\n */\nexport type ScriptPayloadResponse = {\n type: string;\n code: MoveScriptBytecode;\n /**\n * Type arguments of the function\n */\n type_arguments: Array<string>;\n /**\n * Arguments of the function\n */\n arguments: Array<any>;\n};\n\n/**\n * The response payload for a multisig transaction, containing the type of the transaction.\n */\nexport type MultisigPayloadResponse = {\n type: string;\n multisig_address: string;\n transaction_payload?: EntryFunctionPayloadResponse;\n};\n\n/**\n * The payload for the genesis block containing the type of the payload.\n */\nexport type GenesisPayload = {\n type: string;\n write_set: WriteSet;\n};\n\n/**\n * The bytecode for a Move script.\n */\nexport type MoveScriptBytecode = {\n bytecode: string;\n abi?: MoveFunction;\n};\n\n/**\n * JSON representations of transaction signatures returned from the node API.\n */\nexport type TransactionSignature =\n | TransactionEd25519Signature\n | TransactionSecp256k1Signature\n | TransactionMultiEd25519Signature\n | TransactionMultiAgentSignature\n | TransactionFeePayerSignature\n | TransactionSingleSenderSignature;\n\n/**\n * Determine if the provided signature is an Ed25519 signature.\n * This function checks for the presence of the \"signature\" property\n * and verifies that its value is \"ed25519_signature\".\n *\n * @param signature - The transaction signature to be checked.\n * @returns A boolean indicating whether the signature is an Ed25519 signature.\n */\nexport function isEd25519Signature(signature: TransactionSignature): signature is TransactionEd25519Signature {\n return \"signature\" in signature && signature.type === \"ed25519_signature\";\n}\n\n/**\n * Determine if the provided signature is a valid secp256k1 ECDSA signature.\n *\n * @param signature - The transaction signature to validate.\n * @returns A boolean indicating whether the signature is a secp256k1 ECDSA signature.\n */\nexport function isSecp256k1Signature(signature: TransactionSignature): signature is TransactionFeePayerSignature {\n return \"signature\" in signature && signature.signature === \"secp256k1_ecdsa_signature\";\n}\n\n/**\n * Determine if the provided transaction signature is a multi-agent signature.\n *\n * @param signature - The transaction signature to evaluate.\n * @returns A boolean indicating whether the signature is a multi-agent signature.\n */\nexport function isMultiAgentSignature(signature: TransactionSignature): signature is TransactionMultiAgentSignature {\n return signature.type === \"multi_agent_signature\";\n}\n\n/**\n * Determine if the provided signature is a fee payer signature.\n *\n * @param signature - The transaction signature to evaluate.\n * @returns A boolean indicating whether the signature is a fee payer signature.\n */\nexport function isFeePayerSignature(signature: TransactionSignature): signature is TransactionFeePayerSignature {\n return signature.type === \"fee_payer_signature\";\n}\n\n/**\n * Determine if the provided signature is of type \"multi_ed25519_signature\".\n *\n * @param signature - The transaction signature to check.\n * @returns A boolean indicating whether the signature is a multi-ed25519 signature.\n */\nexport function isMultiEd25519Signature(\n signature: TransactionSignature,\n): signature is TransactionMultiEd25519Signature {\n return signature.type === \"multi_ed25519_signature\";\n}\n\n/**\n * Determine if the provided signature is of type \"single_sender\".\n *\n * @param signature - The transaction signature to check.\n * @returns A boolean indicating whether the signature is a single-sender signature.\n */\nexport function isSingleSenderSignature(\n signature: TransactionSignature,\n): signature is TransactionSingleSenderSignature {\n return signature.type === \"single_sender\";\n}\n\n/**\n * The signature for a transaction using the Ed25519 algorithm.\n */\nexport type TransactionEd25519Signature = {\n type: string;\n public_key: string;\n signature: \"ed25519_signature\";\n};\n\n/**\n * The structure for a Secp256k1 signature in a transaction.\n */\nexport type TransactionSecp256k1Signature = {\n type: string;\n public_key: string;\n signature: \"secp256k1_ecdsa_signature\";\n};\n\n/**\n * The structure for a multi-signature transaction using Ed25519.\n */\nexport type TransactionSingleSenderSignature = {\n type: \"single_sender\";\n public_key: { value: string; type: string };\n signature: { value: string; type: string };\n};\n\n/**\n * The structure for a multi-signature transaction using Ed25519.\n */\nexport type TransactionMultiEd25519Signature = {\n type: \"multi_ed25519_signature\";\n /**\n * The public keys for the Ed25519 signature\n */\n public_keys: Array<string>;\n /**\n * Signature associated with the public keys in the same order\n */\n signatures: Array<string>;\n /**\n * The number of signatures required for a successful transaction\n */\n threshold: number;\n bitmap: string;\n};\n\n/**\n * The structure for a multi-agent signature in a transaction.\n */\nexport type TransactionMultiAgentSignature = {\n type: \"multi_agent_signature\";\n sender: AccountSignature;\n /**\n * The other involved parties' addresses\n */\n secondary_signer_addresses: Array<string>;\n /**\n * The associated signatures, in the same order as the secondary addresses\n */\n secondary_signers: Array<AccountSignature>;\n};\n\n/**\n * The signature of the fee payer in a transaction.\n */\nexport type TransactionFeePayerSignature = {\n type: \"fee_payer_signature\";\n sender: AccountSignature;\n /**\n * The other involved parties' addresses\n */\n secondary_signer_addresses: Array<string>;\n /**\n * The associated signatures, in the same order as the secondary addresses\n */\n secondary_signers: Array<AccountSignature>;\n fee_payer_address: string;\n fee_payer_signer: AccountSignature;\n};\n\n/**\n * The union of all single account signatures, including Ed25519, Secp256k1, and MultiEd25519 signatures.\n */\nexport type AccountSignature =\n | TransactionEd25519Signature\n | TransactionSecp256k1Signature\n | TransactionMultiEd25519Signature;\n\nexport type WriteSet = ScriptWriteSet | DirectWriteSet;\n\n/**\n * The set of properties for writing scripts, including the type of script.\n */\nexport type ScriptWriteSet = {\n type: string;\n execute_as: string;\n script: ScriptPayloadResponse;\n};\n\n/**\n * The set of direct write operations, identified by a type string.\n */\nexport type DirectWriteSet = {\n type: string;\n changes: Array<WriteSetChange>;\n events: Array<Event>;\n};\n\n/**\n * The structure for an event's unique identifier, including its creation number.\n */\n\n/**\n * The structure for an event, identified by a unique GUID.\n */\nexport type EventGuid = {\n creation_number: string;\n account_address: string;\n};\n\nexport type Event = {\n guid: EventGuid;\n sequence_number: string;\n type: string;\n /**\n * The JSON representation of the event\n */\n data: any;\n};\n\n/**\n * A number representing a Move uint8 type.\n */\nexport type MoveUint8Type = number;\n\n/**\n * A 16-bit unsigned integer used in the Move programming language.\n */\nexport type MoveUint16Type = number;\n\n/**\n * A 32-bit unsigned integer type used in Move programming.\n */\nexport type MoveUint32Type = number;\n\n/**\n * A string representation of a 64-bit unsigned integer used in Move programming.\n */\nexport type MoveUint64Type = string;\n\n/**\n * A string representing a 128-bit unsigned integer in the Move programming language.\n */\nexport type MoveUint128Type = string;\n\n/**\n * A string representation of a 256-bit unsigned integer used in Move programming.\n */\nexport type MoveUint256Type = string;\n\n/**\n * A string representing a Move address.\n */\nexport type MoveAddressType = string;\n\n/**\n * The type for identifying objects to be moved within the system.\n */\nexport type MoveObjectType = string;\n\n/**\n * The type for move options, which can be a MoveType, null, or undefined.\n */\nexport type MoveOptionType = MoveType | null | undefined;\n\n/**\n * A structure representing a move with a name.\n */\nexport type MoveStructId = `${string}::${string}::${string}`;\n\n/**\n * The move function containing its name. Same as MoveStructId since it reads weird to take a StructId for a Function.\n */\nexport type MoveFunctionId = MoveStructId;\n\n// TODO: Add support for looking up ABI to add proper typing\nexport type MoveStructType = {};\n\n/**\n * A union type that encompasses various data types used in Move, including primitive types, address types, object types, and\n * arrays of MoveType.\n */\nexport type MoveType =\n | boolean\n | string\n | MoveUint8Type\n | MoveUint16Type\n | MoveUint32Type\n | MoveUint64Type\n | MoveUint128Type\n | MoveUint256Type\n | MoveAddressType\n | MoveObjectType\n | MoveStructType\n | Array<MoveType>;\n\n/**\n * Possible Move values acceptable by move functions (entry, view)\n *\n * Map of a Move value to the corresponding TypeScript value\n *\n * `Bool -> boolean`\n *\n * `u8, u16, u32 -> number`\n *\n * `u64, u128, u256 -> string`\n *\n * `String -> string`\n *\n * `Address -> 0x${string}`\n *\n * `Struct - 0x${string}::${string}::${string}`\n *\n * `Object -> 0x${string}`\n *\n * `Vector -> Array<MoveValue>`\n *\n * `Option -> MoveValue | null | undefined`\n */\nexport type MoveValue =\n | boolean\n | string\n | MoveUint8Type\n | MoveUint16Type\n | MoveUint32Type\n | MoveUint64Type\n | MoveUint128Type\n | MoveUint256Type\n | MoveAddressType\n | MoveObjectType\n | MoveStructId\n | MoveOptionType\n | Array<MoveValue>;\n\n/**\n * A string representation of a Move module, formatted as `module_name::function_name`.\n * Module names are case-sensitive.\n */\nexport type MoveModuleId = `${string}::${string}`;\n\n/**\n * Specifies the visibility levels for move functions, controlling access permissions.\n */\nexport enum MoveFunctionVisibility {\n PRIVATE = \"private\",\n PUBLIC = \"public\",\n FRIEND = \"friend\",\n}\n\n/**\n * Abilities related to moving items within the system.\n */\nexport enum MoveAbility {\n STORE = \"store\",\n DROP = \"drop\",\n KEY = \"key\",\n COPY = \"copy\",\n}\n\n/**\n * Move abilities associated with the generic type parameter of a function.\n */\nexport type MoveFunctionGenericTypeParam = {\n constraints: Array<MoveAbility>;\n};\n\n/**\n * A field in a Move struct, identified by its name.\n */\nexport type MoveStructField = {\n name: string;\n type: string;\n};\n\n/**\n * A Move module\n */\nexport type MoveModule = {\n address: string;\n name: string;\n /**\n * Friends of the module\n */\n friends: Array<MoveModuleId>;\n /**\n * Public functions of the module\n */\n exposed_functions: Array<MoveFunction>;\n /**\n * Structs of the module\n */\n structs: Array<MoveStruct>;\n};\n\n/**\n * A move struct\n */\nexport type MoveStruct = {\n name: string;\n /**\n * Whether the struct is a native struct of Move\n */\n is_native: boolean;\n /**\n * Whether the struct is a module event (aka v2 event). This will be false for v1\n * events because the value is derived from the #[event] attribute on the struct in\n * the Move source code. This attribute is only relevant for v2 events.\n */\n is_event: boolean;\n /**\n * Abilities associated with the struct\n */\n abilities: Array<MoveAbility>;\n /**\n * Generic types associated with the struct\n */\n generic_type_params: Array<MoveFunctionGenericTypeParam>;\n /**\n * Fields associated with the struct\n */\n fields: Array<MoveStructField>;\n};\n\n/**\n * Move function\n */\nexport type MoveFunction = {\n name: string;\n visibility: MoveFunctionVisibility;\n /**\n * Whether the function can be called as an entry function directly in a transaction\n */\n is_entry: boolean;\n /**\n * Whether the function is a view function or not\n */\n is_view: boolean;\n /**\n * Generic type params associated with the Move function\n */\n generic_type_params: Array<MoveFunctionGenericTypeParam>;\n /**\n * Parameters associated with the move function\n */\n params: Array<string>;\n /**\n * Return type of the function\n */\n return: Array<string>;\n};\n\n/**\n * Roles that can be assigned within the system, indicating different levels of access and functionality.\n */\nexport enum RoleType {\n VALIDATOR = \"validator\",\n FULL_NODE = \"full_node\",\n}\n\n/**\n * Information about the current blockchain ledger, including its chain ID.\n */\nexport type LedgerInfo = {\n /**\n * Chain ID of the current chain\n */\n chain_id: number;\n epoch: string;\n ledger_version: string;\n oldest_ledger_version: string;\n ledger_timestamp: string;\n node_role: RoleType;\n oldest_block_height: string;\n block_height: string;\n /**\n * Git hash of the build of the API endpoint. Can be used to determine the exact\n * software version used by the API endpoint.\n */\n git_hash?: string;\n};\n\n/**\n * A Block type\n */\nexport type Block = {\n block_height: string;\n block_hash: string;\n block_timestamp: string;\n first_version: string;\n last_version: string;\n /**\n * The transactions in the block in sequential order\n */\n transactions?: Array<TransactionResponse>;\n};\n\n// REQUEST TYPES\n\n/**\n * The request payload for the GetTableItem API.\n */\nexport type TableItemRequest = {\n key_type: MoveValue;\n value_type: MoveValue;\n /**\n * The value of the table item's key\n */\n key: any;\n};\n\n/**\n * A list of supported Authentication Key schemes in Aptos, consisting of combinations of signing schemes and derive schemes.\n */\nexport type AuthenticationKeyScheme = SigningScheme | DeriveScheme;\n\n/**\n * Different schemes for signing keys used in cryptographic operations.\n */\nexport enum SigningScheme {\n /**\n * For Ed25519PublicKey\n */\n Ed25519 = 0,\n /**\n * For MultiEd25519PublicKey\n */\n MultiEd25519 = 1,\n /**\n * For SingleKey ecdsa\n */\n SingleKey = 2,\n\n MultiKey = 3,\n}\n\n/**\n * Specifies the signing schemes available for cryptographic operations.\n */\nexport enum SigningSchemeInput {\n /**\n * For Ed25519PublicKey\n */\n Ed25519 = 0,\n /**\n * For Secp256k1Ecdsa\n */\n Secp256k1Ecdsa = 2,\n}\n\n/**\n * Specifies the schemes for deriving account addresses from various data sources.\n */\nexport enum DeriveScheme {\n /**\n * Derives an address using an AUID, used for objects\n */\n DeriveAuid = 251,\n /**\n * Derives an address from another object address\n */\n DeriveObjectAddressFromObject = 252,\n /**\n * Derives an address from a GUID, used for objects\n */\n DeriveObjectAddressFromGuid = 253,\n /**\n * Derives an address from seed bytes, used for named objects\n */\n DeriveObjectAddressFromSeed = 254,\n /**\n * Derives an address from seed bytes, used for resource accounts\n */\n DeriveResourceAccountAddress = 255,\n}\n\n/**\n * Options for configuring the behavior of the waitForTransaction() function.\n */\nexport type WaitForTransactionOptions = {\n timeoutSecs?: number;\n checkSuccess?: boolean;\n // Default behavior is to wait for the indexer. Set this to false to disable waiting.\n waitForIndexer?: boolean;\n};\n\n/**\n * Input type to generate an account using the Ed25519 signing scheme.\n */\nexport type GenerateAccountWithEd25519 = {\n scheme: SigningSchemeInput.Ed25519;\n legacy: boolean;\n};\n\n/**\n * Input type to generate an account with a Single Signer using Secp256k1.\n */\nexport type GenerateAccountWithSingleSignerSecp256k1Key = {\n scheme: SigningSchemeInput.Secp256k1Ecdsa;\n legacy?: false;\n};\n\nexport type GenerateAccount = GenerateAccountWithEd25519 | GenerateAccountWithSingleSignerSecp256k1Key;\n"],"mappings":"AAWO,IAAKA,OAIVA,EAAA,KAAO,mBAIPA,EAAA,IAAM,oBAINA,EAAA,uBAAyB,6CACzBA,EAAA,kBAAoB,wCAbVA,OAAA,IAyBAC,OACVA,IAAA,KAAO,GAAP,OACAA,IAAA,GAAK,GAAL,KACAA,IAAA,IAAM,GAAN,MACAA,IAAA,KAAO,GAAP,OACAA,IAAA,QAAU,GAAV,UACAA,IAAA,OAAS,GAAT,SACAA,IAAA,OAAS,GAAT,SACAA,IAAA,OAAS,GAAT,SACAA,IAAA,IAAM,GAAN,MACAA,IAAA,IAAM,GAAN,MACAA,IAAA,KAAO,IAAP,OACAA,IAAA,UAAY,KAAZ,YACAA,IAAA,QAAU,KAAV,UAbUA,OAAA,IAoBAC,OACVA,IAAA,GAAK,GAAL,KACAA,IAAA,IAAM,GAAN,MACAA,IAAA,KAAO,GAAP,OACAA,IAAA,QAAU,GAAV,UACAA,IAAA,SAAW,GAAX,WACAA,IAAA,KAAO,GAAP,OACAA,IAAA,IAAM,GAAN,MACAA,IAAA,IAAM,GAAN,MACAA,IAAA,KAAO,GAAP,OACAA,IAAA,WAAa,GAAb,aAVUA,OAAA,IAiBAC,OACVA,IAAA,OAAS,GAAT,SACAA,IAAA,cAAgB,GAAhB,gBACAA,IAAA,SAAW,GAAX,WACAA,IAAA,QAAU,GAAV,UAJUA,OAAA,IAWAC,OACVA,IAAA,GAAK,GAAL,KADUA,OAAA,IAUAC,OACVA,IAAA,OAAS,GAAT,SACAA,IAAA,cAAgB,GAAhB,gBACAA,IAAA,MAAQ,GAAR,QAHUA,OAAA,IAUAC,OACVA,IAAA,GAAK,GAAL,KADUA,OAAA,IAQAC,OACVA,IAAA,sBAAwB,GAAxB,wBACAA,IAAA,oBAAsB,GAAtB,sBAFUA,OAAA,IASAC,OACVA,IAAA,QAAU,GAAV,UACAA,IAAA,aAAe,GAAf,eACAA,IAAA,WAAa,GAAb,aACAA,IAAA,SAAW,GAAX,WACAA,IAAA,aAAe,GAAf,eALUA,OAAA,IAYAC,OACVA,IAAA,QAAU,GAAV,UACAA,IAAA,aAAe,GAAf,eACAA,IAAA,UAAY,GAAZ,YACAA,IAAA,SAAW,GAAX,WACAA,IAAA,uBAAyB,GAAzB,yBACAA,IAAA,YAAc,GAAd,cANUA,OAAA,IAaAC,OACVA,EAAA,QAAU,UACVA,EAAA,UAAY,YACZA,EAAA,UAAY,YAHFA,OAAA,IASAC,OACVA,IAAA,QAAU,GAAV,UACAA,IAAA,UAAY,GAAZ,YACAA,IAAA,UAAY,GAAZ,YACAA,IAAA,QAAU,GAAV,UACAA,IAAA,iBAAmB,GAAnB,mBALUA,OAAA,IAQL,SAASC,EAA4BC,EAAsC,CAChF,OAAQA,EAAS,CACf,IAAK,GACH,MAAO,UACT,IAAK,GACH,MAAO,YACT,IAAK,GACH,MAAO,YACT,IAAK,GACH,MAAO,UACT,IAAK,GACH,MAAO,oBACT,QACE,MAAM,IAAI,MAAM,4BAA4B,CAChD,CACF,CAKO,IAAKC,OACVA,IAAA,QAAU,GAAV,UACAA,IAAA,UAAY,GAAZ,YACAA,IAAA,SAAW,GAAX,WACAA,IAAA,QAAU,GAAV,UAJUA,OAAA,IAUAC,OACVA,IAAA,QAAU,GAAV,UADUA,OAAA,IAOAC,OACVA,IAAA,QAAU,GAAV,UADUA,OAAA,IAOAC,OACVA,IAAA,QAAU,GAAV,UADUA,OAAA,IAOAC,OACVA,IAAA,QAAU,GAAV,UADUA,OAAA,IA8WAC,OACVA,EAAA,QAAU,sBACVA,EAAA,KAAO,mBACPA,EAAA,QAAU,sBACVA,EAAA,cAAgB,6BAChBA,EAAA,gBAAkB,+BAClBA,EAAA,UAAY,wBACZA,EAAA,cAAgB,6BAPNA,OAAA,IAgCL,SAASC,EAA6BC,EAAuE,CAClH,OAAOA,EAAS,OAAS,qBAC3B,CAQO,SAASC,EAA0BD,EAAoE,CAC5G,OAAOA,EAAS,OAAS,kBAC3B,CAQO,SAASE,EAA6BF,EAAuE,CAClH,OAAOA,EAAS,OAAS,qBAC3B,CAQO,SAASG,EACdH,EAC8C,CAC9C,OAAOA,EAAS,OAAS,4BAC3B,CAQO,SAASI,EACdJ,EACgD,CAChD,OAAOA,EAAS,OAAS,8BAC3B,CAQO,SAASK,EACdL,EAC0C,CAC1C,OAAOA,EAAS,OAAS,uBAC3B,CAQO,SAASM,EACdN,EAC8C,CAC9C,OAAOA,EAAS,OAAS,4BAC3B,CAwaO,SAASO,EAAmBC,EAA2E,CAC5G,MAAO,cAAeA,GAAaA,EAAU,OAAS,mBACxD,CAQO,SAASC,EAAqBD,EAA4E,CAC/G,MAAO,cAAeA,GAAaA,EAAU,YAAc,2BAC7D,CAQO,SAASE,EAAsBF,EAA8E,CAClH,OAAOA,EAAU,OAAS,uBAC5B,CAQO,SAASG,EAAoBH,EAA4E,CAC9G,OAAOA,EAAU,OAAS,qBAC5B,CAQO,SAASI,EACdJ,EAC+C,CAC/C,OAAOA,EAAU,OAAS,yBAC5B,CAQO,SAASK,EACdL,EAC+C,CAC/C,OAAOA,EAAU,OAAS,eAC5B,CAgQO,IAAKM,OACVA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,OAAS,SAHCA,OAAA,IASAC,OACVA,EAAA,MAAQ,QACRA,EAAA,KAAO,OACPA,EAAA,IAAM,MACNA,EAAA,KAAO,OAJGA,OAAA,IAsGAC,OACVA,EAAA,UAAY,YACZA,EAAA,UAAY,YAFFA,OAAA,IAgEAC,OAIVA,IAAA,QAAU,GAAV,UAIAA,IAAA,aAAe,GAAf,eAIAA,IAAA,UAAY,GAAZ,YAEAA,IAAA,SAAW,GAAX,WAdUA,OAAA,IAoBAC,OAIVA,IAAA,QAAU,GAAV,UAIAA,IAAA,eAAiB,GAAjB,iBARUA,OAAA,IAcAC,OAIVA,IAAA,WAAa,KAAb,aAIAA,IAAA,8BAAgC,KAAhC,gCAIAA,IAAA,4BAA8B,KAA9B,8BAIAA,IAAA,4BAA8B,KAA9B,8BAIAA,IAAA,6BAA+B,KAA/B,+BApBUA,OAAA","names":["MimeType","TypeTagVariants","ScriptTransactionArgumentVariants","TransactionPayloadVariants","TransactionInnerPayloadVariants","TransactionExecutableVariants","TransactionExtraConfigVariants","TransactionVariants","TransactionAuthenticatorVariant","AccountAuthenticatorVariant","PrivateKeyVariants","AnyPublicKeyVariant","anyPublicKeyVariantToString","variant","AnySignatureVariant","EphemeralPublicKeyVariant","EphemeralSignatureVariant","EphemeralCertificateVariant","ZkpVariant","TransactionResponseType","isPendingTransactionResponse","response","isUserTransactionResponse","isGenesisTransactionResponse","isBlockMetadataTransactionResponse","isStateCheckpointTransactionResponse","isValidatorTransactionResponse","isBlockEpilogueTransactionResponse","isEd25519Signature","signature","isSecp256k1Signature","isMultiAgentSignature","isFeePayerSignature","isMultiEd25519Signature","isSingleSenderSignature","MoveFunctionVisibility","MoveAbility","RoleType","SigningScheme","SigningSchemeInput","DeriveScheme"]}