@aptos-labs/ts-sdk 1.6.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/dist/browser/index.d.ts +133 -9
  2. package/dist/browser/index.global.js +32 -30
  3. package/dist/browser/index.global.js.map +1 -1
  4. package/dist/common/index.d.ts +133 -9
  5. package/dist/common/index.js +28 -26
  6. package/dist/common/index.js.map +1 -1
  7. package/dist/esm/api/account.mjs +1 -1
  8. package/dist/esm/api/ans.mjs +1 -1
  9. package/dist/esm/api/aptos.mjs +1 -1
  10. package/dist/esm/api/coin.mjs +1 -1
  11. package/dist/esm/api/digitalAsset.mjs +1 -1
  12. package/dist/esm/api/event.d.mts +14 -1
  13. package/dist/esm/api/event.mjs +1 -1
  14. package/dist/esm/api/faucet.mjs +1 -1
  15. package/dist/esm/api/fungibleAsset.mjs +1 -1
  16. package/dist/esm/api/general.mjs +1 -1
  17. package/dist/esm/api/index.mjs +1 -1
  18. package/dist/esm/api/staking.mjs +1 -1
  19. package/dist/esm/api/transaction.mjs +1 -1
  20. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  21. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  22. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  23. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  24. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  25. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  26. package/dist/esm/api/utils.mjs +1 -1
  27. package/dist/esm/bcs/index.mjs +1 -1
  28. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  29. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  30. package/dist/esm/chunk-2DNPRIS5.mjs +2 -0
  31. package/dist/esm/chunk-2DNPRIS5.mjs.map +1 -0
  32. package/dist/esm/{chunk-SIV47YF6.mjs → chunk-2H5Z5EHH.mjs} +2 -2
  33. package/dist/esm/{chunk-SIV47YF6.mjs.map → chunk-2H5Z5EHH.mjs.map} +1 -1
  34. package/dist/esm/{chunk-CR2ZNHVS.mjs → chunk-2WFMD6C6.mjs} +2 -2
  35. package/dist/esm/{chunk-4HULEADT.mjs → chunk-4M46AWXX.mjs} +2 -2
  36. package/dist/esm/{chunk-I7MXWMCV.mjs → chunk-6SRENFWH.mjs} +2 -2
  37. package/dist/esm/{chunk-3KTTMSMK.mjs → chunk-AFPJ2XXN.mjs} +2 -2
  38. package/dist/esm/chunk-CVEJHRAU.mjs +2 -0
  39. package/dist/esm/chunk-CVEJHRAU.mjs.map +1 -0
  40. package/dist/esm/chunk-ENDUXRTK.mjs +2 -0
  41. package/dist/esm/chunk-ENDUXRTK.mjs.map +1 -0
  42. package/dist/esm/{chunk-SFAHLWOK.mjs → chunk-ENKMOALS.mjs} +2 -2
  43. package/dist/esm/{chunk-T5JEOKV6.mjs → chunk-EUHPML5E.mjs} +2 -2
  44. package/dist/esm/{chunk-YJAE5RPX.mjs → chunk-FRLPX47J.mjs} +2 -2
  45. package/dist/esm/{chunk-TEKLKVZK.mjs → chunk-GD4ULEBC.mjs} +2 -2
  46. package/dist/esm/{chunk-3DM36HLF.mjs → chunk-GD5TZLBF.mjs} +2 -2
  47. package/dist/esm/{chunk-IKCBGNRD.mjs → chunk-JJ6Y35DF.mjs} +2 -2
  48. package/dist/esm/{chunk-MHWDJSMB.mjs → chunk-JQVT2K7G.mjs} +2 -2
  49. package/dist/esm/{chunk-7XJZHT63.mjs → chunk-KJGQ4ILY.mjs} +2 -2
  50. package/dist/esm/{chunk-W4PVDONT.mjs → chunk-LATJGGVX.mjs} +2 -2
  51. package/dist/esm/chunk-LHJSG5NE.mjs +2 -0
  52. package/dist/esm/chunk-LHJSG5NE.mjs.map +1 -0
  53. package/dist/esm/{chunk-XFMRYLII.mjs → chunk-M3WNE7MU.mjs} +2 -2
  54. package/dist/esm/chunk-MEPX7Z2Z.mjs +2 -0
  55. package/dist/esm/{chunk-3UYBNX3P.mjs.map → chunk-MEPX7Z2Z.mjs.map} +1 -1
  56. package/dist/esm/{chunk-FG6RKPA7.mjs → chunk-PIXE7MN5.mjs} +2 -2
  57. package/dist/esm/chunk-PJNPLRPR.mjs +2 -0
  58. package/dist/esm/chunk-PJNPLRPR.mjs.map +1 -0
  59. package/dist/esm/{chunk-QN3TJQIU.mjs → chunk-PMWH5IGI.mjs} +2 -2
  60. package/dist/esm/chunk-Q3HAJVCM.mjs +2 -0
  61. package/dist/esm/chunk-Q3HAJVCM.mjs.map +1 -0
  62. package/dist/esm/{chunk-X47DR2C3.mjs → chunk-Q5HK3U64.mjs} +2 -2
  63. package/dist/esm/{chunk-T5IFXLOP.mjs → chunk-QGIJNA37.mjs} +2 -2
  64. package/dist/esm/{chunk-TJJSQSO3.mjs → chunk-QRQAR6XO.mjs} +2 -2
  65. package/dist/esm/{chunk-QW5W2DWF.mjs → chunk-R56OJ4XC.mjs} +2 -2
  66. package/dist/esm/chunk-S3FBGS3W.mjs +2 -0
  67. package/dist/esm/chunk-S3FBGS3W.mjs.map +1 -0
  68. package/dist/esm/{chunk-BQSE5HHW.mjs → chunk-S4SEFF4K.mjs} +3 -1
  69. package/dist/esm/chunk-S4SEFF4K.mjs.map +1 -0
  70. package/dist/esm/chunk-S64WKSMI.mjs +2 -0
  71. package/dist/esm/chunk-S64WKSMI.mjs.map +1 -0
  72. package/dist/esm/{chunk-2RZSI3B6.mjs → chunk-SPOHAEHR.mjs} +2 -2
  73. package/dist/esm/{chunk-T7U4YWE7.mjs → chunk-SRZTA6QH.mjs} +2 -2
  74. package/dist/esm/{chunk-S4QKXXBT.mjs → chunk-SXIFL5DQ.mjs} +2 -2
  75. package/dist/esm/{chunk-S4QKXXBT.mjs.map → chunk-SXIFL5DQ.mjs.map} +1 -1
  76. package/dist/esm/{chunk-4HSVC56Q.mjs → chunk-V2FPYAK7.mjs} +2 -2
  77. package/dist/esm/{chunk-LOEBNFNC.mjs → chunk-VKZCIGKY.mjs} +2 -2
  78. package/dist/esm/{chunk-YE3DZD6T.mjs → chunk-VPQ46CAO.mjs} +2 -2
  79. package/dist/esm/{chunk-U53N6WW2.mjs → chunk-W4UDMBMU.mjs} +2 -2
  80. package/dist/esm/chunk-XBVORX5O.mjs +2 -0
  81. package/dist/esm/chunk-XBVORX5O.mjs.map +1 -0
  82. package/dist/esm/{chunk-PD5I66D6.mjs → chunk-XZYPAQCU.mjs} +2 -2
  83. package/dist/esm/{chunk-F7H662U6.mjs → chunk-Y4AKS4CY.mjs} +2 -2
  84. package/dist/esm/{chunk-WKSKGVBV.mjs → chunk-YL2EDK5M.mjs} +2 -2
  85. package/dist/esm/chunk-YL2EDK5M.mjs.map +1 -0
  86. package/dist/esm/client/core.mjs +1 -1
  87. package/dist/esm/client/get.mjs +1 -1
  88. package/dist/esm/client/index.mjs +1 -1
  89. package/dist/esm/client/post.mjs +1 -1
  90. package/dist/esm/core/account.mjs +1 -1
  91. package/dist/esm/core/accountAddress.mjs +1 -1
  92. package/dist/esm/core/authenticationKey.mjs +1 -1
  93. package/dist/esm/core/crypto/anyPublicKey.mjs +1 -1
  94. package/dist/esm/core/crypto/anySignature.mjs +1 -1
  95. package/dist/esm/core/crypto/asymmetricCrypto.mjs +1 -1
  96. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  97. package/dist/esm/core/crypto/index.mjs +1 -1
  98. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  99. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  100. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  101. package/dist/esm/core/index.mjs +1 -1
  102. package/dist/esm/index.d.mts +2 -2
  103. package/dist/esm/index.mjs +1 -1
  104. package/dist/esm/internal/account.d.mts +1 -1
  105. package/dist/esm/internal/account.mjs +1 -1
  106. package/dist/esm/internal/ans.d.mts +1 -1
  107. package/dist/esm/internal/ans.mjs +1 -1
  108. package/dist/esm/internal/coin.d.mts +3 -3
  109. package/dist/esm/internal/coin.mjs +1 -1
  110. package/dist/esm/internal/digitalAsset.d.mts +6 -6
  111. package/dist/esm/internal/digitalAsset.mjs +1 -1
  112. package/dist/esm/internal/event.d.mts +8 -3
  113. package/dist/esm/internal/event.mjs +1 -1
  114. package/dist/esm/internal/faucet.d.mts +3 -3
  115. package/dist/esm/internal/faucet.mjs +1 -1
  116. package/dist/esm/internal/fungibleAsset.d.mts +1 -1
  117. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  118. package/dist/esm/internal/general.mjs +1 -1
  119. package/dist/esm/internal/staking.d.mts +2 -2
  120. package/dist/esm/internal/staking.mjs +1 -1
  121. package/dist/esm/internal/transaction.mjs +1 -1
  122. package/dist/esm/internal/transactionSubmission.d.mts +3 -3
  123. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  124. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  125. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  126. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  127. package/dist/esm/transactions/index.d.mts +1 -1
  128. package/dist/esm/transactions/index.mjs +1 -1
  129. package/dist/esm/transactions/instances/index.mjs +1 -1
  130. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  131. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  132. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  133. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  134. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  135. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  136. package/dist/esm/transactions/management/index.mjs +1 -1
  137. package/dist/esm/transactions/management/transactionWorker.d.mts +7 -1
  138. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  139. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  140. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  141. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  142. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +3 -3
  143. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  144. package/dist/esm/transactions/typeTag/index.d.mts +1 -0
  145. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  146. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  147. package/dist/esm/transactions/types.d.mts +9 -1
  148. package/dist/esm/types/generated/operations.d.mts +6 -0
  149. package/dist/esm/types/generated/queries.d.mts +6 -6
  150. package/dist/esm/types/generated/queries.mjs +1 -1
  151. package/dist/esm/types/generated/types.d.mts +594 -56
  152. package/dist/esm/types/generated/types.mjs +1 -1
  153. package/dist/esm/types/generated/types.mjs.map +1 -1
  154. package/dist/esm/types/index.d.mts +35 -6
  155. package/dist/esm/types/index.mjs +1 -1
  156. package/dist/esm/version.d.mts +1 -1
  157. package/dist/esm/version.mjs +1 -1
  158. package/package.json +1 -1
  159. package/src/api/digitalAsset.ts +4 -4
  160. package/src/api/event.ts +27 -1
  161. package/src/internal/coin.ts +9 -4
  162. package/src/internal/digitalAsset.ts +197 -60
  163. package/src/internal/event.ts +33 -1
  164. package/src/internal/fungibleAsset.ts +15 -3
  165. package/src/internal/queries/currentTokenOwnershipFieldsFragment.graphql +1 -0
  166. package/src/internal/queries/getTokenData.graphql +1 -0
  167. package/src/internal/transactionSubmission.ts +40 -14
  168. package/src/transactions/management/transactionWorker.ts +9 -5
  169. package/src/transactions/transactionBuilder/transactionBuilder.ts +9 -19
  170. package/src/transactions/typeTag/index.ts +4 -0
  171. package/src/transactions/typeTag/parser.ts +1 -1
  172. package/src/transactions/types.ts +11 -0
  173. package/src/types/generated/operations.ts +6 -0
  174. package/src/types/generated/queries.ts +2 -0
  175. package/src/types/generated/types.ts +662 -55
  176. package/src/types/index.ts +40 -4
  177. package/src/version.ts +1 -1
  178. package/dist/esm/chunk-223IHRAD.mjs +0 -2
  179. package/dist/esm/chunk-223IHRAD.mjs.map +0 -1
  180. package/dist/esm/chunk-3UYBNX3P.mjs +0 -2
  181. package/dist/esm/chunk-5FERAW7D.mjs +0 -2
  182. package/dist/esm/chunk-5FERAW7D.mjs.map +0 -1
  183. package/dist/esm/chunk-6GL6X2IR.mjs +0 -2
  184. package/dist/esm/chunk-6GL6X2IR.mjs.map +0 -1
  185. package/dist/esm/chunk-ALFESCPU.mjs +0 -2
  186. package/dist/esm/chunk-ALFESCPU.mjs.map +0 -1
  187. package/dist/esm/chunk-BQSE5HHW.mjs.map +0 -1
  188. package/dist/esm/chunk-CBLQTKVM.mjs +0 -2
  189. package/dist/esm/chunk-CBLQTKVM.mjs.map +0 -1
  190. package/dist/esm/chunk-HI6QP2FB.mjs +0 -2
  191. package/dist/esm/chunk-HI6QP2FB.mjs.map +0 -1
  192. package/dist/esm/chunk-KXLDXZWI.mjs +0 -2
  193. package/dist/esm/chunk-KXLDXZWI.mjs.map +0 -1
  194. package/dist/esm/chunk-SUIDAC5B.mjs +0 -2
  195. package/dist/esm/chunk-SUIDAC5B.mjs.map +0 -1
  196. package/dist/esm/chunk-WKSKGVBV.mjs.map +0 -1
  197. package/dist/esm/chunk-Z67MKEK7.mjs +0 -2
  198. package/dist/esm/chunk-Z67MKEK7.mjs.map +0 -1
  199. /package/dist/esm/{chunk-CR2ZNHVS.mjs.map → chunk-2WFMD6C6.mjs.map} +0 -0
  200. /package/dist/esm/{chunk-4HULEADT.mjs.map → chunk-4M46AWXX.mjs.map} +0 -0
  201. /package/dist/esm/{chunk-I7MXWMCV.mjs.map → chunk-6SRENFWH.mjs.map} +0 -0
  202. /package/dist/esm/{chunk-3KTTMSMK.mjs.map → chunk-AFPJ2XXN.mjs.map} +0 -0
  203. /package/dist/esm/{chunk-SFAHLWOK.mjs.map → chunk-ENKMOALS.mjs.map} +0 -0
  204. /package/dist/esm/{chunk-T5JEOKV6.mjs.map → chunk-EUHPML5E.mjs.map} +0 -0
  205. /package/dist/esm/{chunk-YJAE5RPX.mjs.map → chunk-FRLPX47J.mjs.map} +0 -0
  206. /package/dist/esm/{chunk-TEKLKVZK.mjs.map → chunk-GD4ULEBC.mjs.map} +0 -0
  207. /package/dist/esm/{chunk-3DM36HLF.mjs.map → chunk-GD5TZLBF.mjs.map} +0 -0
  208. /package/dist/esm/{chunk-IKCBGNRD.mjs.map → chunk-JJ6Y35DF.mjs.map} +0 -0
  209. /package/dist/esm/{chunk-MHWDJSMB.mjs.map → chunk-JQVT2K7G.mjs.map} +0 -0
  210. /package/dist/esm/{chunk-7XJZHT63.mjs.map → chunk-KJGQ4ILY.mjs.map} +0 -0
  211. /package/dist/esm/{chunk-W4PVDONT.mjs.map → chunk-LATJGGVX.mjs.map} +0 -0
  212. /package/dist/esm/{chunk-XFMRYLII.mjs.map → chunk-M3WNE7MU.mjs.map} +0 -0
  213. /package/dist/esm/{chunk-FG6RKPA7.mjs.map → chunk-PIXE7MN5.mjs.map} +0 -0
  214. /package/dist/esm/{chunk-QN3TJQIU.mjs.map → chunk-PMWH5IGI.mjs.map} +0 -0
  215. /package/dist/esm/{chunk-X47DR2C3.mjs.map → chunk-Q5HK3U64.mjs.map} +0 -0
  216. /package/dist/esm/{chunk-T5IFXLOP.mjs.map → chunk-QGIJNA37.mjs.map} +0 -0
  217. /package/dist/esm/{chunk-TJJSQSO3.mjs.map → chunk-QRQAR6XO.mjs.map} +0 -0
  218. /package/dist/esm/{chunk-QW5W2DWF.mjs.map → chunk-R56OJ4XC.mjs.map} +0 -0
  219. /package/dist/esm/{chunk-2RZSI3B6.mjs.map → chunk-SPOHAEHR.mjs.map} +0 -0
  220. /package/dist/esm/{chunk-T7U4YWE7.mjs.map → chunk-SRZTA6QH.mjs.map} +0 -0
  221. /package/dist/esm/{chunk-4HSVC56Q.mjs.map → chunk-V2FPYAK7.mjs.map} +0 -0
  222. /package/dist/esm/{chunk-LOEBNFNC.mjs.map → chunk-VKZCIGKY.mjs.map} +0 -0
  223. /package/dist/esm/{chunk-YE3DZD6T.mjs.map → chunk-VPQ46CAO.mjs.map} +0 -0
  224. /package/dist/esm/{chunk-U53N6WW2.mjs.map → chunk-W4UDMBMU.mjs.map} +0 -0
  225. /package/dist/esm/{chunk-PD5I66D6.mjs.map → chunk-XZYPAQCU.mjs.map} +0 -0
  226. /package/dist/esm/{chunk-F7H662U6.mjs.map → chunk-Y4AKS4CY.mjs.map} +0 -0
