@aptos-labs/ts-sdk 1.12.1 → 1.13.0-zeta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/chunk-KSEUZTKY.js +2 -0
- package/dist/common/chunk-KSEUZTKY.js.map +1 -0
- package/dist/common/cli/index.d.ts +37 -0
- package/dist/common/cli/index.js +2 -0
- package/dist/common/cli/index.js.map +1 -0
- package/dist/common/index.d.ts +2131 -1432
- package/dist/common/index.js +26 -26
- package/dist/common/index.js.map +1 -1
- package/dist/esm/{Ed25519Account-DHqzsb8B.d.mts → Ed25519Account-hkKk3b4Z.d.mts} +12 -14
- 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/EphemeralKeyPair.d.mts +42 -0
- package/dist/esm/account/EphemeralKeyPair.mjs +2 -0
- package/dist/esm/account/KeylessAccount.d.mts +85 -0
- package/dist/esm/account/KeylessAccount.mjs +2 -0
- package/dist/esm/account/MultiKeyAccount.d.mts +99 -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 +39 -0
- package/dist/esm/account/index.mjs +2 -0
- package/dist/esm/api/account.d.mts +62 -9
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.d.mts +20 -28
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +20 -9
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/aptosConfig.d.mts +24 -0
- package/dist/esm/api/aptosConfig.mjs +1 -1
- package/dist/esm/api/coin.d.mts +14 -7
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.d.mts +149 -10
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/event.d.mts +13 -8
- package/dist/esm/api/event.mjs +1 -1
- package/dist/esm/api/faucet.d.mts +3 -0
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.d.mts +36 -13
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.d.mts +55 -32
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +15 -9
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/keyless.d.mts +75 -0
- package/dist/esm/api/keyless.mjs +2 -0
- package/dist/esm/api/staking.d.mts +9 -0
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/transaction.d.mts +59 -16
- 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.d.mts +2 -0
- package/dist/esm/bcs/serializer.mjs +1 -1
- package/dist/esm/chunk-2HXKDHMA.mjs +2 -0
- package/dist/esm/chunk-2HXKDHMA.mjs.map +1 -0
- package/dist/esm/{chunk-O3YFCZJ5.mjs → chunk-2I2XAOH7.mjs} +2 -2
- package/dist/esm/{chunk-NF5OUPPU.mjs → chunk-2PW2EHCH.mjs} +2 -2
- package/dist/esm/chunk-2PW2EHCH.mjs.map +1 -0
- package/dist/esm/{chunk-CP4QCRBZ.mjs → chunk-2XIT7I5L.mjs} +2 -2
- package/dist/esm/chunk-3FVRXELT.mjs +2 -0
- package/dist/esm/{chunk-U3YYSIIT.mjs → chunk-3VGX3TXH.mjs} +2 -2
- package/dist/esm/{chunk-FC5MU6ZN.mjs → chunk-45D3YXLT.mjs} +2 -2
- package/dist/esm/chunk-4FQ63Z6Y.mjs +2 -0
- package/dist/esm/chunk-4FQ63Z6Y.mjs.map +1 -0
- package/dist/esm/{chunk-M4SQNMCW.mjs → chunk-4QWFCYP2.mjs} +2 -2
- package/dist/esm/chunk-4QWFCYP2.mjs.map +1 -0
- package/dist/esm/{chunk-KQB7A4OX.mjs → chunk-5IM5TQN4.mjs} +2 -2
- package/dist/esm/{chunk-5NWTYUKC.mjs → chunk-67QYMEZE.mjs} +2 -2
- package/dist/esm/{chunk-GHYE26Q5.mjs → chunk-6FBKUTGF.mjs} +2 -2
- package/dist/esm/chunk-6Q2GNDKL.mjs +2 -0
- package/dist/esm/chunk-6RBUXB5I.mjs +2 -0
- package/dist/esm/{chunk-SRDIYE3M.mjs.map → chunk-6RBUXB5I.mjs.map} +1 -1
- package/dist/esm/{chunk-AIPKOP3K.mjs → chunk-77MI5DFB.mjs} +2 -2
- package/dist/esm/chunk-77MI5DFB.mjs.map +1 -0
- package/dist/esm/{chunk-5EN52MUT.mjs → chunk-7STYQ5ZE.mjs} +2 -2
- package/dist/esm/chunk-7Z6DYLCA.mjs +1 -0
- package/dist/esm/{chunk-YG6YYQRG.mjs → chunk-ABBKCXG4.mjs} +2 -2
- package/dist/esm/chunk-ABBKCXG4.mjs.map +1 -0
- package/dist/esm/chunk-ACOL3VVP.mjs +2 -0
- package/dist/esm/chunk-ACOL3VVP.mjs.map +1 -0
- package/dist/esm/chunk-AFPBV2BQ.mjs +2 -0
- package/dist/esm/{chunk-BCUSI3N6.mjs → chunk-AOCNYMMX.mjs} +2 -2
- package/dist/esm/chunk-AQ4I7VVB.mjs +1 -0
- package/dist/esm/{chunk-SUTBXHYU.mjs → chunk-AWMOLZCX.mjs} +2 -2
- package/dist/esm/chunk-AWMOLZCX.mjs.map +1 -0
- package/dist/esm/chunk-C3L4ETUF.mjs +2 -0
- package/dist/esm/chunk-CITY3EV2.mjs +2 -0
- package/dist/esm/chunk-CITY3EV2.mjs.map +1 -0
- package/dist/esm/chunk-COW5IGYC.mjs +2 -0
- package/dist/esm/chunk-CYA2GSRV.mjs +2 -0
- package/dist/esm/chunk-CYA2GSRV.mjs.map +1 -0
- package/dist/esm/{chunk-FNLRLSGJ.mjs → chunk-CYWA4AJF.mjs} +2 -2
- package/dist/esm/{chunk-FVMJDRHO.mjs → chunk-DANNIPX2.mjs} +2 -2
- package/dist/esm/chunk-DANNIPX2.mjs.map +1 -0
- package/dist/esm/{chunk-6O5ZR5ME.mjs → chunk-E3YEX3FR.mjs} +2 -2
- package/dist/esm/{chunk-G56GPLTB.mjs → chunk-EB7AI4B4.mjs} +2 -2
- package/dist/esm/chunk-EMFDNUP2.mjs +2 -0
- package/dist/esm/chunk-EMFDNUP2.mjs.map +1 -0
- package/dist/esm/chunk-FBPNHF54.mjs +2 -0
- package/dist/esm/chunk-FCVWPGXD.mjs +2 -0
- package/dist/esm/chunk-FCVWPGXD.mjs.map +1 -0
- package/dist/esm/chunk-FLYEALDB.mjs +2 -0
- package/dist/esm/chunk-FLYEALDB.mjs.map +1 -0
- package/dist/esm/chunk-G7S2ZX5A.mjs +2 -0
- package/dist/esm/chunk-G7S2ZX5A.mjs.map +1 -0
- package/dist/esm/{chunk-KAGLWBIJ.mjs → chunk-HGZGTBA4.mjs} +2 -2
- package/dist/esm/{chunk-T4C6BVXK.mjs → chunk-HJVGZBKN.mjs} +2 -2
- package/dist/esm/chunk-HJVGZBKN.mjs.map +1 -0
- package/dist/esm/{chunk-25UTAIJG.mjs → chunk-INYYKAXD.mjs} +2 -2
- package/dist/esm/chunk-J7YWDDUB.mjs +2 -0
- package/dist/esm/chunk-J7YWDDUB.mjs.map +1 -0
- package/dist/esm/chunk-JDD6TMHU.mjs +2 -0
- package/dist/esm/chunk-JDD6TMHU.mjs.map +1 -0
- package/dist/esm/chunk-JM3W7AQP.mjs +2 -0
- package/dist/esm/chunk-JM3W7AQP.mjs.map +1 -0
- package/dist/esm/{chunk-KXFMI7RM.mjs → chunk-JNAI5UFZ.mjs} +2 -2
- package/dist/esm/chunk-JXCZTOYC.mjs +1 -0
- package/dist/esm/chunk-JXCZTOYC.mjs.map +1 -0
- package/dist/esm/chunk-KDTQD56P.mjs +2 -0
- package/dist/esm/{chunk-QRVYLV76.mjs.map → chunk-KDTQD56P.mjs.map} +1 -1
- package/dist/esm/{chunk-A7XZTJ3D.mjs → chunk-KOWGEMJZ.mjs} +2 -2
- package/dist/esm/chunk-KOWGEMJZ.mjs.map +1 -0
- package/dist/esm/chunk-KPAKF3K7.mjs +2 -0
- package/dist/esm/chunk-KPAKF3K7.mjs.map +1 -0
- package/dist/esm/{chunk-UEKKYJGA.mjs → chunk-KR3NQRBA.mjs} +2 -2
- package/dist/esm/chunk-KR3NQRBA.mjs.map +1 -0
- package/dist/esm/chunk-L4CV3DRL.mjs +2 -0
- package/dist/esm/chunk-L4CV3DRL.mjs.map +1 -0
- package/dist/esm/{chunk-5ID6W7XL.mjs → chunk-LFTWUMLK.mjs} +2 -2
- package/dist/esm/chunk-LPFIDI6C.mjs +2 -0
- package/dist/esm/chunk-LPFIDI6C.mjs.map +1 -0
- package/dist/esm/chunk-LVYKZS54.mjs +2 -0
- package/dist/esm/{chunk-CXR7MOBW.mjs.map → chunk-LVYKZS54.mjs.map} +1 -1
- package/dist/esm/chunk-MGOHPDX4.mjs +2 -0
- package/dist/esm/chunk-MLPJOS5C.mjs +2 -0
- package/dist/esm/chunk-MWUJCP27.mjs +2 -0
- package/dist/esm/{chunk-VLNBGWGX.mjs → chunk-MZGNUGEY.mjs} +2 -2
- package/dist/esm/chunk-MZGNUGEY.mjs.map +1 -0
- package/dist/esm/chunk-NNT3XRRO.mjs +2 -0
- package/dist/esm/chunk-NNT3XRRO.mjs.map +1 -0
- package/dist/esm/chunk-NUDRQTYI.mjs +2 -0
- package/dist/esm/chunk-NUR3TCTI.mjs +2 -0
- package/dist/esm/chunk-OOSPASLD.mjs +2 -0
- package/dist/esm/chunk-OOSPASLD.mjs.map +1 -0
- package/dist/esm/chunk-OVXWFD2N.mjs +2 -0
- package/dist/esm/{chunk-CAGDOGXS.mjs.map → chunk-OVXWFD2N.mjs.map} +1 -1
- package/dist/esm/{chunk-MJPUASSD.mjs → chunk-PFFAQZHT.mjs} +2 -2
- package/dist/esm/chunk-PTIZKRON.mjs +2 -0
- package/dist/esm/chunk-PTIZKRON.mjs.map +1 -0
- package/dist/esm/chunk-QREYDZ5R.mjs +2 -0
- package/dist/esm/chunk-RFSO3JRG.mjs +1 -0
- package/dist/esm/chunk-RFSO3JRG.mjs.map +1 -0
- package/dist/esm/chunk-S5HG2QUD.mjs +2 -0
- package/dist/esm/chunk-S5HG2QUD.mjs.map +1 -0
- package/dist/esm/chunk-SHL6OAGA.mjs +2 -0
- package/dist/esm/chunk-SHL6OAGA.mjs.map +1 -0
- package/dist/esm/chunk-SKXGYGDX.mjs +2 -0
- package/dist/esm/chunk-SKXGYGDX.mjs.map +1 -0
- package/dist/esm/chunk-STYDBDYL.mjs +2 -0
- package/dist/esm/{chunk-QRS4DGP3.mjs → chunk-T23OVRNF.mjs} +2 -2
- package/dist/esm/{chunk-QRS4DGP3.mjs.map → chunk-T23OVRNF.mjs.map} +1 -1
- package/dist/esm/chunk-T47T7HX4.mjs +2 -0
- package/dist/esm/chunk-T47T7HX4.mjs.map +1 -0
- package/dist/esm/chunk-TB2KXA2B.mjs +2 -0
- package/dist/esm/chunk-TB2KXA2B.mjs.map +1 -0
- package/dist/esm/{chunk-VNIABDOT.mjs → chunk-THVGZXKD.mjs} +2 -2
- package/dist/esm/chunk-THVGZXKD.mjs.map +1 -0
- package/dist/esm/chunk-TJDC5PWD.mjs +2 -0
- package/dist/esm/chunk-TJTZVCPS.mjs +2 -0
- package/dist/esm/chunk-TJTZVCPS.mjs.map +1 -0
- package/dist/esm/chunk-TR6Q7RSZ.mjs +2 -0
- package/dist/esm/chunk-TR6Q7RSZ.mjs.map +1 -0
- package/dist/esm/{chunk-36QXVFR5.mjs → chunk-TVRJ3M7B.mjs} +2 -2
- package/dist/esm/{chunk-36QXVFR5.mjs.map → chunk-TVRJ3M7B.mjs.map} +1 -1
- package/dist/esm/chunk-U7AY6CMF.mjs +2 -0
- package/dist/esm/chunk-U7AY6CMF.mjs.map +1 -0
- package/dist/esm/{chunk-HJYT6LDB.mjs → chunk-UYMZF37A.mjs} +2 -2
- package/dist/esm/chunk-VHC2KC7B.mjs +2 -0
- package/dist/esm/chunk-VHC2KC7B.mjs.map +1 -0
- package/dist/esm/chunk-VHCJCXVZ.mjs +2 -0
- package/dist/esm/chunk-VHCJCXVZ.mjs.map +1 -0
- package/dist/esm/chunk-VVGV4S24.mjs +2 -0
- package/dist/esm/chunk-VVGV4S24.mjs.map +1 -0
- package/dist/esm/{chunk-3MFILHZT.mjs → chunk-W2R2FURG.mjs} +2 -2
- package/dist/esm/chunk-W2R2FURG.mjs.map +1 -0
- package/dist/esm/chunk-W57M6DIK.mjs +2 -0
- package/dist/esm/chunk-WRY7462X.mjs +2 -0
- package/dist/esm/chunk-WRY7462X.mjs.map +1 -0
- package/dist/esm/chunk-X5XBBEVT.mjs +2 -0
- package/dist/esm/chunk-X5XBBEVT.mjs.map +1 -0
- package/dist/esm/{chunk-XDXI3TRT.mjs → chunk-XBQEFZD7.mjs} +2 -2
- package/dist/esm/{chunk-5ZQJLHJA.mjs → chunk-Y5ZK4UII.mjs} +2 -2
- package/dist/esm/chunk-Y5ZK4UII.mjs.map +1 -0
- package/dist/esm/chunk-YP3RMVL3.mjs +2 -0
- package/dist/esm/chunk-YP3RMVL3.mjs.map +1 -0
- package/dist/esm/{chunk-35EWRSDK.mjs → chunk-ZNEBMSNC.mjs} +2 -2
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.d.mts +2 -1
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.d.mts +2 -2
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.d.mts +3 -1
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/client/types.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 +9 -12
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/ephemeral.d.mts +76 -0
- package/dist/esm/core/crypto/ephemeral.mjs +2 -0
- package/dist/esm/core/crypto/ephemeral.mjs.map +1 -0
- package/dist/esm/core/crypto/hdKey.d.mts +15 -1
- package/dist/esm/core/crypto/hdKey.mjs +1 -1
- package/dist/esm/core/crypto/index.d.mts +8 -6
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/keyless.d.mts +217 -0
- package/dist/esm/core/crypto/keyless.mjs +2 -0
- package/dist/esm/core/crypto/keyless.mjs.map +1 -0
- 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 +5 -4
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/poseidon.d.mts +7 -0
- package/dist/esm/core/crypto/poseidon.mjs +2 -0
- package/dist/esm/core/crypto/poseidon.mjs.map +1 -0
- 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 +8 -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 +7 -8
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/index.d.mts +16 -12
- 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 +4 -4
- 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 +11 -11
- 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 +12 -12
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/keyless.d.mts +68 -0
- package/dist/esm/internal/keyless.mjs +2 -0
- package/dist/esm/internal/keyless.mjs.map +1 -0
- package/dist/esm/internal/staking.d.mts +1 -1
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/transaction.d.mts +5 -1
- 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 +47 -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/index.d.mts +18 -3
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/types/keyless.d.mts +14 -0
- package/dist/esm/types/keyless.mjs +1 -0
- package/dist/esm/types/keyless.mjs.map +1 -0
- package/dist/esm/utils/apiEndpoints.d.mts +3 -1
- package/dist/esm/utils/apiEndpoints.mjs +1 -1
- package/dist/esm/utils/const.d.mts +5 -3
- package/dist/esm/utils/const.mjs +1 -1
- package/dist/esm/utils/index.d.mts +1 -1
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +13 -7
- package/src/{core/account → account}/Account.ts +12 -16
- package/src/{core/account → account}/Ed25519Account.ts +13 -7
- package/src/account/EphemeralKeyPair.ts +78 -0
- package/src/account/KeylessAccount.ts +230 -0
- package/src/account/MultiKeyAccount.ts +121 -0
- package/src/{core/account → account}/SingleKeyAccount.ts +13 -7
- package/src/account/index.ts +6 -0
- package/src/api/account.ts +50 -8
- package/src/api/ans.ts +10 -17
- package/src/api/aptos.ts +10 -0
- package/src/api/aptosConfig.ts +50 -1
- package/src/api/coin.ts +7 -0
- package/src/api/digitalAsset.ts +142 -2
- package/src/api/event.ts +13 -8
- package/src/api/faucet.ts +3 -0
- package/src/api/fungibleAsset.ts +28 -4
- package/src/api/general.ts +48 -25
- package/src/api/keyless.ts +55 -0
- package/src/api/staking.ts +9 -0
- package/src/api/transaction.ts +59 -15
- package/src/api/transactionSubmission/management.ts +1 -1
- package/src/api/transactionSubmission/sign.ts +1 -1
- package/src/bcs/serializer.ts +18 -0
- package/src/client/core.ts +10 -1
- package/src/client/get.ts +6 -0
- package/src/client/post.ts +13 -0
- package/src/core/crypto/ed25519.ts +50 -34
- package/src/core/crypto/ephemeral.ts +147 -0
- package/src/core/crypto/hdKey.ts +31 -0
- package/src/core/crypto/index.ts +2 -0
- package/src/core/crypto/keyless.ts +502 -0
- package/src/core/crypto/multiKey.ts +23 -11
- package/src/core/crypto/poseidon.ts +134 -0
- package/src/core/crypto/secp256k1.ts +9 -3
- package/src/core/crypto/singleKey.ts +11 -0
- package/src/core/index.ts +0 -1
- package/src/index.ts +1 -1
- package/src/internal/account.ts +7 -10
- package/src/internal/ans.ts +2 -1
- package/src/internal/digitalAsset.ts +3 -2
- package/src/internal/fungibleAsset.ts +4 -3
- package/src/internal/keyless.ts +205 -0
- package/src/internal/transaction.ts +48 -10
- package/src/internal/transactionSubmission.ts +8 -7
- package/src/transactions/authenticator/account.ts +6 -11
- package/src/transactions/management/accountSequenceNumber.ts +1 -1
- package/src/transactions/management/transactionWorker.ts +8 -2
- package/src/transactions/transactionBuilder/index.ts +2 -0
- package/src/transactions/transactionBuilder/signingMessage.ts +75 -0
- package/src/transactions/transactionBuilder/transactionBuilder.ts +3 -80
- package/src/types/index.ts +21 -0
- package/src/types/keyless.ts +6 -0
- package/src/utils/apiEndpoints.ts +14 -0
- package/src/utils/const.ts +4 -2
- package/src/version.ts +1 -1
- package/dist/esm/chunk-3MFILHZT.mjs.map +0 -1
- package/dist/esm/chunk-3PMUIXFS.mjs +0 -2
- package/dist/esm/chunk-3PMUIXFS.mjs.map +0 -1
- package/dist/esm/chunk-3RQ5V3F3.mjs +0 -2
- package/dist/esm/chunk-4AVC2RCH.mjs +0 -2
- package/dist/esm/chunk-4AVC2RCH.mjs.map +0 -1
- package/dist/esm/chunk-4NHWV5AI.mjs +0 -2
- package/dist/esm/chunk-4QMXOWHP.mjs +0 -1
- package/dist/esm/chunk-527DYQ3X.mjs +0 -2
- package/dist/esm/chunk-527DYQ3X.mjs.map +0 -1
- package/dist/esm/chunk-5ZQJLHJA.mjs.map +0 -1
- package/dist/esm/chunk-A7XZTJ3D.mjs.map +0 -1
- package/dist/esm/chunk-AIPKOP3K.mjs.map +0 -1
- package/dist/esm/chunk-ARGODLTZ.mjs +0 -2
- package/dist/esm/chunk-ARGODLTZ.mjs.map +0 -1
- package/dist/esm/chunk-ASXXZH2D.mjs +0 -2
- package/dist/esm/chunk-ASXXZH2D.mjs.map +0 -1
- package/dist/esm/chunk-B4DWWHNL.mjs +0 -2
- package/dist/esm/chunk-B7X6PSE7.mjs +0 -2
- package/dist/esm/chunk-BAYKVJBZ.mjs +0 -2
- package/dist/esm/chunk-C67BKZND.mjs +0 -2
- package/dist/esm/chunk-C67BKZND.mjs.map +0 -1
- package/dist/esm/chunk-CAGDOGXS.mjs +0 -2
- package/dist/esm/chunk-CEHCDA3G.mjs +0 -2
- package/dist/esm/chunk-CQS6ZCJ7.mjs +0 -2
- package/dist/esm/chunk-CQS6ZCJ7.mjs.map +0 -1
- package/dist/esm/chunk-CXR7MOBW.mjs +0 -2
- package/dist/esm/chunk-CYNQRMO5.mjs +0 -2
- package/dist/esm/chunk-CYNQRMO5.mjs.map +0 -1
- package/dist/esm/chunk-DGLW7OBS.mjs +0 -2
- package/dist/esm/chunk-DGLW7OBS.mjs.map +0 -1
- package/dist/esm/chunk-DUP7XY5P.mjs +0 -2
- package/dist/esm/chunk-DUP7XY5P.mjs.map +0 -1
- package/dist/esm/chunk-E7FWVXGX.mjs +0 -1
- package/dist/esm/chunk-EJBUUMWV.mjs +0 -2
- package/dist/esm/chunk-EV75CYGN.mjs +0 -2
- package/dist/esm/chunk-EV75CYGN.mjs.map +0 -1
- package/dist/esm/chunk-F7EMGK4M.mjs +0 -2
- package/dist/esm/chunk-FPD4JBPV.mjs +0 -2
- package/dist/esm/chunk-FPD4JBPV.mjs.map +0 -1
- package/dist/esm/chunk-FVMJDRHO.mjs.map +0 -1
- package/dist/esm/chunk-FXHXOVL4.mjs +0 -2
- package/dist/esm/chunk-FXHXOVL4.mjs.map +0 -1
- package/dist/esm/chunk-GJDGR3KQ.mjs +0 -2
- package/dist/esm/chunk-GJDGR3KQ.mjs.map +0 -1
- package/dist/esm/chunk-IZF6DFAL.mjs +0 -2
- package/dist/esm/chunk-JOLLCFQL.mjs +0 -2
- package/dist/esm/chunk-JOLLCFQL.mjs.map +0 -1
- package/dist/esm/chunk-LG7RJQ57.mjs +0 -2
- package/dist/esm/chunk-LR65XHSF.mjs +0 -2
- package/dist/esm/chunk-LR65XHSF.mjs.map +0 -1
- package/dist/esm/chunk-M4SQNMCW.mjs.map +0 -1
- package/dist/esm/chunk-MLWIHWNH.mjs +0 -1
- package/dist/esm/chunk-N3U47Y6Y.mjs +0 -2
- package/dist/esm/chunk-NF5OUPPU.mjs.map +0 -1
- package/dist/esm/chunk-NJRNZEHX.mjs +0 -2
- package/dist/esm/chunk-NJRNZEHX.mjs.map +0 -1
- package/dist/esm/chunk-PF57EOJY.mjs +0 -2
- package/dist/esm/chunk-QJAI7DNA.mjs +0 -2
- package/dist/esm/chunk-QJAI7DNA.mjs.map +0 -1
- package/dist/esm/chunk-QRVYLV76.mjs +0 -2
- package/dist/esm/chunk-R7G3CLRI.mjs +0 -1
- package/dist/esm/chunk-RIUFW2OG.mjs +0 -2
- package/dist/esm/chunk-RIUFW2OG.mjs.map +0 -1
- package/dist/esm/chunk-SRDIYE3M.mjs +0 -2
- package/dist/esm/chunk-SUTBXHYU.mjs.map +0 -1
- package/dist/esm/chunk-SWZOGZJ6.mjs +0 -2
- package/dist/esm/chunk-SWZOGZJ6.mjs.map +0 -1
- package/dist/esm/chunk-SZKJ3TC5.mjs +0 -1
- package/dist/esm/chunk-T4C6BVXK.mjs.map +0 -1
- package/dist/esm/chunk-UEKKYJGA.mjs.map +0 -1
- package/dist/esm/chunk-UGPALAPN.mjs +0 -2
- package/dist/esm/chunk-UQCSBLD5.mjs +0 -2
- package/dist/esm/chunk-UVSRX4SV.mjs +0 -1
- package/dist/esm/chunk-VBDMQERT.mjs +0 -2
- package/dist/esm/chunk-VHANL47W.mjs +0 -2
- package/dist/esm/chunk-VHANL47W.mjs.map +0 -1
- package/dist/esm/chunk-VLNBGWGX.mjs.map +0 -1
- package/dist/esm/chunk-VNIABDOT.mjs.map +0 -1
- package/dist/esm/chunk-XX5J7KKC.mjs +0 -2
- package/dist/esm/chunk-XX5J7KKC.mjs.map +0 -1
- package/dist/esm/chunk-YG6YYQRG.mjs.map +0 -1
- package/dist/esm/chunk-YIGDWPGM.mjs +0 -2
- package/dist/esm/chunk-YIGDWPGM.mjs.map +0 -1
- 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/index.d.mts +0 -21
- package/dist/esm/core/account/index.mjs +0 -2
- package/src/core/account/index.ts +0 -4
- /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-4QMXOWHP.mjs.map → account/EphemeralKeyPair.mjs.map} +0 -0
- /package/dist/esm/{chunk-E7FWVXGX.mjs.map → account/KeylessAccount.mjs.map} +0 -0
- /package/dist/esm/{chunk-MLWIHWNH.mjs.map → account/MultiKeyAccount.mjs.map} +0 -0
- /package/dist/esm/{core/account → account}/SingleKeyAccount.mjs.map +0 -0
- /package/dist/esm/{core/account → account}/index.mjs.map +0 -0
- /package/dist/esm/{chunk-R7G3CLRI.mjs.map → api/keyless.mjs.map} +0 -0
- /package/dist/esm/{chunk-O3YFCZJ5.mjs.map → chunk-2I2XAOH7.mjs.map} +0 -0
- /package/dist/esm/{chunk-CP4QCRBZ.mjs.map → chunk-2XIT7I5L.mjs.map} +0 -0
- /package/dist/esm/{chunk-CEHCDA3G.mjs.map → chunk-3FVRXELT.mjs.map} +0 -0
- /package/dist/esm/{chunk-U3YYSIIT.mjs.map → chunk-3VGX3TXH.mjs.map} +0 -0
- /package/dist/esm/{chunk-FC5MU6ZN.mjs.map → chunk-45D3YXLT.mjs.map} +0 -0
- /package/dist/esm/{chunk-KQB7A4OX.mjs.map → chunk-5IM5TQN4.mjs.map} +0 -0
- /package/dist/esm/{chunk-5NWTYUKC.mjs.map → chunk-67QYMEZE.mjs.map} +0 -0
- /package/dist/esm/{chunk-GHYE26Q5.mjs.map → chunk-6FBKUTGF.mjs.map} +0 -0
- /package/dist/esm/{chunk-UQCSBLD5.mjs.map → chunk-6Q2GNDKL.mjs.map} +0 -0
- /package/dist/esm/{chunk-5EN52MUT.mjs.map → chunk-7STYQ5ZE.mjs.map} +0 -0
- /package/dist/esm/{chunk-SZKJ3TC5.mjs.map → chunk-7Z6DYLCA.mjs.map} +0 -0
- /package/dist/esm/{chunk-EJBUUMWV.mjs.map → chunk-AFPBV2BQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-BCUSI3N6.mjs.map → chunk-AOCNYMMX.mjs.map} +0 -0
- /package/dist/esm/{chunk-UVSRX4SV.mjs.map → chunk-AQ4I7VVB.mjs.map} +0 -0
- /package/dist/esm/{chunk-N3U47Y6Y.mjs.map → chunk-C3L4ETUF.mjs.map} +0 -0
- /package/dist/esm/{chunk-4NHWV5AI.mjs.map → chunk-COW5IGYC.mjs.map} +0 -0
- /package/dist/esm/{chunk-FNLRLSGJ.mjs.map → chunk-CYWA4AJF.mjs.map} +0 -0
- /package/dist/esm/{chunk-6O5ZR5ME.mjs.map → chunk-E3YEX3FR.mjs.map} +0 -0
- /package/dist/esm/{chunk-G56GPLTB.mjs.map → chunk-EB7AI4B4.mjs.map} +0 -0
- /package/dist/esm/{chunk-LG7RJQ57.mjs.map → chunk-FBPNHF54.mjs.map} +0 -0
- /package/dist/esm/{chunk-KAGLWBIJ.mjs.map → chunk-HGZGTBA4.mjs.map} +0 -0
- /package/dist/esm/{chunk-25UTAIJG.mjs.map → chunk-INYYKAXD.mjs.map} +0 -0
- /package/dist/esm/{chunk-KXFMI7RM.mjs.map → chunk-JNAI5UFZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-5ID6W7XL.mjs.map → chunk-LFTWUMLK.mjs.map} +0 -0
- /package/dist/esm/{chunk-B7X6PSE7.mjs.map → chunk-MGOHPDX4.mjs.map} +0 -0
- /package/dist/esm/{chunk-BAYKVJBZ.mjs.map → chunk-MLPJOS5C.mjs.map} +0 -0
- /package/dist/esm/{chunk-PF57EOJY.mjs.map → chunk-MWUJCP27.mjs.map} +0 -0
- /package/dist/esm/{chunk-VBDMQERT.mjs.map → chunk-NUDRQTYI.mjs.map} +0 -0
- /package/dist/esm/{chunk-B4DWWHNL.mjs.map → chunk-NUR3TCTI.mjs.map} +0 -0
- /package/dist/esm/{chunk-MJPUASSD.mjs.map → chunk-PFFAQZHT.mjs.map} +0 -0
- /package/dist/esm/{chunk-IZF6DFAL.mjs.map → chunk-QREYDZ5R.mjs.map} +0 -0
- /package/dist/esm/{chunk-UGPALAPN.mjs.map → chunk-STYDBDYL.mjs.map} +0 -0
- /package/dist/esm/{chunk-F7EMGK4M.mjs.map → chunk-TJDC5PWD.mjs.map} +0 -0
- /package/dist/esm/{chunk-HJYT6LDB.mjs.map → chunk-UYMZF37A.mjs.map} +0 -0
- /package/dist/esm/{chunk-3RQ5V3F3.mjs.map → chunk-W57M6DIK.mjs.map} +0 -0
- /package/dist/esm/{chunk-XDXI3TRT.mjs.map → chunk-XBQEFZD7.mjs.map} +0 -0
- /package/dist/esm/{chunk-35EWRSDK.mjs.map → chunk-ZNEBMSNC.mjs.map} +0 -0
- /package/dist/esm/{publicKey-B3XRNhHO.d.mts → publicKey-lq5djCIY.d.mts} +0 -0
package/dist/common/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import EventEmitter from 'eventemitter3';
|
|
2
|
-
import { ChildProcessWithoutNullStreams } from 'child_process';
|
|
3
2
|
|
|
4
3
|
declare const NetworkToIndexerAPI: Record<string, string>;
|
|
5
4
|
declare const NetworkToNodeAPI: Record<string, string>;
|
|
6
5
|
declare const NetworkToFaucetAPI: Record<string, string>;
|
|
6
|
+
declare const NetworkToPepperAPI: Record<string, string>;
|
|
7
|
+
declare const NetworkToProverAPI: Record<string, string>;
|
|
7
8
|
declare enum Network {
|
|
8
9
|
MAINNET = "mainnet",
|
|
9
10
|
TESTNET = "testnet",
|
|
@@ -868,11 +869,23 @@ declare enum AccountAuthenticatorVariant {
|
|
|
868
869
|
}
|
|
869
870
|
declare enum AnyPublicKeyVariant {
|
|
870
871
|
Ed25519 = 0,
|
|
871
|
-
Secp256k1 = 1
|
|
872
|
+
Secp256k1 = 1,
|
|
873
|
+
Keyless = 3
|
|
872
874
|
}
|
|
873
875
|
declare enum AnySignatureVariant {
|
|
874
876
|
Ed25519 = 0,
|
|
875
|
-
Secp256k1 = 1
|
|
877
|
+
Secp256k1 = 1,
|
|
878
|
+
Keyless = 3
|
|
879
|
+
}
|
|
880
|
+
declare enum EphemeralPublicKeyVariant {
|
|
881
|
+
Ed25519 = 0
|
|
882
|
+
}
|
|
883
|
+
declare enum EphemeralSignatureVariant {
|
|
884
|
+
Ed25519 = 0
|
|
885
|
+
}
|
|
886
|
+
declare enum EphemeralCertificate {
|
|
887
|
+
ZkProof = 0,
|
|
888
|
+
OpenIdSignature = 1
|
|
876
889
|
}
|
|
877
890
|
/**
|
|
878
891
|
* BCS types
|
|
@@ -894,6 +907,8 @@ type AptosSettings = {
|
|
|
894
907
|
readonly fullnode?: string;
|
|
895
908
|
readonly faucet?: string;
|
|
896
909
|
readonly indexer?: string;
|
|
910
|
+
readonly pepper?: string;
|
|
911
|
+
readonly prover?: string;
|
|
897
912
|
readonly clientConfig?: ClientConfig;
|
|
898
913
|
readonly client?: Client;
|
|
899
914
|
readonly fullnodeConfig?: FullNodeConfig;
|
|
@@ -963,6 +978,7 @@ type ClientHeadersType = {
|
|
|
963
978
|
interface ClientRequest<Req> {
|
|
964
979
|
url: string;
|
|
965
980
|
method: "GET" | "POST";
|
|
981
|
+
originMethod?: string;
|
|
966
982
|
body?: Req;
|
|
967
983
|
contentType?: string;
|
|
968
984
|
params?: any;
|
|
@@ -2154,6 +2170,8 @@ declare class Serializer {
|
|
|
2154
2170
|
* // `bcs::to_bytes(&vector<address> [@0x1, @0x2, @0xa, @0xb])`;
|
|
2155
2171
|
*/
|
|
2156
2172
|
serializeVector<T extends Serializable>(values: Array<T>): void;
|
|
2173
|
+
serializeOption<T extends Serializable>(value?: T): void;
|
|
2174
|
+
serializeOptionStr(value?: string): void;
|
|
2157
2175
|
}
|
|
2158
2176
|
declare function ensureBoolean(value: unknown): asserts value is boolean;
|
|
2159
2177
|
declare const outOfRangeErrorMessage: (value: AnyNumber, min: AnyNumber, max: AnyNumber) => string;
|
|
@@ -3021,7 +3039,7 @@ declare class Ed25519PrivateKey extends Serializable implements PrivateKey {
|
|
|
3021
3039
|
* The Ed25519 signing key
|
|
3022
3040
|
* @private
|
|
3023
3041
|
*/
|
|
3024
|
-
private readonly
|
|
3042
|
+
private readonly signingKey;
|
|
3025
3043
|
/**
|
|
3026
3044
|
* Create a new PrivateKey instance from a Uint8Array or String.
|
|
3027
3045
|
*
|
|
@@ -3046,16 +3064,6 @@ declare class Ed25519PrivateKey extends Serializable implements PrivateKey {
|
|
|
3046
3064
|
* @param mnemonics the mnemonic seed phrase
|
|
3047
3065
|
*/
|
|
3048
3066
|
static fromDerivationPath(path: string, mnemonics: string): Ed25519PrivateKey;
|
|
3049
|
-
/**
|
|
3050
|
-
* A private inner function so we can separate from the main fromDerivationPath() method
|
|
3051
|
-
* to add tests to verify we create the keys correctly.
|
|
3052
|
-
*
|
|
3053
|
-
* @param path the BIP44 path
|
|
3054
|
-
* @param seed the seed phrase created by the mnemonics
|
|
3055
|
-
* @param offset the offset used for key derivation, defaults to 0x80000000
|
|
3056
|
-
* @returns
|
|
3057
|
-
*/
|
|
3058
|
-
private static fromDerivationPathInner;
|
|
3059
3067
|
/**
|
|
3060
3068
|
* Derive the Ed25519PublicKey for this private key.
|
|
3061
3069
|
*
|
|
@@ -3105,6 +3113,13 @@ declare class Ed25519Signature extends Signature {
|
|
|
3105
3113
|
toUint8Array(): Uint8Array;
|
|
3106
3114
|
serialize(serializer: Serializer): void;
|
|
3107
3115
|
static deserialize(deserializer: Deserializer): Ed25519Signature;
|
|
3116
|
+
/**
|
|
3117
|
+
* Checks if an ED25519 signature is non-canonical.
|
|
3118
|
+
*
|
|
3119
|
+
* Comes from Aptos Core
|
|
3120
|
+
* https://github.com/aptos-labs/aptos-core/blob/main/crates/aptos-crypto/src/ed25519/ed25519_sigs.rs#L47-L85
|
|
3121
|
+
*/
|
|
3122
|
+
isCanonicalSignature(): boolean;
|
|
3108
3123
|
}
|
|
3109
3124
|
|
|
3110
3125
|
type DerivedKeys = {
|
|
@@ -3116,6 +3131,7 @@ type DerivedKeys = {
|
|
|
3116
3131
|
*/
|
|
3117
3132
|
declare const APTOS_HARDENED_REGEX: RegExp;
|
|
3118
3133
|
declare const APTOS_BIP44_REGEX: RegExp;
|
|
3134
|
+
declare const APTOS_BIP44_DEFAULT_DERIVATION_PATH = "m/44'/637'/0'/0'/0'";
|
|
3119
3135
|
/**
|
|
3120
3136
|
* A list of supported key types and associated seeds
|
|
3121
3137
|
*/
|
|
@@ -3165,6 +3181,13 @@ declare const CKDPriv: ({ key, chainCode }: DerivedKeys, index: number) => Deriv
|
|
|
3165
3181
|
* @param path
|
|
3166
3182
|
*/
|
|
3167
3183
|
declare const splitPath: (path: string) => Array<string>;
|
|
3184
|
+
/**
|
|
3185
|
+
* @param path the BIP44 path
|
|
3186
|
+
* @param seed the seed phrase created by the mnemonics
|
|
3187
|
+
* @param offset the offset used for key derivation, defaults to 0x80000000
|
|
3188
|
+
* @returns
|
|
3189
|
+
*/
|
|
3190
|
+
declare function fromDerivationPath(path: string, hashSeed: HexInput, seed: Uint8Array, offset?: number): Uint8Array;
|
|
3168
3191
|
/**
|
|
3169
3192
|
* Normalizes the mnemonic by removing extra whitespace and making it lowercase
|
|
3170
3193
|
* @param mnemonic the mnemonic seed phrase
|
|
@@ -3371,8 +3394,9 @@ declare class MultiKey extends AccountPublicKey {
|
|
|
3371
3394
|
createBitmap(args: {
|
|
3372
3395
|
bits: number[];
|
|
3373
3396
|
}): Uint8Array;
|
|
3397
|
+
getIndex(publicKey: PublicKey): number;
|
|
3374
3398
|
}
|
|
3375
|
-
declare class
|
|
3399
|
+
declare class MultiSignature extends Signature {
|
|
3376
3400
|
/**
|
|
3377
3401
|
* Number of bytes in the bitmap representing who signed the transaction (32-bits)
|
|
3378
3402
|
*/
|
|
@@ -3424,7 +3448,265 @@ declare class MultiKeySignature extends Signature {
|
|
|
3424
3448
|
}): Uint8Array;
|
|
3425
3449
|
toUint8Array(): Uint8Array;
|
|
3426
3450
|
serialize(serializer: Serializer): void;
|
|
3427
|
-
static deserialize(deserializer: Deserializer):
|
|
3451
|
+
static deserialize(deserializer: Deserializer): MultiSignature;
|
|
3452
|
+
}
|
|
3453
|
+
|
|
3454
|
+
/**
|
|
3455
|
+
* Represents ephemeral keys and signatures for Aptos Keyless accounts.
|
|
3456
|
+
*
|
|
3457
|
+
* TODO
|
|
3458
|
+
*/
|
|
3459
|
+
declare class EphemeralPublicKey extends PublicKey {
|
|
3460
|
+
/**
|
|
3461
|
+
* Reference to the inner public key
|
|
3462
|
+
*/
|
|
3463
|
+
readonly publicKey: PublicKey;
|
|
3464
|
+
constructor(publicKey: PublicKey);
|
|
3465
|
+
/**
|
|
3466
|
+
* Get the public key in bytes (Uint8Array).
|
|
3467
|
+
*
|
|
3468
|
+
* @returns Uint8Array representation of the public key
|
|
3469
|
+
*/
|
|
3470
|
+
toUint8Array(): Uint8Array;
|
|
3471
|
+
/**
|
|
3472
|
+
* Get the public key as a hex string with the 0x prefix.
|
|
3473
|
+
*
|
|
3474
|
+
* @returns string representation of the public key
|
|
3475
|
+
*/
|
|
3476
|
+
toString(): string;
|
|
3477
|
+
/**
|
|
3478
|
+
* Verifies a signed data with a public key
|
|
3479
|
+
*
|
|
3480
|
+
* @param args.message message
|
|
3481
|
+
* @param args.signature The signature
|
|
3482
|
+
* @returns true if the signature is valid
|
|
3483
|
+
*/
|
|
3484
|
+
verifySignature(args: {
|
|
3485
|
+
message: HexInput;
|
|
3486
|
+
signature: EphemeralSignature;
|
|
3487
|
+
}): boolean;
|
|
3488
|
+
serialize(serializer: Serializer): void;
|
|
3489
|
+
static deserialize(deserializer: Deserializer): EphemeralPublicKey;
|
|
3490
|
+
static isPublicKey(publicKey: PublicKey): publicKey is EphemeralPublicKey;
|
|
3491
|
+
isEd25519(): this is Ed25519PublicKey;
|
|
3492
|
+
}
|
|
3493
|
+
declare class EphemeralSignature extends Signature {
|
|
3494
|
+
readonly signature: Signature;
|
|
3495
|
+
constructor(signature: Signature);
|
|
3496
|
+
/**
|
|
3497
|
+
* Get the public key in bytes (Uint8Array).
|
|
3498
|
+
*
|
|
3499
|
+
* @returns Uint8Array representation of the public key
|
|
3500
|
+
*/
|
|
3501
|
+
toUint8Array(): Uint8Array;
|
|
3502
|
+
/**
|
|
3503
|
+
* Get the public key as a hex string with the 0x prefix.
|
|
3504
|
+
*
|
|
3505
|
+
* @returns string representation of the public key
|
|
3506
|
+
*/
|
|
3507
|
+
toString(): string;
|
|
3508
|
+
static fromHex(hexInput: HexInput): EphemeralSignature;
|
|
3509
|
+
serialize(serializer: Serializer): void;
|
|
3510
|
+
static deserialize(deserializer: Deserializer): EphemeralSignature;
|
|
3511
|
+
}
|
|
3512
|
+
|
|
3513
|
+
declare const EPK_HORIZON_SECS = 10000000;
|
|
3514
|
+
declare const MAX_AUD_VAL_BYTES = 120;
|
|
3515
|
+
declare const MAX_UID_KEY_BYTES = 30;
|
|
3516
|
+
declare const MAX_UID_VAL_BYTES = 330;
|
|
3517
|
+
declare const MAX_ISS_VAL_BYTES = 120;
|
|
3518
|
+
declare const MAX_EXTRA_FIELD_BYTES = 350;
|
|
3519
|
+
declare const MAX_JWT_HEADER_B64_BYTES = 300;
|
|
3520
|
+
declare const MAX_COMMITED_EPK_BYTES = 93;
|
|
3521
|
+
/**
|
|
3522
|
+
* Represents the KeylessPublicKey public key
|
|
3523
|
+
*
|
|
3524
|
+
* KeylessPublicKey authentication key is represented in the SDK as `AnyPublicKey`.
|
|
3525
|
+
*/
|
|
3526
|
+
declare class KeylessPublicKey extends AccountPublicKey {
|
|
3527
|
+
static readonly ADDRESS_SEED_LENGTH: number;
|
|
3528
|
+
readonly iss: string;
|
|
3529
|
+
readonly addressSeed: Uint8Array;
|
|
3530
|
+
constructor(iss: string, addressSeed: HexInput);
|
|
3531
|
+
authKey(): AuthenticationKey;
|
|
3532
|
+
/**
|
|
3533
|
+
* Get the public key in bytes (Uint8Array).
|
|
3534
|
+
*
|
|
3535
|
+
* @returns Uint8Array representation of the public key
|
|
3536
|
+
*/
|
|
3537
|
+
toUint8Array(): Uint8Array;
|
|
3538
|
+
/**
|
|
3539
|
+
* Get the public key as a hex string with the 0x prefix.
|
|
3540
|
+
*
|
|
3541
|
+
* @returns string representation of the public key
|
|
3542
|
+
*/
|
|
3543
|
+
toString(): string;
|
|
3544
|
+
/**
|
|
3545
|
+
* Verifies a signed data with a public key
|
|
3546
|
+
*
|
|
3547
|
+
* @param args.message message
|
|
3548
|
+
* @param args.signature The signature
|
|
3549
|
+
* @returns true if the signature is valid
|
|
3550
|
+
*/
|
|
3551
|
+
verifySignature(args: {
|
|
3552
|
+
message: HexInput;
|
|
3553
|
+
signature: KeylessSignature;
|
|
3554
|
+
}): boolean;
|
|
3555
|
+
serialize(serializer: Serializer): void;
|
|
3556
|
+
static deserialize(deserializer: Deserializer): KeylessPublicKey;
|
|
3557
|
+
static load(deserializer: Deserializer): KeylessPublicKey;
|
|
3558
|
+
static isPublicKey(publicKey: PublicKey): publicKey is KeylessPublicKey;
|
|
3559
|
+
static create(args: {
|
|
3560
|
+
iss: string;
|
|
3561
|
+
uidKey: string;
|
|
3562
|
+
uidVal: string;
|
|
3563
|
+
aud: string;
|
|
3564
|
+
pepper: HexInput;
|
|
3565
|
+
}): KeylessPublicKey;
|
|
3566
|
+
}
|
|
3567
|
+
declare function computeAddressSeed(args: {
|
|
3568
|
+
uidKey: string;
|
|
3569
|
+
uidVal: string;
|
|
3570
|
+
aud: string;
|
|
3571
|
+
pepper: HexInput;
|
|
3572
|
+
}): Uint8Array;
|
|
3573
|
+
declare class OpenIdSignatureOrZkProof extends Signature {
|
|
3574
|
+
readonly signature: Signature;
|
|
3575
|
+
constructor(signature: Signature);
|
|
3576
|
+
/**
|
|
3577
|
+
* Get the public key in bytes (Uint8Array).
|
|
3578
|
+
*
|
|
3579
|
+
* @returns Uint8Array representation of the public key
|
|
3580
|
+
*/
|
|
3581
|
+
toUint8Array(): Uint8Array;
|
|
3582
|
+
/**
|
|
3583
|
+
* Get the public key as a hex string with the 0x prefix.
|
|
3584
|
+
*
|
|
3585
|
+
* @returns string representation of the public key
|
|
3586
|
+
*/
|
|
3587
|
+
toString(): string;
|
|
3588
|
+
serialize(serializer: Serializer): void;
|
|
3589
|
+
static deserialize(deserializer: Deserializer): OpenIdSignatureOrZkProof;
|
|
3590
|
+
}
|
|
3591
|
+
declare class Groth16Zkp extends Serializable {
|
|
3592
|
+
a: Uint8Array;
|
|
3593
|
+
b: Uint8Array;
|
|
3594
|
+
c: Uint8Array;
|
|
3595
|
+
constructor(args: {
|
|
3596
|
+
a: HexInput;
|
|
3597
|
+
b: HexInput;
|
|
3598
|
+
c: HexInput;
|
|
3599
|
+
});
|
|
3600
|
+
toUint8Array(): Uint8Array;
|
|
3601
|
+
serialize(serializer: Serializer): void;
|
|
3602
|
+
static deserialize(deserializer: Deserializer): Groth16Zkp;
|
|
3603
|
+
}
|
|
3604
|
+
declare class SignedGroth16Signature extends Signature {
|
|
3605
|
+
readonly proof: Groth16Zkp;
|
|
3606
|
+
readonly expHorizonSecs: bigint;
|
|
3607
|
+
readonly extraField?: string;
|
|
3608
|
+
readonly overrideAudVal?: string;
|
|
3609
|
+
readonly trainingWheelsSignature?: EphemeralSignature;
|
|
3610
|
+
constructor(args: {
|
|
3611
|
+
proof: Groth16Zkp;
|
|
3612
|
+
expHorizonSecs?: bigint;
|
|
3613
|
+
extraField?: string;
|
|
3614
|
+
overrideAudVal?: string;
|
|
3615
|
+
trainingWheelsSignature?: EphemeralSignature;
|
|
3616
|
+
});
|
|
3617
|
+
/**
|
|
3618
|
+
* Get the signature in bytes (Uint8Array).
|
|
3619
|
+
*
|
|
3620
|
+
* @returns Uint8Array representation of the signature
|
|
3621
|
+
*/
|
|
3622
|
+
toUint8Array(): Uint8Array;
|
|
3623
|
+
/**
|
|
3624
|
+
* Get the signature as a hex string with the 0x prefix.
|
|
3625
|
+
*
|
|
3626
|
+
* @returns string representation of the signature
|
|
3627
|
+
*/
|
|
3628
|
+
toString(): string;
|
|
3629
|
+
serialize(serializer: Serializer): void;
|
|
3630
|
+
static deserialize(deserializer: Deserializer): SignedGroth16Signature;
|
|
3631
|
+
static load(deserializer: Deserializer): SignedGroth16Signature;
|
|
3632
|
+
}
|
|
3633
|
+
/**
|
|
3634
|
+
* A OpenId signature which contains the private inputs to an OIDB proof.
|
|
3635
|
+
*/
|
|
3636
|
+
declare class OpenIdSignature extends Signature {
|
|
3637
|
+
readonly jwtSignature: string;
|
|
3638
|
+
readonly jwtPayloadJson: string;
|
|
3639
|
+
readonly uidKey: string;
|
|
3640
|
+
readonly epkBlinder: Uint8Array;
|
|
3641
|
+
readonly pepper: Uint8Array;
|
|
3642
|
+
readonly overrideAudValue?: string;
|
|
3643
|
+
/**
|
|
3644
|
+
* Create a new Signature instance from a Uint8Array or String.
|
|
3645
|
+
*
|
|
3646
|
+
* @param hexInput A HexInput (string or Uint8Array)
|
|
3647
|
+
*/
|
|
3648
|
+
constructor(args: {
|
|
3649
|
+
jwtSignature: string;
|
|
3650
|
+
jwtPayloadJson: string;
|
|
3651
|
+
uidKey?: string;
|
|
3652
|
+
epkBlinder: Uint8Array;
|
|
3653
|
+
pepper: Uint8Array;
|
|
3654
|
+
overrideAudValue?: string;
|
|
3655
|
+
});
|
|
3656
|
+
/**
|
|
3657
|
+
* Get the signature in bytes (Uint8Array).
|
|
3658
|
+
*
|
|
3659
|
+
* @returns Uint8Array representation of the signature
|
|
3660
|
+
*/
|
|
3661
|
+
toUint8Array(): Uint8Array;
|
|
3662
|
+
/**
|
|
3663
|
+
* Get the signature as a hex string with the 0x prefix.
|
|
3664
|
+
*
|
|
3665
|
+
* @returns string representation of the signature
|
|
3666
|
+
*/
|
|
3667
|
+
toString(): string;
|
|
3668
|
+
serialize(serializer: Serializer): void;
|
|
3669
|
+
static deserialize(deserializer: Deserializer): OpenIdSignature;
|
|
3670
|
+
static load(deserializer: Deserializer): OpenIdSignature;
|
|
3671
|
+
static isSignature(signature: Signature): signature is OpenIdSignature;
|
|
3672
|
+
}
|
|
3673
|
+
/**
|
|
3674
|
+
* A signature of a message signed via OIDC that uses proofs or the jwt token to authenticate.
|
|
3675
|
+
*/
|
|
3676
|
+
declare class KeylessSignature extends Signature {
|
|
3677
|
+
readonly openIdSignatureOrZkProof: OpenIdSignatureOrZkProof;
|
|
3678
|
+
readonly jwtHeader: string;
|
|
3679
|
+
readonly expiryDateSecs: bigint;
|
|
3680
|
+
readonly ephemeralPublicKey: EphemeralPublicKey;
|
|
3681
|
+
readonly ephemeralSignature: EphemeralSignature;
|
|
3682
|
+
/**
|
|
3683
|
+
* Create a new Signature instance from a Uint8Array or String.
|
|
3684
|
+
*
|
|
3685
|
+
* @param hexInput A HexInput (string or Uint8Array)
|
|
3686
|
+
*/
|
|
3687
|
+
constructor(args: {
|
|
3688
|
+
jwtHeader: string;
|
|
3689
|
+
openIdSignatureOrZkProof: OpenIdSignatureOrZkProof;
|
|
3690
|
+
expiryDateSecs: bigint;
|
|
3691
|
+
ephemeralPublicKey: EphemeralPublicKey;
|
|
3692
|
+
ephemeralSignature: EphemeralSignature;
|
|
3693
|
+
});
|
|
3694
|
+
/**
|
|
3695
|
+
* Get the signature in bytes (Uint8Array).
|
|
3696
|
+
*
|
|
3697
|
+
* @returns Uint8Array representation of the signature
|
|
3698
|
+
*/
|
|
3699
|
+
toUint8Array(): Uint8Array;
|
|
3700
|
+
/**
|
|
3701
|
+
* Get the signature as a hex string with the 0x prefix.
|
|
3702
|
+
*
|
|
3703
|
+
* @returns string representation of the signature
|
|
3704
|
+
*/
|
|
3705
|
+
toString(): string;
|
|
3706
|
+
serialize(serializer: Serializer): void;
|
|
3707
|
+
static deserialize(deserializer: Deserializer): KeylessSignature;
|
|
3708
|
+
static load(deserializer: Deserializer): KeylessSignature;
|
|
3709
|
+
static isSignature(signature: Signature): signature is KeylessSignature;
|
|
3428
3710
|
}
|
|
3429
3711
|
|
|
3430
3712
|
/**
|
|
@@ -3441,6 +3723,11 @@ declare class Secp256k1PublicKey extends PublicKey {
|
|
|
3441
3723
|
* @param hexInput A HexInput (string or Uint8Array)
|
|
3442
3724
|
*/
|
|
3443
3725
|
constructor(hexInput: HexInput);
|
|
3726
|
+
/**
|
|
3727
|
+
* Verifies a Secp256k1 signature against the public key
|
|
3728
|
+
*
|
|
3729
|
+
* Note signatures are validated to be canonical as a malleability check
|
|
3730
|
+
*/
|
|
3444
3731
|
verifySignature(args: VerifySignatureArgs): boolean;
|
|
3445
3732
|
toUint8Array(): Uint8Array;
|
|
3446
3733
|
serialize(serializer: Serializer): void;
|
|
@@ -3498,6 +3785,8 @@ declare class Secp256k1PrivateKey extends Serializable implements PrivateKey {
|
|
|
3498
3785
|
/**
|
|
3499
3786
|
* Sign the given message with the private key.
|
|
3500
3787
|
*
|
|
3788
|
+
* Note: signatures are canonical, and non-malleable
|
|
3789
|
+
*
|
|
3501
3790
|
* @param message a message as a string or Uint8Array
|
|
3502
3791
|
* @returns Signature
|
|
3503
3792
|
*/
|
|
@@ -3610,365 +3899,53 @@ declare class AccountAuthenticatorSingleKey extends AccountAuthenticator {
|
|
|
3610
3899
|
*/
|
|
3611
3900
|
declare class AccountAuthenticatorMultiKey extends AccountAuthenticator {
|
|
3612
3901
|
readonly public_keys: MultiKey;
|
|
3613
|
-
readonly signatures:
|
|
3614
|
-
|
|
3615
|
-
constructor(public_keys: MultiKey, signatures: Array<AnySignature>, signatures_bitmap: Uint8Array);
|
|
3902
|
+
readonly signatures: MultiSignature;
|
|
3903
|
+
constructor(public_keys: MultiKey, signatures: MultiSignature);
|
|
3616
3904
|
serialize(serializer: Serializer): void;
|
|
3617
3905
|
static load(deserializer: Deserializer): AccountAuthenticatorMultiKey;
|
|
3618
3906
|
}
|
|
3619
3907
|
|
|
3620
|
-
interface SingleKeySignerConstructorArgs {
|
|
3621
|
-
privateKey: PrivateKey;
|
|
3622
|
-
address?: AccountAddressInput;
|
|
3623
|
-
}
|
|
3624
|
-
interface SingleKeySignerGenerateArgs {
|
|
3625
|
-
scheme?: SigningSchemeInput;
|
|
3626
|
-
}
|
|
3627
|
-
type SingleKeySignerFromDerivationPathArgs = SingleKeySignerGenerateArgs & {
|
|
3628
|
-
path: string;
|
|
3629
|
-
mnemonic: string;
|
|
3630
|
-
};
|
|
3631
|
-
interface VerifySingleKeySignatureArgs {
|
|
3632
|
-
message: HexInput;
|
|
3633
|
-
signature: AnySignature;
|
|
3634
|
-
}
|
|
3635
3908
|
/**
|
|
3636
|
-
*
|
|
3637
|
-
* This extends a SingleKeyAccount by adding signing capabilities through a valid private key.
|
|
3638
|
-
* Currently, the only supported signature schemes are Ed25519 and Secp256k1.
|
|
3639
|
-
*
|
|
3640
|
-
* Note: Generating a signer instance does not create the account on-chain.
|
|
3909
|
+
* Type of API endpoint for request routing
|
|
3641
3910
|
*/
|
|
3642
|
-
declare
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
readonly accountAddress: AccountAddress;
|
|
3649
|
-
readonly signingScheme = SigningScheme.SingleKey;
|
|
3650
|
-
constructor(args: SingleKeySignerConstructorArgs);
|
|
3651
|
-
/**
|
|
3652
|
-
* Derives an account from a randomly generated private key.
|
|
3653
|
-
* Default generation is using an Ed25519 key
|
|
3654
|
-
* @returns Account with the given signature scheme
|
|
3655
|
-
*/
|
|
3656
|
-
static generate(args?: SingleKeySignerGenerateArgs): SingleKeyAccount;
|
|
3657
|
-
/**
|
|
3658
|
-
* Derives an account with bip44 path and mnemonics,
|
|
3659
|
-
* Default to using an Ed25519 signature scheme.
|
|
3660
|
-
*
|
|
3661
|
-
* @param args.scheme The signature scheme to derive the private key with
|
|
3662
|
-
* @param args.path the BIP44 derive hardened path (e.g. m/44'/637'/0'/0'/0') for Ed25519,
|
|
3663
|
-
* or non-hardened path (e.g. m/44'/637'/0'/0/0) for secp256k1
|
|
3664
|
-
* Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
|
|
3665
|
-
* @param args.mnemonic the mnemonic seed phrase of the account
|
|
3666
|
-
*/
|
|
3667
|
-
static fromDerivationPath(args: SingleKeySignerFromDerivationPathArgs): SingleKeyAccount;
|
|
3668
|
-
verifySignature(args: VerifySingleKeySignatureArgs): boolean;
|
|
3669
|
-
signWithAuthenticator(message: HexInput): AccountAuthenticatorSingleKey;
|
|
3670
|
-
sign(message: HexInput): AnySignature;
|
|
3911
|
+
declare enum AptosApiType {
|
|
3912
|
+
FULLNODE = "Fullnode",
|
|
3913
|
+
INDEXER = "Indexer",
|
|
3914
|
+
FAUCET = "Faucet",
|
|
3915
|
+
PEPPER = "Pepper",
|
|
3916
|
+
PROVER = "Prover"
|
|
3671
3917
|
}
|
|
3672
|
-
|
|
3673
3918
|
/**
|
|
3674
|
-
*
|
|
3675
|
-
*
|
|
3676
|
-
*
|
|
3919
|
+
* The default max gas amount when none is given.
|
|
3920
|
+
*
|
|
3921
|
+
* This is the maximum number of gas units that will be used by a transaction before being rejected.
|
|
3922
|
+
*
|
|
3923
|
+
* Note that max gas amount varies based on the transaction. A larger transaction will go over this
|
|
3924
|
+
* default gas amount, and the value will need to be changed for the specific transaction.
|
|
3677
3925
|
*/
|
|
3678
|
-
|
|
3679
|
-
privateKey: Ed25519PrivateKey;
|
|
3680
|
-
address?: AccountAddressInput;
|
|
3681
|
-
legacy?: true;
|
|
3682
|
-
}
|
|
3926
|
+
declare const DEFAULT_MAX_GAS_AMOUNT = 200000;
|
|
3683
3927
|
/**
|
|
3684
|
-
*
|
|
3685
|
-
*
|
|
3686
|
-
*
|
|
3928
|
+
* The default transaction expiration seconds from now.
|
|
3929
|
+
*
|
|
3930
|
+
* This time is how long until the blockchain nodes will reject the transaction.
|
|
3931
|
+
*
|
|
3932
|
+
* Note that the transaction expiration time varies based on network connection and network load. It may need to be
|
|
3933
|
+
* increased for the transaction to be processed.
|
|
3687
3934
|
*/
|
|
3688
|
-
|
|
3689
|
-
privateKey: Ed25519PrivateKey;
|
|
3690
|
-
address?: AccountAddressInput;
|
|
3691
|
-
legacy: false;
|
|
3692
|
-
}
|
|
3935
|
+
declare const DEFAULT_TXN_EXP_SEC_FROM_NOW = 20;
|
|
3693
3936
|
/**
|
|
3694
|
-
*
|
|
3695
|
-
*
|
|
3696
|
-
*
|
|
3937
|
+
* The default number of seconds to wait for a transaction to be processed.
|
|
3938
|
+
*
|
|
3939
|
+
* This time is the amount of time that the SDK will wait for a transaction to be processed when waiting for
|
|
3940
|
+
* the results of the transaction. It may take longer based on network connection and network load.
|
|
3697
3941
|
*/
|
|
3698
|
-
|
|
3699
|
-
privateKey: Exclude<PrivateKey, Ed25519PrivateKey>;
|
|
3700
|
-
address?: AccountAddressInput;
|
|
3701
|
-
legacy?: false;
|
|
3702
|
-
}
|
|
3942
|
+
declare const DEFAULT_TXN_TIMEOUT_SEC = 20;
|
|
3703
3943
|
/**
|
|
3704
|
-
*
|
|
3705
|
-
* This is used when the private key type is not known at compilation time.
|
|
3944
|
+
* The default gas currency for the network.
|
|
3706
3945
|
*/
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
legacy?: boolean;
|
|
3711
|
-
}
|
|
3712
|
-
/**
|
|
3713
|
-
* Arguments for generating an `Ed25519Account`.
|
|
3714
|
-
* This is the input type used by default.
|
|
3715
|
-
*/
|
|
3716
|
-
interface GenerateEd25519AccountArgs {
|
|
3717
|
-
scheme?: SigningSchemeInput.Ed25519;
|
|
3718
|
-
legacy?: true;
|
|
3719
|
-
}
|
|
3720
|
-
/**
|
|
3721
|
-
* Arguments for generating an `SingleKeyAccount` with ah underlying `Ed25519PrivateKey`.
|
|
3722
|
-
* The `legacy` argument needs to be explicitly set to false,
|
|
3723
|
-
* otherwise an `Ed25519Account` will be returned instead.
|
|
3724
|
-
*/
|
|
3725
|
-
interface GenerateEd25519SingleKeyAccountArgs {
|
|
3726
|
-
scheme?: SigningSchemeInput.Ed25519;
|
|
3727
|
-
legacy: false;
|
|
3728
|
-
}
|
|
3729
|
-
/**
|
|
3730
|
-
* Arguments for generating an `SingleKeyAccount` with any supported private key
|
|
3731
|
-
* that is not an `Ed25519PrivateKey`.
|
|
3732
|
-
* The `legacy` argument defaults to false and cannot be explicitly set to true.
|
|
3733
|
-
*/
|
|
3734
|
-
interface GenerateSingleKeyAccountArgs {
|
|
3735
|
-
scheme: Exclude<SigningSchemeInput, SigningSchemeInput.Ed25519>;
|
|
3736
|
-
legacy?: false;
|
|
3737
|
-
}
|
|
3738
|
-
/**
|
|
3739
|
-
* Arguments for generating an opaque `Account`.
|
|
3740
|
-
* This is used when the input signature scheme is not known at compilation time.
|
|
3741
|
-
*/
|
|
3742
|
-
interface GenerateAccountArgs {
|
|
3743
|
-
scheme?: SigningSchemeInput;
|
|
3744
|
-
legacy?: boolean;
|
|
3745
|
-
}
|
|
3746
|
-
/**
|
|
3747
|
-
* Arguments for deriving a private key from a mnemonic phrase and a BIP44 path.
|
|
3748
|
-
*/
|
|
3749
|
-
interface PrivateKeyFromDerivationPathArgs {
|
|
3750
|
-
path: string;
|
|
3751
|
-
mnemonic: string;
|
|
3752
|
-
}
|
|
3753
|
-
/**
|
|
3754
|
-
* Interface for a generic Aptos account.
|
|
3755
|
-
*
|
|
3756
|
-
* The interface is defined as abstract class to provide a single entrypoint for account generation,
|
|
3757
|
-
* either through `Account.generate()` or `Account.fromDerivationPath`.
|
|
3758
|
-
* Despite this being an abstract class, it should be treated as an interface and enforced using
|
|
3759
|
-
* the `implements` keyword.
|
|
3760
|
-
*
|
|
3761
|
-
* Note: Generating an account instance does not create the account on-chain.
|
|
3762
|
-
*/
|
|
3763
|
-
declare abstract class Account$1 {
|
|
3764
|
-
/**
|
|
3765
|
-
* Private key associated with the account.
|
|
3766
|
-
* Note: this will be removed in the next major release,
|
|
3767
|
-
* as not all accounts have a private key.
|
|
3768
|
-
*/
|
|
3769
|
-
abstract readonly privateKey: PrivateKey;
|
|
3770
|
-
/**
|
|
3771
|
-
* Public key associated with the account
|
|
3772
|
-
*/
|
|
3773
|
-
abstract readonly publicKey: AccountPublicKey;
|
|
3774
|
-
/**
|
|
3775
|
-
* Account address associated with the account
|
|
3776
|
-
*/
|
|
3777
|
-
abstract readonly accountAddress: AccountAddress;
|
|
3778
|
-
/**
|
|
3779
|
-
* Signing scheme used to sign transactions
|
|
3780
|
-
*/
|
|
3781
|
-
abstract signingScheme: SigningScheme;
|
|
3782
|
-
/**
|
|
3783
|
-
* Derives an account from a randomly generated private key.
|
|
3784
|
-
* @param args.scheme The signature scheme to use, to generate the private key
|
|
3785
|
-
* @param args.legacy Whether to use a legacy authentication scheme, when applicable
|
|
3786
|
-
* @returns An account compatible with the provided signature scheme
|
|
3787
|
-
*/
|
|
3788
|
-
static generate(args?: GenerateEd25519AccountArgs): Ed25519Account;
|
|
3789
|
-
static generate(args: GenerateEd25519SingleKeyAccountArgs): SingleKeyAccount;
|
|
3790
|
-
static generate(args: GenerateSingleKeyAccountArgs): SingleKeyAccount;
|
|
3791
|
-
static generate(args: GenerateAccountArgs): Account$1;
|
|
3792
|
-
/**
|
|
3793
|
-
* Creates an account from the provided private key.
|
|
3794
|
-
*
|
|
3795
|
-
* @param args.privateKey a valid private key
|
|
3796
|
-
* @param args.address the account's address. If not provided, it will be derived from the public key.
|
|
3797
|
-
* @param args.legacy Whether to use a legacy authentication scheme, when applicable
|
|
3798
|
-
*/
|
|
3799
|
-
static fromPrivateKey(args: CreateEd25519AccountFromPrivateKeyArgs): Ed25519Account;
|
|
3800
|
-
static fromPrivateKey(args: CreateEd25519SingleKeyAccountFromPrivateKeyArgs): SingleKeyAccount;
|
|
3801
|
-
static fromPrivateKey(args: CreateSingleKeyAccountFromPrivateKeyArgs): SingleKeyAccount;
|
|
3802
|
-
static fromPrivateKey(args: CreateAccountFromPrivateKeyArgs): Account$1;
|
|
3803
|
-
/**
|
|
3804
|
-
* @deprecated use `fromPrivateKey` instead.
|
|
3805
|
-
* Instantiates an account given a private key and a specified account address.
|
|
3806
|
-
* This is primarily used to instantiate an `Account` that has had its authentication key rotated.
|
|
3807
|
-
*
|
|
3808
|
-
* @param args.privateKey PrivateKey - the underlying private key for the account
|
|
3809
|
-
* @param args.address AccountAddress - The account address the `Account` will sign for
|
|
3810
|
-
* @param args.legacy optional. If set to false, the keypair generated is a Unified keypair. Defaults
|
|
3811
|
-
* to generating a Legacy Ed25519 keypair
|
|
3812
|
-
*
|
|
3813
|
-
* @returns Account
|
|
3814
|
-
*/
|
|
3815
|
-
static fromPrivateKeyAndAddress(args: CreateAccountFromPrivateKeyArgs): Account$1;
|
|
3816
|
-
/**
|
|
3817
|
-
* Derives an account with bip44 path and mnemonics
|
|
3818
|
-
*
|
|
3819
|
-
* @param args.scheme The signature scheme to derive the private key with
|
|
3820
|
-
* @param args.path the BIP44 derive hardened path (e.g. m/44'/637'/0'/0'/0') for Ed25519,
|
|
3821
|
-
* or non-hardened path (e.g. m/44'/637'/0'/0/0) for secp256k1
|
|
3822
|
-
* Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
|
|
3823
|
-
* @param args.mnemonic the mnemonic seed phrase of the account
|
|
3824
|
-
*/
|
|
3825
|
-
static fromDerivationPath(args: GenerateEd25519AccountArgs & PrivateKeyFromDerivationPathArgs): Ed25519Account;
|
|
3826
|
-
static fromDerivationPath(args: GenerateEd25519SingleKeyAccountArgs & PrivateKeyFromDerivationPathArgs): SingleKeyAccount;
|
|
3827
|
-
static fromDerivationPath(args: GenerateSingleKeyAccountArgs & PrivateKeyFromDerivationPathArgs): SingleKeyAccount;
|
|
3828
|
-
static fromDerivationPath(args: GenerateAccountArgs & PrivateKeyFromDerivationPathArgs): Account$1;
|
|
3829
|
-
/**
|
|
3830
|
-
* @deprecated use `publicKey.authKey()` instead.
|
|
3831
|
-
* This key enables account owners to rotate their private key(s)
|
|
3832
|
-
* associated with the account without changing the address that hosts their account.
|
|
3833
|
-
* See here for more info: {@link https://aptos.dev/concepts/accounts#single-signer-authentication}
|
|
3834
|
-
*
|
|
3835
|
-
* @param args.publicKey PublicKey - public key of the account
|
|
3836
|
-
* @returns The authentication key for the associated account
|
|
3837
|
-
*/
|
|
3838
|
-
static authKey(args: {
|
|
3839
|
-
publicKey: AccountPublicKey;
|
|
3840
|
-
}): AuthenticationKey;
|
|
3841
|
-
/**
|
|
3842
|
-
* Sign a message using the available signing capabilities.
|
|
3843
|
-
* @param message the signing message, as binary input
|
|
3844
|
-
* @return the AccountAuthenticator containing the signature, together with the account's public key
|
|
3845
|
-
*/
|
|
3846
|
-
abstract signWithAuthenticator(message: HexInput): AccountAuthenticator;
|
|
3847
|
-
/**
|
|
3848
|
-
* Sign the given message with the private key.
|
|
3849
|
-
* @param message in HexInput format
|
|
3850
|
-
* @returns AccountSignature
|
|
3851
|
-
*/
|
|
3852
|
-
abstract sign(message: HexInput): Signature;
|
|
3853
|
-
/**
|
|
3854
|
-
* @param args.message raw message data in HexInput format
|
|
3855
|
-
* @param args.signature signed message signature
|
|
3856
|
-
*/
|
|
3857
|
-
verifySignature(args: VerifySignatureArgs): boolean;
|
|
3858
|
-
}
|
|
3859
|
-
|
|
3860
|
-
interface Ed25519SignerConstructorArgs {
|
|
3861
|
-
privateKey: Ed25519PrivateKey;
|
|
3862
|
-
address?: AccountAddressInput;
|
|
3863
|
-
}
|
|
3864
|
-
interface Ed25519SignerFromDerivationPathArgs {
|
|
3865
|
-
path: string;
|
|
3866
|
-
mnemonic: string;
|
|
3867
|
-
}
|
|
3868
|
-
interface VerifyEd25519SignatureArgs {
|
|
3869
|
-
message: HexInput;
|
|
3870
|
-
signature: Ed25519Signature;
|
|
3871
|
-
}
|
|
3872
|
-
/**
|
|
3873
|
-
* Signer implementation for the Ed25519 authentication scheme.
|
|
3874
|
-
* This extends an {@link Ed25519Account} by adding signing capabilities through an {@link Ed25519PrivateKey}.
|
|
3875
|
-
*
|
|
3876
|
-
* Note: Generating a signer instance does not create the account on-chain.
|
|
3877
|
-
*/
|
|
3878
|
-
declare class Ed25519Account implements Account$1 {
|
|
3879
|
-
/**
|
|
3880
|
-
* Private key associated with the account
|
|
3881
|
-
*/
|
|
3882
|
-
readonly privateKey: Ed25519PrivateKey;
|
|
3883
|
-
readonly publicKey: Ed25519PublicKey;
|
|
3884
|
-
readonly accountAddress: AccountAddress;
|
|
3885
|
-
readonly signingScheme = SigningScheme.Ed25519;
|
|
3886
|
-
constructor(args: Ed25519SignerConstructorArgs);
|
|
3887
|
-
/**
|
|
3888
|
-
* Derives a signer from a randomly generated private key
|
|
3889
|
-
*/
|
|
3890
|
-
static generate(): Ed25519Account;
|
|
3891
|
-
/**
|
|
3892
|
-
* Derives an account with bip44 path and mnemonics
|
|
3893
|
-
*
|
|
3894
|
-
* @param args.path the BIP44 derive hardened path e.g. m/44'/637'/0'/0'/0'
|
|
3895
|
-
* Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
|
|
3896
|
-
* @param args.mnemonic the mnemonic seed phrase of the account
|
|
3897
|
-
*/
|
|
3898
|
-
static fromDerivationPath(args: Ed25519SignerFromDerivationPathArgs): Ed25519Account;
|
|
3899
|
-
verifySignature(args: VerifyEd25519SignatureArgs): boolean;
|
|
3900
|
-
signWithAuthenticator(message: HexInput): AccountAuthenticatorEd25519;
|
|
3901
|
-
sign(message: HexInput): Ed25519Signature;
|
|
3902
|
-
}
|
|
3903
|
-
|
|
3904
|
-
/**
|
|
3905
|
-
* Creates an object address from creator address and seed
|
|
3906
|
-
*
|
|
3907
|
-
* @param creatorAddress The object creator account address
|
|
3908
|
-
* @param seed The seed in either Uint8Array | string type
|
|
3909
|
-
*
|
|
3910
|
-
* @returns The object account address
|
|
3911
|
-
*/
|
|
3912
|
-
declare const createObjectAddress: (creatorAddress: AccountAddress, seed: Uint8Array | string) => AccountAddress;
|
|
3913
|
-
/**
|
|
3914
|
-
* Creates an resource address from creator address and seed
|
|
3915
|
-
*
|
|
3916
|
-
* @param creatorAddress The creator account address
|
|
3917
|
-
* @param seed The seed in either Uint8Array | string type
|
|
3918
|
-
*
|
|
3919
|
-
* @returns The resource account address
|
|
3920
|
-
*/
|
|
3921
|
-
declare const createResourceAddress: (creatorAddress: AccountAddress, seed: Uint8Array | string) => AccountAddress;
|
|
3922
|
-
/**
|
|
3923
|
-
* Creates a token object address from creator address, collection name and token name
|
|
3924
|
-
*
|
|
3925
|
-
* @param creatorAddress The token creator account address
|
|
3926
|
-
* @param collectionName The collection name
|
|
3927
|
-
* @param tokenName The token name
|
|
3928
|
-
*
|
|
3929
|
-
* @returns The token account address
|
|
3930
|
-
*/
|
|
3931
|
-
declare const createTokenAddress: (creatorAddress: AccountAddress, collectionName: string, tokenName: string) => AccountAddress;
|
|
3932
|
-
|
|
3933
|
-
/**
|
|
3934
|
-
* Type of API endpoint for request routing
|
|
3935
|
-
*/
|
|
3936
|
-
declare enum AptosApiType {
|
|
3937
|
-
FULLNODE = "Fullnode",
|
|
3938
|
-
INDEXER = "Indexer",
|
|
3939
|
-
FAUCET = "Faucet"
|
|
3940
|
-
}
|
|
3941
|
-
/**
|
|
3942
|
-
* The default max gas amount when none is given.
|
|
3943
|
-
*
|
|
3944
|
-
* This is the maximum number of gas units that will be used by a transaction before being rejected.
|
|
3945
|
-
*
|
|
3946
|
-
* Note that max gas amount varies based on the transaction. A larger transaction will go over this
|
|
3947
|
-
* default gas amount, and the value will need to be changed for the specific transaction.
|
|
3948
|
-
*/
|
|
3949
|
-
declare const DEFAULT_MAX_GAS_AMOUNT = 200000;
|
|
3950
|
-
/**
|
|
3951
|
-
* The default transaction expiration seconds from now.
|
|
3952
|
-
*
|
|
3953
|
-
* This time is how long until the blockchain nodes will reject the transaction.
|
|
3954
|
-
*
|
|
3955
|
-
* Note that the transaction expiration time varies based on network connection and network load. It may need to be
|
|
3956
|
-
* increased for the transaction to be processed.
|
|
3957
|
-
*/
|
|
3958
|
-
declare const DEFAULT_TXN_EXP_SEC_FROM_NOW = 20;
|
|
3959
|
-
/**
|
|
3960
|
-
* The default number of seconds to wait for a transaction to be processed.
|
|
3961
|
-
*
|
|
3962
|
-
* This time is the amount of time that the SDK will wait for a transaction to be processed when waiting for
|
|
3963
|
-
* the results of the transaction. It may take longer based on network connection and network load.
|
|
3964
|
-
*/
|
|
3965
|
-
declare const DEFAULT_TXN_TIMEOUT_SEC = 20;
|
|
3966
|
-
/**
|
|
3967
|
-
* The default gas currency for the network.
|
|
3968
|
-
*/
|
|
3969
|
-
declare const APTOS_COIN = "0x1::aptos_coin::AptosCoin";
|
|
3970
|
-
declare const RAW_TRANSACTION_SALT = "APTOS::RawTransaction";
|
|
3971
|
-
declare const RAW_TRANSACTION_WITH_DATA_SALT = "APTOS::RawTransactionWithData";
|
|
3946
|
+
declare const APTOS_COIN = "0x1::aptos_coin::AptosCoin";
|
|
3947
|
+
declare const RAW_TRANSACTION_SALT = "RawTransaction";
|
|
3948
|
+
declare const RAW_TRANSACTION_WITH_DATA_SALT = "RawTransactionWithData";
|
|
3972
3949
|
/**
|
|
3973
3950
|
* The list of supported Processor types for our indexer api.
|
|
3974
3951
|
*
|
|
@@ -3987,6 +3964,10 @@ declare enum ProcessorType {
|
|
|
3987
3964
|
|
|
3988
3965
|
/**
|
|
3989
3966
|
* This class holds the config information for the SDK client instance.
|
|
3967
|
+
*
|
|
3968
|
+
* @example
|
|
3969
|
+
*
|
|
3970
|
+
* const aptosConfig = new AptosConfig({network:Network.TESTNET})
|
|
3990
3971
|
*/
|
|
3991
3972
|
declare class AptosConfig {
|
|
3992
3973
|
/**
|
|
@@ -4005,6 +3986,14 @@ declare class AptosConfig {
|
|
|
4005
3986
|
* The optional hardcoded faucet URL to send requests to instead of using the network
|
|
4006
3987
|
*/
|
|
4007
3988
|
readonly faucet?: string;
|
|
3989
|
+
/**
|
|
3990
|
+
* The optional hardcoded pepper service URL to send requests to instead of using the network
|
|
3991
|
+
*/
|
|
3992
|
+
readonly pepper?: string;
|
|
3993
|
+
/**
|
|
3994
|
+
* The optional hardcoded prover service URL to send requests to instead of using the network
|
|
3995
|
+
*/
|
|
3996
|
+
readonly prover?: string;
|
|
4008
3997
|
/**
|
|
4009
3998
|
* The optional hardcoded indexer URL to send requests to instead of using the network
|
|
4010
3999
|
*/
|
|
@@ -4037,1115 +4026,1582 @@ declare class AptosConfig {
|
|
|
4037
4026
|
* @internal
|
|
4038
4027
|
*/
|
|
4039
4028
|
getRequestUrl(apiType: AptosApiType): string;
|
|
4029
|
+
/**
|
|
4030
|
+
* Checks if the URL is a known pepper service endpoint
|
|
4031
|
+
*
|
|
4032
|
+
* @internal
|
|
4033
|
+
* */
|
|
4034
|
+
isPepperServiceRequest(url: string): boolean;
|
|
4035
|
+
/**
|
|
4036
|
+
* Checks if the URL is a known prover service endpoint
|
|
4037
|
+
*
|
|
4038
|
+
* @internal
|
|
4039
|
+
* */
|
|
4040
|
+
isProverServiceRequest(url: string): boolean;
|
|
4040
4041
|
}
|
|
4041
4042
|
|
|
4042
4043
|
/**
|
|
4043
|
-
*
|
|
4044
|
+
* Representation of a ChainId that can serialized and deserialized
|
|
4044
4045
|
*/
|
|
4045
|
-
declare class
|
|
4046
|
-
readonly
|
|
4047
|
-
constructor(
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4046
|
+
declare class ChainId extends Serializable {
|
|
4047
|
+
readonly chainId: number;
|
|
4048
|
+
constructor(chainId: number);
|
|
4049
|
+
serialize(serializer: Serializer): void;
|
|
4050
|
+
static deserialize(deserializer: Deserializer): ChainId;
|
|
4051
|
+
}
|
|
4052
|
+
|
|
4053
|
+
/**
|
|
4054
|
+
* Representation of an Identifier that can serialized and deserialized.
|
|
4055
|
+
* We use Identifier to represent the module "name" in "ModuleId" and
|
|
4056
|
+
* the "function name" in "EntryFunction"
|
|
4057
|
+
*/
|
|
4058
|
+
declare class Identifier extends Serializable {
|
|
4059
|
+
identifier: string;
|
|
4060
|
+
constructor(identifier: string);
|
|
4061
|
+
serialize(serializer: Serializer): void;
|
|
4062
|
+
static deserialize(deserializer: Deserializer): Identifier;
|
|
4063
|
+
}
|
|
4064
|
+
|
|
4065
|
+
/**
|
|
4066
|
+
* Representation of a ModuleId that can serialized and deserialized
|
|
4067
|
+
* ModuleId means the module address (e.g "0x1") and the module name (e.g "coin")
|
|
4068
|
+
*/
|
|
4069
|
+
declare class ModuleId extends Serializable {
|
|
4070
|
+
readonly address: AccountAddress;
|
|
4071
|
+
readonly name: Identifier;
|
|
4072
|
+
/**
|
|
4073
|
+
* Full name of a module.
|
|
4074
|
+
* @param address The account address. e.g "0x1"
|
|
4075
|
+
* @param name The module name under the "address". e.g "coin"
|
|
4076
|
+
*/
|
|
4077
|
+
constructor(address: AccountAddress, name: Identifier);
|
|
4078
|
+
/**
|
|
4079
|
+
* Converts a string literal to a ModuleId
|
|
4080
|
+
* @param moduleId String literal in format "account_address::module_name", e.g. "0x1::coin"
|
|
4081
|
+
* @returns ModuleId
|
|
4082
|
+
*/
|
|
4083
|
+
static fromStr(moduleId: MoveModuleId): ModuleId;
|
|
4084
|
+
serialize(serializer: Serializer): void;
|
|
4085
|
+
static deserialize(deserializer: Deserializer): ModuleId;
|
|
4086
|
+
}
|
|
4087
|
+
|
|
4088
|
+
declare abstract class TypeTag extends Serializable {
|
|
4089
|
+
abstract serialize(serializer: Serializer): void;
|
|
4090
|
+
static deserialize(deserializer: Deserializer): TypeTag;
|
|
4091
|
+
abstract toString(): string;
|
|
4092
|
+
isBool(): this is TypeTagBool;
|
|
4093
|
+
isAddress(): this is TypeTagAddress;
|
|
4094
|
+
isGeneric(): this is TypeTagGeneric;
|
|
4095
|
+
isSigner(): this is TypeTagSigner;
|
|
4096
|
+
isVector(): this is TypeTagVector;
|
|
4097
|
+
isStruct(): this is TypeTagStruct;
|
|
4098
|
+
isU8(): this is TypeTagU8;
|
|
4099
|
+
isU16(): this is TypeTagU16;
|
|
4100
|
+
isU32(): this is TypeTagU32;
|
|
4101
|
+
isU64(): this is TypeTagU64;
|
|
4102
|
+
isU128(): this is TypeTagU128;
|
|
4103
|
+
isU256(): this is TypeTagU256;
|
|
4104
|
+
}
|
|
4105
|
+
declare class TypeTagBool extends TypeTag {
|
|
4106
|
+
toString(): string;
|
|
4107
|
+
serialize(serializer: Serializer): void;
|
|
4108
|
+
static load(_deserializer: Deserializer): TypeTagBool;
|
|
4109
|
+
}
|
|
4110
|
+
declare class TypeTagU8 extends TypeTag {
|
|
4111
|
+
toString(): string;
|
|
4112
|
+
serialize(serializer: Serializer): void;
|
|
4113
|
+
static load(_deserializer: Deserializer): TypeTagU8;
|
|
4114
|
+
}
|
|
4115
|
+
declare class TypeTagU16 extends TypeTag {
|
|
4116
|
+
toString(): string;
|
|
4117
|
+
serialize(serializer: Serializer): void;
|
|
4118
|
+
static load(_deserializer: Deserializer): TypeTagU16;
|
|
4119
|
+
}
|
|
4120
|
+
declare class TypeTagU32 extends TypeTag {
|
|
4121
|
+
toString(): string;
|
|
4122
|
+
serialize(serializer: Serializer): void;
|
|
4123
|
+
static load(_deserializer: Deserializer): TypeTagU32;
|
|
4124
|
+
}
|
|
4125
|
+
declare class TypeTagU64 extends TypeTag {
|
|
4126
|
+
toString(): string;
|
|
4127
|
+
serialize(serializer: Serializer): void;
|
|
4128
|
+
static load(_deserializer: Deserializer): TypeTagU64;
|
|
4129
|
+
}
|
|
4130
|
+
declare class TypeTagU128 extends TypeTag {
|
|
4131
|
+
toString(): string;
|
|
4132
|
+
serialize(serializer: Serializer): void;
|
|
4133
|
+
static load(_deserializer: Deserializer): TypeTagU128;
|
|
4134
|
+
}
|
|
4135
|
+
declare class TypeTagU256 extends TypeTag {
|
|
4136
|
+
toString(): string;
|
|
4137
|
+
serialize(serializer: Serializer): void;
|
|
4138
|
+
static load(_deserializer: Deserializer): TypeTagU256;
|
|
4139
|
+
}
|
|
4140
|
+
declare class TypeTagAddress extends TypeTag {
|
|
4141
|
+
toString(): string;
|
|
4142
|
+
serialize(serializer: Serializer): void;
|
|
4143
|
+
static load(_deserializer: Deserializer): TypeTagAddress;
|
|
4144
|
+
}
|
|
4145
|
+
declare class TypeTagSigner extends TypeTag {
|
|
4146
|
+
toString(): string;
|
|
4147
|
+
serialize(serializer: Serializer): void;
|
|
4148
|
+
static load(_deserializer: Deserializer): TypeTagSigner;
|
|
4149
|
+
}
|
|
4150
|
+
declare class TypeTagReference extends TypeTag {
|
|
4151
|
+
readonly value: TypeTag;
|
|
4152
|
+
toString(): `&${string}`;
|
|
4153
|
+
constructor(value: TypeTag);
|
|
4154
|
+
serialize(serializer: Serializer): void;
|
|
4155
|
+
static load(deserializer: Deserializer): TypeTagReference;
|
|
4156
|
+
}
|
|
4157
|
+
/**
|
|
4158
|
+
* Generics are used for type parameters in entry functions. However,
|
|
4159
|
+
* they are not actually serialized into a real type, so they cannot be
|
|
4160
|
+
* used as a type directly.
|
|
4161
|
+
*/
|
|
4162
|
+
declare class TypeTagGeneric extends TypeTag {
|
|
4163
|
+
readonly value: number;
|
|
4164
|
+
toString(): `T${number}`;
|
|
4165
|
+
constructor(value: number);
|
|
4166
|
+
serialize(serializer: Serializer): void;
|
|
4167
|
+
static load(deserializer: Deserializer): TypeTagGeneric;
|
|
4168
|
+
}
|
|
4169
|
+
declare class TypeTagVector extends TypeTag {
|
|
4170
|
+
readonly value: TypeTag;
|
|
4171
|
+
toString(): `vector<${string}>`;
|
|
4172
|
+
constructor(value: TypeTag);
|
|
4173
|
+
static u8(): TypeTagVector;
|
|
4174
|
+
serialize(serializer: Serializer): void;
|
|
4175
|
+
static load(deserializer: Deserializer): TypeTagVector;
|
|
4176
|
+
}
|
|
4177
|
+
declare class TypeTagStruct extends TypeTag {
|
|
4178
|
+
readonly value: StructTag;
|
|
4179
|
+
toString(): `0x${string}::${string}::${string}`;
|
|
4180
|
+
constructor(value: StructTag);
|
|
4181
|
+
serialize(serializer: Serializer): void;
|
|
4182
|
+
static load(deserializer: Deserializer): TypeTagStruct;
|
|
4183
|
+
isTypeTag(address: AccountAddress, moduleName: string, structName: string): boolean;
|
|
4184
|
+
isString(): boolean;
|
|
4185
|
+
isOption(): boolean;
|
|
4186
|
+
isObject(): boolean;
|
|
4187
|
+
}
|
|
4188
|
+
declare class StructTag extends Serializable {
|
|
4189
|
+
readonly address: AccountAddress;
|
|
4190
|
+
readonly moduleName: Identifier;
|
|
4191
|
+
readonly name: Identifier;
|
|
4192
|
+
readonly typeArgs: Array<TypeTag>;
|
|
4193
|
+
constructor(address: AccountAddress, module_name: Identifier, name: Identifier, type_args: Array<TypeTag>);
|
|
4194
|
+
serialize(serializer: Serializer): void;
|
|
4195
|
+
static deserialize(deserializer: Deserializer): StructTag;
|
|
4196
|
+
}
|
|
4197
|
+
declare function aptosCoinStructTag(): StructTag;
|
|
4198
|
+
declare function stringStructTag(): StructTag;
|
|
4199
|
+
declare function optionStructTag(typeArg: TypeTag): StructTag;
|
|
4200
|
+
declare function objectStructTag(typeArg: TypeTag): StructTag;
|
|
4201
|
+
|
|
4202
|
+
/**
|
|
4203
|
+
* Deserialize a Script Transaction Argument
|
|
4204
|
+
*/
|
|
4205
|
+
declare function deserializeFromScriptArgument(deserializer: Deserializer): TransactionArgument;
|
|
4206
|
+
/**
|
|
4207
|
+
* Representation of the supported Transaction Payload
|
|
4208
|
+
* that can serialized and deserialized
|
|
4209
|
+
*/
|
|
4210
|
+
declare abstract class TransactionPayload extends Serializable {
|
|
4211
|
+
/**
|
|
4212
|
+
* Serialize a Transaction Payload
|
|
4213
|
+
*/
|
|
4214
|
+
abstract serialize(serializer: Serializer): void;
|
|
4215
|
+
/**
|
|
4216
|
+
* Deserialize a Transaction Payload
|
|
4217
|
+
*/
|
|
4218
|
+
static deserialize(deserializer: Deserializer): TransactionPayload;
|
|
4219
|
+
}
|
|
4220
|
+
/**
|
|
4221
|
+
* Representation of a Transaction Payload Script that can serialized and deserialized
|
|
4222
|
+
*/
|
|
4223
|
+
declare class TransactionPayloadScript extends TransactionPayload {
|
|
4224
|
+
readonly script: Script;
|
|
4225
|
+
constructor(script: Script);
|
|
4226
|
+
serialize(serializer: Serializer): void;
|
|
4227
|
+
static load(deserializer: Deserializer): TransactionPayloadScript;
|
|
4228
|
+
}
|
|
4229
|
+
/**
|
|
4230
|
+
* Representation of a Transaction Payload Entry Function that can serialized and deserialized
|
|
4231
|
+
*/
|
|
4232
|
+
declare class TransactionPayloadEntryFunction extends TransactionPayload {
|
|
4233
|
+
readonly entryFunction: EntryFunction;
|
|
4234
|
+
constructor(entryFunction: EntryFunction);
|
|
4235
|
+
serialize(serializer: Serializer): void;
|
|
4236
|
+
static load(deserializer: Deserializer): TransactionPayloadEntryFunction;
|
|
4237
|
+
}
|
|
4238
|
+
/**
|
|
4239
|
+
* Representation of a Transaction Payload Multi-sig that can serialized and deserialized
|
|
4240
|
+
*/
|
|
4241
|
+
declare class TransactionPayloadMultiSig extends TransactionPayload {
|
|
4242
|
+
readonly multiSig: MultiSig;
|
|
4243
|
+
constructor(multiSig: MultiSig);
|
|
4244
|
+
serialize(serializer: Serializer): void;
|
|
4245
|
+
static load(deserializer: Deserializer): TransactionPayloadMultiSig;
|
|
4246
|
+
}
|
|
4247
|
+
/**
|
|
4248
|
+
* Representation of a EntryFunction that can serialized and deserialized
|
|
4249
|
+
*/
|
|
4250
|
+
declare class EntryFunction {
|
|
4251
|
+
readonly module_name: ModuleId;
|
|
4252
|
+
readonly function_name: Identifier;
|
|
4253
|
+
readonly type_args: Array<TypeTag>;
|
|
4254
|
+
readonly args: Array<EntryFunctionArgument>;
|
|
4255
|
+
/**
|
|
4256
|
+
* Contains the payload to run a function within a module.
|
|
4257
|
+
* @param module_name Fully qualified module name in format "account_address::module_name" e.g. "0x1::coin"
|
|
4258
|
+
* @param function_name The function name. e.g "transfer"
|
|
4259
|
+
* @param type_args Type arguments that move function requires.
|
|
4260
|
+
*
|
|
4261
|
+
* @example
|
|
4262
|
+
* A coin transfer function has one type argument "CoinType".
|
|
4263
|
+
* ```
|
|
4264
|
+
* public entry fun transfer<CoinType>(from: &signer, to: address, amount: u64)
|
|
4265
|
+
* ```
|
|
4266
|
+
* @param args arguments to the move function.
|
|
4267
|
+
*
|
|
4268
|
+
* @example
|
|
4269
|
+
* A coin transfer function has three arguments "from", "to" and "amount".
|
|
4270
|
+
* ```
|
|
4271
|
+
* public entry fun transfer<CoinType>(from: &signer, to: address, amount: u64)
|
|
4061
4272
|
* ```
|
|
4062
4273
|
*/
|
|
4063
|
-
|
|
4064
|
-
accountAddress: AccountAddressInput;
|
|
4065
|
-
}): Promise<AccountData>;
|
|
4274
|
+
constructor(module_name: ModuleId, function_name: Identifier, type_args: Array<TypeTag>, args: Array<EntryFunctionArgument>);
|
|
4066
4275
|
/**
|
|
4067
|
-
*
|
|
4276
|
+
* A helper function to build a EntryFunction payload from raw primitive values
|
|
4068
4277
|
*
|
|
4069
|
-
*
|
|
4070
|
-
*
|
|
4278
|
+
* @param module_id Fully qualified module name in format "AccountAddress::module_id" e.g. "0x1::coin"
|
|
4279
|
+
* @param function_name Function name
|
|
4280
|
+
* @param type_args Type arguments that move function requires.
|
|
4071
4281
|
*
|
|
4072
|
-
* @
|
|
4073
|
-
*
|
|
4074
|
-
*
|
|
4075
|
-
*
|
|
4282
|
+
* @example
|
|
4283
|
+
* A coin transfer function has one type argument "CoinType".
|
|
4284
|
+
* ```
|
|
4285
|
+
* public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
|
|
4286
|
+
* ```
|
|
4287
|
+
* @param args Arguments to the move function.
|
|
4076
4288
|
*
|
|
4077
|
-
* @
|
|
4289
|
+
* @example
|
|
4290
|
+
* A coin transfer function has three arguments "from", "to" and "amount".
|
|
4291
|
+
* ```
|
|
4292
|
+
* public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
|
|
4293
|
+
* ```
|
|
4294
|
+
* @returns EntryFunction
|
|
4078
4295
|
*/
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
options?: PaginationArgs & LedgerVersionArg;
|
|
4082
|
-
}): Promise<MoveModuleBytecode[]>;
|
|
4296
|
+
static build(module_id: MoveModuleId, function_name: string, type_args: Array<TypeTag>, args: Array<EntryFunctionArgument>): EntryFunction;
|
|
4297
|
+
serialize(serializer: Serializer): void;
|
|
4083
4298
|
/**
|
|
4084
|
-
*
|
|
4299
|
+
* Deserializes an entry function payload with the arguments represented as EntryFunctionBytes instances.
|
|
4300
|
+
* @see EntryFunctionBytes
|
|
4085
4301
|
*
|
|
4086
|
-
*
|
|
4087
|
-
*
|
|
4088
|
-
*
|
|
4302
|
+
* NOTE: When you deserialize an EntryFunction payload with this method, the entry function
|
|
4303
|
+
* arguments are populated into the deserialized instance as type-agnostic, raw fixed bytes
|
|
4304
|
+
* in the form of the EntryFunctionBytes class.
|
|
4089
4305
|
*
|
|
4090
|
-
*
|
|
4306
|
+
* In order to correctly deserialize these arguments as their actual type representations, you
|
|
4307
|
+
* must know the types of the arguments beforehand and deserialize them yourself individually.
|
|
4308
|
+
*
|
|
4309
|
+
* One way you could achieve this is by using the ABIs for an entry function and deserializing each
|
|
4310
|
+
* argument as its given, corresponding type.
|
|
4091
4311
|
*
|
|
4092
|
-
* @
|
|
4312
|
+
* @param deserializer
|
|
4313
|
+
* @returns A deserialized EntryFunction payload for a transaction.
|
|
4314
|
+
*
|
|
4315
|
+
*/
|
|
4316
|
+
static deserialize(deserializer: Deserializer): EntryFunction;
|
|
4317
|
+
}
|
|
4318
|
+
/**
|
|
4319
|
+
* Representation of a Script that can serialized and deserialized
|
|
4320
|
+
*/
|
|
4321
|
+
declare class Script {
|
|
4322
|
+
/**
|
|
4323
|
+
* The move module bytecode
|
|
4324
|
+
*/
|
|
4325
|
+
readonly bytecode: Uint8Array;
|
|
4326
|
+
/**
|
|
4327
|
+
* The type arguments that the bytecode function requires.
|
|
4328
|
+
*/
|
|
4329
|
+
readonly type_args: Array<TypeTag>;
|
|
4330
|
+
/**
|
|
4331
|
+
* The arguments that the bytecode function requires.
|
|
4332
|
+
*/
|
|
4333
|
+
readonly args: Array<ScriptFunctionArgument>;
|
|
4334
|
+
/**
|
|
4335
|
+
* Scripts contain the Move bytecodes payload that can be submitted to Aptos chain for execution.
|
|
4336
|
+
*
|
|
4337
|
+
* @param bytecode The move module bytecode
|
|
4338
|
+
* @param type_args The type arguments that the bytecode function requires.
|
|
4339
|
+
*
|
|
4340
|
+
* @example
|
|
4341
|
+
* A coin transfer function has one type argument "CoinType".
|
|
4093
4342
|
* ```
|
|
4094
|
-
*
|
|
4095
|
-
*
|
|
4096
|
-
*
|
|
4097
|
-
*
|
|
4343
|
+
* public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
|
|
4344
|
+
* ```
|
|
4345
|
+
* @param args The arguments that the bytecode function requires.
|
|
4346
|
+
*
|
|
4347
|
+
* @example
|
|
4348
|
+
* A coin transfer function has three arguments "from", "to" and "amount".
|
|
4349
|
+
* ```
|
|
4350
|
+
* public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
|
|
4098
4351
|
* ```
|
|
4099
4352
|
*/
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4353
|
+
constructor(bytecode: Uint8Array, type_args: Array<TypeTag>, args: Array<ScriptFunctionArgument>);
|
|
4354
|
+
serialize(serializer: Serializer): void;
|
|
4355
|
+
static deserialize(deserializer: Deserializer): Script;
|
|
4356
|
+
}
|
|
4357
|
+
/**
|
|
4358
|
+
* Representation of a MultiSig that can serialized and deserialized
|
|
4359
|
+
*/
|
|
4360
|
+
declare class MultiSig {
|
|
4361
|
+
readonly multisig_address: AccountAddress;
|
|
4362
|
+
readonly transaction_payload?: MultiSigTransactionPayload;
|
|
4105
4363
|
/**
|
|
4106
|
-
*
|
|
4364
|
+
* Contains the payload to run a multi-sig account transaction.
|
|
4107
4365
|
*
|
|
4108
|
-
*
|
|
4109
|
-
* multiple times as it auto paginates.
|
|
4366
|
+
* @param multisig_address The multi-sig account address the transaction will be executed as.
|
|
4110
4367
|
*
|
|
4111
|
-
* @param
|
|
4112
|
-
*
|
|
4113
|
-
|
|
4368
|
+
* @param transaction_payload The payload of the multi-sig transaction. This is optional when executing a multi-sig
|
|
4369
|
+
* transaction whose payload is already stored on chain.
|
|
4370
|
+
*/
|
|
4371
|
+
constructor(multisig_address: AccountAddress, transaction_payload?: MultiSigTransactionPayload);
|
|
4372
|
+
serialize(serializer: Serializer): void;
|
|
4373
|
+
static deserialize(deserializer: Deserializer): MultiSig;
|
|
4374
|
+
}
|
|
4375
|
+
/**
|
|
4376
|
+
* Representation of a MultiSig Transaction Payload from `multisig_account.move`
|
|
4377
|
+
* that can be serialized and deserialized
|
|
4378
|
+
|
|
4379
|
+
* This class exists right now to represent an extensible transaction payload class for
|
|
4380
|
+
* transactions used in `multisig_account.move`. Eventually, this class will be able to
|
|
4381
|
+
* support script payloads when the `multisig_account.move` module supports them.
|
|
4382
|
+
*/
|
|
4383
|
+
declare class MultiSigTransactionPayload extends Serializable {
|
|
4384
|
+
readonly transaction_payload: EntryFunction;
|
|
4385
|
+
/**
|
|
4386
|
+
* Contains the payload to run a multi-sig account transaction.
|
|
4114
4387
|
*
|
|
4115
|
-
* @
|
|
4388
|
+
* @param transaction_payload The payload of the multi-sig transaction.
|
|
4389
|
+
* This can only be EntryFunction for now but,
|
|
4390
|
+
* Script might be supported in the future.
|
|
4391
|
+
*/
|
|
4392
|
+
constructor(transaction_payload: EntryFunction);
|
|
4393
|
+
serialize(serializer: Serializer): void;
|
|
4394
|
+
static deserialize(deserializer: Deserializer): MultiSigTransactionPayload;
|
|
4395
|
+
}
|
|
4396
|
+
|
|
4397
|
+
/**
|
|
4398
|
+
* Representation of a Raw Transaction that can serialized and deserialized
|
|
4399
|
+
*/
|
|
4400
|
+
declare class RawTransaction extends Serializable {
|
|
4401
|
+
readonly sender: AccountAddress;
|
|
4402
|
+
readonly sequence_number: bigint;
|
|
4403
|
+
readonly payload: TransactionPayload;
|
|
4404
|
+
readonly max_gas_amount: bigint;
|
|
4405
|
+
readonly gas_unit_price: bigint;
|
|
4406
|
+
readonly expiration_timestamp_secs: bigint;
|
|
4407
|
+
readonly chain_id: ChainId;
|
|
4408
|
+
/**
|
|
4409
|
+
* RawTransactions contain the metadata and payloads that can be submitted to Aptos chain for execution.
|
|
4410
|
+
* RawTransactions must be signed before Aptos chain can execute them.
|
|
4411
|
+
*
|
|
4412
|
+
* @param sender The sender Account Address
|
|
4413
|
+
* @param sequence_number Sequence number of this transaction. This must match the sequence number stored in
|
|
4414
|
+
* the sender's account at the time the transaction executes.
|
|
4415
|
+
* @param payload Instructions for the Aptos Blockchain, including publishing a module,
|
|
4416
|
+
* execute an entry function or execute a script payload.
|
|
4417
|
+
* @param max_gas_amount Maximum total gas to spend for this transaction. The account must have more
|
|
4418
|
+
* than this gas or the transaction will be discarded during validation.
|
|
4419
|
+
* @param gas_unit_price Price to be paid per gas unit.
|
|
4420
|
+
* @param expiration_timestamp_secs The blockchain timestamp at which the blockchain would discard this transaction.
|
|
4421
|
+
* @param chain_id The chain ID of the blockchain that this transaction is intended to be run on.
|
|
4116
4422
|
*/
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4423
|
+
constructor(sender: AccountAddress, sequence_number: bigint, payload: TransactionPayload, max_gas_amount: bigint, gas_unit_price: bigint, expiration_timestamp_secs: bigint, chain_id: ChainId);
|
|
4424
|
+
serialize(serializer: Serializer): void;
|
|
4425
|
+
static deserialize(deserializer: Deserializer): RawTransaction;
|
|
4426
|
+
}
|
|
4427
|
+
/**
|
|
4428
|
+
* Representation of a Raw Transaction With Data that can serialized and deserialized
|
|
4429
|
+
*/
|
|
4430
|
+
declare abstract class RawTransactionWithData extends Serializable {
|
|
4121
4431
|
/**
|
|
4122
|
-
*
|
|
4123
|
-
*
|
|
4124
|
-
* Note: In order to get all account resources, this function may call the API
|
|
4125
|
-
* multiple times as it auto paginates.
|
|
4126
|
-
*
|
|
4127
|
-
* @param args.accountAddress Aptos account address
|
|
4128
|
-
* @param args.options.offset The number resource to start returning results from
|
|
4129
|
-
* @param args.options.limit The number of results to return
|
|
4130
|
-
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
4131
|
-
* @returns Account resources
|
|
4432
|
+
* Serialize a Raw Transaction With Data
|
|
4132
4433
|
*/
|
|
4133
|
-
|
|
4134
|
-
accountAddress: AccountAddressInput;
|
|
4135
|
-
options?: PaginationArgs & LedgerVersionArg;
|
|
4136
|
-
}): Promise<MoveResource[]>;
|
|
4434
|
+
abstract serialize(serializer: Serializer): void;
|
|
4137
4435
|
/**
|
|
4138
|
-
*
|
|
4139
|
-
* to allow for ease of accessing properties of the object.
|
|
4140
|
-
*
|
|
4141
|
-
* @type The typed output of the resource
|
|
4142
|
-
* @param args.accountAddress Aptos account address
|
|
4143
|
-
* @param args.resourceType String representation of an on-chain Move struct type, i.e "0x1::aptos_coin::AptosCoin"
|
|
4144
|
-
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
4145
|
-
*
|
|
4146
|
-
* @returns Account resource
|
|
4147
|
-
*
|
|
4148
|
-
* @example An example of an account resource
|
|
4149
|
-
* ```
|
|
4150
|
-
* {
|
|
4151
|
-
* value: 6
|
|
4152
|
-
* }
|
|
4153
|
-
* ```
|
|
4436
|
+
* Deserialize a Raw Transaction With Data
|
|
4154
4437
|
*/
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4438
|
+
static deserialize(deserializer: Deserializer): RawTransactionWithData;
|
|
4439
|
+
}
|
|
4440
|
+
/**
|
|
4441
|
+
* Representation of a Multi Agent Transaction that can serialized and deserialized
|
|
4442
|
+
*/
|
|
4443
|
+
declare class MultiAgentRawTransaction extends RawTransactionWithData {
|
|
4160
4444
|
/**
|
|
4161
|
-
*
|
|
4162
|
-
*
|
|
4163
|
-
* This handles both if the account's authentication key has been rotated or not.
|
|
4164
|
-
*
|
|
4165
|
-
* @param args.authenticationKey The authentication key
|
|
4166
|
-
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
4167
|
-
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
4168
|
-
* @returns Promise<AccountAddress> The accountAddress associated with the authentication key
|
|
4445
|
+
* The raw transaction
|
|
4169
4446
|
*/
|
|
4170
|
-
|
|
4171
|
-
authenticationKey: AccountAddressInput;
|
|
4172
|
-
minimumLedgerVersion?: AnyNumber;
|
|
4173
|
-
options?: LedgerVersionArg;
|
|
4174
|
-
}): Promise<AccountAddress>;
|
|
4447
|
+
readonly raw_txn: RawTransaction;
|
|
4175
4448
|
/**
|
|
4176
|
-
*
|
|
4177
|
-
*
|
|
4178
|
-
* @param args.accountAddress The account address
|
|
4179
|
-
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
4180
|
-
* @returns Current count of tokens owned by the account
|
|
4449
|
+
* The secondary signers on this transaction
|
|
4181
4450
|
*/
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4451
|
+
readonly secondary_signer_addresses: Array<AccountAddress>;
|
|
4452
|
+
constructor(raw_txn: RawTransaction, secondary_signer_addresses: Array<AccountAddress>);
|
|
4453
|
+
serialize(serializer: Serializer): void;
|
|
4454
|
+
static load(deserializer: Deserializer): MultiAgentRawTransaction;
|
|
4455
|
+
}
|
|
4456
|
+
/**
|
|
4457
|
+
* Representation of a Fee Payer Transaction that can serialized and deserialized
|
|
4458
|
+
*/
|
|
4459
|
+
declare class FeePayerRawTransaction extends RawTransactionWithData {
|
|
4186
4460
|
/**
|
|
4187
|
-
*
|
|
4188
|
-
*
|
|
4189
|
-
* This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
|
|
4190
|
-
* If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
|
|
4191
|
-
*
|
|
4192
|
-
* @param args.accountAddress The account address we want to get the tokens for
|
|
4193
|
-
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
4194
|
-
* @param args.options.tokenStandard The NFT standard to query for
|
|
4195
|
-
* @param args.options.offset The number token to start returning results from
|
|
4196
|
-
* @param args.options.limit The number of results to return
|
|
4197
|
-
* @param args.options.orderBy The order to sort the tokens by
|
|
4198
|
-
* @returns Tokens array with the token data
|
|
4461
|
+
* The raw transaction
|
|
4199
4462
|
*/
|
|
4200
|
-
|
|
4201
|
-
accountAddress: AccountAddressInput;
|
|
4202
|
-
minimumLedgerVersion?: AnyNumber;
|
|
4203
|
-
options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensQueryResponse[0]>;
|
|
4204
|
-
}): Promise<GetAccountOwnedTokensQueryResponse>;
|
|
4463
|
+
readonly raw_txn: RawTransaction;
|
|
4205
4464
|
/**
|
|
4206
|
-
*
|
|
4207
|
-
*
|
|
4208
|
-
* This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
|
|
4209
|
-
* If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
|
|
4210
|
-
*
|
|
4211
|
-
* @param args.accountAddress The account address we want to get the tokens for
|
|
4212
|
-
* @param args.collectionAddress The address of the collection being queried
|
|
4213
|
-
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
4214
|
-
* @param args.options.tokenStandard The NFT standard to query for
|
|
4215
|
-
* @param args.options.offset The number token to start returning results from
|
|
4216
|
-
* @param args.options.limit The number of results to return
|
|
4217
|
-
* @param args.options.orderBy The order to sort the tokens by
|
|
4218
|
-
* @returns Tokens array with the token data
|
|
4465
|
+
* The secondary signers on this transaction - optional and can be empty
|
|
4219
4466
|
*/
|
|
4220
|
-
|
|
4221
|
-
accountAddress: AccountAddressInput;
|
|
4222
|
-
collectionAddress: AccountAddressInput;
|
|
4223
|
-
minimumLedgerVersion?: AnyNumber;
|
|
4224
|
-
options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensFromCollectionResponse[0]>;
|
|
4225
|
-
}): Promise<GetAccountOwnedTokensFromCollectionResponse>;
|
|
4467
|
+
readonly secondary_signer_addresses: Array<AccountAddress>;
|
|
4226
4468
|
/**
|
|
4227
|
-
*
|
|
4228
|
-
*
|
|
4229
|
-
* This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
|
|
4230
|
-
* If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
|
|
4231
|
-
*
|
|
4232
|
-
* @param args.accountAddress The account address we want to get the collections for
|
|
4233
|
-
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
4234
|
-
* @param args.options.tokenStandard The NFT standard to query for
|
|
4235
|
-
* @param args.options.offset The number collection to start returning results from
|
|
4236
|
-
* @param args.options.limit The number of results to return
|
|
4237
|
-
* @param args.options.orderBy The order to sort the tokens by
|
|
4238
|
-
* @returns Collections array with the collections data
|
|
4469
|
+
* The fee payer account address
|
|
4239
4470
|
*/
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4471
|
+
readonly fee_payer_address: AccountAddress;
|
|
4472
|
+
constructor(raw_txn: RawTransaction, secondary_signer_addresses: Array<AccountAddress>, fee_payer_address: AccountAddress);
|
|
4473
|
+
serialize(serializer: Serializer): void;
|
|
4474
|
+
static load(deserializer: Deserializer): FeePayerRawTransaction;
|
|
4475
|
+
}
|
|
4476
|
+
|
|
4477
|
+
/**
|
|
4478
|
+
* Representation of the challenge which is needed to sign by owner of the account
|
|
4479
|
+
* to rotate the authentication key.
|
|
4480
|
+
*/
|
|
4481
|
+
declare class RotationProofChallenge extends Serializable {
|
|
4482
|
+
readonly accountAddress: AccountAddress;
|
|
4483
|
+
readonly moduleName: MoveString;
|
|
4484
|
+
readonly structName: MoveString;
|
|
4485
|
+
readonly originator: AccountAddress;
|
|
4486
|
+
readonly currentAuthKey: AccountAddress;
|
|
4487
|
+
readonly newPublicKey: MoveVector<U8>;
|
|
4488
|
+
readonly sequenceNumber: U64;
|
|
4489
|
+
constructor(args: {
|
|
4490
|
+
sequenceNumber: AnyNumber;
|
|
4491
|
+
originator: AccountAddress;
|
|
4492
|
+
currentAuthKey: AccountAddress;
|
|
4493
|
+
newPublicKey: PublicKey;
|
|
4494
|
+
});
|
|
4495
|
+
serialize(serializer: Serializer): void;
|
|
4496
|
+
}
|
|
4497
|
+
|
|
4498
|
+
declare abstract class TransactionAuthenticator extends Serializable {
|
|
4499
|
+
abstract serialize(serializer: Serializer): void;
|
|
4500
|
+
static deserialize(deserializer: Deserializer): TransactionAuthenticator;
|
|
4501
|
+
}
|
|
4502
|
+
/**
|
|
4503
|
+
* Transaction authenticator Ed25519 for a single signer transaction
|
|
4504
|
+
*
|
|
4505
|
+
* @param public_key Client's public key.
|
|
4506
|
+
* @param signature Ed25519 signature of a raw transaction.
|
|
4507
|
+
* @see {@link https://aptos.dev/integration/creating-a-signed-transaction | Creating a Signed Transaction}
|
|
4508
|
+
* for details about generating a signature.
|
|
4509
|
+
*/
|
|
4510
|
+
declare class TransactionAuthenticatorEd25519 extends TransactionAuthenticator {
|
|
4511
|
+
readonly public_key: Ed25519PublicKey;
|
|
4512
|
+
readonly signature: Ed25519Signature;
|
|
4513
|
+
constructor(public_key: Ed25519PublicKey, signature: Ed25519Signature);
|
|
4514
|
+
serialize(serializer: Serializer): void;
|
|
4515
|
+
static load(deserializer: Deserializer): TransactionAuthenticatorEd25519;
|
|
4516
|
+
}
|
|
4517
|
+
/**
|
|
4518
|
+
* Transaction authenticator Ed25519 for a multi signers transaction
|
|
4519
|
+
*
|
|
4520
|
+
* @param public_key Client's public key.
|
|
4521
|
+
* @param signature Multi Ed25519 signature of a raw transaction.
|
|
4522
|
+
*
|
|
4523
|
+
*/
|
|
4524
|
+
declare class TransactionAuthenticatorMultiEd25519 extends TransactionAuthenticator {
|
|
4525
|
+
readonly public_key: MultiEd25519PublicKey;
|
|
4526
|
+
readonly signature: MultiEd25519Signature;
|
|
4527
|
+
constructor(public_key: MultiEd25519PublicKey, signature: MultiEd25519Signature);
|
|
4528
|
+
serialize(serializer: Serializer): void;
|
|
4529
|
+
static load(deserializer: Deserializer): TransactionAuthenticatorMultiEd25519;
|
|
4530
|
+
}
|
|
4531
|
+
/**
|
|
4532
|
+
* Transaction authenticator for a multi-agent transaction
|
|
4533
|
+
*
|
|
4534
|
+
* @param sender Sender account authenticator
|
|
4535
|
+
* @param secondary_signer_addresses Secondary signers address
|
|
4536
|
+
* @param secondary_signers Secondary signers account authenticators
|
|
4537
|
+
*
|
|
4538
|
+
*/
|
|
4539
|
+
declare class TransactionAuthenticatorMultiAgent extends TransactionAuthenticator {
|
|
4540
|
+
readonly sender: AccountAuthenticator;
|
|
4541
|
+
readonly secondary_signer_addresses: Array<AccountAddress>;
|
|
4542
|
+
readonly secondary_signers: Array<AccountAuthenticator>;
|
|
4543
|
+
constructor(sender: AccountAuthenticator, secondary_signer_addresses: Array<AccountAddress>, secondary_signers: Array<AccountAuthenticator>);
|
|
4544
|
+
serialize(serializer: Serializer): void;
|
|
4545
|
+
static load(deserializer: Deserializer): TransactionAuthenticatorMultiAgent;
|
|
4546
|
+
}
|
|
4547
|
+
/**
|
|
4548
|
+
* Transaction authenticator for a fee payer transaction
|
|
4549
|
+
*
|
|
4550
|
+
* @param sender Sender account authenticator
|
|
4551
|
+
* @param secondary_signer_addresses Secondary signers address
|
|
4552
|
+
* @param secondary_signers Secondary signers account authenticators
|
|
4553
|
+
* @param fee_payer Object of the fee payer account address and the fee payer authentication
|
|
4554
|
+
*
|
|
4555
|
+
*/
|
|
4556
|
+
declare class TransactionAuthenticatorFeePayer extends TransactionAuthenticator {
|
|
4557
|
+
readonly sender: AccountAuthenticator;
|
|
4558
|
+
readonly secondary_signer_addresses: Array<AccountAddress>;
|
|
4559
|
+
readonly secondary_signers: Array<AccountAuthenticator>;
|
|
4560
|
+
readonly fee_payer: {
|
|
4561
|
+
address: AccountAddress;
|
|
4562
|
+
authenticator: AccountAuthenticator;
|
|
4563
|
+
};
|
|
4564
|
+
constructor(sender: AccountAuthenticator, secondary_signer_addresses: Array<AccountAddress>, secondary_signers: Array<AccountAuthenticator>, fee_payer: {
|
|
4565
|
+
address: AccountAddress;
|
|
4566
|
+
authenticator: AccountAuthenticator;
|
|
4567
|
+
});
|
|
4568
|
+
serialize(serializer: Serializer): void;
|
|
4569
|
+
static load(deserializer: Deserializer): TransactionAuthenticatorMultiAgent;
|
|
4570
|
+
}
|
|
4571
|
+
/**
|
|
4572
|
+
* Single Sender authenticator for a single signer transaction
|
|
4573
|
+
*
|
|
4574
|
+
* @param sender AccountAuthenticator
|
|
4575
|
+
*/
|
|
4576
|
+
declare class TransactionAuthenticatorSingleSender extends TransactionAuthenticator {
|
|
4577
|
+
readonly sender: AccountAuthenticator;
|
|
4578
|
+
constructor(sender: AccountAuthenticator);
|
|
4579
|
+
serialize(serializer: Serializer): void;
|
|
4580
|
+
static load(deserializer: Deserializer): TransactionAuthenticatorSingleSender;
|
|
4581
|
+
}
|
|
4582
|
+
|
|
4583
|
+
declare class SignedTransaction extends Serializable {
|
|
4584
|
+
readonly raw_txn: RawTransaction;
|
|
4585
|
+
readonly authenticator: TransactionAuthenticator;
|
|
4245
4586
|
/**
|
|
4246
|
-
*
|
|
4587
|
+
* A SignedTransaction consists of a raw transaction and an authenticator. The authenticator
|
|
4588
|
+
* contains a client's public key and the signature of the raw transaction.
|
|
4247
4589
|
*
|
|
4248
|
-
* @
|
|
4249
|
-
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
4250
|
-
* @returns Current count of transactions made by an account
|
|
4251
|
-
*/
|
|
4252
|
-
getAccountTransactionsCount(args: {
|
|
4253
|
-
accountAddress: AccountAddressInput;
|
|
4254
|
-
minimumLedgerVersion?: AnyNumber;
|
|
4255
|
-
}): Promise<number>;
|
|
4256
|
-
/**
|
|
4257
|
-
* Queries an account's coins data
|
|
4590
|
+
* @see {@link https://aptos.dev/integration/creating-a-signed-transaction | Creating a Signed Transaction}
|
|
4258
4591
|
*
|
|
4259
|
-
* @param
|
|
4260
|
-
* @param
|
|
4261
|
-
*
|
|
4262
|
-
* @
|
|
4263
|
-
* @param args.options.orderBy optional. The order to sort the coins by
|
|
4264
|
-
* @param args.options.where optional. Filter the results by
|
|
4265
|
-
* @returns Array with the coins data
|
|
4592
|
+
* @param raw_txn
|
|
4593
|
+
* @param authenticator Contains a client's public key and the signature of the raw transaction.
|
|
4594
|
+
* Authenticator has 3 flavors: single signature, multi-signature and multi-agent.
|
|
4595
|
+
* @see {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs} for details.
|
|
4266
4596
|
*/
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4597
|
+
constructor(raw_txn: RawTransaction, authenticator: TransactionAuthenticator);
|
|
4598
|
+
serialize(serializer: Serializer): void;
|
|
4599
|
+
static deserialize(deserializer: Deserializer): SignedTransaction;
|
|
4600
|
+
}
|
|
4601
|
+
|
|
4602
|
+
/**
|
|
4603
|
+
* Representation of a SimpleTransaction that can serialized and deserialized
|
|
4604
|
+
*/
|
|
4605
|
+
declare class SimpleTransaction extends Serializable {
|
|
4606
|
+
rawTransaction: RawTransaction;
|
|
4607
|
+
feePayerAddress?: AccountAddress | undefined;
|
|
4608
|
+
readonly secondarySignerAddresses: undefined;
|
|
4272
4609
|
/**
|
|
4273
|
-
*
|
|
4610
|
+
* SimpleTransaction represents a simple transaction type of a single signer that
|
|
4611
|
+
* can be submitted to Aptos chain for execution.
|
|
4274
4612
|
*
|
|
4275
|
-
*
|
|
4276
|
-
*
|
|
4277
|
-
*
|
|
4613
|
+
* SimpleTransaction metadata contains the Raw Transaction and an optional
|
|
4614
|
+
* sponsor Account Address to pay the gas fees.
|
|
4615
|
+
*
|
|
4616
|
+
* @param rawTransaction The Raw Tranasaction
|
|
4617
|
+
* @param feePayerAddress The sponsor Account Address
|
|
4278
4618
|
*/
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4619
|
+
constructor(rawTransaction: RawTransaction, feePayerAddress?: AccountAddress);
|
|
4620
|
+
serialize(serializer: Serializer): void;
|
|
4621
|
+
static deserialize(deserializer: Deserializer): SimpleTransaction;
|
|
4622
|
+
}
|
|
4623
|
+
|
|
4624
|
+
/**
|
|
4625
|
+
* Representation of a Raw Transaction that can serialized and deserialized
|
|
4626
|
+
*/
|
|
4627
|
+
declare class MultiAgentTransaction extends Serializable {
|
|
4628
|
+
rawTransaction: RawTransaction;
|
|
4629
|
+
feePayerAddress?: AccountAddress | undefined;
|
|
4630
|
+
secondarySignerAddresses: AccountAddress[];
|
|
4283
4631
|
/**
|
|
4284
|
-
*
|
|
4632
|
+
* SimpleTransaction represents a simple transaction type of a single signer that
|
|
4633
|
+
* can be submitted to Aptos chain for execution.
|
|
4285
4634
|
*
|
|
4286
|
-
*
|
|
4287
|
-
*
|
|
4288
|
-
*
|
|
4635
|
+
* SimpleTransaction metadata contains the Raw Transaction and an optional
|
|
4636
|
+
* sponsor Account Address to pay the gas fees.
|
|
4637
|
+
*
|
|
4638
|
+
* @param rawTransaction The Raw Tranasaction
|
|
4639
|
+
* @param feePayerAddress The sponsor Account Address
|
|
4289
4640
|
*/
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4641
|
+
constructor(rawTransaction: RawTransaction, secondarySignerAddresses: AccountAddress[], feePayerAddress?: AccountAddress);
|
|
4642
|
+
serialize(serializer: Serializer): void;
|
|
4643
|
+
static deserialize(deserializer: Deserializer): MultiAgentTransaction;
|
|
4644
|
+
}
|
|
4645
|
+
|
|
4646
|
+
/**
|
|
4647
|
+
* Entry function arguments to be used when building a raw transaction using remote ABI
|
|
4648
|
+
*/
|
|
4649
|
+
type SimpleEntryFunctionArgumentTypes = boolean | number | bigint | string | null | undefined | Uint8Array | ArrayBuffer | Array<SimpleEntryFunctionArgumentTypes | EntryFunctionArgumentTypes>;
|
|
4650
|
+
/**
|
|
4651
|
+
* Entry function arguments to be used when building a raw transaction using BCS serialized arguments
|
|
4652
|
+
*/
|
|
4653
|
+
type EntryFunctionArgumentTypes = Bool | U8 | U16 | U32 | U64 | U128 | U256 | AccountAddress | MoveVector<EntryFunctionArgumentTypes> | MoveOption<EntryFunctionArgumentTypes> | MoveString | FixedBytes;
|
|
4654
|
+
/**
|
|
4655
|
+
* Script function arguments to be used when building a raw transaction using BCS serialized arguments
|
|
4656
|
+
*/
|
|
4657
|
+
type ScriptFunctionArgumentTypes = Bool | U8 | U16 | U32 | U64 | U128 | U256 | AccountAddress | MoveVector<U8> | MoveString | FixedBytes;
|
|
4658
|
+
/**
|
|
4659
|
+
* Type that holds all raw transaction instances Aptos SDK supports
|
|
4660
|
+
*/
|
|
4661
|
+
type AnyRawTransactionInstance = RawTransaction | MultiAgentRawTransaction | FeePayerRawTransaction;
|
|
4662
|
+
/**
|
|
4663
|
+
* Optional options to set when generating a transaction
|
|
4664
|
+
*/
|
|
4665
|
+
type InputGenerateTransactionOptions = {
|
|
4666
|
+
maxGasAmount?: number;
|
|
4667
|
+
gasUnitPrice?: number;
|
|
4668
|
+
expireTimestamp?: number;
|
|
4669
|
+
accountSequenceNumber?: AnyNumber;
|
|
4670
|
+
};
|
|
4671
|
+
/**
|
|
4672
|
+
* The generated transaction payload type that was produces from `generateTransactionPayload()` function.
|
|
4673
|
+
*/
|
|
4674
|
+
type AnyTransactionPayloadInstance = TransactionPayloadEntryFunction | TransactionPayloadScript | TransactionPayloadMultiSig;
|
|
4675
|
+
/**
|
|
4676
|
+
* Unified type for the data needed to generate a transaction payload of types:
|
|
4677
|
+
* Entry Function | Script | Multi Sig
|
|
4678
|
+
*/
|
|
4679
|
+
type InputGenerateTransactionPayloadData = InputEntryFunctionData | InputScriptData | InputMultiSigData;
|
|
4680
|
+
type InputGenerateTransactionPayloadDataWithRemoteABI = InputScriptData | InputEntryFunctionDataWithRemoteABI | InputMultiSigDataWithRemoteABI;
|
|
4681
|
+
/**
|
|
4682
|
+
* The data needed to generate an Entry Function payload
|
|
4683
|
+
*/
|
|
4684
|
+
type InputEntryFunctionData = {
|
|
4685
|
+
function: MoveFunctionId;
|
|
4686
|
+
typeArguments?: Array<TypeTag | string>;
|
|
4687
|
+
functionArguments: Array<EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes>;
|
|
4688
|
+
abi?: EntryFunctionABI;
|
|
4689
|
+
};
|
|
4690
|
+
type InputGenerateTransactionPayloadDataWithABI = InputEntryFunctionDataWithABI | InputMultiSigDataWithABI;
|
|
4691
|
+
type InputEntryFunctionDataWithABI = Omit<InputEntryFunctionData, "abi"> & {
|
|
4692
|
+
abi: EntryFunctionABI;
|
|
4693
|
+
};
|
|
4694
|
+
type InputMultiSigDataWithABI = {
|
|
4695
|
+
multisigAddress: AccountAddressInput;
|
|
4696
|
+
} & InputEntryFunctionDataWithABI;
|
|
4697
|
+
type InputEntryFunctionDataWithRemoteABI = InputEntryFunctionData & {
|
|
4698
|
+
aptosConfig: AptosConfig;
|
|
4699
|
+
};
|
|
4700
|
+
/**
|
|
4701
|
+
* The data needed to generate a Multi Sig payload
|
|
4702
|
+
*/
|
|
4703
|
+
type InputMultiSigData = {
|
|
4704
|
+
multisigAddress: AccountAddressInput;
|
|
4705
|
+
} & InputEntryFunctionData;
|
|
4706
|
+
/**
|
|
4707
|
+
* The data needed to generate a Multi Sig payload
|
|
4708
|
+
*/
|
|
4709
|
+
type InputMultiSigDataWithRemoteABI = {
|
|
4710
|
+
multisigAddress: AccountAddressInput;
|
|
4711
|
+
} & InputEntryFunctionDataWithRemoteABI;
|
|
4712
|
+
/**
|
|
4713
|
+
* The data needed to generate a Script payload
|
|
4714
|
+
*/
|
|
4715
|
+
type InputScriptData = {
|
|
4716
|
+
bytecode: HexInput;
|
|
4717
|
+
typeArguments?: Array<TypeTag>;
|
|
4718
|
+
functionArguments: Array<ScriptFunctionArgumentTypes>;
|
|
4719
|
+
};
|
|
4720
|
+
/**
|
|
4721
|
+
* The data needed to generate a View Function payload
|
|
4722
|
+
*/
|
|
4723
|
+
type InputViewFunctionData = {
|
|
4724
|
+
function: MoveFunctionId;
|
|
4725
|
+
typeArguments?: Array<TypeTag | string>;
|
|
4726
|
+
functionArguments?: Array<EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes>;
|
|
4727
|
+
abi?: ViewFunctionABI;
|
|
4728
|
+
};
|
|
4729
|
+
/**
|
|
4730
|
+
* Data needed to generate a view function payload and fetch the remote ABI
|
|
4731
|
+
*/
|
|
4732
|
+
type InputViewFunctionDataWithRemoteABI = InputViewFunctionData & {
|
|
4733
|
+
aptosConfig: AptosConfig;
|
|
4734
|
+
};
|
|
4735
|
+
/**
|
|
4736
|
+
* Data needed to generate a view function, with an already fetched ABI
|
|
4737
|
+
*/
|
|
4738
|
+
type InputViewFunctionDataWithABI = InputViewFunctionData & {
|
|
4739
|
+
abi: ViewFunctionABI;
|
|
4740
|
+
};
|
|
4741
|
+
/**
|
|
4742
|
+
* Data need for a generic function ABI, both view and entry
|
|
4743
|
+
*/
|
|
4744
|
+
type FunctionABI = {
|
|
4745
|
+
typeParameters: Array<MoveFunctionGenericTypeParam>;
|
|
4746
|
+
parameters: Array<TypeTag>;
|
|
4747
|
+
};
|
|
4748
|
+
/**
|
|
4749
|
+
* Interface of an Entry function's ABI.
|
|
4750
|
+
*
|
|
4751
|
+
* This is used to provide type checking and simple input conversion on ABI based transaction submission.
|
|
4752
|
+
*/
|
|
4753
|
+
type EntryFunctionABI = FunctionABI & {
|
|
4754
|
+
signers?: number;
|
|
4755
|
+
};
|
|
4756
|
+
/**
|
|
4757
|
+
* Interface of an View function's ABI.
|
|
4758
|
+
*
|
|
4759
|
+
* This is used to provide type checking and simple input conversion on ABI based transaction submission.
|
|
4760
|
+
*/
|
|
4761
|
+
type ViewFunctionABI = FunctionABI & {
|
|
4762
|
+
returnTypes: Array<TypeTag>;
|
|
4763
|
+
};
|
|
4764
|
+
/**
|
|
4765
|
+
* Interface of the arguments to generate a single signer transaction.
|
|
4766
|
+
* Used to provide to `generateTransaction()` method in the transaction builder flow
|
|
4767
|
+
*/
|
|
4768
|
+
interface InputGenerateSingleSignerRawTransactionArgs {
|
|
4769
|
+
aptosConfig: AptosConfig;
|
|
4770
|
+
sender: AccountAddressInput;
|
|
4771
|
+
payload: AnyTransactionPayloadInstance;
|
|
4772
|
+
options?: InputGenerateTransactionOptions;
|
|
4773
|
+
feePayerAddress?: AccountAddressInput;
|
|
4774
|
+
}
|
|
4775
|
+
/**
|
|
4776
|
+
* Interface of the arguments to generate a multi-agent transaction.
|
|
4777
|
+
* Used to provide to `generateTransaction()` method in the transaction builder flow
|
|
4778
|
+
*/
|
|
4779
|
+
interface InputGenerateMultiAgentRawTransactionArgs {
|
|
4780
|
+
aptosConfig: AptosConfig;
|
|
4781
|
+
sender: AccountAddressInput;
|
|
4782
|
+
payload: AnyTransactionPayloadInstance;
|
|
4783
|
+
secondarySignerAddresses: AccountAddressInput[];
|
|
4784
|
+
options?: InputGenerateTransactionOptions;
|
|
4785
|
+
feePayerAddress?: AccountAddressInput;
|
|
4786
|
+
}
|
|
4787
|
+
/**
|
|
4788
|
+
* Unified type that holds all the interfaces to generate different transaction types
|
|
4789
|
+
*/
|
|
4790
|
+
type InputGenerateRawTransactionArgs = InputGenerateSingleSignerRawTransactionArgs | InputGenerateMultiAgentRawTransactionArgs;
|
|
4791
|
+
/**
|
|
4792
|
+
* Unified type that holds all the return interfaces when generating different transaction types
|
|
4793
|
+
*/
|
|
4794
|
+
type AnyRawTransaction = SimpleTransaction | MultiAgentTransaction;
|
|
4795
|
+
type InputSimulateTransactionData = {
|
|
4294
4796
|
/**
|
|
4295
|
-
*
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
*
|
|
4300
|
-
* @returns Current amount of account's coin
|
|
4797
|
+
* The transaction to simulate, probably generated by `generateTransaction()`
|
|
4798
|
+
*/
|
|
4799
|
+
transaction: AnyRawTransaction;
|
|
4800
|
+
/**
|
|
4801
|
+
* For a single signer transaction
|
|
4301
4802
|
*/
|
|
4302
|
-
|
|
4303
|
-
accountAddress: AccountAddressInput;
|
|
4304
|
-
coinType: MoveStructId;
|
|
4305
|
-
minimumLedgerVersion?: AnyNumber;
|
|
4306
|
-
}): Promise<number>;
|
|
4803
|
+
signerPublicKey: PublicKey;
|
|
4307
4804
|
/**
|
|
4308
|
-
*
|
|
4309
|
-
*
|
|
4310
|
-
* @param args.accountAddress The account address we want to get the objects for
|
|
4311
|
-
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
4312
|
-
* @param args.options.offset The starting position to start returning results from
|
|
4313
|
-
* @param args.options.limit The number of results to return
|
|
4314
|
-
* @param args.options.orderBy The order to sort the objects by
|
|
4315
|
-
* @returns Objects array with the object data
|
|
4805
|
+
* For a fee payer or multi-agent transaction that requires additional signers in
|
|
4316
4806
|
*/
|
|
4317
|
-
|
|
4318
|
-
accountAddress: AccountAddressInput;
|
|
4319
|
-
minimumLedgerVersion?: AnyNumber;
|
|
4320
|
-
options?: PaginationArgs & OrderByArg<GetAccountOwnedObjectsResponse[0]>;
|
|
4321
|
-
}): Promise<GetAccountOwnedObjectsResponse>;
|
|
4807
|
+
secondarySignersPublicKeys?: Array<PublicKey>;
|
|
4322
4808
|
/**
|
|
4323
|
-
*
|
|
4324
|
-
* This functions resolves the provided private key type and derives the public key from it.
|
|
4325
|
-
*
|
|
4326
|
-
* If the privateKey is a Secp256k1 type, it derives the account using the derived public key and
|
|
4327
|
-
* auth key using the SingleKey scheme locally.
|
|
4328
|
-
*
|
|
4329
|
-
* If the privateKey is a ED25519 type, it looks up the authentication key on chain, and uses it to resolve
|
|
4330
|
-
* whether it is a Legacy ED25519 key or a Unified ED25519 key. It then derives the account based
|
|
4331
|
-
* on that.
|
|
4332
|
-
*
|
|
4333
|
-
* @param args.privateKey An account private key
|
|
4334
|
-
* @returns Account type
|
|
4809
|
+
* For a fee payer transaction (aka Sponsored Transaction)
|
|
4335
4810
|
*/
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4811
|
+
feePayerPublicKey?: PublicKey;
|
|
4812
|
+
options?: InputSimulateTransactionOptions;
|
|
4813
|
+
};
|
|
4814
|
+
type InputSimulateTransactionOptions = {
|
|
4815
|
+
estimateGasUnitPrice?: boolean;
|
|
4816
|
+
estimateMaxGasAmount?: boolean;
|
|
4817
|
+
estimatePrioritizedGasUnitPrice?: boolean;
|
|
4818
|
+
};
|
|
4819
|
+
/**
|
|
4820
|
+
* Interface that holds the user data input when generating a single signer transaction
|
|
4821
|
+
*/
|
|
4822
|
+
interface InputGenerateSingleSignerRawTransactionData {
|
|
4823
|
+
sender: AccountAddressInput;
|
|
4824
|
+
data: InputGenerateTransactionPayloadData;
|
|
4825
|
+
options?: InputGenerateTransactionOptions;
|
|
4826
|
+
withFeePayer?: boolean;
|
|
4827
|
+
secondarySignerAddresses?: undefined;
|
|
4339
4828
|
}
|
|
4340
|
-
|
|
4341
4829
|
/**
|
|
4342
|
-
*
|
|
4830
|
+
* Interface that holds the user data input when generating a multi-agent transaction
|
|
4343
4831
|
*/
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4832
|
+
interface InputGenerateMultiAgentRawTransactionData {
|
|
4833
|
+
sender: AccountAddressInput;
|
|
4834
|
+
data: InputGenerateTransactionPayloadData;
|
|
4835
|
+
secondarySignerAddresses: AccountAddressInput[];
|
|
4836
|
+
options?: InputGenerateTransactionOptions;
|
|
4837
|
+
withFeePayer?: boolean;
|
|
4349
4838
|
}
|
|
4350
|
-
|
|
4351
4839
|
/**
|
|
4352
|
-
*
|
|
4353
|
-
* We use Identifier to represent the module "name" in "ModuleId" and
|
|
4354
|
-
* the "function name" in "EntryFunction"
|
|
4840
|
+
* Unified type that holds all the user data input interfaces when generating different transaction types
|
|
4355
4841
|
*/
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4842
|
+
type InputGenerateTransactionData = InputGenerateSingleSignerRawTransactionData | InputGenerateMultiAgentRawTransactionData;
|
|
4843
|
+
/**
|
|
4844
|
+
* Interface that holds the user data input when submitting a transaction
|
|
4845
|
+
*/
|
|
4846
|
+
interface InputSubmitTransactionData {
|
|
4847
|
+
transaction: AnyRawTransaction;
|
|
4848
|
+
senderAuthenticator: AccountAuthenticator;
|
|
4849
|
+
feePayerAuthenticator?: AccountAuthenticator;
|
|
4850
|
+
additionalSignersAuthenticators?: Array<AccountAuthenticator>;
|
|
4361
4851
|
}
|
|
4362
4852
|
|
|
4853
|
+
interface SingleKeySignerConstructorArgs {
|
|
4854
|
+
privateKey: PrivateKey;
|
|
4855
|
+
address?: AccountAddressInput;
|
|
4856
|
+
}
|
|
4857
|
+
interface SingleKeySignerGenerateArgs {
|
|
4858
|
+
scheme?: SigningSchemeInput;
|
|
4859
|
+
}
|
|
4860
|
+
type SingleKeySignerFromDerivationPathArgs = SingleKeySignerGenerateArgs & {
|
|
4861
|
+
path: string;
|
|
4862
|
+
mnemonic: string;
|
|
4863
|
+
};
|
|
4864
|
+
interface VerifySingleKeySignatureArgs {
|
|
4865
|
+
message: HexInput;
|
|
4866
|
+
signature: AnySignature;
|
|
4867
|
+
}
|
|
4363
4868
|
/**
|
|
4364
|
-
*
|
|
4365
|
-
*
|
|
4869
|
+
* Signer implementation for the SingleKey authentication scheme.
|
|
4870
|
+
* This extends a SingleKeyAccount by adding signing capabilities through a valid private key.
|
|
4871
|
+
* Currently, the only supported signature schemes are Ed25519 and Secp256k1.
|
|
4872
|
+
*
|
|
4873
|
+
* Note: Generating a signer instance does not create the account on-chain.
|
|
4366
4874
|
*/
|
|
4367
|
-
declare class
|
|
4368
|
-
readonly address: AccountAddress;
|
|
4369
|
-
readonly name: Identifier;
|
|
4875
|
+
declare class SingleKeyAccount implements Account$1 {
|
|
4370
4876
|
/**
|
|
4371
|
-
*
|
|
4372
|
-
* @param address The account address. e.g "0x1"
|
|
4373
|
-
* @param name The module name under the "address". e.g "coin"
|
|
4877
|
+
* Private key associated with the account
|
|
4374
4878
|
*/
|
|
4375
|
-
|
|
4879
|
+
readonly privateKey: PrivateKey;
|
|
4880
|
+
readonly publicKey: AnyPublicKey;
|
|
4881
|
+
readonly accountAddress: AccountAddress;
|
|
4882
|
+
readonly signingScheme = SigningScheme.SingleKey;
|
|
4883
|
+
constructor(args: SingleKeySignerConstructorArgs);
|
|
4376
4884
|
/**
|
|
4377
|
-
*
|
|
4378
|
-
*
|
|
4379
|
-
* @returns
|
|
4885
|
+
* Derives an account from a randomly generated private key.
|
|
4886
|
+
* Default generation is using an Ed25519 key
|
|
4887
|
+
* @returns Account with the given signature scheme
|
|
4380
4888
|
*/
|
|
4381
|
-
static
|
|
4382
|
-
|
|
4383
|
-
|
|
4889
|
+
static generate(args?: SingleKeySignerGenerateArgs): SingleKeyAccount;
|
|
4890
|
+
/**
|
|
4891
|
+
* Derives an account with bip44 path and mnemonics,
|
|
4892
|
+
* Default to using an Ed25519 signature scheme.
|
|
4893
|
+
*
|
|
4894
|
+
* @param args.scheme The signature scheme to derive the private key with
|
|
4895
|
+
* @param args.path the BIP44 derive hardened path (e.g. m/44'/637'/0'/0'/0') for Ed25519,
|
|
4896
|
+
* or non-hardened path (e.g. m/44'/637'/0'/0/0) for secp256k1
|
|
4897
|
+
* Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
|
|
4898
|
+
* @param args.mnemonic the mnemonic seed phrase of the account
|
|
4899
|
+
*/
|
|
4900
|
+
static fromDerivationPath(args: SingleKeySignerFromDerivationPathArgs): SingleKeyAccount;
|
|
4901
|
+
verifySignature(args: VerifySingleKeySignatureArgs): boolean;
|
|
4902
|
+
signWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorSingleKey;
|
|
4903
|
+
sign(message: HexInput): Signature;
|
|
4904
|
+
signTransaction(transaction: AnyRawTransaction): Signature;
|
|
4384
4905
|
}
|
|
4385
4906
|
|
|
4386
|
-
declare abstract class TypeTag extends Serializable {
|
|
4387
|
-
abstract serialize(serializer: Serializer): void;
|
|
4388
|
-
static deserialize(deserializer: Deserializer): TypeTag;
|
|
4389
|
-
abstract toString(): string;
|
|
4390
|
-
isBool(): this is TypeTagBool;
|
|
4391
|
-
isAddress(): this is TypeTagAddress;
|
|
4392
|
-
isGeneric(): this is TypeTagGeneric;
|
|
4393
|
-
isSigner(): this is TypeTagSigner;
|
|
4394
|
-
isVector(): this is TypeTagVector;
|
|
4395
|
-
isStruct(): this is TypeTagStruct;
|
|
4396
|
-
isU8(): this is TypeTagU8;
|
|
4397
|
-
isU16(): this is TypeTagU16;
|
|
4398
|
-
isU32(): this is TypeTagU32;
|
|
4399
|
-
isU64(): this is TypeTagU64;
|
|
4400
|
-
isU128(): this is TypeTagU128;
|
|
4401
|
-
isU256(): this is TypeTagU256;
|
|
4402
|
-
}
|
|
4403
|
-
declare class TypeTagBool extends TypeTag {
|
|
4404
|
-
toString(): string;
|
|
4405
|
-
serialize(serializer: Serializer): void;
|
|
4406
|
-
static load(_deserializer: Deserializer): TypeTagBool;
|
|
4407
|
-
}
|
|
4408
|
-
declare class TypeTagU8 extends TypeTag {
|
|
4409
|
-
toString(): string;
|
|
4410
|
-
serialize(serializer: Serializer): void;
|
|
4411
|
-
static load(_deserializer: Deserializer): TypeTagU8;
|
|
4412
|
-
}
|
|
4413
|
-
declare class TypeTagU16 extends TypeTag {
|
|
4414
|
-
toString(): string;
|
|
4415
|
-
serialize(serializer: Serializer): void;
|
|
4416
|
-
static load(_deserializer: Deserializer): TypeTagU16;
|
|
4417
|
-
}
|
|
4418
|
-
declare class TypeTagU32 extends TypeTag {
|
|
4419
|
-
toString(): string;
|
|
4420
|
-
serialize(serializer: Serializer): void;
|
|
4421
|
-
static load(_deserializer: Deserializer): TypeTagU32;
|
|
4422
|
-
}
|
|
4423
|
-
declare class TypeTagU64 extends TypeTag {
|
|
4424
|
-
toString(): string;
|
|
4425
|
-
serialize(serializer: Serializer): void;
|
|
4426
|
-
static load(_deserializer: Deserializer): TypeTagU64;
|
|
4427
|
-
}
|
|
4428
|
-
declare class TypeTagU128 extends TypeTag {
|
|
4429
|
-
toString(): string;
|
|
4430
|
-
serialize(serializer: Serializer): void;
|
|
4431
|
-
static load(_deserializer: Deserializer): TypeTagU128;
|
|
4432
|
-
}
|
|
4433
|
-
declare class TypeTagU256 extends TypeTag {
|
|
4434
|
-
toString(): string;
|
|
4435
|
-
serialize(serializer: Serializer): void;
|
|
4436
|
-
static load(_deserializer: Deserializer): TypeTagU256;
|
|
4437
|
-
}
|
|
4438
|
-
declare class TypeTagAddress extends TypeTag {
|
|
4439
|
-
toString(): string;
|
|
4440
|
-
serialize(serializer: Serializer): void;
|
|
4441
|
-
static load(_deserializer: Deserializer): TypeTagAddress;
|
|
4442
|
-
}
|
|
4443
|
-
declare class TypeTagSigner extends TypeTag {
|
|
4444
|
-
toString(): string;
|
|
4445
|
-
serialize(serializer: Serializer): void;
|
|
4446
|
-
static load(_deserializer: Deserializer): TypeTagSigner;
|
|
4447
|
-
}
|
|
4448
|
-
declare class TypeTagReference extends TypeTag {
|
|
4449
|
-
readonly value: TypeTag;
|
|
4450
|
-
toString(): `&${string}`;
|
|
4451
|
-
constructor(value: TypeTag);
|
|
4452
|
-
serialize(serializer: Serializer): void;
|
|
4453
|
-
static load(deserializer: Deserializer): TypeTagReference;
|
|
4454
|
-
}
|
|
4455
4907
|
/**
|
|
4456
|
-
*
|
|
4457
|
-
*
|
|
4458
|
-
*
|
|
4908
|
+
* Arguments for creating an `Ed25519Account` from an `Ed25519PrivateKey`.
|
|
4909
|
+
* This is the default input type when passing an `Ed25519PrivateKey`.
|
|
4910
|
+
* In order to use the SingleKey authentication scheme, `legacy` needs to be explicitly set to false.
|
|
4459
4911
|
*/
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
serialize(serializer: Serializer): void;
|
|
4465
|
-
static load(deserializer: Deserializer): TypeTagGeneric;
|
|
4466
|
-
}
|
|
4467
|
-
declare class TypeTagVector extends TypeTag {
|
|
4468
|
-
readonly value: TypeTag;
|
|
4469
|
-
toString(): `vector<${string}>`;
|
|
4470
|
-
constructor(value: TypeTag);
|
|
4471
|
-
static u8(): TypeTagVector;
|
|
4472
|
-
serialize(serializer: Serializer): void;
|
|
4473
|
-
static load(deserializer: Deserializer): TypeTagVector;
|
|
4912
|
+
interface CreateEd25519AccountFromPrivateKeyArgs {
|
|
4913
|
+
privateKey: Ed25519PrivateKey;
|
|
4914
|
+
address?: AccountAddressInput;
|
|
4915
|
+
legacy?: true;
|
|
4474
4916
|
}
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
isObject(): boolean;
|
|
4917
|
+
/**
|
|
4918
|
+
* Arguments for creating an `SingleKeyAccount` from an `Ed25519PrivateKey`.
|
|
4919
|
+
* The `legacy` argument needs to be explicitly set to false in order to
|
|
4920
|
+
* use the `SingleKey` authentication scheme.
|
|
4921
|
+
*/
|
|
4922
|
+
interface CreateEd25519SingleKeyAccountFromPrivateKeyArgs {
|
|
4923
|
+
privateKey: Ed25519PrivateKey;
|
|
4924
|
+
address?: AccountAddressInput;
|
|
4925
|
+
legacy: false;
|
|
4485
4926
|
}
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4927
|
+
/**
|
|
4928
|
+
* Arguments for creating an `SingleKeyAccount` from any supported private key
|
|
4929
|
+
* that is not an `Ed25519PrivateKey`.
|
|
4930
|
+
* The `legacy` argument defaults to false and cannot be explicitly set to true.
|
|
4931
|
+
*/
|
|
4932
|
+
interface CreateSingleKeyAccountFromPrivateKeyArgs {
|
|
4933
|
+
privateKey: Exclude<PrivateKey, Ed25519PrivateKey>;
|
|
4934
|
+
address?: AccountAddressInput;
|
|
4935
|
+
legacy?: false;
|
|
4494
4936
|
}
|
|
4495
|
-
declare function aptosCoinStructTag(): StructTag;
|
|
4496
|
-
declare function stringStructTag(): StructTag;
|
|
4497
|
-
declare function optionStructTag(typeArg: TypeTag): StructTag;
|
|
4498
|
-
declare function objectStructTag(typeArg: TypeTag): StructTag;
|
|
4499
|
-
|
|
4500
4937
|
/**
|
|
4501
|
-
*
|
|
4938
|
+
* Arguments for creating an opaque `Account` from any supported private key.
|
|
4939
|
+
* This is used when the private key type is not known at compilation time.
|
|
4502
4940
|
*/
|
|
4503
|
-
|
|
4941
|
+
interface CreateAccountFromPrivateKeyArgs {
|
|
4942
|
+
privateKey: PrivateKey;
|
|
4943
|
+
address?: AccountAddressInput;
|
|
4944
|
+
legacy?: boolean;
|
|
4945
|
+
}
|
|
4504
4946
|
/**
|
|
4505
|
-
*
|
|
4506
|
-
*
|
|
4947
|
+
* Arguments for generating an `Ed25519Account`.
|
|
4948
|
+
* This is the input type used by default.
|
|
4507
4949
|
*/
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
*/
|
|
4512
|
-
abstract serialize(serializer: Serializer): void;
|
|
4513
|
-
/**
|
|
4514
|
-
* Deserialize a Transaction Payload
|
|
4515
|
-
*/
|
|
4516
|
-
static deserialize(deserializer: Deserializer): TransactionPayload;
|
|
4950
|
+
interface GenerateEd25519AccountArgs {
|
|
4951
|
+
scheme?: SigningSchemeInput.Ed25519;
|
|
4952
|
+
legacy?: true;
|
|
4517
4953
|
}
|
|
4518
4954
|
/**
|
|
4519
|
-
*
|
|
4955
|
+
* Arguments for generating an `SingleKeyAccount` with ah underlying `Ed25519PrivateKey`.
|
|
4956
|
+
* The `legacy` argument needs to be explicitly set to false,
|
|
4957
|
+
* otherwise an `Ed25519Account` will be returned instead.
|
|
4520
4958
|
*/
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
serialize(serializer: Serializer): void;
|
|
4525
|
-
static load(deserializer: Deserializer): TransactionPayloadScript;
|
|
4959
|
+
interface GenerateEd25519SingleKeyAccountArgs {
|
|
4960
|
+
scheme?: SigningSchemeInput.Ed25519;
|
|
4961
|
+
legacy: false;
|
|
4526
4962
|
}
|
|
4527
4963
|
/**
|
|
4528
|
-
*
|
|
4964
|
+
* Arguments for generating an `SingleKeyAccount` with any supported private key
|
|
4965
|
+
* that is not an `Ed25519PrivateKey`.
|
|
4966
|
+
* The `legacy` argument defaults to false and cannot be explicitly set to true.
|
|
4529
4967
|
*/
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
serialize(serializer: Serializer): void;
|
|
4534
|
-
static load(deserializer: Deserializer): TransactionPayloadEntryFunction;
|
|
4968
|
+
interface GenerateSingleKeyAccountArgs {
|
|
4969
|
+
scheme: Exclude<SigningSchemeInput, SigningSchemeInput.Ed25519>;
|
|
4970
|
+
legacy?: false;
|
|
4535
4971
|
}
|
|
4536
4972
|
/**
|
|
4537
|
-
*
|
|
4973
|
+
* Arguments for generating an opaque `Account`.
|
|
4974
|
+
* This is used when the input signature scheme is not known at compilation time.
|
|
4538
4975
|
*/
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
serialize(serializer: Serializer): void;
|
|
4543
|
-
static load(deserializer: Deserializer): TransactionPayloadMultiSig;
|
|
4976
|
+
interface GenerateAccountArgs {
|
|
4977
|
+
scheme?: SigningSchemeInput;
|
|
4978
|
+
legacy?: boolean;
|
|
4544
4979
|
}
|
|
4545
4980
|
/**
|
|
4546
|
-
*
|
|
4981
|
+
* Arguments for deriving a private key from a mnemonic phrase and a BIP44 path.
|
|
4547
4982
|
*/
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4983
|
+
interface PrivateKeyFromDerivationPathArgs {
|
|
4984
|
+
path: string;
|
|
4985
|
+
mnemonic: string;
|
|
4986
|
+
}
|
|
4987
|
+
/**
|
|
4988
|
+
* Interface for a generic Aptos account.
|
|
4989
|
+
*
|
|
4990
|
+
* The interface is defined as abstract class to provide a single entrypoint for account generation,
|
|
4991
|
+
* either through `Account.generate()` or `Account.fromDerivationPath`.
|
|
4992
|
+
* Despite this being an abstract class, it should be treated as an interface and enforced using
|
|
4993
|
+
* the `implements` keyword.
|
|
4994
|
+
*
|
|
4995
|
+
* Note: Generating an account instance does not create the account on-chain.
|
|
4996
|
+
*/
|
|
4997
|
+
declare abstract class Account$1 {
|
|
4553
4998
|
/**
|
|
4554
|
-
*
|
|
4555
|
-
* @param module_name Fully qualified module name in format "account_address::module_name" e.g. "0x1::coin"
|
|
4556
|
-
* @param function_name The function name. e.g "transfer"
|
|
4557
|
-
* @param type_args Type arguments that move function requires.
|
|
4558
|
-
*
|
|
4559
|
-
* @example
|
|
4560
|
-
* A coin transfer function has one type argument "CoinType".
|
|
4561
|
-
* ```
|
|
4562
|
-
* public entry fun transfer<CoinType>(from: &signer, to: address, amount: u64)
|
|
4563
|
-
* ```
|
|
4564
|
-
* @param args arguments to the move function.
|
|
4565
|
-
*
|
|
4566
|
-
* @example
|
|
4567
|
-
* A coin transfer function has three arguments "from", "to" and "amount".
|
|
4568
|
-
* ```
|
|
4569
|
-
* public entry fun transfer<CoinType>(from: &signer, to: address, amount: u64)
|
|
4570
|
-
* ```
|
|
4999
|
+
* Public key associated with the account
|
|
4571
5000
|
*/
|
|
4572
|
-
|
|
5001
|
+
abstract readonly publicKey: AccountPublicKey;
|
|
4573
5002
|
/**
|
|
4574
|
-
*
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
*
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
*
|
|
4583
|
-
*
|
|
4584
|
-
*
|
|
4585
|
-
* @
|
|
5003
|
+
* Account address associated with the account
|
|
5004
|
+
*/
|
|
5005
|
+
abstract readonly accountAddress: AccountAddress;
|
|
5006
|
+
/**
|
|
5007
|
+
* Signing scheme used to sign transactions
|
|
5008
|
+
*/
|
|
5009
|
+
abstract signingScheme: SigningScheme;
|
|
5010
|
+
/**
|
|
5011
|
+
* Derives an account from a randomly generated private key.
|
|
5012
|
+
* @param args.scheme The signature scheme to use, to generate the private key
|
|
5013
|
+
* @param args.legacy Whether to use a legacy authentication scheme, when applicable
|
|
5014
|
+
* @returns An account compatible with the provided signature scheme
|
|
5015
|
+
*/
|
|
5016
|
+
static generate(args?: GenerateEd25519AccountArgs): Ed25519Account;
|
|
5017
|
+
static generate(args: GenerateEd25519SingleKeyAccountArgs): SingleKeyAccount;
|
|
5018
|
+
static generate(args: GenerateSingleKeyAccountArgs): SingleKeyAccount;
|
|
5019
|
+
static generate(args: GenerateAccountArgs): Account$1;
|
|
5020
|
+
/**
|
|
5021
|
+
* Creates an account from the provided private key.
|
|
4586
5022
|
*
|
|
4587
|
-
* @
|
|
4588
|
-
*
|
|
4589
|
-
*
|
|
4590
|
-
* public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
|
|
4591
|
-
* ```
|
|
4592
|
-
* @returns EntryFunction
|
|
5023
|
+
* @param args.privateKey a valid private key
|
|
5024
|
+
* @param args.address the account's address. If not provided, it will be derived from the public key.
|
|
5025
|
+
* @param args.legacy Whether to use a legacy authentication scheme, when applicable
|
|
4593
5026
|
*/
|
|
4594
|
-
static
|
|
4595
|
-
|
|
5027
|
+
static fromPrivateKey(args: CreateEd25519AccountFromPrivateKeyArgs): Ed25519Account;
|
|
5028
|
+
static fromPrivateKey(args: CreateEd25519SingleKeyAccountFromPrivateKeyArgs): SingleKeyAccount;
|
|
5029
|
+
static fromPrivateKey(args: CreateSingleKeyAccountFromPrivateKeyArgs): SingleKeyAccount;
|
|
5030
|
+
static fromPrivateKey(args: CreateAccountFromPrivateKeyArgs): Account$1;
|
|
4596
5031
|
/**
|
|
4597
|
-
*
|
|
4598
|
-
*
|
|
5032
|
+
* @deprecated use `fromPrivateKey` instead.
|
|
5033
|
+
* Instantiates an account given a private key and a specified account address.
|
|
5034
|
+
* This is primarily used to instantiate an `Account` that has had its authentication key rotated.
|
|
4599
5035
|
*
|
|
4600
|
-
*
|
|
4601
|
-
*
|
|
4602
|
-
*
|
|
5036
|
+
* @param args.privateKey PrivateKey - the underlying private key for the account
|
|
5037
|
+
* @param args.address AccountAddress - The account address the `Account` will sign for
|
|
5038
|
+
* @param args.legacy optional. If set to false, the keypair generated is a Unified keypair. Defaults
|
|
5039
|
+
* to generating a Legacy Ed25519 keypair
|
|
4603
5040
|
*
|
|
4604
|
-
*
|
|
4605
|
-
|
|
5041
|
+
* @returns Account
|
|
5042
|
+
*/
|
|
5043
|
+
static fromPrivateKeyAndAddress(args: CreateAccountFromPrivateKeyArgs): Account$1;
|
|
5044
|
+
/**
|
|
5045
|
+
* Derives an account with bip44 path and mnemonics
|
|
4606
5046
|
*
|
|
4607
|
-
*
|
|
4608
|
-
*
|
|
5047
|
+
* @param args.scheme The signature scheme to derive the private key with
|
|
5048
|
+
* @param args.path the BIP44 derive hardened path (e.g. m/44'/637'/0'/0'/0') for Ed25519,
|
|
5049
|
+
* or non-hardened path (e.g. m/44'/637'/0'/0/0) for secp256k1
|
|
5050
|
+
* Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
|
|
5051
|
+
* @param args.mnemonic the mnemonic seed phrase of the account
|
|
5052
|
+
*/
|
|
5053
|
+
static fromDerivationPath(args: GenerateEd25519AccountArgs & PrivateKeyFromDerivationPathArgs): Ed25519Account;
|
|
5054
|
+
static fromDerivationPath(args: GenerateEd25519SingleKeyAccountArgs & PrivateKeyFromDerivationPathArgs): SingleKeyAccount;
|
|
5055
|
+
static fromDerivationPath(args: GenerateSingleKeyAccountArgs & PrivateKeyFromDerivationPathArgs): SingleKeyAccount;
|
|
5056
|
+
static fromDerivationPath(args: GenerateAccountArgs & PrivateKeyFromDerivationPathArgs): Account$1;
|
|
5057
|
+
/**
|
|
5058
|
+
* @deprecated use `publicKey.authKey()` instead.
|
|
5059
|
+
* This key enables account owners to rotate their private key(s)
|
|
5060
|
+
* associated with the account without changing the address that hosts their account.
|
|
5061
|
+
* See here for more info: {@link https://aptos.dev/concepts/accounts#single-signer-authentication}
|
|
4609
5062
|
*
|
|
4610
|
-
* @param
|
|
4611
|
-
* @returns
|
|
5063
|
+
* @param args.publicKey PublicKey - public key of the account
|
|
5064
|
+
* @returns The authentication key for the associated account
|
|
5065
|
+
*/
|
|
5066
|
+
static authKey(args: {
|
|
5067
|
+
publicKey: AccountPublicKey;
|
|
5068
|
+
}): AuthenticationKey;
|
|
5069
|
+
/**
|
|
5070
|
+
* Sign a transaction using the available signing capabilities.
|
|
5071
|
+
* @param transaction the raw transaction
|
|
5072
|
+
* @return the AccountAuthenticator containing the signature og the transaction, together with the account's public key
|
|
5073
|
+
*/
|
|
5074
|
+
abstract signWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticator;
|
|
5075
|
+
/**
|
|
5076
|
+
* Sign the given message with the private key.
|
|
5077
|
+
* @param message in HexInput format
|
|
5078
|
+
* @returns AccountSignature
|
|
5079
|
+
*/
|
|
5080
|
+
abstract sign(message: HexInput): Signature;
|
|
5081
|
+
abstract signTransaction(transaction: AnyRawTransaction): Signature;
|
|
5082
|
+
/**
|
|
5083
|
+
* @param args.message raw message data in HexInput format
|
|
5084
|
+
* @param args.signature signed message signature
|
|
5085
|
+
*/
|
|
5086
|
+
verifySignature(args: VerifySignatureArgs): boolean;
|
|
5087
|
+
}
|
|
5088
|
+
|
|
5089
|
+
interface Ed25519SignerConstructorArgs {
|
|
5090
|
+
privateKey: Ed25519PrivateKey;
|
|
5091
|
+
address?: AccountAddressInput;
|
|
5092
|
+
}
|
|
5093
|
+
interface Ed25519SignerFromDerivationPathArgs {
|
|
5094
|
+
path: string;
|
|
5095
|
+
mnemonic: string;
|
|
5096
|
+
}
|
|
5097
|
+
interface VerifyEd25519SignatureArgs {
|
|
5098
|
+
message: HexInput;
|
|
5099
|
+
signature: Ed25519Signature;
|
|
5100
|
+
}
|
|
5101
|
+
/**
|
|
5102
|
+
* Signer implementation for the Ed25519 authentication scheme.
|
|
5103
|
+
* This extends an {@link Ed25519Account} by adding signing capabilities through an {@link Ed25519PrivateKey}.
|
|
5104
|
+
*
|
|
5105
|
+
* Note: Generating a signer instance does not create the account on-chain.
|
|
5106
|
+
*/
|
|
5107
|
+
declare class Ed25519Account implements Account$1 {
|
|
5108
|
+
/**
|
|
5109
|
+
* Private key associated with the account
|
|
5110
|
+
*/
|
|
5111
|
+
readonly privateKey: Ed25519PrivateKey;
|
|
5112
|
+
readonly publicKey: Ed25519PublicKey;
|
|
5113
|
+
readonly accountAddress: AccountAddress;
|
|
5114
|
+
readonly signingScheme = SigningScheme.Ed25519;
|
|
5115
|
+
constructor(args: Ed25519SignerConstructorArgs);
|
|
5116
|
+
/**
|
|
5117
|
+
* Derives a signer from a randomly generated private key
|
|
5118
|
+
*/
|
|
5119
|
+
static generate(): Ed25519Account;
|
|
5120
|
+
/**
|
|
5121
|
+
* Derives an account with bip44 path and mnemonics
|
|
4612
5122
|
*
|
|
5123
|
+
* @param args.path the BIP44 derive hardened path e.g. m/44'/637'/0'/0'/0'
|
|
5124
|
+
* Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
|
|
5125
|
+
* @param args.mnemonic the mnemonic seed phrase of the account
|
|
4613
5126
|
*/
|
|
4614
|
-
static
|
|
5127
|
+
static fromDerivationPath(args: Ed25519SignerFromDerivationPathArgs): Ed25519Account;
|
|
5128
|
+
verifySignature(args: VerifyEd25519SignatureArgs): boolean;
|
|
5129
|
+
signWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorEd25519;
|
|
5130
|
+
sign(message: HexInput): Ed25519Signature;
|
|
5131
|
+
signTransaction(transaction: AnyRawTransaction): Ed25519Signature;
|
|
4615
5132
|
}
|
|
4616
|
-
|
|
4617
|
-
|
|
4618
|
-
|
|
4619
|
-
|
|
5133
|
+
|
|
5134
|
+
declare class EphemeralKeyPair {
|
|
5135
|
+
readonly blinder: Uint8Array;
|
|
5136
|
+
readonly expiryDateSecs: bigint;
|
|
5137
|
+
readonly nonce: string;
|
|
5138
|
+
readonly privateKey: PrivateKey;
|
|
5139
|
+
readonly publicKey: EphemeralPublicKey;
|
|
5140
|
+
constructor(args: {
|
|
5141
|
+
privateKey: PrivateKey;
|
|
5142
|
+
expiryDateSecs?: bigint;
|
|
5143
|
+
blinder?: HexInput;
|
|
5144
|
+
});
|
|
5145
|
+
static generate(args?: {
|
|
5146
|
+
scheme: SigningSchemeInput;
|
|
5147
|
+
}): EphemeralKeyPair;
|
|
5148
|
+
generateNonce(): string;
|
|
4620
5149
|
/**
|
|
4621
|
-
*
|
|
5150
|
+
* Sign the given message with the private key.
|
|
5151
|
+
* *
|
|
5152
|
+
* @param data in HexInput format
|
|
5153
|
+
* @returns EphemeralSignature
|
|
4622
5154
|
*/
|
|
4623
|
-
|
|
5155
|
+
sign(data: HexInput): EphemeralSignature;
|
|
5156
|
+
}
|
|
5157
|
+
|
|
5158
|
+
declare class KeylessAccount implements Account$1 {
|
|
5159
|
+
static readonly PEPPER_LENGTH: number;
|
|
5160
|
+
static readonly SLIP_0010_SEED: string;
|
|
5161
|
+
static readonly APTOS_CONNECT_CLIENT_ID: string;
|
|
5162
|
+
publicKey: KeylessPublicKey;
|
|
5163
|
+
ephemeralKeyPair: EphemeralKeyPair;
|
|
5164
|
+
uidKey: string;
|
|
5165
|
+
uidVal: string;
|
|
5166
|
+
aud: string;
|
|
5167
|
+
pepper: Uint8Array;
|
|
5168
|
+
accountAddress: AccountAddress;
|
|
5169
|
+
proof: SignedGroth16Signature | Promise<SignedGroth16Signature>;
|
|
5170
|
+
signingScheme: SigningScheme;
|
|
5171
|
+
jwt: string;
|
|
5172
|
+
constructor(args: {
|
|
5173
|
+
address?: AccountAddress;
|
|
5174
|
+
ephemeralKeyPair: EphemeralKeyPair;
|
|
5175
|
+
iss: string;
|
|
5176
|
+
uidKey: string;
|
|
5177
|
+
uidVal: string;
|
|
5178
|
+
aud: string;
|
|
5179
|
+
pepper: HexInput;
|
|
5180
|
+
proofFetcherOrData: Promise<SignedGroth16Signature> | SignedGroth16Signature;
|
|
5181
|
+
jwt: string;
|
|
5182
|
+
});
|
|
5183
|
+
private initialize;
|
|
5184
|
+
signWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorSingleKey;
|
|
5185
|
+
waitForProofFetch(): Promise<void>;
|
|
5186
|
+
sign(data: HexInput): Signature;
|
|
5187
|
+
signTransaction(transaction: AnyRawTransaction): Signature;
|
|
5188
|
+
signWithOpenIdSignature(data: HexInput): Signature;
|
|
5189
|
+
deriveAptosConnectPublicKey(): KeylessPublicKey;
|
|
5190
|
+
verifySignature(args: {
|
|
5191
|
+
message: HexInput;
|
|
5192
|
+
signature: Signature;
|
|
5193
|
+
}): boolean;
|
|
5194
|
+
static fromJWTAndProof(args: {
|
|
5195
|
+
proofFetcherOrData: Promise<SignedGroth16Signature> | SignedGroth16Signature;
|
|
5196
|
+
jwt: string;
|
|
5197
|
+
ephemeralKeyPair: EphemeralKeyPair;
|
|
5198
|
+
pepper: HexInput;
|
|
5199
|
+
uidKey?: string;
|
|
5200
|
+
}): KeylessAccount;
|
|
5201
|
+
static fromDerivationPath(path: string, seed: Uint8Array): Uint8Array;
|
|
5202
|
+
}
|
|
5203
|
+
|
|
5204
|
+
declare class MultiKeyAccount implements Account$1 {
|
|
4624
5205
|
/**
|
|
4625
|
-
*
|
|
5206
|
+
* Public key associated with the account
|
|
4626
5207
|
*/
|
|
4627
|
-
readonly
|
|
5208
|
+
readonly publicKey: MultiKey;
|
|
4628
5209
|
/**
|
|
4629
|
-
*
|
|
5210
|
+
* Account address associated with the account
|
|
4630
5211
|
*/
|
|
4631
|
-
readonly
|
|
5212
|
+
readonly accountAddress: AccountAddress;
|
|
4632
5213
|
/**
|
|
4633
|
-
*
|
|
5214
|
+
* Signing scheme used to sign transactions
|
|
5215
|
+
*/
|
|
5216
|
+
readonly signingScheme: SigningScheme;
|
|
5217
|
+
signers: Account$1[];
|
|
5218
|
+
signaturesBitmap: Uint8Array;
|
|
5219
|
+
/**
|
|
5220
|
+
* constructor for Account
|
|
4634
5221
|
*
|
|
4635
|
-
*
|
|
4636
|
-
* @param type_args The type arguments that the bytecode function requires.
|
|
5222
|
+
* Need to update this to use the new crypto library if new schemes are added.
|
|
4637
5223
|
*
|
|
4638
|
-
* @
|
|
4639
|
-
*
|
|
4640
|
-
*
|
|
4641
|
-
*
|
|
4642
|
-
* ```
|
|
4643
|
-
* @param args The arguments that the bytecode function requires.
|
|
5224
|
+
* @param args.privateKey PrivateKey - private key of the account
|
|
5225
|
+
* @param args.address AccountAddress - address of the account
|
|
5226
|
+
* @param args.legacy optional. If set to false, the keypair authentication keys will be derived with a unified scheme.
|
|
5227
|
+
* Defaults to deriving an authentication key with the legacy scheme.
|
|
4644
5228
|
*
|
|
4645
|
-
*
|
|
4646
|
-
*
|
|
4647
|
-
* ```
|
|
4648
|
-
* public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
|
|
4649
|
-
* ```
|
|
5229
|
+
* This method is private because it should only be called by the factory static methods.
|
|
5230
|
+
* @returns Account
|
|
4650
5231
|
*/
|
|
4651
|
-
constructor(
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
}
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
5232
|
+
constructor(args: {
|
|
5233
|
+
multiKey: MultiKey;
|
|
5234
|
+
signers: Account$1[];
|
|
5235
|
+
});
|
|
5236
|
+
static fromPublicKeysAndSigners(args: {
|
|
5237
|
+
publicKeys: PublicKey[];
|
|
5238
|
+
signaturesRequired: number;
|
|
5239
|
+
signers: Account$1[];
|
|
5240
|
+
}): MultiKeyAccount;
|
|
5241
|
+
static isMultiKeySigner(account: Account$1): account is MultiKeyAccount;
|
|
5242
|
+
signWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorMultiKey;
|
|
5243
|
+
waitForProofFetch(): Promise<void>;
|
|
4661
5244
|
/**
|
|
4662
|
-
*
|
|
5245
|
+
* Sign the given message with the private key.
|
|
4663
5246
|
*
|
|
4664
|
-
*
|
|
5247
|
+
* TODO: Add sign transaction or specific types
|
|
4665
5248
|
*
|
|
4666
|
-
* @param
|
|
4667
|
-
*
|
|
5249
|
+
* @param data in HexInput format
|
|
5250
|
+
* @returns Signature
|
|
4668
5251
|
*/
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
static deserialize(deserializer: Deserializer): MultiSig;
|
|
4672
|
-
}
|
|
4673
|
-
/**
|
|
4674
|
-
* Representation of a MultiSig Transaction Payload from `multisig_account.move`
|
|
4675
|
-
* that can be serialized and deserialized
|
|
4676
|
-
|
|
4677
|
-
* This class exists right now to represent an extensible transaction payload class for
|
|
4678
|
-
* transactions used in `multisig_account.move`. Eventually, this class will be able to
|
|
4679
|
-
* support script payloads when the `multisig_account.move` module supports them.
|
|
4680
|
-
*/
|
|
4681
|
-
declare class MultiSigTransactionPayload extends Serializable {
|
|
4682
|
-
readonly transaction_payload: EntryFunction;
|
|
5252
|
+
sign(data: HexInput): MultiSignature;
|
|
5253
|
+
signTransaction(transaction: AnyRawTransaction): MultiSignature;
|
|
4683
5254
|
/**
|
|
4684
|
-
*
|
|
5255
|
+
* Verify the given message and signature with the public key.
|
|
4685
5256
|
*
|
|
4686
|
-
* @param
|
|
4687
|
-
*
|
|
4688
|
-
*
|
|
5257
|
+
* @param args.message raw message data in HexInput format
|
|
5258
|
+
* @param args.signature signed message Signature
|
|
5259
|
+
* @returns
|
|
4689
5260
|
*/
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
5261
|
+
verifySignature(args: {
|
|
5262
|
+
message: HexInput;
|
|
5263
|
+
signature: Signature;
|
|
5264
|
+
}): boolean;
|
|
4693
5265
|
}
|
|
4694
5266
|
|
|
4695
5267
|
/**
|
|
4696
|
-
*
|
|
5268
|
+
* A class to query all `Account` related queries on Aptos.
|
|
4697
5269
|
*/
|
|
4698
|
-
declare class
|
|
4699
|
-
readonly
|
|
4700
|
-
|
|
4701
|
-
readonly payload: TransactionPayload;
|
|
4702
|
-
readonly max_gas_amount: bigint;
|
|
4703
|
-
readonly gas_unit_price: bigint;
|
|
4704
|
-
readonly expiration_timestamp_secs: bigint;
|
|
4705
|
-
readonly chain_id: ChainId;
|
|
5270
|
+
declare class Account {
|
|
5271
|
+
readonly config: AptosConfig;
|
|
5272
|
+
constructor(config: AptosConfig);
|
|
4706
5273
|
/**
|
|
4707
|
-
*
|
|
4708
|
-
* RawTransactions must be signed before Aptos chain can execute them.
|
|
5274
|
+
* Queries the current state for an Aptos account given its account address
|
|
4709
5275
|
*
|
|
4710
|
-
* @param
|
|
4711
|
-
*
|
|
4712
|
-
*
|
|
4713
|
-
*
|
|
4714
|
-
*
|
|
4715
|
-
*
|
|
4716
|
-
*
|
|
4717
|
-
*
|
|
4718
|
-
*
|
|
4719
|
-
*
|
|
5276
|
+
* @param args.accountAddress Aptos account address
|
|
5277
|
+
*
|
|
5278
|
+
* @returns The account data
|
|
5279
|
+
*
|
|
5280
|
+
* @example An example of the returned account
|
|
5281
|
+
* ```
|
|
5282
|
+
* {
|
|
5283
|
+
* sequence_number: "1",
|
|
5284
|
+
* authentication_key: "0x5307b5f4bc67829097a8ba9b43dba3b88261eeccd1f709d9bde240fc100fbb69"
|
|
5285
|
+
* }
|
|
5286
|
+
* ```
|
|
4720
5287
|
*/
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
}
|
|
4725
|
-
/**
|
|
4726
|
-
* Representation of a Raw Transaction With Data that can serialized and deserialized
|
|
4727
|
-
*/
|
|
4728
|
-
declare abstract class RawTransactionWithData extends Serializable {
|
|
5288
|
+
getAccountInfo(args: {
|
|
5289
|
+
accountAddress: AccountAddressInput;
|
|
5290
|
+
}): Promise<AccountData>;
|
|
4729
5291
|
/**
|
|
4730
|
-
*
|
|
5292
|
+
* Queries for all modules in an account given an account address
|
|
5293
|
+
*
|
|
5294
|
+
* Note: In order to get all account modules, this function may call the API
|
|
5295
|
+
* multiple times as it auto paginates.
|
|
5296
|
+
*
|
|
5297
|
+
* @param args.accountAddress Aptos account address
|
|
5298
|
+
* @param args.options.offset The number module to start returning results from
|
|
5299
|
+
* @param args.options.limit The number of results to return
|
|
5300
|
+
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
5301
|
+
*
|
|
5302
|
+
* @returns Account modules
|
|
4731
5303
|
*/
|
|
4732
|
-
|
|
5304
|
+
getAccountModules(args: {
|
|
5305
|
+
accountAddress: AccountAddressInput;
|
|
5306
|
+
options?: PaginationArgs & LedgerVersionArg;
|
|
5307
|
+
}): Promise<MoveModuleBytecode[]>;
|
|
4733
5308
|
/**
|
|
4734
|
-
*
|
|
5309
|
+
* Queries for a specific account module given account address and module name
|
|
5310
|
+
*
|
|
5311
|
+
* @param args.accountAddress Aptos account address
|
|
5312
|
+
* @param args.moduleName The name of the module
|
|
5313
|
+
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
5314
|
+
*
|
|
5315
|
+
* @returns Account module
|
|
5316
|
+
*
|
|
5317
|
+
* @example
|
|
5318
|
+
* const module = await aptos.getAccountModule({accountAddress:"0x456"})
|
|
5319
|
+
* // An example of an account module response
|
|
5320
|
+
* ```
|
|
5321
|
+
* {
|
|
5322
|
+
* bytecode: "0xa11ceb0b0600000006010002030206050807070f0d081c200",
|
|
5323
|
+
* abi: { address: "0x1" }
|
|
5324
|
+
* }
|
|
5325
|
+
* ```
|
|
4735
5326
|
*/
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
declare class MultiAgentRawTransaction extends RawTransactionWithData {
|
|
5327
|
+
getAccountModule(args: {
|
|
5328
|
+
accountAddress: AccountAddressInput;
|
|
5329
|
+
moduleName: string;
|
|
5330
|
+
options?: LedgerVersionArg;
|
|
5331
|
+
}): Promise<MoveModuleBytecode>;
|
|
4742
5332
|
/**
|
|
4743
|
-
*
|
|
5333
|
+
* Queries account transactions given an account address
|
|
5334
|
+
*
|
|
5335
|
+
* Note: In order to get all account transactions, this function may call the API
|
|
5336
|
+
* multiple times as it auto paginates.
|
|
5337
|
+
*
|
|
5338
|
+
* @example
|
|
5339
|
+
* const transactions = await aptos.getAccountTransactions({accountAddress:"0x456"})
|
|
5340
|
+
*
|
|
5341
|
+
* @param args.accountAddress Aptos account address
|
|
5342
|
+
* @param args.options.offset The number transaction to start returning results from
|
|
5343
|
+
* @param args.options.limit The number of results to return
|
|
5344
|
+
*
|
|
5345
|
+
* @returns The account transactions
|
|
4744
5346
|
*/
|
|
4745
|
-
|
|
5347
|
+
getAccountTransactions(args: {
|
|
5348
|
+
accountAddress: AccountAddressInput;
|
|
5349
|
+
options?: PaginationArgs;
|
|
5350
|
+
}): Promise<TransactionResponse[]>;
|
|
4746
5351
|
/**
|
|
4747
|
-
*
|
|
5352
|
+
* Queries all account resources given an account address
|
|
5353
|
+
*
|
|
5354
|
+
* Note: In order to get all account resources, this function may call the API
|
|
5355
|
+
* multiple times as it auto paginates.
|
|
5356
|
+
*
|
|
5357
|
+
* @example
|
|
5358
|
+
* const resources = await aptos.getAccountResources({accountAddress:"0x456"})
|
|
5359
|
+
*
|
|
5360
|
+
* @param args.accountAddress Aptos account address
|
|
5361
|
+
* @param args.options.offset The number resource to start returning results from
|
|
5362
|
+
* @param args.options.limit The number of results to return
|
|
5363
|
+
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
5364
|
+
* @returns Account resources
|
|
4748
5365
|
*/
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
5366
|
+
getAccountResources(args: {
|
|
5367
|
+
accountAddress: AccountAddressInput;
|
|
5368
|
+
options?: PaginationArgs & LedgerVersionArg;
|
|
5369
|
+
}): Promise<MoveResource[]>;
|
|
5370
|
+
/**
|
|
5371
|
+
* Queries a specific account resource given account address and resource type. Note that the default is `any` in order
|
|
5372
|
+
* to allow for ease of accessing properties of the object.
|
|
5373
|
+
*
|
|
5374
|
+
* @type The typed output of the resource
|
|
5375
|
+
* @param args.accountAddress Aptos account address
|
|
5376
|
+
* @param args.resourceType String representation of an on-chain Move struct type, i.e "0x1::aptos_coin::AptosCoin"
|
|
5377
|
+
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
5378
|
+
*
|
|
5379
|
+
* @returns Account resource
|
|
5380
|
+
*
|
|
5381
|
+
* @example
|
|
5382
|
+
* const resource = await aptos.getAccountResource({accountAddress:"0x456"})
|
|
5383
|
+
*
|
|
5384
|
+
*/
|
|
5385
|
+
getAccountResource<T extends {} = any>(args: {
|
|
5386
|
+
accountAddress: AccountAddressInput;
|
|
5387
|
+
resourceType: MoveStructId;
|
|
5388
|
+
options?: LedgerVersionArg;
|
|
5389
|
+
}): Promise<T>;
|
|
4758
5390
|
/**
|
|
4759
|
-
*
|
|
5391
|
+
* Looks up the account address for a given authentication key
|
|
5392
|
+
*
|
|
5393
|
+
* This handles both if the account's authentication key has been rotated or not.
|
|
5394
|
+
*
|
|
5395
|
+
* @example
|
|
5396
|
+
* const accountAddress = await aptos.lookupOriginalAccountAddress({authenticationKey:account.accountAddress})
|
|
5397
|
+
*
|
|
5398
|
+
* @param args.authenticationKey The authentication key
|
|
5399
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5400
|
+
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
5401
|
+
* @returns Promise<AccountAddress> The accountAddress associated with the authentication key
|
|
4760
5402
|
*/
|
|
4761
|
-
|
|
5403
|
+
lookupOriginalAccountAddress(args: {
|
|
5404
|
+
authenticationKey: AccountAddressInput;
|
|
5405
|
+
minimumLedgerVersion?: AnyNumber;
|
|
5406
|
+
options?: LedgerVersionArg;
|
|
5407
|
+
}): Promise<AccountAddress>;
|
|
4762
5408
|
/**
|
|
4763
|
-
*
|
|
5409
|
+
* Queries the current count of tokens owned by an account
|
|
5410
|
+
*
|
|
5411
|
+
* @example
|
|
5412
|
+
* const tokensCount = await aptos.getAccountTokensCount({accountAddress:"0x456"})
|
|
5413
|
+
*
|
|
5414
|
+
* @param args.accountAddress The account address
|
|
5415
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5416
|
+
* @returns Current count of tokens owned by the account
|
|
4764
5417
|
*/
|
|
4765
|
-
|
|
5418
|
+
getAccountTokensCount(args: {
|
|
5419
|
+
accountAddress: AccountAddressInput;
|
|
5420
|
+
minimumLedgerVersion?: AnyNumber;
|
|
5421
|
+
}): Promise<number>;
|
|
4766
5422
|
/**
|
|
4767
|
-
*
|
|
5423
|
+
* Queries the account's current owned tokens.
|
|
5424
|
+
*
|
|
5425
|
+
* This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
|
|
5426
|
+
* If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
|
|
5427
|
+
*
|
|
5428
|
+
* @example
|
|
5429
|
+
* const accountOwnedTokens = await aptos.getAccountOwnedTokens({accountAddress:"0x456"})
|
|
5430
|
+
*
|
|
5431
|
+
* @param args.accountAddress The account address we want to get the tokens for
|
|
5432
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5433
|
+
* @param args.options.tokenStandard The NFT standard to query for
|
|
5434
|
+
* @param args.options.offset The number token to start returning results from
|
|
5435
|
+
* @param args.options.limit The number of results to return
|
|
5436
|
+
* @param args.options.orderBy The order to sort the tokens by
|
|
5437
|
+
* @returns Tokens array with the token data
|
|
4768
5438
|
*/
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
}
|
|
4774
|
-
|
|
4775
|
-
/**
|
|
4776
|
-
* Representation of a SimpleTransaction that can serialized and deserialized
|
|
4777
|
-
*/
|
|
4778
|
-
declare class SimpleTransaction extends Serializable {
|
|
4779
|
-
rawTransaction: RawTransaction;
|
|
4780
|
-
feePayerAddress?: AccountAddress | undefined;
|
|
4781
|
-
readonly secondarySignerAddresses: undefined;
|
|
5439
|
+
getAccountOwnedTokens(args: {
|
|
5440
|
+
accountAddress: AccountAddressInput;
|
|
5441
|
+
minimumLedgerVersion?: AnyNumber;
|
|
5442
|
+
options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensQueryResponse[0]>;
|
|
5443
|
+
}): Promise<GetAccountOwnedTokensQueryResponse>;
|
|
4782
5444
|
/**
|
|
4783
|
-
*
|
|
4784
|
-
* can be submitted to Aptos chain for execution.
|
|
5445
|
+
* Queries all current tokens of a specific collection that an account owns by the collection address
|
|
4785
5446
|
*
|
|
4786
|
-
*
|
|
4787
|
-
*
|
|
5447
|
+
* This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
|
|
5448
|
+
* If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
|
|
4788
5449
|
*
|
|
4789
|
-
* @
|
|
4790
|
-
*
|
|
5450
|
+
* @example
|
|
5451
|
+
* const accountOwnedTokens = await aptos.getAccountOwnedTokensFromCollectionAddress({accountAddress:"0x123", collectionAddress:"0x456"})
|
|
5452
|
+
*
|
|
5453
|
+
* @param args.accountAddress The account address we want to get the tokens for
|
|
5454
|
+
* @param args.collectionAddress The address of the collection being queried
|
|
5455
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5456
|
+
* @param args.options.tokenStandard The NFT standard to query for
|
|
5457
|
+
* @param args.options.offset The number token to start returning results from
|
|
5458
|
+
* @param args.options.limit The number of results to return
|
|
5459
|
+
* @param args.options.orderBy The order to sort the tokens by
|
|
5460
|
+
* @returns Tokens array with the token data
|
|
4791
5461
|
*/
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
* Representation of the challenge which is needed to sign by owner of the account
|
|
4799
|
-
* to rotate the authentication key.
|
|
4800
|
-
*/
|
|
4801
|
-
declare class RotationProofChallenge extends Serializable {
|
|
4802
|
-
readonly accountAddress: AccountAddress;
|
|
4803
|
-
readonly moduleName: MoveString;
|
|
4804
|
-
readonly structName: MoveString;
|
|
4805
|
-
readonly originator: AccountAddress;
|
|
4806
|
-
readonly currentAuthKey: AccountAddress;
|
|
4807
|
-
readonly newPublicKey: MoveVector<U8>;
|
|
4808
|
-
readonly sequenceNumber: U64;
|
|
4809
|
-
constructor(args: {
|
|
4810
|
-
sequenceNumber: AnyNumber;
|
|
4811
|
-
originator: AccountAddress;
|
|
4812
|
-
currentAuthKey: AccountAddress;
|
|
4813
|
-
newPublicKey: PublicKey;
|
|
4814
|
-
});
|
|
4815
|
-
serialize(serializer: Serializer): void;
|
|
4816
|
-
}
|
|
4817
|
-
|
|
4818
|
-
declare abstract class TransactionAuthenticator extends Serializable {
|
|
4819
|
-
abstract serialize(serializer: Serializer): void;
|
|
4820
|
-
static deserialize(deserializer: Deserializer): TransactionAuthenticator;
|
|
4821
|
-
}
|
|
4822
|
-
/**
|
|
4823
|
-
* Transaction authenticator Ed25519 for a single signer transaction
|
|
4824
|
-
*
|
|
4825
|
-
* @param public_key Client's public key.
|
|
4826
|
-
* @param signature Ed25519 signature of a raw transaction.
|
|
4827
|
-
* @see {@link https://aptos.dev/integration/creating-a-signed-transaction | Creating a Signed Transaction}
|
|
4828
|
-
* for details about generating a signature.
|
|
4829
|
-
*/
|
|
4830
|
-
declare class TransactionAuthenticatorEd25519 extends TransactionAuthenticator {
|
|
4831
|
-
readonly public_key: Ed25519PublicKey;
|
|
4832
|
-
readonly signature: Ed25519Signature;
|
|
4833
|
-
constructor(public_key: Ed25519PublicKey, signature: Ed25519Signature);
|
|
4834
|
-
serialize(serializer: Serializer): void;
|
|
4835
|
-
static load(deserializer: Deserializer): TransactionAuthenticatorEd25519;
|
|
4836
|
-
}
|
|
4837
|
-
/**
|
|
4838
|
-
* Transaction authenticator Ed25519 for a multi signers transaction
|
|
4839
|
-
*
|
|
4840
|
-
* @param public_key Client's public key.
|
|
4841
|
-
* @param signature Multi Ed25519 signature of a raw transaction.
|
|
4842
|
-
*
|
|
4843
|
-
*/
|
|
4844
|
-
declare class TransactionAuthenticatorMultiEd25519 extends TransactionAuthenticator {
|
|
4845
|
-
readonly public_key: MultiEd25519PublicKey;
|
|
4846
|
-
readonly signature: MultiEd25519Signature;
|
|
4847
|
-
constructor(public_key: MultiEd25519PublicKey, signature: MultiEd25519Signature);
|
|
4848
|
-
serialize(serializer: Serializer): void;
|
|
4849
|
-
static load(deserializer: Deserializer): TransactionAuthenticatorMultiEd25519;
|
|
4850
|
-
}
|
|
4851
|
-
/**
|
|
4852
|
-
* Transaction authenticator for a multi-agent transaction
|
|
4853
|
-
*
|
|
4854
|
-
* @param sender Sender account authenticator
|
|
4855
|
-
* @param secondary_signer_addresses Secondary signers address
|
|
4856
|
-
* @param secondary_signers Secondary signers account authenticators
|
|
4857
|
-
*
|
|
4858
|
-
*/
|
|
4859
|
-
declare class TransactionAuthenticatorMultiAgent extends TransactionAuthenticator {
|
|
4860
|
-
readonly sender: AccountAuthenticator;
|
|
4861
|
-
readonly secondary_signer_addresses: Array<AccountAddress>;
|
|
4862
|
-
readonly secondary_signers: Array<AccountAuthenticator>;
|
|
4863
|
-
constructor(sender: AccountAuthenticator, secondary_signer_addresses: Array<AccountAddress>, secondary_signers: Array<AccountAuthenticator>);
|
|
4864
|
-
serialize(serializer: Serializer): void;
|
|
4865
|
-
static load(deserializer: Deserializer): TransactionAuthenticatorMultiAgent;
|
|
4866
|
-
}
|
|
4867
|
-
/**
|
|
4868
|
-
* Transaction authenticator for a fee payer transaction
|
|
4869
|
-
*
|
|
4870
|
-
* @param sender Sender account authenticator
|
|
4871
|
-
* @param secondary_signer_addresses Secondary signers address
|
|
4872
|
-
* @param secondary_signers Secondary signers account authenticators
|
|
4873
|
-
* @param fee_payer Object of the fee payer account address and the fee payer authentication
|
|
4874
|
-
*
|
|
4875
|
-
*/
|
|
4876
|
-
declare class TransactionAuthenticatorFeePayer extends TransactionAuthenticator {
|
|
4877
|
-
readonly sender: AccountAuthenticator;
|
|
4878
|
-
readonly secondary_signer_addresses: Array<AccountAddress>;
|
|
4879
|
-
readonly secondary_signers: Array<AccountAuthenticator>;
|
|
4880
|
-
readonly fee_payer: {
|
|
4881
|
-
address: AccountAddress;
|
|
4882
|
-
authenticator: AccountAuthenticator;
|
|
4883
|
-
};
|
|
4884
|
-
constructor(sender: AccountAuthenticator, secondary_signer_addresses: Array<AccountAddress>, secondary_signers: Array<AccountAuthenticator>, fee_payer: {
|
|
4885
|
-
address: AccountAddress;
|
|
4886
|
-
authenticator: AccountAuthenticator;
|
|
4887
|
-
});
|
|
4888
|
-
serialize(serializer: Serializer): void;
|
|
4889
|
-
static load(deserializer: Deserializer): TransactionAuthenticatorMultiAgent;
|
|
4890
|
-
}
|
|
4891
|
-
/**
|
|
4892
|
-
* Single Sender authenticator for a single signer transaction
|
|
4893
|
-
*
|
|
4894
|
-
* @param sender AccountAuthenticator
|
|
4895
|
-
*/
|
|
4896
|
-
declare class TransactionAuthenticatorSingleSender extends TransactionAuthenticator {
|
|
4897
|
-
readonly sender: AccountAuthenticator;
|
|
4898
|
-
constructor(sender: AccountAuthenticator);
|
|
4899
|
-
serialize(serializer: Serializer): void;
|
|
4900
|
-
static load(deserializer: Deserializer): TransactionAuthenticatorSingleSender;
|
|
4901
|
-
}
|
|
4902
|
-
|
|
4903
|
-
declare class SignedTransaction extends Serializable {
|
|
4904
|
-
readonly raw_txn: RawTransaction;
|
|
4905
|
-
readonly authenticator: TransactionAuthenticator;
|
|
5462
|
+
getAccountOwnedTokensFromCollectionAddress(args: {
|
|
5463
|
+
accountAddress: AccountAddressInput;
|
|
5464
|
+
collectionAddress: AccountAddressInput;
|
|
5465
|
+
minimumLedgerVersion?: AnyNumber;
|
|
5466
|
+
options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensFromCollectionResponse[0]>;
|
|
5467
|
+
}): Promise<GetAccountOwnedTokensFromCollectionResponse>;
|
|
4906
5468
|
/**
|
|
4907
|
-
*
|
|
4908
|
-
* contains a client's public key and the signature of the raw transaction.
|
|
5469
|
+
* Queries for all collections that an account currently has tokens for.
|
|
4909
5470
|
*
|
|
4910
|
-
*
|
|
5471
|
+
* This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
|
|
5472
|
+
* If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
|
|
4911
5473
|
*
|
|
4912
|
-
* @
|
|
4913
|
-
*
|
|
4914
|
-
*
|
|
4915
|
-
* @
|
|
5474
|
+
* @example
|
|
5475
|
+
* const accountCollectionsWithOwnedTokens = await aptos.getAccountCollectionsWithOwnedTokens({accountAddress:"0x123"})
|
|
5476
|
+
*
|
|
5477
|
+
* @param args.accountAddress The account address we want to get the collections for
|
|
5478
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5479
|
+
* @param args.options.tokenStandard The NFT standard to query for
|
|
5480
|
+
* @param args.options.offset The number collection to start returning results from
|
|
5481
|
+
* @param args.options.limit The number of results to return
|
|
5482
|
+
* @param args.options.orderBy The order to sort the tokens by
|
|
5483
|
+
* @returns Collections array with the collections data
|
|
4916
5484
|
*/
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
/**
|
|
4923
|
-
* Representation of a Raw Transaction that can serialized and deserialized
|
|
4924
|
-
*/
|
|
4925
|
-
declare class MultiAgentTransaction extends Serializable {
|
|
4926
|
-
rawTransaction: RawTransaction;
|
|
4927
|
-
feePayerAddress?: AccountAddress | undefined;
|
|
4928
|
-
secondarySignerAddresses: AccountAddress[];
|
|
5485
|
+
getAccountCollectionsWithOwnedTokens(args: {
|
|
5486
|
+
accountAddress: AccountAddressInput;
|
|
5487
|
+
minimumLedgerVersion?: AnyNumber;
|
|
5488
|
+
options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountCollectionsWithOwnedTokenResponse[0]>;
|
|
5489
|
+
}): Promise<GetAccountCollectionsWithOwnedTokenResponse>;
|
|
4929
5490
|
/**
|
|
4930
|
-
*
|
|
4931
|
-
* can be submitted to Aptos chain for execution.
|
|
5491
|
+
* Queries the current count of transactions submitted by an account
|
|
4932
5492
|
*
|
|
4933
|
-
*
|
|
4934
|
-
*
|
|
5493
|
+
* @example
|
|
5494
|
+
* const accountTransactionsCount = await aptos.getAccountTransactionsCount({accountAddress:"0x123"})
|
|
5495
|
+
*
|
|
5496
|
+
* @param args.accountAddress The account address we want to get the total count for
|
|
5497
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5498
|
+
* @returns Current count of transactions made by an account
|
|
5499
|
+
*/
|
|
5500
|
+
getAccountTransactionsCount(args: {
|
|
5501
|
+
accountAddress: AccountAddressInput;
|
|
5502
|
+
minimumLedgerVersion?: AnyNumber;
|
|
5503
|
+
}): Promise<number>;
|
|
5504
|
+
/**
|
|
5505
|
+
* Queries an account's coins data
|
|
4935
5506
|
*
|
|
4936
|
-
* @
|
|
4937
|
-
*
|
|
5507
|
+
* @example
|
|
5508
|
+
* const accountCoinsData = await aptos.getAccountCoinsData({accountAddress:"0x123"})
|
|
5509
|
+
*
|
|
5510
|
+
* @param args.accountAddress The account address we want to get the coins data for
|
|
5511
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5512
|
+
* @param args.options.offset optional. The number coin to start returning results from
|
|
5513
|
+
* @param args.options.limit optional. The number of results to return
|
|
5514
|
+
* @param args.options.orderBy optional. The order to sort the coins by
|
|
5515
|
+
* @param args.options.where optional. Filter the results by
|
|
5516
|
+
* @returns Array with the coins data
|
|
4938
5517
|
*/
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
/**
|
|
4945
|
-
* Entry function arguments to be used when building a raw transaction using remote ABI
|
|
4946
|
-
*/
|
|
4947
|
-
type SimpleEntryFunctionArgumentTypes = boolean | number | bigint | string | null | undefined | Uint8Array | ArrayBuffer | Array<SimpleEntryFunctionArgumentTypes | EntryFunctionArgumentTypes>;
|
|
4948
|
-
/**
|
|
4949
|
-
* Entry function arguments to be used when building a raw transaction using BCS serialized arguments
|
|
4950
|
-
*/
|
|
4951
|
-
type EntryFunctionArgumentTypes = Bool | U8 | U16 | U32 | U64 | U128 | U256 | AccountAddress | MoveVector<EntryFunctionArgumentTypes> | MoveOption<EntryFunctionArgumentTypes> | MoveString | FixedBytes;
|
|
4952
|
-
/**
|
|
4953
|
-
* Script function arguments to be used when building a raw transaction using BCS serialized arguments
|
|
4954
|
-
*/
|
|
4955
|
-
type ScriptFunctionArgumentTypes = Bool | U8 | U16 | U32 | U64 | U128 | U256 | AccountAddress | MoveVector<U8> | MoveString | FixedBytes;
|
|
4956
|
-
/**
|
|
4957
|
-
* Type that holds all raw transaction instances Aptos SDK supports
|
|
4958
|
-
*/
|
|
4959
|
-
type AnyRawTransactionInstance = RawTransaction | MultiAgentRawTransaction | FeePayerRawTransaction;
|
|
4960
|
-
/**
|
|
4961
|
-
* Optional options to set when generating a transaction
|
|
4962
|
-
*/
|
|
4963
|
-
type InputGenerateTransactionOptions = {
|
|
4964
|
-
maxGasAmount?: number;
|
|
4965
|
-
gasUnitPrice?: number;
|
|
4966
|
-
expireTimestamp?: number;
|
|
4967
|
-
accountSequenceNumber?: AnyNumber;
|
|
4968
|
-
};
|
|
4969
|
-
/**
|
|
4970
|
-
* The generated transaction payload type that was produces from `generateTransactionPayload()` function.
|
|
4971
|
-
*/
|
|
4972
|
-
type AnyTransactionPayloadInstance = TransactionPayloadEntryFunction | TransactionPayloadScript | TransactionPayloadMultiSig;
|
|
4973
|
-
/**
|
|
4974
|
-
* Unified type for the data needed to generate a transaction payload of types:
|
|
4975
|
-
* Entry Function | Script | Multi Sig
|
|
4976
|
-
*/
|
|
4977
|
-
type InputGenerateTransactionPayloadData = InputEntryFunctionData | InputScriptData | InputMultiSigData;
|
|
4978
|
-
type InputGenerateTransactionPayloadDataWithRemoteABI = InputScriptData | InputEntryFunctionDataWithRemoteABI | InputMultiSigDataWithRemoteABI;
|
|
4979
|
-
/**
|
|
4980
|
-
* The data needed to generate an Entry Function payload
|
|
4981
|
-
*/
|
|
4982
|
-
type InputEntryFunctionData = {
|
|
4983
|
-
function: MoveFunctionId;
|
|
4984
|
-
typeArguments?: Array<TypeTag | string>;
|
|
4985
|
-
functionArguments: Array<EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes>;
|
|
4986
|
-
abi?: EntryFunctionABI;
|
|
4987
|
-
};
|
|
4988
|
-
type InputGenerateTransactionPayloadDataWithABI = InputEntryFunctionDataWithABI | InputMultiSigDataWithABI;
|
|
4989
|
-
type InputEntryFunctionDataWithABI = Omit<InputEntryFunctionData, "abi"> & {
|
|
4990
|
-
abi: EntryFunctionABI;
|
|
4991
|
-
};
|
|
4992
|
-
type InputMultiSigDataWithABI = {
|
|
4993
|
-
multisigAddress: AccountAddressInput;
|
|
4994
|
-
} & InputEntryFunctionDataWithABI;
|
|
4995
|
-
type InputEntryFunctionDataWithRemoteABI = InputEntryFunctionData & {
|
|
4996
|
-
aptosConfig: AptosConfig;
|
|
4997
|
-
};
|
|
4998
|
-
/**
|
|
4999
|
-
* The data needed to generate a Multi Sig payload
|
|
5000
|
-
*/
|
|
5001
|
-
type InputMultiSigData = {
|
|
5002
|
-
multisigAddress: AccountAddressInput;
|
|
5003
|
-
} & InputEntryFunctionData;
|
|
5004
|
-
/**
|
|
5005
|
-
* The data needed to generate a Multi Sig payload
|
|
5006
|
-
*/
|
|
5007
|
-
type InputMultiSigDataWithRemoteABI = {
|
|
5008
|
-
multisigAddress: AccountAddressInput;
|
|
5009
|
-
} & InputEntryFunctionDataWithRemoteABI;
|
|
5010
|
-
/**
|
|
5011
|
-
* The data needed to generate a Script payload
|
|
5012
|
-
*/
|
|
5013
|
-
type InputScriptData = {
|
|
5014
|
-
bytecode: HexInput;
|
|
5015
|
-
typeArguments?: Array<TypeTag>;
|
|
5016
|
-
functionArguments: Array<ScriptFunctionArgumentTypes>;
|
|
5017
|
-
};
|
|
5018
|
-
/**
|
|
5019
|
-
* The data needed to generate a View Function payload
|
|
5020
|
-
*/
|
|
5021
|
-
type InputViewFunctionData = {
|
|
5022
|
-
function: MoveFunctionId;
|
|
5023
|
-
typeArguments?: Array<TypeTag | string>;
|
|
5024
|
-
functionArguments?: Array<EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes>;
|
|
5025
|
-
abi?: ViewFunctionABI;
|
|
5026
|
-
};
|
|
5027
|
-
/**
|
|
5028
|
-
* Data needed to generate a view function payload and fetch the remote ABI
|
|
5029
|
-
*/
|
|
5030
|
-
type InputViewFunctionDataWithRemoteABI = InputViewFunctionData & {
|
|
5031
|
-
aptosConfig: AptosConfig;
|
|
5032
|
-
};
|
|
5033
|
-
/**
|
|
5034
|
-
* Data needed to generate a view function, with an already fetched ABI
|
|
5035
|
-
*/
|
|
5036
|
-
type InputViewFunctionDataWithABI = InputViewFunctionData & {
|
|
5037
|
-
abi: ViewFunctionABI;
|
|
5038
|
-
};
|
|
5039
|
-
/**
|
|
5040
|
-
* Data need for a generic function ABI, both view and entry
|
|
5041
|
-
*/
|
|
5042
|
-
type FunctionABI = {
|
|
5043
|
-
typeParameters: Array<MoveFunctionGenericTypeParam>;
|
|
5044
|
-
parameters: Array<TypeTag>;
|
|
5045
|
-
};
|
|
5046
|
-
/**
|
|
5047
|
-
* Interface of an Entry function's ABI.
|
|
5048
|
-
*
|
|
5049
|
-
* This is used to provide type checking and simple input conversion on ABI based transaction submission.
|
|
5050
|
-
*/
|
|
5051
|
-
type EntryFunctionABI = FunctionABI & {
|
|
5052
|
-
signers?: number;
|
|
5053
|
-
};
|
|
5054
|
-
/**
|
|
5055
|
-
* Interface of an View function's ABI.
|
|
5056
|
-
*
|
|
5057
|
-
* This is used to provide type checking and simple input conversion on ABI based transaction submission.
|
|
5058
|
-
*/
|
|
5059
|
-
type ViewFunctionABI = FunctionABI & {
|
|
5060
|
-
returnTypes: Array<TypeTag>;
|
|
5061
|
-
};
|
|
5062
|
-
/**
|
|
5063
|
-
* Interface of the arguments to generate a single signer transaction.
|
|
5064
|
-
* Used to provide to `generateTransaction()` method in the transaction builder flow
|
|
5065
|
-
*/
|
|
5066
|
-
interface InputGenerateSingleSignerRawTransactionArgs {
|
|
5067
|
-
aptosConfig: AptosConfig;
|
|
5068
|
-
sender: AccountAddressInput;
|
|
5069
|
-
payload: AnyTransactionPayloadInstance;
|
|
5070
|
-
options?: InputGenerateTransactionOptions;
|
|
5071
|
-
feePayerAddress?: AccountAddressInput;
|
|
5072
|
-
}
|
|
5073
|
-
/**
|
|
5074
|
-
* Interface of the arguments to generate a multi-agent transaction.
|
|
5075
|
-
* Used to provide to `generateTransaction()` method in the transaction builder flow
|
|
5076
|
-
*/
|
|
5077
|
-
interface InputGenerateMultiAgentRawTransactionArgs {
|
|
5078
|
-
aptosConfig: AptosConfig;
|
|
5079
|
-
sender: AccountAddressInput;
|
|
5080
|
-
payload: AnyTransactionPayloadInstance;
|
|
5081
|
-
secondarySignerAddresses: AccountAddressInput[];
|
|
5082
|
-
options?: InputGenerateTransactionOptions;
|
|
5083
|
-
feePayerAddress?: AccountAddressInput;
|
|
5084
|
-
}
|
|
5085
|
-
/**
|
|
5086
|
-
* Unified type that holds all the interfaces to generate different transaction types
|
|
5087
|
-
*/
|
|
5088
|
-
type InputGenerateRawTransactionArgs = InputGenerateSingleSignerRawTransactionArgs | InputGenerateMultiAgentRawTransactionArgs;
|
|
5089
|
-
/**
|
|
5090
|
-
* Unified type that holds all the return interfaces when generating different transaction types
|
|
5091
|
-
*/
|
|
5092
|
-
type AnyRawTransaction = SimpleTransaction | MultiAgentTransaction;
|
|
5093
|
-
type InputSimulateTransactionData = {
|
|
5518
|
+
getAccountCoinsData(args: {
|
|
5519
|
+
accountAddress: AccountAddressInput;
|
|
5520
|
+
minimumLedgerVersion?: AnyNumber;
|
|
5521
|
+
options?: PaginationArgs & OrderByArg<GetAccountCoinsDataResponse[0]> & WhereArg<CurrentFungibleAssetBalancesBoolExp>;
|
|
5522
|
+
}): Promise<GetAccountCoinsDataResponse>;
|
|
5094
5523
|
/**
|
|
5095
|
-
*
|
|
5524
|
+
* Queries the current count of an account's coins aggregated
|
|
5525
|
+
*
|
|
5526
|
+
* @example
|
|
5527
|
+
* const accountCoinsCount = await aptos.getAccountCoinsCount({accountAddress:"0x123"})
|
|
5528
|
+
*
|
|
5529
|
+
* @param args.accountAddress The account address we want to get the total count for
|
|
5530
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5531
|
+
* @returns Current count of the aggregated count of all account's coins
|
|
5096
5532
|
*/
|
|
5097
|
-
|
|
5533
|
+
getAccountCoinsCount(args: {
|
|
5534
|
+
accountAddress: AccountAddressInput;
|
|
5535
|
+
minimumLedgerVersion?: AnyNumber;
|
|
5536
|
+
}): Promise<number>;
|
|
5098
5537
|
/**
|
|
5099
|
-
*
|
|
5538
|
+
* Queries the account's APT amount
|
|
5539
|
+
*
|
|
5540
|
+
* @example
|
|
5541
|
+
* const accountAPTAmount = await aptos.getAccountAPTAmount({accountAddress:"0x123"})
|
|
5542
|
+
*
|
|
5543
|
+
* @param args.accountAddress The account address we want to get the total count for
|
|
5544
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5545
|
+
* @returns Current amount of account's APT
|
|
5100
5546
|
*/
|
|
5101
|
-
|
|
5547
|
+
getAccountAPTAmount(args: {
|
|
5548
|
+
accountAddress: AccountAddressInput;
|
|
5549
|
+
minimumLedgerVersion?: AnyNumber;
|
|
5550
|
+
}): Promise<number>;
|
|
5102
5551
|
/**
|
|
5103
|
-
*
|
|
5552
|
+
* Queries the account's coin amount by the coin type
|
|
5553
|
+
*
|
|
5554
|
+
* @example
|
|
5555
|
+
* const accountCoinAmount = await aptos.getAccountCoinAmount({accountAddress:"0x123", coinType:"0x1::aptos_coin::AptosCoin"})
|
|
5556
|
+
*
|
|
5557
|
+
* @param args.accountAddress The account address we want to get the total count for
|
|
5558
|
+
* @param args.coinType The coin type to query
|
|
5559
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5560
|
+
* @returns Current amount of account's coin
|
|
5104
5561
|
*/
|
|
5105
|
-
|
|
5562
|
+
getAccountCoinAmount(args: {
|
|
5563
|
+
accountAddress: AccountAddressInput;
|
|
5564
|
+
coinType: MoveStructId;
|
|
5565
|
+
minimumLedgerVersion?: AnyNumber;
|
|
5566
|
+
}): Promise<number>;
|
|
5106
5567
|
/**
|
|
5107
|
-
*
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
}
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
interface InputSubmitTransactionData {
|
|
5145
|
-
transaction: AnyRawTransaction;
|
|
5146
|
-
senderAuthenticator: AccountAuthenticator;
|
|
5147
|
-
feePayerAuthenticator?: AccountAuthenticator;
|
|
5148
|
-
additionalSignersAuthenticators?: Array<AccountAuthenticator>;
|
|
5568
|
+
* Queries an account's owned objects
|
|
5569
|
+
*
|
|
5570
|
+
* @example
|
|
5571
|
+
* const accountOwnedObjects = await aptos.getAccountOwnedObjects({accountAddress:"0x123"})
|
|
5572
|
+
*
|
|
5573
|
+
* @param args.accountAddress The account address we want to get the objects for
|
|
5574
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5575
|
+
* @param args.options.offset The starting position to start returning results from
|
|
5576
|
+
* @param args.options.limit The number of results to return
|
|
5577
|
+
* @param args.options.orderBy The order to sort the objects by
|
|
5578
|
+
* @returns Objects array with the object data
|
|
5579
|
+
*/
|
|
5580
|
+
getAccountOwnedObjects(args: {
|
|
5581
|
+
accountAddress: AccountAddressInput;
|
|
5582
|
+
minimumLedgerVersion?: AnyNumber;
|
|
5583
|
+
options?: PaginationArgs & OrderByArg<GetAccountOwnedObjectsResponse[0]>;
|
|
5584
|
+
}): Promise<GetAccountOwnedObjectsResponse>;
|
|
5585
|
+
/**
|
|
5586
|
+
* Derives an account by providing a private key.
|
|
5587
|
+
* This functions resolves the provided private key type and derives the public key from it.
|
|
5588
|
+
*
|
|
5589
|
+
* If the privateKey is a Secp256k1 type, it derives the account using the derived public key and
|
|
5590
|
+
* auth key using the SingleKey scheme locally.
|
|
5591
|
+
*
|
|
5592
|
+
* If the privateKey is a ED25519 type, it looks up the authentication key on chain, and uses it to resolve
|
|
5593
|
+
* whether it is a Legacy ED25519 key or a Unified ED25519 key. It then derives the account based
|
|
5594
|
+
* on that.
|
|
5595
|
+
*
|
|
5596
|
+
* @example
|
|
5597
|
+
* const account = await aptos.deriveAccountFromPrivateKey({privateKey:new Ed25519PrivateKey("0x123")})
|
|
5598
|
+
*
|
|
5599
|
+
* @param args.privateKey An account private key
|
|
5600
|
+
* @returns Account type
|
|
5601
|
+
*/
|
|
5602
|
+
deriveAccountFromPrivateKey(args: {
|
|
5603
|
+
privateKey: PrivateKey;
|
|
5604
|
+
}): Promise<Account$1>;
|
|
5149
5605
|
}
|
|
5150
5606
|
|
|
5151
5607
|
/**
|
|
@@ -5157,6 +5613,13 @@ declare class Coin {
|
|
|
5157
5613
|
/**
|
|
5158
5614
|
* Generate a transfer coin transaction that can be simulated and/or signed and submitted
|
|
5159
5615
|
*
|
|
5616
|
+
* @example
|
|
5617
|
+
* const transferCoinTransaction = await aptos.transferCoinTransaction({
|
|
5618
|
+
* sender: "0x123",
|
|
5619
|
+
* recipient:"0x456",
|
|
5620
|
+
* amount: 10,
|
|
5621
|
+
* })
|
|
5622
|
+
*
|
|
5160
5623
|
* @param args.sender The sender account
|
|
5161
5624
|
* @param args.recipient The recipient address
|
|
5162
5625
|
* @param args.amount The amount to transfer
|
|
@@ -5221,6 +5684,9 @@ declare class DigitalAsset {
|
|
|
5221
5684
|
* If, for some reason, a creator account has 2 collections with the same name in v1 and v2,
|
|
5222
5685
|
* can pass an optional `tokenStandard` parameter to query a specific standard
|
|
5223
5686
|
*
|
|
5687
|
+
* @example
|
|
5688
|
+
* const collection = await aptos.getCollectionData({creatorAddress:"0x123",collectionName:"myCollection"})
|
|
5689
|
+
*
|
|
5224
5690
|
* @param args.creatorAddress the address of the collection's creator
|
|
5225
5691
|
* @param args.collectionName the name of the collection
|
|
5226
5692
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
@@ -5236,6 +5702,9 @@ declare class DigitalAsset {
|
|
|
5236
5702
|
/**
|
|
5237
5703
|
* Queries data of a specific collection by the collection ID.
|
|
5238
5704
|
*
|
|
5705
|
+
* @example
|
|
5706
|
+
* const collection = await aptos.getCollectionDataByCollectionId({collectionId:"0x123"})
|
|
5707
|
+
*
|
|
5239
5708
|
* @param args.collectionId the ID of the collection, it's the same thing as the address of the collection object
|
|
5240
5709
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5241
5710
|
* @returns GetCollectionDataResponse response type
|
|
@@ -5250,6 +5719,9 @@ declare class DigitalAsset {
|
|
|
5250
5719
|
* This is the same as the collection's object address in V2, but V1 does
|
|
5251
5720
|
* not use objects, and does not have an address
|
|
5252
5721
|
*
|
|
5722
|
+
* @example
|
|
5723
|
+
* const collection = await aptos.getCollectionId({creatorAddress:"0x123",collectionName:"myCollection"})
|
|
5724
|
+
*
|
|
5253
5725
|
* @param args.creatorAddress the address of the collection's creator
|
|
5254
5726
|
* @param args.collectionName the name of the collection
|
|
5255
5727
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
@@ -5265,6 +5737,9 @@ declare class DigitalAsset {
|
|
|
5265
5737
|
/**
|
|
5266
5738
|
* Gets digital asset data given the address of a digital asset.
|
|
5267
5739
|
*
|
|
5740
|
+
* @example
|
|
5741
|
+
* const digitalAsset = await aptos.getDigitalAssetData({digitalAssetAddress:"0x123"})
|
|
5742
|
+
*
|
|
5268
5743
|
* @param args.tokenAddress The address of the digital asset
|
|
5269
5744
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5270
5745
|
* @returns GetTokenDataResponse containing relevant data to the digital asset.
|
|
@@ -5276,6 +5751,9 @@ declare class DigitalAsset {
|
|
|
5276
5751
|
/**
|
|
5277
5752
|
* Gets digital asset ownership data given the address of a digital asset.
|
|
5278
5753
|
*
|
|
5754
|
+
* @example
|
|
5755
|
+
* const digitalAssetOwner = await aptos.getCurrentDigitalAssetOwnership({digitalAssetAddress:"0x123"})
|
|
5756
|
+
*
|
|
5279
5757
|
* @param args.tokenAddress The address of the digital asset
|
|
5280
5758
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5281
5759
|
*
|
|
@@ -5288,6 +5766,9 @@ declare class DigitalAsset {
|
|
|
5288
5766
|
/**
|
|
5289
5767
|
* Gets the digital assets that the given address owns.
|
|
5290
5768
|
*
|
|
5769
|
+
* @example
|
|
5770
|
+
* const digitalAssets = await aptos.getOwnedDigitalAssets({ownerAddress:"0x123"})
|
|
5771
|
+
*
|
|
5291
5772
|
* @param args.ownerAddress The address of the owner
|
|
5292
5773
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5293
5774
|
*
|
|
@@ -5301,6 +5782,9 @@ declare class DigitalAsset {
|
|
|
5301
5782
|
/**
|
|
5302
5783
|
* Gets the activity data given the address of a digital asset.
|
|
5303
5784
|
*
|
|
5785
|
+
* @example
|
|
5786
|
+
* const digitalAssetActivity = await aptos.getDigitalAssetActivity({digitalAssetAddress:"0x123"})
|
|
5787
|
+
*
|
|
5304
5788
|
* @param args.tokenAddress The address of the digital asset
|
|
5305
5789
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5306
5790
|
*
|
|
@@ -5314,6 +5798,14 @@ declare class DigitalAsset {
|
|
|
5314
5798
|
/**
|
|
5315
5799
|
* Creates a new collection within the specified account
|
|
5316
5800
|
*
|
|
5801
|
+
* @example
|
|
5802
|
+
* const transaction = await aptos.createCollectionTransaction({
|
|
5803
|
+
* creator: alice,
|
|
5804
|
+
* description: "collectionDescription",
|
|
5805
|
+
* name: "collectionName",
|
|
5806
|
+
* uri: "collection-uri.com",
|
|
5807
|
+
* });
|
|
5808
|
+
*
|
|
5317
5809
|
* @param args.creator the account of the collection's creator
|
|
5318
5810
|
* @param args.description the description of the collection
|
|
5319
5811
|
* @param args.name the name of the collection
|
|
@@ -5347,6 +5839,15 @@ declare class DigitalAsset {
|
|
|
5347
5839
|
/**
|
|
5348
5840
|
* Create a transaction to mint a digital asset into the creators account within an existing collection.
|
|
5349
5841
|
*
|
|
5842
|
+
* @example
|
|
5843
|
+
* const transaction = await aptos.mintDigitalAssetTransaction({
|
|
5844
|
+
* creator: alice,
|
|
5845
|
+
* description: "collectionDescription",
|
|
5846
|
+
* collection: "collectionName",
|
|
5847
|
+
* name: "digitalAssetName",
|
|
5848
|
+
* uri: "digital-asset-uri.com",
|
|
5849
|
+
* });
|
|
5850
|
+
*
|
|
5350
5851
|
* @param args.creator the creator of the collection
|
|
5351
5852
|
* @param args.collection the name of the collection the digital asset belongs to
|
|
5352
5853
|
* @param args.description the description of the digital asset
|
|
@@ -5372,6 +5873,13 @@ declare class DigitalAsset {
|
|
|
5372
5873
|
* We can transfer a digital asset only when the digital asset is not frozen
|
|
5373
5874
|
* (i.e. owner transfer is not disabled such as for soul bound digital assets)
|
|
5374
5875
|
*
|
|
5876
|
+
* @example
|
|
5877
|
+
* const transaction = await aptos.transferDigitalAssetTransaction({
|
|
5878
|
+
* sender: alice,
|
|
5879
|
+
* digitalAssetAddress: "0x123",
|
|
5880
|
+
* recipient: "0x456",
|
|
5881
|
+
* });
|
|
5882
|
+
*
|
|
5375
5883
|
* @param args.sender The sender account of the current digital asset owner
|
|
5376
5884
|
* @param args.digitalAssetAddress The digital asset address
|
|
5377
5885
|
* @param args.recipient The recipient account address
|
|
@@ -5389,6 +5897,16 @@ declare class DigitalAsset {
|
|
|
5389
5897
|
/**
|
|
5390
5898
|
* Mint a soul bound digital asset into a recipient's account
|
|
5391
5899
|
*
|
|
5900
|
+
* @example
|
|
5901
|
+
* const transaction = await aptos.mintSoulBoundTransaction({
|
|
5902
|
+
* account: alice,
|
|
5903
|
+
* collection: "collectionName",
|
|
5904
|
+
* description: "collectionDescription",
|
|
5905
|
+
* name: "digitalAssetName",
|
|
5906
|
+
* uri: "digital-asset-uri.com",
|
|
5907
|
+
* recipient: "0x123"
|
|
5908
|
+
* });
|
|
5909
|
+
*
|
|
5392
5910
|
* @param args.account The account that mints the digital asset
|
|
5393
5911
|
* @param args.collection The collection name that the digital asset belongs to
|
|
5394
5912
|
* @param args.description The digital asset description
|
|
@@ -5407,7 +5925,7 @@ declare class DigitalAsset {
|
|
|
5407
5925
|
description: string;
|
|
5408
5926
|
name: string;
|
|
5409
5927
|
uri: string;
|
|
5410
|
-
recipient:
|
|
5928
|
+
recipient: AccountAddressInput;
|
|
5411
5929
|
propertyKeys?: Array<string>;
|
|
5412
5930
|
propertyTypes?: Array<PropertyType>;
|
|
5413
5931
|
propertyValues?: Array<PropertyValue>;
|
|
@@ -5416,6 +5934,12 @@ declare class DigitalAsset {
|
|
|
5416
5934
|
/**
|
|
5417
5935
|
* Burn a digital asset by its creator
|
|
5418
5936
|
*
|
|
5937
|
+
* @example
|
|
5938
|
+
* const transaction = await aptos.burnDigitalAssetTransaction({
|
|
5939
|
+
* creator: alice,
|
|
5940
|
+
* digitalAssetAddress: "0x123",
|
|
5941
|
+
* });
|
|
5942
|
+
*
|
|
5419
5943
|
* @param args.creator The creator account
|
|
5420
5944
|
* @param args.digitalAssetAddress The digital asset address
|
|
5421
5945
|
*
|
|
@@ -5430,6 +5954,12 @@ declare class DigitalAsset {
|
|
|
5430
5954
|
/**
|
|
5431
5955
|
* Freeze digital asset transfer ability
|
|
5432
5956
|
*
|
|
5957
|
+
* @example
|
|
5958
|
+
* const transaction = await aptos.freezeDigitalAssetTransaferTransaction({
|
|
5959
|
+
* creator: alice,
|
|
5960
|
+
* digitalAssetAddress: "0x123",
|
|
5961
|
+
* });
|
|
5962
|
+
*
|
|
5433
5963
|
* @param args.creator The creator account
|
|
5434
5964
|
* @param args.digitalAssetAddress The digital asset address
|
|
5435
5965
|
*
|
|
@@ -5444,6 +5974,12 @@ declare class DigitalAsset {
|
|
|
5444
5974
|
/**
|
|
5445
5975
|
* Unfreeze digital asset transfer ability
|
|
5446
5976
|
*
|
|
5977
|
+
* @example
|
|
5978
|
+
* const transaction = await aptos.unfreezeDigitalAssetTransaferTransaction({
|
|
5979
|
+
* creator: alice,
|
|
5980
|
+
* digitalAssetAddress: "0x123",
|
|
5981
|
+
* });
|
|
5982
|
+
*
|
|
5447
5983
|
* @param args.creator The creator account
|
|
5448
5984
|
* @param args.digitalAssetAddress The digital asset address
|
|
5449
5985
|
*
|
|
@@ -5458,6 +5994,13 @@ declare class DigitalAsset {
|
|
|
5458
5994
|
/**
|
|
5459
5995
|
* Set the digital asset description
|
|
5460
5996
|
*
|
|
5997
|
+
* @example
|
|
5998
|
+
* const transaction = await aptos.setDigitalAssetDescriptionTransaction({
|
|
5999
|
+
* creator: alice,
|
|
6000
|
+
* description: "digitalAssetDescription",
|
|
6001
|
+
* digitalAssetAddress: "0x123",
|
|
6002
|
+
* });
|
|
6003
|
+
*
|
|
5461
6004
|
* @param args.creator The creator account
|
|
5462
6005
|
* @param args.description The digital asset description
|
|
5463
6006
|
* @param args.digitalAssetAddress The digital asset address
|
|
@@ -5474,6 +6017,13 @@ declare class DigitalAsset {
|
|
|
5474
6017
|
/**
|
|
5475
6018
|
* Set the digital asset name
|
|
5476
6019
|
*
|
|
6020
|
+
* @example
|
|
6021
|
+
* const transaction = await aptos.setDigitalAssetNameTransaction({
|
|
6022
|
+
* creator: alice,
|
|
6023
|
+
* name: "digitalAssetName",
|
|
6024
|
+
* digitalAssetAddress: "0x123",
|
|
6025
|
+
* });
|
|
6026
|
+
*
|
|
5477
6027
|
* @param args.creator The creator account
|
|
5478
6028
|
* @param args.name The digital asset name
|
|
5479
6029
|
* @param args.digitalAssetAddress The digital asset address
|
|
@@ -5490,6 +6040,13 @@ declare class DigitalAsset {
|
|
|
5490
6040
|
/**
|
|
5491
6041
|
* Set the digital asset name
|
|
5492
6042
|
*
|
|
6043
|
+
* @example
|
|
6044
|
+
* const transaction = await aptos.setDigitalAssetURITransaction({
|
|
6045
|
+
* creator: alice,
|
|
6046
|
+
* uri: "digital-asset-uri.com",
|
|
6047
|
+
* digitalAssetAddress: "0x123",
|
|
6048
|
+
* });
|
|
6049
|
+
*
|
|
5493
6050
|
* @param args.creator The creator account
|
|
5494
6051
|
* @param args.uri The digital asset uri
|
|
5495
6052
|
* @param args.digitalAssetAddress The digital asset address
|
|
@@ -5506,6 +6063,15 @@ declare class DigitalAsset {
|
|
|
5506
6063
|
/**
|
|
5507
6064
|
* Add a digital asset property
|
|
5508
6065
|
*
|
|
6066
|
+
* @example
|
|
6067
|
+
* const transaction = await aptos.addDigitalAssetPropertyTransaction({
|
|
6068
|
+
* creator: alice,
|
|
6069
|
+
* propertyKey: "newKey",
|
|
6070
|
+
* propertyType: "BOOLEAN",
|
|
6071
|
+
* propertyValue: true,
|
|
6072
|
+
* digitalAssetAddress: "0x123",
|
|
6073
|
+
* });
|
|
6074
|
+
*
|
|
5509
6075
|
* @param args.account The account that mints the digital asset
|
|
5510
6076
|
* @param args.digitalAssetAddress The digital asset address
|
|
5511
6077
|
* @param args.propertyKey The property key for storing on-chain properties
|
|
@@ -5526,6 +6092,15 @@ declare class DigitalAsset {
|
|
|
5526
6092
|
/**
|
|
5527
6093
|
* Remove a digital asset property
|
|
5528
6094
|
*
|
|
6095
|
+
* @example
|
|
6096
|
+
* const transaction = await aptos.removeDigitalAssetPropertyTransaction({
|
|
6097
|
+
* creator: alice,
|
|
6098
|
+
* propertyKey: "newKey",
|
|
6099
|
+
* propertyType: "BOOLEAN",
|
|
6100
|
+
* propertyValue: true,
|
|
6101
|
+
* digitalAssetAddress: "0x123",
|
|
6102
|
+
* });
|
|
6103
|
+
*
|
|
5529
6104
|
* @param args.account The account that mints the digital asset
|
|
5530
6105
|
* @param args.digitalAssetAddress The digital asset address
|
|
5531
6106
|
* @param args.propertyKey The property key for storing on-chain properties
|
|
@@ -5546,6 +6121,15 @@ declare class DigitalAsset {
|
|
|
5546
6121
|
/**
|
|
5547
6122
|
* Update a digital asset property
|
|
5548
6123
|
*
|
|
6124
|
+
* @example
|
|
6125
|
+
* const transaction = await aptos.updateDigitalAssetPropertyTransaction({
|
|
6126
|
+
* creator: alice,
|
|
6127
|
+
* propertyKey: "newKey",
|
|
6128
|
+
* propertyType: "BOOLEAN",
|
|
6129
|
+
* propertyValue: false,
|
|
6130
|
+
* digitalAssetAddress: "0x123",
|
|
6131
|
+
* });
|
|
6132
|
+
*
|
|
5549
6133
|
* @param args.account The account that mints the digital asset
|
|
5550
6134
|
* @param args.digitalAssetAddress The digital asset address
|
|
5551
6135
|
* @param args.propertyKey The property key for storing on-chain properties
|
|
@@ -5566,6 +6150,15 @@ declare class DigitalAsset {
|
|
|
5566
6150
|
/**
|
|
5567
6151
|
* Add a typed digital asset property
|
|
5568
6152
|
*
|
|
6153
|
+
* @example
|
|
6154
|
+
* const transaction = await aptos.addDigitalAssetTypedPropertyTransaction({
|
|
6155
|
+
* creator: alice,
|
|
6156
|
+
* propertyKey: "typedKey",
|
|
6157
|
+
* propertyType: "STRING",
|
|
6158
|
+
* propertyValue: "hello",
|
|
6159
|
+
* digitalAssetAddress: "0x123",
|
|
6160
|
+
* });
|
|
6161
|
+
*
|
|
5569
6162
|
* @param args.account The account that mints the digital asset
|
|
5570
6163
|
* @param args.digitalAssetAddress The digital asset address
|
|
5571
6164
|
* @param args.propertyKey The property key for storing on-chain properties
|
|
@@ -5586,6 +6179,15 @@ declare class DigitalAsset {
|
|
|
5586
6179
|
/**
|
|
5587
6180
|
* Update a typed digital asset property
|
|
5588
6181
|
*
|
|
6182
|
+
* @example
|
|
6183
|
+
* const transaction = await aptos.updateDigitalAssetTypedPropertyTransaction({
|
|
6184
|
+
* creator: alice,
|
|
6185
|
+
* propertyKey: "typedKey",
|
|
6186
|
+
* propertyType: "U8",
|
|
6187
|
+
* propertyValue: 2,
|
|
6188
|
+
* digitalAssetAddress: "0x123",
|
|
6189
|
+
* });
|
|
6190
|
+
*
|
|
5589
6191
|
* @param args.account The account that mints the digital asset
|
|
5590
6192
|
* @param args.digitalAssetAddress The digital asset address
|
|
5591
6193
|
* @param args.propertyKey The property key for storing on-chain properties
|
|
@@ -5614,6 +6216,9 @@ declare class Event {
|
|
|
5614
6216
|
/**
|
|
5615
6217
|
* Get module events by event type
|
|
5616
6218
|
*
|
|
6219
|
+
* @example
|
|
6220
|
+
* const events = await aptos.getModuleEventsByEventType({eventType:"0x1::transaction_fee::FeeStatement"})
|
|
6221
|
+
*
|
|
5617
6222
|
* @param args.eventType - The event type
|
|
5618
6223
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5619
6224
|
*
|
|
@@ -5627,6 +6232,9 @@ declare class Event {
|
|
|
5627
6232
|
/**
|
|
5628
6233
|
* Get events by creation number and an account address
|
|
5629
6234
|
*
|
|
6235
|
+
* @example
|
|
6236
|
+
* const events = await aptos.getAccountEventsByCreationNumber({accountAddress:"0x123",creationNumber: 0})
|
|
6237
|
+
*
|
|
5630
6238
|
* @param args.accountAddress - The account address
|
|
5631
6239
|
* @param args.creationNumber - The event creation number
|
|
5632
6240
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
@@ -5641,6 +6249,9 @@ declare class Event {
|
|
|
5641
6249
|
/**
|
|
5642
6250
|
* Get events by event type and an account address
|
|
5643
6251
|
*
|
|
6252
|
+
* @example
|
|
6253
|
+
* const events = await aptos.getAccountEventsByEventType({accountAddress:"0x123",eventType: "0x1::transaction_fee::FeeStatement"})
|
|
6254
|
+
*
|
|
5644
6255
|
* @param args.accountAddress - The account address
|
|
5645
6256
|
* @param args.eventType - The event type
|
|
5646
6257
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
@@ -5657,15 +6268,11 @@ declare class Event {
|
|
|
5657
6268
|
* Get all events
|
|
5658
6269
|
*
|
|
5659
6270
|
* An optional `where` can be passed in to filter out the response.
|
|
5660
|
-
|
|
6271
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5661
6272
|
* @example
|
|
5662
|
-
*
|
|
5663
|
-
*
|
|
5664
|
-
*
|
|
5665
|
-
* transaction_version: { _eq: 123456 },
|
|
5666
|
-
* }
|
|
5667
|
-
* }
|
|
5668
|
-
* ```
|
|
6273
|
+
* const events = await aptos.getEvents()
|
|
6274
|
+
* // with filtering
|
|
6275
|
+
* const events = await aptos.getEvents({options: { where: { account_address: { _eq: "0x123" } } }});
|
|
5669
6276
|
*
|
|
5670
6277
|
* @returns GetEventsQuery response type
|
|
5671
6278
|
*/
|
|
@@ -5685,6 +6292,9 @@ declare class Faucet {
|
|
|
5685
6292
|
* This creates an account if it does not exist and mints the specified amount of
|
|
5686
6293
|
* coins into that account
|
|
5687
6294
|
*
|
|
6295
|
+
* @example
|
|
6296
|
+
* const transaction = await aptos.fundAccount({accountAddress:"0x123", amount: 100})
|
|
6297
|
+
*
|
|
5688
6298
|
* @param args.accountAddress Address of the account to fund
|
|
5689
6299
|
* @param args.amount Amount of tokens to fund the account with
|
|
5690
6300
|
* @param args.options Configuration options for waitForTransaction
|
|
@@ -5779,18 +6389,6 @@ declare function buildTransaction(args: InputGenerateMultiAgentRawTransactionArg
|
|
|
5779
6389
|
*/
|
|
5780
6390
|
declare function generateSignedTransactionForSimulation(args: InputSimulateTransactionData): Uint8Array;
|
|
5781
6391
|
declare function getAuthenticatorForSimulation(publicKey: PublicKey): AccountAuthenticatorEd25519 | AccountAuthenticatorSingleKey;
|
|
5782
|
-
/**
|
|
5783
|
-
* Sign a transaction that can later be submitted to chain
|
|
5784
|
-
*
|
|
5785
|
-
* @param args.signer The signer account to sign the transaction
|
|
5786
|
-
* @param args.transaction A aptos transaction type to sign
|
|
5787
|
-
*
|
|
5788
|
-
* @return The signer AccountAuthenticator
|
|
5789
|
-
*/
|
|
5790
|
-
declare function sign(args: {
|
|
5791
|
-
signer: Account$1;
|
|
5792
|
-
transaction: AnyRawTransaction;
|
|
5793
|
-
}): AccountAuthenticator;
|
|
5794
6392
|
/**
|
|
5795
6393
|
* Prepare a transaction to be submitted to chain
|
|
5796
6394
|
*
|
|
@@ -5811,14 +6409,6 @@ declare function hashValues(input: (Uint8Array | string)[]): Uint8Array;
|
|
|
5811
6409
|
* @param args InputSubmitTransactionData
|
|
5812
6410
|
*/
|
|
5813
6411
|
declare function generateUserTransactionHash(args: InputSubmitTransactionData): string;
|
|
5814
|
-
/**
|
|
5815
|
-
* Derive the raw transaction type - FeePayerRawTransaction or MultiAgentRawTransaction or RawTransaction
|
|
5816
|
-
*
|
|
5817
|
-
* @param transaction A aptos transaction type
|
|
5818
|
-
*
|
|
5819
|
-
* @returns FeePayerRawTransaction | MultiAgentRawTransaction | RawTransaction
|
|
5820
|
-
*/
|
|
5821
|
-
declare function deriveTransactionType(transaction: AnyRawTransaction): AnyRawTransactionInstance;
|
|
5822
6412
|
/**
|
|
5823
6413
|
* Generate a multi signers signed transaction that can be submitted to chain
|
|
5824
6414
|
*
|
|
@@ -5829,7 +6419,6 @@ declare function deriveTransactionType(transaction: AnyRawTransaction): AnyRawTr
|
|
|
5829
6419
|
* @returns A SignedTransaction
|
|
5830
6420
|
*/
|
|
5831
6421
|
declare function generateMultiSignersSignedTransaction(transaction: MultiAgentRawTransaction | FeePayerRawTransaction, senderAuthenticator: AccountAuthenticator, feePayerAuthenticator?: AccountAuthenticator, additionalSignersAuthenticators?: Array<AccountAuthenticator>): Uint8Array;
|
|
5832
|
-
declare function generateSigningMessage(transaction: AnyRawTransaction): Uint8Array;
|
|
5833
6422
|
|
|
5834
6423
|
/**
|
|
5835
6424
|
* Convert type arguments to only type tags, allowing for string representations of type tags
|
|
@@ -5871,6 +6460,18 @@ declare function fetchViewFunctionAbi(moduleAddress: string, moduleName: string,
|
|
|
5871
6460
|
declare function convertArgument(functionName: string, functionAbi: FunctionABI, arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes, position: number, genericTypeParams: Array<TypeTag>): EntryFunctionArgumentTypes;
|
|
5872
6461
|
declare function checkOrConvertArgument(arg: SimpleEntryFunctionArgumentTypes | EntryFunctionArgumentTypes, param: TypeTag, position: number, genericTypeParams: Array<TypeTag>): EntryFunctionArgumentTypes;
|
|
5873
6462
|
|
|
6463
|
+
/**
|
|
6464
|
+
* Derive the raw transaction type - FeePayerRawTransaction or MultiAgentRawTransaction or RawTransaction
|
|
6465
|
+
*
|
|
6466
|
+
* @param transaction A aptos transaction type
|
|
6467
|
+
*
|
|
6468
|
+
* @returns FeePayerRawTransaction | MultiAgentRawTransaction | RawTransaction
|
|
6469
|
+
*/
|
|
6470
|
+
declare function deriveTransactionType(transaction: AnyRawTransaction): AnyRawTransactionInstance;
|
|
6471
|
+
declare function generateSigningMessage(bytes: Uint8Array, domainSeparator: string): Uint8Array;
|
|
6472
|
+
declare function generateSigningMessageForSerializable(obj: Serializable): Uint8Array;
|
|
6473
|
+
declare function generateSigningMessageForTransaction(transaction: AnyRawTransaction): Uint8Array;
|
|
6474
|
+
|
|
5874
6475
|
declare enum TypeTagParserErrorType {
|
|
5875
6476
|
InvalidTypeTag = "unknown type",
|
|
5876
6477
|
UnexpectedGenericType = "unexpected generic type",
|
|
@@ -5913,7 +6514,11 @@ declare class FungibleAsset {
|
|
|
5913
6514
|
/**
|
|
5914
6515
|
* Queries all fungible asset metadata.
|
|
5915
6516
|
*
|
|
6517
|
+
* @example
|
|
6518
|
+
* const fungibleAsset = await aptos.getFungibleAssetMetadata()
|
|
6519
|
+
*
|
|
5916
6520
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
6521
|
+
* @param args.options Optional configuration for pagination and filtering
|
|
5917
6522
|
*
|
|
5918
6523
|
* @returns A list of fungible asset metadata
|
|
5919
6524
|
*/
|
|
@@ -5926,6 +6531,9 @@ declare class FungibleAsset {
|
|
|
5926
6531
|
*
|
|
5927
6532
|
* This query returns the fungible asset metadata for a specific fungible asset.
|
|
5928
6533
|
*
|
|
6534
|
+
* @example
|
|
6535
|
+
* const fungibleAsset = await aptos.getFungibleAssetMetadataByAssetType({assetType:"0x123::test_coin::TestCoin"})
|
|
6536
|
+
*
|
|
5929
6537
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5930
6538
|
* @param args.assetType The asset type of the fungible asset.
|
|
5931
6539
|
* e.g
|
|
@@ -5941,7 +6549,11 @@ declare class FungibleAsset {
|
|
|
5941
6549
|
/**
|
|
5942
6550
|
* Queries all fungible asset activities
|
|
5943
6551
|
*
|
|
6552
|
+
* @example
|
|
6553
|
+
* const fungibleAssetActivities = await aptos.getFungibleAssetActivities()
|
|
6554
|
+
*
|
|
5944
6555
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
6556
|
+
* @param args.options Optional configuration for pagination and filtering
|
|
5945
6557
|
*
|
|
5946
6558
|
* @returns A list of fungible asset metadata
|
|
5947
6559
|
*/
|
|
@@ -5952,7 +6564,11 @@ declare class FungibleAsset {
|
|
|
5952
6564
|
/**
|
|
5953
6565
|
* Queries all fungible asset balances
|
|
5954
6566
|
*
|
|
6567
|
+
* @example
|
|
6568
|
+
* const fungibleAssetBalances = await aptos.getCurrentFungibleAssetBalances()
|
|
6569
|
+
*
|
|
5955
6570
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
6571
|
+
* @param args.options Optional configuration for pagination and filtering
|
|
5956
6572
|
*
|
|
5957
6573
|
* @returns A list of fungible asset metadata
|
|
5958
6574
|
*/
|
|
@@ -5961,10 +6577,18 @@ declare class FungibleAsset {
|
|
|
5961
6577
|
options?: PaginationArgs & WhereArg<CurrentFungibleAssetBalancesBoolExp>;
|
|
5962
6578
|
}): Promise<GetCurrentFungibleAssetBalancesResponse>;
|
|
5963
6579
|
/**
|
|
5964
|
-
*
|
|
6580
|
+
* Transfer `amount` of fungible asset from sender's primary store to recipient's primary store.
|
|
5965
6581
|
*
|
|
5966
6582
|
* Use this method to transfer any fungible asset including fungible token.
|
|
5967
6583
|
*
|
|
6584
|
+
* @example
|
|
6585
|
+
* const transaction = await aptos.transferFungibleAsset({
|
|
6586
|
+
* sender: alice,
|
|
6587
|
+
* fungibleAssetMetadataAddress: "0x123",
|
|
6588
|
+
* recipient: "0x456",
|
|
6589
|
+
* amount: 5
|
|
6590
|
+
* })
|
|
6591
|
+
*
|
|
5968
6592
|
* @param sender The sender account
|
|
5969
6593
|
* @param fungibleAssetMetadataAddress The fungible asset account address.
|
|
5970
6594
|
* For example if you’re transferring USDT this would be the USDT address
|
|
@@ -5975,8 +6599,8 @@ declare class FungibleAsset {
|
|
|
5975
6599
|
*/
|
|
5976
6600
|
transferFungibleAsset(args: {
|
|
5977
6601
|
sender: Account$1;
|
|
5978
|
-
fungibleAssetMetadataAddress:
|
|
5979
|
-
recipient:
|
|
6602
|
+
fungibleAssetMetadataAddress: AccountAddressInput;
|
|
6603
|
+
recipient: AccountAddressInput;
|
|
5980
6604
|
amount: AnyNumber;
|
|
5981
6605
|
options?: InputGenerateTransactionOptions;
|
|
5982
6606
|
}): Promise<SimpleTransaction>;
|
|
@@ -5993,7 +6617,9 @@ declare class General {
|
|
|
5993
6617
|
*
|
|
5994
6618
|
* @returns Aptos Ledger Info
|
|
5995
6619
|
*
|
|
5996
|
-
* @example
|
|
6620
|
+
* @example
|
|
6621
|
+
* const ledgerInfo = await aptos.getLedgerInfo()
|
|
6622
|
+
* // an example of the returned data
|
|
5997
6623
|
* ```
|
|
5998
6624
|
* {
|
|
5999
6625
|
* "chain_id": 4,
|
|
@@ -6012,12 +6638,18 @@ declare class General {
|
|
|
6012
6638
|
/**
|
|
6013
6639
|
* Queries for the chain id
|
|
6014
6640
|
*
|
|
6641
|
+
* @example
|
|
6642
|
+
* const chainId = await aptos.getChainId()
|
|
6643
|
+
*
|
|
6015
6644
|
* @returns The chain id
|
|
6016
6645
|
*/
|
|
6017
6646
|
getChainId(): Promise<number>;
|
|
6018
6647
|
/**
|
|
6019
6648
|
* Queries for block by transaction version
|
|
6020
6649
|
*
|
|
6650
|
+
* @example
|
|
6651
|
+
* const block = await aptos.getBlockByVersion({ledgerVersion:5})
|
|
6652
|
+
*
|
|
6021
6653
|
* @param args.ledgerVersion Ledger version to lookup block information for
|
|
6022
6654
|
* @param args.options.withTransactions If set to true, include all transactions in the block
|
|
6023
6655
|
*
|
|
@@ -6032,6 +6664,9 @@ declare class General {
|
|
|
6032
6664
|
/**
|
|
6033
6665
|
* Get block by block height
|
|
6034
6666
|
*
|
|
6667
|
+
* @example
|
|
6668
|
+
* const block = await aptos.getBlockByVersion({blockHeight:5})
|
|
6669
|
+
*
|
|
6035
6670
|
* @param args.blockHeight Block height to lookup. Starts at 0
|
|
6036
6671
|
* @param args.options.withTransactions If set to true, include all transactions in the block
|
|
6037
6672
|
*
|
|
@@ -6046,17 +6681,21 @@ declare class General {
|
|
|
6046
6681
|
/**
|
|
6047
6682
|
* Queries for a table item for a table identified by the handle and the key for the item.
|
|
6048
6683
|
* Key and value types need to be passed in to help with key serialization and value deserialization.
|
|
6684
|
+
*
|
|
6685
|
+
* @example https://api.devnet.aptoslabs.com/v1/accounts/0x1/resource/0x1::coin::CoinInfo%3C0x1::aptos_coin::AptosCoin%3E
|
|
6686
|
+
* const tableItem = await aptos.getTableItem({
|
|
6687
|
+
* handle: "0x123",
|
|
6688
|
+
* data: {
|
|
6689
|
+
* key_type: "address", // Move type of table key
|
|
6690
|
+
* value_type: "u128", // Move type of table value
|
|
6691
|
+
* key: "0x619dc29a0aac8fa146714058e8dd6d2d0f3bdf5f6331907bf91f3acd81e6935" // Value of table key
|
|
6692
|
+
* },
|
|
6693
|
+
* })
|
|
6694
|
+
*
|
|
6049
6695
|
* @param args.handle A pointer to where that table is stored
|
|
6050
6696
|
* @param args.data Object that describes table item
|
|
6051
6697
|
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
6052
6698
|
*
|
|
6053
|
-
* @example https://api.devnet.aptoslabs.com/v1/accounts/0x1/resource/0x1::coin::CoinInfo%3C0x1::aptos_coin::AptosCoin%3E
|
|
6054
|
-
* {
|
|
6055
|
-
* data.key_type = "address" // Move type of table key
|
|
6056
|
-
* data.value_type = "u128" // Move type of table value
|
|
6057
|
-
* data.key = "0x619dc29a0aac8fa146714058e8dd6d2d0f3bdf5f6331907bf91f3acd81e6935" // Value of table key
|
|
6058
|
-
* }
|
|
6059
|
-
*
|
|
6060
6699
|
* @returns Table item value rendered in JSON
|
|
6061
6700
|
*/
|
|
6062
6701
|
getTableItem<T>(args: {
|
|
@@ -6068,14 +6707,15 @@ declare class General {
|
|
|
6068
6707
|
* Queries for a Move view function
|
|
6069
6708
|
* @param args.payload Payload for the view function
|
|
6070
6709
|
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
6710
|
+
*
|
|
6071
6711
|
* @example
|
|
6072
|
-
*
|
|
6073
|
-
*
|
|
6074
|
-
*
|
|
6075
|
-
*
|
|
6076
|
-
*
|
|
6077
|
-
*
|
|
6078
|
-
*
|
|
6712
|
+
* const data = await aptos.view({
|
|
6713
|
+
* payload: {
|
|
6714
|
+
* function: "0x1::coin::balance",
|
|
6715
|
+
* typeArguments: ["0x1::aptos_coin::AptosCoin"],
|
|
6716
|
+
* functionArguments: [accountAddress],
|
|
6717
|
+
* }
|
|
6718
|
+
* })
|
|
6079
6719
|
*
|
|
6080
6720
|
* @returns an array of Move values
|
|
6081
6721
|
*/
|
|
@@ -6086,6 +6726,9 @@ declare class General {
|
|
|
6086
6726
|
/**
|
|
6087
6727
|
* Queries top user transactions
|
|
6088
6728
|
*
|
|
6729
|
+
* @example
|
|
6730
|
+
* const topUserTransactions = await aptos.getChainTopUserTransactions({limit:5})
|
|
6731
|
+
*
|
|
6089
6732
|
* @param args.limit The number of transactions to return
|
|
6090
6733
|
* @returns GetChainTopUserTransactionsResponse
|
|
6091
6734
|
*/
|
|
@@ -6097,18 +6740,16 @@ declare class General {
|
|
|
6097
6740
|
* For more detailed queries specification see
|
|
6098
6741
|
* {@link https://cloud.hasura.io/public/graphiql?endpoint=https://api.mainnet.aptoslabs.com/v1/graphql}
|
|
6099
6742
|
*
|
|
6100
|
-
* @param args.query.query A GraphQL query
|
|
6101
|
-
* @param args.query.variables The variables for the query
|
|
6102
6743
|
* @example
|
|
6103
|
-
*
|
|
6104
|
-
* {
|
|
6744
|
+
* const topUserTransactions = await aptos.queryIndexer({
|
|
6105
6745
|
* query: `query MyQuery {
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
*
|
|
6111
|
-
*
|
|
6746
|
+
* ledger_infos {
|
|
6747
|
+
* chain_id
|
|
6748
|
+
* }}`;
|
|
6749
|
+
* })
|
|
6750
|
+
*
|
|
6751
|
+
* @param args.query.query A GraphQL query
|
|
6752
|
+
* @param args.query.variables The variables for the query
|
|
6112
6753
|
*
|
|
6113
6754
|
* @return The provided T type
|
|
6114
6755
|
*/
|
|
@@ -6119,11 +6760,17 @@ declare class General {
|
|
|
6119
6760
|
* Queries for the last successful indexer version
|
|
6120
6761
|
*
|
|
6121
6762
|
* This is useful to tell what ledger version the indexer is updated to, as it can be behind the full nodes.
|
|
6763
|
+
*
|
|
6764
|
+
* @example
|
|
6765
|
+
* const version = await aptos.getIndexerLastSuccessVersion()
|
|
6122
6766
|
*/
|
|
6123
6767
|
getIndexerLastSuccessVersion(): Promise<bigint>;
|
|
6124
6768
|
/**
|
|
6125
6769
|
* Query the processor status for a specific processor type.
|
|
6126
6770
|
*
|
|
6771
|
+
* @example
|
|
6772
|
+
* const status = await aptos.getProcessorStatus({processorType:"account_transactions_processor"})
|
|
6773
|
+
*
|
|
6127
6774
|
* @param processorType The processor type to query
|
|
6128
6775
|
* @returns
|
|
6129
6776
|
*/
|
|
@@ -6180,11 +6827,10 @@ declare class ANS {
|
|
|
6180
6827
|
/**
|
|
6181
6828
|
* Retrieve the owner address of a domain name or subdomain name from the contract.
|
|
6182
6829
|
*
|
|
6183
|
-
*
|
|
6830
|
+
* @example
|
|
6184
6831
|
* // Will return the owner address of "test.aptos.apt" or undefined
|
|
6185
6832
|
* const owner = await aptos.getOwnerAddress({name: "test.aptos"})
|
|
6186
6833
|
* // owner = 0x123...
|
|
6187
|
-
* ```
|
|
6188
6834
|
*
|
|
6189
6835
|
* @param args.name - A string of the name to retrieve
|
|
6190
6836
|
*
|
|
@@ -6196,11 +6842,10 @@ declare class ANS {
|
|
|
6196
6842
|
/**
|
|
6197
6843
|
* Retrieve the expiration time of a domain name or subdomain name from the contract.
|
|
6198
6844
|
*
|
|
6199
|
-
*
|
|
6845
|
+
* @example
|
|
6200
6846
|
* // Will return the expiration of "test.aptos.apt" or undefined
|
|
6201
6847
|
* const exp = await aptos.getExpiration({name: "test.aptos"})
|
|
6202
6848
|
* // new Date(exp) would give you the date in question: 2021-01-01T00:00:00.000Z
|
|
6203
|
-
* ```
|
|
6204
6849
|
*
|
|
6205
6850
|
* @param args.name - A string of the name to retrieve
|
|
6206
6851
|
*
|
|
@@ -6214,10 +6859,9 @@ declare class ANS {
|
|
|
6214
6859
|
* address the name points to for use on chain. Note, the target address can
|
|
6215
6860
|
* point to addresses that are not the owner of the name
|
|
6216
6861
|
*
|
|
6217
|
-
*
|
|
6862
|
+
* @example
|
|
6218
6863
|
* const targetAddr = await aptos.getTargetAddress({name: "test.aptos"})
|
|
6219
6864
|
* // targetAddr = 0x123...
|
|
6220
|
-
* ```
|
|
6221
6865
|
*
|
|
6222
6866
|
* @param args.name - A string of the name: primary, primary.apt, secondary.primary, secondary.primary.apt, etc.
|
|
6223
6867
|
*
|
|
@@ -6231,11 +6875,10 @@ declare class ANS {
|
|
|
6231
6875
|
* address the name points to for use on chain. Note, the target address can
|
|
6232
6876
|
* point to addresses that are not the owner of the name
|
|
6233
6877
|
*
|
|
6234
|
-
*
|
|
6878
|
+
* @example
|
|
6235
6879
|
* await aptos.setTargetAddress({sender: alice, name: "test.aptos", address: bob.accountAddress})
|
|
6236
6880
|
* const address = await aptos.getTargetAddress({name: "test.aptos"})
|
|
6237
6881
|
* // address = bob.accountAddress
|
|
6238
|
-
* ```
|
|
6239
6882
|
*
|
|
6240
6883
|
* @param args.name - A string of the name: test.aptos.apt, test.apt, test, test.aptos, etc.
|
|
6241
6884
|
* @param args.address - A AccountAddressInput of the address to set the domain or subdomain to
|
|
@@ -6253,10 +6896,9 @@ declare class ANS {
|
|
|
6253
6896
|
* multiple names that target it, but only a single name that is primary. An
|
|
6254
6897
|
* account also may not have a primary name.
|
|
6255
6898
|
*
|
|
6256
|
-
*
|
|
6899
|
+
* @example
|
|
6257
6900
|
* const name = await aptos.getPrimaryName({address: alice.accountAddress})
|
|
6258
6901
|
* // name = test.aptos
|
|
6259
|
-
* ```
|
|
6260
6902
|
*
|
|
6261
6903
|
* @param args.address - A AccountAddressInput (address) of the account
|
|
6262
6904
|
*
|
|
@@ -6270,11 +6912,10 @@ declare class ANS {
|
|
|
6270
6912
|
* multiple names that target it, but only a single name that is primary. An
|
|
6271
6913
|
* account also may not have a primary name.
|
|
6272
6914
|
*
|
|
6273
|
-
*
|
|
6915
|
+
* @example
|
|
6274
6916
|
* await aptos.setPrimaryName({sender: alice, name: "test.aptos"})
|
|
6275
6917
|
* const primaryName = await aptos.getPrimaryName({address: alice.accountAddress})
|
|
6276
6918
|
* // primaryName = test.aptos
|
|
6277
|
-
* ```
|
|
6278
6919
|
*
|
|
6279
6920
|
* @param args.sender - The sender account
|
|
6280
6921
|
* @param args.name - A string of the name: test, test.apt, test.aptos, test.aptos.apt, etc.
|
|
@@ -6289,7 +6930,7 @@ declare class ANS {
|
|
|
6289
6930
|
/**
|
|
6290
6931
|
* Registers a new name
|
|
6291
6932
|
*
|
|
6292
|
-
*
|
|
6933
|
+
* @example
|
|
6293
6934
|
* // An example of registering a subdomain name assuming def.apt is already registered
|
|
6294
6935
|
* // and belongs to the sender alice.
|
|
6295
6936
|
* const txn = aptos.registerName({
|
|
@@ -6300,7 +6941,6 @@ declare class ANS {
|
|
|
6300
6941
|
* expirationDate: Date.now() + 30 * 24 * 60 * 60 * 1000,
|
|
6301
6942
|
* },
|
|
6302
6943
|
* });
|
|
6303
|
-
* ```
|
|
6304
6944
|
*
|
|
6305
6945
|
* @param args.sender - The sender account
|
|
6306
6946
|
* @param args.name - A string of the name to register. This can be inclusive or exclusive of the .apt suffix.
|
|
@@ -6327,10 +6967,9 @@ declare class ANS {
|
|
|
6327
6967
|
*
|
|
6328
6968
|
* Note: If a domain name was minted with V1 of the contract, it will automatically be upgraded to V2 via this transaction.
|
|
6329
6969
|
*
|
|
6330
|
-
*
|
|
6970
|
+
* @example
|
|
6331
6971
|
* await aptos.renewDomain({sender: alice, name: "test"})
|
|
6332
6972
|
* // test.apt will be renewed for one year
|
|
6333
|
-
* ```
|
|
6334
6973
|
*
|
|
6335
6974
|
* @param args.sender - The sender account
|
|
6336
6975
|
* @param args.name - A string of the domain the subdomain will be under. The signer must be the domain owner.
|
|
@@ -6419,6 +7058,9 @@ declare class Staking {
|
|
|
6419
7058
|
/**
|
|
6420
7059
|
* Queries current number of delegators in a pool. Throws an error if the pool is not found.
|
|
6421
7060
|
*
|
|
7061
|
+
* @example
|
|
7062
|
+
* const delegators = await aptos.getNumberOfDelegators({poolAddress:"0x123"})
|
|
7063
|
+
*
|
|
6422
7064
|
* @param args.poolAddress Pool address
|
|
6423
7065
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
6424
7066
|
* @returns The number of delegators for the given pool
|
|
@@ -6430,6 +7072,9 @@ declare class Staking {
|
|
|
6430
7072
|
/**
|
|
6431
7073
|
* Queries current number of delegators in a pool. Throws an error if the pool is not found.
|
|
6432
7074
|
*
|
|
7075
|
+
* @example
|
|
7076
|
+
* const delegators = await aptos.getNumberOfDelegatorsForAllPools()
|
|
7077
|
+
*
|
|
6433
7078
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
6434
7079
|
* @returns GetNumberOfDelegatorsForAllPoolsResponse response type
|
|
6435
7080
|
*/
|
|
@@ -6440,6 +7085,9 @@ declare class Staking {
|
|
|
6440
7085
|
/**
|
|
6441
7086
|
* Queries delegated staking activities
|
|
6442
7087
|
*
|
|
7088
|
+
* @example
|
|
7089
|
+
* const delegators = await aptos.getDelegatedStakingActivities({delegatorAddress:"0x123",poolAddress:"0x456"})
|
|
7090
|
+
*
|
|
6443
7091
|
* @param args.delegatorAddress Delegator address
|
|
6444
7092
|
* @param args.poolAddress Pool address
|
|
6445
7093
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
@@ -6890,6 +7538,9 @@ declare class Transaction {
|
|
|
6890
7538
|
* Queries on-chain transactions. This function will not return pending
|
|
6891
7539
|
* transactions. For that, use `getTransactionsByHash`.
|
|
6892
7540
|
*
|
|
7541
|
+
* @example
|
|
7542
|
+
* const transactions = await aptos.getTransactions()
|
|
7543
|
+
*
|
|
6893
7544
|
* @param args.options.offset The number transaction to start with
|
|
6894
7545
|
* @param args.options.limit Number of results to return
|
|
6895
7546
|
*
|
|
@@ -6901,6 +7552,9 @@ declare class Transaction {
|
|
|
6901
7552
|
/**
|
|
6902
7553
|
* Queries on-chain transaction by version. This function will not return pending transactions.
|
|
6903
7554
|
*
|
|
7555
|
+
* @example
|
|
7556
|
+
* const transaction = await aptos.getTransactions({ledgerVersion:1})
|
|
7557
|
+
*
|
|
6904
7558
|
* @param args.ledgerVersion - Transaction version is an unsigned 64-bit number.
|
|
6905
7559
|
* @returns On-chain transaction. Only on-chain transactions have versions, so this
|
|
6906
7560
|
* function cannot be used to query pending transactions.
|
|
@@ -6910,6 +7564,10 @@ declare class Transaction {
|
|
|
6910
7564
|
}): Promise<TransactionResponse>;
|
|
6911
7565
|
/**
|
|
6912
7566
|
* Queries on-chain transaction by transaction hash. This function will return pending transactions.
|
|
7567
|
+
*
|
|
7568
|
+
* @example
|
|
7569
|
+
* const transaction = await aptos.getTransactionByHash({transactionHash:"0x123"})
|
|
7570
|
+
*
|
|
6913
7571
|
* @param args.transactionHash - Transaction hash should be hex-encoded bytes string with 0x prefix.
|
|
6914
7572
|
* @returns Transaction from mempool (pending) or on-chain (committed) transaction
|
|
6915
7573
|
*/
|
|
@@ -6925,6 +7583,9 @@ declare class Transaction {
|
|
|
6925
7583
|
* 2. Apply hash algorithm SHA3-256 to the hash message bytes.
|
|
6926
7584
|
* 3. Hex-encode the hash bytes with 0x prefix.
|
|
6927
7585
|
*
|
|
7586
|
+
* @example
|
|
7587
|
+
* const isPendingTransaction = await aptos.isPendingTransaction({transactionHash:"0x123"})
|
|
7588
|
+
*
|
|
6928
7589
|
* @param args.transactionHash A hash of transaction
|
|
6929
7590
|
* @returns `true` if transaction is in pending state and `false` otherwise
|
|
6930
7591
|
*/
|
|
@@ -6946,6 +7607,8 @@ declare class Transaction {
|
|
|
6946
7607
|
* 4. Transaction does not move past the pending state within `args.options.timeoutSecs` seconds.
|
|
6947
7608
|
* - The function will throw a WaitForTransactionError
|
|
6948
7609
|
*
|
|
7610
|
+
* @example
|
|
7611
|
+
* const transaction = await aptos.waitForTransaction({transactionHash:"0x123"})
|
|
6949
7612
|
*
|
|
6950
7613
|
* @param args.transactionHash The hash of a transaction previously submitted to the blockchain.
|
|
6951
7614
|
* @param args.options.timeoutSecs Timeout in seconds. Defaults to 20 seconds.
|
|
@@ -6963,14 +7626,9 @@ declare class Transaction {
|
|
|
6963
7626
|
* For more information {@link https://api.mainnet.aptoslabs.com/v1/spec#/operations/estimate_gas_price}
|
|
6964
7627
|
*
|
|
6965
7628
|
* @returns Object holding the outputs of the estimate gas API
|
|
7629
|
+
*
|
|
6966
7630
|
* @example
|
|
6967
|
-
*
|
|
6968
|
-
* {
|
|
6969
|
-
* gas_estimate: number;
|
|
6970
|
-
* deprioritized_gas_estimate?: number;
|
|
6971
|
-
* prioritized_gas_estimate?: number;
|
|
6972
|
-
* }
|
|
6973
|
-
* ```
|
|
7631
|
+
* const gasPrice = await aptos.waitForTransaction()
|
|
6974
7632
|
*/
|
|
6975
7633
|
getGasPriceEstimation(): Promise<GasEstimation>;
|
|
6976
7634
|
/**
|
|
@@ -6978,6 +7636,11 @@ declare class Transaction {
|
|
|
6978
7636
|
*
|
|
6979
7637
|
* This allows a user to sign a transaction using their own preferred signing method, and
|
|
6980
7638
|
* then submit it to the network.
|
|
7639
|
+
*
|
|
7640
|
+
* @example
|
|
7641
|
+
* const transaction = await aptos.transaction.build.simple({...})
|
|
7642
|
+
* const message = await aptos.getSigningMessage({transaction})
|
|
7643
|
+
*
|
|
6981
7644
|
* @param args.transaction A raw transaction for signing elsewhere
|
|
6982
7645
|
*/
|
|
6983
7646
|
getSigningMessage(args: {
|
|
@@ -6990,6 +7653,13 @@ declare class Transaction {
|
|
|
6990
7653
|
* `aptos move compile --save-metadata ...`,
|
|
6991
7654
|
* For more info {@link https://aptos.dev/tutorials/your-first-dapp/#step-4-publish-a-move-module}
|
|
6992
7655
|
*
|
|
7656
|
+
* @example
|
|
7657
|
+
* const transaction = await aptos.publishPackageTransaction({
|
|
7658
|
+
* account: alice,
|
|
7659
|
+
* metadataBytes,
|
|
7660
|
+
* moduleBytecode: [byteCode],
|
|
7661
|
+
* })
|
|
7662
|
+
*
|
|
6993
7663
|
* @param args.account The publisher account
|
|
6994
7664
|
* @param args.metadataBytes The package metadata bytes
|
|
6995
7665
|
* @param args.moduleBytecode An array of the bytecode of each module in the package in compiler output order
|
|
@@ -7007,6 +7677,13 @@ declare class Transaction {
|
|
|
7007
7677
|
* the account.
|
|
7008
7678
|
* Note: Only legacy Ed25519 scheme is supported for now.
|
|
7009
7679
|
* More info: {@link https://aptos.dev/guides/account-management/key-rotation/}
|
|
7680
|
+
*
|
|
7681
|
+
* @example
|
|
7682
|
+
* const response = await aptos.rotateAuthKey({
|
|
7683
|
+
* fromAccount: alice,
|
|
7684
|
+
* toNewPrivateKey: new ED25519PublicKey("0x123"),
|
|
7685
|
+
* })
|
|
7686
|
+
*
|
|
7010
7687
|
* @param args.fromAccount The account to rotate the auth key for
|
|
7011
7688
|
* @param args.toNewPrivateKey The new private key to rotate to
|
|
7012
7689
|
*
|
|
@@ -7019,6 +7696,13 @@ declare class Transaction {
|
|
|
7019
7696
|
/**
|
|
7020
7697
|
* Sign a transaction that can later be submitted to chain
|
|
7021
7698
|
*
|
|
7699
|
+
* @example
|
|
7700
|
+
* const transaction = await aptos.transaction.build.simple({...})
|
|
7701
|
+
* const transaction = await aptos.transaction.sign({
|
|
7702
|
+
* signer: alice,
|
|
7703
|
+
* transaction
|
|
7704
|
+
* })
|
|
7705
|
+
*
|
|
7022
7706
|
* @param args.signer The signer account
|
|
7023
7707
|
* @param args.transaction A raw transaction to sign on
|
|
7024
7708
|
*
|
|
@@ -7031,6 +7715,13 @@ declare class Transaction {
|
|
|
7031
7715
|
/**
|
|
7032
7716
|
* Sign a transaction as a fee payer that can later be submitted to chain
|
|
7033
7717
|
*
|
|
7718
|
+
* @example
|
|
7719
|
+
* const transaction = await aptos.transaction.build.simple({...})
|
|
7720
|
+
* const transaction = await aptos.transaction.signAsFeePayer({
|
|
7721
|
+
* signer: alice,
|
|
7722
|
+
* transaction
|
|
7723
|
+
* })
|
|
7724
|
+
*
|
|
7034
7725
|
* @param args.signer The fee payer signer account
|
|
7035
7726
|
* @param args.transaction A raw transaction to sign on
|
|
7036
7727
|
*
|
|
@@ -7068,13 +7759,13 @@ declare class Transaction {
|
|
|
7068
7759
|
*
|
|
7069
7760
|
* @param args.signer The signer account to sign the transaction
|
|
7070
7761
|
* @param args.transaction An instance of a RawTransaction, plus optional secondary/fee payer addresses
|
|
7071
|
-
*
|
|
7072
|
-
*
|
|
7073
|
-
*
|
|
7074
|
-
*
|
|
7075
|
-
*
|
|
7076
|
-
*
|
|
7077
|
-
*
|
|
7762
|
+
*
|
|
7763
|
+
* @example
|
|
7764
|
+
* const transaction = await aptos.transaction.build.simple({...})
|
|
7765
|
+
* const transaction = await aptos.signAndSubmitTransaction({
|
|
7766
|
+
* signer: alice,
|
|
7767
|
+
* transaction
|
|
7768
|
+
* })
|
|
7078
7769
|
*
|
|
7079
7770
|
* @return PendingTransactionResponse
|
|
7080
7771
|
*/
|
|
@@ -7084,12 +7775,50 @@ declare class Transaction {
|
|
|
7084
7775
|
}): Promise<PendingTransactionResponse>;
|
|
7085
7776
|
}
|
|
7086
7777
|
|
|
7778
|
+
interface BaseDeriveKeylessAccountArgs {
|
|
7779
|
+
jwt: string;
|
|
7780
|
+
ephemeralKeyPair: EphemeralKeyPair;
|
|
7781
|
+
uidKey?: string;
|
|
7782
|
+
pepper?: HexInput;
|
|
7783
|
+
extraFieldKey?: string;
|
|
7784
|
+
fetchProofAsync?: boolean;
|
|
7785
|
+
}
|
|
7786
|
+
interface DeriveKeylessAccountArgs extends BaseDeriveKeylessAccountArgs {
|
|
7787
|
+
disableConnect: true;
|
|
7788
|
+
}
|
|
7789
|
+
interface DeriveKeylessAccountWithConnectArgs extends BaseDeriveKeylessAccountArgs {
|
|
7790
|
+
disableConnect?: boolean;
|
|
7791
|
+
}
|
|
7792
|
+
/**
|
|
7793
|
+
* A class to query all `OIDB` related queries on Aptos.
|
|
7794
|
+
*/
|
|
7795
|
+
declare class Keyless {
|
|
7796
|
+
readonly config: AptosConfig;
|
|
7797
|
+
constructor(config: AptosConfig);
|
|
7798
|
+
/**
|
|
7799
|
+
* TODO
|
|
7800
|
+
*
|
|
7801
|
+
* @param args.jwt jwt token
|
|
7802
|
+
* @returns The pepper
|
|
7803
|
+
*/
|
|
7804
|
+
getPepper(args: {
|
|
7805
|
+
jwt: string;
|
|
7806
|
+
ephemeralKeyPair: EphemeralKeyPair;
|
|
7807
|
+
}): Promise<Uint8Array>;
|
|
7808
|
+
deriveKeylessAccount(args: DeriveKeylessAccountArgs): Promise<KeylessAccount>;
|
|
7809
|
+
deriveKeylessAccount(args: DeriveKeylessAccountWithConnectArgs): Promise<MultiKeyAccount>;
|
|
7810
|
+
}
|
|
7811
|
+
|
|
7087
7812
|
/**
|
|
7088
7813
|
* This class is the main entry point into Aptos's
|
|
7089
7814
|
* APIs and separates functionality into different namespaces.
|
|
7090
7815
|
*
|
|
7091
7816
|
* To use the SDK, create a new Aptos instance to get access
|
|
7092
7817
|
* to all the sdk functionality.
|
|
7818
|
+
*
|
|
7819
|
+
* @example
|
|
7820
|
+
*
|
|
7821
|
+
* const aptos = new Aptos();
|
|
7093
7822
|
*/
|
|
7094
7823
|
declare class Aptos {
|
|
7095
7824
|
readonly config: AptosConfig;
|
|
@@ -7103,9 +7832,10 @@ declare class Aptos {
|
|
|
7103
7832
|
readonly general: General;
|
|
7104
7833
|
readonly staking: Staking;
|
|
7105
7834
|
readonly transaction: Transaction;
|
|
7835
|
+
readonly keyless: Keyless;
|
|
7106
7836
|
constructor(settings?: AptosConfig);
|
|
7107
7837
|
}
|
|
7108
|
-
interface Aptos extends Account, ANS, Coin, DigitalAsset, Event, Faucet, FungibleAsset, General, Staking, Omit<Transaction, "build" | "simulate" | "submit" | "batch"> {
|
|
7838
|
+
interface Aptos extends Account, ANS, Coin, DigitalAsset, Event, Faucet, FungibleAsset, General, Keyless, Staking, Omit<Transaction, "build" | "simulate" | "submit" | "batch"> {
|
|
7109
7839
|
}
|
|
7110
7840
|
|
|
7111
7841
|
/**
|
|
@@ -7204,6 +7934,7 @@ type GetAptosRequestOptions = Omit<GetRequestOptions, "type">;
|
|
|
7204
7934
|
*/
|
|
7205
7935
|
declare function get<Req extends {}, Res extends {}>(options: GetRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
7206
7936
|
declare function getAptosFullNode<Req extends {}, Res extends {}>(options: GetAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
7937
|
+
declare function getAptosPepperService<Req extends {}, Res extends {}>(options: GetAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
7207
7938
|
declare function paginateWithCursor<Req extends Record<string, any>, Res extends Array<{}>>(options: GetAptosRequestOptions): Promise<Res>;
|
|
7208
7939
|
|
|
7209
7940
|
type PostRequestOptions = {
|
|
@@ -7255,39 +7986,7 @@ declare function post<Req extends {}, Res extends {}>(options: PostRequestOption
|
|
|
7255
7986
|
declare function postAptosFullNode<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
7256
7987
|
declare function postAptosIndexer<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
7257
7988
|
declare function postAptosFaucet<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
7989
|
+
declare function postAptosPepperService<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
7990
|
+
declare function postAptosProvingService<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
7258
7991
|
|
|
7259
|
-
|
|
7260
|
-
readonly MAXIMUM_WAIT_TIME_SEC = 75;
|
|
7261
|
-
readonly READINESS_ENDPOINT = "http://127.0.0.1:8070/";
|
|
7262
|
-
process: ChildProcessWithoutNullStreams | null;
|
|
7263
|
-
/**
|
|
7264
|
-
* kills all the descendent processes
|
|
7265
|
-
* of the node process, including the node process itself
|
|
7266
|
-
*/
|
|
7267
|
-
stop(): void;
|
|
7268
|
-
/**
|
|
7269
|
-
* Runs a local testnet and waits for process to be up.
|
|
7270
|
-
*
|
|
7271
|
-
* If local node process is already up it returns and does
|
|
7272
|
-
* not start the process
|
|
7273
|
-
*/
|
|
7274
|
-
run(): Promise<void>;
|
|
7275
|
-
/**
|
|
7276
|
-
* Starts the local testnet by running the aptos node run-local-testnet command
|
|
7277
|
-
*/
|
|
7278
|
-
start(): void;
|
|
7279
|
-
/**
|
|
7280
|
-
* Waits for the local testnet process to be up
|
|
7281
|
-
*
|
|
7282
|
-
* @returns Promise<boolean>
|
|
7283
|
-
*/
|
|
7284
|
-
waitUntilProcessIsUp(): Promise<boolean>;
|
|
7285
|
-
/**
|
|
7286
|
-
* Checks if the local testnet is up
|
|
7287
|
-
*
|
|
7288
|
-
* @returns Promise<boolean>
|
|
7289
|
-
*/
|
|
7290
|
-
checkIfProcessIsUp(): Promise<boolean>;
|
|
7291
|
-
}
|
|
7292
|
-
|
|
7293
|
-
export { APTOS_BIP44_REGEX, APTOS_COIN, APTOS_HARDENED_REGEX, Account$1 as Account, AccountAddress, type AccountAddressInput, AccountAuthenticator, AccountAuthenticatorEd25519, AccountAuthenticatorMultiEd25519, AccountAuthenticatorMultiKey, AccountAuthenticatorSingleKey, AccountAuthenticatorVariant, type AccountData, AccountPublicKey, AccountSequenceNumber, type AccountSignature, AddressInvalidReason, type AnyNumber, AnyPublicKey, AnyPublicKeyVariant, type AnyRawTransaction, type AnyRawTransactionInstance, AnySignature, AnySignatureVariant, type AnyTransactionPayloadInstance, Aptos, AptosApiError, AptosApiType, AptosConfig, type AptosRequest, type AptosResponse, type AptosSettings, AuthenticationKey, type AuthenticationKeyScheme, type Block, type BlockMetadataTransactionResponse, Bool, CKDPriv, ChainId, type Client, type ClientConfig, type ClientHeadersType, type ClientRequest, type ClientResponse, type CommittedTransactionResponse, type CreateAccountFromPrivateKeyArgs, type CreateEd25519AccountFromPrivateKeyArgs, type CreateEd25519SingleKeyAccountFromPrivateKeyArgs, type CreateSingleKeyAccountFromPrivateKeyArgs, DEFAULT_MAX_GAS_AMOUNT, DEFAULT_TXN_EXP_SEC_FROM_NOW, DEFAULT_TXN_TIMEOUT_SEC, type DecodedTableData, type DeletedTableData, DeriveScheme, type DerivedKeys, type Deserializable, Deserializer, type DirectWriteSet, Ed25519Account, Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature, type Ed25519SignerConstructorArgs, type Ed25519SignerFromDerivationPathArgs, EntryFunction, type EntryFunctionABI, type EntryFunctionArgument, type EntryFunctionArgumentTypes, EntryFunctionBytes, type EntryFunctionPayloadResponse, type Event$1 as Event, type EventGuid, type ExecutionFinishEventData, type FailureEventData, type FaucetConfig, FeePayerRawTransaction, FixedBytes, type FullNodeConfig, type FunctionABI, type GasEstimation, type GenerateAccount, type GenerateAccountArgs, type GenerateAccountWithEd25519, type GenerateAccountWithSingleSignerSecp256k1Key, type GenerateEd25519AccountArgs, type GenerateEd25519SingleKeyAccountArgs, type GenerateSingleKeyAccountArgs, type GenesisPayload, type GenesisTransactionResponse, type GetANSNameResponse, type GetAccountCoinsDataResponse, type GetAccountCollectionsWithOwnedTokenResponse, type GetAccountOwnedObjectsResponse, type GetAccountOwnedTokensFromCollectionResponse, type GetAccountOwnedTokensQueryResponse, type GetAptosRequestOptions, type GetChainTopUserTransactionsResponse, type GetCollectionDataResponse, type GetCurrentFungibleAssetBalancesResponse, type GetCurrentTokenOwnershipResponse, type GetDelegatedStakingActivitiesResponse, type GetEventsResponse, type GetFungibleAssetActivitiesResponse, type GetFungibleAssetMetadataResponse, type GetNumberOfDelegatorsResponse, type GetOwnedTokensResponse, type GetProcessorStatusResponse, type GetRequestOptions, type GetTokenActivityResponse, type GetTokenDataResponse, type GraphqlQuery, HARDENED_OFFSET, Hex, type HexInput, HexInvalidReason, Identifier, type 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, type LedgerInfo, type LedgerVersionArg, LocalNode, MimeType, ModuleId, MoveAbility, type MoveAddressType, type MoveFunction, type MoveFunctionGenericTypeParam, type MoveFunctionId, MoveFunctionVisibility, type MoveModule, type MoveModuleBytecode, type MoveModuleId, type MoveObjectType, MoveOption, type MoveOptionType, type MoveResource, type MoveScriptBytecode, MoveString, type MoveStruct, type MoveStructField, type MoveStructId, type MoveStructType, type MoveType, type MoveUint128Type, type MoveUint16Type, type MoveUint256Type, type MoveUint32Type, type MoveUint64Type, type MoveUint8Type, type MoveValue, MoveVector, MultiAgentRawTransaction, MultiEd25519PublicKey, MultiEd25519Signature, MultiKey, MultiKeySignature, MultiSig, MultiSigTransactionPayload, type MultisigPayloadResponse, Network, NetworkToChainId, NetworkToFaucetAPI, NetworkToIndexerAPI, NetworkToNetworkName, NetworkToNodeAPI, type OrderBy, type OrderByArg, type OrderByValue, type PaginationArgs, ParsingError, type ParsingResult, type PendingTransactionResponse, type PostAptosRequestOptions, type PostRequestOptions, type PrivateKey, type PrivateKeyFromDerivationPathArgs, ProcessorType, PublicKey, RAW_TRANSACTION_SALT, RAW_TRANSACTION_WITH_DATA_SALT, RawTransaction, RawTransactionWithData, RoleType, RotationProofChallenge, Script, type ScriptFunctionArgument, type ScriptFunctionArgumentTypes, type ScriptPayloadResponse, ScriptTransactionArgumentVariants, type ScriptWriteSet, Secp256k1PrivateKey, Secp256k1PublicKey, Secp256k1Signature, Serializable, Serializer, Signature, SignedTransaction, SigningScheme, SigningSchemeInput, type SimpleEntryFunctionArgumentTypes, SimpleTransaction, SingleKeyAccount, type SingleKeySignerConstructorArgs, type SingleKeySignerFromDerivationPathArgs, type SingleKeySignerGenerateArgs, type StateCheckpointTransactionResponse, StructTag, type SuccessEventData, type TableItemRequest, type TokenStandard, type TokenStandardArg, type TransactionArgument, TransactionAuthenticator, TransactionAuthenticatorEd25519, TransactionAuthenticatorFeePayer, TransactionAuthenticatorMultiAgent, TransactionAuthenticatorMultiEd25519, TransactionAuthenticatorSingleSender, TransactionAuthenticatorVariant, type TransactionEd25519Signature, type TransactionFeePayerSignature, type TransactionMultiAgentSignature, type TransactionMultiEd25519Signature, TransactionPayload, TransactionPayloadEntryFunction, TransactionPayloadMultiSig, type TransactionPayloadResponse, TransactionPayloadScript, TransactionPayloadVariants, type TransactionResponse, TransactionResponseType, type TransactionSecp256k1Signature, type TransactionSignature, TransactionVariants, TransactionWorker, type TransactionWorkerEvents, TransactionWorkerEventsEnum, TypeTag, TypeTagAddress, TypeTagBool, TypeTagGeneric, TypeTagParserError, TypeTagParserErrorType, TypeTagReference, TypeTagSigner, TypeTagStruct, TypeTagU128, TypeTagU16, TypeTagU256, TypeTagU32, TypeTagU64, TypeTagU8, TypeTagVariants, TypeTagVector, U128, U16, U256, U32, U64, U8, type Uint128, type Uint16, type Uint256, type Uint32, type Uint64, type Uint8, type UserTransactionResponse, type ValidatorTransactionResponse, type VerifyEd25519SignatureArgs, type VerifySignatureArgs, type VerifySingleKeySignatureArgs, type ViewFunctionABI, type WaitForTransactionOptions, type WhereArg, type WriteSet, type WriteSetChange, type WriteSetChangeDeleteModule, type WriteSetChangeDeleteResource, type WriteSetChangeDeleteTableItem, type WriteSetChangeWriteModule, type WriteSetChangeWriteResource, type WriteSetChangeWriteTableItem, aptosCoinStructTag, aptosRequest, buildTransaction, checkOrConvertArgument, convertArgument, createObjectAddress, createResourceAddress, createTokenAddress, deriveKey, deriveTransactionType, deserializeFromScriptArgument, ensureBoolean, fetchEntryFunctionAbi, fetchFunctionAbi, fetchViewFunctionAbi, findFirstNonSignerArg, generateMultiSignersSignedTransaction, generateRawTransaction, generateSignedTransaction, generateSignedTransactionForSimulation, generateSigningMessage, generateTransactionPayload, generateTransactionPayloadWithABI, generateUserTransactionHash, generateViewFunctionPayload, generateViewFunctionPayloadWithABI, get, getAptosFullNode, getAuthenticatorForSimulation, getFunctionParts, hashValues, isBcsAddress, isBcsBool, isBcsFixedBytes, isBcsString, isBcsU128, isBcsU16, isBcsU256, isBcsU32, isBcsU64, isBcsU8, isBlockMetadataTransactionResponse, isBool, isEd25519Signature, isEncodedEntryFunctionArgument, isFeePayerSignature, isGenesisTransactionResponse, isLargeNumber, isMultiAgentSignature, isMultiEd25519Signature, isNull, isNumber, isPendingTransactionResponse, isScriptDataInput, isSecp256k1Signature, isStateCheckpointTransactionResponse, isString, isUserTransactionResponse, isValidBIP44Path, isValidHardenedPath, isValidatorTransactionResponse, mnemonicToSeed, objectStructTag, optionStructTag, outOfRangeErrorMessage, paginateWithCursor, parseTypeTag, post, postAptosFaucet, postAptosFullNode, postAptosIndexer, promiseFulfilledStatus, request, sign, splitPath, standardizeTypeTags, stringStructTag, throwTypeMismatch, validateNumberInRange };
|
|
7992
|
+
export { APTOS_BIP44_DEFAULT_DERIVATION_PATH, APTOS_BIP44_REGEX, APTOS_COIN, APTOS_HARDENED_REGEX, Account$1 as Account, AccountAddress, type AccountAddressInput, AccountAuthenticator, AccountAuthenticatorEd25519, AccountAuthenticatorMultiEd25519, AccountAuthenticatorMultiKey, AccountAuthenticatorSingleKey, AccountAuthenticatorVariant, type AccountData, AccountPublicKey, AccountSequenceNumber, type AccountSignature, AddressInvalidReason, type AnyNumber, AnyPublicKey, AnyPublicKeyVariant, type AnyRawTransaction, type AnyRawTransactionInstance, AnySignature, AnySignatureVariant, type AnyTransactionPayloadInstance, Aptos, AptosApiError, AptosApiType, AptosConfig, type AptosRequest, type AptosResponse, type AptosSettings, AuthenticationKey, type AuthenticationKeyScheme, type Block, type BlockMetadataTransactionResponse, Bool, CKDPriv, ChainId, type Client, type ClientConfig, type ClientHeadersType, type ClientRequest, type ClientResponse, type CommittedTransactionResponse, type CreateAccountFromPrivateKeyArgs, type CreateEd25519AccountFromPrivateKeyArgs, type CreateEd25519SingleKeyAccountFromPrivateKeyArgs, type CreateSingleKeyAccountFromPrivateKeyArgs, DEFAULT_MAX_GAS_AMOUNT, DEFAULT_TXN_EXP_SEC_FROM_NOW, DEFAULT_TXN_TIMEOUT_SEC, type DecodedTableData, type DeletedTableData, DeriveScheme, type DerivedKeys, type Deserializable, Deserializer, type DirectWriteSet, EPK_HORIZON_SECS, Ed25519Account, Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature, type Ed25519SignerConstructorArgs, type Ed25519SignerFromDerivationPathArgs, EntryFunction, type EntryFunctionABI, type EntryFunctionArgument, type EntryFunctionArgumentTypes, EntryFunctionBytes, type EntryFunctionPayloadResponse, EphemeralCertificate, EphemeralKeyPair, EphemeralPublicKey, EphemeralPublicKeyVariant, EphemeralSignature, EphemeralSignatureVariant, type Event$1 as Event, type EventGuid, type ExecutionFinishEventData, type FailureEventData, type FaucetConfig, FeePayerRawTransaction, FixedBytes, type FullNodeConfig, type FunctionABI, type GasEstimation, type GenerateAccount, type GenerateAccountArgs, type GenerateAccountWithEd25519, type GenerateAccountWithSingleSignerSecp256k1Key, type GenerateEd25519AccountArgs, type GenerateEd25519SingleKeyAccountArgs, type GenerateSingleKeyAccountArgs, type GenesisPayload, type GenesisTransactionResponse, type GetANSNameResponse, type GetAccountCoinsDataResponse, type GetAccountCollectionsWithOwnedTokenResponse, type GetAccountOwnedObjectsResponse, type GetAccountOwnedTokensFromCollectionResponse, type GetAccountOwnedTokensQueryResponse, type GetAptosRequestOptions, type GetChainTopUserTransactionsResponse, type GetCollectionDataResponse, type GetCurrentFungibleAssetBalancesResponse, type GetCurrentTokenOwnershipResponse, type GetDelegatedStakingActivitiesResponse, type GetEventsResponse, type GetFungibleAssetActivitiesResponse, type GetFungibleAssetMetadataResponse, type GetNumberOfDelegatorsResponse, type GetOwnedTokensResponse, type GetProcessorStatusResponse, type GetRequestOptions, type GetTokenActivityResponse, type GetTokenDataResponse, type GraphqlQuery, Groth16Zkp, HARDENED_OFFSET, Hex, type HexInput, HexInvalidReason, Identifier, type 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, KeylessAccount, KeylessPublicKey, KeylessSignature, type LedgerInfo, type LedgerVersionArg, MAX_AUD_VAL_BYTES, MAX_COMMITED_EPK_BYTES, MAX_EXTRA_FIELD_BYTES, MAX_ISS_VAL_BYTES, MAX_JWT_HEADER_B64_BYTES, MAX_UID_KEY_BYTES, MAX_UID_VAL_BYTES, MimeType, ModuleId, MoveAbility, type MoveAddressType, type MoveFunction, type MoveFunctionGenericTypeParam, type MoveFunctionId, MoveFunctionVisibility, type MoveModule, type MoveModuleBytecode, type MoveModuleId, type MoveObjectType, MoveOption, type MoveOptionType, type MoveResource, type MoveScriptBytecode, MoveString, type MoveStruct, type MoveStructField, type MoveStructId, type MoveStructType, type MoveType, type MoveUint128Type, type MoveUint16Type, type MoveUint256Type, type MoveUint32Type, type MoveUint64Type, type MoveUint8Type, type MoveValue, MoveVector, MultiAgentRawTransaction, MultiEd25519PublicKey, MultiEd25519Signature, MultiKey, MultiKeyAccount, MultiSig, MultiSigTransactionPayload, MultiSignature, type MultisigPayloadResponse, Network, NetworkToChainId, NetworkToFaucetAPI, NetworkToIndexerAPI, NetworkToNetworkName, NetworkToNodeAPI, NetworkToPepperAPI, NetworkToProverAPI, OpenIdSignature, OpenIdSignatureOrZkProof, type OrderBy, type OrderByArg, type OrderByValue, type PaginationArgs, ParsingError, type ParsingResult, type PendingTransactionResponse, type PostAptosRequestOptions, type PostRequestOptions, type PrivateKey, type PrivateKeyFromDerivationPathArgs, ProcessorType, PublicKey, RAW_TRANSACTION_SALT, RAW_TRANSACTION_WITH_DATA_SALT, RawTransaction, RawTransactionWithData, RoleType, RotationProofChallenge, Script, type ScriptFunctionArgument, type ScriptFunctionArgumentTypes, type ScriptPayloadResponse, ScriptTransactionArgumentVariants, type ScriptWriteSet, Secp256k1PrivateKey, Secp256k1PublicKey, Secp256k1Signature, Serializable, Serializer, Signature, SignedGroth16Signature, SignedTransaction, SigningScheme, SigningSchemeInput, type SimpleEntryFunctionArgumentTypes, SimpleTransaction, SingleKeyAccount, type SingleKeySignerConstructorArgs, type SingleKeySignerFromDerivationPathArgs, type SingleKeySignerGenerateArgs, type StateCheckpointTransactionResponse, StructTag, type SuccessEventData, type TableItemRequest, type TokenStandard, type TokenStandardArg, type TransactionArgument, TransactionAuthenticator, TransactionAuthenticatorEd25519, TransactionAuthenticatorFeePayer, TransactionAuthenticatorMultiAgent, TransactionAuthenticatorMultiEd25519, TransactionAuthenticatorSingleSender, TransactionAuthenticatorVariant, type TransactionEd25519Signature, type TransactionFeePayerSignature, type TransactionMultiAgentSignature, type TransactionMultiEd25519Signature, TransactionPayload, TransactionPayloadEntryFunction, TransactionPayloadMultiSig, type TransactionPayloadResponse, TransactionPayloadScript, TransactionPayloadVariants, type TransactionResponse, TransactionResponseType, type TransactionSecp256k1Signature, type TransactionSignature, TransactionVariants, TransactionWorker, type TransactionWorkerEvents, TransactionWorkerEventsEnum, TypeTag, TypeTagAddress, TypeTagBool, TypeTagGeneric, TypeTagParserError, TypeTagParserErrorType, TypeTagReference, TypeTagSigner, TypeTagStruct, TypeTagU128, TypeTagU16, TypeTagU256, TypeTagU32, TypeTagU64, TypeTagU8, TypeTagVariants, TypeTagVector, U128, U16, U256, U32, U64, U8, type Uint128, type Uint16, type Uint256, type Uint32, type Uint64, type Uint8, type UserTransactionResponse, type ValidatorTransactionResponse, type VerifyEd25519SignatureArgs, type VerifySignatureArgs, type VerifySingleKeySignatureArgs, type ViewFunctionABI, type WaitForTransactionOptions, type WhereArg, type WriteSet, type WriteSetChange, type WriteSetChangeDeleteModule, type WriteSetChangeDeleteResource, type WriteSetChangeDeleteTableItem, type WriteSetChangeWriteModule, type WriteSetChangeWriteResource, type WriteSetChangeWriteTableItem, aptosCoinStructTag, aptosRequest, buildTransaction, checkOrConvertArgument, computeAddressSeed, convertArgument, deriveKey, deriveTransactionType, deserializeFromScriptArgument, ensureBoolean, fetchEntryFunctionAbi, fetchFunctionAbi, fetchViewFunctionAbi, findFirstNonSignerArg, fromDerivationPath, generateMultiSignersSignedTransaction, generateRawTransaction, generateSignedTransaction, generateSignedTransactionForSimulation, generateSigningMessage, generateSigningMessageForSerializable, generateSigningMessageForTransaction, generateTransactionPayload, generateTransactionPayloadWithABI, generateUserTransactionHash, generateViewFunctionPayload, generateViewFunctionPayloadWithABI, get, getAptosFullNode, getAptosPepperService, getAuthenticatorForSimulation, getFunctionParts, hashValues, isBcsAddress, isBcsBool, isBcsFixedBytes, isBcsString, isBcsU128, isBcsU16, isBcsU256, isBcsU32, isBcsU64, isBcsU8, isBlockMetadataTransactionResponse, isBool, isEd25519Signature, isEncodedEntryFunctionArgument, isFeePayerSignature, isGenesisTransactionResponse, isLargeNumber, isMultiAgentSignature, isMultiEd25519Signature, isNull, isNumber, isPendingTransactionResponse, isScriptDataInput, isSecp256k1Signature, isStateCheckpointTransactionResponse, isString, isUserTransactionResponse, isValidBIP44Path, isValidHardenedPath, isValidatorTransactionResponse, mnemonicToSeed, objectStructTag, optionStructTag, outOfRangeErrorMessage, paginateWithCursor, parseTypeTag, post, postAptosFaucet, postAptosFullNode, postAptosIndexer, postAptosPepperService, postAptosProvingService, promiseFulfilledStatus, request, splitPath, standardizeTypeTags, stringStructTag, throwTypeMismatch, validateNumberInRange };
|