@aptos-labs/ts-sdk 1.14.0 → 1.15.0-win.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/dist/common/{accountAddress-csDQ8Gnp.d.ts → accountAddress-ccLvlUQe.d.ts} +20 -1
- 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 +1624 -1390
- package/dist/common/index.js +42 -13
- package/dist/common/index.js.map +1 -1
- package/dist/esm/{Ed25519Account--qjfup2u.d.mts → Ed25519Account-B1VMJOY2.d.mts} +77 -10
- package/dist/esm/account/Account.d.mts +34 -0
- package/dist/esm/account/Account.mjs +2 -0
- package/dist/esm/account/Ed25519Account.d.mts +34 -0
- package/dist/esm/account/Ed25519Account.mjs +2 -0
- package/dist/esm/account/MultiKeyAccount.d.mts +133 -0
- package/dist/esm/account/MultiKeyAccount.mjs +2 -0
- package/dist/esm/account/SingleKeyAccount.d.mts +34 -0
- package/dist/esm/account/SingleKeyAccount.mjs +2 -0
- package/dist/esm/account/index.d.mts +35 -0
- package/dist/esm/account/index.mjs +2 -0
- package/dist/esm/api/account.d.mts +14 -2
- 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 +11 -9
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/coin.d.mts +7 -7
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.d.mts +2 -2
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/event.mjs +1 -1
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.d.mts +6 -6
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.d.mts +8 -33
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +10 -9
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/table.d.mts +84 -0
- package/dist/esm/api/table.mjs +2 -0
- package/dist/esm/api/transaction.d.mts +2 -2
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.d.mts +2 -2
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.d.mts +9 -9
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.d.mts +2 -2
- 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 +7 -7
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.d.mts +1 -1
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/bcs/serializer.mjs +1 -1
- package/dist/esm/{chunk-PYXJYEAC.mjs → chunk-2ENDAFGG.mjs} +2 -2
- package/dist/esm/chunk-2ENDAFGG.mjs.map +1 -0
- package/dist/esm/{chunk-XO3HHRJV.mjs → chunk-2O5VFH5O.mjs} +2 -2
- package/dist/esm/{chunk-PXFIA4BL.mjs → chunk-2XK53QFA.mjs} +2 -2
- package/dist/esm/chunk-2ZGHK5BB.mjs +2 -0
- package/dist/esm/chunk-2ZGHK5BB.mjs.map +1 -0
- package/dist/esm/chunk-324M4MB2.mjs +2 -0
- package/dist/esm/chunk-324M4MB2.mjs.map +1 -0
- package/dist/esm/{chunk-RHBCVCOS.mjs → chunk-35EWRSDK.mjs} +2 -2
- package/dist/esm/{chunk-52C73T26.mjs → chunk-36QXVFR5.mjs} +2 -2
- package/dist/esm/{chunk-WCVUDO5S.mjs → chunk-3B6IKORV.mjs} +2 -2
- package/dist/esm/{chunk-CDB34C4N.mjs → chunk-3UGVM4HI.mjs} +2 -2
- package/dist/esm/chunk-3UGVM4HI.mjs.map +1 -0
- package/dist/esm/chunk-3W3BU5BL.mjs +2 -0
- package/dist/esm/chunk-3W3BU5BL.mjs.map +1 -0
- package/dist/esm/chunk-4NHWV5AI.mjs +2 -0
- package/dist/esm/{chunk-HWECUBBA.mjs → chunk-4RZT6HZR.mjs} +2 -2
- package/dist/esm/chunk-4RZT6HZR.mjs.map +1 -0
- package/dist/esm/chunk-4YN7NTBQ.mjs +2 -0
- package/dist/esm/chunk-4YN7NTBQ.mjs.map +1 -0
- package/dist/esm/{chunk-5HY3DEPF.mjs → chunk-5CEZFZHP.mjs} +2 -2
- package/dist/esm/{chunk-NPFNYP75.mjs → chunk-5EN52MUT.mjs} +2 -2
- package/dist/esm/chunk-5LZ66XGE.mjs +2 -0
- package/dist/esm/chunk-5LZ66XGE.mjs.map +1 -0
- package/dist/esm/chunk-5PQHXE4N.mjs +2 -0
- package/dist/esm/chunk-5PQHXE4N.mjs.map +1 -0
- package/dist/esm/chunk-5Y2AZJBC.mjs +2 -0
- package/dist/esm/chunk-5Y2AZJBC.mjs.map +1 -0
- package/dist/esm/chunk-6BIXMATF.mjs +2 -0
- package/dist/esm/chunk-6BIXMATF.mjs.map +1 -0
- package/dist/esm/{chunk-BE4FOV6X.mjs → chunk-6E23TANW.mjs} +2 -2
- package/dist/esm/{chunk-6OV2PQS5.mjs → chunk-6IKL4CPY.mjs} +2 -2
- package/dist/esm/chunk-7PPN3XDQ.mjs +2 -0
- package/dist/esm/{chunk-HG4Q4EFG.mjs → chunk-7T77PZGU.mjs} +2 -2
- package/dist/esm/chunk-7T77PZGU.mjs.map +1 -0
- package/dist/esm/chunk-7VRZLDIJ.mjs +2 -0
- package/dist/esm/chunk-A7EISBPY.mjs +2 -0
- package/dist/esm/chunk-A7EISBPY.mjs.map +1 -0
- package/dist/esm/chunk-B7X6PSE7.mjs +2 -0
- package/dist/esm/{chunk-AOCNYMMX.mjs → chunk-BCUSI3N6.mjs} +2 -2
- package/dist/esm/{chunk-BAV4XY7C.mjs → chunk-BHLICYAI.mjs} +2 -2
- package/dist/esm/chunk-BO2TLWNT.mjs +2 -0
- package/dist/esm/{chunk-N77VJHW5.mjs → chunk-C22QZ32Q.mjs} +2 -2
- package/dist/esm/chunk-CEHCDA3G.mjs +2 -0
- package/dist/esm/chunk-CJDEPZ4J.mjs +2 -0
- package/dist/esm/{chunk-CPBGL37X.mjs.map → chunk-CJDEPZ4J.mjs.map} +1 -1
- package/dist/esm/chunk-EKOTTHRQ.mjs +2 -0
- package/dist/esm/chunk-EKOTTHRQ.mjs.map +1 -0
- package/dist/esm/chunk-F7EMGK4M.mjs +2 -0
- package/dist/esm/{chunk-PMUT3HZE.mjs → chunk-G2RMTVZG.mjs} +2 -2
- package/dist/esm/chunk-G2RMTVZG.mjs.map +1 -0
- package/dist/esm/{chunk-FS3NSGBF.mjs → chunk-G56GPLTB.mjs} +2 -2
- package/dist/esm/{chunk-6FBKUTGF.mjs → chunk-GHYE26Q5.mjs} +2 -2
- package/dist/esm/{chunk-QTRYMRYK.mjs → chunk-GM56MMNJ.mjs} +2 -2
- package/dist/esm/{chunk-2G4ZSGL4.mjs → chunk-GZIOZUKM.mjs} +2 -2
- package/dist/esm/{chunk-SPU745XV.mjs → chunk-HXGEF7O7.mjs} +2 -2
- package/dist/esm/{chunk-O4JRPZZM.mjs → chunk-I6ST47U7.mjs} +2 -2
- package/dist/esm/{chunk-4P5EKAJB.mjs → chunk-IZZ6BA56.mjs} +2 -2
- package/dist/esm/chunk-JFIAWBCK.mjs +2 -0
- package/dist/esm/chunk-JFIAWBCK.mjs.map +1 -0
- package/dist/esm/chunk-JPNTJOQW.mjs +2 -0
- package/dist/esm/chunk-JXCZTOYC.mjs +1 -0
- package/dist/esm/chunk-JXCZTOYC.mjs.map +1 -0
- package/dist/esm/{chunk-UML2VQZT.mjs → chunk-KAGLWBIJ.mjs} +2 -2
- package/dist/esm/chunk-KLTQSLDY.mjs +2 -0
- package/dist/esm/chunk-KLTQSLDY.mjs.map +1 -0
- package/dist/esm/{chunk-AT2A6UGB.mjs → chunk-KNSIJJS3.mjs} +2 -2
- package/dist/esm/{chunk-AT2A6UGB.mjs.map → chunk-KNSIJJS3.mjs.map} +1 -1
- package/dist/esm/{chunk-L5IL2IAB.mjs → chunk-L5KHEQW5.mjs} +2 -2
- package/dist/esm/chunk-LG7RJQ57.mjs +2 -0
- package/dist/esm/{chunk-QD2Y3VK4.mjs → chunk-MI73LIB3.mjs} +2 -2
- package/dist/esm/chunk-MI73LIB3.mjs.map +1 -0
- package/dist/esm/{chunk-U43IJHQN.mjs → chunk-MJPUASSD.mjs} +2 -2
- package/dist/esm/chunk-MVHGVOOC.mjs +2 -0
- package/dist/esm/chunk-MVHGVOOC.mjs.map +1 -0
- package/dist/esm/chunk-N3U47Y6Y.mjs +2 -0
- package/dist/esm/{chunk-P3UFJZY5.mjs → chunk-NOYKXLFN.mjs} +2 -2
- package/dist/esm/chunk-NOYKXLFN.mjs.map +1 -0
- package/dist/esm/chunk-NSZALM2Q.mjs +2 -0
- package/dist/esm/chunk-NSZALM2Q.mjs.map +1 -0
- package/dist/esm/{chunk-UPIN5AIO.mjs → chunk-P6GWG2CY.mjs} +2 -2
- package/dist/esm/chunk-PF57EOJY.mjs +2 -0
- package/dist/esm/{chunk-RW2A63WK.mjs → chunk-PGCCXIAS.mjs} +2 -2
- package/dist/esm/chunk-PGCCXIAS.mjs.map +1 -0
- package/dist/esm/chunk-PHRX2SAA.mjs +2 -0
- package/dist/esm/chunk-PHRX2SAA.mjs.map +1 -0
- package/dist/esm/{chunk-3YZGJLW7.mjs → chunk-PI2NFZEH.mjs} +2 -2
- package/dist/esm/{chunk-IOSQVDZI.mjs → chunk-QRS4DGP3.mjs} +2 -2
- package/dist/esm/{chunk-IOSQVDZI.mjs.map → chunk-QRS4DGP3.mjs.map} +1 -1
- package/dist/esm/{chunk-LDQ6JFEF.mjs → chunk-QSHLNSUP.mjs} +2 -2
- package/dist/esm/{chunk-LDQ6JFEF.mjs.map → chunk-QSHLNSUP.mjs.map} +1 -1
- package/dist/esm/chunk-R2LYYO6V.mjs +2 -0
- package/dist/esm/chunk-R2LYYO6V.mjs.map +1 -0
- package/dist/esm/chunk-RFSO3JRG.mjs +1 -0
- package/dist/esm/chunk-RFSO3JRG.mjs.map +1 -0
- package/dist/esm/{chunk-APDALGDD.mjs → chunk-S2VSJJRJ.mjs} +2 -2
- package/dist/esm/{chunk-S4SEFF4K.mjs → chunk-S3EDNXZE.mjs} +46 -17
- package/dist/esm/chunk-S3EDNXZE.mjs.map +1 -0
- package/dist/esm/chunk-S7TAYRDR.mjs +2 -0
- package/dist/esm/chunk-S7TAYRDR.mjs.map +1 -0
- package/dist/esm/chunk-SFM5C2IG.mjs +2 -0
- package/dist/esm/{chunk-CNMQNPNV.mjs → chunk-SGTNW5YI.mjs} +2 -2
- package/dist/esm/chunk-SRDIYE3M.mjs +2 -0
- package/dist/esm/{chunk-QIAHBEEW.mjs.map → chunk-SRDIYE3M.mjs.map} +1 -1
- package/dist/esm/{chunk-DMKUAQB7.mjs → chunk-U3YYSIIT.mjs} +2 -2
- package/dist/esm/chunk-UGPALAPN.mjs +2 -0
- package/dist/esm/{chunk-BIAEC6FO.mjs → chunk-UM35A7RD.mjs} +2 -2
- package/dist/esm/chunk-UO3NZ5AH.mjs +1 -0
- package/dist/esm/chunk-UO3NZ5AH.mjs.map +1 -0
- package/dist/esm/{chunk-FXNFWLQC.mjs → chunk-UPSCPEEE.mjs} +2 -2
- package/dist/esm/{chunk-S2LTZKM4.mjs → chunk-VGGYFJUY.mjs} +2 -2
- package/dist/esm/{chunk-JCD72AW7.mjs → chunk-YK732P36.mjs} +2 -2
- package/dist/esm/{chunk-UDRSFVAK.mjs → chunk-YMB2XW2O.mjs} +2 -2
- package/dist/esm/{chunk-NWYIE7ZX.mjs → chunk-YZHIXVPR.mjs} +2 -2
- package/dist/esm/chunk-ZGF45HCL.mjs +2 -0
- package/dist/esm/chunk-ZGF45HCL.mjs.map +1 -0
- package/dist/esm/cli/index.d.mts +1 -1
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/cli/move.d.mts +1 -1
- package/dist/esm/cli/move.mjs +1 -1
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/client/types.mjs +1 -1
- package/dist/esm/core/account/index.d.mts +5 -14
- package/dist/esm/core/account/index.mjs +1 -1
- package/dist/esm/core/account/utils/address.mjs +1 -1
- package/dist/esm/core/account/utils/index.mjs +1 -1
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.d.mts +1 -1
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/common.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.d.mts +1 -1
- package/dist/esm/core/crypto/ed25519.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/multiEd25519.d.mts +1 -1
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.d.mts +8 -1
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/privateKey.d.mts +1 -1
- package/dist/esm/core/crypto/publicKey.d.mts +1 -1
- package/dist/esm/core/crypto/publicKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.d.mts +1 -1
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.d.mts +1 -1
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/crypto/utils.mjs +1 -1
- package/dist/esm/core/hex.mjs +1 -1
- package/dist/esm/core/index.d.mts +3 -6
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/index.d.mts +7 -5
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/account.d.mts +14 -2
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.d.mts +3 -3
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.d.mts +8 -8
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.d.mts +3 -3
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/event.d.mts +1 -1
- 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 +6 -6
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.d.mts +2 -8
- package/dist/esm/internal/general.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 +31 -0
- package/dist/esm/internal/table.mjs +2 -0
- package/dist/esm/internal/table.mjs.map +1 -0
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.d.mts +2 -2
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/internal/view.d.mts +7 -7
- package/dist/esm/internal/view.mjs +1 -1
- package/dist/esm/transactions/authenticator/account.d.mts +4 -5
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.d.mts +1 -1
- package/dist/esm/transactions/authenticator/index.mjs +1 -1
- package/dist/esm/transactions/authenticator/transaction.d.mts +1 -1
- 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.mjs +1 -1
- package/dist/esm/transactions/instances/identifier.mjs +1 -1
- package/dist/esm/transactions/instances/index.d.mts +1 -1
- package/dist/esm/transactions/instances/index.mjs +1 -1
- package/dist/esm/transactions/instances/moduleId.d.mts +1 -1
- package/dist/esm/transactions/instances/moduleId.mjs +1 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.d.mts +1 -1
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/transactionPayload.d.mts +1 -1
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.d.mts +14 -2
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/index.d.mts +3 -3
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.d.mts +2 -2
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.d.mts +9 -9
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.d.mts +9 -9
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +6 -6
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +72 -0
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +2 -0
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs.map +1 -0
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +7 -29
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
- package/dist/esm/transactions/typeTag/index.mjs +1 -1
- package/dist/esm/transactions/typeTag/parser.mjs +1 -1
- package/dist/esm/transactions/types.d.mts +7 -7
- package/dist/esm/types/generated/operations.d.mts +31 -2
- package/dist/esm/types/generated/queries.d.mts +6 -2
- package/dist/esm/types/generated/queries.mjs +1 -1
- package/dist/esm/types/generated/types.d.mts +212 -7
- package/dist/esm/types/generated/types.mjs +1 -1
- package/dist/esm/types/generated/types.mjs.map +1 -1
- package/dist/esm/types/index.d.mts +1 -1
- package/dist/esm/types/indexer.d.mts +4 -2
- package/dist/esm/utils/index.mjs +1 -1
- 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 +2 -2
- package/src/{core/account → account}/Account.ts +25 -15
- package/src/{core/account → account}/Ed25519Account.ts +45 -9
- package/src/account/MultiKeyAccount.ts +176 -0
- package/src/{core/account → account}/SingleKeyAccount.ts +45 -10
- package/src/account/index.ts +4 -0
- package/src/api/account.ts +2 -1
- package/src/api/ans.ts +2 -1
- package/src/api/aptos.ts +6 -0
- package/src/api/digitalAsset.ts +2 -1
- package/src/api/fungibleAsset.ts +2 -1
- package/src/api/general.ts +0 -26
- package/src/api/table.ts +108 -0
- package/src/api/transaction.ts +2 -1
- package/src/api/transactionSubmission/management.ts +1 -1
- package/src/api/transactionSubmission/sign.ts +1 -1
- package/src/cli/move.ts +1 -1
- package/src/core/account/index.ts +0 -3
- package/src/core/crypto/multiKey.ts +17 -6
- package/src/core/index.ts +0 -1
- package/src/index.ts +1 -0
- package/src/internal/account.ts +3 -2
- package/src/internal/ans.ts +2 -1
- package/src/internal/digitalAsset.ts +2 -1
- package/src/internal/fungibleAsset.ts +2 -1
- package/src/internal/general.ts +1 -20
- package/src/internal/queries/currentTokenOwnershipFieldsFragment.graphql +1 -0
- package/src/internal/queries/getTableItemsData.graphql +15 -0
- package/src/internal/queries/getTableItemsMetadata.graphql +12 -0
- package/src/internal/table.ts +82 -0
- package/src/internal/transactionSubmission.ts +5 -7
- package/src/transactions/authenticator/account.ts +6 -11
- package/src/transactions/management/accountSequenceNumber.ts +1 -1
- package/src/transactions/management/transactionWorker.ts +1 -1
- package/src/transactions/transactionBuilder/index.ts +1 -0
- package/src/transactions/transactionBuilder/signingMessage.ts +93 -0
- package/src/transactions/transactionBuilder/transactionBuilder.ts +2 -73
- package/src/types/generated/operations.ts +29 -0
- package/src/types/generated/queries.ts +59 -0
- package/src/types/generated/types.ts +223 -4
- package/src/types/indexer.ts +4 -0
- package/src/version.ts +1 -1
- package/dist/esm/chunk-4374JPA6.mjs +0 -2
- package/dist/esm/chunk-4374JPA6.mjs.map +0 -1
- package/dist/esm/chunk-62P5CJAJ.mjs +0 -2
- package/dist/esm/chunk-62P5CJAJ.mjs.map +0 -1
- package/dist/esm/chunk-B3BRR4WP.mjs +0 -2
- package/dist/esm/chunk-B3BRR4WP.mjs.map +0 -1
- package/dist/esm/chunk-BWFJHFBQ.mjs +0 -2
- package/dist/esm/chunk-CDB34C4N.mjs.map +0 -1
- package/dist/esm/chunk-CF5R4HVB.mjs +0 -2
- package/dist/esm/chunk-CPBGL37X.mjs +0 -2
- package/dist/esm/chunk-DSTKXJMA.mjs +0 -2
- package/dist/esm/chunk-E7FWVXGX.mjs +0 -1
- package/dist/esm/chunk-FBPNHF54.mjs +0 -2
- package/dist/esm/chunk-HG4Q4EFG.mjs.map +0 -1
- package/dist/esm/chunk-HWECUBBA.mjs.map +0 -1
- package/dist/esm/chunk-IR46T46A.mjs +0 -2
- package/dist/esm/chunk-IR46T46A.mjs.map +0 -1
- package/dist/esm/chunk-LBGYH45K.mjs +0 -2
- package/dist/esm/chunk-LBGYH45K.mjs.map +0 -1
- package/dist/esm/chunk-MFL3UCKA.mjs +0 -2
- package/dist/esm/chunk-MFL3UCKA.mjs.map +0 -1
- package/dist/esm/chunk-MLWIHWNH.mjs +0 -1
- package/dist/esm/chunk-NBCHJ75L.mjs +0 -2
- package/dist/esm/chunk-NBCHJ75L.mjs.map +0 -1
- package/dist/esm/chunk-NZGRLKRG.mjs +0 -2
- package/dist/esm/chunk-OGHE4AQA.mjs +0 -2
- package/dist/esm/chunk-P3UFJZY5.mjs.map +0 -1
- package/dist/esm/chunk-PJPXC22D.mjs +0 -2
- package/dist/esm/chunk-PJPXC22D.mjs.map +0 -1
- package/dist/esm/chunk-PMUT3HZE.mjs.map +0 -1
- package/dist/esm/chunk-PYXJYEAC.mjs.map +0 -1
- package/dist/esm/chunk-QD2Y3VK4.mjs.map +0 -1
- package/dist/esm/chunk-QIAHBEEW.mjs +0 -2
- package/dist/esm/chunk-QIAU5K5Y.mjs +0 -2
- package/dist/esm/chunk-QIAU5K5Y.mjs.map +0 -1
- package/dist/esm/chunk-R5QUBEH6.mjs +0 -2
- package/dist/esm/chunk-R7G3CLRI.mjs +0 -1
- package/dist/esm/chunk-RR7I2HLA.mjs +0 -2
- package/dist/esm/chunk-RR7I2HLA.mjs.map +0 -1
- package/dist/esm/chunk-RW2A63WK.mjs.map +0 -1
- package/dist/esm/chunk-S4SEFF4K.mjs.map +0 -1
- package/dist/esm/chunk-TBMAJ6AW.mjs +0 -2
- package/dist/esm/chunk-TGXZVNR5.mjs +0 -2
- package/dist/esm/chunk-TJDC5PWD.mjs +0 -2
- package/dist/esm/chunk-UF534PKA.mjs +0 -2
- package/dist/esm/chunk-UF534PKA.mjs.map +0 -1
- package/dist/esm/chunk-UMDTVVQC.mjs +0 -2
- package/dist/esm/chunk-UMDTVVQC.mjs.map +0 -1
- package/dist/esm/chunk-UNU3RVRJ.mjs +0 -2
- package/dist/esm/chunk-WFZDFFBM.mjs +0 -2
- package/dist/esm/chunk-XIJHRBDL.mjs +0 -2
- package/dist/esm/chunk-XIJHRBDL.mjs.map +0 -1
- package/dist/esm/chunk-ZEHKHKBP.mjs +0 -2
- package/dist/esm/chunk-ZEHKHKBP.mjs.map +0 -1
- package/dist/esm/chunk-ZYYK3UXP.mjs +0 -2
- package/dist/esm/core/account/Account.d.mts +0 -20
- package/dist/esm/core/account/Account.mjs +0 -2
- package/dist/esm/core/account/Ed25519Account.d.mts +0 -20
- package/dist/esm/core/account/Ed25519Account.mjs +0 -2
- package/dist/esm/core/account/SingleKeyAccount.d.mts +0 -20
- package/dist/esm/core/account/SingleKeyAccount.mjs +0 -2
- /package/dist/esm/{core/account → account}/Account.mjs.map +0 -0
- /package/dist/esm/{core/account → account}/Ed25519Account.mjs.map +0 -0
- /package/dist/esm/{chunk-E7FWVXGX.mjs.map → account/MultiKeyAccount.mjs.map} +0 -0
- /package/dist/esm/{core/account → account}/SingleKeyAccount.mjs.map +0 -0
- /package/dist/esm/{chunk-MLWIHWNH.mjs.map → account/index.mjs.map} +0 -0
- /package/dist/esm/{chunk-R7G3CLRI.mjs.map → api/table.mjs.map} +0 -0
- /package/dist/esm/{chunk-XO3HHRJV.mjs.map → chunk-2O5VFH5O.mjs.map} +0 -0
- /package/dist/esm/{chunk-PXFIA4BL.mjs.map → chunk-2XK53QFA.mjs.map} +0 -0
- /package/dist/esm/{chunk-RHBCVCOS.mjs.map → chunk-35EWRSDK.mjs.map} +0 -0
- /package/dist/esm/{chunk-52C73T26.mjs.map → chunk-36QXVFR5.mjs.map} +0 -0
- /package/dist/esm/{chunk-WCVUDO5S.mjs.map → chunk-3B6IKORV.mjs.map} +0 -0
- /package/dist/esm/{chunk-WFZDFFBM.mjs.map → chunk-4NHWV5AI.mjs.map} +0 -0
- /package/dist/esm/{chunk-5HY3DEPF.mjs.map → chunk-5CEZFZHP.mjs.map} +0 -0
- /package/dist/esm/{chunk-NPFNYP75.mjs.map → chunk-5EN52MUT.mjs.map} +0 -0
- /package/dist/esm/{chunk-BE4FOV6X.mjs.map → chunk-6E23TANW.mjs.map} +0 -0
- /package/dist/esm/{chunk-6OV2PQS5.mjs.map → chunk-6IKL4CPY.mjs.map} +0 -0
- /package/dist/esm/{chunk-NZGRLKRG.mjs.map → chunk-7PPN3XDQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-TGXZVNR5.mjs.map → chunk-7VRZLDIJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-DSTKXJMA.mjs.map → chunk-B7X6PSE7.mjs.map} +0 -0
- /package/dist/esm/{chunk-AOCNYMMX.mjs.map → chunk-BCUSI3N6.mjs.map} +0 -0
- /package/dist/esm/{chunk-BAV4XY7C.mjs.map → chunk-BHLICYAI.mjs.map} +0 -0
- /package/dist/esm/{chunk-OGHE4AQA.mjs.map → chunk-BO2TLWNT.mjs.map} +0 -0
- /package/dist/esm/{chunk-N77VJHW5.mjs.map → chunk-C22QZ32Q.mjs.map} +0 -0
- /package/dist/esm/{chunk-TBMAJ6AW.mjs.map → chunk-CEHCDA3G.mjs.map} +0 -0
- /package/dist/esm/{chunk-TJDC5PWD.mjs.map → chunk-F7EMGK4M.mjs.map} +0 -0
- /package/dist/esm/{chunk-FS3NSGBF.mjs.map → chunk-G56GPLTB.mjs.map} +0 -0
- /package/dist/esm/{chunk-6FBKUTGF.mjs.map → chunk-GHYE26Q5.mjs.map} +0 -0
- /package/dist/esm/{chunk-QTRYMRYK.mjs.map → chunk-GM56MMNJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-2G4ZSGL4.mjs.map → chunk-GZIOZUKM.mjs.map} +0 -0
- /package/dist/esm/{chunk-SPU745XV.mjs.map → chunk-HXGEF7O7.mjs.map} +0 -0
- /package/dist/esm/{chunk-O4JRPZZM.mjs.map → chunk-I6ST47U7.mjs.map} +0 -0
- /package/dist/esm/{chunk-4P5EKAJB.mjs.map → chunk-IZZ6BA56.mjs.map} +0 -0
- /package/dist/esm/{chunk-UNU3RVRJ.mjs.map → chunk-JPNTJOQW.mjs.map} +0 -0
- /package/dist/esm/{chunk-UML2VQZT.mjs.map → chunk-KAGLWBIJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-L5IL2IAB.mjs.map → chunk-L5KHEQW5.mjs.map} +0 -0
- /package/dist/esm/{chunk-FBPNHF54.mjs.map → chunk-LG7RJQ57.mjs.map} +0 -0
- /package/dist/esm/{chunk-U43IJHQN.mjs.map → chunk-MJPUASSD.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZYYK3UXP.mjs.map → chunk-N3U47Y6Y.mjs.map} +0 -0
- /package/dist/esm/{chunk-UPIN5AIO.mjs.map → chunk-P6GWG2CY.mjs.map} +0 -0
- /package/dist/esm/{chunk-BWFJHFBQ.mjs.map → chunk-PF57EOJY.mjs.map} +0 -0
- /package/dist/esm/{chunk-3YZGJLW7.mjs.map → chunk-PI2NFZEH.mjs.map} +0 -0
- /package/dist/esm/{chunk-APDALGDD.mjs.map → chunk-S2VSJJRJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-CF5R4HVB.mjs.map → chunk-SFM5C2IG.mjs.map} +0 -0
- /package/dist/esm/{chunk-CNMQNPNV.mjs.map → chunk-SGTNW5YI.mjs.map} +0 -0
- /package/dist/esm/{chunk-DMKUAQB7.mjs.map → chunk-U3YYSIIT.mjs.map} +0 -0
- /package/dist/esm/{chunk-R5QUBEH6.mjs.map → chunk-UGPALAPN.mjs.map} +0 -0
- /package/dist/esm/{chunk-BIAEC6FO.mjs.map → chunk-UM35A7RD.mjs.map} +0 -0
- /package/dist/esm/{chunk-FXNFWLQC.mjs.map → chunk-UPSCPEEE.mjs.map} +0 -0
- /package/dist/esm/{chunk-S2LTZKM4.mjs.map → chunk-VGGYFJUY.mjs.map} +0 -0
- /package/dist/esm/{chunk-JCD72AW7.mjs.map → chunk-YK732P36.mjs.map} +0 -0
- /package/dist/esm/{chunk-UDRSFVAK.mjs.map → chunk-YMB2XW2O.mjs.map} +0 -0
- /package/dist/esm/{chunk-NWYIE7ZX.mjs.map → chunk-YZHIXVPR.mjs.map} +0 -0
- /package/dist/esm/{publicKey-lq5djCIY.d.mts → publicKey-B3XRNhHO.d.mts} +0 -0
package/dist/common/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as Serializable, T as TransactionArgument, H as HexInput, a as Serializer, D as Deserializer, E as EntryFunctionArgument, U as Uint8, b as Uint16, c as Uint32, A as AnyNumber, d as Deserializable, e as Hex, f as AuthenticationKeyScheme, g as AccountAddress, h as AnyPublicKeyVariant,
|
|
2
|
-
export {
|
|
1
|
+
import { S as Serializable, T as TransactionArgument, H as HexInput, a as Serializer, D as Deserializer, E as EntryFunctionArgument, U as Uint8, b as Uint16, c as Uint32, A as AnyNumber, d as Deserializable, e as Hex, f as AuthenticationKeyScheme, g as AccountAddress, h as AnyPublicKeyVariant, N as Network, C as Client, i as ClientConfig, F as FullNodeConfig, I as IndexerConfig, j as FaucetConfig, k as AptosSettings, M as MoveModuleId, l as ScriptFunctionArgument, m as MoveFunctionId, n as AccountAddressInput, o as MoveFunctionGenericTypeParam, p as SigningSchemeInput, q as SigningScheme, r as AccountData, P as PaginationArgs, L as LedgerVersionArg, s as MoveModuleBytecode, t as TransactionResponse, u as MoveResource, v as MoveStructId, w as TokenStandardArg, O as OrderByArg, G as GetAccountOwnedTokensQueryResponse, x as GetAccountOwnedTokensFromCollectionResponse, y as GetAccountCollectionsWithOwnedTokenResponse, z as GetAccountCoinsDataResponse, W as WhereArg, B as GetAccountOwnedObjectsResponse, J as GetCollectionDataResponse, K as GetTokenDataResponse, Q as GetCurrentTokenOwnershipResponse, R as GetOwnedTokensResponse, V as GetTokenActivityResponse, X as GetEventsResponse, Y as WaitForTransactionOptions, Z as UserTransactionResponse, _ as MoveFunction, $ as GetFungibleAssetMetadataResponse, a0 as GetFungibleAssetActivitiesResponse, a1 as GetCurrentFungibleAssetBalancesResponse, a2 as LedgerInfo, a3 as Block, a4 as MoveValue, a5 as GetChainTopUserTransactionsResponse, a6 as GraphqlQuery, a7 as GetProcessorStatusResponse, a8 as GetANSNameResponse, a9 as GetNumberOfDelegatorsResponse, aa as GetDelegatedStakingActivitiesResponse, ab as PendingTransactionResponse, ac as CommittedTransactionResponse, ad as GasEstimation, ae as TableItemRequest, af as GetTableItemsDataResponse, ag as GetTableItemsMetadataResponse, ah as AptosRequest, ai as ClientRequest, aj as ClientResponse, ak as MimeType } from './accountAddress-ccLvlUQe.js';
|
|
2
|
+
export { ax as AccountAuthenticatorVariant, bc as AccountSignature, ao as AddressInvalidReason, ay as AnySignatureVariant, aL as BlockMetadataTransactionResponse, aC as ClientHeadersType, aV as DecodedTableData, aW as DeletedTableData, bz as DeriveScheme, bf as DirectWriteSet, aY as EntryFunctionPayloadResponse, bh as Event, bg as EventGuid, bC as GenerateAccount, bA as GenerateAccountWithEd25519, bB as GenerateAccountWithSingleSignerSecp256k1Key, a$ as GenesisPayload, aK as GenesisTransactionResponse, ar as HexInvalidReason, bu as MoveAbility, bo as MoveAddressType, bt as MoveFunctionVisibility, bw as MoveModule, bp as MoveObjectType, bq as MoveOptionType, b0 as MoveScriptBytecode, bx as MoveStruct, bv as MoveStructField, br as MoveStructType, bs as MoveType, bm as MoveUint128Type, bj as MoveUint16Type, bn as MoveUint256Type, bk as MoveUint32Type, bl as MoveUint64Type, bi as MoveUint8Type, a_ as MultisigPayloadResponse, bJ as NetworkToChainId, bI as NetworkToFaucetAPI, bG as NetworkToIndexerAPI, bK as NetworkToNetworkName, bH as NetworkToNodeAPI, bD as OrderBy, bE as OrderByValue, ap as ParsingError, aq as ParsingResult, by as RoleType, aZ as ScriptPayloadResponse, at as ScriptTransactionArgumentVariants, be as ScriptWriteSet, aM as StateCheckpointTransactionResponse, bF as TokenStandard, aw as TransactionAuthenticatorVariant, b7 as TransactionEd25519Signature, bb as TransactionFeePayerSignature, ba as TransactionMultiAgentSignature, b9 as TransactionMultiEd25519Signature, aX as TransactionPayloadResponse, au as TransactionPayloadVariants, aD as TransactionResponseType, b8 as TransactionSecp256k1Signature, b1 as TransactionSignature, av as TransactionVariants, as as TypeTagVariants, aA as Uint128, aB as Uint256, az as Uint64, aN as ValidatorTransactionResponse, bd as WriteSet, aO as WriteSetChange, aP as WriteSetChangeDeleteModule, aQ as WriteSetChangeDeleteResource, aR as WriteSetChangeDeleteTableItem, aS as WriteSetChangeWriteModule, aT as WriteSetChangeWriteResource, aU as WriteSetChangeWriteTableItem, al as ensureBoolean, aH as isBlockMetadataTransactionResponse, b2 as isEd25519Signature, b5 as isFeePayerSignature, aG as isGenesisTransactionResponse, b4 as isMultiAgentSignature, b6 as isMultiEd25519Signature, aE as isPendingTransactionResponse, b3 as isSecp256k1Signature, aI as isStateCheckpointTransactionResponse, aF as isUserTransactionResponse, aJ as isValidatorTransactionResponse, am as outOfRangeErrorMessage, an as validateNumberInRange } from './accountAddress-ccLvlUQe.js';
|
|
3
3
|
import EventEmitter from 'eventemitter3';
|
|
4
4
|
|
|
5
5
|
type Maybe<T> = T | null;
|
|
@@ -144,6 +144,7 @@ type CurrentAptosNamesBoolExp = {
|
|
|
144
144
|
_not?: InputMaybe<CurrentAptosNamesBoolExp>;
|
|
145
145
|
_or?: InputMaybe<Array<CurrentAptosNamesBoolExp>>;
|
|
146
146
|
domain?: InputMaybe<StringComparisonExp>;
|
|
147
|
+
domain_expiration_timestamp?: InputMaybe<TimestampComparisonExp>;
|
|
147
148
|
domain_with_suffix?: InputMaybe<StringComparisonExp>;
|
|
148
149
|
expiration_timestamp?: InputMaybe<TimestampComparisonExp>;
|
|
149
150
|
is_active?: InputMaybe<BooleanComparisonExp>;
|
|
@@ -153,6 +154,7 @@ type CurrentAptosNamesBoolExp = {
|
|
|
153
154
|
owner_address?: InputMaybe<StringComparisonExp>;
|
|
154
155
|
registered_address?: InputMaybe<StringComparisonExp>;
|
|
155
156
|
subdomain?: InputMaybe<StringComparisonExp>;
|
|
157
|
+
subdomain_expiration_policy?: InputMaybe<BigintComparisonExp>;
|
|
156
158
|
token_name?: InputMaybe<StringComparisonExp>;
|
|
157
159
|
token_standard?: InputMaybe<StringComparisonExp>;
|
|
158
160
|
};
|
|
@@ -161,6 +163,8 @@ declare enum CurrentAptosNamesSelectColumn {
|
|
|
161
163
|
/** column name */
|
|
162
164
|
Domain = "domain",
|
|
163
165
|
/** column name */
|
|
166
|
+
DomainExpirationTimestamp = "domain_expiration_timestamp",
|
|
167
|
+
/** column name */
|
|
164
168
|
DomainWithSuffix = "domain_with_suffix",
|
|
165
169
|
/** column name */
|
|
166
170
|
ExpirationTimestamp = "expiration_timestamp",
|
|
@@ -177,6 +181,8 @@ declare enum CurrentAptosNamesSelectColumn {
|
|
|
177
181
|
/** column name */
|
|
178
182
|
Subdomain = "subdomain",
|
|
179
183
|
/** column name */
|
|
184
|
+
SubdomainExpirationPolicy = "subdomain_expiration_policy",
|
|
185
|
+
/** column name */
|
|
180
186
|
TokenName = "token_name",
|
|
181
187
|
/** column name */
|
|
182
188
|
TokenStandard = "token_standard"
|
|
@@ -307,6 +313,27 @@ type NumericComparisonExp = {
|
|
|
307
313
|
_neq?: InputMaybe<Scalars["numeric"]["input"]>;
|
|
308
314
|
_nin?: InputMaybe<Array<Scalars["numeric"]["input"]>>;
|
|
309
315
|
};
|
|
316
|
+
/** Boolean expression to filter rows from the table "table_items". All fields are combined with a logical 'AND'. */
|
|
317
|
+
type TableItemsBoolExp = {
|
|
318
|
+
_and?: InputMaybe<Array<TableItemsBoolExp>>;
|
|
319
|
+
_not?: InputMaybe<TableItemsBoolExp>;
|
|
320
|
+
_or?: InputMaybe<Array<TableItemsBoolExp>>;
|
|
321
|
+
decoded_key?: InputMaybe<JsonbComparisonExp>;
|
|
322
|
+
decoded_value?: InputMaybe<JsonbComparisonExp>;
|
|
323
|
+
key?: InputMaybe<StringComparisonExp>;
|
|
324
|
+
table_handle?: InputMaybe<StringComparisonExp>;
|
|
325
|
+
transaction_version?: InputMaybe<BigintComparisonExp>;
|
|
326
|
+
write_set_change_index?: InputMaybe<BigintComparisonExp>;
|
|
327
|
+
};
|
|
328
|
+
/** Boolean expression to filter rows from the table "table_metadatas". All fields are combined with a logical 'AND'. */
|
|
329
|
+
type TableMetadatasBoolExp = {
|
|
330
|
+
_and?: InputMaybe<Array<TableMetadatasBoolExp>>;
|
|
331
|
+
_not?: InputMaybe<TableMetadatasBoolExp>;
|
|
332
|
+
_or?: InputMaybe<Array<TableMetadatasBoolExp>>;
|
|
333
|
+
handle?: InputMaybe<StringComparisonExp>;
|
|
334
|
+
key_type?: InputMaybe<StringComparisonExp>;
|
|
335
|
+
value_type?: InputMaybe<StringComparisonExp>;
|
|
336
|
+
};
|
|
310
337
|
/** Boolean expression to compare columns of type "timestamp". All fields are combined with logical 'AND'. */
|
|
311
338
|
type TimestampComparisonExp = {
|
|
312
339
|
_eq?: InputMaybe<Scalars["timestamp"]["input"]>;
|
|
@@ -1277,6 +1304,13 @@ declare class MultiKey extends AccountPublicKey {
|
|
|
1277
1304
|
createBitmap(args: {
|
|
1278
1305
|
bits: number[];
|
|
1279
1306
|
}): Uint8Array;
|
|
1307
|
+
/**
|
|
1308
|
+
* Get the index of the provided public key.
|
|
1309
|
+
*
|
|
1310
|
+
* @param publicKey array of the index mapping to the matching public keys
|
|
1311
|
+
* @returns the corresponding index of the publicKey, if it exists
|
|
1312
|
+
*/
|
|
1313
|
+
getIndex(publicKey: PublicKey): number;
|
|
1280
1314
|
}
|
|
1281
1315
|
declare class MultiKeySignature extends Signature {
|
|
1282
1316
|
/**
|
|
@@ -1523,1587 +1557,1720 @@ declare class AccountAuthenticatorSingleKey extends AccountAuthenticator {
|
|
|
1523
1557
|
*/
|
|
1524
1558
|
declare class AccountAuthenticatorMultiKey extends AccountAuthenticator {
|
|
1525
1559
|
readonly public_keys: MultiKey;
|
|
1526
|
-
readonly signatures:
|
|
1527
|
-
|
|
1528
|
-
constructor(public_keys: MultiKey, signatures: Array<AnySignature>, signatures_bitmap: Uint8Array);
|
|
1560
|
+
readonly signatures: MultiKeySignature;
|
|
1561
|
+
constructor(public_keys: MultiKey, signatures: MultiKeySignature);
|
|
1529
1562
|
serialize(serializer: Serializer): void;
|
|
1530
1563
|
static load(deserializer: Deserializer): AccountAuthenticatorMultiKey;
|
|
1531
1564
|
}
|
|
1532
1565
|
|
|
1533
|
-
interface SingleKeySignerConstructorArgs {
|
|
1534
|
-
privateKey: PrivateKey;
|
|
1535
|
-
address?: AccountAddressInput;
|
|
1536
|
-
}
|
|
1537
|
-
interface SingleKeySignerGenerateArgs {
|
|
1538
|
-
scheme?: SigningSchemeInput;
|
|
1539
|
-
}
|
|
1540
|
-
type SingleKeySignerFromDerivationPathArgs = SingleKeySignerGenerateArgs & {
|
|
1541
|
-
path: string;
|
|
1542
|
-
mnemonic: string;
|
|
1543
|
-
};
|
|
1544
|
-
interface VerifySingleKeySignatureArgs {
|
|
1545
|
-
message: HexInput;
|
|
1546
|
-
signature: AnySignature;
|
|
1547
|
-
}
|
|
1548
|
-
/**
|
|
1549
|
-
* Signer implementation for the SingleKey authentication scheme.
|
|
1550
|
-
* This extends a SingleKeyAccount by adding signing capabilities through a valid private key.
|
|
1551
|
-
* Currently, the only supported signature schemes are Ed25519 and Secp256k1.
|
|
1552
|
-
*
|
|
1553
|
-
* Note: Generating a signer instance does not create the account on-chain.
|
|
1554
|
-
*/
|
|
1555
|
-
declare class SingleKeyAccount implements Account$1 {
|
|
1556
|
-
/**
|
|
1557
|
-
* Private key associated with the account
|
|
1558
|
-
*/
|
|
1559
|
-
readonly privateKey: PrivateKey;
|
|
1560
|
-
readonly publicKey: AnyPublicKey;
|
|
1561
|
-
readonly accountAddress: AccountAddress;
|
|
1562
|
-
readonly signingScheme = SigningScheme.SingleKey;
|
|
1563
|
-
constructor(args: SingleKeySignerConstructorArgs);
|
|
1564
|
-
/**
|
|
1565
|
-
* Derives an account from a randomly generated private key.
|
|
1566
|
-
* Default generation is using an Ed25519 key
|
|
1567
|
-
* @returns Account with the given signature scheme
|
|
1568
|
-
*/
|
|
1569
|
-
static generate(args?: SingleKeySignerGenerateArgs): SingleKeyAccount;
|
|
1570
|
-
/**
|
|
1571
|
-
* Derives an account with bip44 path and mnemonics,
|
|
1572
|
-
* Default to using an Ed25519 signature scheme.
|
|
1573
|
-
*
|
|
1574
|
-
* @param args.scheme The signature scheme to derive the private key with
|
|
1575
|
-
* @param args.path the BIP44 derive hardened path (e.g. m/44'/637'/0'/0'/0') for Ed25519,
|
|
1576
|
-
* or non-hardened path (e.g. m/44'/637'/0'/0/0) for secp256k1
|
|
1577
|
-
* Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
|
|
1578
|
-
* @param args.mnemonic the mnemonic seed phrase of the account
|
|
1579
|
-
*/
|
|
1580
|
-
static fromDerivationPath(args: SingleKeySignerFromDerivationPathArgs): SingleKeyAccount;
|
|
1581
|
-
verifySignature(args: VerifySingleKeySignatureArgs): boolean;
|
|
1582
|
-
signWithAuthenticator(message: HexInput): AccountAuthenticatorSingleKey;
|
|
1583
|
-
sign(message: HexInput): AnySignature;
|
|
1584
|
-
}
|
|
1585
|
-
|
|
1586
|
-
/**
|
|
1587
|
-
* Arguments for creating an `Ed25519Account` from an `Ed25519PrivateKey`.
|
|
1588
|
-
* This is the default input type when passing an `Ed25519PrivateKey`.
|
|
1589
|
-
* In order to use the SingleKey authentication scheme, `legacy` needs to be explicitly set to false.
|
|
1590
|
-
*/
|
|
1591
|
-
interface CreateEd25519AccountFromPrivateKeyArgs {
|
|
1592
|
-
privateKey: Ed25519PrivateKey;
|
|
1593
|
-
address?: AccountAddressInput;
|
|
1594
|
-
legacy?: true;
|
|
1595
|
-
}
|
|
1596
|
-
/**
|
|
1597
|
-
* Arguments for creating an `SingleKeyAccount` from an `Ed25519PrivateKey`.
|
|
1598
|
-
* The `legacy` argument needs to be explicitly set to false in order to
|
|
1599
|
-
* use the `SingleKey` authentication scheme.
|
|
1600
|
-
*/
|
|
1601
|
-
interface CreateEd25519SingleKeyAccountFromPrivateKeyArgs {
|
|
1602
|
-
privateKey: Ed25519PrivateKey;
|
|
1603
|
-
address?: AccountAddressInput;
|
|
1604
|
-
legacy: false;
|
|
1605
|
-
}
|
|
1606
|
-
/**
|
|
1607
|
-
* Arguments for creating an `SingleKeyAccount` from any supported private key
|
|
1608
|
-
* that is not an `Ed25519PrivateKey`.
|
|
1609
|
-
* The `legacy` argument defaults to false and cannot be explicitly set to true.
|
|
1610
|
-
*/
|
|
1611
|
-
interface CreateSingleKeyAccountFromPrivateKeyArgs {
|
|
1612
|
-
privateKey: Exclude<PrivateKey, Ed25519PrivateKey>;
|
|
1613
|
-
address?: AccountAddressInput;
|
|
1614
|
-
legacy?: false;
|
|
1615
|
-
}
|
|
1616
1566
|
/**
|
|
1617
|
-
*
|
|
1618
|
-
* This is used when the private key type is not known at compilation time.
|
|
1567
|
+
* Type of API endpoint for request routing
|
|
1619
1568
|
*/
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1569
|
+
declare enum AptosApiType {
|
|
1570
|
+
FULLNODE = "Fullnode",
|
|
1571
|
+
INDEXER = "Indexer",
|
|
1572
|
+
FAUCET = "Faucet"
|
|
1624
1573
|
}
|
|
1625
1574
|
/**
|
|
1626
|
-
*
|
|
1627
|
-
*
|
|
1575
|
+
* The default max gas amount when none is given.
|
|
1576
|
+
*
|
|
1577
|
+
* This is the maximum number of gas units that will be used by a transaction before being rejected.
|
|
1578
|
+
*
|
|
1579
|
+
* Note that max gas amount varies based on the transaction. A larger transaction will go over this
|
|
1580
|
+
* default gas amount, and the value will need to be changed for the specific transaction.
|
|
1628
1581
|
*/
|
|
1629
|
-
|
|
1630
|
-
scheme?: SigningSchemeInput.Ed25519;
|
|
1631
|
-
legacy?: true;
|
|
1632
|
-
}
|
|
1582
|
+
declare const DEFAULT_MAX_GAS_AMOUNT = 200000;
|
|
1633
1583
|
/**
|
|
1634
|
-
*
|
|
1635
|
-
*
|
|
1636
|
-
*
|
|
1584
|
+
* The default transaction expiration seconds from now.
|
|
1585
|
+
*
|
|
1586
|
+
* This time is how long until the blockchain nodes will reject the transaction.
|
|
1587
|
+
*
|
|
1588
|
+
* Note that the transaction expiration time varies based on network connection and network load. It may need to be
|
|
1589
|
+
* increased for the transaction to be processed.
|
|
1637
1590
|
*/
|
|
1638
|
-
|
|
1639
|
-
scheme?: SigningSchemeInput.Ed25519;
|
|
1640
|
-
legacy: false;
|
|
1641
|
-
}
|
|
1591
|
+
declare const DEFAULT_TXN_EXP_SEC_FROM_NOW = 20;
|
|
1642
1592
|
/**
|
|
1643
|
-
*
|
|
1644
|
-
*
|
|
1645
|
-
*
|
|
1593
|
+
* The default number of seconds to wait for a transaction to be processed.
|
|
1594
|
+
*
|
|
1595
|
+
* This time is the amount of time that the SDK will wait for a transaction to be processed when waiting for
|
|
1596
|
+
* the results of the transaction. It may take longer based on network connection and network load.
|
|
1646
1597
|
*/
|
|
1647
|
-
|
|
1648
|
-
scheme: Exclude<SigningSchemeInput, SigningSchemeInput.Ed25519>;
|
|
1649
|
-
legacy?: false;
|
|
1650
|
-
}
|
|
1598
|
+
declare const DEFAULT_TXN_TIMEOUT_SEC = 20;
|
|
1651
1599
|
/**
|
|
1652
|
-
*
|
|
1653
|
-
* This is used when the input signature scheme is not known at compilation time.
|
|
1600
|
+
* The default gas currency for the network.
|
|
1654
1601
|
*/
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
}
|
|
1602
|
+
declare const APTOS_COIN = "0x1::aptos_coin::AptosCoin";
|
|
1603
|
+
declare const RAW_TRANSACTION_SALT = "APTOS::RawTransaction";
|
|
1604
|
+
declare const RAW_TRANSACTION_WITH_DATA_SALT = "APTOS::RawTransactionWithData";
|
|
1659
1605
|
/**
|
|
1660
|
-
*
|
|
1606
|
+
* The list of supported Processor types for our indexer api.
|
|
1607
|
+
*
|
|
1608
|
+
* These can be found from the processor_status table in the indexer database.
|
|
1609
|
+
* {@link https://cloud.hasura.io/public/graphiql?endpoint=https://api.mainnet.aptoslabs.com/v1/graphql}
|
|
1661
1610
|
*/
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1611
|
+
declare enum ProcessorType {
|
|
1612
|
+
ACCOUNT_TRANSACTION_PROCESSOR = "account_transactions_processor",
|
|
1613
|
+
DEFAULT = "default_processor",
|
|
1614
|
+
EVENTS_PROCESSOR = "events_processor",
|
|
1615
|
+
FUNGIBLE_ASSET_PROCESSOR = "fungible_asset_processor",
|
|
1616
|
+
STAKE_PROCESSOR = "stake_processor",
|
|
1617
|
+
TOKEN_V2_PROCESSOR = "token_v2_processor",
|
|
1618
|
+
USER_TRANSACTION_PROCESSOR = "user_transaction_processor"
|
|
1665
1619
|
}
|
|
1620
|
+
|
|
1666
1621
|
/**
|
|
1667
|
-
*
|
|
1622
|
+
* This class holds the config information for the SDK client instance.
|
|
1668
1623
|
*
|
|
1669
|
-
*
|
|
1670
|
-
* either through `Account.generate()` or `Account.fromDerivationPath`.
|
|
1671
|
-
* Despite this being an abstract class, it should be treated as an interface and enforced using
|
|
1672
|
-
* the `implements` keyword.
|
|
1624
|
+
* @example
|
|
1673
1625
|
*
|
|
1674
|
-
*
|
|
1626
|
+
* const aptosConfig = new AptosConfig({network:Network.TESTNET})
|
|
1675
1627
|
*/
|
|
1676
|
-
declare
|
|
1628
|
+
declare class AptosConfig {
|
|
1677
1629
|
/**
|
|
1678
|
-
*
|
|
1679
|
-
* Note: this will be removed in the next major release,
|
|
1680
|
-
* as not all accounts have a private key.
|
|
1630
|
+
* The Network that this SDK is associated with. Defaults to DEVNET
|
|
1681
1631
|
*/
|
|
1682
|
-
|
|
1632
|
+
readonly network: Network;
|
|
1683
1633
|
/**
|
|
1684
|
-
*
|
|
1634
|
+
* The client instance the SDK uses. Defaults to `@aptos-labs/aptos-client
|
|
1685
1635
|
*/
|
|
1686
|
-
|
|
1636
|
+
readonly client: Client;
|
|
1687
1637
|
/**
|
|
1688
|
-
*
|
|
1638
|
+
* The optional hardcoded fullnode URL to send requests to instead of using the network
|
|
1689
1639
|
*/
|
|
1690
|
-
|
|
1640
|
+
readonly fullnode?: string;
|
|
1691
1641
|
/**
|
|
1692
|
-
*
|
|
1642
|
+
* The optional hardcoded faucet URL to send requests to instead of using the network
|
|
1693
1643
|
*/
|
|
1694
|
-
|
|
1644
|
+
readonly faucet?: string;
|
|
1695
1645
|
/**
|
|
1696
|
-
*
|
|
1697
|
-
* @param args.scheme The signature scheme to use, to generate the private key
|
|
1698
|
-
* @param args.legacy Whether to use a legacy authentication scheme, when applicable
|
|
1699
|
-
* @returns An account compatible with the provided signature scheme
|
|
1646
|
+
* The optional hardcoded indexer URL to send requests to instead of using the network
|
|
1700
1647
|
*/
|
|
1701
|
-
|
|
1702
|
-
static generate(args: GenerateEd25519SingleKeyAccountArgs): SingleKeyAccount;
|
|
1703
|
-
static generate(args: GenerateSingleKeyAccountArgs): SingleKeyAccount;
|
|
1704
|
-
static generate(args: GenerateAccountArgs): Account$1;
|
|
1648
|
+
readonly indexer?: string;
|
|
1705
1649
|
/**
|
|
1706
|
-
*
|
|
1707
|
-
*
|
|
1708
|
-
* @param args.privateKey a valid private key
|
|
1709
|
-
* @param args.address the account's address. If not provided, it will be derived from the public key.
|
|
1710
|
-
* @param args.legacy Whether to use a legacy authentication scheme, when applicable
|
|
1650
|
+
* Optional client configurations
|
|
1711
1651
|
*/
|
|
1712
|
-
|
|
1713
|
-
static fromPrivateKey(args: CreateEd25519SingleKeyAccountFromPrivateKeyArgs): SingleKeyAccount;
|
|
1714
|
-
static fromPrivateKey(args: CreateSingleKeyAccountFromPrivateKeyArgs): SingleKeyAccount;
|
|
1715
|
-
static fromPrivateKey(args: CreateAccountFromPrivateKeyArgs): Account$1;
|
|
1652
|
+
readonly clientConfig?: ClientConfig;
|
|
1716
1653
|
/**
|
|
1717
|
-
*
|
|
1718
|
-
* Instantiates an account given a private key and a specified account address.
|
|
1719
|
-
* This is primarily used to instantiate an `Account` that has had its authentication key rotated.
|
|
1720
|
-
*
|
|
1721
|
-
* @param args.privateKey PrivateKey - the underlying private key for the account
|
|
1722
|
-
* @param args.address AccountAddress - The account address the `Account` will sign for
|
|
1723
|
-
* @param args.legacy optional. If set to false, the keypair generated is a Unified keypair. Defaults
|
|
1724
|
-
* to generating a Legacy Ed25519 keypair
|
|
1725
|
-
*
|
|
1726
|
-
* @returns Account
|
|
1654
|
+
* Optional specific Fullnode configurations
|
|
1727
1655
|
*/
|
|
1728
|
-
|
|
1656
|
+
readonly fullnodeConfig?: FullNodeConfig;
|
|
1729
1657
|
/**
|
|
1730
|
-
*
|
|
1731
|
-
*
|
|
1732
|
-
* @param args.scheme The signature scheme to derive the private key with
|
|
1733
|
-
* @param args.path the BIP44 derive hardened path (e.g. m/44'/637'/0'/0'/0') for Ed25519,
|
|
1734
|
-
* or non-hardened path (e.g. m/44'/637'/0'/0/0) for secp256k1
|
|
1735
|
-
* Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
|
|
1736
|
-
* @param args.mnemonic the mnemonic seed phrase of the account
|
|
1658
|
+
* Optional specific Indexer configurations
|
|
1737
1659
|
*/
|
|
1738
|
-
|
|
1739
|
-
static fromDerivationPath(args: GenerateEd25519SingleKeyAccountArgs & PrivateKeyFromDerivationPathArgs): SingleKeyAccount;
|
|
1740
|
-
static fromDerivationPath(args: GenerateSingleKeyAccountArgs & PrivateKeyFromDerivationPathArgs): SingleKeyAccount;
|
|
1741
|
-
static fromDerivationPath(args: GenerateAccountArgs & PrivateKeyFromDerivationPathArgs): Account$1;
|
|
1660
|
+
readonly indexerConfig?: IndexerConfig;
|
|
1742
1661
|
/**
|
|
1743
|
-
*
|
|
1744
|
-
* This key enables account owners to rotate their private key(s)
|
|
1745
|
-
* associated with the account without changing the address that hosts their account.
|
|
1746
|
-
* See here for more info: {@link https://aptos.dev/concepts/accounts#single-signer-authentication}
|
|
1747
|
-
*
|
|
1748
|
-
* @param args.publicKey PublicKey - public key of the account
|
|
1749
|
-
* @returns The authentication key for the associated account
|
|
1662
|
+
* Optional specific Faucet configurations
|
|
1750
1663
|
*/
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
}): AuthenticationKey;
|
|
1664
|
+
readonly faucetConfig?: FaucetConfig;
|
|
1665
|
+
constructor(settings?: AptosSettings);
|
|
1754
1666
|
/**
|
|
1755
|
-
*
|
|
1756
|
-
*
|
|
1757
|
-
*
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
*
|
|
1762
|
-
* @
|
|
1763
|
-
* @returns AccountSignature
|
|
1764
|
-
*/
|
|
1765
|
-
abstract sign(message: HexInput): Signature;
|
|
1766
|
-
/**
|
|
1767
|
-
* @param args.message raw message data in HexInput format
|
|
1768
|
-
* @param args.signature signed message signature
|
|
1667
|
+
* Returns the URL endpoint to send the request to.
|
|
1668
|
+
* If a custom URL was provided in the config, that URL is returned.
|
|
1669
|
+
* If a custom URL was provided but not URL endpoints, an error is thrown.
|
|
1670
|
+
* Otherwise, the URL endpoint is derived from the network.
|
|
1671
|
+
*
|
|
1672
|
+
* @param apiType - The type of Aptos API to get the URL for.
|
|
1673
|
+
*
|
|
1674
|
+
* @internal
|
|
1769
1675
|
*/
|
|
1770
|
-
|
|
1676
|
+
getRequestUrl(apiType: AptosApiType): string;
|
|
1771
1677
|
}
|
|
1772
1678
|
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1679
|
+
/**
|
|
1680
|
+
* Representation of a ChainId that can serialized and deserialized
|
|
1681
|
+
*/
|
|
1682
|
+
declare class ChainId extends Serializable {
|
|
1683
|
+
readonly chainId: number;
|
|
1684
|
+
constructor(chainId: number);
|
|
1685
|
+
serialize(serializer: Serializer): void;
|
|
1686
|
+
static deserialize(deserializer: Deserializer): ChainId;
|
|
1780
1687
|
}
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1688
|
+
|
|
1689
|
+
/**
|
|
1690
|
+
* Representation of an Identifier that can serialized and deserialized.
|
|
1691
|
+
* We use Identifier to represent the module "name" in "ModuleId" and
|
|
1692
|
+
* the "function name" in "EntryFunction"
|
|
1693
|
+
*/
|
|
1694
|
+
declare class Identifier extends Serializable {
|
|
1695
|
+
identifier: string;
|
|
1696
|
+
constructor(identifier: string);
|
|
1697
|
+
serialize(serializer: Serializer): void;
|
|
1698
|
+
static deserialize(deserializer: Deserializer): Identifier;
|
|
1784
1699
|
}
|
|
1700
|
+
|
|
1785
1701
|
/**
|
|
1786
|
-
*
|
|
1787
|
-
*
|
|
1788
|
-
*
|
|
1789
|
-
* Note: Generating a signer instance does not create the account on-chain.
|
|
1702
|
+
* Representation of a ModuleId that can serialized and deserialized
|
|
1703
|
+
* ModuleId means the module address (e.g "0x1") and the module name (e.g "coin")
|
|
1790
1704
|
*/
|
|
1791
|
-
declare class
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
*/
|
|
1795
|
-
readonly privateKey: Ed25519PrivateKey;
|
|
1796
|
-
readonly publicKey: Ed25519PublicKey;
|
|
1797
|
-
readonly accountAddress: AccountAddress;
|
|
1798
|
-
readonly signingScheme = SigningScheme.Ed25519;
|
|
1799
|
-
constructor(args: Ed25519SignerConstructorArgs);
|
|
1705
|
+
declare class ModuleId extends Serializable {
|
|
1706
|
+
readonly address: AccountAddress;
|
|
1707
|
+
readonly name: Identifier;
|
|
1800
1708
|
/**
|
|
1801
|
-
*
|
|
1709
|
+
* Full name of a module.
|
|
1710
|
+
* @param address The account address. e.g "0x1"
|
|
1711
|
+
* @param name The module name under the "address". e.g "coin"
|
|
1802
1712
|
*/
|
|
1803
|
-
|
|
1713
|
+
constructor(address: AccountAddress, name: Identifier);
|
|
1804
1714
|
/**
|
|
1805
|
-
*
|
|
1806
|
-
*
|
|
1807
|
-
* @
|
|
1808
|
-
* Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
|
|
1809
|
-
* @param args.mnemonic the mnemonic seed phrase of the account
|
|
1715
|
+
* Converts a string literal to a ModuleId
|
|
1716
|
+
* @param moduleId String literal in format "account_address::module_name", e.g. "0x1::coin"
|
|
1717
|
+
* @returns ModuleId
|
|
1810
1718
|
*/
|
|
1811
|
-
static
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
sign(message: HexInput): Ed25519Signature;
|
|
1719
|
+
static fromStr(moduleId: MoveModuleId): ModuleId;
|
|
1720
|
+
serialize(serializer: Serializer): void;
|
|
1721
|
+
static deserialize(deserializer: Deserializer): ModuleId;
|
|
1815
1722
|
}
|
|
1816
1723
|
|
|
1724
|
+
declare abstract class TypeTag extends Serializable {
|
|
1725
|
+
abstract serialize(serializer: Serializer): void;
|
|
1726
|
+
static deserialize(deserializer: Deserializer): TypeTag;
|
|
1727
|
+
abstract toString(): string;
|
|
1728
|
+
isBool(): this is TypeTagBool;
|
|
1729
|
+
isAddress(): this is TypeTagAddress;
|
|
1730
|
+
isGeneric(): this is TypeTagGeneric;
|
|
1731
|
+
isSigner(): this is TypeTagSigner;
|
|
1732
|
+
isVector(): this is TypeTagVector;
|
|
1733
|
+
isStruct(): this is TypeTagStruct;
|
|
1734
|
+
isU8(): this is TypeTagU8;
|
|
1735
|
+
isU16(): this is TypeTagU16;
|
|
1736
|
+
isU32(): this is TypeTagU32;
|
|
1737
|
+
isU64(): this is TypeTagU64;
|
|
1738
|
+
isU128(): this is TypeTagU128;
|
|
1739
|
+
isU256(): this is TypeTagU256;
|
|
1740
|
+
}
|
|
1741
|
+
declare class TypeTagBool extends TypeTag {
|
|
1742
|
+
toString(): string;
|
|
1743
|
+
serialize(serializer: Serializer): void;
|
|
1744
|
+
static load(_deserializer: Deserializer): TypeTagBool;
|
|
1745
|
+
}
|
|
1746
|
+
declare class TypeTagU8 extends TypeTag {
|
|
1747
|
+
toString(): string;
|
|
1748
|
+
serialize(serializer: Serializer): void;
|
|
1749
|
+
static load(_deserializer: Deserializer): TypeTagU8;
|
|
1750
|
+
}
|
|
1751
|
+
declare class TypeTagU16 extends TypeTag {
|
|
1752
|
+
toString(): string;
|
|
1753
|
+
serialize(serializer: Serializer): void;
|
|
1754
|
+
static load(_deserializer: Deserializer): TypeTagU16;
|
|
1755
|
+
}
|
|
1756
|
+
declare class TypeTagU32 extends TypeTag {
|
|
1757
|
+
toString(): string;
|
|
1758
|
+
serialize(serializer: Serializer): void;
|
|
1759
|
+
static load(_deserializer: Deserializer): TypeTagU32;
|
|
1760
|
+
}
|
|
1761
|
+
declare class TypeTagU64 extends TypeTag {
|
|
1762
|
+
toString(): string;
|
|
1763
|
+
serialize(serializer: Serializer): void;
|
|
1764
|
+
static load(_deserializer: Deserializer): TypeTagU64;
|
|
1765
|
+
}
|
|
1766
|
+
declare class TypeTagU128 extends TypeTag {
|
|
1767
|
+
toString(): string;
|
|
1768
|
+
serialize(serializer: Serializer): void;
|
|
1769
|
+
static load(_deserializer: Deserializer): TypeTagU128;
|
|
1770
|
+
}
|
|
1771
|
+
declare class TypeTagU256 extends TypeTag {
|
|
1772
|
+
toString(): string;
|
|
1773
|
+
serialize(serializer: Serializer): void;
|
|
1774
|
+
static load(_deserializer: Deserializer): TypeTagU256;
|
|
1775
|
+
}
|
|
1776
|
+
declare class TypeTagAddress extends TypeTag {
|
|
1777
|
+
toString(): string;
|
|
1778
|
+
serialize(serializer: Serializer): void;
|
|
1779
|
+
static load(_deserializer: Deserializer): TypeTagAddress;
|
|
1780
|
+
}
|
|
1781
|
+
declare class TypeTagSigner extends TypeTag {
|
|
1782
|
+
toString(): string;
|
|
1783
|
+
serialize(serializer: Serializer): void;
|
|
1784
|
+
static load(_deserializer: Deserializer): TypeTagSigner;
|
|
1785
|
+
}
|
|
1786
|
+
declare class TypeTagReference extends TypeTag {
|
|
1787
|
+
readonly value: TypeTag;
|
|
1788
|
+
toString(): `&${string}`;
|
|
1789
|
+
constructor(value: TypeTag);
|
|
1790
|
+
serialize(serializer: Serializer): void;
|
|
1791
|
+
static load(deserializer: Deserializer): TypeTagReference;
|
|
1792
|
+
}
|
|
1817
1793
|
/**
|
|
1818
|
-
*
|
|
1819
|
-
*
|
|
1820
|
-
*
|
|
1821
|
-
* @param seed The seed in either Uint8Array | string type
|
|
1822
|
-
*
|
|
1823
|
-
* @returns The object account address
|
|
1794
|
+
* Generics are used for type parameters in entry functions. However,
|
|
1795
|
+
* they are not actually serialized into a real type, so they cannot be
|
|
1796
|
+
* used as a type directly.
|
|
1824
1797
|
*/
|
|
1825
|
-
declare
|
|
1798
|
+
declare class TypeTagGeneric extends TypeTag {
|
|
1799
|
+
readonly value: number;
|
|
1800
|
+
toString(): `T${number}`;
|
|
1801
|
+
constructor(value: number);
|
|
1802
|
+
serialize(serializer: Serializer): void;
|
|
1803
|
+
static load(deserializer: Deserializer): TypeTagGeneric;
|
|
1804
|
+
}
|
|
1805
|
+
declare class TypeTagVector extends TypeTag {
|
|
1806
|
+
readonly value: TypeTag;
|
|
1807
|
+
toString(): `vector<${string}>`;
|
|
1808
|
+
constructor(value: TypeTag);
|
|
1809
|
+
static u8(): TypeTagVector;
|
|
1810
|
+
serialize(serializer: Serializer): void;
|
|
1811
|
+
static load(deserializer: Deserializer): TypeTagVector;
|
|
1812
|
+
}
|
|
1813
|
+
declare class TypeTagStruct extends TypeTag {
|
|
1814
|
+
readonly value: StructTag;
|
|
1815
|
+
toString(): `0x${string}::${string}::${string}`;
|
|
1816
|
+
constructor(value: StructTag);
|
|
1817
|
+
serialize(serializer: Serializer): void;
|
|
1818
|
+
static load(deserializer: Deserializer): TypeTagStruct;
|
|
1819
|
+
isTypeTag(address: AccountAddress, moduleName: string, structName: string): boolean;
|
|
1820
|
+
isString(): boolean;
|
|
1821
|
+
isOption(): boolean;
|
|
1822
|
+
isObject(): boolean;
|
|
1823
|
+
}
|
|
1824
|
+
declare class StructTag extends Serializable {
|
|
1825
|
+
readonly address: AccountAddress;
|
|
1826
|
+
readonly moduleName: Identifier;
|
|
1827
|
+
readonly name: Identifier;
|
|
1828
|
+
readonly typeArgs: Array<TypeTag>;
|
|
1829
|
+
constructor(address: AccountAddress, module_name: Identifier, name: Identifier, type_args: Array<TypeTag>);
|
|
1830
|
+
serialize(serializer: Serializer): void;
|
|
1831
|
+
static deserialize(deserializer: Deserializer): StructTag;
|
|
1832
|
+
}
|
|
1833
|
+
declare function aptosCoinStructTag(): StructTag;
|
|
1834
|
+
declare function stringStructTag(): StructTag;
|
|
1835
|
+
declare function optionStructTag(typeArg: TypeTag): StructTag;
|
|
1836
|
+
declare function objectStructTag(typeArg: TypeTag): StructTag;
|
|
1837
|
+
|
|
1826
1838
|
/**
|
|
1827
|
-
*
|
|
1828
|
-
*
|
|
1829
|
-
* @param creatorAddress The creator account address
|
|
1830
|
-
* @param seed The seed in either Uint8Array | string type
|
|
1831
|
-
*
|
|
1832
|
-
* @returns The resource account address
|
|
1839
|
+
* Deserialize a Script Transaction Argument
|
|
1833
1840
|
*/
|
|
1834
|
-
declare
|
|
1841
|
+
declare function deserializeFromScriptArgument(deserializer: Deserializer): TransactionArgument;
|
|
1835
1842
|
/**
|
|
1836
|
-
*
|
|
1837
|
-
*
|
|
1838
|
-
* @param creatorAddress The token creator account address
|
|
1839
|
-
* @param collectionName The collection name
|
|
1840
|
-
* @param tokenName The token name
|
|
1841
|
-
*
|
|
1842
|
-
* @returns The token account address
|
|
1843
|
+
* Representation of the supported Transaction Payload
|
|
1844
|
+
* that can serialized and deserialized
|
|
1843
1845
|
*/
|
|
1844
|
-
declare
|
|
1845
|
-
|
|
1846
|
+
declare abstract class TransactionPayload extends Serializable {
|
|
1847
|
+
/**
|
|
1848
|
+
* Serialize a Transaction Payload
|
|
1849
|
+
*/
|
|
1850
|
+
abstract serialize(serializer: Serializer): void;
|
|
1851
|
+
/**
|
|
1852
|
+
* Deserialize a Transaction Payload
|
|
1853
|
+
*/
|
|
1854
|
+
static deserialize(deserializer: Deserializer): TransactionPayload;
|
|
1855
|
+
}
|
|
1846
1856
|
/**
|
|
1847
|
-
*
|
|
1857
|
+
* Representation of a Transaction Payload Script that can serialized and deserialized
|
|
1848
1858
|
*/
|
|
1849
|
-
declare
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1859
|
+
declare class TransactionPayloadScript extends TransactionPayload {
|
|
1860
|
+
readonly script: Script;
|
|
1861
|
+
constructor(script: Script);
|
|
1862
|
+
serialize(serializer: Serializer): void;
|
|
1863
|
+
static load(deserializer: Deserializer): TransactionPayloadScript;
|
|
1853
1864
|
}
|
|
1854
1865
|
/**
|
|
1855
|
-
*
|
|
1856
|
-
*
|
|
1857
|
-
* This is the maximum number of gas units that will be used by a transaction before being rejected.
|
|
1858
|
-
*
|
|
1859
|
-
* Note that max gas amount varies based on the transaction. A larger transaction will go over this
|
|
1860
|
-
* default gas amount, and the value will need to be changed for the specific transaction.
|
|
1866
|
+
* Representation of a Transaction Payload Entry Function that can serialized and deserialized
|
|
1861
1867
|
*/
|
|
1862
|
-
declare
|
|
1868
|
+
declare class TransactionPayloadEntryFunction extends TransactionPayload {
|
|
1869
|
+
readonly entryFunction: EntryFunction;
|
|
1870
|
+
constructor(entryFunction: EntryFunction);
|
|
1871
|
+
serialize(serializer: Serializer): void;
|
|
1872
|
+
static load(deserializer: Deserializer): TransactionPayloadEntryFunction;
|
|
1873
|
+
}
|
|
1863
1874
|
/**
|
|
1864
|
-
*
|
|
1865
|
-
*
|
|
1866
|
-
* This time is how long until the blockchain nodes will reject the transaction.
|
|
1867
|
-
*
|
|
1868
|
-
* Note that the transaction expiration time varies based on network connection and network load. It may need to be
|
|
1869
|
-
* increased for the transaction to be processed.
|
|
1875
|
+
* Representation of a Transaction Payload Multi-sig that can serialized and deserialized
|
|
1870
1876
|
*/
|
|
1871
|
-
declare
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
* the results of the transaction. It may take longer based on network connection and network load.
|
|
1877
|
-
*/
|
|
1878
|
-
declare const DEFAULT_TXN_TIMEOUT_SEC = 20;
|
|
1879
|
-
/**
|
|
1880
|
-
* The default gas currency for the network.
|
|
1881
|
-
*/
|
|
1882
|
-
declare const APTOS_COIN = "0x1::aptos_coin::AptosCoin";
|
|
1883
|
-
declare const RAW_TRANSACTION_SALT = "APTOS::RawTransaction";
|
|
1884
|
-
declare const RAW_TRANSACTION_WITH_DATA_SALT = "APTOS::RawTransactionWithData";
|
|
1885
|
-
/**
|
|
1886
|
-
* The list of supported Processor types for our indexer api.
|
|
1887
|
-
*
|
|
1888
|
-
* These can be found from the processor_status table in the indexer database.
|
|
1889
|
-
* {@link https://cloud.hasura.io/public/graphiql?endpoint=https://api.mainnet.aptoslabs.com/v1/graphql}
|
|
1890
|
-
*/
|
|
1891
|
-
declare enum ProcessorType {
|
|
1892
|
-
ACCOUNT_TRANSACTION_PROCESSOR = "account_transactions_processor",
|
|
1893
|
-
DEFAULT = "default_processor",
|
|
1894
|
-
EVENTS_PROCESSOR = "events_processor",
|
|
1895
|
-
FUNGIBLE_ASSET_PROCESSOR = "fungible_asset_processor",
|
|
1896
|
-
STAKE_PROCESSOR = "stake_processor",
|
|
1897
|
-
TOKEN_V2_PROCESSOR = "token_v2_processor",
|
|
1898
|
-
USER_TRANSACTION_PROCESSOR = "user_transaction_processor"
|
|
1877
|
+
declare class TransactionPayloadMultiSig extends TransactionPayload {
|
|
1878
|
+
readonly multiSig: MultiSig;
|
|
1879
|
+
constructor(multiSig: MultiSig);
|
|
1880
|
+
serialize(serializer: Serializer): void;
|
|
1881
|
+
static load(deserializer: Deserializer): TransactionPayloadMultiSig;
|
|
1899
1882
|
}
|
|
1900
|
-
|
|
1901
1883
|
/**
|
|
1902
|
-
*
|
|
1903
|
-
*
|
|
1904
|
-
* @example
|
|
1905
|
-
*
|
|
1906
|
-
* const aptosConfig = new AptosConfig({network:Network.TESTNET})
|
|
1884
|
+
* Representation of a EntryFunction that can serialized and deserialized
|
|
1907
1885
|
*/
|
|
1908
|
-
declare class
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
readonly
|
|
1913
|
-
/**
|
|
1914
|
-
* The client instance the SDK uses. Defaults to `@aptos-labs/aptos-client
|
|
1915
|
-
*/
|
|
1916
|
-
readonly client: Client;
|
|
1917
|
-
/**
|
|
1918
|
-
* The optional hardcoded fullnode URL to send requests to instead of using the network
|
|
1919
|
-
*/
|
|
1920
|
-
readonly fullnode?: string;
|
|
1921
|
-
/**
|
|
1922
|
-
* The optional hardcoded faucet URL to send requests to instead of using the network
|
|
1923
|
-
*/
|
|
1924
|
-
readonly faucet?: string;
|
|
1925
|
-
/**
|
|
1926
|
-
* The optional hardcoded indexer URL to send requests to instead of using the network
|
|
1927
|
-
*/
|
|
1928
|
-
readonly indexer?: string;
|
|
1929
|
-
/**
|
|
1930
|
-
* Optional client configurations
|
|
1931
|
-
*/
|
|
1932
|
-
readonly clientConfig?: ClientConfig;
|
|
1933
|
-
/**
|
|
1934
|
-
* Optional specific Fullnode configurations
|
|
1935
|
-
*/
|
|
1936
|
-
readonly fullnodeConfig?: FullNodeConfig;
|
|
1937
|
-
/**
|
|
1938
|
-
* Optional specific Indexer configurations
|
|
1939
|
-
*/
|
|
1940
|
-
readonly indexerConfig?: IndexerConfig;
|
|
1941
|
-
/**
|
|
1942
|
-
* Optional specific Faucet configurations
|
|
1943
|
-
*/
|
|
1944
|
-
readonly faucetConfig?: FaucetConfig;
|
|
1945
|
-
constructor(settings?: AptosSettings);
|
|
1886
|
+
declare class EntryFunction {
|
|
1887
|
+
readonly module_name: ModuleId;
|
|
1888
|
+
readonly function_name: Identifier;
|
|
1889
|
+
readonly type_args: Array<TypeTag>;
|
|
1890
|
+
readonly args: Array<EntryFunctionArgument>;
|
|
1946
1891
|
/**
|
|
1947
|
-
*
|
|
1948
|
-
*
|
|
1949
|
-
*
|
|
1950
|
-
*
|
|
1892
|
+
* Contains the payload to run a function within a module.
|
|
1893
|
+
* @param module_name Fully qualified module name in format "account_address::module_name" e.g. "0x1::coin"
|
|
1894
|
+
* @param function_name The function name. e.g "transfer"
|
|
1895
|
+
* @param type_args Type arguments that move function requires.
|
|
1951
1896
|
*
|
|
1952
|
-
* @
|
|
1897
|
+
* @example
|
|
1898
|
+
* A coin transfer function has one type argument "CoinType".
|
|
1899
|
+
* ```
|
|
1900
|
+
* public entry fun transfer<CoinType>(from: &signer, to: address, amount: u64)
|
|
1901
|
+
* ```
|
|
1902
|
+
* @param args arguments to the move function.
|
|
1953
1903
|
*
|
|
1954
|
-
* @
|
|
1904
|
+
* @example
|
|
1905
|
+
* A coin transfer function has three arguments "from", "to" and "amount".
|
|
1906
|
+
* ```
|
|
1907
|
+
* public entry fun transfer<CoinType>(from: &signer, to: address, amount: u64)
|
|
1908
|
+
* ```
|
|
1955
1909
|
*/
|
|
1956
|
-
|
|
1957
|
-
}
|
|
1958
|
-
|
|
1959
|
-
/**
|
|
1960
|
-
* A class to query all `Account` related queries on Aptos.
|
|
1961
|
-
*/
|
|
1962
|
-
declare class Account {
|
|
1963
|
-
readonly config: AptosConfig;
|
|
1964
|
-
constructor(config: AptosConfig);
|
|
1910
|
+
constructor(module_name: ModuleId, function_name: Identifier, type_args: Array<TypeTag>, args: Array<EntryFunctionArgument>);
|
|
1965
1911
|
/**
|
|
1966
|
-
*
|
|
1912
|
+
* A helper function to build a EntryFunction payload from raw primitive values
|
|
1967
1913
|
*
|
|
1968
|
-
* @param
|
|
1914
|
+
* @param module_id Fully qualified module name in format "AccountAddress::module_id" e.g. "0x1::coin"
|
|
1915
|
+
* @param function_name Function name
|
|
1916
|
+
* @param type_args Type arguments that move function requires.
|
|
1969
1917
|
*
|
|
1970
|
-
* @
|
|
1918
|
+
* @example
|
|
1919
|
+
* A coin transfer function has one type argument "CoinType".
|
|
1920
|
+
* ```
|
|
1921
|
+
* public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
|
|
1922
|
+
* ```
|
|
1923
|
+
* @param args Arguments to the move function.
|
|
1971
1924
|
*
|
|
1972
|
-
* @example
|
|
1925
|
+
* @example
|
|
1926
|
+
* A coin transfer function has three arguments "from", "to" and "amount".
|
|
1973
1927
|
* ```
|
|
1974
|
-
*
|
|
1975
|
-
* sequence_number: "1",
|
|
1976
|
-
* authentication_key: "0x5307b5f4bc67829097a8ba9b43dba3b88261eeccd1f709d9bde240fc100fbb69"
|
|
1977
|
-
* }
|
|
1928
|
+
* public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
|
|
1978
1929
|
* ```
|
|
1930
|
+
* @returns EntryFunction
|
|
1979
1931
|
*/
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
}): Promise<AccountData>;
|
|
1932
|
+
static build(module_id: MoveModuleId, function_name: string, type_args: Array<TypeTag>, args: Array<EntryFunctionArgument>): EntryFunction;
|
|
1933
|
+
serialize(serializer: Serializer): void;
|
|
1983
1934
|
/**
|
|
1984
|
-
*
|
|
1935
|
+
* Deserializes an entry function payload with the arguments represented as EntryFunctionBytes instances.
|
|
1936
|
+
* @see EntryFunctionBytes
|
|
1985
1937
|
*
|
|
1986
|
-
*
|
|
1987
|
-
*
|
|
1938
|
+
* NOTE: When you deserialize an EntryFunction payload with this method, the entry function
|
|
1939
|
+
* arguments are populated into the deserialized instance as type-agnostic, raw fixed bytes
|
|
1940
|
+
* in the form of the EntryFunctionBytes class.
|
|
1988
1941
|
*
|
|
1989
|
-
*
|
|
1990
|
-
*
|
|
1991
|
-
*
|
|
1992
|
-
*
|
|
1942
|
+
* In order to correctly deserialize these arguments as their actual type representations, you
|
|
1943
|
+
* must know the types of the arguments beforehand and deserialize them yourself individually.
|
|
1944
|
+
*
|
|
1945
|
+
* One way you could achieve this is by using the ABIs for an entry function and deserializing each
|
|
1946
|
+
* argument as its given, corresponding type.
|
|
1947
|
+
*
|
|
1948
|
+
* @param deserializer
|
|
1949
|
+
* @returns A deserialized EntryFunction payload for a transaction.
|
|
1993
1950
|
*
|
|
1994
|
-
* @returns Account modules
|
|
1995
1951
|
*/
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
1952
|
+
static deserialize(deserializer: Deserializer): EntryFunction;
|
|
1953
|
+
}
|
|
1954
|
+
/**
|
|
1955
|
+
* Representation of a Script that can serialized and deserialized
|
|
1956
|
+
*/
|
|
1957
|
+
declare class Script {
|
|
2000
1958
|
/**
|
|
2001
|
-
*
|
|
1959
|
+
* The move module bytecode
|
|
1960
|
+
*/
|
|
1961
|
+
readonly bytecode: Uint8Array;
|
|
1962
|
+
/**
|
|
1963
|
+
* The type arguments that the bytecode function requires.
|
|
1964
|
+
*/
|
|
1965
|
+
readonly type_args: Array<TypeTag>;
|
|
1966
|
+
/**
|
|
1967
|
+
* The arguments that the bytecode function requires.
|
|
1968
|
+
*/
|
|
1969
|
+
readonly args: Array<ScriptFunctionArgument>;
|
|
1970
|
+
/**
|
|
1971
|
+
* Scripts contain the Move bytecodes payload that can be submitted to Aptos chain for execution.
|
|
2002
1972
|
*
|
|
2003
|
-
* @param
|
|
2004
|
-
* @param
|
|
2005
|
-
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
1973
|
+
* @param bytecode The move module bytecode
|
|
1974
|
+
* @param type_args The type arguments that the bytecode function requires.
|
|
2006
1975
|
*
|
|
2007
|
-
* @
|
|
1976
|
+
* @example
|
|
1977
|
+
* A coin transfer function has one type argument "CoinType".
|
|
1978
|
+
* ```
|
|
1979
|
+
* public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
|
|
1980
|
+
* ```
|
|
1981
|
+
* @param args The arguments that the bytecode function requires.
|
|
2008
1982
|
*
|
|
2009
1983
|
* @example
|
|
2010
|
-
*
|
|
2011
|
-
* // An example of an account module response
|
|
1984
|
+
* A coin transfer function has three arguments "from", "to" and "amount".
|
|
2012
1985
|
* ```
|
|
2013
|
-
*
|
|
2014
|
-
* bytecode: "0xa11ceb0b0600000006010002030206050807070f0d081c200",
|
|
2015
|
-
* abi: { address: "0x1" }
|
|
2016
|
-
* }
|
|
1986
|
+
* public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
|
|
2017
1987
|
* ```
|
|
2018
1988
|
*/
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
1989
|
+
constructor(bytecode: Uint8Array, type_args: Array<TypeTag>, args: Array<ScriptFunctionArgument>);
|
|
1990
|
+
serialize(serializer: Serializer): void;
|
|
1991
|
+
static deserialize(deserializer: Deserializer): Script;
|
|
1992
|
+
}
|
|
1993
|
+
/**
|
|
1994
|
+
* Representation of a MultiSig that can serialized and deserialized
|
|
1995
|
+
*/
|
|
1996
|
+
declare class MultiSig {
|
|
1997
|
+
readonly multisig_address: AccountAddress;
|
|
1998
|
+
readonly transaction_payload?: MultiSigTransactionPayload;
|
|
2024
1999
|
/**
|
|
2025
|
-
*
|
|
2026
|
-
*
|
|
2027
|
-
* Note: In order to get all account transactions, this function may call the API
|
|
2028
|
-
* multiple times as it auto paginates.
|
|
2029
|
-
*
|
|
2030
|
-
* @example
|
|
2031
|
-
* const transactions = await aptos.getAccountTransactions({accountAddress:"0x456"})
|
|
2000
|
+
* Contains the payload to run a multi-sig account transaction.
|
|
2032
2001
|
*
|
|
2033
|
-
* @param
|
|
2034
|
-
* @param args.options.offset The number transaction to start returning results from
|
|
2035
|
-
* @param args.options.limit The number of results to return
|
|
2002
|
+
* @param multisig_address The multi-sig account address the transaction will be executed as.
|
|
2036
2003
|
*
|
|
2037
|
-
* @
|
|
2004
|
+
* @param transaction_payload The payload of the multi-sig transaction. This is optional when executing a multi-sig
|
|
2005
|
+
* transaction whose payload is already stored on chain.
|
|
2038
2006
|
*/
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2007
|
+
constructor(multisig_address: AccountAddress, transaction_payload?: MultiSigTransactionPayload);
|
|
2008
|
+
serialize(serializer: Serializer): void;
|
|
2009
|
+
static deserialize(deserializer: Deserializer): MultiSig;
|
|
2010
|
+
}
|
|
2011
|
+
/**
|
|
2012
|
+
* Representation of a MultiSig Transaction Payload from `multisig_account.move`
|
|
2013
|
+
* that can be serialized and deserialized
|
|
2014
|
+
|
|
2015
|
+
* This class exists right now to represent an extensible transaction payload class for
|
|
2016
|
+
* transactions used in `multisig_account.move`. Eventually, this class will be able to
|
|
2017
|
+
* support script payloads when the `multisig_account.move` module supports them.
|
|
2018
|
+
*/
|
|
2019
|
+
declare class MultiSigTransactionPayload extends Serializable {
|
|
2020
|
+
readonly transaction_payload: EntryFunction;
|
|
2043
2021
|
/**
|
|
2044
|
-
*
|
|
2045
|
-
*
|
|
2046
|
-
* Note: In order to get all account resources, this function may call the API
|
|
2047
|
-
* multiple times as it auto paginates.
|
|
2022
|
+
* Contains the payload to run a multi-sig account transaction.
|
|
2048
2023
|
*
|
|
2049
|
-
* @
|
|
2050
|
-
*
|
|
2051
|
-
*
|
|
2052
|
-
* @param args.accountAddress Aptos account address
|
|
2053
|
-
* @param args.options.offset The number resource to start returning results from
|
|
2054
|
-
* @param args.options.limit The number of results to return
|
|
2055
|
-
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
2056
|
-
* @returns Account resources
|
|
2057
|
-
*/
|
|
2058
|
-
getAccountResources(args: {
|
|
2059
|
-
accountAddress: AccountAddressInput;
|
|
2060
|
-
options?: PaginationArgs & LedgerVersionArg;
|
|
2061
|
-
}): Promise<MoveResource[]>;
|
|
2062
|
-
/**
|
|
2063
|
-
* Queries a specific account resource given account address and resource type. Note that the default is `any` in order
|
|
2064
|
-
* to allow for ease of accessing properties of the object.
|
|
2065
|
-
*
|
|
2066
|
-
* @type The typed output of the resource
|
|
2067
|
-
* @param args.accountAddress Aptos account address
|
|
2068
|
-
* @param args.resourceType String representation of an on-chain Move struct type, i.e "0x1::aptos_coin::AptosCoin"
|
|
2069
|
-
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
2070
|
-
*
|
|
2071
|
-
* @returns Account resource
|
|
2072
|
-
*
|
|
2073
|
-
* @example
|
|
2074
|
-
* const resource = await aptos.getAccountResource({accountAddress:"0x456"})
|
|
2075
|
-
*
|
|
2076
|
-
*/
|
|
2077
|
-
getAccountResource<T extends {} = any>(args: {
|
|
2078
|
-
accountAddress: AccountAddressInput;
|
|
2079
|
-
resourceType: MoveStructId;
|
|
2080
|
-
options?: LedgerVersionArg;
|
|
2081
|
-
}): Promise<T>;
|
|
2082
|
-
/**
|
|
2083
|
-
* Looks up the account address for a given authentication key
|
|
2084
|
-
*
|
|
2085
|
-
* This handles both if the account's authentication key has been rotated or not.
|
|
2086
|
-
*
|
|
2087
|
-
* @example
|
|
2088
|
-
* const accountAddress = await aptos.lookupOriginalAccountAddress({authenticationKey:account.accountAddress})
|
|
2089
|
-
*
|
|
2090
|
-
* @param args.authenticationKey The authentication key
|
|
2091
|
-
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
2092
|
-
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
2093
|
-
* @returns Promise<AccountAddress> The accountAddress associated with the authentication key
|
|
2094
|
-
*/
|
|
2095
|
-
lookupOriginalAccountAddress(args: {
|
|
2096
|
-
authenticationKey: AccountAddressInput;
|
|
2097
|
-
minimumLedgerVersion?: AnyNumber;
|
|
2098
|
-
options?: LedgerVersionArg;
|
|
2099
|
-
}): Promise<AccountAddress>;
|
|
2100
|
-
/**
|
|
2101
|
-
* Queries the current count of tokens owned by an account
|
|
2102
|
-
*
|
|
2103
|
-
* @example
|
|
2104
|
-
* const tokensCount = await aptos.getAccountTokensCount({accountAddress:"0x456"})
|
|
2105
|
-
*
|
|
2106
|
-
* @param args.accountAddress The account address
|
|
2107
|
-
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
2108
|
-
* @returns Current count of tokens owned by the account
|
|
2024
|
+
* @param transaction_payload The payload of the multi-sig transaction.
|
|
2025
|
+
* This can only be EntryFunction for now but,
|
|
2026
|
+
* Script might be supported in the future.
|
|
2109
2027
|
*/
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2028
|
+
constructor(transaction_payload: EntryFunction);
|
|
2029
|
+
serialize(serializer: Serializer): void;
|
|
2030
|
+
static deserialize(deserializer: Deserializer): MultiSigTransactionPayload;
|
|
2031
|
+
}
|
|
2032
|
+
|
|
2033
|
+
/**
|
|
2034
|
+
* Representation of a Raw Transaction that can serialized and deserialized
|
|
2035
|
+
*/
|
|
2036
|
+
declare class RawTransaction extends Serializable {
|
|
2037
|
+
readonly sender: AccountAddress;
|
|
2038
|
+
readonly sequence_number: bigint;
|
|
2039
|
+
readonly payload: TransactionPayload;
|
|
2040
|
+
readonly max_gas_amount: bigint;
|
|
2041
|
+
readonly gas_unit_price: bigint;
|
|
2042
|
+
readonly expiration_timestamp_secs: bigint;
|
|
2043
|
+
readonly chain_id: ChainId;
|
|
2114
2044
|
/**
|
|
2115
|
-
*
|
|
2116
|
-
*
|
|
2117
|
-
* This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
|
|
2118
|
-
* If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
|
|
2119
|
-
*
|
|
2120
|
-
* @example
|
|
2121
|
-
* const accountOwnedTokens = await aptos.getAccountOwnedTokens({accountAddress:"0x456"})
|
|
2045
|
+
* RawTransactions contain the metadata and payloads that can be submitted to Aptos chain for execution.
|
|
2046
|
+
* RawTransactions must be signed before Aptos chain can execute them.
|
|
2122
2047
|
*
|
|
2123
|
-
* @param
|
|
2124
|
-
* @param
|
|
2125
|
-
*
|
|
2126
|
-
* @param
|
|
2127
|
-
*
|
|
2128
|
-
* @param
|
|
2129
|
-
*
|
|
2048
|
+
* @param sender The sender Account Address
|
|
2049
|
+
* @param sequence_number Sequence number of this transaction. This must match the sequence number stored in
|
|
2050
|
+
* the sender's account at the time the transaction executes.
|
|
2051
|
+
* @param payload Instructions for the Aptos Blockchain, including publishing a module,
|
|
2052
|
+
* execute an entry function or execute a script payload.
|
|
2053
|
+
* @param max_gas_amount Maximum total gas to spend for this transaction. The account must have more
|
|
2054
|
+
* than this gas or the transaction will be discarded during validation.
|
|
2055
|
+
* @param gas_unit_price Price to be paid per gas unit.
|
|
2056
|
+
* @param expiration_timestamp_secs The blockchain timestamp at which the blockchain would discard this transaction.
|
|
2057
|
+
* @param chain_id The chain ID of the blockchain that this transaction is intended to be run on.
|
|
2130
2058
|
*/
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2059
|
+
constructor(sender: AccountAddress, sequence_number: bigint, payload: TransactionPayload, max_gas_amount: bigint, gas_unit_price: bigint, expiration_timestamp_secs: bigint, chain_id: ChainId);
|
|
2060
|
+
serialize(serializer: Serializer): void;
|
|
2061
|
+
static deserialize(deserializer: Deserializer): RawTransaction;
|
|
2062
|
+
}
|
|
2063
|
+
/**
|
|
2064
|
+
* Representation of a Raw Transaction With Data that can serialized and deserialized
|
|
2065
|
+
*/
|
|
2066
|
+
declare abstract class RawTransactionWithData extends Serializable {
|
|
2136
2067
|
/**
|
|
2137
|
-
*
|
|
2138
|
-
*
|
|
2139
|
-
* This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
|
|
2140
|
-
* If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
|
|
2141
|
-
*
|
|
2142
|
-
* @example
|
|
2143
|
-
* const accountOwnedTokens = await aptos.getAccountOwnedTokensFromCollectionAddress({accountAddress:"0x123", collectionAddress:"0x456"})
|
|
2144
|
-
*
|
|
2145
|
-
* @param args.accountAddress The account address we want to get the tokens for
|
|
2146
|
-
* @param args.collectionAddress The address of the collection being queried
|
|
2147
|
-
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
2148
|
-
* @param args.options.tokenStandard The NFT standard to query for
|
|
2149
|
-
* @param args.options.offset The number token to start returning results from
|
|
2150
|
-
* @param args.options.limit The number of results to return
|
|
2151
|
-
* @param args.options.orderBy The order to sort the tokens by
|
|
2152
|
-
* @returns Tokens array with the token data
|
|
2068
|
+
* Serialize a Raw Transaction With Data
|
|
2153
2069
|
*/
|
|
2154
|
-
|
|
2155
|
-
accountAddress: AccountAddressInput;
|
|
2156
|
-
collectionAddress: AccountAddressInput;
|
|
2157
|
-
minimumLedgerVersion?: AnyNumber;
|
|
2158
|
-
options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensFromCollectionResponse[0]>;
|
|
2159
|
-
}): Promise<GetAccountOwnedTokensFromCollectionResponse>;
|
|
2070
|
+
abstract serialize(serializer: Serializer): void;
|
|
2160
2071
|
/**
|
|
2161
|
-
*
|
|
2162
|
-
*
|
|
2163
|
-
* This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
|
|
2164
|
-
* If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
|
|
2165
|
-
*
|
|
2166
|
-
* @example
|
|
2167
|
-
* const accountCollectionsWithOwnedTokens = await aptos.getAccountCollectionsWithOwnedTokens({accountAddress:"0x123"})
|
|
2168
|
-
*
|
|
2169
|
-
* @param args.accountAddress The account address we want to get the collections for
|
|
2170
|
-
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
2171
|
-
* @param args.options.tokenStandard The NFT standard to query for
|
|
2172
|
-
* @param args.options.offset The number collection to start returning results from
|
|
2173
|
-
* @param args.options.limit The number of results to return
|
|
2174
|
-
* @param args.options.orderBy The order to sort the tokens by
|
|
2175
|
-
* @returns Collections array with the collections data
|
|
2072
|
+
* Deserialize a Raw Transaction With Data
|
|
2176
2073
|
*/
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2074
|
+
static deserialize(deserializer: Deserializer): RawTransactionWithData;
|
|
2075
|
+
}
|
|
2076
|
+
/**
|
|
2077
|
+
* Representation of a Multi Agent Transaction that can serialized and deserialized
|
|
2078
|
+
*/
|
|
2079
|
+
declare class MultiAgentRawTransaction extends RawTransactionWithData {
|
|
2182
2080
|
/**
|
|
2183
|
-
*
|
|
2184
|
-
*
|
|
2185
|
-
* @example
|
|
2186
|
-
* const accountTransactionsCount = await aptos.getAccountTransactionsCount({accountAddress:"0x123"})
|
|
2187
|
-
*
|
|
2188
|
-
* @param args.accountAddress The account address we want to get the total count for
|
|
2189
|
-
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
2190
|
-
* @returns Current count of transactions made by an account
|
|
2081
|
+
* The raw transaction
|
|
2191
2082
|
*/
|
|
2192
|
-
|
|
2193
|
-
accountAddress: AccountAddressInput;
|
|
2194
|
-
minimumLedgerVersion?: AnyNumber;
|
|
2195
|
-
}): Promise<number>;
|
|
2083
|
+
readonly raw_txn: RawTransaction;
|
|
2196
2084
|
/**
|
|
2197
|
-
*
|
|
2198
|
-
*
|
|
2199
|
-
* @example
|
|
2200
|
-
* const accountCoinsData = await aptos.getAccountCoinsData({accountAddress:"0x123"})
|
|
2201
|
-
*
|
|
2202
|
-
* @param args.accountAddress The account address we want to get the coins data for
|
|
2203
|
-
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
2204
|
-
* @param args.options.offset optional. The number coin to start returning results from
|
|
2205
|
-
* @param args.options.limit optional. The number of results to return
|
|
2206
|
-
* @param args.options.orderBy optional. The order to sort the coins by
|
|
2207
|
-
* @param args.options.where optional. Filter the results by
|
|
2208
|
-
* @returns Array with the coins data
|
|
2085
|
+
* The secondary signers on this transaction
|
|
2209
2086
|
*/
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2087
|
+
readonly secondary_signer_addresses: Array<AccountAddress>;
|
|
2088
|
+
constructor(raw_txn: RawTransaction, secondary_signer_addresses: Array<AccountAddress>);
|
|
2089
|
+
serialize(serializer: Serializer): void;
|
|
2090
|
+
static load(deserializer: Deserializer): MultiAgentRawTransaction;
|
|
2091
|
+
}
|
|
2092
|
+
/**
|
|
2093
|
+
* Representation of a Fee Payer Transaction that can serialized and deserialized
|
|
2094
|
+
*/
|
|
2095
|
+
declare class FeePayerRawTransaction extends RawTransactionWithData {
|
|
2215
2096
|
/**
|
|
2216
|
-
*
|
|
2217
|
-
*
|
|
2218
|
-
* @example
|
|
2219
|
-
* const accountCoinsCount = await aptos.getAccountCoinsCount({accountAddress:"0x123"})
|
|
2220
|
-
*
|
|
2221
|
-
* @param args.accountAddress The account address we want to get the total count for
|
|
2222
|
-
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
2223
|
-
* @returns Current count of the aggregated count of all account's coins
|
|
2097
|
+
* The raw transaction
|
|
2224
2098
|
*/
|
|
2225
|
-
|
|
2226
|
-
accountAddress: AccountAddressInput;
|
|
2227
|
-
minimumLedgerVersion?: AnyNumber;
|
|
2228
|
-
}): Promise<number>;
|
|
2099
|
+
readonly raw_txn: RawTransaction;
|
|
2229
2100
|
/**
|
|
2230
|
-
*
|
|
2231
|
-
*
|
|
2232
|
-
* @example
|
|
2233
|
-
* const accountAPTAmount = await aptos.getAccountAPTAmount({accountAddress:"0x123"})
|
|
2234
|
-
*
|
|
2235
|
-
* @param args.accountAddress The account address we want to get the total count for
|
|
2236
|
-
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
2237
|
-
* @returns Current amount of account's APT
|
|
2101
|
+
* The secondary signers on this transaction - optional and can be empty
|
|
2238
2102
|
*/
|
|
2239
|
-
|
|
2240
|
-
accountAddress: AccountAddressInput;
|
|
2241
|
-
minimumLedgerVersion?: AnyNumber;
|
|
2242
|
-
}): Promise<number>;
|
|
2103
|
+
readonly secondary_signer_addresses: Array<AccountAddress>;
|
|
2243
2104
|
/**
|
|
2244
|
-
*
|
|
2245
|
-
*
|
|
2246
|
-
* @example
|
|
2247
|
-
* const accountCoinAmount = await aptos.getAccountCoinAmount({accountAddress:"0x123", coinType:"0x1::aptos_coin::AptosCoin"})
|
|
2248
|
-
*
|
|
2249
|
-
* @param args.accountAddress The account address we want to get the total count for
|
|
2250
|
-
* @param args.coinType The coin type to query
|
|
2251
|
-
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
2252
|
-
* @returns Current amount of account's coin
|
|
2105
|
+
* The fee payer account address
|
|
2253
2106
|
*/
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
}): Promise<number>;
|
|
2259
|
-
/**
|
|
2260
|
-
* Queries an account's owned objects
|
|
2261
|
-
*
|
|
2262
|
-
* @example
|
|
2263
|
-
* const accountOwnedObjects = await aptos.getAccountOwnedObjects({accountAddress:"0x123"})
|
|
2264
|
-
*
|
|
2265
|
-
* @param args.accountAddress The account address we want to get the objects for
|
|
2266
|
-
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
2267
|
-
* @param args.options.offset The starting position to start returning results from
|
|
2268
|
-
* @param args.options.limit The number of results to return
|
|
2269
|
-
* @param args.options.orderBy The order to sort the objects by
|
|
2270
|
-
* @returns Objects array with the object data
|
|
2271
|
-
*/
|
|
2272
|
-
getAccountOwnedObjects(args: {
|
|
2273
|
-
accountAddress: AccountAddressInput;
|
|
2274
|
-
minimumLedgerVersion?: AnyNumber;
|
|
2275
|
-
options?: PaginationArgs & OrderByArg<GetAccountOwnedObjectsResponse[0]>;
|
|
2276
|
-
}): Promise<GetAccountOwnedObjectsResponse>;
|
|
2277
|
-
/**
|
|
2278
|
-
* Derives an account by providing a private key.
|
|
2279
|
-
* This functions resolves the provided private key type and derives the public key from it.
|
|
2280
|
-
*
|
|
2281
|
-
* If the privateKey is a Secp256k1 type, it derives the account using the derived public key and
|
|
2282
|
-
* auth key using the SingleKey scheme locally.
|
|
2283
|
-
*
|
|
2284
|
-
* If the privateKey is a ED25519 type, it looks up the authentication key on chain, and uses it to resolve
|
|
2285
|
-
* whether it is a Legacy ED25519 key or a Unified ED25519 key. It then derives the account based
|
|
2286
|
-
* on that.
|
|
2287
|
-
*
|
|
2288
|
-
* @example
|
|
2289
|
-
* const account = await aptos.deriveAccountFromPrivateKey({privateKey:new Ed25519PrivateKey("0x123")})
|
|
2290
|
-
*
|
|
2291
|
-
* @param args.privateKey An account private key
|
|
2292
|
-
* @returns Account type
|
|
2293
|
-
*/
|
|
2294
|
-
deriveAccountFromPrivateKey(args: {
|
|
2295
|
-
privateKey: PrivateKey;
|
|
2296
|
-
}): Promise<Account$1>;
|
|
2107
|
+
readonly fee_payer_address: AccountAddress;
|
|
2108
|
+
constructor(raw_txn: RawTransaction, secondary_signer_addresses: Array<AccountAddress>, fee_payer_address: AccountAddress);
|
|
2109
|
+
serialize(serializer: Serializer): void;
|
|
2110
|
+
static load(deserializer: Deserializer): FeePayerRawTransaction;
|
|
2297
2111
|
}
|
|
2298
2112
|
|
|
2299
2113
|
/**
|
|
2300
|
-
* Representation of
|
|
2114
|
+
* Representation of the challenge which is needed to sign by owner of the account
|
|
2115
|
+
* to rotate the authentication key.
|
|
2301
2116
|
*/
|
|
2302
|
-
declare class
|
|
2303
|
-
readonly
|
|
2304
|
-
|
|
2117
|
+
declare class RotationProofChallenge extends Serializable {
|
|
2118
|
+
readonly accountAddress: AccountAddress;
|
|
2119
|
+
readonly moduleName: MoveString;
|
|
2120
|
+
readonly structName: MoveString;
|
|
2121
|
+
readonly originator: AccountAddress;
|
|
2122
|
+
readonly currentAuthKey: AccountAddress;
|
|
2123
|
+
readonly newPublicKey: MoveVector<U8>;
|
|
2124
|
+
readonly sequenceNumber: U64;
|
|
2125
|
+
constructor(args: {
|
|
2126
|
+
sequenceNumber: AnyNumber;
|
|
2127
|
+
originator: AccountAddress;
|
|
2128
|
+
currentAuthKey: AccountAddress;
|
|
2129
|
+
newPublicKey: PublicKey;
|
|
2130
|
+
});
|
|
2305
2131
|
serialize(serializer: Serializer): void;
|
|
2306
|
-
static deserialize(deserializer: Deserializer): ChainId;
|
|
2307
2132
|
}
|
|
2308
2133
|
|
|
2134
|
+
declare abstract class TransactionAuthenticator extends Serializable {
|
|
2135
|
+
abstract serialize(serializer: Serializer): void;
|
|
2136
|
+
static deserialize(deserializer: Deserializer): TransactionAuthenticator;
|
|
2137
|
+
}
|
|
2309
2138
|
/**
|
|
2310
|
-
*
|
|
2311
|
-
*
|
|
2312
|
-
*
|
|
2139
|
+
* Transaction authenticator Ed25519 for a single signer transaction
|
|
2140
|
+
*
|
|
2141
|
+
* @param public_key Client's public key.
|
|
2142
|
+
* @param signature Ed25519 signature of a raw transaction.
|
|
2143
|
+
* @see {@link https://aptos.dev/integration/creating-a-signed-transaction | Creating a Signed Transaction}
|
|
2144
|
+
* for details about generating a signature.
|
|
2313
2145
|
*/
|
|
2314
|
-
declare class
|
|
2315
|
-
|
|
2316
|
-
|
|
2146
|
+
declare class TransactionAuthenticatorEd25519 extends TransactionAuthenticator {
|
|
2147
|
+
readonly public_key: Ed25519PublicKey;
|
|
2148
|
+
readonly signature: Ed25519Signature;
|
|
2149
|
+
constructor(public_key: Ed25519PublicKey, signature: Ed25519Signature);
|
|
2317
2150
|
serialize(serializer: Serializer): void;
|
|
2318
|
-
static
|
|
2151
|
+
static load(deserializer: Deserializer): TransactionAuthenticatorEd25519;
|
|
2319
2152
|
}
|
|
2320
|
-
|
|
2321
2153
|
/**
|
|
2322
|
-
*
|
|
2323
|
-
*
|
|
2154
|
+
* Transaction authenticator Ed25519 for a multi signers transaction
|
|
2155
|
+
*
|
|
2156
|
+
* @param public_key Client's public key.
|
|
2157
|
+
* @param signature Multi Ed25519 signature of a raw transaction.
|
|
2158
|
+
*
|
|
2324
2159
|
*/
|
|
2325
|
-
declare class
|
|
2326
|
-
readonly
|
|
2327
|
-
readonly
|
|
2328
|
-
|
|
2329
|
-
* Full name of a module.
|
|
2330
|
-
* @param address The account address. e.g "0x1"
|
|
2331
|
-
* @param name The module name under the "address". e.g "coin"
|
|
2332
|
-
*/
|
|
2333
|
-
constructor(address: AccountAddress, name: Identifier);
|
|
2334
|
-
/**
|
|
2335
|
-
* Converts a string literal to a ModuleId
|
|
2336
|
-
* @param moduleId String literal in format "account_address::module_name", e.g. "0x1::coin"
|
|
2337
|
-
* @returns ModuleId
|
|
2338
|
-
*/
|
|
2339
|
-
static fromStr(moduleId: MoveModuleId): ModuleId;
|
|
2160
|
+
declare class TransactionAuthenticatorMultiEd25519 extends TransactionAuthenticator {
|
|
2161
|
+
readonly public_key: MultiEd25519PublicKey;
|
|
2162
|
+
readonly signature: MultiEd25519Signature;
|
|
2163
|
+
constructor(public_key: MultiEd25519PublicKey, signature: MultiEd25519Signature);
|
|
2340
2164
|
serialize(serializer: Serializer): void;
|
|
2341
|
-
static
|
|
2342
|
-
}
|
|
2343
|
-
|
|
2344
|
-
declare abstract class TypeTag extends Serializable {
|
|
2345
|
-
abstract serialize(serializer: Serializer): void;
|
|
2346
|
-
static deserialize(deserializer: Deserializer): TypeTag;
|
|
2347
|
-
abstract toString(): string;
|
|
2348
|
-
isBool(): this is TypeTagBool;
|
|
2349
|
-
isAddress(): this is TypeTagAddress;
|
|
2350
|
-
isGeneric(): this is TypeTagGeneric;
|
|
2351
|
-
isSigner(): this is TypeTagSigner;
|
|
2352
|
-
isVector(): this is TypeTagVector;
|
|
2353
|
-
isStruct(): this is TypeTagStruct;
|
|
2354
|
-
isU8(): this is TypeTagU8;
|
|
2355
|
-
isU16(): this is TypeTagU16;
|
|
2356
|
-
isU32(): this is TypeTagU32;
|
|
2357
|
-
isU64(): this is TypeTagU64;
|
|
2358
|
-
isU128(): this is TypeTagU128;
|
|
2359
|
-
isU256(): this is TypeTagU256;
|
|
2165
|
+
static load(deserializer: Deserializer): TransactionAuthenticatorMultiEd25519;
|
|
2360
2166
|
}
|
|
2361
|
-
|
|
2362
|
-
|
|
2167
|
+
/**
|
|
2168
|
+
* Transaction authenticator for a multi-agent transaction
|
|
2169
|
+
*
|
|
2170
|
+
* @param sender Sender account authenticator
|
|
2171
|
+
* @param secondary_signer_addresses Secondary signers address
|
|
2172
|
+
* @param secondary_signers Secondary signers account authenticators
|
|
2173
|
+
*
|
|
2174
|
+
*/
|
|
2175
|
+
declare class TransactionAuthenticatorMultiAgent extends TransactionAuthenticator {
|
|
2176
|
+
readonly sender: AccountAuthenticator;
|
|
2177
|
+
readonly secondary_signer_addresses: Array<AccountAddress>;
|
|
2178
|
+
readonly secondary_signers: Array<AccountAuthenticator>;
|
|
2179
|
+
constructor(sender: AccountAuthenticator, secondary_signer_addresses: Array<AccountAddress>, secondary_signers: Array<AccountAuthenticator>);
|
|
2363
2180
|
serialize(serializer: Serializer): void;
|
|
2364
|
-
static load(
|
|
2181
|
+
static load(deserializer: Deserializer): TransactionAuthenticatorMultiAgent;
|
|
2365
2182
|
}
|
|
2366
|
-
|
|
2367
|
-
|
|
2183
|
+
/**
|
|
2184
|
+
* Transaction authenticator for a fee payer transaction
|
|
2185
|
+
*
|
|
2186
|
+
* @param sender Sender account authenticator
|
|
2187
|
+
* @param secondary_signer_addresses Secondary signers address
|
|
2188
|
+
* @param secondary_signers Secondary signers account authenticators
|
|
2189
|
+
* @param fee_payer Object of the fee payer account address and the fee payer authentication
|
|
2190
|
+
*
|
|
2191
|
+
*/
|
|
2192
|
+
declare class TransactionAuthenticatorFeePayer extends TransactionAuthenticator {
|
|
2193
|
+
readonly sender: AccountAuthenticator;
|
|
2194
|
+
readonly secondary_signer_addresses: Array<AccountAddress>;
|
|
2195
|
+
readonly secondary_signers: Array<AccountAuthenticator>;
|
|
2196
|
+
readonly fee_payer: {
|
|
2197
|
+
address: AccountAddress;
|
|
2198
|
+
authenticator: AccountAuthenticator;
|
|
2199
|
+
};
|
|
2200
|
+
constructor(sender: AccountAuthenticator, secondary_signer_addresses: Array<AccountAddress>, secondary_signers: Array<AccountAuthenticator>, fee_payer: {
|
|
2201
|
+
address: AccountAddress;
|
|
2202
|
+
authenticator: AccountAuthenticator;
|
|
2203
|
+
});
|
|
2368
2204
|
serialize(serializer: Serializer): void;
|
|
2369
|
-
static load(
|
|
2205
|
+
static load(deserializer: Deserializer): TransactionAuthenticatorMultiAgent;
|
|
2370
2206
|
}
|
|
2371
|
-
|
|
2372
|
-
|
|
2207
|
+
/**
|
|
2208
|
+
* Single Sender authenticator for a single signer transaction
|
|
2209
|
+
*
|
|
2210
|
+
* @param sender AccountAuthenticator
|
|
2211
|
+
*/
|
|
2212
|
+
declare class TransactionAuthenticatorSingleSender extends TransactionAuthenticator {
|
|
2213
|
+
readonly sender: AccountAuthenticator;
|
|
2214
|
+
constructor(sender: AccountAuthenticator);
|
|
2373
2215
|
serialize(serializer: Serializer): void;
|
|
2374
|
-
static load(
|
|
2216
|
+
static load(deserializer: Deserializer): TransactionAuthenticatorSingleSender;
|
|
2375
2217
|
}
|
|
2376
|
-
|
|
2377
|
-
|
|
2218
|
+
|
|
2219
|
+
declare class SignedTransaction extends Serializable {
|
|
2220
|
+
readonly raw_txn: RawTransaction;
|
|
2221
|
+
readonly authenticator: TransactionAuthenticator;
|
|
2222
|
+
/**
|
|
2223
|
+
* A SignedTransaction consists of a raw transaction and an authenticator. The authenticator
|
|
2224
|
+
* contains a client's public key and the signature of the raw transaction.
|
|
2225
|
+
*
|
|
2226
|
+
* @see {@link https://aptos.dev/integration/creating-a-signed-transaction | Creating a Signed Transaction}
|
|
2227
|
+
*
|
|
2228
|
+
* @param raw_txn
|
|
2229
|
+
* @param authenticator Contains a client's public key and the signature of the raw transaction.
|
|
2230
|
+
* Authenticator has 3 flavors: single signature, multi-signature and multi-agent.
|
|
2231
|
+
* @see {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs} for details.
|
|
2232
|
+
*/
|
|
2233
|
+
constructor(raw_txn: RawTransaction, authenticator: TransactionAuthenticator);
|
|
2378
2234
|
serialize(serializer: Serializer): void;
|
|
2379
|
-
static
|
|
2235
|
+
static deserialize(deserializer: Deserializer): SignedTransaction;
|
|
2380
2236
|
}
|
|
2381
|
-
|
|
2382
|
-
|
|
2237
|
+
|
|
2238
|
+
/**
|
|
2239
|
+
* Representation of a SimpleTransaction that can serialized and deserialized
|
|
2240
|
+
*/
|
|
2241
|
+
declare class SimpleTransaction extends Serializable {
|
|
2242
|
+
rawTransaction: RawTransaction;
|
|
2243
|
+
feePayerAddress?: AccountAddress | undefined;
|
|
2244
|
+
readonly secondarySignerAddresses: undefined;
|
|
2245
|
+
/**
|
|
2246
|
+
* SimpleTransaction represents a simple transaction type of a single signer that
|
|
2247
|
+
* can be submitted to Aptos chain for execution.
|
|
2248
|
+
*
|
|
2249
|
+
* SimpleTransaction metadata contains the Raw Transaction and an optional
|
|
2250
|
+
* sponsor Account Address to pay the gas fees.
|
|
2251
|
+
*
|
|
2252
|
+
* @param rawTransaction The Raw Tranasaction
|
|
2253
|
+
* @param feePayerAddress The sponsor Account Address
|
|
2254
|
+
*/
|
|
2255
|
+
constructor(rawTransaction: RawTransaction, feePayerAddress?: AccountAddress);
|
|
2383
2256
|
serialize(serializer: Serializer): void;
|
|
2384
|
-
static
|
|
2257
|
+
static deserialize(deserializer: Deserializer): SimpleTransaction;
|
|
2385
2258
|
}
|
|
2386
|
-
|
|
2387
|
-
|
|
2259
|
+
|
|
2260
|
+
/**
|
|
2261
|
+
* Representation of a Raw Transaction that can serialized and deserialized
|
|
2262
|
+
*/
|
|
2263
|
+
declare class MultiAgentTransaction extends Serializable {
|
|
2264
|
+
rawTransaction: RawTransaction;
|
|
2265
|
+
feePayerAddress?: AccountAddress | undefined;
|
|
2266
|
+
secondarySignerAddresses: AccountAddress[];
|
|
2267
|
+
/**
|
|
2268
|
+
* SimpleTransaction represents a simple transaction type of a single signer that
|
|
2269
|
+
* can be submitted to Aptos chain for execution.
|
|
2270
|
+
*
|
|
2271
|
+
* SimpleTransaction metadata contains the Raw Transaction and an optional
|
|
2272
|
+
* sponsor Account Address to pay the gas fees.
|
|
2273
|
+
*
|
|
2274
|
+
* @param rawTransaction The Raw Tranasaction
|
|
2275
|
+
* @param feePayerAddress The sponsor Account Address
|
|
2276
|
+
*/
|
|
2277
|
+
constructor(rawTransaction: RawTransaction, secondarySignerAddresses: AccountAddress[], feePayerAddress?: AccountAddress);
|
|
2388
2278
|
serialize(serializer: Serializer): void;
|
|
2389
|
-
static
|
|
2390
|
-
}
|
|
2391
|
-
declare class TypeTagU256 extends TypeTag {
|
|
2392
|
-
toString(): string;
|
|
2393
|
-
serialize(serializer: Serializer): void;
|
|
2394
|
-
static load(_deserializer: Deserializer): TypeTagU256;
|
|
2395
|
-
}
|
|
2396
|
-
declare class TypeTagAddress extends TypeTag {
|
|
2397
|
-
toString(): string;
|
|
2398
|
-
serialize(serializer: Serializer): void;
|
|
2399
|
-
static load(_deserializer: Deserializer): TypeTagAddress;
|
|
2400
|
-
}
|
|
2401
|
-
declare class TypeTagSigner extends TypeTag {
|
|
2402
|
-
toString(): string;
|
|
2403
|
-
serialize(serializer: Serializer): void;
|
|
2404
|
-
static load(_deserializer: Deserializer): TypeTagSigner;
|
|
2405
|
-
}
|
|
2406
|
-
declare class TypeTagReference extends TypeTag {
|
|
2407
|
-
readonly value: TypeTag;
|
|
2408
|
-
toString(): `&${string}`;
|
|
2409
|
-
constructor(value: TypeTag);
|
|
2410
|
-
serialize(serializer: Serializer): void;
|
|
2411
|
-
static load(deserializer: Deserializer): TypeTagReference;
|
|
2279
|
+
static deserialize(deserializer: Deserializer): MultiAgentTransaction;
|
|
2412
2280
|
}
|
|
2281
|
+
|
|
2413
2282
|
/**
|
|
2414
|
-
*
|
|
2415
|
-
* they are not actually serialized into a real type, so they cannot be
|
|
2416
|
-
* used as a type directly.
|
|
2283
|
+
* Entry function arguments to be used when building a raw transaction using remote ABI
|
|
2417
2284
|
*/
|
|
2418
|
-
|
|
2419
|
-
readonly value: number;
|
|
2420
|
-
toString(): `T${number}`;
|
|
2421
|
-
constructor(value: number);
|
|
2422
|
-
serialize(serializer: Serializer): void;
|
|
2423
|
-
static load(deserializer: Deserializer): TypeTagGeneric;
|
|
2424
|
-
}
|
|
2425
|
-
declare class TypeTagVector extends TypeTag {
|
|
2426
|
-
readonly value: TypeTag;
|
|
2427
|
-
toString(): `vector<${string}>`;
|
|
2428
|
-
constructor(value: TypeTag);
|
|
2429
|
-
static u8(): TypeTagVector;
|
|
2430
|
-
serialize(serializer: Serializer): void;
|
|
2431
|
-
static load(deserializer: Deserializer): TypeTagVector;
|
|
2432
|
-
}
|
|
2433
|
-
declare class TypeTagStruct extends TypeTag {
|
|
2434
|
-
readonly value: StructTag;
|
|
2435
|
-
toString(): `0x${string}::${string}::${string}`;
|
|
2436
|
-
constructor(value: StructTag);
|
|
2437
|
-
serialize(serializer: Serializer): void;
|
|
2438
|
-
static load(deserializer: Deserializer): TypeTagStruct;
|
|
2439
|
-
isTypeTag(address: AccountAddress, moduleName: string, structName: string): boolean;
|
|
2440
|
-
isString(): boolean;
|
|
2441
|
-
isOption(): boolean;
|
|
2442
|
-
isObject(): boolean;
|
|
2443
|
-
}
|
|
2444
|
-
declare class StructTag extends Serializable {
|
|
2445
|
-
readonly address: AccountAddress;
|
|
2446
|
-
readonly moduleName: Identifier;
|
|
2447
|
-
readonly name: Identifier;
|
|
2448
|
-
readonly typeArgs: Array<TypeTag>;
|
|
2449
|
-
constructor(address: AccountAddress, module_name: Identifier, name: Identifier, type_args: Array<TypeTag>);
|
|
2450
|
-
serialize(serializer: Serializer): void;
|
|
2451
|
-
static deserialize(deserializer: Deserializer): StructTag;
|
|
2452
|
-
}
|
|
2453
|
-
declare function aptosCoinStructTag(): StructTag;
|
|
2454
|
-
declare function stringStructTag(): StructTag;
|
|
2455
|
-
declare function optionStructTag(typeArg: TypeTag): StructTag;
|
|
2456
|
-
declare function objectStructTag(typeArg: TypeTag): StructTag;
|
|
2457
|
-
|
|
2285
|
+
type SimpleEntryFunctionArgumentTypes = boolean | number | bigint | string | null | undefined | Uint8Array | ArrayBuffer | Array<SimpleEntryFunctionArgumentTypes | EntryFunctionArgumentTypes>;
|
|
2458
2286
|
/**
|
|
2459
|
-
*
|
|
2287
|
+
* Entry function arguments to be used when building a raw transaction using BCS serialized arguments
|
|
2460
2288
|
*/
|
|
2461
|
-
|
|
2289
|
+
type EntryFunctionArgumentTypes = Bool | U8 | U16 | U32 | U64 | U128 | U256 | AccountAddress | MoveVector<EntryFunctionArgumentTypes> | MoveOption<EntryFunctionArgumentTypes> | MoveString | FixedBytes;
|
|
2462
2290
|
/**
|
|
2463
|
-
*
|
|
2464
|
-
* that can serialized and deserialized
|
|
2291
|
+
* Script function arguments to be used when building a raw transaction using BCS serialized arguments
|
|
2465
2292
|
*/
|
|
2466
|
-
|
|
2467
|
-
/**
|
|
2468
|
-
* Serialize a Transaction Payload
|
|
2469
|
-
*/
|
|
2470
|
-
abstract serialize(serializer: Serializer): void;
|
|
2471
|
-
/**
|
|
2472
|
-
* Deserialize a Transaction Payload
|
|
2473
|
-
*/
|
|
2474
|
-
static deserialize(deserializer: Deserializer): TransactionPayload;
|
|
2475
|
-
}
|
|
2293
|
+
type ScriptFunctionArgumentTypes = Bool | U8 | U16 | U32 | U64 | U128 | U256 | AccountAddress | MoveVector<U8> | MoveString | FixedBytes;
|
|
2476
2294
|
/**
|
|
2477
|
-
*
|
|
2295
|
+
* Type that holds all raw transaction instances Aptos SDK supports
|
|
2478
2296
|
*/
|
|
2479
|
-
|
|
2480
|
-
readonly script: Script;
|
|
2481
|
-
constructor(script: Script);
|
|
2482
|
-
serialize(serializer: Serializer): void;
|
|
2483
|
-
static load(deserializer: Deserializer): TransactionPayloadScript;
|
|
2484
|
-
}
|
|
2297
|
+
type AnyRawTransactionInstance = RawTransaction | MultiAgentRawTransaction | FeePayerRawTransaction;
|
|
2485
2298
|
/**
|
|
2486
|
-
*
|
|
2299
|
+
* Optional options to set when generating a transaction
|
|
2487
2300
|
*/
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2301
|
+
type InputGenerateTransactionOptions = {
|
|
2302
|
+
maxGasAmount?: number;
|
|
2303
|
+
gasUnitPrice?: number;
|
|
2304
|
+
expireTimestamp?: number;
|
|
2305
|
+
accountSequenceNumber?: AnyNumber;
|
|
2306
|
+
};
|
|
2307
|
+
/**
|
|
2308
|
+
* The generated transaction payload type that was produces from `generateTransactionPayload()` function.
|
|
2309
|
+
*/
|
|
2310
|
+
type AnyTransactionPayloadInstance = TransactionPayloadEntryFunction | TransactionPayloadScript | TransactionPayloadMultiSig;
|
|
2311
|
+
/**
|
|
2312
|
+
* Unified type for the data needed to generate a transaction payload of types:
|
|
2313
|
+
* Entry Function | Script | Multi Sig
|
|
2314
|
+
*/
|
|
2315
|
+
type InputGenerateTransactionPayloadData = InputEntryFunctionData | InputScriptData | InputMultiSigData;
|
|
2316
|
+
type InputGenerateTransactionPayloadDataWithRemoteABI = InputScriptData | InputEntryFunctionDataWithRemoteABI | InputMultiSigDataWithRemoteABI;
|
|
2317
|
+
/**
|
|
2318
|
+
* The data needed to generate an Entry Function payload
|
|
2319
|
+
*/
|
|
2320
|
+
type InputEntryFunctionData = {
|
|
2321
|
+
function: MoveFunctionId;
|
|
2322
|
+
typeArguments?: Array<TypeTag | string>;
|
|
2323
|
+
functionArguments: Array<EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes>;
|
|
2324
|
+
abi?: EntryFunctionABI;
|
|
2325
|
+
};
|
|
2326
|
+
type InputGenerateTransactionPayloadDataWithABI = InputEntryFunctionDataWithABI | InputMultiSigDataWithABI;
|
|
2327
|
+
type InputEntryFunctionDataWithABI = Omit<InputEntryFunctionData, "abi"> & {
|
|
2328
|
+
abi: EntryFunctionABI;
|
|
2329
|
+
};
|
|
2330
|
+
type InputMultiSigDataWithABI = {
|
|
2331
|
+
multisigAddress: AccountAddressInput;
|
|
2332
|
+
} & InputEntryFunctionDataWithABI;
|
|
2333
|
+
type InputEntryFunctionDataWithRemoteABI = InputEntryFunctionData & {
|
|
2334
|
+
aptosConfig: AptosConfig;
|
|
2335
|
+
};
|
|
2336
|
+
/**
|
|
2337
|
+
* The data needed to generate a Multi Sig payload
|
|
2338
|
+
*/
|
|
2339
|
+
type InputMultiSigData = {
|
|
2340
|
+
multisigAddress: AccountAddressInput;
|
|
2341
|
+
} & InputEntryFunctionData;
|
|
2342
|
+
/**
|
|
2343
|
+
* The data needed to generate a Multi Sig payload
|
|
2344
|
+
*/
|
|
2345
|
+
type InputMultiSigDataWithRemoteABI = {
|
|
2346
|
+
multisigAddress: AccountAddressInput;
|
|
2347
|
+
} & InputEntryFunctionDataWithRemoteABI;
|
|
2348
|
+
/**
|
|
2349
|
+
* The data needed to generate a Script payload
|
|
2350
|
+
*/
|
|
2351
|
+
type InputScriptData = {
|
|
2352
|
+
bytecode: HexInput;
|
|
2353
|
+
typeArguments?: Array<TypeTag>;
|
|
2354
|
+
functionArguments: Array<ScriptFunctionArgumentTypes>;
|
|
2355
|
+
};
|
|
2356
|
+
/**
|
|
2357
|
+
* The data needed to generate a View Function payload
|
|
2358
|
+
*/
|
|
2359
|
+
type InputViewFunctionData = {
|
|
2360
|
+
function: MoveFunctionId;
|
|
2361
|
+
typeArguments?: Array<TypeTag | string>;
|
|
2362
|
+
functionArguments?: Array<EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes>;
|
|
2363
|
+
abi?: ViewFunctionABI;
|
|
2364
|
+
};
|
|
2365
|
+
/**
|
|
2366
|
+
* Data needed to generate a view function payload and fetch the remote ABI
|
|
2367
|
+
*/
|
|
2368
|
+
type InputViewFunctionDataWithRemoteABI = InputViewFunctionData & {
|
|
2369
|
+
aptosConfig: AptosConfig;
|
|
2370
|
+
};
|
|
2371
|
+
/**
|
|
2372
|
+
* Data needed to generate a view function, with an already fetched ABI
|
|
2373
|
+
*/
|
|
2374
|
+
type InputViewFunctionDataWithABI = InputViewFunctionData & {
|
|
2375
|
+
abi: ViewFunctionABI;
|
|
2376
|
+
};
|
|
2377
|
+
/**
|
|
2378
|
+
* Data need for a generic function ABI, both view and entry
|
|
2379
|
+
*/
|
|
2380
|
+
type FunctionABI = {
|
|
2381
|
+
typeParameters: Array<MoveFunctionGenericTypeParam>;
|
|
2382
|
+
parameters: Array<TypeTag>;
|
|
2383
|
+
};
|
|
2384
|
+
/**
|
|
2385
|
+
* Interface of an Entry function's ABI.
|
|
2386
|
+
*
|
|
2387
|
+
* This is used to provide type checking and simple input conversion on ABI based transaction submission.
|
|
2388
|
+
*/
|
|
2389
|
+
type EntryFunctionABI = FunctionABI & {
|
|
2390
|
+
signers?: number;
|
|
2391
|
+
};
|
|
2392
|
+
/**
|
|
2393
|
+
* Interface of an View function's ABI.
|
|
2394
|
+
*
|
|
2395
|
+
* This is used to provide type checking and simple input conversion on ABI based transaction submission.
|
|
2396
|
+
*/
|
|
2397
|
+
type ViewFunctionABI = FunctionABI & {
|
|
2398
|
+
returnTypes: Array<TypeTag>;
|
|
2399
|
+
};
|
|
2400
|
+
/**
|
|
2401
|
+
* Interface of the arguments to generate a single signer transaction.
|
|
2402
|
+
* Used to provide to `generateTransaction()` method in the transaction builder flow
|
|
2403
|
+
*/
|
|
2404
|
+
interface InputGenerateSingleSignerRawTransactionArgs {
|
|
2405
|
+
aptosConfig: AptosConfig;
|
|
2406
|
+
sender: AccountAddressInput;
|
|
2407
|
+
payload: AnyTransactionPayloadInstance;
|
|
2408
|
+
options?: InputGenerateTransactionOptions;
|
|
2409
|
+
feePayerAddress?: AccountAddressInput;
|
|
2493
2410
|
}
|
|
2494
2411
|
/**
|
|
2495
|
-
*
|
|
2412
|
+
* Interface of the arguments to generate a multi-agent transaction.
|
|
2413
|
+
* Used to provide to `generateTransaction()` method in the transaction builder flow
|
|
2496
2414
|
*/
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2415
|
+
interface InputGenerateMultiAgentRawTransactionArgs {
|
|
2416
|
+
aptosConfig: AptosConfig;
|
|
2417
|
+
sender: AccountAddressInput;
|
|
2418
|
+
payload: AnyTransactionPayloadInstance;
|
|
2419
|
+
secondarySignerAddresses: AccountAddressInput[];
|
|
2420
|
+
options?: InputGenerateTransactionOptions;
|
|
2421
|
+
feePayerAddress?: AccountAddressInput;
|
|
2502
2422
|
}
|
|
2503
2423
|
/**
|
|
2504
|
-
*
|
|
2424
|
+
* Unified type that holds all the interfaces to generate different transaction types
|
|
2505
2425
|
*/
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2426
|
+
type InputGenerateRawTransactionArgs = InputGenerateSingleSignerRawTransactionArgs | InputGenerateMultiAgentRawTransactionArgs;
|
|
2427
|
+
/**
|
|
2428
|
+
* Unified type that holds all the return interfaces when generating different transaction types
|
|
2429
|
+
*/
|
|
2430
|
+
type AnyRawTransaction = SimpleTransaction | MultiAgentTransaction;
|
|
2431
|
+
type InputSimulateTransactionData = {
|
|
2511
2432
|
/**
|
|
2512
|
-
*
|
|
2513
|
-
* @param module_name Fully qualified module name in format "account_address::module_name" e.g. "0x1::coin"
|
|
2514
|
-
* @param function_name The function name. e.g "transfer"
|
|
2515
|
-
* @param type_args Type arguments that move function requires.
|
|
2516
|
-
*
|
|
2517
|
-
* @example
|
|
2518
|
-
* A coin transfer function has one type argument "CoinType".
|
|
2519
|
-
* ```
|
|
2520
|
-
* public entry fun transfer<CoinType>(from: &signer, to: address, amount: u64)
|
|
2521
|
-
* ```
|
|
2522
|
-
* @param args arguments to the move function.
|
|
2523
|
-
*
|
|
2524
|
-
* @example
|
|
2525
|
-
* A coin transfer function has three arguments "from", "to" and "amount".
|
|
2526
|
-
* ```
|
|
2527
|
-
* public entry fun transfer<CoinType>(from: &signer, to: address, amount: u64)
|
|
2528
|
-
* ```
|
|
2433
|
+
* The transaction to simulate, probably generated by `generateTransaction()`
|
|
2529
2434
|
*/
|
|
2530
|
-
|
|
2435
|
+
transaction: AnyRawTransaction;
|
|
2531
2436
|
/**
|
|
2532
|
-
*
|
|
2533
|
-
*
|
|
2534
|
-
* @param module_id Fully qualified module name in format "AccountAddress::module_id" e.g. "0x1::coin"
|
|
2535
|
-
* @param function_name Function name
|
|
2536
|
-
* @param type_args Type arguments that move function requires.
|
|
2537
|
-
*
|
|
2538
|
-
* @example
|
|
2539
|
-
* A coin transfer function has one type argument "CoinType".
|
|
2540
|
-
* ```
|
|
2541
|
-
* public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
|
|
2542
|
-
* ```
|
|
2543
|
-
* @param args Arguments to the move function.
|
|
2544
|
-
*
|
|
2545
|
-
* @example
|
|
2546
|
-
* A coin transfer function has three arguments "from", "to" and "amount".
|
|
2547
|
-
* ```
|
|
2548
|
-
* public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
|
|
2549
|
-
* ```
|
|
2550
|
-
* @returns EntryFunction
|
|
2551
|
-
*/
|
|
2552
|
-
static build(module_id: MoveModuleId, function_name: string, type_args: Array<TypeTag>, args: Array<EntryFunctionArgument>): EntryFunction;
|
|
2553
|
-
serialize(serializer: Serializer): void;
|
|
2554
|
-
/**
|
|
2555
|
-
* Deserializes an entry function payload with the arguments represented as EntryFunctionBytes instances.
|
|
2556
|
-
* @see EntryFunctionBytes
|
|
2557
|
-
*
|
|
2558
|
-
* NOTE: When you deserialize an EntryFunction payload with this method, the entry function
|
|
2559
|
-
* arguments are populated into the deserialized instance as type-agnostic, raw fixed bytes
|
|
2560
|
-
* in the form of the EntryFunctionBytes class.
|
|
2561
|
-
*
|
|
2562
|
-
* In order to correctly deserialize these arguments as their actual type representations, you
|
|
2563
|
-
* must know the types of the arguments beforehand and deserialize them yourself individually.
|
|
2564
|
-
*
|
|
2565
|
-
* One way you could achieve this is by using the ABIs for an entry function and deserializing each
|
|
2566
|
-
* argument as its given, corresponding type.
|
|
2567
|
-
*
|
|
2568
|
-
* @param deserializer
|
|
2569
|
-
* @returns A deserialized EntryFunction payload for a transaction.
|
|
2570
|
-
*
|
|
2571
|
-
*/
|
|
2572
|
-
static deserialize(deserializer: Deserializer): EntryFunction;
|
|
2573
|
-
}
|
|
2574
|
-
/**
|
|
2575
|
-
* Representation of a Script that can serialized and deserialized
|
|
2576
|
-
*/
|
|
2577
|
-
declare class Script {
|
|
2578
|
-
/**
|
|
2579
|
-
* The move module bytecode
|
|
2580
|
-
*/
|
|
2581
|
-
readonly bytecode: Uint8Array;
|
|
2582
|
-
/**
|
|
2583
|
-
* The type arguments that the bytecode function requires.
|
|
2437
|
+
* For a single signer transaction
|
|
2584
2438
|
*/
|
|
2585
|
-
|
|
2439
|
+
signerPublicKey: PublicKey;
|
|
2586
2440
|
/**
|
|
2587
|
-
*
|
|
2441
|
+
* For a fee payer or multi-agent transaction that requires additional signers in
|
|
2588
2442
|
*/
|
|
2589
|
-
|
|
2443
|
+
secondarySignersPublicKeys?: Array<PublicKey>;
|
|
2590
2444
|
/**
|
|
2591
|
-
*
|
|
2592
|
-
*
|
|
2593
|
-
* @param bytecode The move module bytecode
|
|
2594
|
-
* @param type_args The type arguments that the bytecode function requires.
|
|
2595
|
-
*
|
|
2596
|
-
* @example
|
|
2597
|
-
* A coin transfer function has one type argument "CoinType".
|
|
2598
|
-
* ```
|
|
2599
|
-
* public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
|
|
2600
|
-
* ```
|
|
2601
|
-
* @param args The arguments that the bytecode function requires.
|
|
2602
|
-
*
|
|
2603
|
-
* @example
|
|
2604
|
-
* A coin transfer function has three arguments "from", "to" and "amount".
|
|
2605
|
-
* ```
|
|
2606
|
-
* public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
|
|
2607
|
-
* ```
|
|
2445
|
+
* For a fee payer transaction (aka Sponsored Transaction)
|
|
2608
2446
|
*/
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2447
|
+
feePayerPublicKey?: PublicKey;
|
|
2448
|
+
options?: InputSimulateTransactionOptions;
|
|
2449
|
+
};
|
|
2450
|
+
type InputSimulateTransactionOptions = {
|
|
2451
|
+
estimateGasUnitPrice?: boolean;
|
|
2452
|
+
estimateMaxGasAmount?: boolean;
|
|
2453
|
+
estimatePrioritizedGasUnitPrice?: boolean;
|
|
2454
|
+
};
|
|
2455
|
+
/**
|
|
2456
|
+
* Interface that holds the user data input when generating a single signer transaction
|
|
2457
|
+
*/
|
|
2458
|
+
interface InputGenerateSingleSignerRawTransactionData {
|
|
2459
|
+
sender: AccountAddressInput;
|
|
2460
|
+
data: InputGenerateTransactionPayloadData;
|
|
2461
|
+
options?: InputGenerateTransactionOptions;
|
|
2462
|
+
withFeePayer?: boolean;
|
|
2463
|
+
secondarySignerAddresses?: undefined;
|
|
2612
2464
|
}
|
|
2613
2465
|
/**
|
|
2614
|
-
*
|
|
2466
|
+
* Interface that holds the user data input when generating a multi-agent transaction
|
|
2615
2467
|
*/
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
* @param multisig_address The multi-sig account address the transaction will be executed as.
|
|
2623
|
-
*
|
|
2624
|
-
* @param transaction_payload The payload of the multi-sig transaction. This is optional when executing a multi-sig
|
|
2625
|
-
* transaction whose payload is already stored on chain.
|
|
2626
|
-
*/
|
|
2627
|
-
constructor(multisig_address: AccountAddress, transaction_payload?: MultiSigTransactionPayload);
|
|
2628
|
-
serialize(serializer: Serializer): void;
|
|
2629
|
-
static deserialize(deserializer: Deserializer): MultiSig;
|
|
2468
|
+
interface InputGenerateMultiAgentRawTransactionData {
|
|
2469
|
+
sender: AccountAddressInput;
|
|
2470
|
+
data: InputGenerateTransactionPayloadData;
|
|
2471
|
+
secondarySignerAddresses: AccountAddressInput[];
|
|
2472
|
+
options?: InputGenerateTransactionOptions;
|
|
2473
|
+
withFeePayer?: boolean;
|
|
2630
2474
|
}
|
|
2631
2475
|
/**
|
|
2632
|
-
*
|
|
2633
|
-
* that can be serialized and deserialized
|
|
2634
|
-
|
|
2635
|
-
* This class exists right now to represent an extensible transaction payload class for
|
|
2636
|
-
* transactions used in `multisig_account.move`. Eventually, this class will be able to
|
|
2637
|
-
* support script payloads when the `multisig_account.move` module supports them.
|
|
2476
|
+
* Unified type that holds all the user data input interfaces when generating different transaction types
|
|
2638
2477
|
*/
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
constructor(transaction_payload: EntryFunction);
|
|
2649
|
-
serialize(serializer: Serializer): void;
|
|
2650
|
-
static deserialize(deserializer: Deserializer): MultiSigTransactionPayload;
|
|
2478
|
+
type InputGenerateTransactionData = InputGenerateSingleSignerRawTransactionData | InputGenerateMultiAgentRawTransactionData;
|
|
2479
|
+
/**
|
|
2480
|
+
* Interface that holds the user data input when submitting a transaction
|
|
2481
|
+
*/
|
|
2482
|
+
interface InputSubmitTransactionData {
|
|
2483
|
+
transaction: AnyRawTransaction;
|
|
2484
|
+
senderAuthenticator: AccountAuthenticator;
|
|
2485
|
+
feePayerAuthenticator?: AccountAuthenticator;
|
|
2486
|
+
additionalSignersAuthenticators?: Array<AccountAuthenticator>;
|
|
2651
2487
|
}
|
|
2652
2488
|
|
|
2489
|
+
interface SingleKeySignerConstructorArgs {
|
|
2490
|
+
privateKey: PrivateKey;
|
|
2491
|
+
address?: AccountAddressInput;
|
|
2492
|
+
}
|
|
2493
|
+
interface SingleKeySignerGenerateArgs {
|
|
2494
|
+
scheme?: SigningSchemeInput;
|
|
2495
|
+
}
|
|
2496
|
+
type SingleKeySignerFromDerivationPathArgs = SingleKeySignerGenerateArgs & {
|
|
2497
|
+
path: string;
|
|
2498
|
+
mnemonic: string;
|
|
2499
|
+
};
|
|
2500
|
+
interface VerifySingleKeySignatureArgs {
|
|
2501
|
+
message: HexInput;
|
|
2502
|
+
signature: AnySignature;
|
|
2503
|
+
}
|
|
2653
2504
|
/**
|
|
2654
|
-
*
|
|
2505
|
+
* Signer implementation for the SingleKey authentication scheme.
|
|
2506
|
+
* This extends a SingleKeyAccount by adding signing capabilities through a valid private key.
|
|
2507
|
+
* Currently, the only supported signature schemes are Ed25519 and Secp256k1.
|
|
2508
|
+
*
|
|
2509
|
+
* Note: Generating a signer instance does not create the account on-chain.
|
|
2655
2510
|
*/
|
|
2656
|
-
declare class
|
|
2657
|
-
readonly sender: AccountAddress;
|
|
2658
|
-
readonly sequence_number: bigint;
|
|
2659
|
-
readonly payload: TransactionPayload;
|
|
2660
|
-
readonly max_gas_amount: bigint;
|
|
2661
|
-
readonly gas_unit_price: bigint;
|
|
2662
|
-
readonly expiration_timestamp_secs: bigint;
|
|
2663
|
-
readonly chain_id: ChainId;
|
|
2511
|
+
declare class SingleKeyAccount implements Account$1 {
|
|
2664
2512
|
/**
|
|
2665
|
-
*
|
|
2666
|
-
* RawTransactions must be signed before Aptos chain can execute them.
|
|
2667
|
-
*
|
|
2668
|
-
* @param sender The sender Account Address
|
|
2669
|
-
* @param sequence_number Sequence number of this transaction. This must match the sequence number stored in
|
|
2670
|
-
* the sender's account at the time the transaction executes.
|
|
2671
|
-
* @param payload Instructions for the Aptos Blockchain, including publishing a module,
|
|
2672
|
-
* execute an entry function or execute a script payload.
|
|
2673
|
-
* @param max_gas_amount Maximum total gas to spend for this transaction. The account must have more
|
|
2674
|
-
* than this gas or the transaction will be discarded during validation.
|
|
2675
|
-
* @param gas_unit_price Price to be paid per gas unit.
|
|
2676
|
-
* @param expiration_timestamp_secs The blockchain timestamp at which the blockchain would discard this transaction.
|
|
2677
|
-
* @param chain_id The chain ID of the blockchain that this transaction is intended to be run on.
|
|
2513
|
+
* Private key associated with the account
|
|
2678
2514
|
*/
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
* Representation of a Raw Transaction With Data that can serialized and deserialized
|
|
2685
|
-
*/
|
|
2686
|
-
declare abstract class RawTransactionWithData extends Serializable {
|
|
2515
|
+
readonly privateKey: PrivateKey;
|
|
2516
|
+
readonly publicKey: AnyPublicKey;
|
|
2517
|
+
readonly accountAddress: AccountAddress;
|
|
2518
|
+
readonly signingScheme = SigningScheme.SingleKey;
|
|
2519
|
+
constructor(args: SingleKeySignerConstructorArgs);
|
|
2687
2520
|
/**
|
|
2688
|
-
*
|
|
2521
|
+
* Derives an account from a randomly generated private key.
|
|
2522
|
+
* Default generation is using an Ed25519 key
|
|
2523
|
+
* @returns Account with the given signature scheme
|
|
2689
2524
|
*/
|
|
2690
|
-
|
|
2525
|
+
static generate(args?: SingleKeySignerGenerateArgs): SingleKeyAccount;
|
|
2691
2526
|
/**
|
|
2692
|
-
*
|
|
2527
|
+
* Derives an account with bip44 path and mnemonics,
|
|
2528
|
+
* Default to using an Ed25519 signature scheme.
|
|
2529
|
+
*
|
|
2530
|
+
* @param args.scheme The signature scheme to derive the private key with
|
|
2531
|
+
* @param args.path the BIP44 derive hardened path (e.g. m/44'/637'/0'/0'/0') for Ed25519,
|
|
2532
|
+
* or non-hardened path (e.g. m/44'/637'/0'/0/0) for secp256k1
|
|
2533
|
+
* Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
|
|
2534
|
+
* @param args.mnemonic the mnemonic seed phrase of the account
|
|
2693
2535
|
*/
|
|
2694
|
-
static
|
|
2695
|
-
}
|
|
2696
|
-
/**
|
|
2697
|
-
* Representation of a Multi Agent Transaction that can serialized and deserialized
|
|
2698
|
-
*/
|
|
2699
|
-
declare class MultiAgentRawTransaction extends RawTransactionWithData {
|
|
2536
|
+
static fromDerivationPath(args: SingleKeySignerFromDerivationPathArgs): SingleKeyAccount;
|
|
2700
2537
|
/**
|
|
2701
|
-
*
|
|
2538
|
+
* Verify the given message and signature with the public key.
|
|
2539
|
+
*
|
|
2540
|
+
* @param args.message raw message data in HexInput format
|
|
2541
|
+
* @param args.signature signed message Signature
|
|
2542
|
+
* @returns
|
|
2702
2543
|
*/
|
|
2703
|
-
|
|
2544
|
+
verifySignature(args: VerifySingleKeySignatureArgs): boolean;
|
|
2704
2545
|
/**
|
|
2705
|
-
*
|
|
2546
|
+
* Sign a message using the account's private key.
|
|
2547
|
+
* @param message the signing message, as binary input
|
|
2548
|
+
* @return the AccountAuthenticator containing the signature, together with the account's public key
|
|
2706
2549
|
*/
|
|
2707
|
-
|
|
2708
|
-
constructor(raw_txn: RawTransaction, secondary_signer_addresses: Array<AccountAddress>);
|
|
2709
|
-
serialize(serializer: Serializer): void;
|
|
2710
|
-
static load(deserializer: Deserializer): MultiAgentRawTransaction;
|
|
2711
|
-
}
|
|
2712
|
-
/**
|
|
2713
|
-
* Representation of a Fee Payer Transaction that can serialized and deserialized
|
|
2714
|
-
*/
|
|
2715
|
-
declare class FeePayerRawTransaction extends RawTransactionWithData {
|
|
2550
|
+
signWithAuthenticator(message: HexInput): AccountAuthenticatorSingleKey;
|
|
2716
2551
|
/**
|
|
2717
|
-
*
|
|
2552
|
+
* Sign a transaction using the account's private key.
|
|
2553
|
+
* @param transaction the raw transaction
|
|
2554
|
+
* @return the AccountAuthenticator containing the signature of the transaction, together with the account's public key
|
|
2718
2555
|
*/
|
|
2719
|
-
|
|
2556
|
+
signTransactionWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorSingleKey;
|
|
2720
2557
|
/**
|
|
2721
|
-
*
|
|
2558
|
+
* Sign the given message using the account's private key.
|
|
2559
|
+
* @param message in HexInput format
|
|
2560
|
+
* @returns Signature
|
|
2722
2561
|
*/
|
|
2723
|
-
|
|
2562
|
+
sign(message: HexInput): AnySignature;
|
|
2724
2563
|
/**
|
|
2725
|
-
*
|
|
2564
|
+
* Sign the given transaction using the account's private key.
|
|
2565
|
+
* @param transaction the transaction to be signed
|
|
2566
|
+
* @returns Signature
|
|
2726
2567
|
*/
|
|
2727
|
-
|
|
2728
|
-
constructor(raw_txn: RawTransaction, secondary_signer_addresses: Array<AccountAddress>, fee_payer_address: AccountAddress);
|
|
2729
|
-
serialize(serializer: Serializer): void;
|
|
2730
|
-
static load(deserializer: Deserializer): FeePayerRawTransaction;
|
|
2568
|
+
signTransaction(transaction: AnyRawTransaction): AnySignature;
|
|
2731
2569
|
}
|
|
2732
2570
|
|
|
2733
2571
|
/**
|
|
2734
|
-
*
|
|
2572
|
+
* Arguments for creating an `Ed25519Account` from an `Ed25519PrivateKey`.
|
|
2573
|
+
* This is the default input type when passing an `Ed25519PrivateKey`.
|
|
2574
|
+
* In order to use the SingleKey authentication scheme, `legacy` needs to be explicitly set to false.
|
|
2735
2575
|
*/
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
/**
|
|
2741
|
-
* SimpleTransaction represents a simple transaction type of a single signer that
|
|
2742
|
-
* can be submitted to Aptos chain for execution.
|
|
2743
|
-
*
|
|
2744
|
-
* SimpleTransaction metadata contains the Raw Transaction and an optional
|
|
2745
|
-
* sponsor Account Address to pay the gas fees.
|
|
2746
|
-
*
|
|
2747
|
-
* @param rawTransaction The Raw Tranasaction
|
|
2748
|
-
* @param feePayerAddress The sponsor Account Address
|
|
2749
|
-
*/
|
|
2750
|
-
constructor(rawTransaction: RawTransaction, feePayerAddress?: AccountAddress);
|
|
2751
|
-
serialize(serializer: Serializer): void;
|
|
2752
|
-
static deserialize(deserializer: Deserializer): SimpleTransaction;
|
|
2576
|
+
interface CreateEd25519AccountFromPrivateKeyArgs {
|
|
2577
|
+
privateKey: Ed25519PrivateKey;
|
|
2578
|
+
address?: AccountAddressInput;
|
|
2579
|
+
legacy?: true;
|
|
2753
2580
|
}
|
|
2754
|
-
|
|
2755
2581
|
/**
|
|
2756
|
-
*
|
|
2757
|
-
* to
|
|
2582
|
+
* Arguments for creating an `SingleKeyAccount` from an `Ed25519PrivateKey`.
|
|
2583
|
+
* The `legacy` argument needs to be explicitly set to false in order to
|
|
2584
|
+
* use the `SingleKey` authentication scheme.
|
|
2758
2585
|
*/
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
readonly originator: AccountAddress;
|
|
2764
|
-
readonly currentAuthKey: AccountAddress;
|
|
2765
|
-
readonly newPublicKey: MoveVector<U8>;
|
|
2766
|
-
readonly sequenceNumber: U64;
|
|
2767
|
-
constructor(args: {
|
|
2768
|
-
sequenceNumber: AnyNumber;
|
|
2769
|
-
originator: AccountAddress;
|
|
2770
|
-
currentAuthKey: AccountAddress;
|
|
2771
|
-
newPublicKey: PublicKey;
|
|
2772
|
-
});
|
|
2773
|
-
serialize(serializer: Serializer): void;
|
|
2586
|
+
interface CreateEd25519SingleKeyAccountFromPrivateKeyArgs {
|
|
2587
|
+
privateKey: Ed25519PrivateKey;
|
|
2588
|
+
address?: AccountAddressInput;
|
|
2589
|
+
legacy: false;
|
|
2774
2590
|
}
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2591
|
+
/**
|
|
2592
|
+
* Arguments for creating an `SingleKeyAccount` from any supported private key
|
|
2593
|
+
* that is not an `Ed25519PrivateKey`.
|
|
2594
|
+
* The `legacy` argument defaults to false and cannot be explicitly set to true.
|
|
2595
|
+
*/
|
|
2596
|
+
interface CreateSingleKeyAccountFromPrivateKeyArgs {
|
|
2597
|
+
privateKey: Exclude<PrivateKey, Ed25519PrivateKey>;
|
|
2598
|
+
address?: AccountAddressInput;
|
|
2599
|
+
legacy?: false;
|
|
2779
2600
|
}
|
|
2780
2601
|
/**
|
|
2781
|
-
*
|
|
2782
|
-
*
|
|
2783
|
-
* @param public_key Client's public key.
|
|
2784
|
-
* @param signature Ed25519 signature of a raw transaction.
|
|
2785
|
-
* @see {@link https://aptos.dev/integration/creating-a-signed-transaction | Creating a Signed Transaction}
|
|
2786
|
-
* for details about generating a signature.
|
|
2602
|
+
* Arguments for creating an opaque `Account` from any supported private key.
|
|
2603
|
+
* This is used when the private key type is not known at compilation time.
|
|
2787
2604
|
*/
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
serialize(serializer: Serializer): void;
|
|
2793
|
-
static load(deserializer: Deserializer): TransactionAuthenticatorEd25519;
|
|
2605
|
+
interface CreateAccountFromPrivateKeyArgs {
|
|
2606
|
+
privateKey: PrivateKey;
|
|
2607
|
+
address?: AccountAddressInput;
|
|
2608
|
+
legacy?: boolean;
|
|
2794
2609
|
}
|
|
2795
2610
|
/**
|
|
2796
|
-
*
|
|
2797
|
-
*
|
|
2798
|
-
* @param public_key Client's public key.
|
|
2799
|
-
* @param signature Multi Ed25519 signature of a raw transaction.
|
|
2800
|
-
*
|
|
2611
|
+
* Arguments for generating an `Ed25519Account`.
|
|
2612
|
+
* This is the input type used by default.
|
|
2801
2613
|
*/
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
constructor(public_key: MultiEd25519PublicKey, signature: MultiEd25519Signature);
|
|
2806
|
-
serialize(serializer: Serializer): void;
|
|
2807
|
-
static load(deserializer: Deserializer): TransactionAuthenticatorMultiEd25519;
|
|
2614
|
+
interface GenerateEd25519AccountArgs {
|
|
2615
|
+
scheme?: SigningSchemeInput.Ed25519;
|
|
2616
|
+
legacy?: true;
|
|
2808
2617
|
}
|
|
2809
2618
|
/**
|
|
2810
|
-
*
|
|
2811
|
-
*
|
|
2812
|
-
*
|
|
2813
|
-
* @param secondary_signer_addresses Secondary signers address
|
|
2814
|
-
* @param secondary_signers Secondary signers account authenticators
|
|
2815
|
-
*
|
|
2619
|
+
* Arguments for generating an `SingleKeyAccount` with ah underlying `Ed25519PrivateKey`.
|
|
2620
|
+
* The `legacy` argument needs to be explicitly set to false,
|
|
2621
|
+
* otherwise an `Ed25519Account` will be returned instead.
|
|
2816
2622
|
*/
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
readonly secondary_signers: Array<AccountAuthenticator>;
|
|
2821
|
-
constructor(sender: AccountAuthenticator, secondary_signer_addresses: Array<AccountAddress>, secondary_signers: Array<AccountAuthenticator>);
|
|
2822
|
-
serialize(serializer: Serializer): void;
|
|
2823
|
-
static load(deserializer: Deserializer): TransactionAuthenticatorMultiAgent;
|
|
2623
|
+
interface GenerateEd25519SingleKeyAccountArgs {
|
|
2624
|
+
scheme?: SigningSchemeInput.Ed25519;
|
|
2625
|
+
legacy: false;
|
|
2824
2626
|
}
|
|
2825
2627
|
/**
|
|
2826
|
-
*
|
|
2827
|
-
*
|
|
2828
|
-
*
|
|
2829
|
-
* @param secondary_signer_addresses Secondary signers address
|
|
2830
|
-
* @param secondary_signers Secondary signers account authenticators
|
|
2831
|
-
* @param fee_payer Object of the fee payer account address and the fee payer authentication
|
|
2832
|
-
*
|
|
2628
|
+
* Arguments for generating an `SingleKeyAccount` with any supported private key
|
|
2629
|
+
* that is not an `Ed25519PrivateKey`.
|
|
2630
|
+
* The `legacy` argument defaults to false and cannot be explicitly set to true.
|
|
2833
2631
|
*/
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
readonly secondary_signers: Array<AccountAuthenticator>;
|
|
2838
|
-
readonly fee_payer: {
|
|
2839
|
-
address: AccountAddress;
|
|
2840
|
-
authenticator: AccountAuthenticator;
|
|
2841
|
-
};
|
|
2842
|
-
constructor(sender: AccountAuthenticator, secondary_signer_addresses: Array<AccountAddress>, secondary_signers: Array<AccountAuthenticator>, fee_payer: {
|
|
2843
|
-
address: AccountAddress;
|
|
2844
|
-
authenticator: AccountAuthenticator;
|
|
2845
|
-
});
|
|
2846
|
-
serialize(serializer: Serializer): void;
|
|
2847
|
-
static load(deserializer: Deserializer): TransactionAuthenticatorMultiAgent;
|
|
2632
|
+
interface GenerateSingleKeyAccountArgs {
|
|
2633
|
+
scheme: Exclude<SigningSchemeInput, SigningSchemeInput.Ed25519>;
|
|
2634
|
+
legacy?: false;
|
|
2848
2635
|
}
|
|
2849
2636
|
/**
|
|
2850
|
-
*
|
|
2851
|
-
*
|
|
2852
|
-
* @param sender AccountAuthenticator
|
|
2637
|
+
* Arguments for generating an opaque `Account`.
|
|
2638
|
+
* This is used when the input signature scheme is not known at compilation time.
|
|
2853
2639
|
*/
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
serialize(serializer: Serializer): void;
|
|
2858
|
-
static load(deserializer: Deserializer): TransactionAuthenticatorSingleSender;
|
|
2640
|
+
interface GenerateAccountArgs {
|
|
2641
|
+
scheme?: SigningSchemeInput;
|
|
2642
|
+
legacy?: boolean;
|
|
2859
2643
|
}
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
* contains a client's public key and the signature of the raw transaction.
|
|
2867
|
-
*
|
|
2868
|
-
* @see {@link https://aptos.dev/integration/creating-a-signed-transaction | Creating a Signed Transaction}
|
|
2869
|
-
*
|
|
2870
|
-
* @param raw_txn
|
|
2871
|
-
* @param authenticator Contains a client's public key and the signature of the raw transaction.
|
|
2872
|
-
* Authenticator has 3 flavors: single signature, multi-signature and multi-agent.
|
|
2873
|
-
* @see {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs} for details.
|
|
2874
|
-
*/
|
|
2875
|
-
constructor(raw_txn: RawTransaction, authenticator: TransactionAuthenticator);
|
|
2876
|
-
serialize(serializer: Serializer): void;
|
|
2877
|
-
static deserialize(deserializer: Deserializer): SignedTransaction;
|
|
2644
|
+
/**
|
|
2645
|
+
* Arguments for deriving a private key from a mnemonic phrase and a BIP44 path.
|
|
2646
|
+
*/
|
|
2647
|
+
interface PrivateKeyFromDerivationPathArgs {
|
|
2648
|
+
path: string;
|
|
2649
|
+
mnemonic: string;
|
|
2878
2650
|
}
|
|
2879
|
-
|
|
2880
2651
|
/**
|
|
2881
|
-
*
|
|
2652
|
+
* Interface for a generic Aptos account.
|
|
2653
|
+
*
|
|
2654
|
+
* The interface is defined as abstract class to provide a single entrypoint for account generation,
|
|
2655
|
+
* either through `Account.generate()` or `Account.fromDerivationPath`.
|
|
2656
|
+
* Despite this being an abstract class, it should be treated as an interface and enforced using
|
|
2657
|
+
* the `implements` keyword.
|
|
2658
|
+
*
|
|
2659
|
+
* Note: Generating an account instance does not create the account on-chain.
|
|
2882
2660
|
*/
|
|
2883
|
-
declare class
|
|
2884
|
-
rawTransaction: RawTransaction;
|
|
2885
|
-
feePayerAddress?: AccountAddress | undefined;
|
|
2886
|
-
secondarySignerAddresses: AccountAddress[];
|
|
2661
|
+
declare abstract class Account$1 {
|
|
2887
2662
|
/**
|
|
2888
|
-
*
|
|
2889
|
-
|
|
2663
|
+
* Public key associated with the account
|
|
2664
|
+
*/
|
|
2665
|
+
abstract readonly publicKey: AccountPublicKey;
|
|
2666
|
+
/**
|
|
2667
|
+
* Account address associated with the account
|
|
2668
|
+
*/
|
|
2669
|
+
abstract readonly accountAddress: AccountAddress;
|
|
2670
|
+
/**
|
|
2671
|
+
* Signing scheme used to sign transactions
|
|
2672
|
+
*/
|
|
2673
|
+
abstract signingScheme: SigningScheme;
|
|
2674
|
+
/**
|
|
2675
|
+
* Derives an account from a randomly generated private key.
|
|
2676
|
+
* @param args.scheme The signature scheme to use, to generate the private key
|
|
2677
|
+
* @param args.legacy Whether to use a legacy authentication scheme, when applicable
|
|
2678
|
+
* @returns An account compatible with the provided signature scheme
|
|
2679
|
+
*/
|
|
2680
|
+
static generate(args?: GenerateEd25519AccountArgs): Ed25519Account;
|
|
2681
|
+
static generate(args: GenerateEd25519SingleKeyAccountArgs): SingleKeyAccount;
|
|
2682
|
+
static generate(args: GenerateSingleKeyAccountArgs): SingleKeyAccount;
|
|
2683
|
+
static generate(args: GenerateAccountArgs): Account$1;
|
|
2684
|
+
/**
|
|
2685
|
+
* Creates an account from the provided private key.
|
|
2890
2686
|
*
|
|
2891
|
-
*
|
|
2892
|
-
*
|
|
2687
|
+
* @param args.privateKey a valid private key
|
|
2688
|
+
* @param args.address the account's address. If not provided, it will be derived from the public key.
|
|
2689
|
+
* @param args.legacy Whether to use a legacy authentication scheme, when applicable
|
|
2690
|
+
*/
|
|
2691
|
+
static fromPrivateKey(args: CreateEd25519AccountFromPrivateKeyArgs): Ed25519Account;
|
|
2692
|
+
static fromPrivateKey(args: CreateEd25519SingleKeyAccountFromPrivateKeyArgs): SingleKeyAccount;
|
|
2693
|
+
static fromPrivateKey(args: CreateSingleKeyAccountFromPrivateKeyArgs): SingleKeyAccount;
|
|
2694
|
+
static fromPrivateKey(args: CreateAccountFromPrivateKeyArgs): Account$1;
|
|
2695
|
+
/**
|
|
2696
|
+
* @deprecated use `fromPrivateKey` instead.
|
|
2697
|
+
* Instantiates an account given a private key and a specified account address.
|
|
2698
|
+
* This is primarily used to instantiate an `Account` that has had its authentication key rotated.
|
|
2893
2699
|
*
|
|
2894
|
-
* @param
|
|
2895
|
-
* @param
|
|
2700
|
+
* @param args.privateKey PrivateKey - the underlying private key for the account
|
|
2701
|
+
* @param args.address AccountAddress - The account address the `Account` will sign for
|
|
2702
|
+
* @param args.legacy optional. If set to false, the keypair generated is a Unified keypair. Defaults
|
|
2703
|
+
* to generating a Legacy Ed25519 keypair
|
|
2704
|
+
*
|
|
2705
|
+
* @returns Account
|
|
2896
2706
|
*/
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
}
|
|
2968
|
-
/**
|
|
2969
|
-
* The data needed to generate a Script payload
|
|
2970
|
-
*/
|
|
2971
|
-
type InputScriptData = {
|
|
2972
|
-
bytecode: HexInput;
|
|
2973
|
-
typeArguments?: Array<TypeTag>;
|
|
2974
|
-
functionArguments: Array<ScriptFunctionArgumentTypes>;
|
|
2975
|
-
};
|
|
2976
|
-
/**
|
|
2977
|
-
* The data needed to generate a View Function payload
|
|
2978
|
-
*/
|
|
2979
|
-
type InputViewFunctionData = {
|
|
2980
|
-
function: MoveFunctionId;
|
|
2981
|
-
typeArguments?: Array<TypeTag | string>;
|
|
2982
|
-
functionArguments?: Array<EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes>;
|
|
2983
|
-
abi?: ViewFunctionABI;
|
|
2984
|
-
};
|
|
2985
|
-
/**
|
|
2986
|
-
* Data needed to generate a view function payload and fetch the remote ABI
|
|
2987
|
-
*/
|
|
2988
|
-
type InputViewFunctionDataWithRemoteABI = InputViewFunctionData & {
|
|
2989
|
-
aptosConfig: AptosConfig;
|
|
2990
|
-
};
|
|
2991
|
-
/**
|
|
2992
|
-
* Data needed to generate a view function, with an already fetched ABI
|
|
2993
|
-
*/
|
|
2994
|
-
type InputViewFunctionDataWithABI = InputViewFunctionData & {
|
|
2995
|
-
abi: ViewFunctionABI;
|
|
2996
|
-
};
|
|
2997
|
-
/**
|
|
2998
|
-
* Data need for a generic function ABI, both view and entry
|
|
2999
|
-
*/
|
|
3000
|
-
type FunctionABI = {
|
|
3001
|
-
typeParameters: Array<MoveFunctionGenericTypeParam>;
|
|
3002
|
-
parameters: Array<TypeTag>;
|
|
3003
|
-
};
|
|
3004
|
-
/**
|
|
3005
|
-
* Interface of an Entry function's ABI.
|
|
3006
|
-
*
|
|
3007
|
-
* This is used to provide type checking and simple input conversion on ABI based transaction submission.
|
|
3008
|
-
*/
|
|
3009
|
-
type EntryFunctionABI = FunctionABI & {
|
|
3010
|
-
signers?: number;
|
|
3011
|
-
};
|
|
2707
|
+
static fromPrivateKeyAndAddress(args: CreateAccountFromPrivateKeyArgs): Account$1;
|
|
2708
|
+
/**
|
|
2709
|
+
* Derives an account with bip44 path and mnemonics
|
|
2710
|
+
*
|
|
2711
|
+
* @param args.scheme The signature scheme to derive the private key with
|
|
2712
|
+
* @param args.path the BIP44 derive hardened path (e.g. m/44'/637'/0'/0'/0') for Ed25519,
|
|
2713
|
+
* or non-hardened path (e.g. m/44'/637'/0'/0/0) for secp256k1
|
|
2714
|
+
* Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
|
|
2715
|
+
* @param args.mnemonic the mnemonic seed phrase of the account
|
|
2716
|
+
*/
|
|
2717
|
+
static fromDerivationPath(args: GenerateEd25519AccountArgs & PrivateKeyFromDerivationPathArgs): Ed25519Account;
|
|
2718
|
+
static fromDerivationPath(args: GenerateEd25519SingleKeyAccountArgs & PrivateKeyFromDerivationPathArgs): SingleKeyAccount;
|
|
2719
|
+
static fromDerivationPath(args: GenerateSingleKeyAccountArgs & PrivateKeyFromDerivationPathArgs): SingleKeyAccount;
|
|
2720
|
+
static fromDerivationPath(args: GenerateAccountArgs & PrivateKeyFromDerivationPathArgs): Account$1;
|
|
2721
|
+
/**
|
|
2722
|
+
* @deprecated use `publicKey.authKey()` instead.
|
|
2723
|
+
* This key enables account owners to rotate their private key(s)
|
|
2724
|
+
* associated with the account without changing the address that hosts their account.
|
|
2725
|
+
* See here for more info: {@link https://aptos.dev/concepts/accounts#single-signer-authentication}
|
|
2726
|
+
*
|
|
2727
|
+
* @param args.publicKey PublicKey - public key of the account
|
|
2728
|
+
* @returns The authentication key for the associated account
|
|
2729
|
+
*/
|
|
2730
|
+
static authKey(args: {
|
|
2731
|
+
publicKey: AccountPublicKey;
|
|
2732
|
+
}): AuthenticationKey;
|
|
2733
|
+
/**
|
|
2734
|
+
* Sign a message using the available signing capabilities.
|
|
2735
|
+
* @param message the signing message, as binary input
|
|
2736
|
+
* @return the AccountAuthenticator containing the signature, together with the account's public key
|
|
2737
|
+
*/
|
|
2738
|
+
abstract signWithAuthenticator(message: HexInput): AccountAuthenticator;
|
|
2739
|
+
/**
|
|
2740
|
+
* Sign a transaction using the available signing capabilities.
|
|
2741
|
+
* @param transaction the raw transaction
|
|
2742
|
+
* @return the AccountAuthenticator containing the signature of the transaction, together with the account's public key
|
|
2743
|
+
*/
|
|
2744
|
+
abstract signTransactionWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticator;
|
|
2745
|
+
/**
|
|
2746
|
+
* Sign the given message using the available signing capabilities.
|
|
2747
|
+
* @param message in HexInput format
|
|
2748
|
+
* @returns Signature
|
|
2749
|
+
*/
|
|
2750
|
+
abstract sign(message: HexInput): Signature;
|
|
2751
|
+
/**
|
|
2752
|
+
* Sign the given transaction using the available signing capabilities.
|
|
2753
|
+
* @param transaction the transaction to be signed
|
|
2754
|
+
* @returns Signature
|
|
2755
|
+
*/
|
|
2756
|
+
abstract signTransaction(transaction: AnyRawTransaction): Signature;
|
|
2757
|
+
/**
|
|
2758
|
+
* Verify the given message and signature with the public key.
|
|
2759
|
+
* @param args.message raw message data in HexInput format
|
|
2760
|
+
* @param args.signature signed message Signature
|
|
2761
|
+
* @returns
|
|
2762
|
+
*/
|
|
2763
|
+
verifySignature(args: VerifySignatureArgs): boolean;
|
|
2764
|
+
}
|
|
2765
|
+
|
|
2766
|
+
interface Ed25519SignerConstructorArgs {
|
|
2767
|
+
privateKey: Ed25519PrivateKey;
|
|
2768
|
+
address?: AccountAddressInput;
|
|
2769
|
+
}
|
|
2770
|
+
interface Ed25519SignerFromDerivationPathArgs {
|
|
2771
|
+
path: string;
|
|
2772
|
+
mnemonic: string;
|
|
2773
|
+
}
|
|
2774
|
+
interface VerifyEd25519SignatureArgs {
|
|
2775
|
+
message: HexInput;
|
|
2776
|
+
signature: Ed25519Signature;
|
|
2777
|
+
}
|
|
3012
2778
|
/**
|
|
3013
|
-
*
|
|
2779
|
+
* Signer implementation for the Ed25519 authentication scheme.
|
|
2780
|
+
* This extends an {@link Ed25519Account} by adding signing capabilities through an {@link Ed25519PrivateKey}.
|
|
3014
2781
|
*
|
|
3015
|
-
*
|
|
3016
|
-
*/
|
|
3017
|
-
type ViewFunctionABI = FunctionABI & {
|
|
3018
|
-
returnTypes: Array<TypeTag>;
|
|
3019
|
-
};
|
|
3020
|
-
/**
|
|
3021
|
-
* Interface of the arguments to generate a single signer transaction.
|
|
3022
|
-
* Used to provide to `generateTransaction()` method in the transaction builder flow
|
|
2782
|
+
* Note: Generating a signer instance does not create the account on-chain.
|
|
3023
2783
|
*/
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
2784
|
+
declare class Ed25519Account implements Account$1 {
|
|
2785
|
+
/**
|
|
2786
|
+
* Private key associated with the account
|
|
2787
|
+
*/
|
|
2788
|
+
readonly privateKey: Ed25519PrivateKey;
|
|
2789
|
+
readonly publicKey: Ed25519PublicKey;
|
|
2790
|
+
readonly accountAddress: AccountAddress;
|
|
2791
|
+
readonly signingScheme = SigningScheme.Ed25519;
|
|
2792
|
+
constructor(args: Ed25519SignerConstructorArgs);
|
|
2793
|
+
/**
|
|
2794
|
+
* Derives a signer from a randomly generated private key
|
|
2795
|
+
*/
|
|
2796
|
+
static generate(): Ed25519Account;
|
|
2797
|
+
/**
|
|
2798
|
+
* Derives an account with bip44 path and mnemonics
|
|
2799
|
+
*
|
|
2800
|
+
* @param args.path the BIP44 derive hardened path e.g. m/44'/637'/0'/0'/0'
|
|
2801
|
+
* Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
|
|
2802
|
+
* @param args.mnemonic the mnemonic seed phrase of the account
|
|
2803
|
+
*/
|
|
2804
|
+
static fromDerivationPath(args: Ed25519SignerFromDerivationPathArgs): Ed25519Account;
|
|
2805
|
+
/**
|
|
2806
|
+
* Verify the given message and signature with the public key.
|
|
2807
|
+
*
|
|
2808
|
+
* @param args.message raw message data in HexInput format
|
|
2809
|
+
* @param args.signature signed message Signature
|
|
2810
|
+
* @returns
|
|
2811
|
+
*/
|
|
2812
|
+
verifySignature(args: VerifyEd25519SignatureArgs): boolean;
|
|
2813
|
+
/**
|
|
2814
|
+
* Sign a message using the account's Ed25519 private key.
|
|
2815
|
+
* @param message the signing message, as binary input
|
|
2816
|
+
* @return the AccountAuthenticator containing the signature, together with the account's public key
|
|
2817
|
+
*/
|
|
2818
|
+
signWithAuthenticator(message: HexInput): AccountAuthenticatorEd25519;
|
|
2819
|
+
/**
|
|
2820
|
+
* Sign a transaction using the account's Ed25519 private key.
|
|
2821
|
+
* @param transaction the raw transaction
|
|
2822
|
+
* @return the AccountAuthenticator containing the signature of the transaction, together with the account's public key
|
|
2823
|
+
*/
|
|
2824
|
+
signTransactionWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorEd25519;
|
|
2825
|
+
/**
|
|
2826
|
+
* Sign the given message using the account's Ed25519 private key.
|
|
2827
|
+
* @param message in HexInput format
|
|
2828
|
+
* @returns Signature
|
|
2829
|
+
*/
|
|
2830
|
+
sign(message: HexInput): Ed25519Signature;
|
|
2831
|
+
/**
|
|
2832
|
+
* Sign the given transaction using the available signing capabilities.
|
|
2833
|
+
* @param transaction the transaction to be signed
|
|
2834
|
+
* @returns Signature
|
|
2835
|
+
*/
|
|
2836
|
+
signTransaction(transaction: AnyRawTransaction): Ed25519Signature;
|
|
3030
2837
|
}
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
interface InputGenerateMultiAgentRawTransactionArgs {
|
|
3036
|
-
aptosConfig: AptosConfig;
|
|
3037
|
-
sender: AccountAddressInput;
|
|
3038
|
-
payload: AnyTransactionPayloadInstance;
|
|
3039
|
-
secondarySignerAddresses: AccountAddressInput[];
|
|
3040
|
-
options?: InputGenerateTransactionOptions;
|
|
3041
|
-
feePayerAddress?: AccountAddressInput;
|
|
2838
|
+
|
|
2839
|
+
interface VerifyMultiKeySignatureArgs {
|
|
2840
|
+
message: HexInput;
|
|
2841
|
+
signature: MultiKeySignature;
|
|
3042
2842
|
}
|
|
3043
2843
|
/**
|
|
3044
|
-
*
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
*
|
|
2844
|
+
* Signer implementation for the MultiKey authentication scheme.
|
|
2845
|
+
*
|
|
2846
|
+
* This accounts to use a M of N signing scheme. M and N are specified in the {@link MultiKey}
|
|
2847
|
+
* It signs messages via the array of M number of Accounts that individually correspond to a public key in the {@link MultiKey}.
|
|
2848
|
+
*
|
|
2849
|
+
* Note: Generating a signer instance does not create the account on-chain.
|
|
3049
2850
|
*/
|
|
3050
|
-
|
|
3051
|
-
|
|
2851
|
+
declare class MultiKeyAccount implements Account$1 {
|
|
2852
|
+
/**
|
|
2853
|
+
* Public key associated with the account
|
|
2854
|
+
*/
|
|
2855
|
+
readonly publicKey: MultiKey;
|
|
2856
|
+
/**
|
|
2857
|
+
* Account address associated with the account
|
|
2858
|
+
*/
|
|
2859
|
+
readonly accountAddress: AccountAddress;
|
|
2860
|
+
/**
|
|
2861
|
+
* Signing scheme used to sign transactions
|
|
2862
|
+
*/
|
|
2863
|
+
readonly signingScheme: SigningScheme;
|
|
2864
|
+
/**
|
|
2865
|
+
* The signers used to sign messages. These signers should correspond to public keys in the
|
|
2866
|
+
* MultiKeyAccount's public key. The number of signers should be equal or greater
|
|
2867
|
+
* than this.publicKey.signaturesRequired
|
|
2868
|
+
*/
|
|
2869
|
+
readonly signers: Account$1[];
|
|
2870
|
+
/**
|
|
2871
|
+
* An array of indicies where for signer[i], signerIndicies[i] is the index of the corresponding public key in
|
|
2872
|
+
* publicKey.publicKeys. Used to derive the right public key to use for verification.
|
|
2873
|
+
*/
|
|
2874
|
+
readonly signerIndicies: number[];
|
|
2875
|
+
readonly signaturesBitmap: Uint8Array;
|
|
2876
|
+
/**
|
|
2877
|
+
* constructor for MultiKeyAccount
|
|
2878
|
+
*
|
|
2879
|
+
* @param args.multiKey the multikey of the account which consists of N public keys and a number M which is
|
|
2880
|
+
* the number of required signatures.
|
|
2881
|
+
* @param args.signers an array of M signers that will be used to sign the transaction
|
|
2882
|
+
* @returns MultiKeyAccount
|
|
2883
|
+
*/
|
|
2884
|
+
constructor(args: {
|
|
2885
|
+
multiKey: MultiKey;
|
|
2886
|
+
signers: Account$1[];
|
|
2887
|
+
});
|
|
2888
|
+
/**
|
|
2889
|
+
* Static constructor for MultiKeyAccount
|
|
2890
|
+
*
|
|
2891
|
+
* @param args.publicKeys the N public keys of the MultiKeyAccount
|
|
2892
|
+
* @param args.signaturesRequired the number of signatures required
|
|
2893
|
+
* @param args.signers an array of M signers that will be used to sign the transaction
|
|
2894
|
+
* @returns MultiKeyAccount
|
|
2895
|
+
*/
|
|
2896
|
+
static fromPublicKeysAndSigners(args: {
|
|
2897
|
+
publicKeys: PublicKey[];
|
|
2898
|
+
signaturesRequired: number;
|
|
2899
|
+
signers: Account$1[];
|
|
2900
|
+
}): MultiKeyAccount;
|
|
2901
|
+
static isMultiKeySigner(account: Account$1): account is MultiKeyAccount;
|
|
2902
|
+
/**
|
|
2903
|
+
* Sign a message using the account's signers.
|
|
2904
|
+
* @param message the signing message, as binary input
|
|
2905
|
+
* @return the AccountAuthenticator containing the signature, together with the account's public key
|
|
2906
|
+
*/
|
|
2907
|
+
signWithAuthenticator(message: HexInput): AccountAuthenticatorMultiKey;
|
|
2908
|
+
/**
|
|
2909
|
+
* Sign a transaction using the account's signers.
|
|
2910
|
+
* @param transaction the raw transaction
|
|
2911
|
+
* @return the AccountAuthenticator containing the signature of the transaction, together with the account's public key
|
|
2912
|
+
*/
|
|
2913
|
+
signTransactionWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorMultiKey;
|
|
2914
|
+
/**
|
|
2915
|
+
* Sign the given message using the MultiKeyAccount's signers
|
|
2916
|
+
* @param message in HexInput format
|
|
2917
|
+
* @returns MultiKeySignature
|
|
2918
|
+
*/
|
|
2919
|
+
sign(data: HexInput): MultiKeySignature;
|
|
2920
|
+
/**
|
|
2921
|
+
* Sign the given transaction using the MultiKeyAccount's signers
|
|
2922
|
+
* @param transaction the transaction to be signed
|
|
2923
|
+
* @returns MultiKeySignature
|
|
2924
|
+
*/
|
|
2925
|
+
signTransaction(transaction: AnyRawTransaction): MultiKeySignature;
|
|
2926
|
+
/**
|
|
2927
|
+
* Verify the given message and signature with the public key.
|
|
2928
|
+
*
|
|
2929
|
+
* @param args.message raw message data in HexInput format
|
|
2930
|
+
* @param args.signatures signed message MultiKeySignature
|
|
2931
|
+
* @returns boolean
|
|
2932
|
+
*/
|
|
2933
|
+
verifySignature(args: VerifyMultiKeySignatureArgs): boolean;
|
|
2934
|
+
}
|
|
2935
|
+
|
|
2936
|
+
/**
|
|
2937
|
+
* A class to query all `Account` related queries on Aptos.
|
|
2938
|
+
*/
|
|
2939
|
+
declare class Account {
|
|
2940
|
+
readonly config: AptosConfig;
|
|
2941
|
+
constructor(config: AptosConfig);
|
|
2942
|
+
/**
|
|
2943
|
+
* Queries the current state for an Aptos account given its account address
|
|
2944
|
+
*
|
|
2945
|
+
* @param args.accountAddress Aptos account address
|
|
2946
|
+
*
|
|
2947
|
+
* @returns The account data
|
|
2948
|
+
*
|
|
2949
|
+
* @example An example of the returned account
|
|
2950
|
+
* ```
|
|
2951
|
+
* {
|
|
2952
|
+
* sequence_number: "1",
|
|
2953
|
+
* authentication_key: "0x5307b5f4bc67829097a8ba9b43dba3b88261eeccd1f709d9bde240fc100fbb69"
|
|
2954
|
+
* }
|
|
2955
|
+
* ```
|
|
2956
|
+
*/
|
|
2957
|
+
getAccountInfo(args: {
|
|
2958
|
+
accountAddress: AccountAddressInput;
|
|
2959
|
+
}): Promise<AccountData>;
|
|
2960
|
+
/**
|
|
2961
|
+
* Queries for all modules in an account given an account address
|
|
2962
|
+
*
|
|
2963
|
+
* Note: In order to get all account modules, this function may call the API
|
|
2964
|
+
* multiple times as it auto paginates.
|
|
2965
|
+
*
|
|
2966
|
+
* @param args.accountAddress Aptos account address
|
|
2967
|
+
* @param args.options.offset The number module to start returning results from
|
|
2968
|
+
* @param args.options.limit The number of results to return
|
|
2969
|
+
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
2970
|
+
*
|
|
2971
|
+
* @returns Account modules
|
|
2972
|
+
*/
|
|
2973
|
+
getAccountModules(args: {
|
|
2974
|
+
accountAddress: AccountAddressInput;
|
|
2975
|
+
options?: PaginationArgs & LedgerVersionArg;
|
|
2976
|
+
}): Promise<MoveModuleBytecode[]>;
|
|
2977
|
+
/**
|
|
2978
|
+
* Queries for a specific account module given account address and module name
|
|
2979
|
+
*
|
|
2980
|
+
* @param args.accountAddress Aptos account address
|
|
2981
|
+
* @param args.moduleName The name of the module
|
|
2982
|
+
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
2983
|
+
*
|
|
2984
|
+
* @returns Account module
|
|
2985
|
+
*
|
|
2986
|
+
* @example
|
|
2987
|
+
* const module = await aptos.getAccountModule({accountAddress:"0x456"})
|
|
2988
|
+
* // An example of an account module response
|
|
2989
|
+
* ```
|
|
2990
|
+
* {
|
|
2991
|
+
* bytecode: "0xa11ceb0b0600000006010002030206050807070f0d081c200",
|
|
2992
|
+
* abi: { address: "0x1" }
|
|
2993
|
+
* }
|
|
2994
|
+
* ```
|
|
2995
|
+
*/
|
|
2996
|
+
getAccountModule(args: {
|
|
2997
|
+
accountAddress: AccountAddressInput;
|
|
2998
|
+
moduleName: string;
|
|
2999
|
+
options?: LedgerVersionArg;
|
|
3000
|
+
}): Promise<MoveModuleBytecode>;
|
|
3001
|
+
/**
|
|
3002
|
+
* Queries account transactions given an account address
|
|
3003
|
+
*
|
|
3004
|
+
* Note: In order to get all account transactions, this function may call the API
|
|
3005
|
+
* multiple times as it auto paginates.
|
|
3006
|
+
*
|
|
3007
|
+
* @example
|
|
3008
|
+
* const transactions = await aptos.getAccountTransactions({accountAddress:"0x456"})
|
|
3009
|
+
*
|
|
3010
|
+
* @param args.accountAddress Aptos account address
|
|
3011
|
+
* @param args.options.offset The number transaction to start returning results from
|
|
3012
|
+
* @param args.options.limit The number of results to return
|
|
3013
|
+
*
|
|
3014
|
+
* @returns The account transactions
|
|
3015
|
+
*/
|
|
3016
|
+
getAccountTransactions(args: {
|
|
3017
|
+
accountAddress: AccountAddressInput;
|
|
3018
|
+
options?: PaginationArgs;
|
|
3019
|
+
}): Promise<TransactionResponse[]>;
|
|
3020
|
+
/**
|
|
3021
|
+
* Queries all account resources given an account address
|
|
3022
|
+
*
|
|
3023
|
+
* Note: In order to get all account resources, this function may call the API
|
|
3024
|
+
* multiple times as it auto paginates.
|
|
3025
|
+
*
|
|
3026
|
+
* @example
|
|
3027
|
+
* const resources = await aptos.getAccountResources({accountAddress:"0x456"})
|
|
3028
|
+
*
|
|
3029
|
+
* @param args.accountAddress Aptos account address
|
|
3030
|
+
* @param args.options.offset The number resource to start returning results from
|
|
3031
|
+
* @param args.options.limit The number of results to return
|
|
3032
|
+
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
3033
|
+
* @returns Account resources
|
|
3034
|
+
*/
|
|
3035
|
+
getAccountResources(args: {
|
|
3036
|
+
accountAddress: AccountAddressInput;
|
|
3037
|
+
options?: PaginationArgs & LedgerVersionArg;
|
|
3038
|
+
}): Promise<MoveResource[]>;
|
|
3039
|
+
/**
|
|
3040
|
+
* Queries a specific account resource given account address and resource type. Note that the default is `any` in order
|
|
3041
|
+
* to allow for ease of accessing properties of the object.
|
|
3042
|
+
*
|
|
3043
|
+
* @type The typed output of the resource
|
|
3044
|
+
* @param args.accountAddress Aptos account address
|
|
3045
|
+
* @param args.resourceType String representation of an on-chain Move struct type, i.e "0x1::aptos_coin::AptosCoin"
|
|
3046
|
+
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
3047
|
+
*
|
|
3048
|
+
* @returns Account resource
|
|
3049
|
+
*
|
|
3050
|
+
* @example
|
|
3051
|
+
* const resource = await aptos.getAccountResource({accountAddress:"0x456"})
|
|
3052
|
+
*
|
|
3053
|
+
*/
|
|
3054
|
+
getAccountResource<T extends {} = any>(args: {
|
|
3055
|
+
accountAddress: AccountAddressInput;
|
|
3056
|
+
resourceType: MoveStructId;
|
|
3057
|
+
options?: LedgerVersionArg;
|
|
3058
|
+
}): Promise<T>;
|
|
3059
|
+
/**
|
|
3060
|
+
* Looks up the account address for a given authentication key
|
|
3061
|
+
*
|
|
3062
|
+
* This handles both if the account's authentication key has been rotated or not.
|
|
3063
|
+
*
|
|
3064
|
+
* @example
|
|
3065
|
+
* const accountAddress = await aptos.lookupOriginalAccountAddress({authenticationKey:account.accountAddress})
|
|
3066
|
+
*
|
|
3067
|
+
* @param args.authenticationKey The authentication key
|
|
3068
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
3069
|
+
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
3070
|
+
* @returns Promise<AccountAddress> The accountAddress associated with the authentication key
|
|
3071
|
+
*/
|
|
3072
|
+
lookupOriginalAccountAddress(args: {
|
|
3073
|
+
authenticationKey: AccountAddressInput;
|
|
3074
|
+
minimumLedgerVersion?: AnyNumber;
|
|
3075
|
+
options?: LedgerVersionArg;
|
|
3076
|
+
}): Promise<AccountAddress>;
|
|
3077
|
+
/**
|
|
3078
|
+
* Queries the current count of tokens owned by an account
|
|
3079
|
+
*
|
|
3080
|
+
* @example
|
|
3081
|
+
* const tokensCount = await aptos.getAccountTokensCount({accountAddress:"0x456"})
|
|
3082
|
+
*
|
|
3083
|
+
* @param args.accountAddress The account address
|
|
3084
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
3085
|
+
* @returns Current count of tokens owned by the account
|
|
3086
|
+
*/
|
|
3087
|
+
getAccountTokensCount(args: {
|
|
3088
|
+
accountAddress: AccountAddressInput;
|
|
3089
|
+
minimumLedgerVersion?: AnyNumber;
|
|
3090
|
+
}): Promise<number>;
|
|
3091
|
+
/**
|
|
3092
|
+
* Queries the account's current owned tokens.
|
|
3093
|
+
*
|
|
3094
|
+
* This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
|
|
3095
|
+
* If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
|
|
3096
|
+
*
|
|
3097
|
+
* @example
|
|
3098
|
+
* const accountOwnedTokens = await aptos.getAccountOwnedTokens({accountAddress:"0x456"})
|
|
3099
|
+
*
|
|
3100
|
+
* @param args.accountAddress The account address we want to get the tokens for
|
|
3101
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
3102
|
+
* @param args.options.tokenStandard The NFT standard to query for
|
|
3103
|
+
* @param args.options.offset The number token to start returning results from
|
|
3104
|
+
* @param args.options.limit The number of results to return
|
|
3105
|
+
* @param args.options.orderBy The order to sort the tokens by
|
|
3106
|
+
* @returns Tokens array with the token data
|
|
3107
|
+
*/
|
|
3108
|
+
getAccountOwnedTokens(args: {
|
|
3109
|
+
accountAddress: AccountAddressInput;
|
|
3110
|
+
minimumLedgerVersion?: AnyNumber;
|
|
3111
|
+
options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensQueryResponse[0]>;
|
|
3112
|
+
}): Promise<GetAccountOwnedTokensQueryResponse>;
|
|
3113
|
+
/**
|
|
3114
|
+
* Queries all current tokens of a specific collection that an account owns by the collection address
|
|
3115
|
+
*
|
|
3116
|
+
* This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
|
|
3117
|
+
* If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
|
|
3118
|
+
*
|
|
3119
|
+
* @example
|
|
3120
|
+
* const accountOwnedTokens = await aptos.getAccountOwnedTokensFromCollectionAddress({accountAddress:"0x123", collectionAddress:"0x456"})
|
|
3121
|
+
*
|
|
3122
|
+
* @param args.accountAddress The account address we want to get the tokens for
|
|
3123
|
+
* @param args.collectionAddress The address of the collection being queried
|
|
3124
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
3125
|
+
* @param args.options.tokenStandard The NFT standard to query for
|
|
3126
|
+
* @param args.options.offset The number token to start returning results from
|
|
3127
|
+
* @param args.options.limit The number of results to return
|
|
3128
|
+
* @param args.options.orderBy The order to sort the tokens by
|
|
3129
|
+
* @returns Tokens array with the token data
|
|
3130
|
+
*/
|
|
3131
|
+
getAccountOwnedTokensFromCollectionAddress(args: {
|
|
3132
|
+
accountAddress: AccountAddressInput;
|
|
3133
|
+
collectionAddress: AccountAddressInput;
|
|
3134
|
+
minimumLedgerVersion?: AnyNumber;
|
|
3135
|
+
options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensFromCollectionResponse[0]>;
|
|
3136
|
+
}): Promise<GetAccountOwnedTokensFromCollectionResponse>;
|
|
3137
|
+
/**
|
|
3138
|
+
* Queries for all collections that an account currently has tokens for.
|
|
3139
|
+
*
|
|
3140
|
+
* This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
|
|
3141
|
+
* If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
|
|
3142
|
+
*
|
|
3143
|
+
* @example
|
|
3144
|
+
* const accountCollectionsWithOwnedTokens = await aptos.getAccountCollectionsWithOwnedTokens({accountAddress:"0x123"})
|
|
3145
|
+
*
|
|
3146
|
+
* @param args.accountAddress The account address we want to get the collections for
|
|
3147
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
3148
|
+
* @param args.options.tokenStandard The NFT standard to query for
|
|
3149
|
+
* @param args.options.offset The number collection to start returning results from
|
|
3150
|
+
* @param args.options.limit The number of results to return
|
|
3151
|
+
* @param args.options.orderBy The order to sort the tokens by
|
|
3152
|
+
* @returns Collections array with the collections data
|
|
3153
|
+
*/
|
|
3154
|
+
getAccountCollectionsWithOwnedTokens(args: {
|
|
3155
|
+
accountAddress: AccountAddressInput;
|
|
3156
|
+
minimumLedgerVersion?: AnyNumber;
|
|
3157
|
+
options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountCollectionsWithOwnedTokenResponse[0]>;
|
|
3158
|
+
}): Promise<GetAccountCollectionsWithOwnedTokenResponse>;
|
|
3159
|
+
/**
|
|
3160
|
+
* Queries the current count of transactions submitted by an account
|
|
3161
|
+
*
|
|
3162
|
+
* @example
|
|
3163
|
+
* const accountTransactionsCount = await aptos.getAccountTransactionsCount({accountAddress:"0x123"})
|
|
3164
|
+
*
|
|
3165
|
+
* @param args.accountAddress The account address we want to get the total count for
|
|
3166
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
3167
|
+
* @returns Current count of transactions made by an account
|
|
3168
|
+
*/
|
|
3169
|
+
getAccountTransactionsCount(args: {
|
|
3170
|
+
accountAddress: AccountAddressInput;
|
|
3171
|
+
minimumLedgerVersion?: AnyNumber;
|
|
3172
|
+
}): Promise<number>;
|
|
3052
3173
|
/**
|
|
3053
|
-
*
|
|
3174
|
+
* Queries an account's coins data
|
|
3175
|
+
*
|
|
3176
|
+
* @example
|
|
3177
|
+
* const accountCoinsData = await aptos.getAccountCoinsData({accountAddress:"0x123"})
|
|
3178
|
+
*
|
|
3179
|
+
* @param args.accountAddress The account address we want to get the coins data for
|
|
3180
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
3181
|
+
* @param args.options.offset optional. The number coin to start returning results from
|
|
3182
|
+
* @param args.options.limit optional. The number of results to return
|
|
3183
|
+
* @param args.options.orderBy optional. The order to sort the coins by
|
|
3184
|
+
* @param args.options.where optional. Filter the results by
|
|
3185
|
+
* @returns Array with the coins data
|
|
3054
3186
|
*/
|
|
3055
|
-
|
|
3187
|
+
getAccountCoinsData(args: {
|
|
3188
|
+
accountAddress: AccountAddressInput;
|
|
3189
|
+
minimumLedgerVersion?: AnyNumber;
|
|
3190
|
+
options?: PaginationArgs & OrderByArg<GetAccountCoinsDataResponse[0]> & WhereArg<CurrentFungibleAssetBalancesBoolExp>;
|
|
3191
|
+
}): Promise<GetAccountCoinsDataResponse>;
|
|
3056
3192
|
/**
|
|
3057
|
-
*
|
|
3193
|
+
* Queries the current count of an account's coins aggregated
|
|
3194
|
+
*
|
|
3195
|
+
* @example
|
|
3196
|
+
* const accountCoinsCount = await aptos.getAccountCoinsCount({accountAddress:"0x123"})
|
|
3197
|
+
*
|
|
3198
|
+
* @param args.accountAddress The account address we want to get the total count for
|
|
3199
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
3200
|
+
* @returns Current count of the aggregated count of all account's coins
|
|
3058
3201
|
*/
|
|
3059
|
-
|
|
3202
|
+
getAccountCoinsCount(args: {
|
|
3203
|
+
accountAddress: AccountAddressInput;
|
|
3204
|
+
minimumLedgerVersion?: AnyNumber;
|
|
3205
|
+
}): Promise<number>;
|
|
3060
3206
|
/**
|
|
3061
|
-
*
|
|
3207
|
+
* Queries the account's APT amount
|
|
3208
|
+
*
|
|
3209
|
+
* @example
|
|
3210
|
+
* const accountAPTAmount = await aptos.getAccountAPTAmount({accountAddress:"0x123"})
|
|
3211
|
+
*
|
|
3212
|
+
* @param args.accountAddress The account address we want to get the total count for
|
|
3213
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
3214
|
+
* @returns Current amount of account's APT
|
|
3062
3215
|
*/
|
|
3063
|
-
|
|
3216
|
+
getAccountAPTAmount(args: {
|
|
3217
|
+
accountAddress: AccountAddressInput;
|
|
3218
|
+
minimumLedgerVersion?: AnyNumber;
|
|
3219
|
+
}): Promise<number>;
|
|
3064
3220
|
/**
|
|
3065
|
-
*
|
|
3221
|
+
* Queries the account's coin amount by the coin type
|
|
3222
|
+
*
|
|
3223
|
+
* @example
|
|
3224
|
+
* const accountCoinAmount = await aptos.getAccountCoinAmount({accountAddress:"0x123", coinType:"0x1::aptos_coin::AptosCoin"})
|
|
3225
|
+
*
|
|
3226
|
+
* @param args.accountAddress The account address we want to get the total count for
|
|
3227
|
+
* @param args.coinType The coin type to query
|
|
3228
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
3229
|
+
* @returns Current amount of account's coin
|
|
3066
3230
|
*/
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3231
|
+
getAccountCoinAmount(args: {
|
|
3232
|
+
accountAddress: AccountAddressInput;
|
|
3233
|
+
coinType: MoveStructId;
|
|
3234
|
+
minimumLedgerVersion?: AnyNumber;
|
|
3235
|
+
}): Promise<number>;
|
|
3236
|
+
/**
|
|
3237
|
+
* Queries an account's owned objects
|
|
3238
|
+
*
|
|
3239
|
+
* @example
|
|
3240
|
+
* const accountOwnedObjects = await aptos.getAccountOwnedObjects({accountAddress:"0x123"})
|
|
3241
|
+
*
|
|
3242
|
+
* @param args.accountAddress The account address we want to get the objects for
|
|
3243
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
3244
|
+
* @param args.options.offset The starting position to start returning results from
|
|
3245
|
+
* @param args.options.limit The number of results to return
|
|
3246
|
+
* @param args.options.orderBy The order to sort the objects by
|
|
3247
|
+
* @returns Objects array with the object data
|
|
3248
|
+
*/
|
|
3249
|
+
getAccountOwnedObjects(args: {
|
|
3250
|
+
accountAddress: AccountAddressInput;
|
|
3251
|
+
minimumLedgerVersion?: AnyNumber;
|
|
3252
|
+
options?: PaginationArgs & OrderByArg<GetAccountOwnedObjectsResponse[0]>;
|
|
3253
|
+
}): Promise<GetAccountOwnedObjectsResponse>;
|
|
3254
|
+
/**
|
|
3255
|
+
* Derives an account by providing a private key.
|
|
3256
|
+
* This functions resolves the provided private key type and derives the public key from it.
|
|
3257
|
+
*
|
|
3258
|
+
* If the privateKey is a Secp256k1 type, it derives the account using the derived public key and
|
|
3259
|
+
* auth key using the SingleKey scheme locally.
|
|
3260
|
+
*
|
|
3261
|
+
* If the privateKey is a ED25519 type, it looks up the authentication key on chain, and uses it to resolve
|
|
3262
|
+
* whether it is a Legacy ED25519 key or a Unified ED25519 key. It then derives the account based
|
|
3263
|
+
* on that.
|
|
3264
|
+
*
|
|
3265
|
+
* @example
|
|
3266
|
+
* const account = await aptos.deriveAccountFromPrivateKey({privateKey:new Ed25519PrivateKey("0x123")})
|
|
3267
|
+
*
|
|
3268
|
+
* @param args.privateKey An account private key
|
|
3269
|
+
* @returns Account type
|
|
3270
|
+
*/
|
|
3271
|
+
deriveAccountFromPrivateKey(args: {
|
|
3272
|
+
privateKey: PrivateKey;
|
|
3273
|
+
}): Promise<Account$1>;
|
|
3107
3274
|
}
|
|
3108
3275
|
|
|
3109
3276
|
/**
|
|
@@ -3891,18 +4058,6 @@ declare function buildTransaction(args: InputGenerateMultiAgentRawTransactionArg
|
|
|
3891
4058
|
*/
|
|
3892
4059
|
declare function generateSignedTransactionForSimulation(args: InputSimulateTransactionData): Uint8Array;
|
|
3893
4060
|
declare function getAuthenticatorForSimulation(publicKey: PublicKey): AccountAuthenticatorEd25519 | AccountAuthenticatorSingleKey;
|
|
3894
|
-
/**
|
|
3895
|
-
* Sign a transaction that can later be submitted to chain
|
|
3896
|
-
*
|
|
3897
|
-
* @param args.signer The signer account to sign the transaction
|
|
3898
|
-
* @param args.transaction A aptos transaction type to sign
|
|
3899
|
-
*
|
|
3900
|
-
* @return The signer AccountAuthenticator
|
|
3901
|
-
*/
|
|
3902
|
-
declare function sign(args: {
|
|
3903
|
-
signer: Account$1;
|
|
3904
|
-
transaction: AnyRawTransaction;
|
|
3905
|
-
}): AccountAuthenticator;
|
|
3906
4061
|
/**
|
|
3907
4062
|
* Prepare a transaction to be submitted to chain
|
|
3908
4063
|
*
|
|
@@ -3923,15 +4078,6 @@ declare function hashValues(input: (Uint8Array | string)[]): Uint8Array;
|
|
|
3923
4078
|
* @param args InputSubmitTransactionData
|
|
3924
4079
|
*/
|
|
3925
4080
|
declare function generateUserTransactionHash(args: InputSubmitTransactionData): string;
|
|
3926
|
-
/**
|
|
3927
|
-
* Derive the raw transaction type - FeePayerRawTransaction or MultiAgentRawTransaction or RawTransaction
|
|
3928
|
-
*
|
|
3929
|
-
* @param transaction A aptos transaction type
|
|
3930
|
-
*
|
|
3931
|
-
* @returns FeePayerRawTransaction | MultiAgentRawTransaction | RawTransaction
|
|
3932
|
-
*/
|
|
3933
|
-
declare function deriveTransactionType(transaction: AnyRawTransaction): AnyRawTransactionInstance;
|
|
3934
|
-
declare function generateSigningMessage(transaction: AnyRawTransaction): Uint8Array;
|
|
3935
4081
|
|
|
3936
4082
|
/**
|
|
3937
4083
|
* Convert type arguments to only type tags, allowing for string representations of type tags
|
|
@@ -3973,6 +4119,43 @@ declare function fetchViewFunctionAbi(moduleAddress: string, moduleName: string,
|
|
|
3973
4119
|
declare function convertArgument(functionName: string, functionAbi: FunctionABI, arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes, position: number, genericTypeParams: Array<TypeTag>): EntryFunctionArgumentTypes;
|
|
3974
4120
|
declare function checkOrConvertArgument(arg: SimpleEntryFunctionArgumentTypes | EntryFunctionArgumentTypes, param: TypeTag, position: number, genericTypeParams: Array<TypeTag>): EntryFunctionArgumentTypes;
|
|
3975
4121
|
|
|
4122
|
+
/**
|
|
4123
|
+
* Derive the raw transaction type - FeePayerRawTransaction or MultiAgentRawTransaction or RawTransaction
|
|
4124
|
+
*
|
|
4125
|
+
* @param transaction A aptos transaction type
|
|
4126
|
+
*
|
|
4127
|
+
* @returns FeePayerRawTransaction | MultiAgentRawTransaction | RawTransaction
|
|
4128
|
+
*/
|
|
4129
|
+
declare function deriveTransactionType(transaction: AnyRawTransaction): AnyRawTransactionInstance;
|
|
4130
|
+
/**
|
|
4131
|
+
* Generates the 'signing message' form of a message to be signed.
|
|
4132
|
+
*
|
|
4133
|
+
* @param bytes The byte representation of the message to be signed and sent to the chain
|
|
4134
|
+
* @param domainSeparator A domain separator that starts with 'APTOS::'
|
|
4135
|
+
*
|
|
4136
|
+
* @returns The Uint8Array of the signing message
|
|
4137
|
+
*/
|
|
4138
|
+
declare function generateSigningMessage(bytes: Uint8Array, domainSeparator: string): Uint8Array;
|
|
4139
|
+
/**
|
|
4140
|
+
* Generates the 'signing message' form of a serilizable value. It bcs serializes the value and uses the name of
|
|
4141
|
+
* its constructor as the domain separator.
|
|
4142
|
+
*
|
|
4143
|
+
* @param serializable An object that has a bcs serialized form
|
|
4144
|
+
*
|
|
4145
|
+
* @returns The Uint8Array of the signing message
|
|
4146
|
+
*/
|
|
4147
|
+
declare function generateSigningMessageForSerializable(serializable: Serializable): Uint8Array;
|
|
4148
|
+
/**
|
|
4149
|
+
* Generates the 'signing message' form of a transaction. It derives the type of transaction and
|
|
4150
|
+
* applies the appropriate domain separator based on if there is extra data such as a fee payer or
|
|
4151
|
+
* secondary signers.
|
|
4152
|
+
*
|
|
4153
|
+
* @param transaction A transaction that is to be signed
|
|
4154
|
+
*
|
|
4155
|
+
* @returns The Uint8Array of the signing message
|
|
4156
|
+
*/
|
|
4157
|
+
declare function generateSigningMessageForTransaction(transaction: AnyRawTransaction): Uint8Array;
|
|
4158
|
+
|
|
3976
4159
|
declare enum TypeTagParserErrorType {
|
|
3977
4160
|
InvalidTypeTag = "unknown type",
|
|
3978
4161
|
UnexpectedGenericType = "unexpected generic type",
|
|
@@ -4179,31 +4362,6 @@ declare class General {
|
|
|
4179
4362
|
withTransactions?: boolean;
|
|
4180
4363
|
};
|
|
4181
4364
|
}): Promise<Block>;
|
|
4182
|
-
/**
|
|
4183
|
-
* Queries for a table item for a table identified by the handle and the key for the item.
|
|
4184
|
-
* Key and value types need to be passed in to help with key serialization and value deserialization.
|
|
4185
|
-
*
|
|
4186
|
-
* @example https://api.devnet.aptoslabs.com/v1/accounts/0x1/resource/0x1::coin::CoinInfo%3C0x1::aptos_coin::AptosCoin%3E
|
|
4187
|
-
* const tableItem = await aptos.getTableItem({
|
|
4188
|
-
* handle: "0x123",
|
|
4189
|
-
* data: {
|
|
4190
|
-
* key_type: "address", // Move type of table key
|
|
4191
|
-
* value_type: "u128", // Move type of table value
|
|
4192
|
-
* key: "0x619dc29a0aac8fa146714058e8dd6d2d0f3bdf5f6331907bf91f3acd81e6935" // Value of table key
|
|
4193
|
-
* },
|
|
4194
|
-
* })
|
|
4195
|
-
*
|
|
4196
|
-
* @param args.handle A pointer to where that table is stored
|
|
4197
|
-
* @param args.data Object that describes table item
|
|
4198
|
-
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
4199
|
-
*
|
|
4200
|
-
* @returns Table item value rendered in JSON
|
|
4201
|
-
*/
|
|
4202
|
-
getTableItem<T>(args: {
|
|
4203
|
-
handle: string;
|
|
4204
|
-
data: TableItemRequest;
|
|
4205
|
-
options?: LedgerVersionArg;
|
|
4206
|
-
}): Promise<T>;
|
|
4207
4365
|
/**
|
|
4208
4366
|
* Queries for a Move view function
|
|
4209
4367
|
* @param args.payload Payload for the view function
|
|
@@ -5276,6 +5434,81 @@ declare class Transaction {
|
|
|
5276
5434
|
}): Promise<PendingTransactionResponse>;
|
|
5277
5435
|
}
|
|
5278
5436
|
|
|
5437
|
+
/**
|
|
5438
|
+
* A class to query all `Table` Aptos related queries
|
|
5439
|
+
*/
|
|
5440
|
+
declare class Table {
|
|
5441
|
+
readonly config: AptosConfig;
|
|
5442
|
+
constructor(config: AptosConfig);
|
|
5443
|
+
/**
|
|
5444
|
+
* Queries for a table item for a table identified by the handle and the key for the item.
|
|
5445
|
+
* Key and value types need to be passed in to help with key serialization and value deserialization.
|
|
5446
|
+
*
|
|
5447
|
+
* Note, this query calls the fullnode server
|
|
5448
|
+
*
|
|
5449
|
+
* @example https://api.devnet.aptoslabs.com/v1/accounts/0x1/resource/0x1::coin::CoinInfo%3C0x1::aptos_coin::AptosCoin%3E
|
|
5450
|
+
* const tableItem = await aptos.getTableItem({
|
|
5451
|
+
* handle: "0x1b854694ae746cdbd8d44186ca4929b2b337df21d1c74633be19b2710552fdca",
|
|
5452
|
+
* data: {
|
|
5453
|
+
* key_type: "address", // Move type of table key
|
|
5454
|
+
* value_type: "u128", // Move type of table value
|
|
5455
|
+
* key: "0x619dc29a0aac8fa146714058e8dd6d2d0f3bdf5f6331907bf91f3acd81e6935" // Value of table key
|
|
5456
|
+
* },
|
|
5457
|
+
* })
|
|
5458
|
+
*
|
|
5459
|
+
* @param args.handle A pointer to where that table is stored
|
|
5460
|
+
* @param args.data Object that describes table item
|
|
5461
|
+
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
5462
|
+
*
|
|
5463
|
+
* @returns Table item value rendered in JSON
|
|
5464
|
+
*/
|
|
5465
|
+
getTableItem<T>(args: {
|
|
5466
|
+
handle: string;
|
|
5467
|
+
data: TableItemRequest;
|
|
5468
|
+
options?: LedgerVersionArg;
|
|
5469
|
+
}): Promise<T>;
|
|
5470
|
+
/**
|
|
5471
|
+
* Queries for a table items data.
|
|
5472
|
+
*
|
|
5473
|
+
* Optional `options.where` param can be passed to filter the response.
|
|
5474
|
+
*
|
|
5475
|
+
* Note, this query calls the indexer server
|
|
5476
|
+
*
|
|
5477
|
+
* @example
|
|
5478
|
+
* const data = await aptos.getTableItemsData({
|
|
5479
|
+
* options: { where: {
|
|
5480
|
+
* table_handle: { _eq: "0x1b854694ae746cdbd8d44186ca4929b2b337df21d1c74633be19b2710552fdca" },
|
|
5481
|
+
* transaction_version: { _eq: "0" }
|
|
5482
|
+
* }
|
|
5483
|
+
* },
|
|
5484
|
+
* });
|
|
5485
|
+
*
|
|
5486
|
+
* @returns GetTableItemsDataResponse
|
|
5487
|
+
*/
|
|
5488
|
+
getTableItemsData(args: {
|
|
5489
|
+
minimumLedgerVersion?: AnyNumber;
|
|
5490
|
+
options?: PaginationArgs & WhereArg<TableItemsBoolExp> & OrderByArg<GetTableItemsDataResponse[0]>;
|
|
5491
|
+
}): Promise<GetTableItemsDataResponse>;
|
|
5492
|
+
/**
|
|
5493
|
+
* Queries for a table items metadata.
|
|
5494
|
+
*
|
|
5495
|
+
* Optional `options.where` param can be passed to filter the response.
|
|
5496
|
+
*
|
|
5497
|
+
* Note, this query calls the indexer server
|
|
5498
|
+
*
|
|
5499
|
+
* @example
|
|
5500
|
+
* const data = await aptos.getTableItemsMetadata({
|
|
5501
|
+
* options: { where: { handle: { _eq: "0x1b854694ae746cdbd8d44186ca4929b2b337df21d1c74633be19b2710552fdca" } } },
|
|
5502
|
+
* });
|
|
5503
|
+
*
|
|
5504
|
+
* @returns GetTableItemsMetadataResponse
|
|
5505
|
+
*/
|
|
5506
|
+
getTableItemsMetadata(args: {
|
|
5507
|
+
minimumLedgerVersion?: AnyNumber;
|
|
5508
|
+
options?: PaginationArgs & WhereArg<TableMetadatasBoolExp> & OrderByArg<GetTableItemsMetadataResponse[0]>;
|
|
5509
|
+
}): Promise<GetTableItemsMetadataResponse>;
|
|
5510
|
+
}
|
|
5511
|
+
|
|
5279
5512
|
/**
|
|
5280
5513
|
* This class is the main entry point into Aptos's
|
|
5281
5514
|
* APIs and separates functionality into different namespaces.
|
|
@@ -5299,9 +5532,10 @@ declare class Aptos {
|
|
|
5299
5532
|
readonly general: General;
|
|
5300
5533
|
readonly staking: Staking;
|
|
5301
5534
|
readonly transaction: Transaction;
|
|
5535
|
+
readonly table: Table;
|
|
5302
5536
|
constructor(settings?: AptosConfig);
|
|
5303
5537
|
}
|
|
5304
|
-
interface Aptos extends Account, ANS, Coin, DigitalAsset, Event, Faucet, FungibleAsset, General, Staking, Omit<Transaction, "build" | "simulate" | "submit" | "batch"> {
|
|
5538
|
+
interface Aptos extends Account, ANS, Coin, DigitalAsset, Event, Faucet, FungibleAsset, General, Staking, Table, Omit<Transaction, "build" | "simulate" | "submit" | "batch"> {
|
|
5305
5539
|
}
|
|
5306
5540
|
|
|
5307
5541
|
/**
|
|
@@ -5464,4 +5698,4 @@ declare function postAptosFullNode<Req extends {}, Res extends {}>(options: Post
|
|
|
5464
5698
|
declare function postAptosIndexer<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
5465
5699
|
declare function postAptosFaucet<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
5466
5700
|
|
|
5467
|
-
export { APTOS_BIP44_REGEX, APTOS_COIN, APTOS_HARDENED_REGEX, Account$1 as Account, AccountAddress, AccountAddressInput, AccountAuthenticator, AccountAuthenticatorEd25519, AccountAuthenticatorMultiEd25519, AccountAuthenticatorMultiKey, AccountAuthenticatorSingleKey, AccountData, AccountPublicKey, AccountSequenceNumber, AnyNumber, AnyPublicKey, AnyPublicKeyVariant, type AnyRawTransaction, type AnyRawTransactionInstance, AnySignature, type AnyTransactionPayloadInstance, Aptos, AptosApiError, AptosApiType, AptosConfig, AptosRequest, type AptosResponse, AptosSettings, AuthenticationKey, AuthenticationKeyScheme, Block, Bool, CKDPriv, ChainId, Client, ClientConfig, ClientRequest, ClientResponse, CommittedTransactionResponse, type CreateAccountFromPrivateKeyArgs, type CreateEd25519AccountFromPrivateKeyArgs, type CreateEd25519SingleKeyAccountFromPrivateKeyArgs, type CreateSingleKeyAccountFromPrivateKeyArgs, DEFAULT_MAX_GAS_AMOUNT, DEFAULT_TXN_EXP_SEC_FROM_NOW, DEFAULT_TXN_TIMEOUT_SEC, type DerivedKeys, Deserializable, type DeserializableClass, Deserializer, Ed25519Account, Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature, type Ed25519SignerConstructorArgs, type Ed25519SignerFromDerivationPathArgs, EntryFunction, type EntryFunctionABI, EntryFunctionArgument, type EntryFunctionArgumentTypes, EntryFunctionBytes, type ExecutionFinishEventData, type FailureEventData, FaucetConfig, FeePayerRawTransaction, FixedBytes, FullNodeConfig, type FunctionABI, GasEstimation, type GenerateAccountArgs, type GenerateEd25519AccountArgs, type GenerateEd25519SingleKeyAccountArgs, type GenerateSingleKeyAccountArgs, GetANSNameResponse, GetAccountCoinsDataResponse, GetAccountCollectionsWithOwnedTokenResponse, GetAccountOwnedObjectsResponse, GetAccountOwnedTokensFromCollectionResponse, GetAccountOwnedTokensQueryResponse, type GetAptosRequestOptions, GetChainTopUserTransactionsResponse, GetCollectionDataResponse, GetCurrentFungibleAssetBalancesResponse, GetCurrentTokenOwnershipResponse, GetDelegatedStakingActivitiesResponse, GetEventsResponse, GetFungibleAssetActivitiesResponse, GetFungibleAssetMetadataResponse, GetNumberOfDelegatorsResponse, GetOwnedTokensResponse, GetProcessorStatusResponse, type GetRequestOptions, GetTokenActivityResponse, GetTokenDataResponse, GraphqlQuery, HARDENED_OFFSET, Hex, HexInput, Identifier, IndexerConfig, type InputEntryFunctionData, type InputEntryFunctionDataWithABI, type InputEntryFunctionDataWithRemoteABI, type InputGenerateMultiAgentRawTransactionArgs, type InputGenerateMultiAgentRawTransactionData, type InputGenerateRawTransactionArgs, type InputGenerateSingleSignerRawTransactionArgs, type InputGenerateSingleSignerRawTransactionData, type InputGenerateTransactionData, type InputGenerateTransactionOptions, type InputGenerateTransactionPayloadData, type InputGenerateTransactionPayloadDataWithABI, type InputGenerateTransactionPayloadDataWithRemoteABI, type InputMultiSigData, type InputMultiSigDataWithABI, type InputMultiSigDataWithRemoteABI, type InputScriptData, type InputSimulateTransactionData, type InputSimulateTransactionOptions, type InputSubmitTransactionData, type InputViewFunctionData, type InputViewFunctionDataWithABI, type InputViewFunctionDataWithRemoteABI, KeyType, LedgerInfo, LedgerVersionArg, MimeType, ModuleId, MoveFunction, MoveFunctionGenericTypeParam, MoveFunctionId, MoveModuleBytecode, MoveModuleId, MoveOption, MoveResource, MoveString, MoveStructId, MoveValue, MoveVector, MultiAgentRawTransaction, MultiAgentTransaction, MultiEd25519PublicKey, MultiEd25519Signature, MultiKey, MultiKeySignature, MultiSig, MultiSigTransactionPayload, Network, OrderByArg, PaginationArgs, PendingTransactionResponse, type PostAptosRequestOptions, type PostRequestOptions, type PrivateKey, type PrivateKeyFromDerivationPathArgs, ProcessorType, PublicKey, RAW_TRANSACTION_SALT, RAW_TRANSACTION_WITH_DATA_SALT, RawTransaction, RawTransactionWithData, RotationProofChallenge, Script, ScriptFunctionArgument, type ScriptFunctionArgumentTypes, Secp256k1PrivateKey, Secp256k1PublicKey, Secp256k1Signature, Serializable, Serializer, Signature, SignedTransaction, SigningScheme, SigningSchemeInput, type SimpleEntryFunctionArgumentTypes, SimpleTransaction, SingleKeyAccount, type SingleKeySignerConstructorArgs, type SingleKeySignerFromDerivationPathArgs, type SingleKeySignerGenerateArgs, StructTag, type SuccessEventData, TableItemRequest, TokenStandardArg, TransactionArgument, TransactionAuthenticator, TransactionAuthenticatorEd25519, TransactionAuthenticatorFeePayer, TransactionAuthenticatorMultiAgent, TransactionAuthenticatorMultiEd25519, TransactionAuthenticatorSingleSender, TransactionPayload, TransactionPayloadEntryFunction, TransactionPayloadMultiSig, TransactionPayloadScript, TransactionResponse, TransactionWorker, type TransactionWorkerEvents, TransactionWorkerEventsEnum, TypeTag, TypeTagAddress, TypeTagBool, TypeTagGeneric, TypeTagParserError, TypeTagParserErrorType, TypeTagReference, TypeTagSigner, TypeTagStruct, TypeTagU128, TypeTagU16, TypeTagU256, TypeTagU32, TypeTagU64, TypeTagU8, TypeTagVector, U128, U16, U256, U32, U64, U8, Uint16, Uint32, Uint8, UserTransactionResponse, type VerifyEd25519SignatureArgs, type VerifySignatureArgs, type VerifySingleKeySignatureArgs, type ViewFunctionABI, WaitForTransactionOptions, WhereArg, aptosCoinStructTag, aptosRequest, buildTransaction, checkOrConvertArgument, convertArgument,
|
|
5701
|
+
export { APTOS_BIP44_REGEX, APTOS_COIN, APTOS_HARDENED_REGEX, Account$1 as Account, AccountAddress, AccountAddressInput, AccountAuthenticator, AccountAuthenticatorEd25519, AccountAuthenticatorMultiEd25519, AccountAuthenticatorMultiKey, AccountAuthenticatorSingleKey, AccountData, AccountPublicKey, AccountSequenceNumber, AnyNumber, AnyPublicKey, AnyPublicKeyVariant, type AnyRawTransaction, type AnyRawTransactionInstance, AnySignature, type AnyTransactionPayloadInstance, Aptos, AptosApiError, AptosApiType, AptosConfig, AptosRequest, type AptosResponse, AptosSettings, AuthenticationKey, AuthenticationKeyScheme, Block, Bool, CKDPriv, ChainId, Client, ClientConfig, ClientRequest, ClientResponse, CommittedTransactionResponse, type CreateAccountFromPrivateKeyArgs, type CreateEd25519AccountFromPrivateKeyArgs, type CreateEd25519SingleKeyAccountFromPrivateKeyArgs, type CreateSingleKeyAccountFromPrivateKeyArgs, DEFAULT_MAX_GAS_AMOUNT, DEFAULT_TXN_EXP_SEC_FROM_NOW, DEFAULT_TXN_TIMEOUT_SEC, type DerivedKeys, Deserializable, type DeserializableClass, Deserializer, Ed25519Account, Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature, type Ed25519SignerConstructorArgs, type Ed25519SignerFromDerivationPathArgs, EntryFunction, type EntryFunctionABI, EntryFunctionArgument, type EntryFunctionArgumentTypes, EntryFunctionBytes, type ExecutionFinishEventData, type FailureEventData, FaucetConfig, FeePayerRawTransaction, FixedBytes, FullNodeConfig, type FunctionABI, GasEstimation, type GenerateAccountArgs, type GenerateEd25519AccountArgs, type GenerateEd25519SingleKeyAccountArgs, type GenerateSingleKeyAccountArgs, GetANSNameResponse, GetAccountCoinsDataResponse, GetAccountCollectionsWithOwnedTokenResponse, GetAccountOwnedObjectsResponse, GetAccountOwnedTokensFromCollectionResponse, GetAccountOwnedTokensQueryResponse, type GetAptosRequestOptions, GetChainTopUserTransactionsResponse, GetCollectionDataResponse, GetCurrentFungibleAssetBalancesResponse, GetCurrentTokenOwnershipResponse, GetDelegatedStakingActivitiesResponse, GetEventsResponse, GetFungibleAssetActivitiesResponse, GetFungibleAssetMetadataResponse, GetNumberOfDelegatorsResponse, GetOwnedTokensResponse, GetProcessorStatusResponse, type GetRequestOptions, GetTableItemsDataResponse, GetTableItemsMetadataResponse, GetTokenActivityResponse, GetTokenDataResponse, GraphqlQuery, HARDENED_OFFSET, Hex, HexInput, Identifier, IndexerConfig, type InputEntryFunctionData, type InputEntryFunctionDataWithABI, type InputEntryFunctionDataWithRemoteABI, type InputGenerateMultiAgentRawTransactionArgs, type InputGenerateMultiAgentRawTransactionData, type InputGenerateRawTransactionArgs, type InputGenerateSingleSignerRawTransactionArgs, type InputGenerateSingleSignerRawTransactionData, type InputGenerateTransactionData, type InputGenerateTransactionOptions, type InputGenerateTransactionPayloadData, type InputGenerateTransactionPayloadDataWithABI, type InputGenerateTransactionPayloadDataWithRemoteABI, type InputMultiSigData, type InputMultiSigDataWithABI, type InputMultiSigDataWithRemoteABI, type InputScriptData, type InputSimulateTransactionData, type InputSimulateTransactionOptions, type InputSubmitTransactionData, type InputViewFunctionData, type InputViewFunctionDataWithABI, type InputViewFunctionDataWithRemoteABI, KeyType, LedgerInfo, LedgerVersionArg, MimeType, ModuleId, MoveFunction, MoveFunctionGenericTypeParam, MoveFunctionId, MoveModuleBytecode, MoveModuleId, MoveOption, MoveResource, MoveString, MoveStructId, MoveValue, MoveVector, MultiAgentRawTransaction, MultiAgentTransaction, MultiEd25519PublicKey, MultiEd25519Signature, MultiKey, MultiKeyAccount, MultiKeySignature, MultiSig, MultiSigTransactionPayload, Network, OrderByArg, PaginationArgs, PendingTransactionResponse, type PostAptosRequestOptions, type PostRequestOptions, type PrivateKey, type PrivateKeyFromDerivationPathArgs, ProcessorType, PublicKey, RAW_TRANSACTION_SALT, RAW_TRANSACTION_WITH_DATA_SALT, RawTransaction, RawTransactionWithData, RotationProofChallenge, Script, ScriptFunctionArgument, type ScriptFunctionArgumentTypes, Secp256k1PrivateKey, Secp256k1PublicKey, Secp256k1Signature, Serializable, Serializer, Signature, SignedTransaction, SigningScheme, SigningSchemeInput, type SimpleEntryFunctionArgumentTypes, SimpleTransaction, SingleKeyAccount, type SingleKeySignerConstructorArgs, type SingleKeySignerFromDerivationPathArgs, type SingleKeySignerGenerateArgs, StructTag, type SuccessEventData, TableItemRequest, TokenStandardArg, TransactionArgument, TransactionAuthenticator, TransactionAuthenticatorEd25519, TransactionAuthenticatorFeePayer, TransactionAuthenticatorMultiAgent, TransactionAuthenticatorMultiEd25519, TransactionAuthenticatorSingleSender, TransactionPayload, TransactionPayloadEntryFunction, TransactionPayloadMultiSig, TransactionPayloadScript, TransactionResponse, TransactionWorker, type TransactionWorkerEvents, TransactionWorkerEventsEnum, TypeTag, TypeTagAddress, TypeTagBool, TypeTagGeneric, TypeTagParserError, TypeTagParserErrorType, TypeTagReference, TypeTagSigner, TypeTagStruct, TypeTagU128, TypeTagU16, TypeTagU256, TypeTagU32, TypeTagU64, TypeTagU8, TypeTagVector, U128, U16, U256, U32, U64, U8, Uint16, Uint32, Uint8, UserTransactionResponse, type VerifyEd25519SignatureArgs, type VerifyMultiKeySignatureArgs, type VerifySignatureArgs, type VerifySingleKeySignatureArgs, type ViewFunctionABI, WaitForTransactionOptions, WhereArg, aptosCoinStructTag, aptosRequest, buildTransaction, checkOrConvertArgument, convertArgument, deriveKey, deriveTransactionType, deserializeFromScriptArgument, fetchEntryFunctionAbi, fetchFunctionAbi, fetchViewFunctionAbi, findFirstNonSignerArg, generateRawTransaction, generateSignedTransaction, generateSignedTransactionForSimulation, generateSigningMessage, generateSigningMessageForSerializable, generateSigningMessageForTransaction, generateTransactionPayload, generateTransactionPayloadWithABI, generateUserTransactionHash, generateViewFunctionPayload, generateViewFunctionPayloadWithABI, get, getAptosFullNode, getAuthenticatorForSimulation, getFunctionParts, hashValues, isBcsAddress, isBcsBool, isBcsFixedBytes, isBcsString, isBcsU128, isBcsU16, isBcsU256, isBcsU32, isBcsU64, isBcsU8, isBool, isEncodedEntryFunctionArgument, isLargeNumber, isNull, isNumber, isScriptDataInput, isString, isValidBIP44Path, isValidHardenedPath, mnemonicToSeed, normalizeBundle, objectStructTag, optionStructTag, paginateWithCursor, parseTypeTag, post, postAptosFaucet, postAptosFullNode, postAptosIndexer, promiseFulfilledStatus, request, splitPath, standardizeTypeTags, stringStructTag, throwTypeMismatch };
|