@@ -252,15 +252,17 @@ declare enum TransactionResponseType {
252
252
  User = "user_transaction",
253
253
  Genesis = "genesis_transaction",
254
254
  BlockMetadata = "block_metadata_transaction",
255
- StateCheckpoint = "state_checkpoint_transaction"
255
+ StateCheckpoint = "state_checkpoint_transaction",
256
+ Validator = "validator_transaction"
256
257
  }
257
258
  type TransactionResponse = PendingTransactionResponse | CommittedTransactionResponse;
258
- type CommittedTransactionResponse = UserTransactionResponse | GenesisTransactionResponse | BlockMetadataTransactionResponse | StateCheckpointTransactionResponse;
259
+ type CommittedTransactionResponse = UserTransactionResponse | GenesisTransactionResponse | BlockMetadataTransactionResponse | StateCheckpointTransactionResponse | ValidatorTransactionResponse;
259
260
  declare function isPendingTransactionResponse(response: TransactionResponse): response is PendingTransactionResponse;
260
261
  declare function isUserTransactionResponse(response: TransactionResponse): response is UserTransactionResponse;
261
262
  declare function isGenesisTransactionResponse(response: TransactionResponse): response is GenesisTransactionResponse;
262
263
  declare function isBlockMetadataTransactionResponse(response: TransactionResponse): response is BlockMetadataTransactionResponse;
