@aptos-labs/ts-sdk 1.31.0 → 1.32.1
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.
- package/README.md +1 -1
- package/dist/common/{accountAddress-DnSqjhSl.d.ts → accountAddress-6RqI8Aam.d.ts} +144 -63
- package/dist/common/chunk-F43XVDYJ.js +2 -0
- package/dist/common/chunk-F43XVDYJ.js.map +1 -0
- package/dist/common/cli/index.d.ts +1 -1
- package/dist/common/cli/index.js +1 -1
- package/dist/common/cli/index.js.map +1 -1
- package/dist/common/index.d.ts +446 -111
- package/dist/common/index.js +36 -29
- package/dist/common/index.js.map +1 -1
- package/dist/esm/{Ed25519Account-DpH9qAcg.d.mts → Ed25519Account-B3xHXAQe.d.mts} +2 -2
- package/dist/esm/account/AbstractKeylessAccount.d.mts +85 -14
- package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
- package/dist/esm/account/Account.d.mts +4 -4
- package/dist/esm/account/Account.mjs +1 -1
- package/dist/esm/account/Ed25519Account.d.mts +4 -4
- package/dist/esm/account/Ed25519Account.mjs +1 -1
- package/dist/esm/account/EphemeralKeyPair.d.mts +3 -3
- package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
- package/dist/esm/account/FederatedKeylessAccount.d.mts +56 -8
- package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
- package/dist/esm/account/KeylessAccount.d.mts +28 -11
- package/dist/esm/account/KeylessAccount.mjs +1 -1
- package/dist/esm/account/MultiKeyAccount.d.mts +22 -10
- package/dist/esm/account/MultiKeyAccount.mjs +1 -1
- package/dist/esm/account/SingleKeyAccount.d.mts +4 -4
- package/dist/esm/account/SingleKeyAccount.mjs +1 -1
- package/dist/esm/account/index.d.mts +5 -5
- package/dist/esm/account/index.mjs +1 -1
- package/dist/esm/api/account.d.mts +5 -5
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.d.mts +3 -3
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +4 -4
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/aptosConfig.d.mts +1 -1
- package/dist/esm/api/aptosConfig.mjs +1 -1
- package/dist/esm/api/coin.d.mts +5 -5
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.d.mts +5 -5
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/event.d.mts +3 -3
- package/dist/esm/api/event.mjs +1 -1
- package/dist/esm/api/faucet.d.mts +2 -2
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.d.mts +5 -5
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.d.mts +3 -3
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +4 -4
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/keyless.d.mts +7 -7
- package/dist/esm/api/keyless.mjs +1 -1
- package/dist/esm/api/object.d.mts +3 -3
- package/dist/esm/api/object.mjs +1 -1
- package/dist/esm/api/staking.d.mts +3 -3
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/table.d.mts +3 -3
- package/dist/esm/api/table.mjs +1 -1
- package/dist/esm/api/transaction.d.mts +3 -3
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.d.mts +3 -3
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.d.mts +4 -4
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.d.mts +4 -4
- package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
- package/dist/esm/api/transactionSubmission/simulate.d.mts +3 -3
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.d.mts +3 -3
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.d.mts +2 -2
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/consts.d.mts +2 -2
- package/dist/esm/bcs/deserializer.d.mts +35 -27
- package/dist/esm/bcs/deserializer.mjs +1 -1
- package/dist/esm/bcs/index.d.mts +2 -2
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/bcs/serializable/entryFunctionBytes.d.mts +2 -2
- package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/fixedBytes.d.mts +2 -2
- package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/movePrimitives.d.mts +2 -2
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.d.mts +11 -12
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/bcs/serializer.d.mts +13 -13
- package/dist/esm/bcs/serializer.mjs +1 -1
- package/dist/esm/{chunk-22ZSW5EN.mjs → chunk-26WX3UFP.mjs} +2 -2
- package/dist/esm/{chunk-A2AEFKXS.mjs → chunk-2E3BT4YW.mjs} +2 -2
- package/dist/esm/{chunk-VYMRIKUV.mjs → chunk-2LQ4FTSR.mjs} +2 -2
- package/dist/esm/{chunk-L5J3V3HW.mjs → chunk-2REHS35S.mjs} +2 -2
- package/dist/esm/{chunk-CC7VOPYH.mjs → chunk-2YTHKFJZ.mjs} +2 -2
- package/dist/esm/{chunk-6FLHGOKP.mjs → chunk-42H7WETG.mjs} +2 -2
- package/dist/esm/{chunk-RBJNSUSU.mjs → chunk-4IQZOAN7.mjs} +2 -2
- package/dist/esm/{chunk-ZPQUCT22.mjs → chunk-4J2JYRV3.mjs} +2 -2
- package/dist/esm/chunk-4O5XDQDO.mjs +2 -0
- package/dist/esm/chunk-5B3SMBXQ.mjs +2 -0
- package/dist/esm/{chunk-5N6KJ7KS.mjs → chunk-5KCKWL2C.mjs} +2 -2
- package/dist/esm/{chunk-IFXUWUP2.mjs → chunk-5O3RHPER.mjs} +2 -2
- package/dist/esm/{chunk-PCLU4KLY.mjs → chunk-6ZOVTYLJ.mjs} +2 -2
- package/dist/esm/chunk-7ECCT6PK.mjs +1 -0
- package/dist/esm/{chunk-RAJTNQNL.mjs → chunk-7OHMMGS6.mjs} +2 -2
- package/dist/esm/{chunk-ZPIMARUG.mjs → chunk-A3USS2NC.mjs} +2 -2
- package/dist/esm/{chunk-NODYW7DM.mjs → chunk-ACVIE7IE.mjs} +2 -2
- package/dist/esm/{chunk-RNRNGJDA.mjs → chunk-AGEJNSEX.mjs} +2 -2
- package/dist/esm/{chunk-QQIVWB6G.mjs → chunk-AJ5JHBAE.mjs} +2 -2
- package/dist/esm/{chunk-QQIVWB6G.mjs.map → chunk-AJ5JHBAE.mjs.map} +1 -1
- package/dist/esm/{chunk-PRZ7AIGA.mjs → chunk-AKIO3OIT.mjs} +2 -2
- package/dist/esm/{chunk-KRVLR3L4.mjs → chunk-AOROYJ74.mjs} +2 -2
- package/dist/esm/chunk-AVZYJAXR.mjs +2 -0
- package/dist/esm/chunk-AVZYJAXR.mjs.map +1 -0
- package/dist/esm/{chunk-BG2TZI3H.mjs → chunk-BP45UJII.mjs} +2 -2
- package/dist/esm/{chunk-JGNMNCQB.mjs → chunk-BRV3RLKW.mjs} +2 -2
- package/dist/esm/{chunk-EE7GDBA5.mjs → chunk-CEW2NI3K.mjs} +2 -2
- package/dist/esm/{chunk-RNJHULIT.mjs → chunk-CPKG25HX.mjs} +2 -2
- package/dist/esm/chunk-CPKG25HX.mjs.map +1 -0
- package/dist/esm/chunk-D52UKPQF.mjs +2 -0
- package/dist/esm/chunk-D52UKPQF.mjs.map +1 -0
- package/dist/esm/{chunk-4LKLOUMG.mjs → chunk-D54FD6XE.mjs} +2 -2
- package/dist/esm/{chunk-MK2QAHXC.mjs → chunk-DYELAVMR.mjs} +2 -2
- package/dist/esm/{chunk-MSHZ4FWB.mjs → chunk-E2GPZCQI.mjs} +2 -2
- package/dist/esm/{chunk-MSHZ4FWB.mjs.map → chunk-E2GPZCQI.mjs.map} +1 -1
- package/dist/esm/chunk-EJKX6MGV.mjs +2 -0
- package/dist/esm/{chunk-WV2VJQDS.mjs.map → chunk-EJKX6MGV.mjs.map} +1 -1
- package/dist/esm/{chunk-OXM4BVAY.mjs → chunk-ERDYU5YQ.mjs} +2 -2
- package/dist/esm/{chunk-7JK7UG4E.mjs → chunk-ETF76XA3.mjs} +2 -2
- package/dist/esm/chunk-F45G3GP3.mjs +7 -0
- package/dist/esm/chunk-F45G3GP3.mjs.map +1 -0
- package/dist/esm/chunk-FD6FGKYY.mjs +1 -0
- package/dist/esm/{chunk-LDZPO76C.mjs → chunk-FFCCBAEZ.mjs} +2 -2
- package/dist/esm/chunk-FYYTCJS4.mjs +2 -0
- package/dist/esm/chunk-FYYTCJS4.mjs.map +1 -0
- package/dist/esm/{chunk-OAEDFM7T.mjs → chunk-GX4CYRK4.mjs} +2 -2
- package/dist/esm/{chunk-UCRROMZN.mjs → chunk-GZBVXXUL.mjs} +2 -2
- package/dist/esm/{chunk-AT2ZGTXQ.mjs → chunk-H7AALSJ7.mjs} +2 -2
- package/dist/esm/{chunk-EUGLLGYW.mjs → chunk-HBWIDPNN.mjs} +2 -2
- package/dist/esm/{chunk-BVVHGSWC.mjs → chunk-HPZQGMSH.mjs} +2 -2
- package/dist/esm/{chunk-T5BCTWGK.mjs → chunk-I5GENJBA.mjs} +2 -2
- package/dist/esm/chunk-I5GENJBA.mjs.map +1 -0
- package/dist/esm/{chunk-73GCGRFW.mjs → chunk-II26BNYA.mjs} +2 -2
- package/dist/esm/{chunk-BOWPP6YG.mjs → chunk-IQ4SCMB6.mjs} +2 -2
- package/dist/esm/chunk-IUSAYAEI.mjs +4 -0
- package/dist/esm/{chunk-HM5HITUC.mjs.map → chunk-IUSAYAEI.mjs.map} +1 -1
- package/dist/esm/{chunk-J245N3XF.mjs → chunk-J7PJSK3J.mjs} +2 -2
- package/dist/esm/{chunk-J245N3XF.mjs.map → chunk-J7PJSK3J.mjs.map} +1 -1
- package/dist/esm/{chunk-CL6EEMSL.mjs → chunk-JGLEKXFP.mjs} +2 -2
- package/dist/esm/{chunk-SOLWFAUY.mjs → chunk-JIT2FYGE.mjs} +2 -2
- package/dist/esm/chunk-JIT2FYGE.mjs.map +1 -0
- package/dist/esm/chunk-JNO7KPMG.mjs +4 -0
- package/dist/esm/chunk-JNO7KPMG.mjs.map +1 -0
- package/dist/esm/{chunk-AZ6LVQEG.mjs → chunk-JONEH52T.mjs} +2 -2
- package/dist/esm/chunk-K62JTXWQ.mjs +2 -0
- package/dist/esm/chunk-K62JTXWQ.mjs.map +1 -0
- package/dist/esm/{chunk-IAVI3H4V.mjs → chunk-KCEI5JYS.mjs} +2 -2
- package/dist/esm/{chunk-XFY4O2S3.mjs → chunk-KM6IOJ6Y.mjs} +2 -2
- package/dist/esm/{chunk-DMSHPWA5.mjs → chunk-KTM6KVUJ.mjs} +2 -2
- package/dist/esm/chunk-KX43GEAB.mjs +2 -0
- package/dist/esm/chunk-KX43GEAB.mjs.map +1 -0
- package/dist/esm/{chunk-KYJU5PWF.mjs → chunk-L25CRR2W.mjs} +2 -2
- package/dist/esm/{chunk-2652SPOM.mjs → chunk-LGHPJTF3.mjs} +2 -2
- package/dist/esm/chunk-LGHPJTF3.mjs.map +1 -0
- package/dist/esm/{chunk-AGBA3Y7A.mjs → chunk-LGTOOAQI.mjs} +2 -2
- package/dist/esm/chunk-LHBMBCFC.mjs +2 -0
- package/dist/esm/chunk-LHBMBCFC.mjs.map +1 -0
- package/dist/esm/{chunk-F2RY4YQ7.mjs → chunk-LYO22HMF.mjs} +2 -2
- package/dist/esm/{chunk-KW4FVBDD.mjs → chunk-MBEWPBGN.mjs} +2 -2
- package/dist/esm/chunk-MHN6XY4Z.mjs +2 -0
- package/dist/esm/{chunk-JVTDP4KV.mjs → chunk-ML7D2CVG.mjs} +2 -2
- package/dist/esm/chunk-NF7ZQQE3.mjs +2 -0
- package/dist/esm/chunk-NF7ZQQE3.mjs.map +1 -0
- package/dist/esm/{chunk-XQ7ONNII.mjs → chunk-O4MRRWRI.mjs} +2 -2
- package/dist/esm/{chunk-PHP47DI4.mjs → chunk-OIOGOW6I.mjs} +1 -1
- package/dist/esm/{chunk-PHP47DI4.mjs.map → chunk-OIOGOW6I.mjs.map} +1 -1
- package/dist/esm/{chunk-ZINOJTLU.mjs → chunk-OPO5EYF7.mjs} +2 -2
- package/dist/esm/{chunk-6DMDYBV6.mjs → chunk-OVI7L7OG.mjs} +2 -2
- package/dist/esm/{chunk-TPJLAYW6.mjs → chunk-P2FTRAK3.mjs} +2 -2
- package/dist/esm/{chunk-IECDO22V.mjs → chunk-Q3CWUEXI.mjs} +2 -2
- package/dist/esm/chunk-Q3CWUEXI.mjs.map +1 -0
- package/dist/esm/{chunk-4JXB6V5O.mjs → chunk-RC43EXC4.mjs} +2 -2
- package/dist/esm/{chunk-WZCKSN2U.mjs → chunk-RLH25IDA.mjs} +2 -2
- package/dist/esm/{chunk-UGL2GPGK.mjs → chunk-RSO5YIDW.mjs} +2 -2
- package/dist/esm/chunk-RZGTHCJY.mjs +2 -0
- package/dist/esm/{chunk-2CGJLPHP.mjs.map → chunk-RZGTHCJY.mjs.map} +1 -1
- package/dist/esm/chunk-SPRNSFUV.mjs +2 -0
- package/dist/esm/chunk-SPRNSFUV.mjs.map +1 -0
- package/dist/esm/{chunk-2GEIHUHT.mjs → chunk-SPX2YFZN.mjs} +2 -2
- package/dist/esm/chunk-SPX2YFZN.mjs.map +1 -0
- package/dist/esm/chunk-SY4HK6CC.mjs +2 -0
- package/dist/esm/chunk-SY4HK6CC.mjs.map +1 -0
- package/dist/esm/{chunk-OTY3NO7Q.mjs → chunk-T6ADNZE5.mjs} +2 -2
- package/dist/esm/{chunk-3H5DGQKX.mjs → chunk-TGW36YOD.mjs} +2 -2
- package/dist/esm/{chunk-WSZCPSV4.mjs → chunk-TQA6HY6A.mjs} +2 -2
- package/dist/esm/{chunk-XFJD6QIP.mjs → chunk-U3GE6IPF.mjs} +2 -2
- package/dist/esm/chunk-UGTIALNW.mjs +2 -0
- package/dist/esm/{chunk-JNRMHDRA.mjs → chunk-UKVH4UGL.mjs} +2 -2
- package/dist/esm/chunk-UWLW2VLZ.mjs +2 -0
- package/dist/esm/chunk-UWLW2VLZ.mjs.map +1 -0
- package/dist/esm/chunk-UZTJWOLS.mjs +2 -0
- package/dist/esm/chunk-V4FKFCBL.mjs +2 -0
- package/dist/esm/chunk-V4FKFCBL.mjs.map +1 -0
- package/dist/esm/{chunk-4ZK3JNQT.mjs → chunk-VGITSRT6.mjs} +2 -2
- package/dist/esm/chunk-VGJIATTB.mjs +2 -0
- package/dist/esm/chunk-VGJIATTB.mjs.map +1 -0
- package/dist/esm/{chunk-XOCRDV2V.mjs → chunk-VQZMI3EZ.mjs} +2 -2
- package/dist/esm/chunk-WQF3IOXC.mjs +2 -0
- package/dist/esm/chunk-WQF3IOXC.mjs.map +1 -0
- package/dist/esm/chunk-WYOFF5DJ.mjs +2 -0
- package/dist/esm/chunk-WYOFF5DJ.mjs.map +1 -0
- package/dist/esm/{chunk-YZ5BCOGI.mjs → chunk-X7JNNNMC.mjs} +2 -2
- package/dist/esm/{chunk-JN36BNWA.mjs → chunk-XIB6LX22.mjs} +2 -2
- package/dist/esm/chunk-YIQ3JFHW.mjs +2 -0
- package/dist/esm/chunk-YIQ3JFHW.mjs.map +1 -0
- package/dist/esm/chunk-YP3VO6GM.mjs +2 -0
- package/dist/esm/chunk-YP3VO6GM.mjs.map +1 -0
- package/dist/esm/{chunk-OZN3OOJV.mjs → chunk-ZMBXHMVQ.mjs} +2 -2
- package/dist/esm/cli/index.d.mts +2 -2
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/cli/localNode.mjs +1 -1
- package/dist/esm/cli/move.d.mts +1 -1
- package/dist/esm/client/core.d.mts +1 -2
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.d.mts +1 -2
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.d.mts +2 -3
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.d.mts +1 -2
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/core/account/index.d.mts +2 -2
- package/dist/esm/core/account/index.mjs +1 -1
- package/dist/esm/core/account/utils/address.d.mts +2 -2
- package/dist/esm/core/account/utils/address.mjs +1 -1
- package/dist/esm/core/account/utils/index.d.mts +2 -2
- package/dist/esm/core/account/utils/index.mjs +1 -1
- package/dist/esm/core/accountAddress.d.mts +19 -10
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.d.mts +3 -3
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.d.mts +26 -12
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/ephemeral.d.mts +3 -3
- package/dist/esm/core/crypto/ephemeral.mjs +1 -1
- package/dist/esm/core/crypto/federatedKeyless.d.mts +4 -4
- package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
- package/dist/esm/core/crypto/hdKey.d.mts +0 -1
- package/dist/esm/core/crypto/hdKey.mjs +1 -1
- package/dist/esm/core/crypto/index.d.mts +4 -4
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/keyless.d.mts +72 -11
- package/dist/esm/core/crypto/keyless.mjs +1 -1
- package/dist/esm/core/crypto/multiEd25519.d.mts +3 -3
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.d.mts +3 -3
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/privateKey.d.mts +37 -10
- package/dist/esm/core/crypto/privateKey.mjs +1 -1
- package/dist/esm/core/crypto/proof.d.mts +2 -2
- package/dist/esm/core/crypto/proof.mjs +1 -1
- package/dist/esm/core/crypto/publicKey.d.mts +3 -3
- package/dist/esm/core/crypto/publicKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.d.mts +23 -9
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/signature.d.mts +2 -2
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.d.mts +3 -3
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/crypto/utils.d.mts +2 -2
- package/dist/esm/core/crypto/utils.mjs +1 -1
- package/dist/esm/core/hex.d.mts +39 -3
- package/dist/esm/core/hex.mjs +1 -1
- package/dist/esm/core/index.d.mts +5 -5
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/errors/index.d.mts +122 -0
- package/dist/esm/errors/index.mjs +2 -0
- package/dist/esm/index.d.mts +10 -10
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/account.d.mts +4 -4
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.d.mts +4 -4
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.d.mts +2 -2
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.d.mts +4 -4
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/event.d.mts +2 -2
- package/dist/esm/internal/event.mjs +1 -1
- package/dist/esm/internal/faucet.d.mts +1 -1
- package/dist/esm/internal/faucet.mjs +1 -1
- package/dist/esm/internal/fungibleAsset.d.mts +4 -4
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.d.mts +2 -2
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/keyless.d.mts +9 -5
- package/dist/esm/internal/keyless.mjs +1 -1
- package/dist/esm/internal/object.d.mts +2 -2
- package/dist/esm/internal/object.mjs +1 -1
- package/dist/esm/internal/staking.d.mts +1 -1
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/table.d.mts +2 -2
- package/dist/esm/internal/table.mjs +1 -1
- package/dist/esm/internal/transaction.d.mts +1 -1
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.d.mts +3 -3
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/internal/view.d.mts +3 -3
- package/dist/esm/internal/view.mjs +1 -1
- package/dist/esm/{publicKey-_tPa99ea.d.mts → publicKey-BVXX1nVl.d.mts} +2 -2
- package/dist/esm/transactions/authenticator/account.d.mts +3 -3
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.d.mts +3 -3
- package/dist/esm/transactions/authenticator/index.mjs +1 -1
- package/dist/esm/transactions/authenticator/transaction.d.mts +9 -4
- package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
- package/dist/esm/transactions/index.d.mts +3 -3
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/instances/chainId.d.mts +2 -2
- package/dist/esm/transactions/instances/chainId.mjs +1 -1
- package/dist/esm/transactions/instances/identifier.d.mts +2 -2
- package/dist/esm/transactions/instances/identifier.mjs +1 -1
- package/dist/esm/transactions/instances/index.d.mts +3 -3
- package/dist/esm/transactions/instances/index.mjs +1 -1
- package/dist/esm/transactions/instances/moduleId.d.mts +2 -2
- package/dist/esm/transactions/instances/moduleId.mjs +1 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.d.mts +2 -2
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rawTransaction.d.mts +2 -2
- package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +3 -3
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.d.mts +3 -3
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/simpleTransaction.d.mts +2 -2
- package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/transactionArgument.d.mts +2 -2
- package/dist/esm/transactions/instances/transactionPayload.d.mts +2 -2
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.d.mts +4 -4
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/index.d.mts +4 -4
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.d.mts +4 -4
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.d.mts +2 -2
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.d.mts +3 -3
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +3 -3
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +3 -3
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +3 -3
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
- package/dist/esm/transactions/typeTag/index.d.mts +2 -2
- package/dist/esm/transactions/typeTag/index.mjs +1 -1
- package/dist/esm/transactions/typeTag/parser.d.mts +2 -2
- package/dist/esm/transactions/typeTag/parser.mjs +1 -1
- package/dist/esm/transactions/types.d.mts +2 -2
- package/dist/esm/types/index.d.mts +3 -1260
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/types/keyless.d.mts +22 -1
- package/dist/esm/types/types.d.mts +1289 -0
- package/dist/esm/types/types.mjs +2 -0
- package/dist/esm/types/types.mjs.map +1 -0
- package/dist/esm/utils/const.d.mts +7 -1
- package/dist/esm/utils/const.mjs +1 -1
- package/dist/esm/utils/helpers.d.mts +10 -3
- package/dist/esm/utils/helpers.mjs +1 -1
- package/dist/esm/utils/index.d.mts +3 -3
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/utils/normalizeBundle.d.mts +2 -2
- package/dist/esm/utils/normalizeBundle.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/src/account/AbstractKeylessAccount.ts +203 -10
- package/src/account/FederatedKeylessAccount.ts +83 -35
- package/src/account/KeylessAccount.ts +44 -37
- package/src/account/MultiKeyAccount.ts +18 -5
- package/src/api/keyless.ts +2 -2
- package/src/bcs/deserializer.ts +53 -30
- package/src/bcs/serializable/moveStructs.ts +16 -17
- package/src/bcs/serializer.ts +22 -12
- package/src/client/core.ts +2 -2
- package/src/client/get.ts +1 -2
- package/src/client/index.ts +0 -1
- package/src/client/post.ts +1 -2
- package/src/core/accountAddress.ts +36 -9
- package/src/core/crypto/ed25519.ts +34 -14
- package/src/core/crypto/hdKey.ts +0 -1
- package/src/core/crypto/keyless.ts +245 -38
- package/src/core/crypto/privateKey.ts +81 -5
- package/src/core/crypto/secp256k1.ts +31 -11
- package/src/core/hex.ts +47 -0
- package/src/errors/index.ts +406 -0
- package/src/index.ts +1 -0
- package/src/internal/account.ts +6 -6
- package/src/internal/ans.ts +2 -1
- package/src/internal/keyless.ts +57 -19
- package/src/internal/transaction.ts +2 -1
- package/src/internal/transactionSubmission.ts +36 -18
- package/src/transactions/authenticator/transaction.ts +20 -0
- package/src/types/index.ts +1 -1483
- package/src/types/keyless.ts +19 -0
- package/src/types/types.ts +1512 -0
- package/src/utils/const.ts +7 -0
- package/src/utils/helpers.ts +10 -0
- package/src/version.ts +1 -1
- package/dist/common/chunk-7IYTZDXV.js +0 -2
- package/dist/common/chunk-7IYTZDXV.js.map +0 -1
- package/dist/esm/chunk-2652SPOM.mjs.map +0 -1
- package/dist/esm/chunk-2CGJLPHP.mjs +0 -2
- package/dist/esm/chunk-2GEIHUHT.mjs.map +0 -1
- package/dist/esm/chunk-4CDDWSKZ.mjs +0 -2
- package/dist/esm/chunk-4OV7QU2U.mjs +0 -2
- package/dist/esm/chunk-4VU2ABLU.mjs +0 -2
- package/dist/esm/chunk-4VU2ABLU.mjs.map +0 -1
- package/dist/esm/chunk-5S3Z7MT4.mjs +0 -2
- package/dist/esm/chunk-5S3Z7MT4.mjs.map +0 -1
- package/dist/esm/chunk-5SGSPCOY.mjs +0 -2
- package/dist/esm/chunk-5SGSPCOY.mjs.map +0 -1
- package/dist/esm/chunk-7XS45O6M.mjs +0 -2
- package/dist/esm/chunk-7XS45O6M.mjs.map +0 -1
- package/dist/esm/chunk-BAGUHYFD.mjs +0 -2
- package/dist/esm/chunk-BAGUHYFD.mjs.map +0 -1
- package/dist/esm/chunk-CDQGPCHU.mjs +0 -2
- package/dist/esm/chunk-CDQGPCHU.mjs.map +0 -1
- package/dist/esm/chunk-FTZGP6XW.mjs +0 -2
- package/dist/esm/chunk-FTZGP6XW.mjs.map +0 -1
- package/dist/esm/chunk-GLATLXF6.mjs +0 -2
- package/dist/esm/chunk-GLATLXF6.mjs.map +0 -1
- package/dist/esm/chunk-GQABU3RQ.mjs +0 -2
- package/dist/esm/chunk-GQABU3RQ.mjs.map +0 -1
- package/dist/esm/chunk-HM5HITUC.mjs +0 -4
- package/dist/esm/chunk-IBLZ6MZU.mjs +0 -2
- package/dist/esm/chunk-IECDO22V.mjs.map +0 -1
- package/dist/esm/chunk-KFNDDPOW.mjs +0 -2
- package/dist/esm/chunk-KFNDDPOW.mjs.map +0 -1
- package/dist/esm/chunk-KIW54KWR.mjs +0 -2
- package/dist/esm/chunk-KM6UXNC7.mjs +0 -2
- package/dist/esm/chunk-KM6UXNC7.mjs.map +0 -1
- package/dist/esm/chunk-KUX6GQ2E.mjs +0 -1
- package/dist/esm/chunk-LEKBJ2EG.mjs +0 -2
- package/dist/esm/chunk-LEKBJ2EG.mjs.map +0 -1
- package/dist/esm/chunk-M22UGFQ5.mjs +0 -2
- package/dist/esm/chunk-M22UGFQ5.mjs.map +0 -1
- package/dist/esm/chunk-N2FKVZ4D.mjs +0 -1
- package/dist/esm/chunk-N47FTRYO.mjs +0 -2
- package/dist/esm/chunk-N47FTRYO.mjs.map +0 -1
- package/dist/esm/chunk-ONBFUPEC.mjs +0 -2
- package/dist/esm/chunk-P3J54CQG.mjs +0 -2
- package/dist/esm/chunk-P3J54CQG.mjs.map +0 -1
- package/dist/esm/chunk-RNJHULIT.mjs.map +0 -1
- package/dist/esm/chunk-SGQFWWLQ.mjs +0 -2
- package/dist/esm/chunk-SGQFWWLQ.mjs.map +0 -1
- package/dist/esm/chunk-SOLWFAUY.mjs.map +0 -1
- package/dist/esm/chunk-T5BCTWGK.mjs.map +0 -1
- package/dist/esm/chunk-WV2VJQDS.mjs +0 -2
- package/dist/esm/chunk-Y267I7DC.mjs +0 -2
- package/dist/esm/chunk-Y267I7DC.mjs.map +0 -1
- package/dist/esm/client/types.d.mts +0 -66
- package/dist/esm/client/types.mjs +0 -2
- package/src/client/types.ts +0 -138
- /package/dist/esm/{chunk-22ZSW5EN.mjs.map → chunk-26WX3UFP.mjs.map} +0 -0
- /package/dist/esm/{chunk-A2AEFKXS.mjs.map → chunk-2E3BT4YW.mjs.map} +0 -0
- /package/dist/esm/{chunk-VYMRIKUV.mjs.map → chunk-2LQ4FTSR.mjs.map} +0 -0
- /package/dist/esm/{chunk-L5J3V3HW.mjs.map → chunk-2REHS35S.mjs.map} +0 -0
- /package/dist/esm/{chunk-CC7VOPYH.mjs.map → chunk-2YTHKFJZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-6FLHGOKP.mjs.map → chunk-42H7WETG.mjs.map} +0 -0
- /package/dist/esm/{chunk-RBJNSUSU.mjs.map → chunk-4IQZOAN7.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZPQUCT22.mjs.map → chunk-4J2JYRV3.mjs.map} +0 -0
- /package/dist/esm/{chunk-IBLZ6MZU.mjs.map → chunk-4O5XDQDO.mjs.map} +0 -0
- /package/dist/esm/{chunk-KIW54KWR.mjs.map → chunk-5B3SMBXQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-5N6KJ7KS.mjs.map → chunk-5KCKWL2C.mjs.map} +0 -0
- /package/dist/esm/{chunk-IFXUWUP2.mjs.map → chunk-5O3RHPER.mjs.map} +0 -0
- /package/dist/esm/{chunk-PCLU4KLY.mjs.map → chunk-6ZOVTYLJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-KUX6GQ2E.mjs.map → chunk-7ECCT6PK.mjs.map} +0 -0
- /package/dist/esm/{chunk-RAJTNQNL.mjs.map → chunk-7OHMMGS6.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZPIMARUG.mjs.map → chunk-A3USS2NC.mjs.map} +0 -0
- /package/dist/esm/{chunk-NODYW7DM.mjs.map → chunk-ACVIE7IE.mjs.map} +0 -0
- /package/dist/esm/{chunk-RNRNGJDA.mjs.map → chunk-AGEJNSEX.mjs.map} +0 -0
- /package/dist/esm/{chunk-PRZ7AIGA.mjs.map → chunk-AKIO3OIT.mjs.map} +0 -0
- /package/dist/esm/{chunk-KRVLR3L4.mjs.map → chunk-AOROYJ74.mjs.map} +0 -0
- /package/dist/esm/{chunk-BG2TZI3H.mjs.map → chunk-BP45UJII.mjs.map} +0 -0
- /package/dist/esm/{chunk-JGNMNCQB.mjs.map → chunk-BRV3RLKW.mjs.map} +0 -0
- /package/dist/esm/{chunk-EE7GDBA5.mjs.map → chunk-CEW2NI3K.mjs.map} +0 -0
- /package/dist/esm/{chunk-4LKLOUMG.mjs.map → chunk-D54FD6XE.mjs.map} +0 -0
- /package/dist/esm/{chunk-MK2QAHXC.mjs.map → chunk-DYELAVMR.mjs.map} +0 -0
- /package/dist/esm/{chunk-OXM4BVAY.mjs.map → chunk-ERDYU5YQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-7JK7UG4E.mjs.map → chunk-ETF76XA3.mjs.map} +0 -0
- /package/dist/esm/{chunk-N2FKVZ4D.mjs.map → chunk-FD6FGKYY.mjs.map} +0 -0
- /package/dist/esm/{chunk-LDZPO76C.mjs.map → chunk-FFCCBAEZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-OAEDFM7T.mjs.map → chunk-GX4CYRK4.mjs.map} +0 -0
- /package/dist/esm/{chunk-UCRROMZN.mjs.map → chunk-GZBVXXUL.mjs.map} +0 -0
- /package/dist/esm/{chunk-AT2ZGTXQ.mjs.map → chunk-H7AALSJ7.mjs.map} +0 -0
- /package/dist/esm/{chunk-EUGLLGYW.mjs.map → chunk-HBWIDPNN.mjs.map} +0 -0
- /package/dist/esm/{chunk-BVVHGSWC.mjs.map → chunk-HPZQGMSH.mjs.map} +0 -0
- /package/dist/esm/{chunk-73GCGRFW.mjs.map → chunk-II26BNYA.mjs.map} +0 -0
- /package/dist/esm/{chunk-BOWPP6YG.mjs.map → chunk-IQ4SCMB6.mjs.map} +0 -0
- /package/dist/esm/{chunk-CL6EEMSL.mjs.map → chunk-JGLEKXFP.mjs.map} +0 -0
- /package/dist/esm/{chunk-AZ6LVQEG.mjs.map → chunk-JONEH52T.mjs.map} +0 -0
- /package/dist/esm/{chunk-IAVI3H4V.mjs.map → chunk-KCEI5JYS.mjs.map} +0 -0
- /package/dist/esm/{chunk-XFY4O2S3.mjs.map → chunk-KM6IOJ6Y.mjs.map} +0 -0
- /package/dist/esm/{chunk-DMSHPWA5.mjs.map → chunk-KTM6KVUJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-KYJU5PWF.mjs.map → chunk-L25CRR2W.mjs.map} +0 -0
- /package/dist/esm/{chunk-AGBA3Y7A.mjs.map → chunk-LGTOOAQI.mjs.map} +0 -0
- /package/dist/esm/{chunk-F2RY4YQ7.mjs.map → chunk-LYO22HMF.mjs.map} +0 -0
- /package/dist/esm/{chunk-KW4FVBDD.mjs.map → chunk-MBEWPBGN.mjs.map} +0 -0
- /package/dist/esm/{chunk-4OV7QU2U.mjs.map → chunk-MHN6XY4Z.mjs.map} +0 -0
- /package/dist/esm/{chunk-JVTDP4KV.mjs.map → chunk-ML7D2CVG.mjs.map} +0 -0
- /package/dist/esm/{chunk-XQ7ONNII.mjs.map → chunk-O4MRRWRI.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZINOJTLU.mjs.map → chunk-OPO5EYF7.mjs.map} +0 -0
- /package/dist/esm/{chunk-6DMDYBV6.mjs.map → chunk-OVI7L7OG.mjs.map} +0 -0
- /package/dist/esm/{chunk-TPJLAYW6.mjs.map → chunk-P2FTRAK3.mjs.map} +0 -0
- /package/dist/esm/{chunk-4JXB6V5O.mjs.map → chunk-RC43EXC4.mjs.map} +0 -0
- /package/dist/esm/{chunk-WZCKSN2U.mjs.map → chunk-RLH25IDA.mjs.map} +0 -0
- /package/dist/esm/{chunk-UGL2GPGK.mjs.map → chunk-RSO5YIDW.mjs.map} +0 -0
- /package/dist/esm/{chunk-OTY3NO7Q.mjs.map → chunk-T6ADNZE5.mjs.map} +0 -0
- /package/dist/esm/{chunk-3H5DGQKX.mjs.map → chunk-TGW36YOD.mjs.map} +0 -0
- /package/dist/esm/{chunk-WSZCPSV4.mjs.map → chunk-TQA6HY6A.mjs.map} +0 -0
- /package/dist/esm/{chunk-XFJD6QIP.mjs.map → chunk-U3GE6IPF.mjs.map} +0 -0
- /package/dist/esm/{chunk-ONBFUPEC.mjs.map → chunk-UGTIALNW.mjs.map} +0 -0
- /package/dist/esm/{chunk-JNRMHDRA.mjs.map → chunk-UKVH4UGL.mjs.map} +0 -0
- /package/dist/esm/{chunk-4CDDWSKZ.mjs.map → chunk-UZTJWOLS.mjs.map} +0 -0
- /package/dist/esm/{chunk-4ZK3JNQT.mjs.map → chunk-VGITSRT6.mjs.map} +0 -0
- /package/dist/esm/{chunk-XOCRDV2V.mjs.map → chunk-VQZMI3EZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-YZ5BCOGI.mjs.map → chunk-X7JNNNMC.mjs.map} +0 -0
- /package/dist/esm/{chunk-JN36BNWA.mjs.map → chunk-XIB6LX22.mjs.map} +0 -0
- /package/dist/esm/{chunk-OZN3OOJV.mjs.map → chunk-ZMBXHMVQ.mjs.map} +0 -0
- /package/dist/esm/{client/types.mjs.map → errors/index.mjs.map} +0 -0
|
@@ -0,0 +1,1289 @@
|
|
|
1
|
+
import { TokenStandard, OrderBy } from './indexer.mjs';
|
|
2
|
+
import { Network } from '../utils/apiEndpoints.mjs';
|
|
3
|
+
import './generated/operations.mjs';
|
|
4
|
+
import './generated/types.mjs';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Different MIME types used for data interchange in transactions and responses.
|
|
8
|
+
*/
|
|
9
|
+
declare enum MimeType {
|
|
10
|
+
/**
|
|
11
|
+
* JSON representation, used for transaction submission and accept type JSON output
|
|
12
|
+
*/
|
|
13
|
+
JSON = "application/json",
|
|
14
|
+
/**
|
|
15
|
+
* BCS representation, used for accept type BCS output
|
|
16
|
+
*/
|
|
17
|
+
BCS = "application/x-bcs",
|
|
18
|
+
/**
|
|
19
|
+
* BCS representation, used for transaction submission in BCS input
|
|
20
|
+
*/
|
|
21
|
+
BCS_SIGNED_TRANSACTION = "application/x.aptos.signed_transaction+bcs",
|
|
22
|
+
BCS_VIEW_FUNCTION = "application/x.aptos.view_function+bcs"
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Hexadecimal data input for functions, supporting both string and Uint8Array formats.
|
|
26
|
+
*/
|
|
27
|
+
type HexInput = string | Uint8Array;
|
|
28
|
+
/**
|
|
29
|
+
* Variants of type tags used in the system, encompassing various data types and structures.
|
|
30
|
+
* {@link https://github.com/aptos-labs/aptos-core/blob/main/third_party/move/move-core/types/src/language_storage.rs#L27}
|
|
31
|
+
*/
|
|
32
|
+
declare enum TypeTagVariants {
|
|
33
|
+
Bool = 0,
|
|
34
|
+
U8 = 1,
|
|
35
|
+
U64 = 2,
|
|
36
|
+
U128 = 3,
|
|
37
|
+
Address = 4,
|
|
38
|
+
Signer = 5,
|
|
39
|
+
Vector = 6,
|
|
40
|
+
Struct = 7,
|
|
41
|
+
U16 = 8,
|
|
42
|
+
U32 = 9,
|
|
43
|
+
U256 = 10,
|
|
44
|
+
Reference = 254,// This is specifically a placeholder and does not represent a real type
|
|
45
|
+
Generic = 255
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Variants of script transaction arguments used in Rust, encompassing various data types for transaction processing.
|
|
49
|
+
* {@link https://github.com/aptos-labs/aptos-core/blob/main/third_party/move/move-core/types/src/transaction_argument.rs#L11}
|
|
50
|
+
*/
|
|
51
|
+
declare enum ScriptTransactionArgumentVariants {
|
|
52
|
+
U8 = 0,
|
|
53
|
+
U64 = 1,
|
|
54
|
+
U128 = 2,
|
|
55
|
+
Address = 3,
|
|
56
|
+
U8Vector = 4,
|
|
57
|
+
Bool = 5,
|
|
58
|
+
U16 = 6,
|
|
59
|
+
U32 = 7,
|
|
60
|
+
U256 = 8,
|
|
61
|
+
Serialized = 9
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The payload for various transaction types in the system.
|
|
65
|
+
* {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/mod.rs#L478}
|
|
66
|
+
*/
|
|
67
|
+
declare enum TransactionPayloadVariants {
|
|
68
|
+
Script = 0,
|
|
69
|
+
EntryFunction = 2,
|
|
70
|
+
Multisig = 3
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Variants of transactions used in the system.
|
|
74
|
+
* {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/mod.rs#L440}
|
|
75
|
+
*/
|
|
76
|
+
declare enum TransactionVariants {
|
|
77
|
+
MultiAgentTransaction = 0,
|
|
78
|
+
FeePayerTransaction = 1
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Variants of transaction authenticators used in the system.
|
|
82
|
+
* {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs#L44}
|
|
83
|
+
*/
|
|
84
|
+
declare enum TransactionAuthenticatorVariant {
|
|
85
|
+
Ed25519 = 0,
|
|
86
|
+
MultiEd25519 = 1,
|
|
87
|
+
MultiAgent = 2,
|
|
88
|
+
FeePayer = 3,
|
|
89
|
+
SingleSender = 4
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Variants of account authenticators used in transactions.
|
|
93
|
+
* {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs#L414}
|
|
94
|
+
*/
|
|
95
|
+
declare enum AccountAuthenticatorVariant {
|
|
96
|
+
Ed25519 = 0,
|
|
97
|
+
MultiEd25519 = 1,
|
|
98
|
+
SingleKey = 2,
|
|
99
|
+
MultiKey = 3
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Variants of private keys that can comply with the AIP-80 standard.
|
|
103
|
+
* {@link https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-80.md}
|
|
104
|
+
*/
|
|
105
|
+
declare enum PrivateKeyVariants {
|
|
106
|
+
Ed25519 = "ed25519",
|
|
107
|
+
Secp256k1 = "secp256k1"
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Variants of public keys used in cryptographic operations.
|
|
111
|
+
*/
|
|
112
|
+
declare enum AnyPublicKeyVariant {
|
|
113
|
+
Ed25519 = 0,
|
|
114
|
+
Secp256k1 = 1,
|
|
115
|
+
Keyless = 3,
|
|
116
|
+
FederatedKeyless = 4
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Variants of signature types used for cryptographic operations.
|
|
120
|
+
*/
|
|
121
|
+
declare enum AnySignatureVariant {
|
|
122
|
+
Ed25519 = 0,
|
|
123
|
+
Secp256k1 = 1,
|
|
124
|
+
Keyless = 3
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Variants of ephemeral public keys used in cryptographic operations.
|
|
128
|
+
*/
|
|
129
|
+
declare enum EphemeralPublicKeyVariant {
|
|
130
|
+
Ed25519 = 0
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Variants of ephemeral signatures used for secure communication.
|
|
134
|
+
*/
|
|
135
|
+
declare enum EphemeralSignatureVariant {
|
|
136
|
+
Ed25519 = 0
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Variants of ephemeral certificates used in secure transactions.
|
|
140
|
+
*/
|
|
141
|
+
declare enum EphemeralCertificateVariant {
|
|
142
|
+
ZkProof = 0
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Variants of zero-knowledge proofs used in cryptographic operations.
|
|
146
|
+
*/
|
|
147
|
+
declare enum ZkpVariant {
|
|
148
|
+
Groth16 = 0
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* BCS types
|
|
152
|
+
*/
|
|
153
|
+
type Uint8 = number;
|
|
154
|
+
/**
|
|
155
|
+
* A 16-bit unsigned integer.
|
|
156
|
+
*/
|
|
157
|
+
type Uint16 = number;
|
|
158
|
+
/**
|
|
159
|
+
* A 32-bit unsigned integer.
|
|
160
|
+
*/
|
|
161
|
+
type Uint32 = number;
|
|
162
|
+
/**
|
|
163
|
+
* A 64-bit unsigned integer value.
|
|
164
|
+
*/
|
|
165
|
+
type Uint64 = bigint;
|
|
166
|
+
/**
|
|
167
|
+
* A 128-bit unsigned integer used for precise arithmetic operations.
|
|
168
|
+
*/
|
|
169
|
+
type Uint128 = bigint;
|
|
170
|
+
/**
|
|
171
|
+
* A 256-bit unsigned integer used for precise numerical calculations.
|
|
172
|
+
*/
|
|
173
|
+
type Uint256 = bigint;
|
|
174
|
+
/**
|
|
175
|
+
* A number or a bigint value.
|
|
176
|
+
*/
|
|
177
|
+
type AnyNumber = number | bigint;
|
|
178
|
+
/**
|
|
179
|
+
* Configuration options for initializing the SDK, allowing customization of its behavior and interaction with the Aptos network.
|
|
180
|
+
*/
|
|
181
|
+
type AptosSettings = {
|
|
182
|
+
readonly network?: Network;
|
|
183
|
+
readonly fullnode?: string;
|
|
184
|
+
readonly faucet?: string;
|
|
185
|
+
readonly indexer?: string;
|
|
186
|
+
readonly pepper?: string;
|
|
187
|
+
readonly prover?: string;
|
|
188
|
+
readonly clientConfig?: ClientConfig;
|
|
189
|
+
readonly client?: Client;
|
|
190
|
+
readonly fullnodeConfig?: FullNodeConfig;
|
|
191
|
+
readonly indexerConfig?: IndexerConfig;
|
|
192
|
+
readonly faucetConfig?: FaucetConfig;
|
|
193
|
+
};
|
|
194
|
+
/**
|
|
195
|
+
* Defines the parameters for paginating query results, including the starting position and maximum number of items to return.
|
|
196
|
+
* @param offset Specifies the starting position of the query result. Default is 0.
|
|
197
|
+
* @param limit Specifies the maximum number of items to return. Default is 25.
|
|
198
|
+
*/
|
|
199
|
+
interface PaginationArgs {
|
|
200
|
+
offset?: AnyNumber;
|
|
201
|
+
limit?: number;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Represents the arguments for specifying a token standard.
|
|
205
|
+
*
|
|
206
|
+
* @param tokenStandard - Optional standard of the token.
|
|
207
|
+
*/
|
|
208
|
+
interface TokenStandardArg {
|
|
209
|
+
tokenStandard?: TokenStandard;
|
|
210
|
+
}
|
|
211
|
+
interface OrderByArg<T extends {}> {
|
|
212
|
+
orderBy?: OrderBy<T>;
|
|
213
|
+
}
|
|
214
|
+
interface WhereArg<T extends {}> {
|
|
215
|
+
where?: T;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* QUERY TYPES
|
|
219
|
+
*/
|
|
220
|
+
/**
|
|
221
|
+
* A configuration object for requests to the server, including API key, extra headers, and cookie handling options.
|
|
222
|
+
*/
|
|
223
|
+
type ClientConfig = ClientHeadersType & {
|
|
224
|
+
WITH_CREDENTIALS?: boolean;
|
|
225
|
+
API_KEY?: string;
|
|
226
|
+
};
|
|
227
|
+
/**
|
|
228
|
+
* A configuration object for a Fullnode, allowing for the inclusion of extra headers in requests.
|
|
229
|
+
*/
|
|
230
|
+
type FullNodeConfig = ClientHeadersType;
|
|
231
|
+
/**
|
|
232
|
+
* An Indexer configuration object for sending requests with additional headers.
|
|
233
|
+
*/
|
|
234
|
+
type IndexerConfig = ClientHeadersType;
|
|
235
|
+
/**
|
|
236
|
+
* A configuration object for a faucet, including optional authentication and headers for requests.
|
|
237
|
+
*/
|
|
238
|
+
type FaucetConfig = ClientHeadersType & {
|
|
239
|
+
AUTH_TOKEN?: string;
|
|
240
|
+
};
|
|
241
|
+
/**
|
|
242
|
+
* General type definition for client headers.
|
|
243
|
+
*/
|
|
244
|
+
type ClientHeadersType = {
|
|
245
|
+
HEADERS?: Record<string, string | number | boolean>;
|
|
246
|
+
};
|
|
247
|
+
/**
|
|
248
|
+
* Represents a client for making requests to a service provider.
|
|
249
|
+
*
|
|
250
|
+
* @param Req - The type of the request payload.
|
|
251
|
+
* @param Res - The type of the response payload.
|
|
252
|
+
*/
|
|
253
|
+
interface ClientRequest<Req> {
|
|
254
|
+
url: string;
|
|
255
|
+
method: "GET" | "POST";
|
|
256
|
+
originMethod?: string;
|
|
257
|
+
body?: Req;
|
|
258
|
+
contentType?: string;
|
|
259
|
+
params?: any;
|
|
260
|
+
overrides?: ClientConfig & FullNodeConfig & IndexerConfig & FaucetConfig;
|
|
261
|
+
headers?: Record<string, any>;
|
|
262
|
+
}
|
|
263
|
+
interface ClientResponse<Res> {
|
|
264
|
+
status: number;
|
|
265
|
+
statusText: string;
|
|
266
|
+
data: Res;
|
|
267
|
+
config?: any;
|
|
268
|
+
request?: any;
|
|
269
|
+
response?: any;
|
|
270
|
+
headers?: any;
|
|
271
|
+
}
|
|
272
|
+
interface Client {
|
|
273
|
+
/**
|
|
274
|
+
* Sends a request to the specified URL with the given options.
|
|
275
|
+
*
|
|
276
|
+
* @param requestOptions - The options for the request.
|
|
277
|
+
* @param requestOptions.url - The URL to send the request to.
|
|
278
|
+
* @param requestOptions.method - The HTTP method to use, either "GET" or "POST".
|
|
279
|
+
* @param requestOptions.path - An optional path to append to the URL.
|
|
280
|
+
* @param requestOptions.body - The body of the request, applicable for POST requests.
|
|
281
|
+
* @param requestOptions.contentType - The content type of the request body.
|
|
282
|
+
* @param requestOptions.acceptType - The expected content type of the response.
|
|
283
|
+
* @param requestOptions.params - Optional parameters to include in the request.
|
|
284
|
+
* @param requestOptions.originMethod - An optional method to specify the origin of the request.
|
|
285
|
+
* @param requestOptions.overrides - Optional configuration overrides for the request.
|
|
286
|
+
*/
|
|
287
|
+
provider<Req, Res>(requestOptions: ClientRequest<Req>): Promise<ClientResponse<Res>>;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* The API request type
|
|
291
|
+
*
|
|
292
|
+
* @param url - the url to make the request to, i.e. https://fullnode.devnet.aptoslabs.com/v1
|
|
293
|
+
* @param method - the request method "GET" | "POST"
|
|
294
|
+
* @param endpoint (optional) - the endpoint to make the request to, i.e. transactions
|
|
295
|
+
* @param body (optional) - the body of the request
|
|
296
|
+
* @param contentType (optional) - the content type to set the `content-type` header to,
|
|
297
|
+
* by default is set to `application/json`
|
|
298
|
+
* @param params (optional) - query params to add to the request
|
|
299
|
+
* @param originMethod (optional) - the local method the request came from
|
|
300
|
+
* @param overrides (optional) - a `ClientConfig` object type to override request data
|
|
301
|
+
*/
|
|
302
|
+
type AptosRequest = {
|
|
303
|
+
url: string;
|
|
304
|
+
method: "GET" | "POST";
|
|
305
|
+
path?: string;
|
|
306
|
+
body?: any;
|
|
307
|
+
contentType?: string;
|
|
308
|
+
acceptType?: string;
|
|
309
|
+
params?: Record<string, string | AnyNumber | boolean | undefined>;
|
|
310
|
+
originMethod?: string;
|
|
311
|
+
overrides?: ClientConfig & FullNodeConfig & IndexerConfig & FaucetConfig;
|
|
312
|
+
};
|
|
313
|
+
/**
|
|
314
|
+
* The API response type
|
|
315
|
+
*
|
|
316
|
+
* @param status - the response status. i.e. 200
|
|
317
|
+
* @param statusText - the response message
|
|
318
|
+
* @param data the response data
|
|
319
|
+
* @param url the url the request was made to
|
|
320
|
+
* @param headers the response headers
|
|
321
|
+
* @param config (optional) - the request object
|
|
322
|
+
* @param request (optional) - the request object
|
|
323
|
+
*/
|
|
324
|
+
interface AptosResponse<Req, Res> {
|
|
325
|
+
status: number;
|
|
326
|
+
statusText: string;
|
|
327
|
+
data: Res;
|
|
328
|
+
url: string;
|
|
329
|
+
headers: any;
|
|
330
|
+
config?: any;
|
|
331
|
+
request?: Req;
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* The ledger version of transactions, defaulting to the latest version if not specified.
|
|
335
|
+
*/
|
|
336
|
+
type LedgerVersionArg = {
|
|
337
|
+
ledgerVersion?: AnyNumber;
|
|
338
|
+
};
|
|
339
|
+
/**
|
|
340
|
+
* RESPONSE TYPES
|
|
341
|
+
*/
|
|
342
|
+
/**
|
|
343
|
+
* The output of the estimate gas API, including the deprioritized estimate for the gas unit price.
|
|
344
|
+
*/
|
|
345
|
+
type GasEstimation = {
|
|
346
|
+
/**
|
|
347
|
+
* The deprioritized estimate for the gas unit price
|
|
348
|
+
*/
|
|
349
|
+
deprioritized_gas_estimate?: number;
|
|
350
|
+
/**
|
|
351
|
+
* The current estimate for the gas unit price
|
|
352
|
+
*/
|
|
353
|
+
gas_estimate: number;
|
|
354
|
+
/**
|
|
355
|
+
* The prioritized estimate for the gas unit price
|
|
356
|
+
*/
|
|
357
|
+
prioritized_gas_estimate?: number;
|
|
358
|
+
};
|
|
359
|
+
type MoveResource<T = {}> = {
|
|
360
|
+
type: MoveStructId;
|
|
361
|
+
data: T;
|
|
362
|
+
};
|
|
363
|
+
/**
|
|
364
|
+
* The data associated with an account, including its sequence number.
|
|
365
|
+
*/
|
|
366
|
+
type AccountData = {
|
|
367
|
+
sequence_number: string;
|
|
368
|
+
authentication_key: string;
|
|
369
|
+
};
|
|
370
|
+
/**
|
|
371
|
+
* A Move module containing an address.
|
|
372
|
+
*/
|
|
373
|
+
type MoveModuleBytecode = {
|
|
374
|
+
bytecode: string;
|
|
375
|
+
abi?: MoveModule;
|
|
376
|
+
};
|
|
377
|
+
/**
|
|
378
|
+
* TRANSACTION TYPES
|
|
379
|
+
*/
|
|
380
|
+
/**
|
|
381
|
+
* Different types of transaction responses that can occur in the system.
|
|
382
|
+
*/
|
|
383
|
+
declare enum TransactionResponseType {
|
|
384
|
+
Pending = "pending_transaction",
|
|
385
|
+
User = "user_transaction",
|
|
386
|
+
Genesis = "genesis_transaction",
|
|
387
|
+
BlockMetadata = "block_metadata_transaction",
|
|
388
|
+
StateCheckpoint = "state_checkpoint_transaction",
|
|
389
|
+
Validator = "validator_transaction",
|
|
390
|
+
BlockEpilogue = "block_epilogue_transaction"
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* The response for a transaction, which can be either pending or committed.
|
|
394
|
+
*/
|
|
395
|
+
type TransactionResponse = PendingTransactionResponse | CommittedTransactionResponse;
|
|
396
|
+
/**
|
|
397
|
+
* The response for a committed transaction, which can be one of several transaction types.
|
|
398
|
+
*/
|
|
399
|
+
type CommittedTransactionResponse = UserTransactionResponse | GenesisTransactionResponse | BlockMetadataTransactionResponse | StateCheckpointTransactionResponse | ValidatorTransactionResponse | BlockEpilogueTransactionResponse;
|
|
400
|
+
/**
|
|
401
|
+
* Determine if the given transaction response is currently pending.
|
|
402
|
+
*
|
|
403
|
+
* @param response - The transaction response to evaluate.
|
|
404
|
+
* @returns A boolean indicating whether the transaction is pending.
|
|
405
|
+
*/
|
|
406
|
+
declare function isPendingTransactionResponse(response: TransactionResponse): response is PendingTransactionResponse;
|
|
407
|
+
/**
|
|
408
|
+
* Determines if the given transaction response is a user transaction.
|
|
409
|
+
*
|
|
410
|
+
* @param response - The transaction response to evaluate.
|
|
411
|
+
* @returns A boolean indicating whether the transaction is of type User.
|
|
412
|
+
*/
|
|
413
|
+
declare function isUserTransactionResponse(response: TransactionResponse): response is UserTransactionResponse;
|
|
414
|
+
/**
|
|
415
|
+
* Determines if the given transaction response is a Genesis transaction.
|
|
416
|
+
*
|
|
417
|
+
* @param response - The transaction response to evaluate.
|
|
418
|
+
* @returns A boolean indicating whether the transaction is a Genesis transaction.
|
|
419
|
+
*/
|
|
420
|
+
declare function isGenesisTransactionResponse(response: TransactionResponse): response is GenesisTransactionResponse;
|
|
421
|
+
/**
|
|
422
|
+
* Determine if the given transaction response is of type BlockMetadata.
|
|
423
|
+
*
|
|
424
|
+
* @param response - The transaction response to evaluate.
|
|
425
|
+
* @returns A boolean indicating whether the response is a BlockMetadata transaction.
|
|
426
|
+
*/
|
|
427
|
+
declare function isBlockMetadataTransactionResponse(response: TransactionResponse): response is BlockMetadataTransactionResponse;
|
|
428
|
+
/**
|
|
429
|
+
* Determines if the provided transaction response is a state checkpoint transaction.
|
|
430
|
+
*
|
|
431
|
+
* @param response - The transaction response to evaluate.
|
|
432
|
+
* @returns A boolean indicating whether the transaction response is of type StateCheckpoint.
|
|
433
|
+
*/
|
|
434
|
+
declare function isStateCheckpointTransactionResponse(response: TransactionResponse): response is StateCheckpointTransactionResponse;
|
|
435
|
+
/**
|
|
436
|
+
* Determine if the given transaction response is of type Validator.
|
|
437
|
+
*
|
|
438
|
+
* @param response - The transaction response to evaluate.
|
|
439
|
+
* @returns A boolean indicating whether the transaction response is a Validator type.
|
|
440
|
+
*/
|
|
441
|
+
declare function isValidatorTransactionResponse(response: TransactionResponse): response is ValidatorTransactionResponse;
|
|
442
|
+
/**
|
|
443
|
+
* Determines if the given transaction response is of the type Block Epilogue.
|
|
444
|
+
*
|
|
445
|
+
* @param response - The transaction response to evaluate.
|
|
446
|
+
* @returns A boolean indicating whether the response is a Block Epilogue transaction.
|
|
447
|
+
*/
|
|
448
|
+
declare function isBlockEpilogueTransactionResponse(response: TransactionResponse): response is BlockEpilogueTransactionResponse;
|
|
449
|
+
/**
|
|
450
|
+
* The response for a pending transaction, indicating that the transaction is still being processed.
|
|
451
|
+
*/
|
|
452
|
+
type PendingTransactionResponse = {
|
|
453
|
+
type: TransactionResponseType.Pending;
|
|
454
|
+
hash: string;
|
|
455
|
+
sender: string;
|
|
456
|
+
sequence_number: string;
|
|
457
|
+
max_gas_amount: string;
|
|
458
|
+
gas_unit_price: string;
|
|
459
|
+
expiration_timestamp_secs: string;
|
|
460
|
+
payload: TransactionPayloadResponse;
|
|
461
|
+
signature?: TransactionSignature;
|
|
462
|
+
};
|
|
463
|
+
/**
|
|
464
|
+
* The response structure for a user transaction.
|
|
465
|
+
*/
|
|
466
|
+
type UserTransactionResponse = {
|
|
467
|
+
type: TransactionResponseType.User;
|
|
468
|
+
version: string;
|
|
469
|
+
hash: string;
|
|
470
|
+
state_change_hash: string;
|
|
471
|
+
event_root_hash: string;
|
|
472
|
+
state_checkpoint_hash: string | null;
|
|
473
|
+
gas_used: string;
|
|
474
|
+
/**
|
|
475
|
+
* Whether the transaction was successful
|
|
476
|
+
*/
|
|
477
|
+
success: boolean;
|
|
478
|
+
/**
|
|
479
|
+
* The VM status of the transaction, can tell useful information in a failure
|
|
480
|
+
*/
|
|
481
|
+
vm_status: string;
|
|
482
|
+
accumulator_root_hash: string;
|
|
483
|
+
/**
|
|
484
|
+
* Final state of resources changed by the transaction
|
|
485
|
+
*/
|
|
486
|
+
changes: Array<WriteSetChange>;
|
|
487
|
+
sender: string;
|
|
488
|
+
sequence_number: string;
|
|
489
|
+
max_gas_amount: string;
|
|
490
|
+
gas_unit_price: string;
|
|
491
|
+
expiration_timestamp_secs: string;
|
|
492
|
+
payload: TransactionPayloadResponse;
|
|
493
|
+
signature?: TransactionSignature;
|
|
494
|
+
/**
|
|
495
|
+
* Events generated by the transaction
|
|
496
|
+
*/
|
|
497
|
+
events: Array<Event>;
|
|
498
|
+
timestamp: string;
|
|
499
|
+
};
|
|
500
|
+
/**
|
|
501
|
+
* The response for a genesis transaction, indicating the type of transaction.
|
|
502
|
+
*/
|
|
503
|
+
type GenesisTransactionResponse = {
|
|
504
|
+
type: TransactionResponseType.Genesis;
|
|
505
|
+
version: string;
|
|
506
|
+
hash: string;
|
|
507
|
+
state_change_hash: string;
|
|
508
|
+
event_root_hash: string;
|
|
509
|
+
state_checkpoint_hash?: string;
|
|
510
|
+
gas_used: string;
|
|
511
|
+
/**
|
|
512
|
+
* Whether the transaction was successful
|
|
513
|
+
*/
|
|
514
|
+
success: boolean;
|
|
515
|
+
/**
|
|
516
|
+
* The VM status of the transaction, can tell useful information in a failure
|
|
517
|
+
*/
|
|
518
|
+
vm_status: string;
|
|
519
|
+
accumulator_root_hash: string;
|
|
520
|
+
/**
|
|
521
|
+
* Final state of resources changed by the transaction
|
|
522
|
+
*/
|
|
523
|
+
changes: Array<WriteSetChange>;
|
|
524
|
+
payload: GenesisPayload;
|
|
525
|
+
/**
|
|
526
|
+
* Events emitted during genesis
|
|
527
|
+
*/
|
|
528
|
+
events: Array<Event>;
|
|
529
|
+
};
|
|
530
|
+
/**
|
|
531
|
+
* The structure representing a blockchain block with its height.
|
|
532
|
+
*/
|
|
533
|
+
type BlockMetadataTransactionResponse = {
|
|
534
|
+
type: TransactionResponseType.BlockMetadata;
|
|
535
|
+
version: string;
|
|
536
|
+
hash: string;
|
|
537
|
+
state_change_hash: string;
|
|
538
|
+
event_root_hash: string;
|
|
539
|
+
state_checkpoint_hash: string | null;
|
|
540
|
+
gas_used: string;
|
|
541
|
+
/**
|
|
542
|
+
* Whether the transaction was successful
|
|
543
|
+
*/
|
|
544
|
+
success: boolean;
|
|
545
|
+
/**
|
|
546
|
+
* The VM status of the transaction, can tell useful information in a failure
|
|
547
|
+
*/
|
|
548
|
+
vm_status: string;
|
|
549
|
+
accumulator_root_hash: string;
|
|
550
|
+
/**
|
|
551
|
+
* Final state of resources changed by the transaction
|
|
552
|
+
*/
|
|
553
|
+
changes: Array<WriteSetChange>;
|
|
554
|
+
id: string;
|
|
555
|
+
epoch: string;
|
|
556
|
+
round: string;
|
|
557
|
+
/**
|
|
558
|
+
* The events emitted at the block creation
|
|
559
|
+
*/
|
|
560
|
+
events: Array<Event>;
|
|
561
|
+
/**
|
|
562
|
+
* Previous block votes
|
|
563
|
+
*/
|
|
564
|
+
previous_block_votes_bitvec: Array<number>;
|
|
565
|
+
proposer: string;
|
|
566
|
+
/**
|
|
567
|
+
* The indices of the proposers who failed to propose
|
|
568
|
+
*/
|
|
569
|
+
failed_proposer_indices: Array<number>;
|
|
570
|
+
timestamp: string;
|
|
571
|
+
};
|
|
572
|
+
/**
|
|
573
|
+
* The response for a state checkpoint transaction, indicating the type of transaction.
|
|
574
|
+
*/
|
|
575
|
+
type StateCheckpointTransactionResponse = {
|
|
576
|
+
type: TransactionResponseType.StateCheckpoint;
|
|
577
|
+
version: string;
|
|
578
|
+
hash: string;
|
|
579
|
+
state_change_hash: string;
|
|
580
|
+
event_root_hash: string;
|
|
581
|
+
state_checkpoint_hash: string | null;
|
|
582
|
+
gas_used: string;
|
|
583
|
+
/**
|
|
584
|
+
* Whether the transaction was successful
|
|
585
|
+
*/
|
|
586
|
+
success: boolean;
|
|
587
|
+
/**
|
|
588
|
+
* The VM status of the transaction, can tell useful information in a failure
|
|
589
|
+
*/
|
|
590
|
+
vm_status: string;
|
|
591
|
+
accumulator_root_hash: string;
|
|
592
|
+
/**
|
|
593
|
+
* Final state of resources changed by the transaction
|
|
594
|
+
*/
|
|
595
|
+
changes: Array<WriteSetChange>;
|
|
596
|
+
timestamp: string;
|
|
597
|
+
};
|
|
598
|
+
/**
|
|
599
|
+
* The response for a validator transaction, indicating the type of transaction.
|
|
600
|
+
*/
|
|
601
|
+
type ValidatorTransactionResponse = {
|
|
602
|
+
type: TransactionResponseType.Validator;
|
|
603
|
+
version: string;
|
|
604
|
+
hash: string;
|
|
605
|
+
state_change_hash: string;
|
|
606
|
+
event_root_hash: string;
|
|
607
|
+
state_checkpoint_hash: string | null;
|
|
608
|
+
gas_used: string;
|
|
609
|
+
/**
|
|
610
|
+
* Whether the transaction was successful
|
|
611
|
+
*/
|
|
612
|
+
success: boolean;
|
|
613
|
+
/**
|
|
614
|
+
* The VM status of the transaction, can tell useful information in a failure
|
|
615
|
+
*/
|
|
616
|
+
vm_status: string;
|
|
617
|
+
accumulator_root_hash: string;
|
|
618
|
+
/**
|
|
619
|
+
* Final state of resources changed by the transaction
|
|
620
|
+
*/
|
|
621
|
+
changes: Array<WriteSetChange>;
|
|
622
|
+
/**
|
|
623
|
+
* The events emitted by the validator transaction
|
|
624
|
+
*/
|
|
625
|
+
events: Array<Event>;
|
|
626
|
+
timestamp: string;
|
|
627
|
+
};
|
|
628
|
+
/**
|
|
629
|
+
* Describes the gas state of the block, indicating whether the block gas limit has been reached.
|
|
630
|
+
*/
|
|
631
|
+
type BlockEndInfo = {
|
|
632
|
+
block_gas_limit_reached: boolean;
|
|
633
|
+
block_output_limit_reached: boolean;
|
|
634
|
+
block_effective_block_gas_units: number;
|
|
635
|
+
block_approx_output_size: number;
|
|
636
|
+
};
|
|
637
|
+
/**
|
|
638
|
+
* A transaction executed at the end of a block that tracks data from the entire block.
|
|
639
|
+
*/
|
|
640
|
+
type BlockEpilogueTransactionResponse = {
|
|
641
|
+
type: TransactionResponseType.BlockEpilogue;
|
|
642
|
+
version: string;
|
|
643
|
+
hash: string;
|
|
644
|
+
state_change_hash: string;
|
|
645
|
+
event_root_hash: string;
|
|
646
|
+
state_checkpoint_hash: string | null;
|
|
647
|
+
gas_used: string;
|
|
648
|
+
/**
|
|
649
|
+
* Whether the transaction was successful
|
|
650
|
+
*/
|
|
651
|
+
success: boolean;
|
|
652
|
+
/**
|
|
653
|
+
* The VM status of the transaction, can tell useful information in a failure
|
|
654
|
+
*/
|
|
655
|
+
vm_status: string;
|
|
656
|
+
accumulator_root_hash: string;
|
|
657
|
+
/**
|
|
658
|
+
* Final state of resources changed by the transaction
|
|
659
|
+
*/
|
|
660
|
+
changes: Array<WriteSetChange>;
|
|
661
|
+
timestamp: string;
|
|
662
|
+
block_end_info: BlockEndInfo | null;
|
|
663
|
+
};
|
|
664
|
+
/**
|
|
665
|
+
* WRITESET CHANGE TYPES
|
|
666
|
+
*/
|
|
667
|
+
/**
|
|
668
|
+
* A union type that encompasses both script and direct write sets for data operations.
|
|
669
|
+
*/
|
|
670
|
+
type WriteSetChange = WriteSetChangeDeleteModule | WriteSetChangeDeleteResource | WriteSetChangeDeleteTableItem | WriteSetChangeWriteModule | WriteSetChangeWriteResource | WriteSetChangeWriteTableItem;
|
|
671
|
+
/**
|
|
672
|
+
* The structure for a module deletion change in a write set.
|
|
673
|
+
*/
|
|
674
|
+
type WriteSetChangeDeleteModule = {
|
|
675
|
+
type: string;
|
|
676
|
+
address: string;
|
|
677
|
+
/**
|
|
678
|
+
* State key hash
|
|
679
|
+
*/
|
|
680
|
+
state_key_hash: string;
|
|
681
|
+
module: MoveModuleId;
|
|
682
|
+
};
|
|
683
|
+
/**
|
|
684
|
+
* The payload for a resource deletion in a write set change.
|
|
685
|
+
*/
|
|
686
|
+
type WriteSetChangeDeleteResource = {
|
|
687
|
+
type: string;
|
|
688
|
+
address: string;
|
|
689
|
+
state_key_hash: string;
|
|
690
|
+
resource: string;
|
|
691
|
+
};
|
|
692
|
+
/**
|
|
693
|
+
* The payload for a write set change that deletes a table item.
|
|
694
|
+
*/
|
|
695
|
+
type WriteSetChangeDeleteTableItem = {
|
|
696
|
+
type: string;
|
|
697
|
+
state_key_hash: string;
|
|
698
|
+
handle: string;
|
|
699
|
+
key: string;
|
|
700
|
+
data?: DeletedTableData;
|
|
701
|
+
};
|
|
702
|
+
/**
|
|
703
|
+
* The structure for a write module change in a write set.
|
|
704
|
+
*/
|
|
705
|
+
type WriteSetChangeWriteModule = {
|
|
706
|
+
type: string;
|
|
707
|
+
address: string;
|
|
708
|
+
state_key_hash: string;
|
|
709
|
+
data: MoveModuleBytecode;
|
|
710
|
+
};
|
|
711
|
+
/**
|
|
712
|
+
* The resource associated with a write set change, identified by its type.
|
|
713
|
+
*/
|
|
714
|
+
type WriteSetChangeWriteResource = {
|
|
715
|
+
type: string;
|
|
716
|
+
address: string;
|
|
717
|
+
state_key_hash: string;
|
|
718
|
+
data: MoveResource;
|
|
719
|
+
};
|
|
720
|
+
/**
|
|
721
|
+
* The structure for a write operation on a table in a write set change.
|
|
722
|
+
*/
|
|
723
|
+
type WriteSetChangeWriteTableItem = {
|
|
724
|
+
type: string;
|
|
725
|
+
state_key_hash: string;
|
|
726
|
+
handle: string;
|
|
727
|
+
key: string;
|
|
728
|
+
value: string;
|
|
729
|
+
data?: DecodedTableData;
|
|
730
|
+
};
|
|
731
|
+
/**
|
|
732
|
+
* The decoded data for a table, including its key in JSON format.
|
|
733
|
+
*/
|
|
734
|
+
type DecodedTableData = {
|
|
735
|
+
/**
|
|
736
|
+
* Key of table in JSON
|
|
737
|
+
*/
|
|
738
|
+
key: any;
|
|
739
|
+
/**
|
|
740
|
+
* Type of key
|
|
741
|
+
*/
|
|
742
|
+
key_type: string;
|
|
743
|
+
/**
|
|
744
|
+
* Value of table in JSON
|
|
745
|
+
*/
|
|
746
|
+
value: any;
|
|
747
|
+
/**
|
|
748
|
+
* Type of value
|
|
749
|
+
*/
|
|
750
|
+
value_type: string;
|
|
751
|
+
};
|
|
752
|
+
/**
|
|
753
|
+
* Data for a deleted table entry.
|
|
754
|
+
*/
|
|
755
|
+
type DeletedTableData = {
|
|
756
|
+
/**
|
|
757
|
+
* Deleted key
|
|
758
|
+
*/
|
|
759
|
+
key: any;
|
|
760
|
+
/**
|
|
761
|
+
* Deleted key type
|
|
762
|
+
*/
|
|
763
|
+
key_type: string;
|
|
764
|
+
};
|
|
765
|
+
/**
|
|
766
|
+
* The payload for a transaction response, which can be an entry function, script, or multisig payload.
|
|
767
|
+
*/
|
|
768
|
+
type TransactionPayloadResponse = EntryFunctionPayloadResponse | ScriptPayloadResponse | MultisigPayloadResponse;
|
|
769
|
+
/**
|
|
770
|
+
* The response payload for an entry function, containing the type of the entry.
|
|
771
|
+
*/
|
|
772
|
+
type EntryFunctionPayloadResponse = {
|
|
773
|
+
type: string;
|
|
774
|
+
function: MoveFunctionId;
|
|
775
|
+
/**
|
|
776
|
+
* Type arguments of the function
|
|
777
|
+
*/
|
|
778
|
+
type_arguments: Array<string>;
|
|
779
|
+
/**
|
|
780
|
+
* Arguments of the function
|
|
781
|
+
*/
|
|
782
|
+
arguments: Array<any>;
|
|
783
|
+
};
|
|
784
|
+
/**
|
|
785
|
+
* The payload for a script response, containing the type of the script.
|
|
786
|
+
*/
|
|
787
|
+
type ScriptPayloadResponse = {
|
|
788
|
+
type: string;
|
|
789
|
+
code: MoveScriptBytecode;
|
|
790
|
+
/**
|
|
791
|
+
* Type arguments of the function
|
|
792
|
+
*/
|
|
793
|
+
type_arguments: Array<string>;
|
|
794
|
+
/**
|
|
795
|
+
* Arguments of the function
|
|
796
|
+
*/
|
|
797
|
+
arguments: Array<any>;
|
|
798
|
+
};
|
|
799
|
+
/**
|
|
800
|
+
* The response payload for a multisig transaction, containing the type of the transaction.
|
|
801
|
+
*/
|
|
802
|
+
type MultisigPayloadResponse = {
|
|
803
|
+
type: string;
|
|
804
|
+
multisig_address: string;
|
|
805
|
+
transaction_payload?: EntryFunctionPayloadResponse;
|
|
806
|
+
};
|
|
807
|
+
/**
|
|
808
|
+
* The payload for the genesis block containing the type of the payload.
|
|
809
|
+
*/
|
|
810
|
+
type GenesisPayload = {
|
|
811
|
+
type: string;
|
|
812
|
+
write_set: WriteSet;
|
|
813
|
+
};
|
|
814
|
+
/**
|
|
815
|
+
* The bytecode for a Move script.
|
|
816
|
+
*/
|
|
817
|
+
type MoveScriptBytecode = {
|
|
818
|
+
bytecode: string;
|
|
819
|
+
abi?: MoveFunction;
|
|
820
|
+
};
|
|
821
|
+
/**
|
|
822
|
+
* JSON representations of transaction signatures returned from the node API.
|
|
823
|
+
*/
|
|
824
|
+
type TransactionSignature = TransactionEd25519Signature | TransactionSecp256k1Signature | TransactionMultiEd25519Signature | TransactionMultiAgentSignature | TransactionFeePayerSignature;
|
|
825
|
+
/**
|
|
826
|
+
* Determine if the provided signature is an Ed25519 signature.
|
|
827
|
+
* This function checks for the presence of the "signature" property
|
|
828
|
+
* and verifies that its value is "ed25519_signature".
|
|
829
|
+
*
|
|
830
|
+
* @param signature - The transaction signature to be checked.
|
|
831
|
+
* @returns A boolean indicating whether the signature is an Ed25519 signature.
|
|
832
|
+
*/
|
|
833
|
+
declare function isEd25519Signature(signature: TransactionSignature): signature is TransactionFeePayerSignature;
|
|
834
|
+
/**
|
|
835
|
+
* Determine if the provided signature is a valid secp256k1 ECDSA signature.
|
|
836
|
+
*
|
|
837
|
+
* @param signature - The transaction signature to validate.
|
|
838
|
+
* @returns A boolean indicating whether the signature is a secp256k1 ECDSA signature.
|
|
839
|
+
*/
|
|
840
|
+
declare function isSecp256k1Signature(signature: TransactionSignature): signature is TransactionFeePayerSignature;
|
|
841
|
+
/**
|
|
842
|
+
* Determine if the provided transaction signature is a multi-agent signature.
|
|
843
|
+
*
|
|
844
|
+
* @param signature - The transaction signature to evaluate.
|
|
845
|
+
* @returns A boolean indicating whether the signature is a multi-agent signature.
|
|
846
|
+
*/
|
|
847
|
+
declare function isMultiAgentSignature(signature: TransactionSignature): signature is TransactionMultiAgentSignature;
|
|
848
|
+
/**
|
|
849
|
+
* Determine if the provided signature is a fee payer signature.
|
|
850
|
+
*
|
|
851
|
+
* @param signature - The transaction signature to evaluate.
|
|
852
|
+
* @returns A boolean indicating whether the signature is a fee payer signature.
|
|
853
|
+
*/
|
|
854
|
+
declare function isFeePayerSignature(signature: TransactionSignature): signature is TransactionFeePayerSignature;
|
|
855
|
+
/**
|
|
856
|
+
* Determine if the provided signature is of type "multi_ed25519_signature".
|
|
857
|
+
*
|
|
858
|
+
* @param signature - The transaction signature to check.
|
|
859
|
+
* @returns A boolean indicating whether the signature is a multi-ed25519 signature.
|
|
860
|
+
*/
|
|
861
|
+
declare function isMultiEd25519Signature(signature: TransactionSignature): signature is TransactionMultiEd25519Signature;
|
|
862
|
+
/**
|
|
863
|
+
* The signature for a transaction using the Ed25519 algorithm.
|
|
864
|
+
*/
|
|
865
|
+
type TransactionEd25519Signature = {
|
|
866
|
+
type: string;
|
|
867
|
+
public_key: string;
|
|
868
|
+
signature: "ed25519_signature";
|
|
869
|
+
};
|
|
870
|
+
/**
|
|
871
|
+
* The structure for a Secp256k1 signature in a transaction.
|
|
872
|
+
*/
|
|
873
|
+
type TransactionSecp256k1Signature = {
|
|
874
|
+
type: string;
|
|
875
|
+
public_key: string;
|
|
876
|
+
signature: "secp256k1_ecdsa_signature";
|
|
877
|
+
};
|
|
878
|
+
/**
|
|
879
|
+
* The structure for a multi-signature transaction using Ed25519.
|
|
880
|
+
*/
|
|
881
|
+
type TransactionMultiEd25519Signature = {
|
|
882
|
+
type: "multi_ed25519_signature";
|
|
883
|
+
/**
|
|
884
|
+
* The public keys for the Ed25519 signature
|
|
885
|
+
*/
|
|
886
|
+
public_keys: Array<string>;
|
|
887
|
+
/**
|
|
888
|
+
* Signature associated with the public keys in the same order
|
|
889
|
+
*/
|
|
890
|
+
signatures: Array<string>;
|
|
891
|
+
/**
|
|
892
|
+
* The number of signatures required for a successful transaction
|
|
893
|
+
*/
|
|
894
|
+
threshold: number;
|
|
895
|
+
bitmap: string;
|
|
896
|
+
};
|
|
897
|
+
/**
|
|
898
|
+
* The structure for a multi-agent signature in a transaction.
|
|
899
|
+
*/
|
|
900
|
+
type TransactionMultiAgentSignature = {
|
|
901
|
+
type: "multi_agent_signature";
|
|
902
|
+
sender: AccountSignature;
|
|
903
|
+
/**
|
|
904
|
+
* The other involved parties' addresses
|
|
905
|
+
*/
|
|
906
|
+
secondary_signer_addresses: Array<string>;
|
|
907
|
+
/**
|
|
908
|
+
* The associated signatures, in the same order as the secondary addresses
|
|
909
|
+
*/
|
|
910
|
+
secondary_signers: Array<AccountSignature>;
|
|
911
|
+
};
|
|
912
|
+
/**
|
|
913
|
+
* The signature of the fee payer in a transaction.
|
|
914
|
+
*/
|
|
915
|
+
type TransactionFeePayerSignature = {
|
|
916
|
+
type: "fee_payer_signature";
|
|
917
|
+
sender: AccountSignature;
|
|
918
|
+
/**
|
|
919
|
+
* The other involved parties' addresses
|
|
920
|
+
*/
|
|
921
|
+
secondary_signer_addresses: Array<string>;
|
|
922
|
+
/**
|
|
923
|
+
* The associated signatures, in the same order as the secondary addresses
|
|
924
|
+
*/
|
|
925
|
+
secondary_signers: Array<AccountSignature>;
|
|
926
|
+
fee_payer_address: string;
|
|
927
|
+
fee_payer_signer: AccountSignature;
|
|
928
|
+
};
|
|
929
|
+
/**
|
|
930
|
+
* The union of all single account signatures, including Ed25519, Secp256k1, and MultiEd25519 signatures.
|
|
931
|
+
*/
|
|
932
|
+
type AccountSignature = TransactionEd25519Signature | TransactionSecp256k1Signature | TransactionMultiEd25519Signature;
|
|
933
|
+
type WriteSet = ScriptWriteSet | DirectWriteSet;
|
|
934
|
+
/**
|
|
935
|
+
* The set of properties for writing scripts, including the type of script.
|
|
936
|
+
*/
|
|
937
|
+
type ScriptWriteSet = {
|
|
938
|
+
type: string;
|
|
939
|
+
execute_as: string;
|
|
940
|
+
script: ScriptPayloadResponse;
|
|
941
|
+
};
|
|
942
|
+
/**
|
|
943
|
+
* The set of direct write operations, identified by a type string.
|
|
944
|
+
*/
|
|
945
|
+
type DirectWriteSet = {
|
|
946
|
+
type: string;
|
|
947
|
+
changes: Array<WriteSetChange>;
|
|
948
|
+
events: Array<Event>;
|
|
949
|
+
};
|
|
950
|
+
/**
|
|
951
|
+
* The structure for an event's unique identifier, including its creation number.
|
|
952
|
+
*/
|
|
953
|
+
/**
|
|
954
|
+
* The structure for an event, identified by a unique GUID.
|
|
955
|
+
*/
|
|
956
|
+
type EventGuid = {
|
|
957
|
+
creation_number: string;
|
|
958
|
+
account_address: string;
|
|
959
|
+
};
|
|
960
|
+
type Event = {
|
|
961
|
+
guid: EventGuid;
|
|
962
|
+
sequence_number: string;
|
|
963
|
+
type: string;
|
|
964
|
+
/**
|
|
965
|
+
* The JSON representation of the event
|
|
966
|
+
*/
|
|
967
|
+
data: any;
|
|
968
|
+
};
|
|
969
|
+
/**
|
|
970
|
+
* A number representing a Move uint8 type.
|
|
971
|
+
*/
|
|
972
|
+
type MoveUint8Type = number;
|
|
973
|
+
/**
|
|
974
|
+
* A 16-bit unsigned integer used in the Move programming language.
|
|
975
|
+
*/
|
|
976
|
+
type MoveUint16Type = number;
|
|
977
|
+
/**
|
|
978
|
+
* A 32-bit unsigned integer type used in Move programming.
|
|
979
|
+
*/
|
|
980
|
+
type MoveUint32Type = number;
|
|
981
|
+
/**
|
|
982
|
+
* A string representation of a 64-bit unsigned integer used in Move programming.
|
|
983
|
+
*/
|
|
984
|
+
type MoveUint64Type = string;
|
|
985
|
+
/**
|
|
986
|
+
* A string representing a 128-bit unsigned integer in the Move programming language.
|
|
987
|
+
*/
|
|
988
|
+
type MoveUint128Type = string;
|
|
989
|
+
/**
|
|
990
|
+
* A string representation of a 256-bit unsigned integer used in Move programming.
|
|
991
|
+
*/
|
|
992
|
+
type MoveUint256Type = string;
|
|
993
|
+
/**
|
|
994
|
+
* A string representing a Move address.
|
|
995
|
+
*/
|
|
996
|
+
type MoveAddressType = string;
|
|
997
|
+
/**
|
|
998
|
+
* The type for identifying objects to be moved within the system.
|
|
999
|
+
*/
|
|
1000
|
+
type MoveObjectType = string;
|
|
1001
|
+
/**
|
|
1002
|
+
* The type for move options, which can be a MoveType, null, or undefined.
|
|
1003
|
+
*/
|
|
1004
|
+
type MoveOptionType = MoveType | null | undefined;
|
|
1005
|
+
/**
|
|
1006
|
+
* A structure representing a move with a name.
|
|
1007
|
+
*/
|
|
1008
|
+
type MoveStructId = `${string}::${string}::${string}`;
|
|
1009
|
+
/**
|
|
1010
|
+
* The move function containing its name. Same as MoveStructId since it reads weird to take a StructId for a Function.
|
|
1011
|
+
*/
|
|
1012
|
+
type MoveFunctionId = MoveStructId;
|
|
1013
|
+
type MoveStructType = {};
|
|
1014
|
+
/**
|
|
1015
|
+
* A union type that encompasses various data types used in Move, including primitive types, address types, object types, and
|
|
1016
|
+
* arrays of MoveType.
|
|
1017
|
+
*/
|
|
1018
|
+
type MoveType = boolean | string | MoveUint8Type | MoveUint16Type | MoveUint32Type | MoveUint64Type | MoveUint128Type | MoveUint256Type | MoveAddressType | MoveObjectType | MoveStructType | Array<MoveType>;
|
|
1019
|
+
/**
|
|
1020
|
+
* Possible Move values acceptable by move functions (entry, view)
|
|
1021
|
+
*
|
|
1022
|
+
* Map of a Move value to the corresponding TypeScript value
|
|
1023
|
+
*
|
|
1024
|
+
* `Bool -> boolean`
|
|
1025
|
+
*
|
|
1026
|
+
* `u8, u16, u32 -> number`
|
|
1027
|
+
*
|
|
1028
|
+
* `u64, u128, u256 -> string`
|
|
1029
|
+
*
|
|
1030
|
+
* `String -> string`
|
|
1031
|
+
*
|
|
1032
|
+
* `Address -> 0x${string}`
|
|
1033
|
+
*
|
|
1034
|
+
* `Struct - 0x${string}::${string}::${string}`
|
|
1035
|
+
*
|
|
1036
|
+
* `Object -> 0x${string}`
|
|
1037
|
+
*
|
|
1038
|
+
* `Vector -> Array<MoveValue>`
|
|
1039
|
+
*
|
|
1040
|
+
* `Option -> MoveValue | null | undefined`
|
|
1041
|
+
*/
|
|
1042
|
+
type MoveValue = boolean | string | MoveUint8Type | MoveUint16Type | MoveUint32Type | MoveUint64Type | MoveUint128Type | MoveUint256Type | MoveAddressType | MoveObjectType | MoveStructId | MoveOptionType | Array<MoveValue>;
|
|
1043
|
+
/**
|
|
1044
|
+
* A string representation of a Move module, formatted as `module_name::function_name`.
|
|
1045
|
+
* Module names are case-sensitive.
|
|
1046
|
+
*/
|
|
1047
|
+
type MoveModuleId = `${string}::${string}`;
|
|
1048
|
+
/**
|
|
1049
|
+
* Specifies the visibility levels for move functions, controlling access permissions.
|
|
1050
|
+
*/
|
|
1051
|
+
declare enum MoveFunctionVisibility {
|
|
1052
|
+
PRIVATE = "private",
|
|
1053
|
+
PUBLIC = "public",
|
|
1054
|
+
FRIEND = "friend"
|
|
1055
|
+
}
|
|
1056
|
+
/**
|
|
1057
|
+
* Abilities related to moving items within the system.
|
|
1058
|
+
*/
|
|
1059
|
+
declare enum MoveAbility {
|
|
1060
|
+
STORE = "store",
|
|
1061
|
+
DROP = "drop",
|
|
1062
|
+
KEY = "key",
|
|
1063
|
+
COPY = "copy"
|
|
1064
|
+
}
|
|
1065
|
+
/**
|
|
1066
|
+
* Move abilities associated with the generic type parameter of a function.
|
|
1067
|
+
*/
|
|
1068
|
+
type MoveFunctionGenericTypeParam = {
|
|
1069
|
+
constraints: Array<MoveAbility>;
|
|
1070
|
+
};
|
|
1071
|
+
/**
|
|
1072
|
+
* A field in a Move struct, identified by its name.
|
|
1073
|
+
*/
|
|
1074
|
+
type MoveStructField = {
|
|
1075
|
+
name: string;
|
|
1076
|
+
type: string;
|
|
1077
|
+
};
|
|
1078
|
+
/**
|
|
1079
|
+
* A Move module
|
|
1080
|
+
*/
|
|
1081
|
+
type MoveModule = {
|
|
1082
|
+
address: string;
|
|
1083
|
+
name: string;
|
|
1084
|
+
/**
|
|
1085
|
+
* Friends of the module
|
|
1086
|
+
*/
|
|
1087
|
+
friends: Array<MoveModuleId>;
|
|
1088
|
+
/**
|
|
1089
|
+
* Public functions of the module
|
|
1090
|
+
*/
|
|
1091
|
+
exposed_functions: Array<MoveFunction>;
|
|
1092
|
+
/**
|
|
1093
|
+
* Structs of the module
|
|
1094
|
+
*/
|
|
1095
|
+
structs: Array<MoveStruct>;
|
|
1096
|
+
};
|
|
1097
|
+
/**
|
|
1098
|
+
* A move struct
|
|
1099
|
+
*/
|
|
1100
|
+
type MoveStruct = {
|
|
1101
|
+
name: string;
|
|
1102
|
+
/**
|
|
1103
|
+
* Whether the struct is a native struct of Move
|
|
1104
|
+
*/
|
|
1105
|
+
is_native: boolean;
|
|
1106
|
+
/**
|
|
1107
|
+
* Whether the struct is a module event (aka v2 event). This will be false for v1
|
|
1108
|
+
* events because the value is derived from the #[event] attribute on the struct in
|
|
1109
|
+
* the Move source code. This attribute is only relevant for v2 events.
|
|
1110
|
+
*/
|
|
1111
|
+
is_event: boolean;
|
|
1112
|
+
/**
|
|
1113
|
+
* Abilities associated with the struct
|
|
1114
|
+
*/
|
|
1115
|
+
abilities: Array<MoveAbility>;
|
|
1116
|
+
/**
|
|
1117
|
+
* Generic types associated with the struct
|
|
1118
|
+
*/
|
|
1119
|
+
generic_type_params: Array<MoveFunctionGenericTypeParam>;
|
|
1120
|
+
/**
|
|
1121
|
+
* Fields associated with the struct
|
|
1122
|
+
*/
|
|
1123
|
+
fields: Array<MoveStructField>;
|
|
1124
|
+
};
|
|
1125
|
+
/**
|
|
1126
|
+
* Move function
|
|
1127
|
+
*/
|
|
1128
|
+
type MoveFunction = {
|
|
1129
|
+
name: string;
|
|
1130
|
+
visibility: MoveFunctionVisibility;
|
|
1131
|
+
/**
|
|
1132
|
+
* Whether the function can be called as an entry function directly in a transaction
|
|
1133
|
+
*/
|
|
1134
|
+
is_entry: boolean;
|
|
1135
|
+
/**
|
|
1136
|
+
* Whether the function is a view function or not
|
|
1137
|
+
*/
|
|
1138
|
+
is_view: boolean;
|
|
1139
|
+
/**
|
|
1140
|
+
* Generic type params associated with the Move function
|
|
1141
|
+
*/
|
|
1142
|
+
generic_type_params: Array<MoveFunctionGenericTypeParam>;
|
|
1143
|
+
/**
|
|
1144
|
+
* Parameters associated with the move function
|
|
1145
|
+
*/
|
|
1146
|
+
params: Array<string>;
|
|
1147
|
+
/**
|
|
1148
|
+
* Return type of the function
|
|
1149
|
+
*/
|
|
1150
|
+
return: Array<string>;
|
|
1151
|
+
};
|
|
1152
|
+
/**
|
|
1153
|
+
* Roles that can be assigned within the system, indicating different levels of access and functionality.
|
|
1154
|
+
*/
|
|
1155
|
+
declare enum RoleType {
|
|
1156
|
+
VALIDATOR = "validator",
|
|
1157
|
+
FULL_NODE = "full_node"
|
|
1158
|
+
}
|
|
1159
|
+
/**
|
|
1160
|
+
* Information about the current blockchain ledger, including its chain ID.
|
|
1161
|
+
*/
|
|
1162
|
+
type LedgerInfo = {
|
|
1163
|
+
/**
|
|
1164
|
+
* Chain ID of the current chain
|
|
1165
|
+
*/
|
|
1166
|
+
chain_id: number;
|
|
1167
|
+
epoch: string;
|
|
1168
|
+
ledger_version: string;
|
|
1169
|
+
oldest_ledger_version: string;
|
|
1170
|
+
ledger_timestamp: string;
|
|
1171
|
+
node_role: RoleType;
|
|
1172
|
+
oldest_block_height: string;
|
|
1173
|
+
block_height: string;
|
|
1174
|
+
/**
|
|
1175
|
+
* Git hash of the build of the API endpoint. Can be used to determine the exact
|
|
1176
|
+
* software version used by the API endpoint.
|
|
1177
|
+
*/
|
|
1178
|
+
git_hash?: string;
|
|
1179
|
+
};
|
|
1180
|
+
/**
|
|
1181
|
+
* A Block type
|
|
1182
|
+
*/
|
|
1183
|
+
type Block = {
|
|
1184
|
+
block_height: string;
|
|
1185
|
+
block_hash: string;
|
|
1186
|
+
block_timestamp: string;
|
|
1187
|
+
first_version: string;
|
|
1188
|
+
last_version: string;
|
|
1189
|
+
/**
|
|
1190
|
+
* The transactions in the block in sequential order
|
|
1191
|
+
*/
|
|
1192
|
+
transactions?: Array<TransactionResponse>;
|
|
1193
|
+
};
|
|
1194
|
+
/**
|
|
1195
|
+
* The request payload for the GetTableItem API.
|
|
1196
|
+
*/
|
|
1197
|
+
type TableItemRequest = {
|
|
1198
|
+
key_type: MoveValue;
|
|
1199
|
+
value_type: MoveValue;
|
|
1200
|
+
/**
|
|
1201
|
+
* The value of the table item's key
|
|
1202
|
+
*/
|
|
1203
|
+
key: any;
|
|
1204
|
+
};
|
|
1205
|
+
/**
|
|
1206
|
+
* A list of supported Authentication Key schemes in Aptos, consisting of combinations of signing schemes and derive schemes.
|
|
1207
|
+
*/
|
|
1208
|
+
type AuthenticationKeyScheme = SigningScheme | DeriveScheme;
|
|
1209
|
+
/**
|
|
1210
|
+
* Different schemes for signing keys used in cryptographic operations.
|
|
1211
|
+
*/
|
|
1212
|
+
declare enum SigningScheme {
|
|
1213
|
+
/**
|
|
1214
|
+
* For Ed25519PublicKey
|
|
1215
|
+
*/
|
|
1216
|
+
Ed25519 = 0,
|
|
1217
|
+
/**
|
|
1218
|
+
* For MultiEd25519PublicKey
|
|
1219
|
+
*/
|
|
1220
|
+
MultiEd25519 = 1,
|
|
1221
|
+
/**
|
|
1222
|
+
* For SingleKey ecdsa
|
|
1223
|
+
*/
|
|
1224
|
+
SingleKey = 2,
|
|
1225
|
+
MultiKey = 3
|
|
1226
|
+
}
|
|
1227
|
+
/**
|
|
1228
|
+
* Specifies the signing schemes available for cryptographic operations.
|
|
1229
|
+
*/
|
|
1230
|
+
declare enum SigningSchemeInput {
|
|
1231
|
+
/**
|
|
1232
|
+
* For Ed25519PublicKey
|
|
1233
|
+
*/
|
|
1234
|
+
Ed25519 = 0,
|
|
1235
|
+
/**
|
|
1236
|
+
* For Secp256k1Ecdsa
|
|
1237
|
+
*/
|
|
1238
|
+
Secp256k1Ecdsa = 2
|
|
1239
|
+
}
|
|
1240
|
+
/**
|
|
1241
|
+
* Specifies the schemes for deriving account addresses from various data sources.
|
|
1242
|
+
*/
|
|
1243
|
+
declare enum DeriveScheme {
|
|
1244
|
+
/**
|
|
1245
|
+
* Derives an address using an AUID, used for objects
|
|
1246
|
+
*/
|
|
1247
|
+
DeriveAuid = 251,
|
|
1248
|
+
/**
|
|
1249
|
+
* Derives an address from another object address
|
|
1250
|
+
*/
|
|
1251
|
+
DeriveObjectAddressFromObject = 252,
|
|
1252
|
+
/**
|
|
1253
|
+
* Derives an address from a GUID, used for objects
|
|
1254
|
+
*/
|
|
1255
|
+
DeriveObjectAddressFromGuid = 253,
|
|
1256
|
+
/**
|
|
1257
|
+
* Derives an address from seed bytes, used for named objects
|
|
1258
|
+
*/
|
|
1259
|
+
DeriveObjectAddressFromSeed = 254,
|
|
1260
|
+
/**
|
|
1261
|
+
* Derives an address from seed bytes, used for resource accounts
|
|
1262
|
+
*/
|
|
1263
|
+
DeriveResourceAccountAddress = 255
|
|
1264
|
+
}
|
|
1265
|
+
/**
|
|
1266
|
+
* Options for configuring the behavior of the waitForTransaction() function.
|
|
1267
|
+
*/
|
|
1268
|
+
type WaitForTransactionOptions = {
|
|
1269
|
+
timeoutSecs?: number;
|
|
1270
|
+
checkSuccess?: boolean;
|
|
1271
|
+
waitForIndexer?: boolean;
|
|
1272
|
+
};
|
|
1273
|
+
/**
|
|
1274
|
+
* Input type to generate an account using the Ed25519 signing scheme.
|
|
1275
|
+
*/
|
|
1276
|
+
type GenerateAccountWithEd25519 = {
|
|
1277
|
+
scheme: SigningSchemeInput.Ed25519;
|
|
1278
|
+
legacy: boolean;
|
|
1279
|
+
};
|
|
1280
|
+
/**
|
|
1281
|
+
* Input type to generate an account with a Single Signer using Secp256k1.
|
|
1282
|
+
*/
|
|
1283
|
+
type GenerateAccountWithSingleSignerSecp256k1Key = {
|
|
1284
|
+
scheme: SigningSchemeInput.Secp256k1Ecdsa;
|
|
1285
|
+
legacy?: false;
|
|
1286
|
+
};
|
|
1287
|
+
type GenerateAccount = GenerateAccountWithEd25519 | GenerateAccountWithSingleSignerSecp256k1Key;
|
|
1288
|
+
|
|
1289
|
+
export { AccountAuthenticatorVariant, type AccountData, type AccountSignature, type AnyNumber, AnyPublicKeyVariant, AnySignatureVariant, type AptosRequest, type AptosResponse, type AptosSettings, type AuthenticationKeyScheme, type Block, type BlockEndInfo, type BlockEpilogueTransactionResponse, type BlockMetadataTransactionResponse, type Client, type ClientConfig, type ClientHeadersType, type ClientRequest, type ClientResponse, type CommittedTransactionResponse, type DecodedTableData, type DeletedTableData, DeriveScheme, type DirectWriteSet, type EntryFunctionPayloadResponse, EphemeralCertificateVariant, EphemeralPublicKeyVariant, EphemeralSignatureVariant, type Event, type EventGuid, type FaucetConfig, type FullNodeConfig, type GasEstimation, type GenerateAccount, type GenerateAccountWithEd25519, type GenerateAccountWithSingleSignerSecp256k1Key, type GenesisPayload, type GenesisTransactionResponse, type HexInput, type IndexerConfig, 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, type OrderByArg, type PaginationArgs, type PendingTransactionResponse, PrivateKeyVariants, RoleType, type ScriptPayloadResponse, ScriptTransactionArgumentVariants, type ScriptWriteSet, SigningScheme, SigningSchemeInput, type StateCheckpointTransactionResponse, type TableItemRequest, 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 WaitForTransactionOptions, type WhereArg, type WriteSet, type WriteSetChange, type WriteSetChangeDeleteModule, type WriteSetChangeDeleteResource, type WriteSetChangeDeleteTableItem, type WriteSetChangeWriteModule, type WriteSetChangeWriteResource, type WriteSetChangeWriteTableItem, ZkpVariant, isBlockEpilogueTransactionResponse, isBlockMetadataTransactionResponse, isEd25519Signature, isFeePayerSignature, isGenesisTransactionResponse, isMultiAgentSignature, isMultiEd25519Signature, isPendingTransactionResponse, isSecp256k1Signature, isStateCheckpointTransactionResponse, isUserTransactionResponse, isValidatorTransactionResponse };
|