@aptos-labs/ts-sdk 1.13.2 → 1.13.3-zeta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/index.d.ts +1800 -1346
- package/dist/common/index.js +26 -26
- package/dist/common/index.js.map +1 -1
- package/dist/esm/{Ed25519Account--qjfup2u.d.mts → Ed25519Account-8gJF5t3F.d.mts} +10 -12
- 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 +47 -0
- package/dist/esm/account/EphemeralKeyPair.mjs +2 -0
- package/dist/esm/account/KeylessAccount.d.mts +106 -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 +40 -0
- package/dist/esm/account/index.mjs +2 -0
- package/dist/esm/api/account.d.mts +13 -1
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.d.mts +2 -2
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +14 -8
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/aptosConfig.d.mts +20 -0
- package/dist/esm/api/aptosConfig.mjs +1 -1
- package/dist/esm/api/coin.d.mts +7 -7
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.d.mts +1 -1
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/event.mjs +1 -1
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.d.mts +5 -5
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.d.mts +7 -7
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +13 -8
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/keyless.d.mts +67 -0
- package/dist/esm/api/keyless.mjs +2 -0
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/transaction.d.mts +1 -1
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.d.mts +3 -3
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.d.mts +8 -8
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.d.mts +1 -1
- 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 +6 -6
- package/dist/esm/api/transactionSubmission/simulate.mjs +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-2Q6K4CLJ.mjs +2 -0
- package/dist/esm/chunk-2Q6K4CLJ.mjs.map +1 -0
- package/dist/esm/chunk-2YDIOWRJ.mjs +2 -0
- package/dist/esm/chunk-2YDIOWRJ.mjs.map +1 -0
- package/dist/esm/{chunk-2PFN7LYP.mjs → chunk-33WBJV5U.mjs} +2 -2
- package/dist/esm/{chunk-PIOHC246.mjs → chunk-37CYBCWS.mjs} +2 -2
- package/dist/esm/chunk-37CYBCWS.mjs.map +1 -0
- package/dist/esm/{chunk-TBMAJ6AW.mjs → chunk-3FVRXELT.mjs} +2 -2
- package/dist/esm/{chunk-GS5J57UA.mjs → chunk-3QHRPREO.mjs} +2 -2
- package/dist/esm/chunk-3QHRPREO.mjs.map +1 -0
- package/dist/esm/{chunk-DMKUAQB7.mjs → chunk-3VGX3TXH.mjs} +2 -2
- package/dist/esm/{chunk-PJLCPRYJ.mjs → chunk-3YNRBMPS.mjs} +2 -2
- package/dist/esm/chunk-4NMDYPUD.mjs +1 -0
- package/dist/esm/chunk-4NMDYPUD.mjs.map +1 -0
- package/dist/esm/chunk-4XB3D2ZD.mjs +2 -0
- package/dist/esm/chunk-4XB3D2ZD.mjs.map +1 -0
- package/dist/esm/chunk-5QBTBH64.mjs +2 -0
- package/dist/esm/chunk-5VSMDXZ6.mjs +2 -0
- package/dist/esm/chunk-5VSMDXZ6.mjs.map +1 -0
- package/dist/esm/{chunk-A556OVZY.mjs → chunk-6CQH7JPF.mjs} +2 -2
- package/dist/esm/chunk-6GQAHQGW.mjs +2 -0
- package/dist/esm/chunk-6GQAHQGW.mjs.map +1 -0
- package/dist/esm/chunk-6J3CB3DN.mjs +2 -0
- package/dist/esm/chunk-6J3CB3DN.mjs.map +1 -0
- package/dist/esm/chunk-6M6XXPQQ.mjs +2 -0
- package/dist/esm/chunk-6M6XXPQQ.mjs.map +1 -0
- package/dist/esm/{chunk-QIAHBEEW.mjs → chunk-6RBUXB5I.mjs} +2 -2
- package/dist/esm/{chunk-FXNFWLQC.mjs → chunk-7H3HRFVM.mjs} +2 -2
- package/dist/esm/chunk-7JNPSNL6.mjs +2 -0
- package/dist/esm/chunk-7JNPSNL6.mjs.map +1 -0
- package/dist/esm/{chunk-NPFNYP75.mjs → chunk-7STYQ5ZE.mjs} +2 -2
- package/dist/esm/chunk-7Z6DYLCA.mjs +1 -0
- package/dist/esm/chunk-7Z6DYLCA.mjs.map +1 -0
- package/dist/esm/{chunk-4LMAVPA4.mjs → chunk-A7L2Z5DW.mjs} +2 -2
- package/dist/esm/chunk-AQ4I7VVB.mjs +1 -0
- package/dist/esm/chunk-AQ4I7VVB.mjs.map +1 -0
- package/dist/esm/{chunk-ZYYK3UXP.mjs → chunk-C3L4ETUF.mjs} +2 -2
- package/dist/esm/chunk-CHQ6IKE3.mjs +2 -0
- package/dist/esm/{chunk-MNBYKY5P.mjs.map → chunk-CHQ6IKE3.mjs.map} +1 -1
- package/dist/esm/{chunk-WFZDFFBM.mjs → chunk-COW5IGYC.mjs} +2 -2
- package/dist/esm/{chunk-RQEWIZ67.mjs → chunk-DIBNAYZ2.mjs} +2 -2
- package/dist/esm/chunk-DMKFITUM.mjs +2 -0
- package/dist/esm/chunk-DMKFITUM.mjs.map +1 -0
- package/dist/esm/{chunk-TORRTLWV.mjs → chunk-DOCYCNXV.mjs} +2 -2
- package/dist/esm/chunk-DOCYCNXV.mjs.map +1 -0
- package/dist/esm/{chunk-TGG7SWBO.mjs → chunk-DX62SMGM.mjs} +2 -2
- package/dist/esm/chunk-DX62SMGM.mjs.map +1 -0
- package/dist/esm/{chunk-FS3NSGBF.mjs → chunk-EB7AI4B4.mjs} +2 -2
- package/dist/esm/chunk-EFRNRARV.mjs +2 -0
- package/dist/esm/chunk-EFRNRARV.mjs.map +1 -0
- package/dist/esm/chunk-EKOIHFAW.mjs +2 -0
- package/dist/esm/{chunk-B252RJCU.mjs.map → chunk-EKOIHFAW.mjs.map} +1 -1
- package/dist/esm/chunk-FLYEALDB.mjs +2 -0
- package/dist/esm/chunk-FLYEALDB.mjs.map +1 -0
- package/dist/esm/{chunk-YKVKSNH4.mjs → chunk-GI52SX32.mjs} +2 -2
- package/dist/esm/{chunk-3RUY5FQK.mjs → chunk-GKCO5PQJ.mjs} +2 -2
- package/dist/esm/chunk-GKCO5PQJ.mjs.map +1 -0
- package/dist/esm/{chunk-UML2VQZT.mjs → chunk-HGZGTBA4.mjs} +2 -2
- package/dist/esm/chunk-HJULFJXF.mjs +2 -0
- package/dist/esm/chunk-HJULFJXF.mjs.map +1 -0
- package/dist/esm/{chunk-TGXZVNR5.mjs → chunk-IEZO4PIG.mjs} +2 -2
- package/dist/esm/{chunk-UMFJDDYI.mjs → chunk-IM32PZOD.mjs} +2 -2
- package/dist/esm/chunk-IM32PZOD.mjs.map +1 -0
- package/dist/esm/chunk-IOVRZ2CA.mjs +2 -0
- package/dist/esm/chunk-IOVRZ2CA.mjs.map +1 -0
- package/dist/esm/chunk-ITEV72BZ.mjs +2 -0
- package/dist/esm/chunk-ITEV72BZ.mjs.map +1 -0
- package/dist/esm/chunk-JXCZTOYC.mjs +1 -0
- package/dist/esm/chunk-JXCZTOYC.mjs.map +1 -0
- package/dist/esm/{chunk-KDCHX7BI.mjs → chunk-KFJMLLOA.mjs} +2 -2
- package/dist/esm/chunk-KGJITNRZ.mjs +2 -0
- package/dist/esm/chunk-KGJITNRZ.mjs.map +1 -0
- package/dist/esm/chunk-KOCKKI4F.mjs +2 -0
- package/dist/esm/{chunk-YBEF3UR3.mjs → chunk-LV7OW245.mjs} +2 -2
- package/dist/esm/{chunk-DSTKXJMA.mjs → chunk-MGOHPDX4.mjs} +2 -2
- package/dist/esm/{chunk-BBU2EE6D.mjs → chunk-MJGZJL3W.mjs} +2 -2
- package/dist/esm/{chunk-UPIN5AIO.mjs → chunk-MKUAW7KW.mjs} +2 -2
- package/dist/esm/{chunk-BWFJHFBQ.mjs → chunk-MWUJCP27.mjs} +2 -2
- package/dist/esm/{chunk-QTRYMRYK.mjs → chunk-NC5HHEEM.mjs} +2 -2
- package/dist/esm/{chunk-6MG4JAYB.mjs → chunk-NPNAKSCR.mjs} +2 -2
- package/dist/esm/chunk-NWLZDI2I.mjs +2 -0
- package/dist/esm/chunk-NWLZDI2I.mjs.map +1 -0
- package/dist/esm/{chunk-6IGEUEER.mjs → chunk-ODTNF2YP.mjs} +2 -2
- package/dist/esm/{chunk-LV2V23Z6.mjs → chunk-OKG6X5TX.mjs} +2 -2
- package/dist/esm/chunk-OKG6X5TX.mjs.map +1 -0
- package/dist/esm/chunk-OKRUEVF3.mjs +2 -0
- package/dist/esm/chunk-OKRUEVF3.mjs.map +1 -0
- package/dist/esm/chunk-OYTLWUQT.mjs +2 -0
- package/dist/esm/chunk-OYTLWUQT.mjs.map +1 -0
- package/dist/esm/chunk-P5VCS2F5.mjs +2 -0
- package/dist/esm/chunk-P5VCS2F5.mjs.map +1 -0
- package/dist/esm/{chunk-U43IJHQN.mjs → chunk-PFFAQZHT.mjs} +2 -2
- package/dist/esm/{chunk-3HV2C4SS.mjs → chunk-PTIZKRON.mjs} +2 -2
- package/dist/esm/chunk-R4UIPTBH.mjs +2 -0
- package/dist/esm/chunk-R4UIPTBH.mjs.map +1 -0
- package/dist/esm/chunk-R7BAM2G6.mjs +2 -0
- package/dist/esm/chunk-R7BAM2G6.mjs.map +1 -0
- package/dist/esm/{chunk-GXYS45Y5.mjs → chunk-RDNPWCZ4.mjs} +2 -2
- 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-SA7MZPM3.mjs +2 -0
- package/dist/esm/chunk-SA7MZPM3.mjs.map +1 -0
- package/dist/esm/{chunk-R5QUBEH6.mjs → chunk-STYDBDYL.mjs} +2 -2
- package/dist/esm/{chunk-IOSQVDZI.mjs → chunk-T23OVRNF.mjs} +2 -2
- package/dist/esm/{chunk-BRQYARQ3.mjs → chunk-T7JIGO3O.mjs} +2 -2
- package/dist/esm/{chunk-4DNVCOW7.mjs → chunk-TFJCMFKE.mjs} +2 -2
- package/dist/esm/chunk-TFJCMFKE.mjs.map +1 -0
- package/dist/esm/{chunk-3QBZU5ZD.mjs → chunk-TV64AINP.mjs} +2 -2
- package/dist/esm/chunk-TV64AINP.mjs.map +1 -0
- package/dist/esm/{chunk-52C73T26.mjs → chunk-TVRJ3M7B.mjs} +2 -2
- package/dist/esm/{chunk-52C73T26.mjs.map → chunk-TVRJ3M7B.mjs.map} +1 -1
- package/dist/esm/{chunk-GRT5PHL6.mjs → chunk-UKJUHLZW.mjs} +2 -2
- package/dist/esm/chunk-VTX77UM3.mjs +2 -0
- package/dist/esm/chunk-VTX77UM3.mjs.map +1 -0
- package/dist/esm/{chunk-BAV4XY7C.mjs → chunk-W637YAND.mjs} +2 -2
- package/dist/esm/chunk-WPVBC4JS.mjs +2 -0
- package/dist/esm/chunk-WPVBC4JS.mjs.map +1 -0
- package/dist/esm/chunk-WTVN3XGK.mjs +2 -0
- package/dist/esm/chunk-WTVN3XGK.mjs.map +1 -0
- package/dist/esm/chunk-X7GVXVT4.mjs +2 -0
- package/dist/esm/{chunk-IZT6OX3R.mjs.map → chunk-X7GVXVT4.mjs.map} +1 -1
- package/dist/esm/{chunk-XLPVG4XR.mjs → chunk-XHPLLMR5.mjs} +2 -2
- package/dist/esm/chunk-YE5B2S5L.mjs +2 -0
- package/dist/esm/chunk-YE5B2S5L.mjs.map +1 -0
- package/dist/esm/{chunk-QWRH22H4.mjs → chunk-YGB7MEH3.mjs} +2 -2
- package/dist/esm/chunk-YH6UKGIX.mjs +2 -0
- package/dist/esm/chunk-YH6UKGIX.mjs.map +1 -0
- package/dist/esm/{chunk-EJCKCYYI.mjs → chunk-YI7FZPIK.mjs} +2 -2
- package/dist/esm/{chunk-OGHE4AQA.mjs → chunk-Z2ZR4PTF.mjs} +2 -2
- package/dist/esm/{chunk-TC3VVMPY.mjs → chunk-ZGTJMNZG.mjs} +2 -2
- package/dist/esm/{chunk-RHBCVCOS.mjs → chunk-ZNEBMSNC.mjs} +2 -2
- 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/core/account/index.d.mts +5 -14
- package/dist/esm/core/account/index.mjs +1 -1
- package/dist/esm/core/account/utils/address.mjs +1 -1
- package/dist/esm/core/account/utils/index.mjs +1 -1
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.d.mts +0 -10
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/ephemeral.d.mts +77 -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 +7 -5
- 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.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.d.mts +4 -3
- 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/publicKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/index.d.mts +6 -7
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/index.d.mts +17 -11
- 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 +1 -1
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.d.mts +7 -7
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.d.mts +2 -2
- 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 +5 -5
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/keyless.d.mts +67 -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.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.d.mts +1 -1
- 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 +3 -4
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.mjs +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 -0
- 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.mjs +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 +13 -1
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/index.d.mts +2 -2
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.d.mts +1 -1
- 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 +13 -25
- 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 +17 -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 +3 -1
- 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/utils/normalizeBundle.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +7 -2
- package/src/{core/account → account}/Account.ts +12 -16
- package/src/{core/account → account}/Ed25519Account.ts +13 -7
- package/src/account/EphemeralKeyPair.ts +123 -0
- package/src/account/KeylessAccount.ts +299 -0
- package/src/account/MultiKeyAccount.ts +119 -0
- package/src/{core/account → account}/SingleKeyAccount.ts +13 -8
- package/src/account/index.ts +6 -0
- package/src/api/account.ts +2 -1
- package/src/api/ans.ts +2 -1
- package/src/api/aptos.ts +6 -0
- package/src/api/aptosConfig.ts +46 -1
- package/src/api/digitalAsset.ts +2 -1
- package/src/api/fungibleAsset.ts +2 -1
- package/src/api/keyless.ts +35 -0
- package/src/api/transaction.ts +2 -1
- package/src/api/transactionSubmission/management.ts +1 -1
- package/src/api/transactionSubmission/sign.ts +1 -1
- package/src/bcs/serializer.ts +18 -0
- package/src/client/core.ts +8 -0
- package/src/client/get.ts +6 -0
- package/src/client/post.ts +12 -0
- package/src/core/account/index.ts +1 -3
- package/src/core/crypto/ed25519.ts +4 -24
- package/src/core/crypto/ephemeral.ts +149 -0
- package/src/core/crypto/hdKey.ts +31 -0
- package/src/core/crypto/index.ts +2 -0
- package/src/core/crypto/keyless.ts +508 -0
- package/src/core/crypto/multiKey.ts +21 -11
- package/src/core/crypto/poseidon.ts +134 -0
- package/src/core/crypto/singleKey.ts +11 -0
- package/src/core/index.ts +0 -1
- package/src/index.ts +1 -0
- package/src/internal/account.ts +1 -1
- package/src/internal/ans.ts +2 -1
- package/src/internal/digitalAsset.ts +2 -1
- package/src/internal/fungibleAsset.ts +2 -1
- package/src/internal/keyless.ts +188 -0
- package/src/internal/transactionSubmission.ts +8 -7
- package/src/transactions/authenticator/account.ts +6 -11
- package/src/transactions/instances/index.ts +1 -0
- package/src/transactions/management/accountSequenceNumber.ts +1 -1
- package/src/transactions/management/transactionWorker.ts +8 -2
- package/src/transactions/transactionBuilder/index.ts +1 -0
- package/src/transactions/transactionBuilder/signingMessage.ts +70 -0
- package/src/transactions/transactionBuilder/transactionBuilder.ts +41 -70
- package/src/types/index.ts +19 -0
- package/src/types/keyless.ts +6 -0
- package/src/utils/apiEndpoints.ts +14 -0
- package/src/utils/const.ts +2 -0
- package/src/version.ts +1 -1
- package/dist/esm/chunk-3426VLAZ.mjs +0 -2
- package/dist/esm/chunk-3426VLAZ.mjs.map +0 -1
- package/dist/esm/chunk-3OCTOB2E.mjs +0 -2
- package/dist/esm/chunk-3OCTOB2E.mjs.map +0 -1
- package/dist/esm/chunk-3QBZU5ZD.mjs.map +0 -1
- package/dist/esm/chunk-3RUY5FQK.mjs.map +0 -1
- package/dist/esm/chunk-4DNVCOW7.mjs.map +0 -1
- package/dist/esm/chunk-5HALZ6JC.mjs +0 -2
- package/dist/esm/chunk-5HALZ6JC.mjs.map +0 -1
- package/dist/esm/chunk-5OM4V4DR.mjs +0 -2
- package/dist/esm/chunk-5TMLAKSH.mjs +0 -2
- package/dist/esm/chunk-5TMLAKSH.mjs.map +0 -1
- package/dist/esm/chunk-B252RJCU.mjs +0 -2
- package/dist/esm/chunk-CYNQRMO5.mjs +0 -2
- package/dist/esm/chunk-CYNQRMO5.mjs.map +0 -1
- package/dist/esm/chunk-E7FWVXGX.mjs +0 -1
- package/dist/esm/chunk-FO6ZKE7A.mjs +0 -2
- package/dist/esm/chunk-FO6ZKE7A.mjs.map +0 -1
- package/dist/esm/chunk-GMQQSSEO.mjs +0 -2
- package/dist/esm/chunk-GMQQSSEO.mjs.map +0 -1
- package/dist/esm/chunk-GNQXMS53.mjs +0 -2
- package/dist/esm/chunk-GNQXMS53.mjs.map +0 -1
- package/dist/esm/chunk-GS5J57UA.mjs.map +0 -1
- package/dist/esm/chunk-HLVMEUWD.mjs +0 -2
- package/dist/esm/chunk-HLVMEUWD.mjs.map +0 -1
- package/dist/esm/chunk-HQSLBTW5.mjs +0 -2
- package/dist/esm/chunk-HQSLBTW5.mjs.map +0 -1
- package/dist/esm/chunk-ICXA3DZH.mjs +0 -1
- package/dist/esm/chunk-IZT6OX3R.mjs +0 -2
- package/dist/esm/chunk-KHOHRD2B.mjs +0 -2
- package/dist/esm/chunk-KHOHRD2B.mjs.map +0 -1
- package/dist/esm/chunk-L6PGWGFF.mjs +0 -2
- package/dist/esm/chunk-LR65XHSF.mjs +0 -2
- package/dist/esm/chunk-LR65XHSF.mjs.map +0 -1
- package/dist/esm/chunk-LV2V23Z6.mjs.map +0 -1
- package/dist/esm/chunk-MLWIHWNH.mjs +0 -1
- package/dist/esm/chunk-MNBYKY5P.mjs +0 -2
- package/dist/esm/chunk-OVJQWQ2N.mjs +0 -2
- package/dist/esm/chunk-OVJQWQ2N.mjs.map +0 -1
- package/dist/esm/chunk-OWW6SIDP.mjs +0 -2
- package/dist/esm/chunk-OWW6SIDP.mjs.map +0 -1
- package/dist/esm/chunk-PIOHC246.mjs.map +0 -1
- package/dist/esm/chunk-R7G3CLRI.mjs +0 -1
- package/dist/esm/chunk-TGG7SWBO.mjs.map +0 -1
- package/dist/esm/chunk-TORRTLWV.mjs.map +0 -1
- package/dist/esm/chunk-TQR7M73S.mjs +0 -2
- package/dist/esm/chunk-TQR7M73S.mjs.map +0 -1
- package/dist/esm/chunk-UMFJDDYI.mjs.map +0 -1
- package/dist/esm/chunk-UVSRX4SV.mjs +0 -1
- package/dist/esm/chunk-VNO4VHJN.mjs +0 -2
- package/dist/esm/chunk-VNO4VHJN.mjs.map +0 -1
- package/dist/esm/chunk-WBOLHLPX.mjs +0 -2
- package/dist/esm/chunk-WBOLHLPX.mjs.map +0 -1
- package/dist/esm/chunk-XDGQTMDV.mjs +0 -2
- package/dist/esm/chunk-XDGQTMDV.mjs.map +0 -1
- package/dist/esm/chunk-YVSU6GOA.mjs +0 -2
- package/dist/esm/chunk-YVSU6GOA.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 → account}/Account.mjs.map +0 -0
- /package/dist/esm/{core/account → account}/Ed25519Account.mjs.map +0 -0
- /package/dist/esm/{chunk-E7FWVXGX.mjs.map → account/EphemeralKeyPair.mjs.map} +0 -0
- /package/dist/esm/{chunk-ICXA3DZH.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/{chunk-R7G3CLRI.mjs.map → account/index.mjs.map} +0 -0
- /package/dist/esm/{chunk-UVSRX4SV.mjs.map → api/keyless.mjs.map} +0 -0
- /package/dist/esm/{chunk-2PFN7LYP.mjs.map → chunk-33WBJV5U.mjs.map} +0 -0
- /package/dist/esm/{chunk-TBMAJ6AW.mjs.map → chunk-3FVRXELT.mjs.map} +0 -0
- /package/dist/esm/{chunk-DMKUAQB7.mjs.map → chunk-3VGX3TXH.mjs.map} +0 -0
- /package/dist/esm/{chunk-PJLCPRYJ.mjs.map → chunk-3YNRBMPS.mjs.map} +0 -0
- /package/dist/esm/{chunk-5OM4V4DR.mjs.map → chunk-5QBTBH64.mjs.map} +0 -0
- /package/dist/esm/{chunk-A556OVZY.mjs.map → chunk-6CQH7JPF.mjs.map} +0 -0
- /package/dist/esm/{chunk-QIAHBEEW.mjs.map → chunk-6RBUXB5I.mjs.map} +0 -0
- /package/dist/esm/{chunk-FXNFWLQC.mjs.map → chunk-7H3HRFVM.mjs.map} +0 -0
- /package/dist/esm/{chunk-NPFNYP75.mjs.map → chunk-7STYQ5ZE.mjs.map} +0 -0
- /package/dist/esm/{chunk-4LMAVPA4.mjs.map → chunk-A7L2Z5DW.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZYYK3UXP.mjs.map → chunk-C3L4ETUF.mjs.map} +0 -0
- /package/dist/esm/{chunk-WFZDFFBM.mjs.map → chunk-COW5IGYC.mjs.map} +0 -0
- /package/dist/esm/{chunk-RQEWIZ67.mjs.map → chunk-DIBNAYZ2.mjs.map} +0 -0
- /package/dist/esm/{chunk-FS3NSGBF.mjs.map → chunk-EB7AI4B4.mjs.map} +0 -0
- /package/dist/esm/{chunk-YKVKSNH4.mjs.map → chunk-GI52SX32.mjs.map} +0 -0
- /package/dist/esm/{chunk-UML2VQZT.mjs.map → chunk-HGZGTBA4.mjs.map} +0 -0
- /package/dist/esm/{chunk-TGXZVNR5.mjs.map → chunk-IEZO4PIG.mjs.map} +0 -0
- /package/dist/esm/{chunk-KDCHX7BI.mjs.map → chunk-KFJMLLOA.mjs.map} +0 -0
- /package/dist/esm/{chunk-L6PGWGFF.mjs.map → chunk-KOCKKI4F.mjs.map} +0 -0
- /package/dist/esm/{chunk-YBEF3UR3.mjs.map → chunk-LV7OW245.mjs.map} +0 -0
- /package/dist/esm/{chunk-DSTKXJMA.mjs.map → chunk-MGOHPDX4.mjs.map} +0 -0
- /package/dist/esm/{chunk-BBU2EE6D.mjs.map → chunk-MJGZJL3W.mjs.map} +0 -0
- /package/dist/esm/{chunk-UPIN5AIO.mjs.map → chunk-MKUAW7KW.mjs.map} +0 -0
- /package/dist/esm/{chunk-BWFJHFBQ.mjs.map → chunk-MWUJCP27.mjs.map} +0 -0
- /package/dist/esm/{chunk-QTRYMRYK.mjs.map → chunk-NC5HHEEM.mjs.map} +0 -0
- /package/dist/esm/{chunk-6MG4JAYB.mjs.map → chunk-NPNAKSCR.mjs.map} +0 -0
- /package/dist/esm/{chunk-6IGEUEER.mjs.map → chunk-ODTNF2YP.mjs.map} +0 -0
- /package/dist/esm/{chunk-U43IJHQN.mjs.map → chunk-PFFAQZHT.mjs.map} +0 -0
- /package/dist/esm/{chunk-3HV2C4SS.mjs.map → chunk-PTIZKRON.mjs.map} +0 -0
- /package/dist/esm/{chunk-GXYS45Y5.mjs.map → chunk-RDNPWCZ4.mjs.map} +0 -0
- /package/dist/esm/{chunk-R5QUBEH6.mjs.map → chunk-STYDBDYL.mjs.map} +0 -0
- /package/dist/esm/{chunk-IOSQVDZI.mjs.map → chunk-T23OVRNF.mjs.map} +0 -0
- /package/dist/esm/{chunk-BRQYARQ3.mjs.map → chunk-T7JIGO3O.mjs.map} +0 -0
- /package/dist/esm/{chunk-GRT5PHL6.mjs.map → chunk-UKJUHLZW.mjs.map} +0 -0
- /package/dist/esm/{chunk-BAV4XY7C.mjs.map → chunk-W637YAND.mjs.map} +0 -0
- /package/dist/esm/{chunk-XLPVG4XR.mjs.map → chunk-XHPLLMR5.mjs.map} +0 -0
- /package/dist/esm/{chunk-QWRH22H4.mjs.map → chunk-YGB7MEH3.mjs.map} +0 -0
- /package/dist/esm/{chunk-EJCKCYYI.mjs.map → chunk-YI7FZPIK.mjs.map} +0 -0
- /package/dist/esm/{chunk-OGHE4AQA.mjs.map → chunk-Z2ZR4PTF.mjs.map} +0 -0
- /package/dist/esm/{chunk-TC3VVMPY.mjs.map → chunk-ZGTJMNZG.mjs.map} +0 -0
- /package/dist/esm/{chunk-RHBCVCOS.mjs.map → chunk-ZNEBMSNC.mjs.map} +0 -0
package/dist/common/index.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ import EventEmitter from 'eventemitter3';
|
|
|
3
3
|
declare const NetworkToIndexerAPI: Record<string, string>;
|
|
4
4
|
declare const NetworkToNodeAPI: Record<string, string>;
|
|
5
5
|
declare const NetworkToFaucetAPI: Record<string, string>;
|
|
6
|
+
declare const NetworkToPepperAPI: Record<string, string>;
|
|
7
|
+
declare const NetworkToProverAPI: Record<string, string>;
|
|
6
8
|
declare enum Network {
|
|
7
9
|
MAINNET = "mainnet",
|
|
8
10
|
TESTNET = "testnet",
|
|
@@ -867,11 +869,23 @@ declare enum AccountAuthenticatorVariant {
|
|
|
867
869
|
}
|
|
868
870
|
declare enum AnyPublicKeyVariant {
|
|
869
871
|
Ed25519 = 0,
|
|
870
|
-
Secp256k1 = 1
|
|
872
|
+
Secp256k1 = 1,
|
|
873
|
+
Keyless = 3
|
|
871
874
|
}
|
|
872
875
|
declare enum AnySignatureVariant {
|
|
873
876
|
Ed25519 = 0,
|
|
874
|
-
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
|
|
875
889
|
}
|
|
876
890
|
/**
|
|
877
891
|
* BCS types
|
|
@@ -893,6 +907,8 @@ type AptosSettings = {
|
|
|
893
907
|
readonly fullnode?: string;
|
|
894
908
|
readonly faucet?: string;
|
|
895
909
|
readonly indexer?: string;
|
|
910
|
+
readonly pepper?: string;
|
|
911
|
+
readonly prover?: string;
|
|
896
912
|
readonly clientConfig?: ClientConfig;
|
|
897
913
|
readonly client?: Client;
|
|
898
914
|
readonly fullnodeConfig?: FullNodeConfig;
|
|
@@ -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;
|
|
@@ -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
|
*
|
|
@@ -3123,6 +3131,7 @@ type DerivedKeys = {
|
|
|
3123
3131
|
*/
|
|
3124
3132
|
declare const APTOS_HARDENED_REGEX: RegExp;
|
|
3125
3133
|
declare const APTOS_BIP44_REGEX: RegExp;
|
|
3134
|
+
declare const APTOS_BIP44_DEFAULT_DERIVATION_PATH = "m/44'/637'/0'/0'/0'";
|
|
3126
3135
|
/**
|
|
3127
3136
|
* A list of supported key types and associated seeds
|
|
3128
3137
|
*/
|
|
@@ -3172,6 +3181,13 @@ declare const CKDPriv: ({ key, chainCode }: DerivedKeys, index: number) => Deriv
|
|
|
3172
3181
|
* @param path
|
|
3173
3182
|
*/
|
|
3174
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;
|
|
3175
3191
|
/**
|
|
3176
3192
|
* Normalizes the mnemonic by removing extra whitespace and making it lowercase
|
|
3177
3193
|
* @param mnemonic the mnemonic seed phrase
|
|
@@ -3378,8 +3394,9 @@ declare class MultiKey extends AccountPublicKey {
|
|
|
3378
3394
|
createBitmap(args: {
|
|
3379
3395
|
bits: number[];
|
|
3380
3396
|
}): Uint8Array;
|
|
3397
|
+
getIndex(publicKey: PublicKey): number;
|
|
3381
3398
|
}
|
|
3382
|
-
declare class
|
|
3399
|
+
declare class MultiSignature extends Signature {
|
|
3383
3400
|
/**
|
|
3384
3401
|
* Number of bytes in the bitmap representing who signed the transaction (32-bits)
|
|
3385
3402
|
*/
|
|
@@ -3431,7 +3448,266 @@ declare class MultiKeySignature extends Signature {
|
|
|
3431
3448
|
}): Uint8Array;
|
|
3432
3449
|
toUint8Array(): Uint8Array;
|
|
3433
3450
|
serialize(serializer: Serializer): void;
|
|
3434
|
-
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
|
+
readonly variant: EphemeralPublicKeyVariant;
|
|
3465
|
+
constructor(publicKey: PublicKey);
|
|
3466
|
+
/**
|
|
3467
|
+
* Get the public key in bytes (Uint8Array).
|
|
3468
|
+
*
|
|
3469
|
+
* @returns Uint8Array representation of the public key
|
|
3470
|
+
*/
|
|
3471
|
+
toUint8Array(): Uint8Array;
|
|
3472
|
+
/**
|
|
3473
|
+
* Get the public key as a hex string with the 0x prefix.
|
|
3474
|
+
*
|
|
3475
|
+
* @returns string representation of the public key
|
|
3476
|
+
*/
|
|
3477
|
+
toString(): string;
|
|
3478
|
+
/**
|
|
3479
|
+
* Verifies a signed data with a public key
|
|
3480
|
+
*
|
|
3481
|
+
* @param args.message message
|
|
3482
|
+
* @param args.signature The signature
|
|
3483
|
+
* @returns true if the signature is valid
|
|
3484
|
+
*/
|
|
3485
|
+
verifySignature(args: {
|
|
3486
|
+
message: HexInput;
|
|
3487
|
+
signature: EphemeralSignature;
|
|
3488
|
+
}): boolean;
|
|
3489
|
+
serialize(serializer: Serializer): void;
|
|
3490
|
+
static deserialize(deserializer: Deserializer): EphemeralPublicKey;
|
|
3491
|
+
static isPublicKey(publicKey: PublicKey): publicKey is EphemeralPublicKey;
|
|
3492
|
+
isEd25519(): this is Ed25519PublicKey;
|
|
3493
|
+
}
|
|
3494
|
+
declare class EphemeralSignature extends Signature {
|
|
3495
|
+
readonly signature: Signature;
|
|
3496
|
+
constructor(signature: Signature);
|
|
3497
|
+
/**
|
|
3498
|
+
* Get the public key in bytes (Uint8Array).
|
|
3499
|
+
*
|
|
3500
|
+
* @returns Uint8Array representation of the public key
|
|
3501
|
+
*/
|
|
3502
|
+
toUint8Array(): Uint8Array;
|
|
3503
|
+
/**
|
|
3504
|
+
* Get the public key as a hex string with the 0x prefix.
|
|
3505
|
+
*
|
|
3506
|
+
* @returns string representation of the public key
|
|
3507
|
+
*/
|
|
3508
|
+
toString(): string;
|
|
3509
|
+
static fromHex(hexInput: HexInput): EphemeralSignature;
|
|
3510
|
+
serialize(serializer: Serializer): void;
|
|
3511
|
+
static deserialize(deserializer: Deserializer): EphemeralSignature;
|
|
3512
|
+
}
|
|
3513
|
+
|
|
3514
|
+
declare const EPK_HORIZON_SECS = 10000000;
|
|
3515
|
+
declare const MAX_AUD_VAL_BYTES = 120;
|
|
3516
|
+
declare const MAX_UID_KEY_BYTES = 30;
|
|
3517
|
+
declare const MAX_UID_VAL_BYTES = 330;
|
|
3518
|
+
declare const MAX_ISS_VAL_BYTES = 120;
|
|
3519
|
+
declare const MAX_EXTRA_FIELD_BYTES = 350;
|
|
3520
|
+
declare const MAX_JWT_HEADER_B64_BYTES = 300;
|
|
3521
|
+
declare const MAX_COMMITED_EPK_BYTES = 93;
|
|
3522
|
+
/**
|
|
3523
|
+
* Represents the KeylessPublicKey public key
|
|
3524
|
+
*
|
|
3525
|
+
* KeylessPublicKey authentication key is represented in the SDK as `AnyPublicKey`.
|
|
3526
|
+
*/
|
|
3527
|
+
declare class KeylessPublicKey extends AccountPublicKey {
|
|
3528
|
+
static readonly ADDRESS_SEED_LENGTH: number;
|
|
3529
|
+
readonly iss: string;
|
|
3530
|
+
readonly addressSeed: Uint8Array;
|
|
3531
|
+
constructor(iss: string, addressSeed: HexInput);
|
|
3532
|
+
authKey(): AuthenticationKey;
|
|
3533
|
+
/**
|
|
3534
|
+
* Get the public key in bytes (Uint8Array).
|
|
3535
|
+
*
|
|
3536
|
+
* @returns Uint8Array representation of the public key
|
|
3537
|
+
*/
|
|
3538
|
+
toUint8Array(): Uint8Array;
|
|
3539
|
+
/**
|
|
3540
|
+
* Get the public key as a hex string with the 0x prefix.
|
|
3541
|
+
*
|
|
3542
|
+
* @returns string representation of the public key
|
|
3543
|
+
*/
|
|
3544
|
+
toString(): string;
|
|
3545
|
+
/**
|
|
3546
|
+
* Verifies a signed data with a public key
|
|
3547
|
+
*
|
|
3548
|
+
* @param args.message message
|
|
3549
|
+
* @param args.signature The signature
|
|
3550
|
+
* @returns true if the signature is valid
|
|
3551
|
+
*/
|
|
3552
|
+
verifySignature(args: {
|
|
3553
|
+
message: HexInput;
|
|
3554
|
+
signature: KeylessSignature;
|
|
3555
|
+
}): boolean;
|
|
3556
|
+
serialize(serializer: Serializer): void;
|
|
3557
|
+
static deserialize(deserializer: Deserializer): KeylessPublicKey;
|
|
3558
|
+
static load(deserializer: Deserializer): KeylessPublicKey;
|
|
3559
|
+
static isPublicKey(publicKey: PublicKey): publicKey is KeylessPublicKey;
|
|
3560
|
+
static create(args: {
|
|
3561
|
+
iss: string;
|
|
3562
|
+
uidKey: string;
|
|
3563
|
+
uidVal: string;
|
|
3564
|
+
aud: string;
|
|
3565
|
+
pepper: HexInput;
|
|
3566
|
+
}): KeylessPublicKey;
|
|
3567
|
+
}
|
|
3568
|
+
declare function computeAddressSeed(args: {
|
|
3569
|
+
uidKey: string;
|
|
3570
|
+
uidVal: string;
|
|
3571
|
+
aud: string;
|
|
3572
|
+
pepper: HexInput;
|
|
3573
|
+
}): Uint8Array;
|
|
3574
|
+
declare class OpenIdSignatureOrZkProof extends Signature {
|
|
3575
|
+
readonly signature: Signature;
|
|
3576
|
+
constructor(signature: Signature);
|
|
3577
|
+
/**
|
|
3578
|
+
* Get the public key in bytes (Uint8Array).
|
|
3579
|
+
*
|
|
3580
|
+
* @returns Uint8Array representation of the public key
|
|
3581
|
+
*/
|
|
3582
|
+
toUint8Array(): Uint8Array;
|
|
3583
|
+
/**
|
|
3584
|
+
* Get the public key as a hex string with the 0x prefix.
|
|
3585
|
+
*
|
|
3586
|
+
* @returns string representation of the public key
|
|
3587
|
+
*/
|
|
3588
|
+
toString(): string;
|
|
3589
|
+
serialize(serializer: Serializer): void;
|
|
3590
|
+
static deserialize(deserializer: Deserializer): OpenIdSignatureOrZkProof;
|
|
3591
|
+
}
|
|
3592
|
+
declare class Groth16Zkp extends Serializable {
|
|
3593
|
+
a: Uint8Array;
|
|
3594
|
+
b: Uint8Array;
|
|
3595
|
+
c: Uint8Array;
|
|
3596
|
+
constructor(args: {
|
|
3597
|
+
a: HexInput;
|
|
3598
|
+
b: HexInput;
|
|
3599
|
+
c: HexInput;
|
|
3600
|
+
});
|
|
3601
|
+
toUint8Array(): Uint8Array;
|
|
3602
|
+
serialize(serializer: Serializer): void;
|
|
3603
|
+
static deserialize(deserializer: Deserializer): Groth16Zkp;
|
|
3604
|
+
}
|
|
3605
|
+
declare class SignedGroth16Signature extends Signature {
|
|
3606
|
+
readonly proof: Groth16Zkp;
|
|
3607
|
+
readonly expHorizonSecs: bigint;
|
|
3608
|
+
readonly extraField?: string;
|
|
3609
|
+
readonly overrideAudVal?: string;
|
|
3610
|
+
readonly trainingWheelsSignature?: EphemeralSignature;
|
|
3611
|
+
constructor(args: {
|
|
3612
|
+
proof: Groth16Zkp;
|
|
3613
|
+
expHorizonSecs?: bigint;
|
|
3614
|
+
extraField?: string;
|
|
3615
|
+
overrideAudVal?: string;
|
|
3616
|
+
trainingWheelsSignature?: EphemeralSignature;
|
|
3617
|
+
});
|
|
3618
|
+
/**
|
|
3619
|
+
* Get the signature in bytes (Uint8Array).
|
|
3620
|
+
*
|
|
3621
|
+
* @returns Uint8Array representation of the signature
|
|
3622
|
+
*/
|
|
3623
|
+
toUint8Array(): Uint8Array;
|
|
3624
|
+
/**
|
|
3625
|
+
* Get the signature as a hex string with the 0x prefix.
|
|
3626
|
+
*
|
|
3627
|
+
* @returns string representation of the signature
|
|
3628
|
+
*/
|
|
3629
|
+
toString(): string;
|
|
3630
|
+
serialize(serializer: Serializer): void;
|
|
3631
|
+
static deserialize(deserializer: Deserializer): SignedGroth16Signature;
|
|
3632
|
+
static load(deserializer: Deserializer): SignedGroth16Signature;
|
|
3633
|
+
}
|
|
3634
|
+
/**
|
|
3635
|
+
* A OpenId signature which contains the private inputs to an OIDB proof.
|
|
3636
|
+
*/
|
|
3637
|
+
declare class OpenIdSignature extends Signature {
|
|
3638
|
+
readonly jwtSignature: string;
|
|
3639
|
+
readonly jwtPayloadJson: string;
|
|
3640
|
+
readonly uidKey: string;
|
|
3641
|
+
readonly epkBlinder: Uint8Array;
|
|
3642
|
+
readonly pepper: Uint8Array;
|
|
3643
|
+
readonly overrideAudValue?: string;
|
|
3644
|
+
/**
|
|
3645
|
+
* Create a new Signature instance from a Uint8Array or String.
|
|
3646
|
+
*
|
|
3647
|
+
* @param hexInput A HexInput (string or Uint8Array)
|
|
3648
|
+
*/
|
|
3649
|
+
constructor(args: {
|
|
3650
|
+
jwtSignature: string;
|
|
3651
|
+
jwtPayloadJson: string;
|
|
3652
|
+
uidKey?: string;
|
|
3653
|
+
epkBlinder: Uint8Array;
|
|
3654
|
+
pepper: Uint8Array;
|
|
3655
|
+
overrideAudValue?: string;
|
|
3656
|
+
});
|
|
3657
|
+
/**
|
|
3658
|
+
* Get the signature in bytes (Uint8Array).
|
|
3659
|
+
*
|
|
3660
|
+
* @returns Uint8Array representation of the signature
|
|
3661
|
+
*/
|
|
3662
|
+
toUint8Array(): Uint8Array;
|
|
3663
|
+
/**
|
|
3664
|
+
* Get the signature as a hex string with the 0x prefix.
|
|
3665
|
+
*
|
|
3666
|
+
* @returns string representation of the signature
|
|
3667
|
+
*/
|
|
3668
|
+
toString(): string;
|
|
3669
|
+
serialize(serializer: Serializer): void;
|
|
3670
|
+
static deserialize(deserializer: Deserializer): OpenIdSignature;
|
|
3671
|
+
static load(deserializer: Deserializer): OpenIdSignature;
|
|
3672
|
+
static isSignature(signature: Signature): signature is OpenIdSignature;
|
|
3673
|
+
}
|
|
3674
|
+
/**
|
|
3675
|
+
* A signature of a message signed via OIDC that uses proofs or the jwt token to authenticate.
|
|
3676
|
+
*/
|
|
3677
|
+
declare class KeylessSignature extends Signature {
|
|
3678
|
+
readonly openIdSignatureOrZkProof: OpenIdSignatureOrZkProof;
|
|
3679
|
+
readonly jwtHeader: string;
|
|
3680
|
+
readonly expiryDateSecs: bigint | number;
|
|
3681
|
+
readonly ephemeralPublicKey: EphemeralPublicKey;
|
|
3682
|
+
readonly ephemeralSignature: EphemeralSignature;
|
|
3683
|
+
/**
|
|
3684
|
+
* Create a new Signature instance from a Uint8Array or String.
|
|
3685
|
+
*
|
|
3686
|
+
* @param hexInput A HexInput (string or Uint8Array)
|
|
3687
|
+
*/
|
|
3688
|
+
constructor(args: {
|
|
3689
|
+
jwtHeader: string;
|
|
3690
|
+
openIdSignatureOrZkProof: OpenIdSignatureOrZkProof;
|
|
3691
|
+
expiryDateSecs: bigint | number;
|
|
3692
|
+
ephemeralPublicKey: EphemeralPublicKey;
|
|
3693
|
+
ephemeralSignature: EphemeralSignature;
|
|
3694
|
+
});
|
|
3695
|
+
/**
|
|
3696
|
+
* Get the signature in bytes (Uint8Array).
|
|
3697
|
+
*
|
|
3698
|
+
* @returns Uint8Array representation of the signature
|
|
3699
|
+
*/
|
|
3700
|
+
toUint8Array(): Uint8Array;
|
|
3701
|
+
/**
|
|
3702
|
+
* Get the signature as a hex string with the 0x prefix.
|
|
3703
|
+
*
|
|
3704
|
+
* @returns string representation of the signature
|
|
3705
|
+
*/
|
|
3706
|
+
toString(): string;
|
|
3707
|
+
serialize(serializer: Serializer): void;
|
|
3708
|
+
static deserialize(deserializer: Deserializer): KeylessSignature;
|
|
3709
|
+
static load(deserializer: Deserializer): KeylessSignature;
|
|
3710
|
+
static isSignature(signature: Signature): signature is KeylessSignature;
|
|
3435
3711
|
}
|
|
3436
3712
|
|
|
3437
3713
|
/**
|
|
@@ -3624,370 +3900,58 @@ declare class AccountAuthenticatorSingleKey extends AccountAuthenticator {
|
|
|
3624
3900
|
*/
|
|
3625
3901
|
declare class AccountAuthenticatorMultiKey extends AccountAuthenticator {
|
|
3626
3902
|
readonly public_keys: MultiKey;
|
|
3627
|
-
readonly signatures:
|
|
3628
|
-
|
|
3629
|
-
constructor(public_keys: MultiKey, signatures: Array<AnySignature>, signatures_bitmap: Uint8Array);
|
|
3903
|
+
readonly signatures: MultiSignature;
|
|
3904
|
+
constructor(public_keys: MultiKey, signatures: MultiSignature);
|
|
3630
3905
|
serialize(serializer: Serializer): void;
|
|
3631
3906
|
static load(deserializer: Deserializer): AccountAuthenticatorMultiKey;
|
|
3632
3907
|
}
|
|
3633
3908
|
|
|
3634
|
-
interface SingleKeySignerConstructorArgs {
|
|
3635
|
-
privateKey: PrivateKey;
|
|
3636
|
-
address?: AccountAddressInput;
|
|
3637
|
-
}
|
|
3638
|
-
interface SingleKeySignerGenerateArgs {
|
|
3639
|
-
scheme?: SigningSchemeInput;
|
|
3640
|
-
}
|
|
3641
|
-
type SingleKeySignerFromDerivationPathArgs = SingleKeySignerGenerateArgs & {
|
|
3642
|
-
path: string;
|
|
3643
|
-
mnemonic: string;
|
|
3644
|
-
};
|
|
3645
|
-
interface VerifySingleKeySignatureArgs {
|
|
3646
|
-
message: HexInput;
|
|
3647
|
-
signature: AnySignature;
|
|
3648
|
-
}
|
|
3649
3909
|
/**
|
|
3650
|
-
*
|
|
3651
|
-
* This extends a SingleKeyAccount by adding signing capabilities through a valid private key.
|
|
3652
|
-
* Currently, the only supported signature schemes are Ed25519 and Secp256k1.
|
|
3653
|
-
*
|
|
3654
|
-
* Note: Generating a signer instance does not create the account on-chain.
|
|
3910
|
+
* Type of API endpoint for request routing
|
|
3655
3911
|
*/
|
|
3656
|
-
declare
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
readonly accountAddress: AccountAddress;
|
|
3663
|
-
readonly signingScheme = SigningScheme.SingleKey;
|
|
3664
|
-
constructor(args: SingleKeySignerConstructorArgs);
|
|
3665
|
-
/**
|
|
3666
|
-
* Derives an account from a randomly generated private key.
|
|
3667
|
-
* Default generation is using an Ed25519 key
|
|
3668
|
-
* @returns Account with the given signature scheme
|
|
3669
|
-
*/
|
|
3670
|
-
static generate(args?: SingleKeySignerGenerateArgs): SingleKeyAccount;
|
|
3671
|
-
/**
|
|
3672
|
-
* Derives an account with bip44 path and mnemonics,
|
|
3673
|
-
* Default to using an Ed25519 signature scheme.
|
|
3674
|
-
*
|
|
3675
|
-
* @param args.scheme The signature scheme to derive the private key with
|
|
3676
|
-
* @param args.path the BIP44 derive hardened path (e.g. m/44'/637'/0'/0'/0') for Ed25519,
|
|
3677
|
-
* or non-hardened path (e.g. m/44'/637'/0'/0/0) for secp256k1
|
|
3678
|
-
* Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
|
|
3679
|
-
* @param args.mnemonic the mnemonic seed phrase of the account
|
|
3680
|
-
*/
|
|
3681
|
-
static fromDerivationPath(args: SingleKeySignerFromDerivationPathArgs): SingleKeyAccount;
|
|
3682
|
-
verifySignature(args: VerifySingleKeySignatureArgs): boolean;
|
|
3683
|
-
signWithAuthenticator(message: HexInput): AccountAuthenticatorSingleKey;
|
|
3684
|
-
sign(message: HexInput): AnySignature;
|
|
3912
|
+
declare enum AptosApiType {
|
|
3913
|
+
FULLNODE = "Fullnode",
|
|
3914
|
+
INDEXER = "Indexer",
|
|
3915
|
+
FAUCET = "Faucet",
|
|
3916
|
+
PEPPER = "Pepper",
|
|
3917
|
+
PROVER = "Prover"
|
|
3685
3918
|
}
|
|
3686
|
-
|
|
3687
3919
|
/**
|
|
3688
|
-
*
|
|
3689
|
-
*
|
|
3690
|
-
*
|
|
3920
|
+
* The default max gas amount when none is given.
|
|
3921
|
+
*
|
|
3922
|
+
* This is the maximum number of gas units that will be used by a transaction before being rejected.
|
|
3923
|
+
*
|
|
3924
|
+
* Note that max gas amount varies based on the transaction. A larger transaction will go over this
|
|
3925
|
+
* default gas amount, and the value will need to be changed for the specific transaction.
|
|
3691
3926
|
*/
|
|
3692
|
-
|
|
3693
|
-
privateKey: Ed25519PrivateKey;
|
|
3694
|
-
address?: AccountAddressInput;
|
|
3695
|
-
legacy?: true;
|
|
3696
|
-
}
|
|
3927
|
+
declare const DEFAULT_MAX_GAS_AMOUNT = 200000;
|
|
3697
3928
|
/**
|
|
3698
|
-
*
|
|
3699
|
-
*
|
|
3700
|
-
*
|
|
3929
|
+
* The default transaction expiration seconds from now.
|
|
3930
|
+
*
|
|
3931
|
+
* This time is how long until the blockchain nodes will reject the transaction.
|
|
3932
|
+
*
|
|
3933
|
+
* Note that the transaction expiration time varies based on network connection and network load. It may need to be
|
|
3934
|
+
* increased for the transaction to be processed.
|
|
3701
3935
|
*/
|
|
3702
|
-
|
|
3703
|
-
privateKey: Ed25519PrivateKey;
|
|
3704
|
-
address?: AccountAddressInput;
|
|
3705
|
-
legacy: false;
|
|
3706
|
-
}
|
|
3936
|
+
declare const DEFAULT_TXN_EXP_SEC_FROM_NOW = 20;
|
|
3707
3937
|
/**
|
|
3708
|
-
*
|
|
3709
|
-
*
|
|
3710
|
-
*
|
|
3938
|
+
* The default number of seconds to wait for a transaction to be processed.
|
|
3939
|
+
*
|
|
3940
|
+
* This time is the amount of time that the SDK will wait for a transaction to be processed when waiting for
|
|
3941
|
+
* the results of the transaction. It may take longer based on network connection and network load.
|
|
3711
3942
|
*/
|
|
3712
|
-
|
|
3713
|
-
privateKey: Exclude<PrivateKey, Ed25519PrivateKey>;
|
|
3714
|
-
address?: AccountAddressInput;
|
|
3715
|
-
legacy?: false;
|
|
3716
|
-
}
|
|
3943
|
+
declare const DEFAULT_TXN_TIMEOUT_SEC = 20;
|
|
3717
3944
|
/**
|
|
3718
|
-
*
|
|
3719
|
-
* This is used when the private key type is not known at compilation time.
|
|
3945
|
+
* The default gas currency for the network.
|
|
3720
3946
|
*/
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
legacy?: boolean;
|
|
3725
|
-
}
|
|
3947
|
+
declare const APTOS_COIN = "0x1::aptos_coin::AptosCoin";
|
|
3948
|
+
declare const RAW_TRANSACTION_SALT = "APTOS::RawTransaction";
|
|
3949
|
+
declare const RAW_TRANSACTION_WITH_DATA_SALT = "APTOS::RawTransactionWithData";
|
|
3726
3950
|
/**
|
|
3727
|
-
*
|
|
3728
|
-
*
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
scheme?: SigningSchemeInput.Ed25519;
|
|
3732
|
-
legacy?: true;
|
|
3733
|
-
}
|
|
3734
|
-
/**
|
|
3735
|
-
* Arguments for generating an `SingleKeyAccount` with ah underlying `Ed25519PrivateKey`.
|
|
3736
|
-
* The `legacy` argument needs to be explicitly set to false,
|
|
3737
|
-
* otherwise an `Ed25519Account` will be returned instead.
|
|
3738
|
-
*/
|
|
3739
|
-
interface GenerateEd25519SingleKeyAccountArgs {
|
|
3740
|
-
scheme?: SigningSchemeInput.Ed25519;
|
|
3741
|
-
legacy: false;
|
|
3742
|
-
}
|
|
3743
|
-
/**
|
|
3744
|
-
* Arguments for generating an `SingleKeyAccount` with any supported private key
|
|
3745
|
-
* that is not an `Ed25519PrivateKey`.
|
|
3746
|
-
* The `legacy` argument defaults to false and cannot be explicitly set to true.
|
|
3747
|
-
*/
|
|
3748
|
-
interface GenerateSingleKeyAccountArgs {
|
|
3749
|
-
scheme: Exclude<SigningSchemeInput, SigningSchemeInput.Ed25519>;
|
|
3750
|
-
legacy?: false;
|
|
3751
|
-
}
|
|
3752
|
-
/**
|
|
3753
|
-
* Arguments for generating an opaque `Account`.
|
|
3754
|
-
* This is used when the input signature scheme is not known at compilation time.
|
|
3755
|
-
*/
|
|
3756
|
-
interface GenerateAccountArgs {
|
|
3757
|
-
scheme?: SigningSchemeInput;
|
|
3758
|
-
legacy?: boolean;
|
|
3759
|
-
}
|
|
3760
|
-
/**
|
|
3761
|
-
* Arguments for deriving a private key from a mnemonic phrase and a BIP44 path.
|
|
3762
|
-
*/
|
|
3763
|
-
interface PrivateKeyFromDerivationPathArgs {
|
|
3764
|
-
path: string;
|
|
3765
|
-
mnemonic: string;
|
|
3766
|
-
}
|
|
3767
|
-
/**
|
|
3768
|
-
* Interface for a generic Aptos account.
|
|
3769
|
-
*
|
|
3770
|
-
* The interface is defined as abstract class to provide a single entrypoint for account generation,
|
|
3771
|
-
* either through `Account.generate()` or `Account.fromDerivationPath`.
|
|
3772
|
-
* Despite this being an abstract class, it should be treated as an interface and enforced using
|
|
3773
|
-
* the `implements` keyword.
|
|
3774
|
-
*
|
|
3775
|
-
* Note: Generating an account instance does not create the account on-chain.
|
|
3776
|
-
*/
|
|
3777
|
-
declare abstract class Account$1 {
|
|
3778
|
-
/**
|
|
3779
|
-
* Private key associated with the account.
|
|
3780
|
-
* Note: this will be removed in the next major release,
|
|
3781
|
-
* as not all accounts have a private key.
|
|
3782
|
-
*/
|
|
3783
|
-
abstract readonly privateKey: PrivateKey;
|
|
3784
|
-
/**
|
|
3785
|
-
* Public key associated with the account
|
|
3786
|
-
*/
|
|
3787
|
-
abstract readonly publicKey: AccountPublicKey;
|
|
3788
|
-
/**
|
|
3789
|
-
* Account address associated with the account
|
|
3790
|
-
*/
|
|
3791
|
-
abstract readonly accountAddress: AccountAddress;
|
|
3792
|
-
/**
|
|
3793
|
-
* Signing scheme used to sign transactions
|
|
3794
|
-
*/
|
|
3795
|
-
abstract signingScheme: SigningScheme;
|
|
3796
|
-
/**
|
|
3797
|
-
* Derives an account from a randomly generated private key.
|
|
3798
|
-
* @param args.scheme The signature scheme to use, to generate the private key
|
|
3799
|
-
* @param args.legacy Whether to use a legacy authentication scheme, when applicable
|
|
3800
|
-
* @returns An account compatible with the provided signature scheme
|
|
3801
|
-
*/
|
|
3802
|
-
static generate(args?: GenerateEd25519AccountArgs): Ed25519Account;
|
|
3803
|
-
static generate(args: GenerateEd25519SingleKeyAccountArgs): SingleKeyAccount;
|
|
3804
|
-
static generate(args: GenerateSingleKeyAccountArgs): SingleKeyAccount;
|
|
3805
|
-
static generate(args: GenerateAccountArgs): Account$1;
|
|
3806
|
-
/**
|
|
3807
|
-
* Creates an account from the provided private key.
|
|
3808
|
-
*
|
|
3809
|
-
* @param args.privateKey a valid private key
|
|
3810
|
-
* @param args.address the account's address. If not provided, it will be derived from the public key.
|
|
3811
|
-
* @param args.legacy Whether to use a legacy authentication scheme, when applicable
|
|
3812
|
-
*/
|
|
3813
|
-
static fromPrivateKey(args: CreateEd25519AccountFromPrivateKeyArgs): Ed25519Account;
|
|
3814
|
-
static fromPrivateKey(args: CreateEd25519SingleKeyAccountFromPrivateKeyArgs): SingleKeyAccount;
|
|
3815
|
-
static fromPrivateKey(args: CreateSingleKeyAccountFromPrivateKeyArgs): SingleKeyAccount;
|
|
3816
|
-
static fromPrivateKey(args: CreateAccountFromPrivateKeyArgs): Account$1;
|
|
3817
|
-
/**
|
|
3818
|
-
* @deprecated use `fromPrivateKey` instead.
|
|
3819
|
-
* Instantiates an account given a private key and a specified account address.
|
|
3820
|
-
* This is primarily used to instantiate an `Account` that has had its authentication key rotated.
|
|
3821
|
-
*
|
|
3822
|
-
* @param args.privateKey PrivateKey - the underlying private key for the account
|
|
3823
|
-
* @param args.address AccountAddress - The account address the `Account` will sign for
|
|
3824
|
-
* @param args.legacy optional. If set to false, the keypair generated is a Unified keypair. Defaults
|
|
3825
|
-
* to generating a Legacy Ed25519 keypair
|
|
3826
|
-
*
|
|
3827
|
-
* @returns Account
|
|
3828
|
-
*/
|
|
3829
|
-
static fromPrivateKeyAndAddress(args: CreateAccountFromPrivateKeyArgs): Account$1;
|
|
3830
|
-
/**
|
|
3831
|
-
* Derives an account with bip44 path and mnemonics
|
|
3832
|
-
*
|
|
3833
|
-
* @param args.scheme The signature scheme to derive the private key with
|
|
3834
|
-
* @param args.path the BIP44 derive hardened path (e.g. m/44'/637'/0'/0'/0') for Ed25519,
|
|
3835
|
-
* or non-hardened path (e.g. m/44'/637'/0'/0/0) for secp256k1
|
|
3836
|
-
* Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
|
|
3837
|
-
* @param args.mnemonic the mnemonic seed phrase of the account
|
|
3838
|
-
*/
|
|
3839
|
-
static fromDerivationPath(args: GenerateEd25519AccountArgs & PrivateKeyFromDerivationPathArgs): Ed25519Account;
|
|
3840
|
-
static fromDerivationPath(args: GenerateEd25519SingleKeyAccountArgs & PrivateKeyFromDerivationPathArgs): SingleKeyAccount;
|
|
3841
|
-
static fromDerivationPath(args: GenerateSingleKeyAccountArgs & PrivateKeyFromDerivationPathArgs): SingleKeyAccount;
|
|
3842
|
-
static fromDerivationPath(args: GenerateAccountArgs & PrivateKeyFromDerivationPathArgs): Account$1;
|
|
3843
|
-
/**
|
|
3844
|
-
* @deprecated use `publicKey.authKey()` instead.
|
|
3845
|
-
* This key enables account owners to rotate their private key(s)
|
|
3846
|
-
* associated with the account without changing the address that hosts their account.
|
|
3847
|
-
* See here for more info: {@link https://aptos.dev/concepts/accounts#single-signer-authentication}
|
|
3848
|
-
*
|
|
3849
|
-
* @param args.publicKey PublicKey - public key of the account
|
|
3850
|
-
* @returns The authentication key for the associated account
|
|
3851
|
-
*/
|
|
3852
|
-
static authKey(args: {
|
|
3853
|
-
publicKey: AccountPublicKey;
|
|
3854
|
-
}): AuthenticationKey;
|
|
3855
|
-
/**
|
|
3856
|
-
* Sign a message using the available signing capabilities.
|
|
3857
|
-
* @param message the signing message, as binary input
|
|
3858
|
-
* @return the AccountAuthenticator containing the signature, together with the account's public key
|
|
3859
|
-
*/
|
|
3860
|
-
abstract signWithAuthenticator(message: HexInput): AccountAuthenticator;
|
|
3861
|
-
/**
|
|
3862
|
-
* Sign the given message with the private key.
|
|
3863
|
-
* @param message in HexInput format
|
|
3864
|
-
* @returns AccountSignature
|
|
3865
|
-
*/
|
|
3866
|
-
abstract sign(message: HexInput): Signature;
|
|
3867
|
-
/**
|
|
3868
|
-
* @param args.message raw message data in HexInput format
|
|
3869
|
-
* @param args.signature signed message signature
|
|
3870
|
-
*/
|
|
3871
|
-
verifySignature(args: VerifySignatureArgs): boolean;
|
|
3872
|
-
}
|
|
3873
|
-
|
|
3874
|
-
interface Ed25519SignerConstructorArgs {
|
|
3875
|
-
privateKey: Ed25519PrivateKey;
|
|
3876
|
-
address?: AccountAddressInput;
|
|
3877
|
-
}
|
|
3878
|
-
interface Ed25519SignerFromDerivationPathArgs {
|
|
3879
|
-
path: string;
|
|
3880
|
-
mnemonic: string;
|
|
3881
|
-
}
|
|
3882
|
-
interface VerifyEd25519SignatureArgs {
|
|
3883
|
-
message: HexInput;
|
|
3884
|
-
signature: Ed25519Signature;
|
|
3885
|
-
}
|
|
3886
|
-
/**
|
|
3887
|
-
* Signer implementation for the Ed25519 authentication scheme.
|
|
3888
|
-
* This extends an {@link Ed25519Account} by adding signing capabilities through an {@link Ed25519PrivateKey}.
|
|
3889
|
-
*
|
|
3890
|
-
* Note: Generating a signer instance does not create the account on-chain.
|
|
3891
|
-
*/
|
|
3892
|
-
declare class Ed25519Account implements Account$1 {
|
|
3893
|
-
/**
|
|
3894
|
-
* Private key associated with the account
|
|
3895
|
-
*/
|
|
3896
|
-
readonly privateKey: Ed25519PrivateKey;
|
|
3897
|
-
readonly publicKey: Ed25519PublicKey;
|
|
3898
|
-
readonly accountAddress: AccountAddress;
|
|
3899
|
-
readonly signingScheme = SigningScheme.Ed25519;
|
|
3900
|
-
constructor(args: Ed25519SignerConstructorArgs);
|
|
3901
|
-
/**
|
|
3902
|
-
* Derives a signer from a randomly generated private key
|
|
3903
|
-
*/
|
|
3904
|
-
static generate(): Ed25519Account;
|
|
3905
|
-
/**
|
|
3906
|
-
* Derives an account with bip44 path and mnemonics
|
|
3907
|
-
*
|
|
3908
|
-
* @param args.path the BIP44 derive hardened path e.g. m/44'/637'/0'/0'/0'
|
|
3909
|
-
* Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
|
|
3910
|
-
* @param args.mnemonic the mnemonic seed phrase of the account
|
|
3911
|
-
*/
|
|
3912
|
-
static fromDerivationPath(args: Ed25519SignerFromDerivationPathArgs): Ed25519Account;
|
|
3913
|
-
verifySignature(args: VerifyEd25519SignatureArgs): boolean;
|
|
3914
|
-
signWithAuthenticator(message: HexInput): AccountAuthenticatorEd25519;
|
|
3915
|
-
sign(message: HexInput): Ed25519Signature;
|
|
3916
|
-
}
|
|
3917
|
-
|
|
3918
|
-
/**
|
|
3919
|
-
* Creates an object address from creator address and seed
|
|
3920
|
-
*
|
|
3921
|
-
* @param creatorAddress The object creator account address
|
|
3922
|
-
* @param seed The seed in either Uint8Array | string type
|
|
3923
|
-
*
|
|
3924
|
-
* @returns The object account address
|
|
3925
|
-
*/
|
|
3926
|
-
declare const createObjectAddress: (creatorAddress: AccountAddress, seed: Uint8Array | string) => AccountAddress;
|
|
3927
|
-
/**
|
|
3928
|
-
* Creates an resource address from creator address and seed
|
|
3929
|
-
*
|
|
3930
|
-
* @param creatorAddress The creator account address
|
|
3931
|
-
* @param seed The seed in either Uint8Array | string type
|
|
3932
|
-
*
|
|
3933
|
-
* @returns The resource account address
|
|
3934
|
-
*/
|
|
3935
|
-
declare const createResourceAddress: (creatorAddress: AccountAddress, seed: Uint8Array | string) => AccountAddress;
|
|
3936
|
-
/**
|
|
3937
|
-
* Creates a token object address from creator address, collection name and token name
|
|
3938
|
-
*
|
|
3939
|
-
* @param creatorAddress The token creator account address
|
|
3940
|
-
* @param collectionName The collection name
|
|
3941
|
-
* @param tokenName The token name
|
|
3942
|
-
*
|
|
3943
|
-
* @returns The token account address
|
|
3944
|
-
*/
|
|
3945
|
-
declare const createTokenAddress: (creatorAddress: AccountAddress, collectionName: string, tokenName: string) => AccountAddress;
|
|
3946
|
-
|
|
3947
|
-
/**
|
|
3948
|
-
* Type of API endpoint for request routing
|
|
3949
|
-
*/
|
|
3950
|
-
declare enum AptosApiType {
|
|
3951
|
-
FULLNODE = "Fullnode",
|
|
3952
|
-
INDEXER = "Indexer",
|
|
3953
|
-
FAUCET = "Faucet"
|
|
3954
|
-
}
|
|
3955
|
-
/**
|
|
3956
|
-
* The default max gas amount when none is given.
|
|
3957
|
-
*
|
|
3958
|
-
* This is the maximum number of gas units that will be used by a transaction before being rejected.
|
|
3959
|
-
*
|
|
3960
|
-
* Note that max gas amount varies based on the transaction. A larger transaction will go over this
|
|
3961
|
-
* default gas amount, and the value will need to be changed for the specific transaction.
|
|
3962
|
-
*/
|
|
3963
|
-
declare const DEFAULT_MAX_GAS_AMOUNT = 200000;
|
|
3964
|
-
/**
|
|
3965
|
-
* The default transaction expiration seconds from now.
|
|
3966
|
-
*
|
|
3967
|
-
* This time is how long until the blockchain nodes will reject the transaction.
|
|
3968
|
-
*
|
|
3969
|
-
* Note that the transaction expiration time varies based on network connection and network load. It may need to be
|
|
3970
|
-
* increased for the transaction to be processed.
|
|
3971
|
-
*/
|
|
3972
|
-
declare const DEFAULT_TXN_EXP_SEC_FROM_NOW = 20;
|
|
3973
|
-
/**
|
|
3974
|
-
* The default number of seconds to wait for a transaction to be processed.
|
|
3975
|
-
*
|
|
3976
|
-
* This time is the amount of time that the SDK will wait for a transaction to be processed when waiting for
|
|
3977
|
-
* the results of the transaction. It may take longer based on network connection and network load.
|
|
3978
|
-
*/
|
|
3979
|
-
declare const DEFAULT_TXN_TIMEOUT_SEC = 20;
|
|
3980
|
-
/**
|
|
3981
|
-
* The default gas currency for the network.
|
|
3982
|
-
*/
|
|
3983
|
-
declare const APTOS_COIN = "0x1::aptos_coin::AptosCoin";
|
|
3984
|
-
declare const RAW_TRANSACTION_SALT = "APTOS::RawTransaction";
|
|
3985
|
-
declare const RAW_TRANSACTION_WITH_DATA_SALT = "APTOS::RawTransactionWithData";
|
|
3986
|
-
/**
|
|
3987
|
-
* The list of supported Processor types for our indexer api.
|
|
3988
|
-
*
|
|
3989
|
-
* These can be found from the processor_status table in the indexer database.
|
|
3990
|
-
* {@link https://cloud.hasura.io/public/graphiql?endpoint=https://api.mainnet.aptoslabs.com/v1/graphql}
|
|
3951
|
+
* The list of supported Processor types for our indexer api.
|
|
3952
|
+
*
|
|
3953
|
+
* These can be found from the processor_status table in the indexer database.
|
|
3954
|
+
* {@link https://cloud.hasura.io/public/graphiql?endpoint=https://api.mainnet.aptoslabs.com/v1/graphql}
|
|
3991
3955
|
*/
|
|
3992
3956
|
declare enum ProcessorType {
|
|
3993
3957
|
ACCOUNT_TRANSACTION_PROCESSOR = "account_transactions_processor",
|
|
@@ -4023,6 +3987,14 @@ declare class AptosConfig {
|
|
|
4023
3987
|
* The optional hardcoded faucet URL to send requests to instead of using the network
|
|
4024
3988
|
*/
|
|
4025
3989
|
readonly faucet?: string;
|
|
3990
|
+
/**
|
|
3991
|
+
* The optional hardcoded pepper service URL to send requests to instead of using the network
|
|
3992
|
+
*/
|
|
3993
|
+
readonly pepper?: string;
|
|
3994
|
+
/**
|
|
3995
|
+
* The optional hardcoded prover service URL to send requests to instead of using the network
|
|
3996
|
+
*/
|
|
3997
|
+
readonly prover?: string;
|
|
4026
3998
|
/**
|
|
4027
3999
|
* The optional hardcoded indexer URL to send requests to instead of using the network
|
|
4028
4000
|
*/
|
|
@@ -4055,1156 +4027,1607 @@ declare class AptosConfig {
|
|
|
4055
4027
|
* @internal
|
|
4056
4028
|
*/
|
|
4057
4029
|
getRequestUrl(apiType: AptosApiType): string;
|
|
4030
|
+
/**
|
|
4031
|
+
* Checks if the URL is a known pepper service endpoint
|
|
4032
|
+
*
|
|
4033
|
+
* @internal
|
|
4034
|
+
* */
|
|
4035
|
+
isPepperServiceRequest(url: string): boolean;
|
|
4036
|
+
/**
|
|
4037
|
+
* Checks if the URL is a known prover service endpoint
|
|
4038
|
+
*
|
|
4039
|
+
* @internal
|
|
4040
|
+
* */
|
|
4041
|
+
isProverServiceRequest(url: string): boolean;
|
|
4058
4042
|
}
|
|
4059
4043
|
|
|
4060
4044
|
/**
|
|
4061
|
-
*
|
|
4045
|
+
* Representation of a ChainId that can serialized and deserialized
|
|
4062
4046
|
*/
|
|
4063
|
-
declare class
|
|
4064
|
-
readonly
|
|
4065
|
-
constructor(
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4047
|
+
declare class ChainId extends Serializable {
|
|
4048
|
+
readonly chainId: number;
|
|
4049
|
+
constructor(chainId: number);
|
|
4050
|
+
serialize(serializer: Serializer): void;
|
|
4051
|
+
static deserialize(deserializer: Deserializer): ChainId;
|
|
4052
|
+
}
|
|
4053
|
+
|
|
4054
|
+
/**
|
|
4055
|
+
* Representation of an Identifier that can serialized and deserialized.
|
|
4056
|
+
* We use Identifier to represent the module "name" in "ModuleId" and
|
|
4057
|
+
* the "function name" in "EntryFunction"
|
|
4058
|
+
*/
|
|
4059
|
+
declare class Identifier extends Serializable {
|
|
4060
|
+
identifier: string;
|
|
4061
|
+
constructor(identifier: string);
|
|
4062
|
+
serialize(serializer: Serializer): void;
|
|
4063
|
+
static deserialize(deserializer: Deserializer): Identifier;
|
|
4064
|
+
}
|
|
4065
|
+
|
|
4066
|
+
/**
|
|
4067
|
+
* Representation of a ModuleId that can serialized and deserialized
|
|
4068
|
+
* ModuleId means the module address (e.g "0x1") and the module name (e.g "coin")
|
|
4069
|
+
*/
|
|
4070
|
+
declare class ModuleId extends Serializable {
|
|
4071
|
+
readonly address: AccountAddress;
|
|
4072
|
+
readonly name: Identifier;
|
|
4073
|
+
/**
|
|
4074
|
+
* Full name of a module.
|
|
4075
|
+
* @param address The account address. e.g "0x1"
|
|
4076
|
+
* @param name The module name under the "address". e.g "coin"
|
|
4080
4077
|
*/
|
|
4081
|
-
|
|
4082
|
-
accountAddress: AccountAddressInput;
|
|
4083
|
-
}): Promise<AccountData>;
|
|
4078
|
+
constructor(address: AccountAddress, name: Identifier);
|
|
4084
4079
|
/**
|
|
4085
|
-
*
|
|
4086
|
-
*
|
|
4087
|
-
*
|
|
4088
|
-
* multiple times as it auto paginates.
|
|
4089
|
-
*
|
|
4090
|
-
* @param args.accountAddress Aptos account address
|
|
4091
|
-
* @param args.options.offset The number module to start returning results from
|
|
4092
|
-
* @param args.options.limit The number of results to return
|
|
4093
|
-
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
4094
|
-
*
|
|
4095
|
-
* @returns Account modules
|
|
4080
|
+
* Converts a string literal to a ModuleId
|
|
4081
|
+
* @param moduleId String literal in format "account_address::module_name", e.g. "0x1::coin"
|
|
4082
|
+
* @returns ModuleId
|
|
4096
4083
|
*/
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4084
|
+
static fromStr(moduleId: MoveModuleId): ModuleId;
|
|
4085
|
+
serialize(serializer: Serializer): void;
|
|
4086
|
+
static deserialize(deserializer: Deserializer): ModuleId;
|
|
4087
|
+
}
|
|
4088
|
+
|
|
4089
|
+
declare abstract class TypeTag extends Serializable {
|
|
4090
|
+
abstract serialize(serializer: Serializer): void;
|
|
4091
|
+
static deserialize(deserializer: Deserializer): TypeTag;
|
|
4092
|
+
abstract toString(): string;
|
|
4093
|
+
isBool(): this is TypeTagBool;
|
|
4094
|
+
isAddress(): this is TypeTagAddress;
|
|
4095
|
+
isGeneric(): this is TypeTagGeneric;
|
|
4096
|
+
isSigner(): this is TypeTagSigner;
|
|
4097
|
+
isVector(): this is TypeTagVector;
|
|
4098
|
+
isStruct(): this is TypeTagStruct;
|
|
4099
|
+
isU8(): this is TypeTagU8;
|
|
4100
|
+
isU16(): this is TypeTagU16;
|
|
4101
|
+
isU32(): this is TypeTagU32;
|
|
4102
|
+
isU64(): this is TypeTagU64;
|
|
4103
|
+
isU128(): this is TypeTagU128;
|
|
4104
|
+
isU256(): this is TypeTagU256;
|
|
4105
|
+
}
|
|
4106
|
+
declare class TypeTagBool extends TypeTag {
|
|
4107
|
+
toString(): string;
|
|
4108
|
+
serialize(serializer: Serializer): void;
|
|
4109
|
+
static load(_deserializer: Deserializer): TypeTagBool;
|
|
4110
|
+
}
|
|
4111
|
+
declare class TypeTagU8 extends TypeTag {
|
|
4112
|
+
toString(): string;
|
|
4113
|
+
serialize(serializer: Serializer): void;
|
|
4114
|
+
static load(_deserializer: Deserializer): TypeTagU8;
|
|
4115
|
+
}
|
|
4116
|
+
declare class TypeTagU16 extends TypeTag {
|
|
4117
|
+
toString(): string;
|
|
4118
|
+
serialize(serializer: Serializer): void;
|
|
4119
|
+
static load(_deserializer: Deserializer): TypeTagU16;
|
|
4120
|
+
}
|
|
4121
|
+
declare class TypeTagU32 extends TypeTag {
|
|
4122
|
+
toString(): string;
|
|
4123
|
+
serialize(serializer: Serializer): void;
|
|
4124
|
+
static load(_deserializer: Deserializer): TypeTagU32;
|
|
4125
|
+
}
|
|
4126
|
+
declare class TypeTagU64 extends TypeTag {
|
|
4127
|
+
toString(): string;
|
|
4128
|
+
serialize(serializer: Serializer): void;
|
|
4129
|
+
static load(_deserializer: Deserializer): TypeTagU64;
|
|
4130
|
+
}
|
|
4131
|
+
declare class TypeTagU128 extends TypeTag {
|
|
4132
|
+
toString(): string;
|
|
4133
|
+
serialize(serializer: Serializer): void;
|
|
4134
|
+
static load(_deserializer: Deserializer): TypeTagU128;
|
|
4135
|
+
}
|
|
4136
|
+
declare class TypeTagU256 extends TypeTag {
|
|
4137
|
+
toString(): string;
|
|
4138
|
+
serialize(serializer: Serializer): void;
|
|
4139
|
+
static load(_deserializer: Deserializer): TypeTagU256;
|
|
4140
|
+
}
|
|
4141
|
+
declare class TypeTagAddress extends TypeTag {
|
|
4142
|
+
toString(): string;
|
|
4143
|
+
serialize(serializer: Serializer): void;
|
|
4144
|
+
static load(_deserializer: Deserializer): TypeTagAddress;
|
|
4145
|
+
}
|
|
4146
|
+
declare class TypeTagSigner extends TypeTag {
|
|
4147
|
+
toString(): string;
|
|
4148
|
+
serialize(serializer: Serializer): void;
|
|
4149
|
+
static load(_deserializer: Deserializer): TypeTagSigner;
|
|
4150
|
+
}
|
|
4151
|
+
declare class TypeTagReference extends TypeTag {
|
|
4152
|
+
readonly value: TypeTag;
|
|
4153
|
+
toString(): `&${string}`;
|
|
4154
|
+
constructor(value: TypeTag);
|
|
4155
|
+
serialize(serializer: Serializer): void;
|
|
4156
|
+
static load(deserializer: Deserializer): TypeTagReference;
|
|
4157
|
+
}
|
|
4158
|
+
/**
|
|
4159
|
+
* Generics are used for type parameters in entry functions. However,
|
|
4160
|
+
* they are not actually serialized into a real type, so they cannot be
|
|
4161
|
+
* used as a type directly.
|
|
4162
|
+
*/
|
|
4163
|
+
declare class TypeTagGeneric extends TypeTag {
|
|
4164
|
+
readonly value: number;
|
|
4165
|
+
toString(): `T${number}`;
|
|
4166
|
+
constructor(value: number);
|
|
4167
|
+
serialize(serializer: Serializer): void;
|
|
4168
|
+
static load(deserializer: Deserializer): TypeTagGeneric;
|
|
4169
|
+
}
|
|
4170
|
+
declare class TypeTagVector extends TypeTag {
|
|
4171
|
+
readonly value: TypeTag;
|
|
4172
|
+
toString(): `vector<${string}>`;
|
|
4173
|
+
constructor(value: TypeTag);
|
|
4174
|
+
static u8(): TypeTagVector;
|
|
4175
|
+
serialize(serializer: Serializer): void;
|
|
4176
|
+
static load(deserializer: Deserializer): TypeTagVector;
|
|
4177
|
+
}
|
|
4178
|
+
declare class TypeTagStruct extends TypeTag {
|
|
4179
|
+
readonly value: StructTag;
|
|
4180
|
+
toString(): `0x${string}::${string}::${string}`;
|
|
4181
|
+
constructor(value: StructTag);
|
|
4182
|
+
serialize(serializer: Serializer): void;
|
|
4183
|
+
static load(deserializer: Deserializer): TypeTagStruct;
|
|
4184
|
+
isTypeTag(address: AccountAddress, moduleName: string, structName: string): boolean;
|
|
4185
|
+
isString(): boolean;
|
|
4186
|
+
isOption(): boolean;
|
|
4187
|
+
isObject(): boolean;
|
|
4188
|
+
}
|
|
4189
|
+
declare class StructTag extends Serializable {
|
|
4190
|
+
readonly address: AccountAddress;
|
|
4191
|
+
readonly moduleName: Identifier;
|
|
4192
|
+
readonly name: Identifier;
|
|
4193
|
+
readonly typeArgs: Array<TypeTag>;
|
|
4194
|
+
constructor(address: AccountAddress, module_name: Identifier, name: Identifier, type_args: Array<TypeTag>);
|
|
4195
|
+
serialize(serializer: Serializer): void;
|
|
4196
|
+
static deserialize(deserializer: Deserializer): StructTag;
|
|
4197
|
+
}
|
|
4198
|
+
declare function aptosCoinStructTag(): StructTag;
|
|
4199
|
+
declare function stringStructTag(): StructTag;
|
|
4200
|
+
declare function optionStructTag(typeArg: TypeTag): StructTag;
|
|
4201
|
+
declare function objectStructTag(typeArg: TypeTag): StructTag;
|
|
4202
|
+
|
|
4203
|
+
/**
|
|
4204
|
+
* Deserialize a Script Transaction Argument
|
|
4205
|
+
*/
|
|
4206
|
+
declare function deserializeFromScriptArgument(deserializer: Deserializer): TransactionArgument;
|
|
4207
|
+
/**
|
|
4208
|
+
* Representation of the supported Transaction Payload
|
|
4209
|
+
* that can serialized and deserialized
|
|
4210
|
+
*/
|
|
4211
|
+
declare abstract class TransactionPayload extends Serializable {
|
|
4101
4212
|
/**
|
|
4102
|
-
*
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
*
|
|
4213
|
+
* Serialize a Transaction Payload
|
|
4214
|
+
*/
|
|
4215
|
+
abstract serialize(serializer: Serializer): void;
|
|
4216
|
+
/**
|
|
4217
|
+
* Deserialize a Transaction Payload
|
|
4218
|
+
*/
|
|
4219
|
+
static deserialize(deserializer: Deserializer): TransactionPayload;
|
|
4220
|
+
}
|
|
4221
|
+
/**
|
|
4222
|
+
* Representation of a Transaction Payload Script that can serialized and deserialized
|
|
4223
|
+
*/
|
|
4224
|
+
declare class TransactionPayloadScript extends TransactionPayload {
|
|
4225
|
+
readonly script: Script;
|
|
4226
|
+
constructor(script: Script);
|
|
4227
|
+
serialize(serializer: Serializer): void;
|
|
4228
|
+
static load(deserializer: Deserializer): TransactionPayloadScript;
|
|
4229
|
+
}
|
|
4230
|
+
/**
|
|
4231
|
+
* Representation of a Transaction Payload Entry Function that can serialized and deserialized
|
|
4232
|
+
*/
|
|
4233
|
+
declare class TransactionPayloadEntryFunction extends TransactionPayload {
|
|
4234
|
+
readonly entryFunction: EntryFunction;
|
|
4235
|
+
constructor(entryFunction: EntryFunction);
|
|
4236
|
+
serialize(serializer: Serializer): void;
|
|
4237
|
+
static load(deserializer: Deserializer): TransactionPayloadEntryFunction;
|
|
4238
|
+
}
|
|
4239
|
+
/**
|
|
4240
|
+
* Representation of a Transaction Payload Multi-sig that can serialized and deserialized
|
|
4241
|
+
*/
|
|
4242
|
+
declare class TransactionPayloadMultiSig extends TransactionPayload {
|
|
4243
|
+
readonly multiSig: MultiSig;
|
|
4244
|
+
constructor(multiSig: MultiSig);
|
|
4245
|
+
serialize(serializer: Serializer): void;
|
|
4246
|
+
static load(deserializer: Deserializer): TransactionPayloadMultiSig;
|
|
4247
|
+
}
|
|
4248
|
+
/**
|
|
4249
|
+
* Representation of a EntryFunction that can serialized and deserialized
|
|
4250
|
+
*/
|
|
4251
|
+
declare class EntryFunction {
|
|
4252
|
+
readonly module_name: ModuleId;
|
|
4253
|
+
readonly function_name: Identifier;
|
|
4254
|
+
readonly type_args: Array<TypeTag>;
|
|
4255
|
+
readonly args: Array<EntryFunctionArgument>;
|
|
4256
|
+
/**
|
|
4257
|
+
* Contains the payload to run a function within a module.
|
|
4258
|
+
* @param module_name Fully qualified module name in format "account_address::module_name" e.g. "0x1::coin"
|
|
4259
|
+
* @param function_name The function name. e.g "transfer"
|
|
4260
|
+
* @param type_args Type arguments that move function requires.
|
|
4107
4261
|
*
|
|
4108
|
-
* @
|
|
4262
|
+
* @example
|
|
4263
|
+
* A coin transfer function has one type argument "CoinType".
|
|
4264
|
+
* ```
|
|
4265
|
+
* public entry fun transfer<CoinType>(from: &signer, to: address, amount: u64)
|
|
4266
|
+
* ```
|
|
4267
|
+
* @param args arguments to the move function.
|
|
4109
4268
|
*
|
|
4110
4269
|
* @example
|
|
4111
|
-
*
|
|
4112
|
-
* // An example of an account module response
|
|
4270
|
+
* A coin transfer function has three arguments "from", "to" and "amount".
|
|
4113
4271
|
* ```
|
|
4114
|
-
*
|
|
4115
|
-
* bytecode: "0xa11ceb0b0600000006010002030206050807070f0d081c200",
|
|
4116
|
-
* abi: { address: "0x1" }
|
|
4117
|
-
* }
|
|
4272
|
+
* public entry fun transfer<CoinType>(from: &signer, to: address, amount: u64)
|
|
4118
4273
|
* ```
|
|
4119
4274
|
*/
|
|
4120
|
-
|
|
4121
|
-
accountAddress: AccountAddressInput;
|
|
4122
|
-
moduleName: string;
|
|
4123
|
-
options?: LedgerVersionArg;
|
|
4124
|
-
}): Promise<MoveModuleBytecode>;
|
|
4275
|
+
constructor(module_name: ModuleId, function_name: Identifier, type_args: Array<TypeTag>, args: Array<EntryFunctionArgument>);
|
|
4125
4276
|
/**
|
|
4126
|
-
*
|
|
4277
|
+
* A helper function to build a EntryFunction payload from raw primitive values
|
|
4127
4278
|
*
|
|
4128
|
-
*
|
|
4129
|
-
*
|
|
4279
|
+
* @param module_id Fully qualified module name in format "AccountAddress::module_id" e.g. "0x1::coin"
|
|
4280
|
+
* @param function_name Function name
|
|
4281
|
+
* @param type_args Type arguments that move function requires.
|
|
4130
4282
|
*
|
|
4131
4283
|
* @example
|
|
4132
|
-
*
|
|
4133
|
-
*
|
|
4134
|
-
*
|
|
4135
|
-
*
|
|
4136
|
-
* @param args
|
|
4137
|
-
*
|
|
4138
|
-
* @returns The account transactions
|
|
4139
|
-
*/
|
|
4140
|
-
getAccountTransactions(args: {
|
|
4141
|
-
accountAddress: AccountAddressInput;
|
|
4142
|
-
options?: PaginationArgs;
|
|
4143
|
-
}): Promise<TransactionResponse[]>;
|
|
4144
|
-
/**
|
|
4145
|
-
* Queries all account resources given an account address
|
|
4146
|
-
*
|
|
4147
|
-
* Note: In order to get all account resources, this function may call the API
|
|
4148
|
-
* multiple times as it auto paginates.
|
|
4284
|
+
* A coin transfer function has one type argument "CoinType".
|
|
4285
|
+
* ```
|
|
4286
|
+
* public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
|
|
4287
|
+
* ```
|
|
4288
|
+
* @param args Arguments to the move function.
|
|
4149
4289
|
*
|
|
4150
4290
|
* @example
|
|
4151
|
-
*
|
|
4152
|
-
*
|
|
4153
|
-
*
|
|
4154
|
-
*
|
|
4155
|
-
* @
|
|
4156
|
-
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
4157
|
-
* @returns Account resources
|
|
4291
|
+
* A coin transfer function has three arguments "from", "to" and "amount".
|
|
4292
|
+
* ```
|
|
4293
|
+
* public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
|
|
4294
|
+
* ```
|
|
4295
|
+
* @returns EntryFunction
|
|
4158
4296
|
*/
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
options?: PaginationArgs & LedgerVersionArg;
|
|
4162
|
-
}): Promise<MoveResource[]>;
|
|
4297
|
+
static build(module_id: MoveModuleId, function_name: string, type_args: Array<TypeTag>, args: Array<EntryFunctionArgument>): EntryFunction;
|
|
4298
|
+
serialize(serializer: Serializer): void;
|
|
4163
4299
|
/**
|
|
4164
|
-
*
|
|
4165
|
-
*
|
|
4166
|
-
*
|
|
4167
|
-
* @type The typed output of the resource
|
|
4168
|
-
* @param args.accountAddress Aptos account address
|
|
4169
|
-
* @param args.resourceType String representation of an on-chain Move struct type, i.e "0x1::aptos_coin::AptosCoin"
|
|
4170
|
-
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
4171
|
-
*
|
|
4172
|
-
* @returns Account resource
|
|
4300
|
+
* Deserializes an entry function payload with the arguments represented as EntryFunctionBytes instances.
|
|
4301
|
+
* @see EntryFunctionBytes
|
|
4173
4302
|
*
|
|
4174
|
-
*
|
|
4175
|
-
*
|
|
4303
|
+
* NOTE: When you deserialize an EntryFunction payload with this method, the entry function
|
|
4304
|
+
* arguments are populated into the deserialized instance as type-agnostic, raw fixed bytes
|
|
4305
|
+
* in the form of the EntryFunctionBytes class.
|
|
4176
4306
|
*
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
accountAddress: AccountAddressInput;
|
|
4180
|
-
resourceType: MoveStructId;
|
|
4181
|
-
options?: LedgerVersionArg;
|
|
4182
|
-
}): Promise<T>;
|
|
4183
|
-
/**
|
|
4184
|
-
* Looks up the account address for a given authentication key
|
|
4307
|
+
* In order to correctly deserialize these arguments as their actual type representations, you
|
|
4308
|
+
* must know the types of the arguments beforehand and deserialize them yourself individually.
|
|
4185
4309
|
*
|
|
4186
|
-
*
|
|
4310
|
+
* One way you could achieve this is by using the ABIs for an entry function and deserializing each
|
|
4311
|
+
* argument as its given, corresponding type.
|
|
4187
4312
|
*
|
|
4188
|
-
* @
|
|
4189
|
-
*
|
|
4313
|
+
* @param deserializer
|
|
4314
|
+
* @returns A deserialized EntryFunction payload for a transaction.
|
|
4190
4315
|
*
|
|
4191
|
-
* @param args.authenticationKey The authentication key
|
|
4192
|
-
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
4193
|
-
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
4194
|
-
* @returns Promise<AccountAddress> The accountAddress associated with the authentication key
|
|
4195
4316
|
*/
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4317
|
+
static deserialize(deserializer: Deserializer): EntryFunction;
|
|
4318
|
+
}
|
|
4319
|
+
/**
|
|
4320
|
+
* Representation of a Script that can serialized and deserialized
|
|
4321
|
+
*/
|
|
4322
|
+
declare class Script {
|
|
4201
4323
|
/**
|
|
4202
|
-
*
|
|
4203
|
-
*
|
|
4204
|
-
* @example
|
|
4205
|
-
* const tokensCount = await aptos.getAccountTokensCount({accountAddress:"0x456"})
|
|
4206
|
-
*
|
|
4207
|
-
* @param args.accountAddress The account address
|
|
4208
|
-
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
4209
|
-
* @returns Current count of tokens owned by the account
|
|
4324
|
+
* The move module bytecode
|
|
4210
4325
|
*/
|
|
4211
|
-
|
|
4212
|
-
accountAddress: AccountAddressInput;
|
|
4213
|
-
minimumLedgerVersion?: AnyNumber;
|
|
4214
|
-
}): Promise<number>;
|
|
4326
|
+
readonly bytecode: Uint8Array;
|
|
4215
4327
|
/**
|
|
4216
|
-
*
|
|
4217
|
-
*
|
|
4218
|
-
* This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
|
|
4219
|
-
* If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
|
|
4220
|
-
*
|
|
4221
|
-
* @example
|
|
4222
|
-
* const accountOwnedTokens = await aptos.getAccountOwnedTokens({accountAddress:"0x456"})
|
|
4223
|
-
*
|
|
4224
|
-
* @param args.accountAddress The account address we want to get the tokens for
|
|
4225
|
-
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
4226
|
-
* @param args.options.tokenStandard The NFT standard to query for
|
|
4227
|
-
* @param args.options.offset The number token to start returning results from
|
|
4228
|
-
* @param args.options.limit The number of results to return
|
|
4229
|
-
* @param args.options.orderBy The order to sort the tokens by
|
|
4230
|
-
* @returns Tokens array with the token data
|
|
4328
|
+
* The type arguments that the bytecode function requires.
|
|
4231
4329
|
*/
|
|
4232
|
-
|
|
4233
|
-
accountAddress: AccountAddressInput;
|
|
4234
|
-
minimumLedgerVersion?: AnyNumber;
|
|
4235
|
-
options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensQueryResponse[0]>;
|
|
4236
|
-
}): Promise<GetAccountOwnedTokensQueryResponse>;
|
|
4330
|
+
readonly type_args: Array<TypeTag>;
|
|
4237
4331
|
/**
|
|
4238
|
-
*
|
|
4239
|
-
*
|
|
4240
|
-
* This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
|
|
4241
|
-
* If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
|
|
4242
|
-
*
|
|
4243
|
-
* @example
|
|
4244
|
-
* const accountOwnedTokens = await aptos.getAccountOwnedTokensFromCollectionAddress({accountAddress:"0x123", collectionAddress:"0x456"})
|
|
4245
|
-
*
|
|
4246
|
-
* @param args.accountAddress The account address we want to get the tokens for
|
|
4247
|
-
* @param args.collectionAddress The address of the collection being queried
|
|
4248
|
-
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
4249
|
-
* @param args.options.tokenStandard The NFT standard to query for
|
|
4250
|
-
* @param args.options.offset The number token to start returning results from
|
|
4251
|
-
* @param args.options.limit The number of results to return
|
|
4252
|
-
* @param args.options.orderBy The order to sort the tokens by
|
|
4253
|
-
* @returns Tokens array with the token data
|
|
4332
|
+
* The arguments that the bytecode function requires.
|
|
4254
4333
|
*/
|
|
4255
|
-
|
|
4256
|
-
accountAddress: AccountAddressInput;
|
|
4257
|
-
collectionAddress: AccountAddressInput;
|
|
4258
|
-
minimumLedgerVersion?: AnyNumber;
|
|
4259
|
-
options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensFromCollectionResponse[0]>;
|
|
4260
|
-
}): Promise<GetAccountOwnedTokensFromCollectionResponse>;
|
|
4334
|
+
readonly args: Array<ScriptFunctionArgument>;
|
|
4261
4335
|
/**
|
|
4262
|
-
*
|
|
4336
|
+
* Scripts contain the Move bytecodes payload that can be submitted to Aptos chain for execution.
|
|
4263
4337
|
*
|
|
4264
|
-
*
|
|
4265
|
-
*
|
|
4338
|
+
* @param bytecode The move module bytecode
|
|
4339
|
+
* @param type_args The type arguments that the bytecode function requires.
|
|
4266
4340
|
*
|
|
4267
4341
|
* @example
|
|
4268
|
-
*
|
|
4269
|
-
*
|
|
4270
|
-
*
|
|
4271
|
-
*
|
|
4272
|
-
* @param args
|
|
4273
|
-
* @param args.options.offset The number collection to start returning results from
|
|
4274
|
-
* @param args.options.limit The number of results to return
|
|
4275
|
-
* @param args.options.orderBy The order to sort the tokens by
|
|
4276
|
-
* @returns Collections array with the collections data
|
|
4277
|
-
*/
|
|
4278
|
-
getAccountCollectionsWithOwnedTokens(args: {
|
|
4279
|
-
accountAddress: AccountAddressInput;
|
|
4280
|
-
minimumLedgerVersion?: AnyNumber;
|
|
4281
|
-
options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountCollectionsWithOwnedTokenResponse[0]>;
|
|
4282
|
-
}): Promise<GetAccountCollectionsWithOwnedTokenResponse>;
|
|
4283
|
-
/**
|
|
4284
|
-
* Queries the current count of transactions submitted by an account
|
|
4342
|
+
* A coin transfer function has one type argument "CoinType".
|
|
4343
|
+
* ```
|
|
4344
|
+
* public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
|
|
4345
|
+
* ```
|
|
4346
|
+
* @param args The arguments that the bytecode function requires.
|
|
4285
4347
|
*
|
|
4286
4348
|
* @example
|
|
4287
|
-
*
|
|
4288
|
-
*
|
|
4289
|
-
*
|
|
4290
|
-
*
|
|
4291
|
-
* @returns Current count of transactions made by an account
|
|
4349
|
+
* A coin transfer function has three arguments "from", "to" and "amount".
|
|
4350
|
+
* ```
|
|
4351
|
+
* public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
|
|
4352
|
+
* ```
|
|
4292
4353
|
*/
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4354
|
+
constructor(bytecode: Uint8Array, type_args: Array<TypeTag>, args: Array<ScriptFunctionArgument>);
|
|
4355
|
+
serialize(serializer: Serializer): void;
|
|
4356
|
+
static deserialize(deserializer: Deserializer): Script;
|
|
4357
|
+
}
|
|
4358
|
+
/**
|
|
4359
|
+
* Representation of a MultiSig that can serialized and deserialized
|
|
4360
|
+
*/
|
|
4361
|
+
declare class MultiSig {
|
|
4362
|
+
readonly multisig_address: AccountAddress;
|
|
4363
|
+
readonly transaction_payload?: MultiSigTransactionPayload;
|
|
4297
4364
|
/**
|
|
4298
|
-
*
|
|
4365
|
+
* Contains the payload to run a multi-sig account transaction.
|
|
4299
4366
|
*
|
|
4300
|
-
* @
|
|
4301
|
-
* const accountCoinsData = await aptos.getAccountCoinsData({accountAddress:"0x123"})
|
|
4367
|
+
* @param multisig_address The multi-sig account address the transaction will be executed as.
|
|
4302
4368
|
*
|
|
4303
|
-
* @param
|
|
4304
|
-
*
|
|
4305
|
-
* @param args.options.offset optional. The number coin to start returning results from
|
|
4306
|
-
* @param args.options.limit optional. The number of results to return
|
|
4307
|
-
* @param args.options.orderBy optional. The order to sort the coins by
|
|
4308
|
-
* @param args.options.where optional. Filter the results by
|
|
4309
|
-
* @returns Array with the coins data
|
|
4369
|
+
* @param transaction_payload The payload of the multi-sig transaction. This is optional when executing a multi-sig
|
|
4370
|
+
* transaction whose payload is already stored on chain.
|
|
4310
4371
|
*/
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4372
|
+
constructor(multisig_address: AccountAddress, transaction_payload?: MultiSigTransactionPayload);
|
|
4373
|
+
serialize(serializer: Serializer): void;
|
|
4374
|
+
static deserialize(deserializer: Deserializer): MultiSig;
|
|
4375
|
+
}
|
|
4376
|
+
/**
|
|
4377
|
+
* Representation of a MultiSig Transaction Payload from `multisig_account.move`
|
|
4378
|
+
* that can be serialized and deserialized
|
|
4379
|
+
|
|
4380
|
+
* This class exists right now to represent an extensible transaction payload class for
|
|
4381
|
+
* transactions used in `multisig_account.move`. Eventually, this class will be able to
|
|
4382
|
+
* support script payloads when the `multisig_account.move` module supports them.
|
|
4383
|
+
*/
|
|
4384
|
+
declare class MultiSigTransactionPayload extends Serializable {
|
|
4385
|
+
readonly transaction_payload: EntryFunction;
|
|
4316
4386
|
/**
|
|
4317
|
-
*
|
|
4318
|
-
*
|
|
4319
|
-
* @example
|
|
4320
|
-
* const accountCoinsCount = await aptos.getAccountCoinsCount({accountAddress:"0x123"})
|
|
4387
|
+
* Contains the payload to run a multi-sig account transaction.
|
|
4321
4388
|
*
|
|
4322
|
-
* @param
|
|
4323
|
-
*
|
|
4324
|
-
*
|
|
4389
|
+
* @param transaction_payload The payload of the multi-sig transaction.
|
|
4390
|
+
* This can only be EntryFunction for now but,
|
|
4391
|
+
* Script might be supported in the future.
|
|
4325
4392
|
*/
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
minimumLedgerVersion?: AnyNumber;
|
|
4343
|
-
}): Promise<number>;
|
|
4393
|
+
constructor(transaction_payload: EntryFunction);
|
|
4394
|
+
serialize(serializer: Serializer): void;
|
|
4395
|
+
static deserialize(deserializer: Deserializer): MultiSigTransactionPayload;
|
|
4396
|
+
}
|
|
4397
|
+
|
|
4398
|
+
/**
|
|
4399
|
+
* Representation of a Raw Transaction that can serialized and deserialized
|
|
4400
|
+
*/
|
|
4401
|
+
declare class RawTransaction extends Serializable {
|
|
4402
|
+
readonly sender: AccountAddress;
|
|
4403
|
+
readonly sequence_number: bigint;
|
|
4404
|
+
readonly payload: TransactionPayload;
|
|
4405
|
+
readonly max_gas_amount: bigint;
|
|
4406
|
+
readonly gas_unit_price: bigint;
|
|
4407
|
+
readonly expiration_timestamp_secs: bigint;
|
|
4408
|
+
readonly chain_id: ChainId;
|
|
4344
4409
|
/**
|
|
4345
|
-
*
|
|
4346
|
-
*
|
|
4347
|
-
* @example
|
|
4348
|
-
* const accountCoinAmount = await aptos.getAccountCoinAmount({accountAddress:"0x123", coinType:"0x1::aptos_coin::AptosCoin"})
|
|
4410
|
+
* RawTransactions contain the metadata and payloads that can be submitted to Aptos chain for execution.
|
|
4411
|
+
* RawTransactions must be signed before Aptos chain can execute them.
|
|
4349
4412
|
*
|
|
4350
|
-
* @param
|
|
4351
|
-
* @param
|
|
4352
|
-
*
|
|
4353
|
-
* @
|
|
4413
|
+
* @param sender The sender Account Address
|
|
4414
|
+
* @param sequence_number Sequence number of this transaction. This must match the sequence number stored in
|
|
4415
|
+
* the sender's account at the time the transaction executes.
|
|
4416
|
+
* @param payload Instructions for the Aptos Blockchain, including publishing a module,
|
|
4417
|
+
* execute an entry function or execute a script payload.
|
|
4418
|
+
* @param max_gas_amount Maximum total gas to spend for this transaction. The account must have more
|
|
4419
|
+
* than this gas or the transaction will be discarded during validation.
|
|
4420
|
+
* @param gas_unit_price Price to be paid per gas unit.
|
|
4421
|
+
* @param expiration_timestamp_secs The blockchain timestamp at which the blockchain would discard this transaction.
|
|
4422
|
+
* @param chain_id The chain ID of the blockchain that this transaction is intended to be run on.
|
|
4354
4423
|
*/
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4424
|
+
constructor(sender: AccountAddress, sequence_number: bigint, payload: TransactionPayload, max_gas_amount: bigint, gas_unit_price: bigint, expiration_timestamp_secs: bigint, chain_id: ChainId);
|
|
4425
|
+
serialize(serializer: Serializer): void;
|
|
4426
|
+
static deserialize(deserializer: Deserializer): RawTransaction;
|
|
4427
|
+
}
|
|
4428
|
+
/**
|
|
4429
|
+
* Representation of a Raw Transaction With Data that can serialized and deserialized
|
|
4430
|
+
*/
|
|
4431
|
+
declare abstract class RawTransactionWithData extends Serializable {
|
|
4360
4432
|
/**
|
|
4361
|
-
*
|
|
4362
|
-
*
|
|
4363
|
-
* @example
|
|
4364
|
-
* const accountOwnedObjects = await aptos.getAccountOwnedObjects({accountAddress:"0x123"})
|
|
4365
|
-
*
|
|
4366
|
-
* @param args.accountAddress The account address we want to get the objects for
|
|
4367
|
-
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
4368
|
-
* @param args.options.offset The starting position to start returning results from
|
|
4369
|
-
* @param args.options.limit The number of results to return
|
|
4370
|
-
* @param args.options.orderBy The order to sort the objects by
|
|
4371
|
-
* @returns Objects array with the object data
|
|
4433
|
+
* Serialize a Raw Transaction With Data
|
|
4372
4434
|
*/
|
|
4373
|
-
|
|
4374
|
-
accountAddress: AccountAddressInput;
|
|
4375
|
-
minimumLedgerVersion?: AnyNumber;
|
|
4376
|
-
options?: PaginationArgs & OrderByArg<GetAccountOwnedObjectsResponse[0]>;
|
|
4377
|
-
}): Promise<GetAccountOwnedObjectsResponse>;
|
|
4435
|
+
abstract serialize(serializer: Serializer): void;
|
|
4378
4436
|
/**
|
|
4379
|
-
*
|
|
4380
|
-
* This functions resolves the provided private key type and derives the public key from it.
|
|
4381
|
-
*
|
|
4382
|
-
* If the privateKey is a Secp256k1 type, it derives the account using the derived public key and
|
|
4383
|
-
* auth key using the SingleKey scheme locally.
|
|
4384
|
-
*
|
|
4385
|
-
* If the privateKey is a ED25519 type, it looks up the authentication key on chain, and uses it to resolve
|
|
4386
|
-
* whether it is a Legacy ED25519 key or a Unified ED25519 key. It then derives the account based
|
|
4387
|
-
* on that.
|
|
4388
|
-
*
|
|
4389
|
-
* @example
|
|
4390
|
-
* const account = await aptos.deriveAccountFromPrivateKey({privateKey:new Ed25519PrivateKey("0x123")})
|
|
4391
|
-
*
|
|
4392
|
-
* @param args.privateKey An account private key
|
|
4393
|
-
* @returns Account type
|
|
4437
|
+
* Deserialize a Raw Transaction With Data
|
|
4394
4438
|
*/
|
|
4395
|
-
|
|
4396
|
-
privateKey: PrivateKey;
|
|
4397
|
-
}): Promise<Account$1>;
|
|
4398
|
-
}
|
|
4399
|
-
|
|
4400
|
-
/**
|
|
4401
|
-
* Representation of a ChainId that can serialized and deserialized
|
|
4402
|
-
*/
|
|
4403
|
-
declare class ChainId extends Serializable {
|
|
4404
|
-
readonly chainId: number;
|
|
4405
|
-
constructor(chainId: number);
|
|
4406
|
-
serialize(serializer: Serializer): void;
|
|
4407
|
-
static deserialize(deserializer: Deserializer): ChainId;
|
|
4439
|
+
static deserialize(deserializer: Deserializer): RawTransactionWithData;
|
|
4408
4440
|
}
|
|
4409
|
-
|
|
4410
4441
|
/**
|
|
4411
|
-
* Representation of
|
|
4412
|
-
* We use Identifier to represent the module "name" in "ModuleId" and
|
|
4413
|
-
* the "function name" in "EntryFunction"
|
|
4442
|
+
* Representation of a Multi Agent Transaction that can serialized and deserialized
|
|
4414
4443
|
*/
|
|
4415
|
-
declare class
|
|
4416
|
-
|
|
4417
|
-
|
|
4444
|
+
declare class MultiAgentRawTransaction extends RawTransactionWithData {
|
|
4445
|
+
/**
|
|
4446
|
+
* The raw transaction
|
|
4447
|
+
*/
|
|
4448
|
+
readonly raw_txn: RawTransaction;
|
|
4449
|
+
/**
|
|
4450
|
+
* The secondary signers on this transaction
|
|
4451
|
+
*/
|
|
4452
|
+
readonly secondary_signer_addresses: Array<AccountAddress>;
|
|
4453
|
+
constructor(raw_txn: RawTransaction, secondary_signer_addresses: Array<AccountAddress>);
|
|
4418
4454
|
serialize(serializer: Serializer): void;
|
|
4419
|
-
static
|
|
4455
|
+
static load(deserializer: Deserializer): MultiAgentRawTransaction;
|
|
4420
4456
|
}
|
|
4421
|
-
|
|
4422
4457
|
/**
|
|
4423
|
-
* Representation of a
|
|
4424
|
-
* ModuleId means the module address (e.g "0x1") and the module name (e.g "coin")
|
|
4458
|
+
* Representation of a Fee Payer Transaction that can serialized and deserialized
|
|
4425
4459
|
*/
|
|
4426
|
-
declare class
|
|
4427
|
-
readonly address: AccountAddress;
|
|
4428
|
-
readonly name: Identifier;
|
|
4460
|
+
declare class FeePayerRawTransaction extends RawTransactionWithData {
|
|
4429
4461
|
/**
|
|
4430
|
-
*
|
|
4431
|
-
* @param address The account address. e.g "0x1"
|
|
4432
|
-
* @param name The module name under the "address". e.g "coin"
|
|
4462
|
+
* The raw transaction
|
|
4433
4463
|
*/
|
|
4434
|
-
|
|
4464
|
+
readonly raw_txn: RawTransaction;
|
|
4435
4465
|
/**
|
|
4436
|
-
*
|
|
4437
|
-
* @param moduleId String literal in format "account_address::module_name", e.g. "0x1::coin"
|
|
4438
|
-
* @returns ModuleId
|
|
4466
|
+
* The secondary signers on this transaction - optional and can be empty
|
|
4439
4467
|
*/
|
|
4440
|
-
|
|
4468
|
+
readonly secondary_signer_addresses: Array<AccountAddress>;
|
|
4469
|
+
/**
|
|
4470
|
+
* The fee payer account address
|
|
4471
|
+
*/
|
|
4472
|
+
readonly fee_payer_address: AccountAddress;
|
|
4473
|
+
constructor(raw_txn: RawTransaction, secondary_signer_addresses: Array<AccountAddress>, fee_payer_address: AccountAddress);
|
|
4441
4474
|
serialize(serializer: Serializer): void;
|
|
4442
|
-
static
|
|
4475
|
+
static load(deserializer: Deserializer): FeePayerRawTransaction;
|
|
4443
4476
|
}
|
|
4444
4477
|
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
toString(): string;
|
|
4478
|
+
/**
|
|
4479
|
+
* Representation of the challenge which is needed to sign by owner of the account
|
|
4480
|
+
* to rotate the authentication key.
|
|
4481
|
+
*/
|
|
4482
|
+
declare class RotationProofChallenge extends Serializable {
|
|
4483
|
+
readonly accountAddress: AccountAddress;
|
|
4484
|
+
readonly moduleName: MoveString;
|
|
4485
|
+
readonly structName: MoveString;
|
|
4486
|
+
readonly originator: AccountAddress;
|
|
4487
|
+
readonly currentAuthKey: AccountAddress;
|
|
4488
|
+
readonly newPublicKey: MoveVector<U8>;
|
|
4489
|
+
readonly sequenceNumber: U64;
|
|
4490
|
+
constructor(args: {
|
|
4491
|
+
sequenceNumber: AnyNumber;
|
|
4492
|
+
originator: AccountAddress;
|
|
4493
|
+
currentAuthKey: AccountAddress;
|
|
4494
|
+
newPublicKey: PublicKey;
|
|
4495
|
+
});
|
|
4464
4496
|
serialize(serializer: Serializer): void;
|
|
4465
|
-
static load(_deserializer: Deserializer): TypeTagBool;
|
|
4466
4497
|
}
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
serialize(serializer: Serializer): void;
|
|
4470
|
-
static
|
|
4498
|
+
|
|
4499
|
+
declare abstract class TransactionAuthenticator extends Serializable {
|
|
4500
|
+
abstract serialize(serializer: Serializer): void;
|
|
4501
|
+
static deserialize(deserializer: Deserializer): TransactionAuthenticator;
|
|
4471
4502
|
}
|
|
4472
|
-
|
|
4473
|
-
|
|
4503
|
+
/**
|
|
4504
|
+
* Transaction authenticator Ed25519 for a single signer transaction
|
|
4505
|
+
*
|
|
4506
|
+
* @param public_key Client's public key.
|
|
4507
|
+
* @param signature Ed25519 signature of a raw transaction.
|
|
4508
|
+
* @see {@link https://aptos.dev/integration/creating-a-signed-transaction | Creating a Signed Transaction}
|
|
4509
|
+
* for details about generating a signature.
|
|
4510
|
+
*/
|
|
4511
|
+
declare class TransactionAuthenticatorEd25519 extends TransactionAuthenticator {
|
|
4512
|
+
readonly public_key: Ed25519PublicKey;
|
|
4513
|
+
readonly signature: Ed25519Signature;
|
|
4514
|
+
constructor(public_key: Ed25519PublicKey, signature: Ed25519Signature);
|
|
4474
4515
|
serialize(serializer: Serializer): void;
|
|
4475
|
-
static load(
|
|
4516
|
+
static load(deserializer: Deserializer): TransactionAuthenticatorEd25519;
|
|
4476
4517
|
}
|
|
4477
|
-
|
|
4478
|
-
|
|
4518
|
+
/**
|
|
4519
|
+
* Transaction authenticator Ed25519 for a multi signers transaction
|
|
4520
|
+
*
|
|
4521
|
+
* @param public_key Client's public key.
|
|
4522
|
+
* @param signature Multi Ed25519 signature of a raw transaction.
|
|
4523
|
+
*
|
|
4524
|
+
*/
|
|
4525
|
+
declare class TransactionAuthenticatorMultiEd25519 extends TransactionAuthenticator {
|
|
4526
|
+
readonly public_key: MultiEd25519PublicKey;
|
|
4527
|
+
readonly signature: MultiEd25519Signature;
|
|
4528
|
+
constructor(public_key: MultiEd25519PublicKey, signature: MultiEd25519Signature);
|
|
4479
4529
|
serialize(serializer: Serializer): void;
|
|
4480
|
-
static load(
|
|
4530
|
+
static load(deserializer: Deserializer): TransactionAuthenticatorMultiEd25519;
|
|
4481
4531
|
}
|
|
4482
|
-
|
|
4483
|
-
|
|
4532
|
+
/**
|
|
4533
|
+
* Transaction authenticator for a multi-agent transaction
|
|
4534
|
+
*
|
|
4535
|
+
* @param sender Sender account authenticator
|
|
4536
|
+
* @param secondary_signer_addresses Secondary signers address
|
|
4537
|
+
* @param secondary_signers Secondary signers account authenticators
|
|
4538
|
+
*
|
|
4539
|
+
*/
|
|
4540
|
+
declare class TransactionAuthenticatorMultiAgent extends TransactionAuthenticator {
|
|
4541
|
+
readonly sender: AccountAuthenticator;
|
|
4542
|
+
readonly secondary_signer_addresses: Array<AccountAddress>;
|
|
4543
|
+
readonly secondary_signers: Array<AccountAuthenticator>;
|
|
4544
|
+
constructor(sender: AccountAuthenticator, secondary_signer_addresses: Array<AccountAddress>, secondary_signers: Array<AccountAuthenticator>);
|
|
4484
4545
|
serialize(serializer: Serializer): void;
|
|
4485
|
-
static load(
|
|
4486
|
-
}
|
|
4487
|
-
declare class TypeTagU128 extends TypeTag {
|
|
4488
|
-
toString(): string;
|
|
4489
|
-
serialize(serializer: Serializer): void;
|
|
4490
|
-
static load(_deserializer: Deserializer): TypeTagU128;
|
|
4491
|
-
}
|
|
4492
|
-
declare class TypeTagU256 extends TypeTag {
|
|
4493
|
-
toString(): string;
|
|
4494
|
-
serialize(serializer: Serializer): void;
|
|
4495
|
-
static load(_deserializer: Deserializer): TypeTagU256;
|
|
4496
|
-
}
|
|
4497
|
-
declare class TypeTagAddress extends TypeTag {
|
|
4498
|
-
toString(): string;
|
|
4499
|
-
serialize(serializer: Serializer): void;
|
|
4500
|
-
static load(_deserializer: Deserializer): TypeTagAddress;
|
|
4501
|
-
}
|
|
4502
|
-
declare class TypeTagSigner extends TypeTag {
|
|
4503
|
-
toString(): string;
|
|
4504
|
-
serialize(serializer: Serializer): void;
|
|
4505
|
-
static load(_deserializer: Deserializer): TypeTagSigner;
|
|
4506
|
-
}
|
|
4507
|
-
declare class TypeTagReference extends TypeTag {
|
|
4508
|
-
readonly value: TypeTag;
|
|
4509
|
-
toString(): `&${string}`;
|
|
4510
|
-
constructor(value: TypeTag);
|
|
4511
|
-
serialize(serializer: Serializer): void;
|
|
4512
|
-
static load(deserializer: Deserializer): TypeTagReference;
|
|
4546
|
+
static load(deserializer: Deserializer): TransactionAuthenticatorMultiAgent;
|
|
4513
4547
|
}
|
|
4514
4548
|
/**
|
|
4515
|
-
*
|
|
4516
|
-
*
|
|
4517
|
-
*
|
|
4549
|
+
* Transaction authenticator for a fee payer transaction
|
|
4550
|
+
*
|
|
4551
|
+
* @param sender Sender account authenticator
|
|
4552
|
+
* @param secondary_signer_addresses Secondary signers address
|
|
4553
|
+
* @param secondary_signers Secondary signers account authenticators
|
|
4554
|
+
* @param fee_payer Object of the fee payer account address and the fee payer authentication
|
|
4555
|
+
*
|
|
4518
4556
|
*/
|
|
4519
|
-
declare class
|
|
4520
|
-
readonly
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4557
|
+
declare class TransactionAuthenticatorFeePayer extends TransactionAuthenticator {
|
|
4558
|
+
readonly sender: AccountAuthenticator;
|
|
4559
|
+
readonly secondary_signer_addresses: Array<AccountAddress>;
|
|
4560
|
+
readonly secondary_signers: Array<AccountAuthenticator>;
|
|
4561
|
+
readonly fee_payer: {
|
|
4562
|
+
address: AccountAddress;
|
|
4563
|
+
authenticator: AccountAuthenticator;
|
|
4564
|
+
};
|
|
4565
|
+
constructor(sender: AccountAuthenticator, secondary_signer_addresses: Array<AccountAddress>, secondary_signers: Array<AccountAuthenticator>, fee_payer: {
|
|
4566
|
+
address: AccountAddress;
|
|
4567
|
+
authenticator: AccountAuthenticator;
|
|
4568
|
+
});
|
|
4531
4569
|
serialize(serializer: Serializer): void;
|
|
4532
|
-
static load(deserializer: Deserializer):
|
|
4570
|
+
static load(deserializer: Deserializer): TransactionAuthenticatorMultiAgent;
|
|
4533
4571
|
}
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
|
|
4572
|
+
/**
|
|
4573
|
+
* Single Sender authenticator for a single signer transaction
|
|
4574
|
+
*
|
|
4575
|
+
* @param sender AccountAuthenticator
|
|
4576
|
+
*/
|
|
4577
|
+
declare class TransactionAuthenticatorSingleSender extends TransactionAuthenticator {
|
|
4578
|
+
readonly sender: AccountAuthenticator;
|
|
4579
|
+
constructor(sender: AccountAuthenticator);
|
|
4538
4580
|
serialize(serializer: Serializer): void;
|
|
4539
|
-
static load(deserializer: Deserializer):
|
|
4540
|
-
isTypeTag(address: AccountAddress, moduleName: string, structName: string): boolean;
|
|
4541
|
-
isString(): boolean;
|
|
4542
|
-
isOption(): boolean;
|
|
4543
|
-
isObject(): boolean;
|
|
4581
|
+
static load(deserializer: Deserializer): TransactionAuthenticatorSingleSender;
|
|
4544
4582
|
}
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
readonly
|
|
4548
|
-
readonly
|
|
4549
|
-
|
|
4550
|
-
|
|
4583
|
+
|
|
4584
|
+
declare class SignedTransaction extends Serializable {
|
|
4585
|
+
readonly raw_txn: RawTransaction;
|
|
4586
|
+
readonly authenticator: TransactionAuthenticator;
|
|
4587
|
+
/**
|
|
4588
|
+
* A SignedTransaction consists of a raw transaction and an authenticator. The authenticator
|
|
4589
|
+
* contains a client's public key and the signature of the raw transaction.
|
|
4590
|
+
*
|
|
4591
|
+
* @see {@link https://aptos.dev/integration/creating-a-signed-transaction | Creating a Signed Transaction}
|
|
4592
|
+
*
|
|
4593
|
+
* @param raw_txn
|
|
4594
|
+
* @param authenticator Contains a client's public key and the signature of the raw transaction.
|
|
4595
|
+
* Authenticator has 3 flavors: single signature, multi-signature and multi-agent.
|
|
4596
|
+
* @see {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs} for details.
|
|
4597
|
+
*/
|
|
4598
|
+
constructor(raw_txn: RawTransaction, authenticator: TransactionAuthenticator);
|
|
4551
4599
|
serialize(serializer: Serializer): void;
|
|
4552
|
-
static deserialize(deserializer: Deserializer):
|
|
4600
|
+
static deserialize(deserializer: Deserializer): SignedTransaction;
|
|
4553
4601
|
}
|
|
4554
|
-
declare function aptosCoinStructTag(): StructTag;
|
|
4555
|
-
declare function stringStructTag(): StructTag;
|
|
4556
|
-
declare function optionStructTag(typeArg: TypeTag): StructTag;
|
|
4557
|
-
declare function objectStructTag(typeArg: TypeTag): StructTag;
|
|
4558
4602
|
|
|
4559
4603
|
/**
|
|
4560
|
-
*
|
|
4561
|
-
*/
|
|
4562
|
-
declare function deserializeFromScriptArgument(deserializer: Deserializer): TransactionArgument;
|
|
4563
|
-
/**
|
|
4564
|
-
* Representation of the supported Transaction Payload
|
|
4565
|
-
* that can serialized and deserialized
|
|
4604
|
+
* Representation of a SimpleTransaction that can serialized and deserialized
|
|
4566
4605
|
*/
|
|
4567
|
-
declare
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
abstract serialize(serializer: Serializer): void;
|
|
4606
|
+
declare class SimpleTransaction extends Serializable {
|
|
4607
|
+
rawTransaction: RawTransaction;
|
|
4608
|
+
feePayerAddress?: AccountAddress | undefined;
|
|
4609
|
+
readonly secondarySignerAddresses: undefined;
|
|
4572
4610
|
/**
|
|
4573
|
-
*
|
|
4611
|
+
* SimpleTransaction represents a simple transaction type of a single signer that
|
|
4612
|
+
* can be submitted to Aptos chain for execution.
|
|
4613
|
+
*
|
|
4614
|
+
* SimpleTransaction metadata contains the Raw Transaction and an optional
|
|
4615
|
+
* sponsor Account Address to pay the gas fees.
|
|
4616
|
+
*
|
|
4617
|
+
* @param rawTransaction The Raw Tranasaction
|
|
4618
|
+
* @param feePayerAddress The sponsor Account Address
|
|
4574
4619
|
*/
|
|
4575
|
-
|
|
4620
|
+
constructor(rawTransaction: RawTransaction, feePayerAddress?: AccountAddress);
|
|
4621
|
+
serialize(serializer: Serializer): void;
|
|
4622
|
+
static deserialize(deserializer: Deserializer): SimpleTransaction;
|
|
4576
4623
|
}
|
|
4624
|
+
|
|
4577
4625
|
/**
|
|
4578
|
-
* Representation of a Transaction
|
|
4626
|
+
* Representation of a Raw Transaction that can serialized and deserialized
|
|
4579
4627
|
*/
|
|
4580
|
-
declare class
|
|
4581
|
-
|
|
4582
|
-
|
|
4628
|
+
declare class MultiAgentTransaction extends Serializable {
|
|
4629
|
+
rawTransaction: RawTransaction;
|
|
4630
|
+
feePayerAddress?: AccountAddress | undefined;
|
|
4631
|
+
secondarySignerAddresses: AccountAddress[];
|
|
4632
|
+
/**
|
|
4633
|
+
* SimpleTransaction represents a simple transaction type of a single signer that
|
|
4634
|
+
* can be submitted to Aptos chain for execution.
|
|
4635
|
+
*
|
|
4636
|
+
* SimpleTransaction metadata contains the Raw Transaction and an optional
|
|
4637
|
+
* sponsor Account Address to pay the gas fees.
|
|
4638
|
+
*
|
|
4639
|
+
* @param rawTransaction The Raw Tranasaction
|
|
4640
|
+
* @param feePayerAddress The sponsor Account Address
|
|
4641
|
+
*/
|
|
4642
|
+
constructor(rawTransaction: RawTransaction, secondarySignerAddresses: AccountAddress[], feePayerAddress?: AccountAddress);
|
|
4583
4643
|
serialize(serializer: Serializer): void;
|
|
4584
|
-
static
|
|
4644
|
+
static deserialize(deserializer: Deserializer): MultiAgentTransaction;
|
|
4585
4645
|
}
|
|
4646
|
+
|
|
4586
4647
|
/**
|
|
4587
|
-
*
|
|
4648
|
+
* Entry function arguments to be used when building a raw transaction using remote ABI
|
|
4588
4649
|
*/
|
|
4589
|
-
|
|
4590
|
-
readonly entryFunction: EntryFunction;
|
|
4591
|
-
constructor(entryFunction: EntryFunction);
|
|
4592
|
-
serialize(serializer: Serializer): void;
|
|
4593
|
-
static load(deserializer: Deserializer): TransactionPayloadEntryFunction;
|
|
4594
|
-
}
|
|
4650
|
+
type SimpleEntryFunctionArgumentTypes = boolean | number | bigint | string | null | undefined | Uint8Array | ArrayBuffer | Array<SimpleEntryFunctionArgumentTypes | EntryFunctionArgumentTypes>;
|
|
4595
4651
|
/**
|
|
4596
|
-
*
|
|
4652
|
+
* Entry function arguments to be used when building a raw transaction using BCS serialized arguments
|
|
4597
4653
|
*/
|
|
4598
|
-
|
|
4599
|
-
readonly multiSig: MultiSig;
|
|
4600
|
-
constructor(multiSig: MultiSig);
|
|
4601
|
-
serialize(serializer: Serializer): void;
|
|
4602
|
-
static load(deserializer: Deserializer): TransactionPayloadMultiSig;
|
|
4603
|
-
}
|
|
4654
|
+
type EntryFunctionArgumentTypes = Bool | U8 | U16 | U32 | U64 | U128 | U256 | AccountAddress | MoveVector<EntryFunctionArgumentTypes> | MoveOption<EntryFunctionArgumentTypes> | MoveString | FixedBytes;
|
|
4604
4655
|
/**
|
|
4605
|
-
*
|
|
4656
|
+
* Script function arguments to be used when building a raw transaction using BCS serialized arguments
|
|
4606
4657
|
*/
|
|
4607
|
-
|
|
4608
|
-
readonly module_name: ModuleId;
|
|
4609
|
-
readonly function_name: Identifier;
|
|
4610
|
-
readonly type_args: Array<TypeTag>;
|
|
4611
|
-
readonly args: Array<EntryFunctionArgument>;
|
|
4612
|
-
/**
|
|
4613
|
-
* Contains the payload to run a function within a module.
|
|
4614
|
-
* @param module_name Fully qualified module name in format "account_address::module_name" e.g. "0x1::coin"
|
|
4615
|
-
* @param function_name The function name. e.g "transfer"
|
|
4616
|
-
* @param type_args Type arguments that move function requires.
|
|
4617
|
-
*
|
|
4618
|
-
* @example
|
|
4619
|
-
* A coin transfer function has one type argument "CoinType".
|
|
4620
|
-
* ```
|
|
4621
|
-
* public entry fun transfer<CoinType>(from: &signer, to: address, amount: u64)
|
|
4622
|
-
* ```
|
|
4623
|
-
* @param args arguments to the move function.
|
|
4624
|
-
*
|
|
4625
|
-
* @example
|
|
4626
|
-
* A coin transfer function has three arguments "from", "to" and "amount".
|
|
4627
|
-
* ```
|
|
4628
|
-
* public entry fun transfer<CoinType>(from: &signer, to: address, amount: u64)
|
|
4629
|
-
* ```
|
|
4630
|
-
*/
|
|
4631
|
-
constructor(module_name: ModuleId, function_name: Identifier, type_args: Array<TypeTag>, args: Array<EntryFunctionArgument>);
|
|
4632
|
-
/**
|
|
4633
|
-
* A helper function to build a EntryFunction payload from raw primitive values
|
|
4634
|
-
*
|
|
4635
|
-
* @param module_id Fully qualified module name in format "AccountAddress::module_id" e.g. "0x1::coin"
|
|
4636
|
-
* @param function_name Function name
|
|
4637
|
-
* @param type_args Type arguments that move function requires.
|
|
4638
|
-
*
|
|
4639
|
-
* @example
|
|
4640
|
-
* A coin transfer function has one type argument "CoinType".
|
|
4641
|
-
* ```
|
|
4642
|
-
* public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
|
|
4643
|
-
* ```
|
|
4644
|
-
* @param args Arguments to the move function.
|
|
4645
|
-
*
|
|
4646
|
-
* @example
|
|
4647
|
-
* A coin transfer function has three arguments "from", "to" and "amount".
|
|
4648
|
-
* ```
|
|
4649
|
-
* public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
|
|
4650
|
-
* ```
|
|
4651
|
-
* @returns EntryFunction
|
|
4652
|
-
*/
|
|
4653
|
-
static build(module_id: MoveModuleId, function_name: string, type_args: Array<TypeTag>, args: Array<EntryFunctionArgument>): EntryFunction;
|
|
4654
|
-
serialize(serializer: Serializer): void;
|
|
4655
|
-
/**
|
|
4656
|
-
* Deserializes an entry function payload with the arguments represented as EntryFunctionBytes instances.
|
|
4657
|
-
* @see EntryFunctionBytes
|
|
4658
|
-
*
|
|
4659
|
-
* NOTE: When you deserialize an EntryFunction payload with this method, the entry function
|
|
4660
|
-
* arguments are populated into the deserialized instance as type-agnostic, raw fixed bytes
|
|
4661
|
-
* in the form of the EntryFunctionBytes class.
|
|
4662
|
-
*
|
|
4663
|
-
* In order to correctly deserialize these arguments as their actual type representations, you
|
|
4664
|
-
* must know the types of the arguments beforehand and deserialize them yourself individually.
|
|
4665
|
-
*
|
|
4666
|
-
* One way you could achieve this is by using the ABIs for an entry function and deserializing each
|
|
4667
|
-
* argument as its given, corresponding type.
|
|
4668
|
-
*
|
|
4669
|
-
* @param deserializer
|
|
4670
|
-
* @returns A deserialized EntryFunction payload for a transaction.
|
|
4671
|
-
*
|
|
4672
|
-
*/
|
|
4673
|
-
static deserialize(deserializer: Deserializer): EntryFunction;
|
|
4674
|
-
}
|
|
4658
|
+
type ScriptFunctionArgumentTypes = Bool | U8 | U16 | U32 | U64 | U128 | U256 | AccountAddress | MoveVector<U8> | MoveString | FixedBytes;
|
|
4675
4659
|
/**
|
|
4676
|
-
*
|
|
4660
|
+
* Type that holds all raw transaction instances Aptos SDK supports
|
|
4677
4661
|
*/
|
|
4678
|
-
|
|
4679
|
-
/**
|
|
4680
|
-
* The move module bytecode
|
|
4681
|
-
*/
|
|
4682
|
-
readonly bytecode: Uint8Array;
|
|
4683
|
-
/**
|
|
4684
|
-
* The type arguments that the bytecode function requires.
|
|
4685
|
-
*/
|
|
4686
|
-
readonly type_args: Array<TypeTag>;
|
|
4687
|
-
/**
|
|
4688
|
-
* The arguments that the bytecode function requires.
|
|
4689
|
-
*/
|
|
4690
|
-
readonly args: Array<ScriptFunctionArgument>;
|
|
4691
|
-
/**
|
|
4692
|
-
* Scripts contain the Move bytecodes payload that can be submitted to Aptos chain for execution.
|
|
4693
|
-
*
|
|
4694
|
-
* @param bytecode The move module bytecode
|
|
4695
|
-
* @param type_args The type arguments that the bytecode function requires.
|
|
4696
|
-
*
|
|
4697
|
-
* @example
|
|
4698
|
-
* A coin transfer function has one type argument "CoinType".
|
|
4699
|
-
* ```
|
|
4700
|
-
* public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
|
|
4701
|
-
* ```
|
|
4702
|
-
* @param args The arguments that the bytecode function requires.
|
|
4703
|
-
*
|
|
4704
|
-
* @example
|
|
4705
|
-
* A coin transfer function has three arguments "from", "to" and "amount".
|
|
4706
|
-
* ```
|
|
4707
|
-
* public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
|
|
4708
|
-
* ```
|
|
4709
|
-
*/
|
|
4710
|
-
constructor(bytecode: Uint8Array, type_args: Array<TypeTag>, args: Array<ScriptFunctionArgument>);
|
|
4711
|
-
serialize(serializer: Serializer): void;
|
|
4712
|
-
static deserialize(deserializer: Deserializer): Script;
|
|
4713
|
-
}
|
|
4662
|
+
type AnyRawTransactionInstance = RawTransaction | MultiAgentRawTransaction | FeePayerRawTransaction;
|
|
4714
4663
|
/**
|
|
4715
|
-
*
|
|
4664
|
+
* Optional options to set when generating a transaction
|
|
4716
4665
|
*/
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
* @param multisig_address The multi-sig account address the transaction will be executed as.
|
|
4724
|
-
*
|
|
4725
|
-
* @param transaction_payload The payload of the multi-sig transaction. This is optional when executing a multi-sig
|
|
4726
|
-
* transaction whose payload is already stored on chain.
|
|
4727
|
-
*/
|
|
4728
|
-
constructor(multisig_address: AccountAddress, transaction_payload?: MultiSigTransactionPayload);
|
|
4729
|
-
serialize(serializer: Serializer): void;
|
|
4730
|
-
static deserialize(deserializer: Deserializer): MultiSig;
|
|
4731
|
-
}
|
|
4666
|
+
type InputGenerateTransactionOptions = {
|
|
4667
|
+
maxGasAmount?: number;
|
|
4668
|
+
gasUnitPrice?: number;
|
|
4669
|
+
expireTimestamp?: number;
|
|
4670
|
+
accountSequenceNumber?: AnyNumber;
|
|
4671
|
+
};
|
|
4732
4672
|
/**
|
|
4733
|
-
*
|
|
4734
|
-
* that can be serialized and deserialized
|
|
4735
|
-
|
|
4736
|
-
* This class exists right now to represent an extensible transaction payload class for
|
|
4737
|
-
* transactions used in `multisig_account.move`. Eventually, this class will be able to
|
|
4738
|
-
* support script payloads when the `multisig_account.move` module supports them.
|
|
4673
|
+
* The generated transaction payload type that was produces from `generateTransactionPayload()` function.
|
|
4739
4674
|
*/
|
|
4740
|
-
|
|
4741
|
-
readonly transaction_payload: EntryFunction;
|
|
4742
|
-
/**
|
|
4743
|
-
* Contains the payload to run a multi-sig account transaction.
|
|
4744
|
-
*
|
|
4745
|
-
* @param transaction_payload The payload of the multi-sig transaction.
|
|
4746
|
-
* This can only be EntryFunction for now but,
|
|
4747
|
-
* Script might be supported in the future.
|
|
4748
|
-
*/
|
|
4749
|
-
constructor(transaction_payload: EntryFunction);
|
|
4750
|
-
serialize(serializer: Serializer): void;
|
|
4751
|
-
static deserialize(deserializer: Deserializer): MultiSigTransactionPayload;
|
|
4752
|
-
}
|
|
4753
|
-
|
|
4675
|
+
type AnyTransactionPayloadInstance = TransactionPayloadEntryFunction | TransactionPayloadScript | TransactionPayloadMultiSig;
|
|
4754
4676
|
/**
|
|
4755
|
-
*
|
|
4677
|
+
* Unified type for the data needed to generate a transaction payload of types:
|
|
4678
|
+
* Entry Function | Script | Multi Sig
|
|
4756
4679
|
*/
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
readonly sequence_number: bigint;
|
|
4760
|
-
readonly payload: TransactionPayload;
|
|
4761
|
-
readonly max_gas_amount: bigint;
|
|
4762
|
-
readonly gas_unit_price: bigint;
|
|
4763
|
-
readonly expiration_timestamp_secs: bigint;
|
|
4764
|
-
readonly chain_id: ChainId;
|
|
4765
|
-
/**
|
|
4766
|
-
* RawTransactions contain the metadata and payloads that can be submitted to Aptos chain for execution.
|
|
4767
|
-
* RawTransactions must be signed before Aptos chain can execute them.
|
|
4768
|
-
*
|
|
4769
|
-
* @param sender The sender Account Address
|
|
4770
|
-
* @param sequence_number Sequence number of this transaction. This must match the sequence number stored in
|
|
4771
|
-
* the sender's account at the time the transaction executes.
|
|
4772
|
-
* @param payload Instructions for the Aptos Blockchain, including publishing a module,
|
|
4773
|
-
* execute an entry function or execute a script payload.
|
|
4774
|
-
* @param max_gas_amount Maximum total gas to spend for this transaction. The account must have more
|
|
4775
|
-
* than this gas or the transaction will be discarded during validation.
|
|
4776
|
-
* @param gas_unit_price Price to be paid per gas unit.
|
|
4777
|
-
* @param expiration_timestamp_secs The blockchain timestamp at which the blockchain would discard this transaction.
|
|
4778
|
-
* @param chain_id The chain ID of the blockchain that this transaction is intended to be run on.
|
|
4779
|
-
*/
|
|
4780
|
-
constructor(sender: AccountAddress, sequence_number: bigint, payload: TransactionPayload, max_gas_amount: bigint, gas_unit_price: bigint, expiration_timestamp_secs: bigint, chain_id: ChainId);
|
|
4781
|
-
serialize(serializer: Serializer): void;
|
|
4782
|
-
static deserialize(deserializer: Deserializer): RawTransaction;
|
|
4783
|
-
}
|
|
4680
|
+
type InputGenerateTransactionPayloadData = InputEntryFunctionData | InputScriptData | InputMultiSigData;
|
|
4681
|
+
type InputGenerateTransactionPayloadDataWithRemoteABI = InputScriptData | InputEntryFunctionDataWithRemoteABI | InputMultiSigDataWithRemoteABI;
|
|
4784
4682
|
/**
|
|
4785
|
-
*
|
|
4683
|
+
* The data needed to generate an Entry Function payload
|
|
4786
4684
|
*/
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4685
|
+
type InputEntryFunctionData = {
|
|
4686
|
+
function: MoveFunctionId;
|
|
4687
|
+
typeArguments?: Array<TypeTag | string>;
|
|
4688
|
+
functionArguments: Array<EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes>;
|
|
4689
|
+
abi?: EntryFunctionABI;
|
|
4690
|
+
};
|
|
4691
|
+
type InputGenerateTransactionPayloadDataWithABI = InputEntryFunctionDataWithABI | InputMultiSigDataWithABI;
|
|
4692
|
+
type InputEntryFunctionDataWithABI = Omit<InputEntryFunctionData, "abi"> & {
|
|
4693
|
+
abi: EntryFunctionABI;
|
|
4694
|
+
};
|
|
4695
|
+
type InputMultiSigDataWithABI = {
|
|
4696
|
+
multisigAddress: AccountAddressInput;
|
|
4697
|
+
} & InputEntryFunctionDataWithABI;
|
|
4698
|
+
type InputEntryFunctionDataWithRemoteABI = InputEntryFunctionData & {
|
|
4699
|
+
aptosConfig: AptosConfig;
|
|
4700
|
+
};
|
|
4701
|
+
/**
|
|
4702
|
+
* The data needed to generate a Multi Sig payload
|
|
4703
|
+
*/
|
|
4704
|
+
type InputMultiSigData = {
|
|
4705
|
+
multisigAddress: AccountAddressInput;
|
|
4706
|
+
} & InputEntryFunctionData;
|
|
4707
|
+
/**
|
|
4708
|
+
* The data needed to generate a Multi Sig payload
|
|
4709
|
+
*/
|
|
4710
|
+
type InputMultiSigDataWithRemoteABI = {
|
|
4711
|
+
multisigAddress: AccountAddressInput;
|
|
4712
|
+
} & InputEntryFunctionDataWithRemoteABI;
|
|
4713
|
+
/**
|
|
4714
|
+
* The data needed to generate a Script payload
|
|
4715
|
+
*/
|
|
4716
|
+
type InputScriptData = {
|
|
4717
|
+
bytecode: HexInput;
|
|
4718
|
+
typeArguments?: Array<TypeTag>;
|
|
4719
|
+
functionArguments: Array<ScriptFunctionArgumentTypes>;
|
|
4720
|
+
};
|
|
4721
|
+
/**
|
|
4722
|
+
* The data needed to generate a View Function payload
|
|
4723
|
+
*/
|
|
4724
|
+
type InputViewFunctionData = {
|
|
4725
|
+
function: MoveFunctionId;
|
|
4726
|
+
typeArguments?: Array<TypeTag | string>;
|
|
4727
|
+
functionArguments?: Array<EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes>;
|
|
4728
|
+
abi?: ViewFunctionABI;
|
|
4729
|
+
};
|
|
4730
|
+
/**
|
|
4731
|
+
* Data needed to generate a view function payload and fetch the remote ABI
|
|
4732
|
+
*/
|
|
4733
|
+
type InputViewFunctionDataWithRemoteABI = InputViewFunctionData & {
|
|
4734
|
+
aptosConfig: AptosConfig;
|
|
4735
|
+
};
|
|
4736
|
+
/**
|
|
4737
|
+
* Data needed to generate a view function, with an already fetched ABI
|
|
4738
|
+
*/
|
|
4739
|
+
type InputViewFunctionDataWithABI = InputViewFunctionData & {
|
|
4740
|
+
abi: ViewFunctionABI;
|
|
4741
|
+
};
|
|
4742
|
+
/**
|
|
4743
|
+
* Data need for a generic function ABI, both view and entry
|
|
4744
|
+
*/
|
|
4745
|
+
type FunctionABI = {
|
|
4746
|
+
typeParameters: Array<MoveFunctionGenericTypeParam>;
|
|
4747
|
+
parameters: Array<TypeTag>;
|
|
4748
|
+
};
|
|
4749
|
+
/**
|
|
4750
|
+
* Interface of an Entry function's ABI.
|
|
4751
|
+
*
|
|
4752
|
+
* This is used to provide type checking and simple input conversion on ABI based transaction submission.
|
|
4753
|
+
*/
|
|
4754
|
+
type EntryFunctionABI = FunctionABI & {
|
|
4755
|
+
signers?: number;
|
|
4756
|
+
};
|
|
4757
|
+
/**
|
|
4758
|
+
* Interface of an View function's ABI.
|
|
4759
|
+
*
|
|
4760
|
+
* This is used to provide type checking and simple input conversion on ABI based transaction submission.
|
|
4761
|
+
*/
|
|
4762
|
+
type ViewFunctionABI = FunctionABI & {
|
|
4763
|
+
returnTypes: Array<TypeTag>;
|
|
4764
|
+
};
|
|
4765
|
+
/**
|
|
4766
|
+
* Interface of the arguments to generate a single signer transaction.
|
|
4767
|
+
* Used to provide to `generateTransaction()` method in the transaction builder flow
|
|
4768
|
+
*/
|
|
4769
|
+
interface InputGenerateSingleSignerRawTransactionArgs {
|
|
4770
|
+
aptosConfig: AptosConfig;
|
|
4771
|
+
sender: AccountAddressInput;
|
|
4772
|
+
payload: AnyTransactionPayloadInstance;
|
|
4773
|
+
options?: InputGenerateTransactionOptions;
|
|
4774
|
+
feePayerAddress?: AccountAddressInput;
|
|
4796
4775
|
}
|
|
4797
4776
|
/**
|
|
4798
|
-
*
|
|
4777
|
+
* Interface of the arguments to generate a multi-agent transaction.
|
|
4778
|
+
* Used to provide to `generateTransaction()` method in the transaction builder flow
|
|
4799
4779
|
*/
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
*/
|
|
4808
|
-
readonly secondary_signer_addresses: Array<AccountAddress>;
|
|
4809
|
-
constructor(raw_txn: RawTransaction, secondary_signer_addresses: Array<AccountAddress>);
|
|
4810
|
-
serialize(serializer: Serializer): void;
|
|
4811
|
-
static load(deserializer: Deserializer): MultiAgentRawTransaction;
|
|
4780
|
+
interface InputGenerateMultiAgentRawTransactionArgs {
|
|
4781
|
+
aptosConfig: AptosConfig;
|
|
4782
|
+
sender: AccountAddressInput;
|
|
4783
|
+
payload: AnyTransactionPayloadInstance;
|
|
4784
|
+
secondarySignerAddresses: AccountAddressInput[];
|
|
4785
|
+
options?: InputGenerateTransactionOptions;
|
|
4786
|
+
feePayerAddress?: AccountAddressInput;
|
|
4812
4787
|
}
|
|
4813
4788
|
/**
|
|
4814
|
-
*
|
|
4789
|
+
* Unified type that holds all the interfaces to generate different transaction types
|
|
4815
4790
|
*/
|
|
4816
|
-
|
|
4791
|
+
type InputGenerateRawTransactionArgs = InputGenerateSingleSignerRawTransactionArgs | InputGenerateMultiAgentRawTransactionArgs;
|
|
4792
|
+
/**
|
|
4793
|
+
* Unified type that holds all the return interfaces when generating different transaction types
|
|
4794
|
+
*/
|
|
4795
|
+
type AnyRawTransaction = SimpleTransaction | MultiAgentTransaction;
|
|
4796
|
+
type InputSimulateTransactionData = {
|
|
4817
4797
|
/**
|
|
4818
|
-
* The
|
|
4798
|
+
* The transaction to simulate, probably generated by `generateTransaction()`
|
|
4819
4799
|
*/
|
|
4820
|
-
|
|
4800
|
+
transaction: AnyRawTransaction;
|
|
4821
4801
|
/**
|
|
4822
|
-
*
|
|
4802
|
+
* For a single signer transaction
|
|
4823
4803
|
*/
|
|
4824
|
-
|
|
4804
|
+
signerPublicKey: PublicKey;
|
|
4825
4805
|
/**
|
|
4826
|
-
*
|
|
4806
|
+
* For a fee payer or multi-agent transaction that requires additional signers in
|
|
4827
4807
|
*/
|
|
4828
|
-
|
|
4829
|
-
constructor(raw_txn: RawTransaction, secondary_signer_addresses: Array<AccountAddress>, fee_payer_address: AccountAddress);
|
|
4830
|
-
serialize(serializer: Serializer): void;
|
|
4831
|
-
static load(deserializer: Deserializer): FeePayerRawTransaction;
|
|
4832
|
-
}
|
|
4833
|
-
|
|
4834
|
-
/**
|
|
4835
|
-
* Representation of a SimpleTransaction that can serialized and deserialized
|
|
4836
|
-
*/
|
|
4837
|
-
declare class SimpleTransaction extends Serializable {
|
|
4838
|
-
rawTransaction: RawTransaction;
|
|
4839
|
-
feePayerAddress?: AccountAddress | undefined;
|
|
4840
|
-
readonly secondarySignerAddresses: undefined;
|
|
4808
|
+
secondarySignersPublicKeys?: Array<PublicKey>;
|
|
4841
4809
|
/**
|
|
4842
|
-
*
|
|
4843
|
-
* can be submitted to Aptos chain for execution.
|
|
4844
|
-
*
|
|
4845
|
-
* SimpleTransaction metadata contains the Raw Transaction and an optional
|
|
4846
|
-
* sponsor Account Address to pay the gas fees.
|
|
4847
|
-
*
|
|
4848
|
-
* @param rawTransaction The Raw Tranasaction
|
|
4849
|
-
* @param feePayerAddress The sponsor Account Address
|
|
4810
|
+
* For a fee payer transaction (aka Sponsored Transaction)
|
|
4850
4811
|
*/
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4812
|
+
feePayerPublicKey?: PublicKey;
|
|
4813
|
+
options?: InputSimulateTransactionOptions;
|
|
4814
|
+
};
|
|
4815
|
+
type InputSimulateTransactionOptions = {
|
|
4816
|
+
estimateGasUnitPrice?: boolean;
|
|
4817
|
+
estimateMaxGasAmount?: boolean;
|
|
4818
|
+
estimatePrioritizedGasUnitPrice?: boolean;
|
|
4819
|
+
};
|
|
4856
4820
|
/**
|
|
4857
|
-
*
|
|
4858
|
-
* to rotate the authentication key.
|
|
4821
|
+
* Interface that holds the user data input when generating a single signer transaction
|
|
4859
4822
|
*/
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
readonly newPublicKey: MoveVector<U8>;
|
|
4867
|
-
readonly sequenceNumber: U64;
|
|
4868
|
-
constructor(args: {
|
|
4869
|
-
sequenceNumber: AnyNumber;
|
|
4870
|
-
originator: AccountAddress;
|
|
4871
|
-
currentAuthKey: AccountAddress;
|
|
4872
|
-
newPublicKey: PublicKey;
|
|
4873
|
-
});
|
|
4874
|
-
serialize(serializer: Serializer): void;
|
|
4875
|
-
}
|
|
4876
|
-
|
|
4877
|
-
declare abstract class TransactionAuthenticator extends Serializable {
|
|
4878
|
-
abstract serialize(serializer: Serializer): void;
|
|
4879
|
-
static deserialize(deserializer: Deserializer): TransactionAuthenticator;
|
|
4823
|
+
interface InputGenerateSingleSignerRawTransactionData {
|
|
4824
|
+
sender: AccountAddressInput;
|
|
4825
|
+
data: InputGenerateTransactionPayloadData;
|
|
4826
|
+
options?: InputGenerateTransactionOptions;
|
|
4827
|
+
withFeePayer?: boolean;
|
|
4828
|
+
secondarySignerAddresses?: undefined;
|
|
4880
4829
|
}
|
|
4881
4830
|
/**
|
|
4882
|
-
*
|
|
4883
|
-
*
|
|
4884
|
-
* @param public_key Client's public key.
|
|
4885
|
-
* @param signature Ed25519 signature of a raw transaction.
|
|
4886
|
-
* @see {@link https://aptos.dev/integration/creating-a-signed-transaction | Creating a Signed Transaction}
|
|
4887
|
-
* for details about generating a signature.
|
|
4831
|
+
* Interface that holds the user data input when generating a multi-agent transaction
|
|
4888
4832
|
*/
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4833
|
+
interface InputGenerateMultiAgentRawTransactionData {
|
|
4834
|
+
sender: AccountAddressInput;
|
|
4835
|
+
data: InputGenerateTransactionPayloadData;
|
|
4836
|
+
secondarySignerAddresses: AccountAddressInput[];
|
|
4837
|
+
options?: InputGenerateTransactionOptions;
|
|
4838
|
+
withFeePayer?: boolean;
|
|
4895
4839
|
}
|
|
4896
4840
|
/**
|
|
4897
|
-
*
|
|
4898
|
-
*
|
|
4899
|
-
* @param public_key Client's public key.
|
|
4900
|
-
* @param signature Multi Ed25519 signature of a raw transaction.
|
|
4901
|
-
*
|
|
4841
|
+
* Unified type that holds all the user data input interfaces when generating different transaction types
|
|
4902
4842
|
*/
|
|
4903
|
-
|
|
4904
|
-
readonly public_key: MultiEd25519PublicKey;
|
|
4905
|
-
readonly signature: MultiEd25519Signature;
|
|
4906
|
-
constructor(public_key: MultiEd25519PublicKey, signature: MultiEd25519Signature);
|
|
4907
|
-
serialize(serializer: Serializer): void;
|
|
4908
|
-
static load(deserializer: Deserializer): TransactionAuthenticatorMultiEd25519;
|
|
4909
|
-
}
|
|
4843
|
+
type InputGenerateTransactionData = InputGenerateSingleSignerRawTransactionData | InputGenerateMultiAgentRawTransactionData;
|
|
4910
4844
|
/**
|
|
4911
|
-
*
|
|
4912
|
-
*
|
|
4913
|
-
* @param sender Sender account authenticator
|
|
4914
|
-
* @param secondary_signer_addresses Secondary signers address
|
|
4915
|
-
* @param secondary_signers Secondary signers account authenticators
|
|
4916
|
-
*
|
|
4845
|
+
* Interface that holds the user data input when submitting a transaction
|
|
4917
4846
|
*/
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
serialize(serializer: Serializer): void;
|
|
4924
|
-
static load(deserializer: Deserializer): TransactionAuthenticatorMultiAgent;
|
|
4847
|
+
interface InputSubmitTransactionData {
|
|
4848
|
+
transaction: AnyRawTransaction;
|
|
4849
|
+
senderAuthenticator: AccountAuthenticator;
|
|
4850
|
+
feePayerAuthenticator?: AccountAuthenticator;
|
|
4851
|
+
additionalSignersAuthenticators?: Array<AccountAuthenticator>;
|
|
4925
4852
|
}
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
authenticator: AccountAuthenticator;
|
|
4942
|
-
};
|
|
4943
|
-
constructor(sender: AccountAuthenticator, secondary_signer_addresses: Array<AccountAddress>, secondary_signers: Array<AccountAuthenticator>, fee_payer: {
|
|
4944
|
-
address: AccountAddress;
|
|
4945
|
-
authenticator: AccountAuthenticator;
|
|
4946
|
-
});
|
|
4947
|
-
serialize(serializer: Serializer): void;
|
|
4948
|
-
static load(deserializer: Deserializer): TransactionAuthenticatorMultiAgent;
|
|
4853
|
+
|
|
4854
|
+
interface SingleKeySignerConstructorArgs {
|
|
4855
|
+
privateKey: PrivateKey;
|
|
4856
|
+
address?: AccountAddressInput;
|
|
4857
|
+
}
|
|
4858
|
+
interface SingleKeySignerGenerateArgs {
|
|
4859
|
+
scheme?: SigningSchemeInput;
|
|
4860
|
+
}
|
|
4861
|
+
type SingleKeySignerFromDerivationPathArgs = SingleKeySignerGenerateArgs & {
|
|
4862
|
+
path: string;
|
|
4863
|
+
mnemonic: string;
|
|
4864
|
+
};
|
|
4865
|
+
interface VerifySingleKeySignatureArgs {
|
|
4866
|
+
message: HexInput;
|
|
4867
|
+
signature: AnySignature;
|
|
4949
4868
|
}
|
|
4950
4869
|
/**
|
|
4951
|
-
*
|
|
4870
|
+
* Signer implementation for the SingleKey authentication scheme.
|
|
4871
|
+
* This extends a SingleKeyAccount by adding signing capabilities through a valid private key.
|
|
4872
|
+
* Currently, the only supported signature schemes are Ed25519 and Secp256k1.
|
|
4952
4873
|
*
|
|
4953
|
-
*
|
|
4874
|
+
* Note: Generating a signer instance does not create the account on-chain.
|
|
4954
4875
|
*/
|
|
4955
|
-
declare class
|
|
4956
|
-
readonly sender: AccountAuthenticator;
|
|
4957
|
-
constructor(sender: AccountAuthenticator);
|
|
4958
|
-
serialize(serializer: Serializer): void;
|
|
4959
|
-
static load(deserializer: Deserializer): TransactionAuthenticatorSingleSender;
|
|
4960
|
-
}
|
|
4961
|
-
|
|
4962
|
-
declare class SignedTransaction extends Serializable {
|
|
4963
|
-
readonly raw_txn: RawTransaction;
|
|
4964
|
-
readonly authenticator: TransactionAuthenticator;
|
|
4876
|
+
declare class SingleKeyAccount implements Account$1 {
|
|
4965
4877
|
/**
|
|
4966
|
-
*
|
|
4967
|
-
* contains a client's public key and the signature of the raw transaction.
|
|
4968
|
-
*
|
|
4969
|
-
* @see {@link https://aptos.dev/integration/creating-a-signed-transaction | Creating a Signed Transaction}
|
|
4970
|
-
*
|
|
4971
|
-
* @param raw_txn
|
|
4972
|
-
* @param authenticator Contains a client's public key and the signature of the raw transaction.
|
|
4973
|
-
* Authenticator has 3 flavors: single signature, multi-signature and multi-agent.
|
|
4974
|
-
* @see {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs} for details.
|
|
4878
|
+
* Private key associated with the account
|
|
4975
4879
|
*/
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
/**
|
|
4982
|
-
* Representation of a Raw Transaction that can serialized and deserialized
|
|
4983
|
-
*/
|
|
4984
|
-
declare class MultiAgentTransaction extends Serializable {
|
|
4985
|
-
rawTransaction: RawTransaction;
|
|
4986
|
-
feePayerAddress?: AccountAddress | undefined;
|
|
4987
|
-
secondarySignerAddresses: AccountAddress[];
|
|
4880
|
+
readonly privateKey: PrivateKey;
|
|
4881
|
+
readonly publicKey: AnyPublicKey;
|
|
4882
|
+
readonly accountAddress: AccountAddress;
|
|
4883
|
+
readonly signingScheme = SigningScheme.SingleKey;
|
|
4884
|
+
constructor(args: SingleKeySignerConstructorArgs);
|
|
4988
4885
|
/**
|
|
4989
|
-
*
|
|
4990
|
-
*
|
|
4991
|
-
*
|
|
4992
|
-
|
|
4993
|
-
|
|
4886
|
+
* Derives an account from a randomly generated private key.
|
|
4887
|
+
* Default generation is using an Ed25519 key
|
|
4888
|
+
* @returns Account with the given signature scheme
|
|
4889
|
+
*/
|
|
4890
|
+
static generate(args?: SingleKeySignerGenerateArgs): SingleKeyAccount;
|
|
4891
|
+
/**
|
|
4892
|
+
* Derives an account with bip44 path and mnemonics,
|
|
4893
|
+
* Default to using an Ed25519 signature scheme.
|
|
4994
4894
|
*
|
|
4995
|
-
* @param
|
|
4996
|
-
* @param
|
|
4895
|
+
* @param args.scheme The signature scheme to derive the private key with
|
|
4896
|
+
* @param args.path the BIP44 derive hardened path (e.g. m/44'/637'/0'/0'/0') for Ed25519,
|
|
4897
|
+
* or non-hardened path (e.g. m/44'/637'/0'/0/0) for secp256k1
|
|
4898
|
+
* Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
|
|
4899
|
+
* @param args.mnemonic the mnemonic seed phrase of the account
|
|
4997
4900
|
*/
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
4901
|
+
static fromDerivationPath(args: SingleKeySignerFromDerivationPathArgs): SingleKeyAccount;
|
|
4902
|
+
verifySignature(args: VerifySingleKeySignatureArgs): boolean;
|
|
4903
|
+
signWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorSingleKey;
|
|
4904
|
+
sign(message: HexInput): AnySignature;
|
|
4905
|
+
signTransaction(transaction: AnyRawTransaction): AnySignature;
|
|
5001
4906
|
}
|
|
5002
4907
|
|
|
5003
4908
|
/**
|
|
5004
|
-
*
|
|
4909
|
+
* Arguments for creating an `Ed25519Account` from an `Ed25519PrivateKey`.
|
|
4910
|
+
* This is the default input type when passing an `Ed25519PrivateKey`.
|
|
4911
|
+
* In order to use the SingleKey authentication scheme, `legacy` needs to be explicitly set to false.
|
|
5005
4912
|
*/
|
|
5006
|
-
|
|
4913
|
+
interface CreateEd25519AccountFromPrivateKeyArgs {
|
|
4914
|
+
privateKey: Ed25519PrivateKey;
|
|
4915
|
+
address?: AccountAddressInput;
|
|
4916
|
+
legacy?: true;
|
|
4917
|
+
}
|
|
5007
4918
|
/**
|
|
5008
|
-
*
|
|
4919
|
+
* Arguments for creating an `SingleKeyAccount` from an `Ed25519PrivateKey`.
|
|
4920
|
+
* The `legacy` argument needs to be explicitly set to false in order to
|
|
4921
|
+
* use the `SingleKey` authentication scheme.
|
|
5009
4922
|
*/
|
|
5010
|
-
|
|
4923
|
+
interface CreateEd25519SingleKeyAccountFromPrivateKeyArgs {
|
|
4924
|
+
privateKey: Ed25519PrivateKey;
|
|
4925
|
+
address?: AccountAddressInput;
|
|
4926
|
+
legacy: false;
|
|
4927
|
+
}
|
|
5011
4928
|
/**
|
|
5012
|
-
*
|
|
4929
|
+
* Arguments for creating an `SingleKeyAccount` from any supported private key
|
|
4930
|
+
* that is not an `Ed25519PrivateKey`.
|
|
4931
|
+
* The `legacy` argument defaults to false and cannot be explicitly set to true.
|
|
5013
4932
|
*/
|
|
5014
|
-
|
|
4933
|
+
interface CreateSingleKeyAccountFromPrivateKeyArgs {
|
|
4934
|
+
privateKey: Exclude<PrivateKey, Ed25519PrivateKey>;
|
|
4935
|
+
address?: AccountAddressInput;
|
|
4936
|
+
legacy?: false;
|
|
4937
|
+
}
|
|
5015
4938
|
/**
|
|
5016
|
-
*
|
|
4939
|
+
* Arguments for creating an opaque `Account` from any supported private key.
|
|
4940
|
+
* This is used when the private key type is not known at compilation time.
|
|
5017
4941
|
*/
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
maxGasAmount?: number;
|
|
5024
|
-
gasUnitPrice?: number;
|
|
5025
|
-
expireTimestamp?: number;
|
|
5026
|
-
accountSequenceNumber?: AnyNumber;
|
|
5027
|
-
};
|
|
5028
|
-
/**
|
|
5029
|
-
* The generated transaction payload type that was produces from `generateTransactionPayload()` function.
|
|
5030
|
-
*/
|
|
5031
|
-
type AnyTransactionPayloadInstance = TransactionPayloadEntryFunction | TransactionPayloadScript | TransactionPayloadMultiSig;
|
|
5032
|
-
/**
|
|
5033
|
-
* Unified type for the data needed to generate a transaction payload of types:
|
|
5034
|
-
* Entry Function | Script | Multi Sig
|
|
5035
|
-
*/
|
|
5036
|
-
type InputGenerateTransactionPayloadData = InputEntryFunctionData | InputScriptData | InputMultiSigData;
|
|
5037
|
-
type InputGenerateTransactionPayloadDataWithRemoteABI = InputScriptData | InputEntryFunctionDataWithRemoteABI | InputMultiSigDataWithRemoteABI;
|
|
5038
|
-
/**
|
|
5039
|
-
* The data needed to generate an Entry Function payload
|
|
5040
|
-
*/
|
|
5041
|
-
type InputEntryFunctionData = {
|
|
5042
|
-
function: MoveFunctionId;
|
|
5043
|
-
typeArguments?: Array<TypeTag | string>;
|
|
5044
|
-
functionArguments: Array<EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes>;
|
|
5045
|
-
abi?: EntryFunctionABI;
|
|
5046
|
-
};
|
|
5047
|
-
type InputGenerateTransactionPayloadDataWithABI = InputEntryFunctionDataWithABI | InputMultiSigDataWithABI;
|
|
5048
|
-
type InputEntryFunctionDataWithABI = Omit<InputEntryFunctionData, "abi"> & {
|
|
5049
|
-
abi: EntryFunctionABI;
|
|
5050
|
-
};
|
|
5051
|
-
type InputMultiSigDataWithABI = {
|
|
5052
|
-
multisigAddress: AccountAddressInput;
|
|
5053
|
-
} & InputEntryFunctionDataWithABI;
|
|
5054
|
-
type InputEntryFunctionDataWithRemoteABI = InputEntryFunctionData & {
|
|
5055
|
-
aptosConfig: AptosConfig;
|
|
5056
|
-
};
|
|
5057
|
-
/**
|
|
5058
|
-
* The data needed to generate a Multi Sig payload
|
|
5059
|
-
*/
|
|
5060
|
-
type InputMultiSigData = {
|
|
5061
|
-
multisigAddress: AccountAddressInput;
|
|
5062
|
-
} & InputEntryFunctionData;
|
|
5063
|
-
/**
|
|
5064
|
-
* The data needed to generate a Multi Sig payload
|
|
5065
|
-
*/
|
|
5066
|
-
type InputMultiSigDataWithRemoteABI = {
|
|
5067
|
-
multisigAddress: AccountAddressInput;
|
|
5068
|
-
} & InputEntryFunctionDataWithRemoteABI;
|
|
4942
|
+
interface CreateAccountFromPrivateKeyArgs {
|
|
4943
|
+
privateKey: PrivateKey;
|
|
4944
|
+
address?: AccountAddressInput;
|
|
4945
|
+
legacy?: boolean;
|
|
4946
|
+
}
|
|
5069
4947
|
/**
|
|
5070
|
-
*
|
|
4948
|
+
* Arguments for generating an `Ed25519Account`.
|
|
4949
|
+
* This is the input type used by default.
|
|
5071
4950
|
*/
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
};
|
|
4951
|
+
interface GenerateEd25519AccountArgs {
|
|
4952
|
+
scheme?: SigningSchemeInput.Ed25519;
|
|
4953
|
+
legacy?: true;
|
|
4954
|
+
}
|
|
5077
4955
|
/**
|
|
5078
|
-
*
|
|
4956
|
+
* Arguments for generating an `SingleKeyAccount` with ah underlying `Ed25519PrivateKey`.
|
|
4957
|
+
* The `legacy` argument needs to be explicitly set to false,
|
|
4958
|
+
* otherwise an `Ed25519Account` will be returned instead.
|
|
5079
4959
|
*/
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
abi?: ViewFunctionABI;
|
|
5085
|
-
};
|
|
4960
|
+
interface GenerateEd25519SingleKeyAccountArgs {
|
|
4961
|
+
scheme?: SigningSchemeInput.Ed25519;
|
|
4962
|
+
legacy: false;
|
|
4963
|
+
}
|
|
5086
4964
|
/**
|
|
5087
|
-
*
|
|
4965
|
+
* Arguments for generating an `SingleKeyAccount` with any supported private key
|
|
4966
|
+
* that is not an `Ed25519PrivateKey`.
|
|
4967
|
+
* The `legacy` argument defaults to false and cannot be explicitly set to true.
|
|
5088
4968
|
*/
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
4969
|
+
interface GenerateSingleKeyAccountArgs {
|
|
4970
|
+
scheme: Exclude<SigningSchemeInput, SigningSchemeInput.Ed25519>;
|
|
4971
|
+
legacy?: false;
|
|
4972
|
+
}
|
|
5092
4973
|
/**
|
|
5093
|
-
*
|
|
4974
|
+
* Arguments for generating an opaque `Account`.
|
|
4975
|
+
* This is used when the input signature scheme is not known at compilation time.
|
|
5094
4976
|
*/
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
4977
|
+
interface GenerateAccountArgs {
|
|
4978
|
+
scheme?: SigningSchemeInput;
|
|
4979
|
+
legacy?: boolean;
|
|
4980
|
+
}
|
|
5098
4981
|
/**
|
|
5099
|
-
*
|
|
4982
|
+
* Arguments for deriving a private key from a mnemonic phrase and a BIP44 path.
|
|
5100
4983
|
*/
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
}
|
|
4984
|
+
interface PrivateKeyFromDerivationPathArgs {
|
|
4985
|
+
path: string;
|
|
4986
|
+
mnemonic: string;
|
|
4987
|
+
}
|
|
5105
4988
|
/**
|
|
5106
|
-
* Interface
|
|
4989
|
+
* Interface for a generic Aptos account.
|
|
5107
4990
|
*
|
|
5108
|
-
*
|
|
4991
|
+
* The interface is defined as abstract class to provide a single entrypoint for account generation,
|
|
4992
|
+
* either through `Account.generate()` or `Account.fromDerivationPath`.
|
|
4993
|
+
* Despite this being an abstract class, it should be treated as an interface and enforced using
|
|
4994
|
+
* the `implements` keyword.
|
|
4995
|
+
*
|
|
4996
|
+
* Note: Generating an account instance does not create the account on-chain.
|
|
5109
4997
|
*/
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
4998
|
+
declare abstract class Account$1 {
|
|
4999
|
+
/**
|
|
5000
|
+
* Public key associated with the account
|
|
5001
|
+
*/
|
|
5002
|
+
abstract readonly publicKey: AccountPublicKey;
|
|
5003
|
+
/**
|
|
5004
|
+
* Account address associated with the account
|
|
5005
|
+
*/
|
|
5006
|
+
abstract readonly accountAddress: AccountAddress;
|
|
5007
|
+
/**
|
|
5008
|
+
* Signing scheme used to sign transactions
|
|
5009
|
+
*/
|
|
5010
|
+
abstract signingScheme: SigningScheme;
|
|
5011
|
+
/**
|
|
5012
|
+
* Derives an account from a randomly generated private key.
|
|
5013
|
+
* @param args.scheme The signature scheme to use, to generate the private key
|
|
5014
|
+
* @param args.legacy Whether to use a legacy authentication scheme, when applicable
|
|
5015
|
+
* @returns An account compatible with the provided signature scheme
|
|
5016
|
+
*/
|
|
5017
|
+
static generate(args?: GenerateEd25519AccountArgs): Ed25519Account;
|
|
5018
|
+
static generate(args: GenerateEd25519SingleKeyAccountArgs): SingleKeyAccount;
|
|
5019
|
+
static generate(args: GenerateSingleKeyAccountArgs): SingleKeyAccount;
|
|
5020
|
+
static generate(args: GenerateAccountArgs): Account$1;
|
|
5021
|
+
/**
|
|
5022
|
+
* Creates an account from the provided private key.
|
|
5023
|
+
*
|
|
5024
|
+
* @param args.privateKey a valid private key
|
|
5025
|
+
* @param args.address the account's address. If not provided, it will be derived from the public key.
|
|
5026
|
+
* @param args.legacy Whether to use a legacy authentication scheme, when applicable
|
|
5027
|
+
*/
|
|
5028
|
+
static fromPrivateKey(args: CreateEd25519AccountFromPrivateKeyArgs): Ed25519Account;
|
|
5029
|
+
static fromPrivateKey(args: CreateEd25519SingleKeyAccountFromPrivateKeyArgs): SingleKeyAccount;
|
|
5030
|
+
static fromPrivateKey(args: CreateSingleKeyAccountFromPrivateKeyArgs): SingleKeyAccount;
|
|
5031
|
+
static fromPrivateKey(args: CreateAccountFromPrivateKeyArgs): Account$1;
|
|
5032
|
+
/**
|
|
5033
|
+
* @deprecated use `fromPrivateKey` instead.
|
|
5034
|
+
* Instantiates an account given a private key and a specified account address.
|
|
5035
|
+
* This is primarily used to instantiate an `Account` that has had its authentication key rotated.
|
|
5036
|
+
*
|
|
5037
|
+
* @param args.privateKey PrivateKey - the underlying private key for the account
|
|
5038
|
+
* @param args.address AccountAddress - The account address the `Account` will sign for
|
|
5039
|
+
* @param args.legacy optional. If set to false, the keypair generated is a Unified keypair. Defaults
|
|
5040
|
+
* to generating a Legacy Ed25519 keypair
|
|
5041
|
+
*
|
|
5042
|
+
* @returns Account
|
|
5043
|
+
*/
|
|
5044
|
+
static fromPrivateKeyAndAddress(args: CreateAccountFromPrivateKeyArgs): Account$1;
|
|
5045
|
+
/**
|
|
5046
|
+
* Derives an account with bip44 path and mnemonics
|
|
5047
|
+
*
|
|
5048
|
+
* @param args.scheme The signature scheme to derive the private key with
|
|
5049
|
+
* @param args.path the BIP44 derive hardened path (e.g. m/44'/637'/0'/0'/0') for Ed25519,
|
|
5050
|
+
* or non-hardened path (e.g. m/44'/637'/0'/0/0) for secp256k1
|
|
5051
|
+
* Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
|
|
5052
|
+
* @param args.mnemonic the mnemonic seed phrase of the account
|
|
5053
|
+
*/
|
|
5054
|
+
static fromDerivationPath(args: GenerateEd25519AccountArgs & PrivateKeyFromDerivationPathArgs): Ed25519Account;
|
|
5055
|
+
static fromDerivationPath(args: GenerateEd25519SingleKeyAccountArgs & PrivateKeyFromDerivationPathArgs): SingleKeyAccount;
|
|
5056
|
+
static fromDerivationPath(args: GenerateSingleKeyAccountArgs & PrivateKeyFromDerivationPathArgs): SingleKeyAccount;
|
|
5057
|
+
static fromDerivationPath(args: GenerateAccountArgs & PrivateKeyFromDerivationPathArgs): Account$1;
|
|
5058
|
+
/**
|
|
5059
|
+
* @deprecated use `publicKey.authKey()` instead.
|
|
5060
|
+
* This key enables account owners to rotate their private key(s)
|
|
5061
|
+
* associated with the account without changing the address that hosts their account.
|
|
5062
|
+
* See here for more info: {@link https://aptos.dev/concepts/accounts#single-signer-authentication}
|
|
5063
|
+
*
|
|
5064
|
+
* @param args.publicKey PublicKey - public key of the account
|
|
5065
|
+
* @returns The authentication key for the associated account
|
|
5066
|
+
*/
|
|
5067
|
+
static authKey(args: {
|
|
5068
|
+
publicKey: AccountPublicKey;
|
|
5069
|
+
}): AuthenticationKey;
|
|
5070
|
+
/**
|
|
5071
|
+
* Sign a transaction using the available signing capabilities.
|
|
5072
|
+
* @param transaction the raw transaction
|
|
5073
|
+
* @return the AccountAuthenticator containing the signature og the transaction, together with the account's public key
|
|
5074
|
+
*/
|
|
5075
|
+
abstract signWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticator;
|
|
5076
|
+
/**
|
|
5077
|
+
* Sign the given message with the private key.
|
|
5078
|
+
* @param message in HexInput format
|
|
5079
|
+
* @returns AccountSignature
|
|
5080
|
+
*/
|
|
5081
|
+
abstract sign(message: HexInput): Signature;
|
|
5082
|
+
abstract signTransaction(transaction: AnyRawTransaction): Signature;
|
|
5083
|
+
/**
|
|
5084
|
+
* @param args.message raw message data in HexInput format
|
|
5085
|
+
* @param args.signature signed message signature
|
|
5086
|
+
*/
|
|
5087
|
+
verifySignature(args: VerifySignatureArgs): boolean;
|
|
5088
|
+
}
|
|
5089
|
+
|
|
5090
|
+
interface Ed25519SignerConstructorArgs {
|
|
5091
|
+
privateKey: Ed25519PrivateKey;
|
|
5092
|
+
address?: AccountAddressInput;
|
|
5093
|
+
}
|
|
5094
|
+
interface Ed25519SignerFromDerivationPathArgs {
|
|
5095
|
+
path: string;
|
|
5096
|
+
mnemonic: string;
|
|
5097
|
+
}
|
|
5098
|
+
interface VerifyEd25519SignatureArgs {
|
|
5099
|
+
message: HexInput;
|
|
5100
|
+
signature: Ed25519Signature;
|
|
5101
|
+
}
|
|
5113
5102
|
/**
|
|
5114
|
-
*
|
|
5103
|
+
* Signer implementation for the Ed25519 authentication scheme.
|
|
5104
|
+
* This extends an {@link Ed25519Account} by adding signing capabilities through an {@link Ed25519PrivateKey}.
|
|
5115
5105
|
*
|
|
5116
|
-
*
|
|
5106
|
+
* Note: Generating a signer instance does not create the account on-chain.
|
|
5117
5107
|
*/
|
|
5118
|
-
|
|
5119
|
-
|
|
5108
|
+
declare class Ed25519Account implements Account$1 {
|
|
5109
|
+
/**
|
|
5110
|
+
* Private key associated with the account
|
|
5111
|
+
*/
|
|
5112
|
+
readonly privateKey: Ed25519PrivateKey;
|
|
5113
|
+
readonly publicKey: Ed25519PublicKey;
|
|
5114
|
+
readonly accountAddress: AccountAddress;
|
|
5115
|
+
readonly signingScheme = SigningScheme.Ed25519;
|
|
5116
|
+
constructor(args: Ed25519SignerConstructorArgs);
|
|
5117
|
+
/**
|
|
5118
|
+
* Derives a signer from a randomly generated private key
|
|
5119
|
+
*/
|
|
5120
|
+
static generate(): Ed25519Account;
|
|
5121
|
+
/**
|
|
5122
|
+
* Derives an account with bip44 path and mnemonics
|
|
5123
|
+
*
|
|
5124
|
+
* @param args.path the BIP44 derive hardened path e.g. m/44'/637'/0'/0'/0'
|
|
5125
|
+
* Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
|
|
5126
|
+
* @param args.mnemonic the mnemonic seed phrase of the account
|
|
5127
|
+
*/
|
|
5128
|
+
static fromDerivationPath(args: Ed25519SignerFromDerivationPathArgs): Ed25519Account;
|
|
5129
|
+
verifySignature(args: VerifyEd25519SignatureArgs): boolean;
|
|
5130
|
+
signWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorEd25519;
|
|
5131
|
+
sign(message: HexInput): Ed25519Signature;
|
|
5132
|
+
signTransaction(transaction: AnyRawTransaction): Ed25519Signature;
|
|
5133
|
+
}
|
|
5134
|
+
|
|
5135
|
+
declare class EphemeralKeyPair extends Serializable {
|
|
5136
|
+
readonly blinder: Uint8Array;
|
|
5137
|
+
readonly expiryDateSecs: bigint | number;
|
|
5138
|
+
readonly nonce: string;
|
|
5139
|
+
private privateKey;
|
|
5140
|
+
private publicKey;
|
|
5141
|
+
constructor(args: {
|
|
5142
|
+
privateKey: PrivateKey;
|
|
5143
|
+
expiryDateSecs?: bigint | number;
|
|
5144
|
+
blinder?: HexInput;
|
|
5145
|
+
});
|
|
5146
|
+
getPublicKey(): EphemeralPublicKey;
|
|
5147
|
+
isExpired(): boolean;
|
|
5148
|
+
serialize(serializer: Serializer): void;
|
|
5149
|
+
static deserialize(deserializer: Deserializer): EphemeralKeyPair;
|
|
5150
|
+
static fromBytes(bytes: Uint8Array): EphemeralKeyPair;
|
|
5151
|
+
static generate(args?: {
|
|
5152
|
+
scheme: SigningSchemeInput;
|
|
5153
|
+
}): EphemeralKeyPair;
|
|
5154
|
+
generateNonce(): string;
|
|
5155
|
+
/**
|
|
5156
|
+
* Sign the given message with the private key.
|
|
5157
|
+
* *
|
|
5158
|
+
* @param data in HexInput format
|
|
5159
|
+
* @returns EphemeralSignature
|
|
5160
|
+
*/
|
|
5161
|
+
sign(data: HexInput): EphemeralSignature;
|
|
5162
|
+
}
|
|
5163
|
+
|
|
5164
|
+
type ProofFetchSuccess = {
|
|
5165
|
+
status: "Success";
|
|
5120
5166
|
};
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5167
|
+
type ProofFetchFailure = {
|
|
5168
|
+
status: "Failed";
|
|
5169
|
+
error: string;
|
|
5170
|
+
};
|
|
5171
|
+
type ProofFetchStatus = ProofFetchSuccess | ProofFetchFailure;
|
|
5172
|
+
type ProofFetchCallback = (status: ProofFetchStatus) => Promise<void>;
|
|
5173
|
+
interface ProofFetchEvents {
|
|
5174
|
+
proofFetchFinish: (status: ProofFetchStatus) => void;
|
|
5175
|
+
}
|
|
5176
|
+
declare class KeylessAccount implements Account$1 {
|
|
5177
|
+
static readonly PEPPER_LENGTH: number;
|
|
5178
|
+
static readonly SLIP_0010_SEED: string;
|
|
5179
|
+
publicKey: KeylessPublicKey;
|
|
5180
|
+
ephemeralKeyPair: EphemeralKeyPair;
|
|
5181
|
+
uidKey: string;
|
|
5182
|
+
uidVal: string;
|
|
5183
|
+
aud: string;
|
|
5184
|
+
pepper: Uint8Array;
|
|
5185
|
+
accountAddress: AccountAddress;
|
|
5186
|
+
proof: SignedGroth16Signature | undefined;
|
|
5187
|
+
proofOrPromise: SignedGroth16Signature | Promise<SignedGroth16Signature>;
|
|
5188
|
+
signingScheme: SigningScheme;
|
|
5189
|
+
jwt: string;
|
|
5190
|
+
emitter: EventEmitter<ProofFetchEvents>;
|
|
5191
|
+
constructor(args: {
|
|
5192
|
+
address?: AccountAddress;
|
|
5193
|
+
ephemeralKeyPair: EphemeralKeyPair;
|
|
5194
|
+
iss: string;
|
|
5195
|
+
uidKey: string;
|
|
5196
|
+
uidVal: string;
|
|
5197
|
+
aud: string;
|
|
5198
|
+
pepper: HexInput;
|
|
5199
|
+
proofOrFetcher: SignedGroth16Signature | Promise<SignedGroth16Signature>;
|
|
5200
|
+
proofFetchCallback?: ProofFetchCallback;
|
|
5201
|
+
jwt: string;
|
|
5202
|
+
});
|
|
5203
|
+
init(promise: Promise<SignedGroth16Signature>): Promise<void>;
|
|
5204
|
+
serialize(serializer: Serializer): void;
|
|
5205
|
+
static deserialize(deserializer: Deserializer): KeylessAccount;
|
|
5206
|
+
isExpired(): boolean;
|
|
5207
|
+
bcsToBytes(): Uint8Array;
|
|
5208
|
+
bcsToHex(): Hex;
|
|
5209
|
+
signWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorSingleKey;
|
|
5210
|
+
waitForProofFetch(): Promise<void>;
|
|
5211
|
+
sign(data: HexInput): Signature;
|
|
5212
|
+
signTransaction(transaction: AnyRawTransaction): Signature;
|
|
5213
|
+
signWithOpenIdSignature(data: HexInput): Signature;
|
|
5214
|
+
verifySignature(args: {
|
|
5215
|
+
message: HexInput;
|
|
5216
|
+
signature: Signature;
|
|
5217
|
+
}): boolean;
|
|
5218
|
+
static fromBytes(bytes: Uint8Array): KeylessAccount;
|
|
5219
|
+
static fromJWTAndProof(args: {
|
|
5220
|
+
proof: SignedGroth16Signature | Promise<SignedGroth16Signature>;
|
|
5221
|
+
jwt: string;
|
|
5222
|
+
ephemeralKeyPair: EphemeralKeyPair;
|
|
5223
|
+
pepper: HexInput;
|
|
5224
|
+
uidKey?: string;
|
|
5225
|
+
proofFetchCallback?: ProofFetchCallback;
|
|
5226
|
+
}): KeylessAccount;
|
|
5227
|
+
static fromDerivationPath(path: string, seed: Uint8Array): Uint8Array;
|
|
5131
5228
|
}
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5229
|
+
|
|
5230
|
+
declare class MultiKeyAccount implements Account$1 {
|
|
5231
|
+
/**
|
|
5232
|
+
* Public key associated with the account
|
|
5233
|
+
*/
|
|
5234
|
+
readonly publicKey: MultiKey;
|
|
5235
|
+
/**
|
|
5236
|
+
* Account address associated with the account
|
|
5237
|
+
*/
|
|
5238
|
+
readonly accountAddress: AccountAddress;
|
|
5239
|
+
/**
|
|
5240
|
+
* Signing scheme used to sign transactions
|
|
5241
|
+
*/
|
|
5242
|
+
readonly signingScheme: SigningScheme;
|
|
5243
|
+
signers: Account$1[];
|
|
5244
|
+
signaturesBitmap: Uint8Array;
|
|
5245
|
+
/**
|
|
5246
|
+
* constructor for Account
|
|
5247
|
+
*
|
|
5248
|
+
* Need to update this to use the new crypto library if new schemes are added.
|
|
5249
|
+
*
|
|
5250
|
+
* @param args.privateKey PrivateKey - private key of the account
|
|
5251
|
+
* @param args.address AccountAddress - address of the account
|
|
5252
|
+
* @param args.legacy optional. If set to false, the keypair authentication keys will be derived with a unified scheme.
|
|
5253
|
+
* Defaults to deriving an authentication key with the legacy scheme.
|
|
5254
|
+
*
|
|
5255
|
+
* This method is private because it should only be called by the factory static methods.
|
|
5256
|
+
* @returns Account
|
|
5257
|
+
*/
|
|
5258
|
+
constructor(args: {
|
|
5259
|
+
multiKey: MultiKey;
|
|
5260
|
+
signers: Account$1[];
|
|
5261
|
+
});
|
|
5262
|
+
static fromPublicKeysAndSigners(args: {
|
|
5263
|
+
publicKeys: PublicKey[];
|
|
5264
|
+
signaturesRequired: number;
|
|
5265
|
+
signers: Account$1[];
|
|
5266
|
+
}): MultiKeyAccount;
|
|
5267
|
+
static isMultiKeySigner(account: Account$1): account is MultiKeyAccount;
|
|
5268
|
+
signWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorMultiKey;
|
|
5269
|
+
waitForProofFetch(): Promise<void>;
|
|
5270
|
+
/**
|
|
5271
|
+
* Sign the given message with the private key.
|
|
5272
|
+
*
|
|
5273
|
+
* TODO: Add sign transaction or specific types
|
|
5274
|
+
*
|
|
5275
|
+
* @param data in HexInput format
|
|
5276
|
+
* @returns Signature
|
|
5277
|
+
*/
|
|
5278
|
+
sign(data: HexInput): MultiSignature;
|
|
5279
|
+
signTransaction(transaction: AnyRawTransaction): MultiSignature;
|
|
5280
|
+
/**
|
|
5281
|
+
* Verify the given message and signature with the public key.
|
|
5282
|
+
*
|
|
5283
|
+
* @param args.message raw message data in HexInput format
|
|
5284
|
+
* @param args.signature signed message Signature
|
|
5285
|
+
* @returns
|
|
5286
|
+
*/
|
|
5287
|
+
verifySignature(args: {
|
|
5288
|
+
message: HexInput;
|
|
5289
|
+
signature: Signature;
|
|
5290
|
+
}): boolean;
|
|
5143
5291
|
}
|
|
5292
|
+
|
|
5144
5293
|
/**
|
|
5145
|
-
*
|
|
5146
|
-
*/
|
|
5147
|
-
type InputGenerateRawTransactionArgs = InputGenerateSingleSignerRawTransactionArgs | InputGenerateMultiAgentRawTransactionArgs;
|
|
5148
|
-
/**
|
|
5149
|
-
* Unified type that holds all the return interfaces when generating different transaction types
|
|
5294
|
+
* A class to query all `Account` related queries on Aptos.
|
|
5150
5295
|
*/
|
|
5151
|
-
|
|
5152
|
-
|
|
5296
|
+
declare class Account {
|
|
5297
|
+
readonly config: AptosConfig;
|
|
5298
|
+
constructor(config: AptosConfig);
|
|
5299
|
+
/**
|
|
5300
|
+
* Queries the current state for an Aptos account given its account address
|
|
5301
|
+
*
|
|
5302
|
+
* @param args.accountAddress Aptos account address
|
|
5303
|
+
*
|
|
5304
|
+
* @returns The account data
|
|
5305
|
+
*
|
|
5306
|
+
* @example An example of the returned account
|
|
5307
|
+
* ```
|
|
5308
|
+
* {
|
|
5309
|
+
* sequence_number: "1",
|
|
5310
|
+
* authentication_key: "0x5307b5f4bc67829097a8ba9b43dba3b88261eeccd1f709d9bde240fc100fbb69"
|
|
5311
|
+
* }
|
|
5312
|
+
* ```
|
|
5313
|
+
*/
|
|
5314
|
+
getAccountInfo(args: {
|
|
5315
|
+
accountAddress: AccountAddressInput;
|
|
5316
|
+
}): Promise<AccountData>;
|
|
5317
|
+
/**
|
|
5318
|
+
* Queries for all modules in an account given an account address
|
|
5319
|
+
*
|
|
5320
|
+
* Note: In order to get all account modules, this function may call the API
|
|
5321
|
+
* multiple times as it auto paginates.
|
|
5322
|
+
*
|
|
5323
|
+
* @param args.accountAddress Aptos account address
|
|
5324
|
+
* @param args.options.offset The number module to start returning results from
|
|
5325
|
+
* @param args.options.limit The number of results to return
|
|
5326
|
+
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
5327
|
+
*
|
|
5328
|
+
* @returns Account modules
|
|
5329
|
+
*/
|
|
5330
|
+
getAccountModules(args: {
|
|
5331
|
+
accountAddress: AccountAddressInput;
|
|
5332
|
+
options?: PaginationArgs & LedgerVersionArg;
|
|
5333
|
+
}): Promise<MoveModuleBytecode[]>;
|
|
5334
|
+
/**
|
|
5335
|
+
* Queries for a specific account module given account address and module name
|
|
5336
|
+
*
|
|
5337
|
+
* @param args.accountAddress Aptos account address
|
|
5338
|
+
* @param args.moduleName The name of the module
|
|
5339
|
+
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
5340
|
+
*
|
|
5341
|
+
* @returns Account module
|
|
5342
|
+
*
|
|
5343
|
+
* @example
|
|
5344
|
+
* const module = await aptos.getAccountModule({accountAddress:"0x456"})
|
|
5345
|
+
* // An example of an account module response
|
|
5346
|
+
* ```
|
|
5347
|
+
* {
|
|
5348
|
+
* bytecode: "0xa11ceb0b0600000006010002030206050807070f0d081c200",
|
|
5349
|
+
* abi: { address: "0x1" }
|
|
5350
|
+
* }
|
|
5351
|
+
* ```
|
|
5352
|
+
*/
|
|
5353
|
+
getAccountModule(args: {
|
|
5354
|
+
accountAddress: AccountAddressInput;
|
|
5355
|
+
moduleName: string;
|
|
5356
|
+
options?: LedgerVersionArg;
|
|
5357
|
+
}): Promise<MoveModuleBytecode>;
|
|
5358
|
+
/**
|
|
5359
|
+
* Queries account transactions given an account address
|
|
5360
|
+
*
|
|
5361
|
+
* Note: In order to get all account transactions, this function may call the API
|
|
5362
|
+
* multiple times as it auto paginates.
|
|
5363
|
+
*
|
|
5364
|
+
* @example
|
|
5365
|
+
* const transactions = await aptos.getAccountTransactions({accountAddress:"0x456"})
|
|
5366
|
+
*
|
|
5367
|
+
* @param args.accountAddress Aptos account address
|
|
5368
|
+
* @param args.options.offset The number transaction to start returning results from
|
|
5369
|
+
* @param args.options.limit The number of results to return
|
|
5370
|
+
*
|
|
5371
|
+
* @returns The account transactions
|
|
5372
|
+
*/
|
|
5373
|
+
getAccountTransactions(args: {
|
|
5374
|
+
accountAddress: AccountAddressInput;
|
|
5375
|
+
options?: PaginationArgs;
|
|
5376
|
+
}): Promise<TransactionResponse[]>;
|
|
5377
|
+
/**
|
|
5378
|
+
* Queries all account resources given an account address
|
|
5379
|
+
*
|
|
5380
|
+
* Note: In order to get all account resources, this function may call the API
|
|
5381
|
+
* multiple times as it auto paginates.
|
|
5382
|
+
*
|
|
5383
|
+
* @example
|
|
5384
|
+
* const resources = await aptos.getAccountResources({accountAddress:"0x456"})
|
|
5385
|
+
*
|
|
5386
|
+
* @param args.accountAddress Aptos account address
|
|
5387
|
+
* @param args.options.offset The number resource to start returning results from
|
|
5388
|
+
* @param args.options.limit The number of results to return
|
|
5389
|
+
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
5390
|
+
* @returns Account resources
|
|
5391
|
+
*/
|
|
5392
|
+
getAccountResources(args: {
|
|
5393
|
+
accountAddress: AccountAddressInput;
|
|
5394
|
+
options?: PaginationArgs & LedgerVersionArg;
|
|
5395
|
+
}): Promise<MoveResource[]>;
|
|
5396
|
+
/**
|
|
5397
|
+
* Queries a specific account resource given account address and resource type. Note that the default is `any` in order
|
|
5398
|
+
* to allow for ease of accessing properties of the object.
|
|
5399
|
+
*
|
|
5400
|
+
* @type The typed output of the resource
|
|
5401
|
+
* @param args.accountAddress Aptos account address
|
|
5402
|
+
* @param args.resourceType String representation of an on-chain Move struct type, i.e "0x1::aptos_coin::AptosCoin"
|
|
5403
|
+
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
5404
|
+
*
|
|
5405
|
+
* @returns Account resource
|
|
5406
|
+
*
|
|
5407
|
+
* @example
|
|
5408
|
+
* const resource = await aptos.getAccountResource({accountAddress:"0x456"})
|
|
5409
|
+
*
|
|
5410
|
+
*/
|
|
5411
|
+
getAccountResource<T extends {} = any>(args: {
|
|
5412
|
+
accountAddress: AccountAddressInput;
|
|
5413
|
+
resourceType: MoveStructId;
|
|
5414
|
+
options?: LedgerVersionArg;
|
|
5415
|
+
}): Promise<T>;
|
|
5416
|
+
/**
|
|
5417
|
+
* Looks up the account address for a given authentication key
|
|
5418
|
+
*
|
|
5419
|
+
* This handles both if the account's authentication key has been rotated or not.
|
|
5420
|
+
*
|
|
5421
|
+
* @example
|
|
5422
|
+
* const accountAddress = await aptos.lookupOriginalAccountAddress({authenticationKey:account.accountAddress})
|
|
5423
|
+
*
|
|
5424
|
+
* @param args.authenticationKey The authentication key
|
|
5425
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5426
|
+
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
5427
|
+
* @returns Promise<AccountAddress> The accountAddress associated with the authentication key
|
|
5428
|
+
*/
|
|
5429
|
+
lookupOriginalAccountAddress(args: {
|
|
5430
|
+
authenticationKey: AccountAddressInput;
|
|
5431
|
+
minimumLedgerVersion?: AnyNumber;
|
|
5432
|
+
options?: LedgerVersionArg;
|
|
5433
|
+
}): Promise<AccountAddress>;
|
|
5434
|
+
/**
|
|
5435
|
+
* Queries the current count of tokens owned by an account
|
|
5436
|
+
*
|
|
5437
|
+
* @example
|
|
5438
|
+
* const tokensCount = await aptos.getAccountTokensCount({accountAddress:"0x456"})
|
|
5439
|
+
*
|
|
5440
|
+
* @param args.accountAddress The account address
|
|
5441
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5442
|
+
* @returns Current count of tokens owned by the account
|
|
5443
|
+
*/
|
|
5444
|
+
getAccountTokensCount(args: {
|
|
5445
|
+
accountAddress: AccountAddressInput;
|
|
5446
|
+
minimumLedgerVersion?: AnyNumber;
|
|
5447
|
+
}): Promise<number>;
|
|
5153
5448
|
/**
|
|
5154
|
-
*
|
|
5449
|
+
* Queries the account's current owned tokens.
|
|
5450
|
+
*
|
|
5451
|
+
* This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
|
|
5452
|
+
* If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
|
|
5453
|
+
*
|
|
5454
|
+
* @example
|
|
5455
|
+
* const accountOwnedTokens = await aptos.getAccountOwnedTokens({accountAddress:"0x456"})
|
|
5456
|
+
*
|
|
5457
|
+
* @param args.accountAddress The account address we want to get the tokens for
|
|
5458
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5459
|
+
* @param args.options.tokenStandard The NFT standard to query for
|
|
5460
|
+
* @param args.options.offset The number token to start returning results from
|
|
5461
|
+
* @param args.options.limit The number of results to return
|
|
5462
|
+
* @param args.options.orderBy The order to sort the tokens by
|
|
5463
|
+
* @returns Tokens array with the token data
|
|
5155
5464
|
*/
|
|
5156
|
-
|
|
5465
|
+
getAccountOwnedTokens(args: {
|
|
5466
|
+
accountAddress: AccountAddressInput;
|
|
5467
|
+
minimumLedgerVersion?: AnyNumber;
|
|
5468
|
+
options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensQueryResponse[0]>;
|
|
5469
|
+
}): Promise<GetAccountOwnedTokensQueryResponse>;
|
|
5157
5470
|
/**
|
|
5158
|
-
*
|
|
5471
|
+
* Queries all current tokens of a specific collection that an account owns by the collection address
|
|
5472
|
+
*
|
|
5473
|
+
* This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
|
|
5474
|
+
* If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
|
|
5475
|
+
*
|
|
5476
|
+
* @example
|
|
5477
|
+
* const accountOwnedTokens = await aptos.getAccountOwnedTokensFromCollectionAddress({accountAddress:"0x123", collectionAddress:"0x456"})
|
|
5478
|
+
*
|
|
5479
|
+
* @param args.accountAddress The account address we want to get the tokens for
|
|
5480
|
+
* @param args.collectionAddress The address of the collection being queried
|
|
5481
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5482
|
+
* @param args.options.tokenStandard The NFT standard to query for
|
|
5483
|
+
* @param args.options.offset The number token to start returning results from
|
|
5484
|
+
* @param args.options.limit The number of results to return
|
|
5485
|
+
* @param args.options.orderBy The order to sort the tokens by
|
|
5486
|
+
* @returns Tokens array with the token data
|
|
5159
5487
|
*/
|
|
5160
|
-
|
|
5488
|
+
getAccountOwnedTokensFromCollectionAddress(args: {
|
|
5489
|
+
accountAddress: AccountAddressInput;
|
|
5490
|
+
collectionAddress: AccountAddressInput;
|
|
5491
|
+
minimumLedgerVersion?: AnyNumber;
|
|
5492
|
+
options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensFromCollectionResponse[0]>;
|
|
5493
|
+
}): Promise<GetAccountOwnedTokensFromCollectionResponse>;
|
|
5161
5494
|
/**
|
|
5162
|
-
*
|
|
5495
|
+
* Queries for all collections that an account currently has tokens for.
|
|
5496
|
+
*
|
|
5497
|
+
* This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
|
|
5498
|
+
* If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
|
|
5499
|
+
*
|
|
5500
|
+
* @example
|
|
5501
|
+
* const accountCollectionsWithOwnedTokens = await aptos.getAccountCollectionsWithOwnedTokens({accountAddress:"0x123"})
|
|
5502
|
+
*
|
|
5503
|
+
* @param args.accountAddress The account address we want to get the collections for
|
|
5504
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5505
|
+
* @param args.options.tokenStandard The NFT standard to query for
|
|
5506
|
+
* @param args.options.offset The number collection to start returning results from
|
|
5507
|
+
* @param args.options.limit The number of results to return
|
|
5508
|
+
* @param args.options.orderBy The order to sort the tokens by
|
|
5509
|
+
* @returns Collections array with the collections data
|
|
5163
5510
|
*/
|
|
5164
|
-
|
|
5511
|
+
getAccountCollectionsWithOwnedTokens(args: {
|
|
5512
|
+
accountAddress: AccountAddressInput;
|
|
5513
|
+
minimumLedgerVersion?: AnyNumber;
|
|
5514
|
+
options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountCollectionsWithOwnedTokenResponse[0]>;
|
|
5515
|
+
}): Promise<GetAccountCollectionsWithOwnedTokenResponse>;
|
|
5165
5516
|
/**
|
|
5166
|
-
*
|
|
5517
|
+
* Queries the current count of transactions submitted by an account
|
|
5518
|
+
*
|
|
5519
|
+
* @example
|
|
5520
|
+
* const accountTransactionsCount = await aptos.getAccountTransactionsCount({accountAddress:"0x123"})
|
|
5521
|
+
*
|
|
5522
|
+
* @param args.accountAddress The account address we want to get the total count for
|
|
5523
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5524
|
+
* @returns Current count of transactions made by an account
|
|
5167
5525
|
*/
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
}
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5526
|
+
getAccountTransactionsCount(args: {
|
|
5527
|
+
accountAddress: AccountAddressInput;
|
|
5528
|
+
minimumLedgerVersion?: AnyNumber;
|
|
5529
|
+
}): Promise<number>;
|
|
5530
|
+
/**
|
|
5531
|
+
* Queries an account's coins data
|
|
5532
|
+
*
|
|
5533
|
+
* @example
|
|
5534
|
+
* const accountCoinsData = await aptos.getAccountCoinsData({accountAddress:"0x123"})
|
|
5535
|
+
*
|
|
5536
|
+
* @param args.accountAddress The account address we want to get the coins data for
|
|
5537
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5538
|
+
* @param args.options.offset optional. The number coin to start returning results from
|
|
5539
|
+
* @param args.options.limit optional. The number of results to return
|
|
5540
|
+
* @param args.options.orderBy optional. The order to sort the coins by
|
|
5541
|
+
* @param args.options.where optional. Filter the results by
|
|
5542
|
+
* @returns Array with the coins data
|
|
5543
|
+
*/
|
|
5544
|
+
getAccountCoinsData(args: {
|
|
5545
|
+
accountAddress: AccountAddressInput;
|
|
5546
|
+
minimumLedgerVersion?: AnyNumber;
|
|
5547
|
+
options?: PaginationArgs & OrderByArg<GetAccountCoinsDataResponse[0]> & WhereArg<CurrentFungibleAssetBalancesBoolExp>;
|
|
5548
|
+
}): Promise<GetAccountCoinsDataResponse>;
|
|
5549
|
+
/**
|
|
5550
|
+
* Queries the current count of an account's coins aggregated
|
|
5551
|
+
*
|
|
5552
|
+
* @example
|
|
5553
|
+
* const accountCoinsCount = await aptos.getAccountCoinsCount({accountAddress:"0x123"})
|
|
5554
|
+
*
|
|
5555
|
+
* @param args.accountAddress The account address we want to get the total count for
|
|
5556
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5557
|
+
* @returns Current count of the aggregated count of all account's coins
|
|
5558
|
+
*/
|
|
5559
|
+
getAccountCoinsCount(args: {
|
|
5560
|
+
accountAddress: AccountAddressInput;
|
|
5561
|
+
minimumLedgerVersion?: AnyNumber;
|
|
5562
|
+
}): Promise<number>;
|
|
5563
|
+
/**
|
|
5564
|
+
* Queries the account's APT amount
|
|
5565
|
+
*
|
|
5566
|
+
* @example
|
|
5567
|
+
* const accountAPTAmount = await aptos.getAccountAPTAmount({accountAddress:"0x123"})
|
|
5568
|
+
*
|
|
5569
|
+
* @param args.accountAddress The account address we want to get the total count for
|
|
5570
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5571
|
+
* @returns Current amount of account's APT
|
|
5572
|
+
*/
|
|
5573
|
+
getAccountAPTAmount(args: {
|
|
5574
|
+
accountAddress: AccountAddressInput;
|
|
5575
|
+
minimumLedgerVersion?: AnyNumber;
|
|
5576
|
+
}): Promise<number>;
|
|
5577
|
+
/**
|
|
5578
|
+
* Queries the account's coin amount by the coin type
|
|
5579
|
+
*
|
|
5580
|
+
* @example
|
|
5581
|
+
* const accountCoinAmount = await aptos.getAccountCoinAmount({accountAddress:"0x123", coinType:"0x1::aptos_coin::AptosCoin"})
|
|
5582
|
+
*
|
|
5583
|
+
* @param args.accountAddress The account address we want to get the total count for
|
|
5584
|
+
* @param args.coinType The coin type to query
|
|
5585
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5586
|
+
* @returns Current amount of account's coin
|
|
5587
|
+
*/
|
|
5588
|
+
getAccountCoinAmount(args: {
|
|
5589
|
+
accountAddress: AccountAddressInput;
|
|
5590
|
+
coinType: MoveStructId;
|
|
5591
|
+
minimumLedgerVersion?: AnyNumber;
|
|
5592
|
+
}): Promise<number>;
|
|
5593
|
+
/**
|
|
5594
|
+
* Queries an account's owned objects
|
|
5595
|
+
*
|
|
5596
|
+
* @example
|
|
5597
|
+
* const accountOwnedObjects = await aptos.getAccountOwnedObjects({accountAddress:"0x123"})
|
|
5598
|
+
*
|
|
5599
|
+
* @param args.accountAddress The account address we want to get the objects for
|
|
5600
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
5601
|
+
* @param args.options.offset The starting position to start returning results from
|
|
5602
|
+
* @param args.options.limit The number of results to return
|
|
5603
|
+
* @param args.options.orderBy The order to sort the objects by
|
|
5604
|
+
* @returns Objects array with the object data
|
|
5605
|
+
*/
|
|
5606
|
+
getAccountOwnedObjects(args: {
|
|
5607
|
+
accountAddress: AccountAddressInput;
|
|
5608
|
+
minimumLedgerVersion?: AnyNumber;
|
|
5609
|
+
options?: PaginationArgs & OrderByArg<GetAccountOwnedObjectsResponse[0]>;
|
|
5610
|
+
}): Promise<GetAccountOwnedObjectsResponse>;
|
|
5611
|
+
/**
|
|
5612
|
+
* Derives an account by providing a private key.
|
|
5613
|
+
* This functions resolves the provided private key type and derives the public key from it.
|
|
5614
|
+
*
|
|
5615
|
+
* If the privateKey is a Secp256k1 type, it derives the account using the derived public key and
|
|
5616
|
+
* auth key using the SingleKey scheme locally.
|
|
5617
|
+
*
|
|
5618
|
+
* If the privateKey is a ED25519 type, it looks up the authentication key on chain, and uses it to resolve
|
|
5619
|
+
* whether it is a Legacy ED25519 key or a Unified ED25519 key. It then derives the account based
|
|
5620
|
+
* on that.
|
|
5621
|
+
*
|
|
5622
|
+
* @example
|
|
5623
|
+
* const account = await aptos.deriveAccountFromPrivateKey({privateKey:new Ed25519PrivateKey("0x123")})
|
|
5624
|
+
*
|
|
5625
|
+
* @param args.privateKey An account private key
|
|
5626
|
+
* @returns Account type
|
|
5627
|
+
*/
|
|
5628
|
+
deriveAccountFromPrivateKey(args: {
|
|
5629
|
+
privateKey: PrivateKey;
|
|
5630
|
+
}): Promise<Account$1>;
|
|
5208
5631
|
}
|
|
5209
5632
|
|
|
5210
5633
|
/**
|
|
@@ -5992,18 +6415,6 @@ declare function buildTransaction(args: InputGenerateMultiAgentRawTransactionArg
|
|
|
5992
6415
|
*/
|
|
5993
6416
|
declare function generateSignedTransactionForSimulation(args: InputSimulateTransactionData): Uint8Array;
|
|
5994
6417
|
declare function getAuthenticatorForSimulation(publicKey: PublicKey): AccountAuthenticatorEd25519 | AccountAuthenticatorSingleKey;
|
|
5995
|
-
/**
|
|
5996
|
-
* Sign a transaction that can later be submitted to chain
|
|
5997
|
-
*
|
|
5998
|
-
* @param args.signer The signer account to sign the transaction
|
|
5999
|
-
* @param args.transaction A aptos transaction type to sign
|
|
6000
|
-
*
|
|
6001
|
-
* @return The signer AccountAuthenticator
|
|
6002
|
-
*/
|
|
6003
|
-
declare function sign(args: {
|
|
6004
|
-
signer: Account$1;
|
|
6005
|
-
transaction: AnyRawTransaction;
|
|
6006
|
-
}): AccountAuthenticator;
|
|
6007
6418
|
/**
|
|
6008
6419
|
* Prepare a transaction to be submitted to chain
|
|
6009
6420
|
*
|
|
@@ -6025,14 +6436,15 @@ declare function hashValues(input: (Uint8Array | string)[]): Uint8Array;
|
|
|
6025
6436
|
*/
|
|
6026
6437
|
declare function generateUserTransactionHash(args: InputSubmitTransactionData): string;
|
|
6027
6438
|
/**
|
|
6028
|
-
*
|
|
6439
|
+
* Generate a multi signers signed transaction that can be submitted to chain
|
|
6029
6440
|
*
|
|
6030
|
-
* @param transaction
|
|
6441
|
+
* @param transaction MultiAgentRawTransaction | FeePayerRawTransaction
|
|
6442
|
+
* @param senderAuthenticator The account authenticator of the transaction sender
|
|
6443
|
+
* @param secondarySignerAuthenticators The extra signers account Authenticators
|
|
6031
6444
|
*
|
|
6032
|
-
* @returns
|
|
6445
|
+
* @returns A SignedTransaction
|
|
6033
6446
|
*/
|
|
6034
|
-
declare function
|
|
6035
|
-
declare function generateSigningMessage(transaction: AnyRawTransaction): Uint8Array;
|
|
6447
|
+
declare function generateMultiSignersSignedTransaction(transaction: MultiAgentRawTransaction | FeePayerRawTransaction, senderAuthenticator: AccountAuthenticator, feePayerAuthenticator?: AccountAuthenticator, additionalSignersAuthenticators?: Array<AccountAuthenticator>): Uint8Array;
|
|
6036
6448
|
|
|
6037
6449
|
/**
|
|
6038
6450
|
* Convert type arguments to only type tags, allowing for string representations of type tags
|
|
@@ -6074,6 +6486,18 @@ declare function fetchViewFunctionAbi(moduleAddress: string, moduleName: string,
|
|
|
6074
6486
|
declare function convertArgument(functionName: string, functionAbi: FunctionABI, arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes, position: number, genericTypeParams: Array<TypeTag>): EntryFunctionArgumentTypes;
|
|
6075
6487
|
declare function checkOrConvertArgument(arg: SimpleEntryFunctionArgumentTypes | EntryFunctionArgumentTypes, param: TypeTag, position: number, genericTypeParams: Array<TypeTag>): EntryFunctionArgumentTypes;
|
|
6076
6488
|
|
|
6489
|
+
/**
|
|
6490
|
+
* Derive the raw transaction type - FeePayerRawTransaction or MultiAgentRawTransaction or RawTransaction
|
|
6491
|
+
*
|
|
6492
|
+
* @param transaction A aptos transaction type
|
|
6493
|
+
*
|
|
6494
|
+
* @returns FeePayerRawTransaction | MultiAgentRawTransaction | RawTransaction
|
|
6495
|
+
*/
|
|
6496
|
+
declare function deriveTransactionType(transaction: AnyRawTransaction): AnyRawTransactionInstance;
|
|
6497
|
+
declare function generateSigningMessage(bytes: Uint8Array, domainSeparator: string): Uint8Array;
|
|
6498
|
+
declare function generateSigningMessageForSerializable(obj: Serializable): Uint8Array;
|
|
6499
|
+
declare function generateSigningMessageForTransaction(transaction: AnyRawTransaction): Uint8Array;
|
|
6500
|
+
|
|
6077
6501
|
declare enum TypeTagParserErrorType {
|
|
6078
6502
|
InvalidTypeTag = "unknown type",
|
|
6079
6503
|
UnexpectedGenericType = "unexpected generic type",
|
|
@@ -7377,6 +7801,32 @@ declare class Transaction {
|
|
|
7377
7801
|
}): Promise<PendingTransactionResponse>;
|
|
7378
7802
|
}
|
|
7379
7803
|
|
|
7804
|
+
/**
|
|
7805
|
+
* A class to query all `OIDB` related queries on Aptos.
|
|
7806
|
+
*/
|
|
7807
|
+
declare class Keyless {
|
|
7808
|
+
readonly config: AptosConfig;
|
|
7809
|
+
constructor(config: AptosConfig);
|
|
7810
|
+
/**
|
|
7811
|
+
* TODO
|
|
7812
|
+
*
|
|
7813
|
+
* @param args.jwt jwt token
|
|
7814
|
+
* @returns The pepper
|
|
7815
|
+
*/
|
|
7816
|
+
getPepper(args: {
|
|
7817
|
+
jwt: string;
|
|
7818
|
+
ephemeralKeyPair: EphemeralKeyPair;
|
|
7819
|
+
}): Promise<Uint8Array>;
|
|
7820
|
+
deriveKeylessAccount(args: {
|
|
7821
|
+
jwt: string;
|
|
7822
|
+
ephemeralKeyPair: EphemeralKeyPair;
|
|
7823
|
+
uidKey?: string;
|
|
7824
|
+
pepper?: HexInput;
|
|
7825
|
+
extraFieldKey?: string;
|
|
7826
|
+
proofFetchCallback?: ProofFetchCallback;
|
|
7827
|
+
}): Promise<KeylessAccount>;
|
|
7828
|
+
}
|
|
7829
|
+
|
|
7380
7830
|
/**
|
|
7381
7831
|
* This class is the main entry point into Aptos's
|
|
7382
7832
|
* APIs and separates functionality into different namespaces.
|
|
@@ -7400,9 +7850,10 @@ declare class Aptos {
|
|
|
7400
7850
|
readonly general: General;
|
|
7401
7851
|
readonly staking: Staking;
|
|
7402
7852
|
readonly transaction: Transaction;
|
|
7853
|
+
readonly keyless: Keyless;
|
|
7403
7854
|
constructor(settings?: AptosConfig);
|
|
7404
7855
|
}
|
|
7405
|
-
interface Aptos extends Account, ANS, Coin, DigitalAsset, Event, Faucet, FungibleAsset, General, Staking, Omit<Transaction, "build" | "simulate" | "submit" | "batch"> {
|
|
7856
|
+
interface Aptos extends Account, ANS, Coin, DigitalAsset, Event, Faucet, FungibleAsset, General, Keyless, Staking, Omit<Transaction, "build" | "simulate" | "submit" | "batch"> {
|
|
7406
7857
|
}
|
|
7407
7858
|
|
|
7408
7859
|
/**
|
|
@@ -7513,6 +7964,7 @@ type GetAptosRequestOptions = Omit<GetRequestOptions, "type">;
|
|
|
7513
7964
|
*/
|
|
7514
7965
|
declare function get<Req extends {}, Res extends {}>(options: GetRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
7515
7966
|
declare function getAptosFullNode<Req extends {}, Res extends {}>(options: GetAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
7967
|
+
declare function getAptosPepperService<Req extends {}, Res extends {}>(options: GetAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
7516
7968
|
declare function paginateWithCursor<Req extends Record<string, any>, Res extends Array<{}>>(options: GetAptosRequestOptions): Promise<Res>;
|
|
7517
7969
|
|
|
7518
7970
|
type PostRequestOptions = {
|
|
@@ -7564,5 +8016,7 @@ declare function post<Req extends {}, Res extends {}>(options: PostRequestOption
|
|
|
7564
8016
|
declare function postAptosFullNode<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
7565
8017
|
declare function postAptosIndexer<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
7566
8018
|
declare function postAptosFaucet<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
8019
|
+
declare function postAptosPepperService<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
8020
|
+
declare function postAptosProvingService<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
7567
8021
|
|
|
7568
|
-
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, type DeserializableClass, 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, 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,
|
|
8022
|
+
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, type DeserializableClass, 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, MultiAgentTransaction, 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, type ProofFetchCallback, type ProofFetchEvents, type ProofFetchFailure, type ProofFetchStatus, type ProofFetchSuccess, 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, normalizeBundle, objectStructTag, optionStructTag, outOfRangeErrorMessage, paginateWithCursor, parseTypeTag, post, postAptosFaucet, postAptosFullNode, postAptosIndexer, postAptosPepperService, postAptosProvingService, promiseFulfilledStatus, request, splitPath, standardizeTypeTags, stringStructTag, throwTypeMismatch, validateNumberInRange };
|