263
264
  declare function isStateCheckpointTransactionResponse(response: TransactionResponse): response is StateCheckpointTransactionResponse;
265
+ declare function isValidatorTransactionResponse(response: TransactionResponse): response is ValidatorTransactionResponse;
264
266
  type PendingTransactionResponse = {
265
267
  type: TransactionResponseType.Pending;
266
268
  hash: string;
@@ -278,7 +280,7 @@ type UserTransactionResponse = {
278
280
  hash: string;
279
281
  state_change_hash: string;
280
282
  event_root_hash: string;
281
- state_checkpoint_hash?: string;
283
+ state_checkpoint_hash: string | null;
282
284
  gas_used: string;
283
285
  /**
284
286
  * Whether the transaction was successful
@@ -339,7 +341,7 @@ type BlockMetadataTransactionResponse = {
339
341
  hash: string;
340
342
  state_change_hash: string;
341
343
  event_root_hash: string;
342
- state_checkpoint_hash?: string;
344
+ state_checkpoint_hash: string | null;
343
345
  gas_used: string;
344
346
  /**
345
347
  * Whether the transaction was successful
@@ -378,7 +380,30 @@ type StateCheckpointTransactionResponse = {
378
380
  hash: string;
379
381
  state_change_hash: string;
380
382
  event_root_hash: string;
381
- state_checkpoint_hash?: string;
383
+ state_checkpoint_hash: string | null;
384
+ gas_used: string;
385
+ /**
386
+ * Whether the transaction was successful
387
+ */
388
+ success: boolean;
389
+ /**
390
+ * The VM status of the transaction, can tell useful information in a failure
391
+ */
392
+ vm_status: string;
393
+ accumulator_root_hash: string;
394
+ /**
395
+ * Final state of resources changed by the transaction
396
+ */
397
+ changes: Array<WriteSetChange>;
398
+ timestamp: string;
399
+ };
400
+ type ValidatorTransactionResponse = {
401
+ type: TransactionResponseType.Validator;
402
+ version: string;
403
+ hash: string;
404
+ state_change_hash: string;
405
+ event_root_hash: string;
406
+ state_checkpoint_hash: string | null;
382
407
  gas_used: string;
383
408
  /**
384
409
  * Whether the transaction was successful
@@ -393,6 +418,10 @@ type StateCheckpointTransactionResponse = {
393
418
  * Final state of resources changed by the transaction
394
419
  */
395
420
  changes: Array<WriteSetChange>;
421
+ /**
422
+ * The events emitted by the validator transaction
423
+ */
424
+ events: Array<Event>;
396
425
  timestamp: string;
397
426
  };
398
427
  /**
@@ -901,4 +930,4 @@ type GenerateAccountWithSingleSignerSecp256k1Key = {
901
930
  };
902
931
  type GenerateAccount = GenerateAccountWithEd25519 | GenerateAccountWithSingleSignerSecp256k1Key;
903
932
 
904
- export { AccountAuthenticatorVariant, type AccountData, type AccountSignature, type AnyNumber, AnyPublicKeyVariant, AnySignatureVariant, type AptosRequest, type AptosSettings, type AuthenticationKeyScheme, type Block, type BlockMetadataTransactionResponse, type Client, type ClientConfig, type ClientRequest, type ClientResponse, type CommittedTransactionResponse, type DecodedTableData, type DeletedTableData, DeriveScheme, type DirectWriteSet, type EntryFunctionPayloadResponse, type Event, type EventGuid, type GasEstimation, type GenerateAccount, type GenerateAccountWithEd25519, type GenerateAccountWithSingleSignerSecp256k1Key, type GenesisPayload, type GenesisTransactionResponse, type HexInput, type InputViewRequestData, type LedgerInfo, type LedgerVersionArg, MimeType, MoveAbility, type MoveAddressType, type MoveFunction, type MoveFunctionGenericTypeParam, type MoveFunctionId, MoveFunctionVisibility, type MoveModule, type MoveModuleBytecode, type MoveModuleId, type MoveObjectType, type MoveOptionType, type MoveResource, type MoveScriptBytecode, type MoveStruct, type MoveStructField, type MoveStructId, type MoveStructType, type MoveType, type MoveUint128Type, type MoveUint16Type, type MoveUint256Type, type MoveUint32Type, type MoveUint64Type, type MoveUint8Type, type MoveValue, type MultisigPayloadResponse, OrderBy, type OrderByArg, type PaginationArgs, type PendingTransactionResponse, RoleType, type ScriptPayloadResponse, ScriptTransactionArgumentVariants, type ScriptWriteSet, SigningScheme, SigningSchemeInput, type StateCheckpointTransactionResponse, type TableItemRequest, TokenStandard, type TokenStandardArg, TransactionAuthenticatorVariant, type TransactionEd25519Signature, type TransactionFeePayerSignature, type TransactionMultiAgentSignature, type TransactionMultiEd25519Signature, type TransactionPayloadResponse, TransactionPayloadVariants, type TransactionResponse, TransactionResponseType, type TransactionSecp256k1Signature, type TransactionSignature, TransactionVariants, TypeTagVariants, type Uint128, type Uint16, type Uint256, type Uint32, type Uint64, type Uint8, type UserTransactionResponse, type ViewRequest, type WaitForTransactionOptions, type WhereArg, type WriteSet, type WriteSetChange, type WriteSetChangeDeleteModule, type WriteSetChangeDeleteResource, type WriteSetChangeDeleteTableItem, type WriteSetChangeWriteModule, type WriteSetChangeWriteResource, type WriteSetChangeWriteTableItem, isBlockMetadataTransactionResponse, isEd25519Signature, isFeePayerSignature, isGenesisTransactionResponse, isMultiAgentSignature, isMultiEd25519Signature, isPendingTransactionResponse, isSecp256k1Signature, isStateCheckpointTransactionResponse, isUserTransactionResponse };
933
+ export { AccountAuthenticatorVariant, type AccountData, type AccountSignature, type AnyNumber, AnyPublicKeyVariant, AnySignatureVariant, type AptosRequest, type AptosSettings, type AuthenticationKeyScheme, type Block, type BlockMetadataTransactionResponse, type Client, type ClientConfig, type ClientRequest, type ClientResponse, type CommittedTransactionResponse, type DecodedTableData, type DeletedTableData, DeriveScheme, type DirectWriteSet, type EntryFunctionPayloadResponse, type Event, type EventGuid, type GasEstimation, type GenerateAccount, type GenerateAccountWithEd25519, type GenerateAccountWithSingleSignerSecp256k1Key, type GenesisPayload, type GenesisTransactionResponse, type HexInput, type InputViewRequestData, type LedgerInfo, type LedgerVersionArg, MimeType, MoveAbility, type MoveAddressType, type MoveFunction, type MoveFunctionGenericTypeParam, type MoveFunctionId, MoveFunctionVisibility, type MoveModule, type MoveModuleBytecode, type MoveModuleId, type MoveObjectType, type MoveOptionType, type MoveResource, type MoveScriptBytecode, type MoveStruct, type MoveStructField, type MoveStructId, type MoveStructType, type MoveType, type MoveUint128Type, type MoveUint16Type, type MoveUint256Type, type MoveUint32Type, type MoveUint64Type, type MoveUint8Type, type MoveValue, type MultisigPayloadResponse, OrderBy, type OrderByArg, type PaginationArgs, type PendingTransactionResponse, RoleType, type ScriptPayloadResponse, ScriptTransactionArgumentVariants, type ScriptWriteSet, SigningScheme, SigningSchemeInput, type StateCheckpointTransactionResponse, type TableItemRequest, TokenStandard, type TokenStandardArg, TransactionAuthenticatorVariant, type TransactionEd25519Signature, type TransactionFeePayerSignature, type TransactionMultiAgentSignature, type TransactionMultiEd25519Signature, type TransactionPayloadResponse, TransactionPayloadVariants, type TransactionResponse, TransactionResponseType, type TransactionSecp256k1Signature, type TransactionSignature, TransactionVariants, TypeTagVariants, type Uint128, type Uint16, type Uint256, type Uint32, type Uint64, type Uint8, type UserTransactionResponse, type ValidatorTransactionResponse, type ViewRequest, type WaitForTransactionOptions, type WhereArg, type WriteSet, type WriteSetChange, type WriteSetChangeDeleteModule, type WriteSetChangeDeleteResource, type WriteSetChangeDeleteTableItem, type WriteSetChangeWriteModule, type WriteSetChangeWriteResource, type WriteSetChangeWriteTableItem, isBlockMetadataTransactionResponse, isEd25519Signature, isFeePayerSignature, isGenesisTransactionResponse, isMultiAgentSignature, isMultiEd25519Signature, isPendingTransactionResponse, isSecp256k1Signature, isStateCheckpointTransactionResponse, isUserTransactionResponse, isValidatorTransactionResponse };
@@ -1,2 +1,2 @@
1
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-ALFESCPU.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-FVA2OPG4.mjs";export{g as AccountAuthenticatorVariant,h as AnyPublicKeyVariant,i as AnySignatureVariant,z as DeriveScheme,a as MimeType,v as MoveAbility,u as MoveFunctionVisibility,w as RoleType,c as ScriptTransactionArgumentVariants,x as SigningScheme,y as SigningSchemeInput,f as TransactionAuthenticatorVariant,d as TransactionPayloadVariants,j as TransactionResponseType,e as TransactionVariants,b as TypeTagVariants,n as isBlockMetadataTransactionResponse,p as isEd25519Signature,s as isFeePayerSignature,m as isGenesisTransactionResponse,r as isMultiAgentSignature,t as isMultiEd25519Signature,k as isPendingTransactionResponse,q as isSecp256k1Signature,o as isStateCheckpointTransactionResponse,l as isUserTransactionResponse};
1
+ import{A,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-CVEJHRAU.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-FVA2OPG4.mjs";export{g as AccountAuthenticatorVariant,h as AnyPublicKeyVariant,i as AnySignatureVariant,A as DeriveScheme,a as MimeType,w as MoveAbility,v as MoveFunctionVisibility,x as RoleType,c as ScriptTransactionArgumentVariants,y as SigningScheme,z as SigningSchemeInput,f as TransactionAuthenticatorVariant,d as TransactionPayloadVariants,j as TransactionResponseType,e as TransactionVariants,b as TypeTagVariants,n as isBlockMetadataTransactionResponse,q as isEd25519Signature,t as isFeePayerSignature,m as isGenesisTransactionResponse,s as isMultiAgentSignature,u as isMultiEd25519Signature,k as isPendingTransactionResponse,r as isSecp256k1Signature,o as isStateCheckpointTransactionResponse,l as isUserTransactionResponse,p as isValidatorTransactionResponse};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -3,6 +3,6 @@
3
3
  *
4
4
  * hardcoded for now, we would want to have it injected dynamically
5
5
  */
6
- declare const VERSION = "1.6.0";
6
+ declare const VERSION = "1.8.0";
7
7
 
8
8
  export { VERSION };
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-3UYBNX3P.mjs";import"./chunk-FVA2OPG4.mjs";export{a as VERSION};
1
+ import{a}from"./chunk-MEPX7Z2Z.mjs";import"./chunk-FVA2OPG4.mjs";export{a as VERSION};
2
2
  //# sourceMappingURL=version.mjs.map
package/package.json CHANGED
@@ -84,5 +84,5 @@
84
84
  "typedoc": "^0.25.4",
85
85
  "typescript": "^5.3.3"
86
86
  },
87
- "version": "1.6.0"
87
+ "version": "1.8.0"
88
88
  }
@@ -21,7 +21,7 @@ import {
21
21
  burnDigitalAssetTransaction,
22
22
  CreateCollectionOptions,
23
23
  createCollectionTransaction,
24
- freezeDigitalAssetTransaferTransaction,
24
+ freezeDigitalAssetTransferTransaction,
25
25
  getCollectionData,
26
26
  getCollectionId,
27
27
  getCurrentDigitalAssetOwnership,
@@ -37,7 +37,7 @@ import {
37
37
  setDigitalAssetNameTransaction,
38
38
  setDigitalAssetURITransaction,
39
39
  transferDigitalAssetTransaction,
40
- unfreezeDigitalAssetTransaferTransaction,
40
+ unfreezeDigitalAssetTransferTransaction,
41
41
  updateDigitalAssetPropertyTransaction,
42
42
  updateDigitalAssetTypedPropertyTransaction,
43
43
  } from "../internal/digitalAsset";
@@ -331,7 +331,7 @@ export class DigitalAsset {
331
331
  digitalAssetType?: MoveStructId;
332
332
  options?: InputGenerateTransactionOptions;
333
333
  }) {
334
- return freezeDigitalAssetTransaferTransaction({ aptosConfig: this.config, ...args });
334
+ return freezeDigitalAssetTransferTransaction({ aptosConfig: this.config, ...args });
335
335
  }
336
336
 
337
337
  /**
@@ -348,7 +348,7 @@ export class DigitalAsset {
348
348
  digitalAssetType?: MoveStructId;
349
349
  options?: InputGenerateTransactionOptions;
350
350
  }) {
351
- return unfreezeDigitalAssetTransaferTransaction({ aptosConfig: this.config, ...args });
351
+ return unfreezeDigitalAssetTransferTransaction({ aptosConfig: this.config, ...args });
352
352
  }
353
353
 
354
354
  /**
package/src/api/event.ts CHANGED
@@ -1,7 +1,12 @@
1
1
  // Copyright © Aptos Foundation
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
- import { getAccountEventsByCreationNumber, getAccountEventsByEventType, getEvents } from "../internal/event";
4
+ import {
5
+ getAccountEventsByCreationNumber,
6
+ getAccountEventsByEventType,
7
+ getModuleEventsByEventType,
8
+ getEvents,
9
+ } from "../internal/event";
5
10
  import { AnyNumber, GetEventsResponse, MoveStructId, OrderByArg, PaginationArgs, WhereArg } from "../types";
6
11
  import { EventsBoolExp } from "../types/generated/types";
7
12
  import { AccountAddressInput } from "../core";
@@ -15,6 +20,27 @@ import { waitForIndexerOnVersion } from "./utils";
15
20
  export class Event {
16
21
  constructor(readonly config: AptosConfig) {}
17
22
 
23
+ /**
24
+ * Get module events by event type
25
+ *
26
+ * @param args.eventType - The event type
27
+ * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
28
+ *
29
+ * @returns Promise<GetEventsResponse>
30
+ */
31
+ async getModuleEventsByEventType(args: {
32
+ eventType: MoveStructId;
33
+ minimumLedgerVersion?: AnyNumber;
34
+ options?: PaginationArgs & OrderByArg<GetEventsResponse[0]>;
35
+ }): Promise<GetEventsResponse> {
36
+ await waitForIndexerOnVersion({
37
+ config: this.config,
38
+ minimumLedgerVersion: args.minimumLedgerVersion,
39
+ processorType: ProcessorType.EVENTS_PROCESSOR,
40
+ });
41
+ return getModuleEventsByEventType({ aptosConfig: this.config, ...args });
42
+ }
43
+
18
44
  /**
19
45
  * Get events by creation number and an account address
20
46
  *
@@ -1,9 +1,15 @@
1
1
  import { AptosConfig } from "../api/aptosConfig";
2
2
  import { AccountAddressInput } from "../core";
3
- import { InputGenerateTransactionOptions, SimpleTransaction } from "../transactions/types";
3
+ import { EntryFunctionABI, InputGenerateTransactionOptions, SimpleTransaction } from "../transactions/types";
4
4
  import { AnyNumber, MoveStructId } from "../types";
5
5
  import { APTOS_COIN } from "../utils/const";
6
6
  import { generateTransaction } from "./transactionSubmission";
7
+ import { TypeTagAddress, TypeTagU64 } from "../transactions";
8
+
9
+ const coinTransferAbi: EntryFunctionABI = {
10
+ typeParameters: [{ constraints: [] }],
11
+ parameters: [new TypeTagAddress(), new TypeTagU64()],
12
+ };
7
13
 
8
14
  export async function transferCoinTransaction(args: {
9
15
  aptosConfig: AptosConfig;
@@ -15,16 +21,15 @@ export async function transferCoinTransaction(args: {
15
21
  }): Promise<SimpleTransaction> {
16
22
  const { aptosConfig, sender, recipient, amount, coinType, options } = args;
17
23
  const coinStructType = coinType ?? APTOS_COIN;
18
- const transaction = await generateTransaction({
24
+ return generateTransaction({
19
25
  aptosConfig,
20
26
  sender,
21
27
  data: {
22
28
  function: "0x1::aptos_account::transfer_coins",
23
29
  typeArguments: [coinStructType],
24
30
  functionArguments: [recipient, amount],
31
+ abi: coinTransferAbi,
25
32
  },
26
33
  options,
27
34
  });
28
-
29
- return transaction;
30
35
  }