@aptos-labs/ts-sdk 1.11.0 → 1.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -6
- package/dist/common/index.d.ts +108 -31
- package/dist/common/index.js +26 -26
- package/dist/common/index.js.map +1 -1
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.d.mts +13 -11
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +6 -4
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/coin.d.mts +9 -7
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.d.mts +3 -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 +6 -4
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.d.mts +2 -0
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +6 -4
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/transaction.d.mts +6 -4
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.d.mts +9 -7
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.d.mts +5 -3
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.d.mts +2 -0
- 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 +2 -0
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.d.mts +2 -0
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/bcs/serializer.mjs +1 -1
- package/dist/esm/chunk-25UTAIJG.mjs +2 -0
- package/dist/esm/chunk-25UTAIJG.mjs.map +1 -0
- package/dist/esm/{chunk-SQW7K56J.mjs → chunk-35EWRSDK.mjs} +2 -2
- package/dist/esm/{chunk-VKWPCOZA.mjs → chunk-36QXVFR5.mjs} +2 -2
- package/dist/esm/{chunk-3RRZ4MSV.mjs → chunk-3MFILHZT.mjs} +2 -2
- package/dist/esm/{chunk-4P6KFDXF.mjs → chunk-3PMUIXFS.mjs} +2 -2
- package/dist/esm/chunk-3PMUIXFS.mjs.map +1 -0
- package/dist/esm/{chunk-CIMZIZY3.mjs → chunk-3RQ5V3F3.mjs} +2 -2
- package/dist/esm/{chunk-VNNLHEJ4.mjs → chunk-4AVC2RCH.mjs} +2 -2
- package/dist/esm/chunk-4NHWV5AI.mjs +2 -0
- package/dist/esm/{chunk-NDV4GZ5U.mjs → chunk-527DYQ3X.mjs} +2 -2
- package/dist/esm/chunk-527DYQ3X.mjs.map +1 -0
- package/dist/esm/{chunk-XDZF5IUF.mjs → chunk-5EN52MUT.mjs} +2 -2
- package/dist/esm/chunk-5ID6W7XL.mjs +2 -0
- package/dist/esm/chunk-5ID6W7XL.mjs.map +1 -0
- package/dist/esm/{chunk-U5CKFPSM.mjs → chunk-5NWTYUKC.mjs} +2 -2
- package/dist/esm/chunk-5NWTYUKC.mjs.map +1 -0
- package/dist/esm/{chunk-XXKA2GO7.mjs → chunk-5ZQJLHJA.mjs} +2 -2
- package/dist/esm/chunk-5ZQJLHJA.mjs.map +1 -0
- package/dist/esm/chunk-6O5ZR5ME.mjs +2 -0
- package/dist/esm/chunk-6O5ZR5ME.mjs.map +1 -0
- package/dist/esm/{chunk-JLDOXN33.mjs → chunk-A7XZTJ3D.mjs} +2 -2
- package/dist/esm/{chunk-NHVLEE5G.mjs → chunk-AIPKOP3K.mjs} +2 -2
- package/dist/esm/chunk-AIPKOP3K.mjs.map +1 -0
- package/dist/esm/chunk-ARGODLTZ.mjs +2 -0
- package/dist/esm/chunk-ARGODLTZ.mjs.map +1 -0
- package/dist/esm/chunk-ASXXZH2D.mjs +2 -0
- package/dist/esm/chunk-ASXXZH2D.mjs.map +1 -0
- package/dist/esm/{chunk-2TRSGKMS.mjs → chunk-B4DWWHNL.mjs} +2 -2
- package/dist/esm/{chunk-EBCIZ4D6.mjs → chunk-B7X6PSE7.mjs} +2 -2
- package/dist/esm/{chunk-Y7G5W2QZ.mjs → chunk-BAYKVJBZ.mjs} +2 -2
- package/dist/esm/chunk-BCUSI3N6.mjs +2 -0
- package/dist/esm/chunk-BCUSI3N6.mjs.map +1 -0
- package/dist/esm/{chunk-O5L7WGNH.mjs → chunk-CAGDOGXS.mjs} +2 -2
- package/dist/esm/{chunk-TTM66JZ4.mjs → chunk-CEHCDA3G.mjs} +2 -2
- package/dist/esm/{chunk-LD7YBNH5.mjs → chunk-CP4QCRBZ.mjs} +2 -2
- package/dist/esm/chunk-CXR7MOBW.mjs +2 -0
- package/dist/esm/{chunk-LNS5RI5S.mjs.map → chunk-CXR7MOBW.mjs.map} +1 -1
- package/dist/esm/{chunk-JF4E53MH.mjs → chunk-DGLW7OBS.mjs} +2 -2
- package/dist/esm/{chunk-JF4E53MH.mjs.map → chunk-DGLW7OBS.mjs.map} +1 -1
- package/dist/esm/{chunk-T43CJS4C.mjs → chunk-DUP7XY5P.mjs} +2 -2
- package/dist/esm/{chunk-VBSAEAWA.mjs → chunk-EJBUUMWV.mjs} +2 -2
- package/dist/esm/{chunk-HYQSORWM.mjs → chunk-EV75CYGN.mjs} +2 -2
- package/dist/esm/chunk-F7EMGK4M.mjs +2 -0
- package/dist/esm/chunk-F7EMGK4M.mjs.map +1 -0
- package/dist/esm/{chunk-HSITRYZ5.mjs → chunk-FC5MU6ZN.mjs} +2 -2
- package/dist/esm/{chunk-JKXSSRNT.mjs → chunk-FNLRLSGJ.mjs} +2 -2
- package/dist/esm/{chunk-JEQSSMDK.mjs → chunk-FPD4JBPV.mjs} +2 -2
- package/dist/esm/{chunk-HEDMDM2U.mjs → chunk-FVMJDRHO.mjs} +2 -2
- package/dist/esm/chunk-FVMJDRHO.mjs.map +1 -0
- package/dist/esm/chunk-FXHXOVL4.mjs +2 -0
- package/dist/esm/chunk-FXHXOVL4.mjs.map +1 -0
- package/dist/esm/{chunk-RP4FMC6O.mjs → chunk-G56GPLTB.mjs} +2 -2
- package/dist/esm/chunk-GJDGR3KQ.mjs +2 -0
- package/dist/esm/chunk-GJDGR3KQ.mjs.map +1 -0
- package/dist/esm/{chunk-Y3R5DLBS.mjs → chunk-HJYT6LDB.mjs} +2 -2
- package/dist/esm/chunk-ICXA3DZH.mjs +1 -0
- package/dist/esm/{chunk-RWBAKP5G.mjs → chunk-IZF6DFAL.mjs} +2 -2
- package/dist/esm/{chunk-AVQSQJUO.mjs → chunk-JOLLCFQL.mjs} +2 -2
- package/dist/esm/chunk-KAGLWBIJ.mjs +2 -0
- package/dist/esm/chunk-KAGLWBIJ.mjs.map +1 -0
- package/dist/esm/{chunk-A5ACWD7S.mjs → chunk-KQB7A4OX.mjs} +2 -2
- package/dist/esm/{chunk-VK3H7DMJ.mjs → chunk-KXFMI7RM.mjs} +2 -2
- package/dist/esm/{chunk-PAY4TBCF.mjs → chunk-L54P6EGN.mjs} +2 -2
- package/dist/esm/{chunk-PAY4TBCF.mjs.map → chunk-L54P6EGN.mjs.map} +1 -1
- package/dist/esm/{chunk-O22J7RER.mjs → chunk-M4SQNMCW.mjs} +2 -2
- package/dist/esm/{chunk-JX3IRXNX.mjs → chunk-MJPUASSD.mjs} +2 -2
- package/dist/esm/{chunk-2BGOMPDV.mjs → chunk-N3U47Y6Y.mjs} +2 -2
- package/dist/esm/{chunk-3EKNELIS.mjs → chunk-NF5OUPPU.mjs} +2 -2
- package/dist/esm/{chunk-AT2HAXSH.mjs → chunk-O3YFCZJ5.mjs} +2 -2
- package/dist/esm/{chunk-4LQNMXX3.mjs → chunk-PF57EOJY.mjs} +2 -2
- package/dist/esm/{chunk-Q5GNCAA6.mjs → chunk-QJAI7DNA.mjs} +2 -2
- package/dist/esm/{chunk-GHMYWL3R.mjs → chunk-QRS4DGP3.mjs} +2 -2
- package/dist/esm/{chunk-P434YHBQ.mjs → chunk-QRVYLV76.mjs} +2 -2
- package/dist/esm/{chunk-CJLZV5JK.mjs → chunk-RIUFW2OG.mjs} +2 -2
- package/dist/esm/{chunk-QDD2MDJZ.mjs → chunk-SRDIYE3M.mjs} +2 -2
- package/dist/esm/{chunk-AE2K65NN.mjs → chunk-SUTBXHYU.mjs} +2 -2
- package/dist/esm/chunk-SUTBXHYU.mjs.map +1 -0
- package/dist/esm/{chunk-H4Q7YQD3.mjs → chunk-SWZOGZJ6.mjs} +2 -2
- package/dist/esm/chunk-SZKJ3TC5.mjs +1 -0
- package/dist/esm/chunk-SZKJ3TC5.mjs.map +1 -0
- package/dist/esm/{chunk-43QJL2AV.mjs → chunk-T4C6BVXK.mjs} +2 -2
- package/dist/esm/{chunk-WHNLDDPT.mjs → chunk-U3YYSIIT.mjs} +2 -2
- package/dist/esm/{chunk-Y3CHPF6X.mjs → chunk-UEKKYJGA.mjs} +2 -2
- package/dist/esm/chunk-UGPALAPN.mjs +2 -0
- package/dist/esm/{chunk-W5PK4QCX.mjs → chunk-UQCSBLD5.mjs} +2 -2
- package/dist/esm/{chunk-C62XI6VN.mjs → chunk-VBDMQERT.mjs} +2 -2
- package/dist/esm/{chunk-27ML4NFD.mjs → chunk-VHANL47W.mjs} +2 -2
- package/dist/esm/{chunk-OWEAY3N3.mjs → chunk-VLNBGWGX.mjs} +2 -2
- package/dist/esm/chunk-VNIABDOT.mjs +2 -0
- package/dist/esm/chunk-VNIABDOT.mjs.map +1 -0
- package/dist/esm/{chunk-BWG5NCHC.mjs → chunk-XDXI3TRT.mjs} +2 -2
- package/dist/esm/{chunk-2NC32JRF.mjs → chunk-XX5J7KKC.mjs} +2 -2
- package/dist/esm/{chunk-HYOPI6T2.mjs → chunk-YG6YYQRG.mjs} +2 -2
- package/dist/esm/{chunk-OH6HD5SF.mjs → chunk-YIGDWPGM.mjs} +2 -2
- package/dist/esm/chunk-YIGDWPGM.mjs.map +1 -0
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/cli/localNode.d.mts +1 -1
- package/dist/esm/cli/localNode.mjs +1 -1
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/core/account/Account.mjs +1 -1
- package/dist/esm/core/account/Ed25519Account.mjs +1 -1
- package/dist/esm/core/account/SingleKeyAccount.mjs +1 -1
- package/dist/esm/core/account/index.d.mts +1 -1
- package/dist/esm/core/account/index.mjs +1 -1
- package/dist/esm/core/account/utils/address.d.mts +10 -1
- package/dist/esm/core/account/utils/address.mjs +1 -1
- package/dist/esm/core/account/utils/index.d.mts +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 +2 -2
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/publicKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.d.mts +1 -1
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/crypto/utils.d.mts +16 -0
- package/dist/esm/core/crypto/utils.mjs +2 -0
- package/dist/esm/core/crypto/utils.mjs.map +1 -0
- package/dist/esm/core/hex.d.mts +2 -2
- package/dist/esm/core/hex.mjs +1 -1
- package/dist/esm/core/index.d.mts +1 -1
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/index.d.mts +7 -3
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/account.d.mts +1 -1
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.d.mts +8 -6
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.d.mts +3 -1
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.d.mts +5 -3
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/event.d.mts +1 -1
- package/dist/esm/internal/event.mjs +1 -1
- package/dist/esm/internal/faucet.mjs +1 -1
- package/dist/esm/internal/fungibleAsset.d.mts +7 -5
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/staking.d.mts +2 -2
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.d.mts +7 -5
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/internal/view.d.mts +2 -0
- package/dist/esm/internal/view.mjs +1 -1
- 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 +4 -2
- 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.mjs +1 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.d.mts +41 -0
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +2 -0
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs.map +1 -0
- 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.d.mts +41 -0
- package/dist/esm/transactions/instances/simpleTransaction.mjs +2 -0
- package/dist/esm/transactions/instances/simpleTransaction.mjs.map +1 -0
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/index.d.mts +2 -0
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.d.mts +3 -1
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.d.mts +2 -0
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.d.mts +3 -1
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +2 -0
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +14 -2
- 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 +3 -22
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/src/api/ans.ts +8 -7
- package/src/api/coin.ts +2 -1
- package/src/api/digitalAsset.ts +2 -1
- package/src/api/fungibleAsset.ts +2 -1
- package/src/api/transaction.ts +1 -1
- package/src/api/transactionSubmission/build.ts +3 -6
- package/src/cli/localNode.ts +1 -1
- package/src/core/account/utils/address.ts +18 -0
- package/src/core/crypto/ed25519.ts +7 -5
- package/src/core/crypto/secp256k1.ts +6 -4
- package/src/core/crypto/utils.ts +24 -0
- package/src/core/hex.ts +4 -4
- package/src/index.ts +1 -0
- package/src/internal/ans.ts +9 -5
- package/src/internal/coin.ts +2 -1
- package/src/internal/digitalAsset.ts +2 -1
- package/src/internal/fungibleAsset.ts +1 -1
- package/src/internal/transactionSubmission.ts +2 -2
- package/src/transactions/instances/index.ts +1 -0
- package/src/transactions/instances/multiAgentTransaction.ts +68 -0
- package/src/transactions/instances/simpleTransaction.ts +60 -0
- package/src/transactions/management/transactionWorker.ts +2 -1
- package/src/transactions/transactionBuilder/transactionBuilder.ts +38 -11
- package/src/transactions/types.ts +2 -23
- package/src/version.ts +1 -1
- package/dist/esm/chunk-3OOOAQJG.mjs +0 -2
- package/dist/esm/chunk-3OOOAQJG.mjs.map +0 -1
- package/dist/esm/chunk-4P6KFDXF.mjs.map +0 -1
- package/dist/esm/chunk-4UMTUJL5.mjs +0 -2
- package/dist/esm/chunk-4UMTUJL5.mjs.map +0 -1
- package/dist/esm/chunk-AE2K65NN.mjs.map +0 -1
- package/dist/esm/chunk-BZMO6Q6L.mjs +0 -2
- package/dist/esm/chunk-BZMO6Q6L.mjs.map +0 -1
- package/dist/esm/chunk-D2XKVVEN.mjs +0 -2
- package/dist/esm/chunk-D2XKVVEN.mjs.map +0 -1
- package/dist/esm/chunk-EXX55N2B.mjs +0 -2
- package/dist/esm/chunk-EXX55N2B.mjs.map +0 -1
- package/dist/esm/chunk-GQTC6QIS.mjs +0 -2
- package/dist/esm/chunk-GQTC6QIS.mjs.map +0 -1
- package/dist/esm/chunk-HEDMDM2U.mjs.map +0 -1
- package/dist/esm/chunk-HTZTTZQJ.mjs +0 -1
- package/dist/esm/chunk-IWPVPIKD.mjs +0 -2
- package/dist/esm/chunk-LG6SZTWR.mjs +0 -2
- package/dist/esm/chunk-LG6SZTWR.mjs.map +0 -1
- package/dist/esm/chunk-LNS5RI5S.mjs +0 -2
- package/dist/esm/chunk-NDV4GZ5U.mjs.map +0 -1
- package/dist/esm/chunk-NHVLEE5G.mjs.map +0 -1
- package/dist/esm/chunk-OH5ADEJO.mjs +0 -2
- package/dist/esm/chunk-OH6HD5SF.mjs.map +0 -1
- package/dist/esm/chunk-TBSPLLCB.mjs +0 -2
- package/dist/esm/chunk-TBSPLLCB.mjs.map +0 -1
- package/dist/esm/chunk-U5CKFPSM.mjs.map +0 -1
- package/dist/esm/chunk-XXKA2GO7.mjs.map +0 -1
- /package/dist/esm/{chunk-SQW7K56J.mjs.map → chunk-35EWRSDK.mjs.map} +0 -0
- /package/dist/esm/{chunk-VKWPCOZA.mjs.map → chunk-36QXVFR5.mjs.map} +0 -0
- /package/dist/esm/{chunk-3RRZ4MSV.mjs.map → chunk-3MFILHZT.mjs.map} +0 -0
- /package/dist/esm/{chunk-CIMZIZY3.mjs.map → chunk-3RQ5V3F3.mjs.map} +0 -0
- /package/dist/esm/{chunk-VNNLHEJ4.mjs.map → chunk-4AVC2RCH.mjs.map} +0 -0
- /package/dist/esm/{chunk-IWPVPIKD.mjs.map → chunk-4NHWV5AI.mjs.map} +0 -0
- /package/dist/esm/{chunk-XDZF5IUF.mjs.map → chunk-5EN52MUT.mjs.map} +0 -0
- /package/dist/esm/{chunk-JLDOXN33.mjs.map → chunk-A7XZTJ3D.mjs.map} +0 -0
- /package/dist/esm/{chunk-2TRSGKMS.mjs.map → chunk-B4DWWHNL.mjs.map} +0 -0
- /package/dist/esm/{chunk-EBCIZ4D6.mjs.map → chunk-B7X6PSE7.mjs.map} +0 -0
- /package/dist/esm/{chunk-Y7G5W2QZ.mjs.map → chunk-BAYKVJBZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-O5L7WGNH.mjs.map → chunk-CAGDOGXS.mjs.map} +0 -0
- /package/dist/esm/{chunk-TTM66JZ4.mjs.map → chunk-CEHCDA3G.mjs.map} +0 -0
- /package/dist/esm/{chunk-LD7YBNH5.mjs.map → chunk-CP4QCRBZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-T43CJS4C.mjs.map → chunk-DUP7XY5P.mjs.map} +0 -0
- /package/dist/esm/{chunk-VBSAEAWA.mjs.map → chunk-EJBUUMWV.mjs.map} +0 -0
- /package/dist/esm/{chunk-HYQSORWM.mjs.map → chunk-EV75CYGN.mjs.map} +0 -0
- /package/dist/esm/{chunk-HSITRYZ5.mjs.map → chunk-FC5MU6ZN.mjs.map} +0 -0
- /package/dist/esm/{chunk-JKXSSRNT.mjs.map → chunk-FNLRLSGJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-JEQSSMDK.mjs.map → chunk-FPD4JBPV.mjs.map} +0 -0
- /package/dist/esm/{chunk-RP4FMC6O.mjs.map → chunk-G56GPLTB.mjs.map} +0 -0
- /package/dist/esm/{chunk-Y3R5DLBS.mjs.map → chunk-HJYT6LDB.mjs.map} +0 -0
- /package/dist/esm/{chunk-HTZTTZQJ.mjs.map → chunk-ICXA3DZH.mjs.map} +0 -0
- /package/dist/esm/{chunk-RWBAKP5G.mjs.map → chunk-IZF6DFAL.mjs.map} +0 -0
- /package/dist/esm/{chunk-AVQSQJUO.mjs.map → chunk-JOLLCFQL.mjs.map} +0 -0
- /package/dist/esm/{chunk-A5ACWD7S.mjs.map → chunk-KQB7A4OX.mjs.map} +0 -0
- /package/dist/esm/{chunk-VK3H7DMJ.mjs.map → chunk-KXFMI7RM.mjs.map} +0 -0
- /package/dist/esm/{chunk-O22J7RER.mjs.map → chunk-M4SQNMCW.mjs.map} +0 -0
- /package/dist/esm/{chunk-JX3IRXNX.mjs.map → chunk-MJPUASSD.mjs.map} +0 -0
- /package/dist/esm/{chunk-2BGOMPDV.mjs.map → chunk-N3U47Y6Y.mjs.map} +0 -0
- /package/dist/esm/{chunk-3EKNELIS.mjs.map → chunk-NF5OUPPU.mjs.map} +0 -0
- /package/dist/esm/{chunk-AT2HAXSH.mjs.map → chunk-O3YFCZJ5.mjs.map} +0 -0
- /package/dist/esm/{chunk-4LQNMXX3.mjs.map → chunk-PF57EOJY.mjs.map} +0 -0
- /package/dist/esm/{chunk-Q5GNCAA6.mjs.map → chunk-QJAI7DNA.mjs.map} +0 -0
- /package/dist/esm/{chunk-GHMYWL3R.mjs.map → chunk-QRS4DGP3.mjs.map} +0 -0
- /package/dist/esm/{chunk-P434YHBQ.mjs.map → chunk-QRVYLV76.mjs.map} +0 -0
- /package/dist/esm/{chunk-CJLZV5JK.mjs.map → chunk-RIUFW2OG.mjs.map} +0 -0
- /package/dist/esm/{chunk-QDD2MDJZ.mjs.map → chunk-SRDIYE3M.mjs.map} +0 -0
- /package/dist/esm/{chunk-H4Q7YQD3.mjs.map → chunk-SWZOGZJ6.mjs.map} +0 -0
- /package/dist/esm/{chunk-43QJL2AV.mjs.map → chunk-T4C6BVXK.mjs.map} +0 -0
- /package/dist/esm/{chunk-WHNLDDPT.mjs.map → chunk-U3YYSIIT.mjs.map} +0 -0
- /package/dist/esm/{chunk-Y3CHPF6X.mjs.map → chunk-UEKKYJGA.mjs.map} +0 -0
- /package/dist/esm/{chunk-OH5ADEJO.mjs.map → chunk-UGPALAPN.mjs.map} +0 -0
- /package/dist/esm/{chunk-W5PK4QCX.mjs.map → chunk-UQCSBLD5.mjs.map} +0 -0
- /package/dist/esm/{chunk-C62XI6VN.mjs.map → chunk-VBDMQERT.mjs.map} +0 -0
- /package/dist/esm/{chunk-27ML4NFD.mjs.map → chunk-VHANL47W.mjs.map} +0 -0
- /package/dist/esm/{chunk-OWEAY3N3.mjs.map → chunk-VLNBGWGX.mjs.map} +0 -0
- /package/dist/esm/{chunk-BWG5NCHC.mjs.map → chunk-XDXI3TRT.mjs.map} +0 -0
- /package/dist/esm/{chunk-2NC32JRF.mjs.map → chunk-XX5J7KKC.mjs.map} +0 -0
- /package/dist/esm/{chunk-HYOPI6T2.mjs.map → chunk-YG6YYQRG.mjs.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m}from"../../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"../../chunk-GJDGR3KQ.mjs";import"../../chunk-CP4QCRBZ.mjs";import"../../chunk-QRVYLV76.mjs";import"../../chunk-MJPUASSD.mjs";import"../../chunk-25UTAIJG.mjs";import"../../chunk-ICXA3DZH.mjs";import"../../chunk-B4DWWHNL.mjs";import"../../chunk-VBDMQERT.mjs";import"../../chunk-6O5ZR5ME.mjs";import"../../chunk-UQCSBLD5.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-BAYKVJBZ.mjs";import"../../chunk-U3YYSIIT.mjs";import"../../chunk-35EWRSDK.mjs";import"../../chunk-PF57EOJY.mjs";import"../../chunk-B7X6PSE7.mjs";import"../../chunk-IZF6DFAL.mjs";import"../../chunk-VHANL47W.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-MLWIHWNH.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-KAGLWBIJ.mjs";import"../../chunk-UEKKYJGA.mjs";import"../../chunk-QJAI7DNA.mjs";import"../../chunk-RIUFW2OG.mjs";import"../../chunk-XX5J7KKC.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-XDXI3TRT.mjs";import"../../chunk-EV75CYGN.mjs";import"../../chunk-JOLLCFQL.mjs";import"../../chunk-ARGODLTZ.mjs";import"../../chunk-ASXXZH2D.mjs";import"../../chunk-4NHWV5AI.mjs";import"../../chunk-UGPALAPN.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-N3U47Y6Y.mjs";import"../../chunk-CEHCDA3G.mjs";import"../../chunk-G56GPLTB.mjs";import"../../chunk-SRDIYE3M.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-5EN52MUT.mjs";import"../../chunk-QRS4DGP3.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-4AVC2RCH.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-FNLRLSGJ.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-DUP7XY5P.mjs";import"../../chunk-CAGDOGXS.mjs";import"../../chunk-SWZOGZJ6.mjs";import"../../chunk-CYDWEPFL.mjs";import"../../chunk-GHYE26Q5.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-NJRNZEHX.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-CXR7MOBW.mjs";import"../../chunk-C67BKZND.mjs";import"../../chunk-CYNQRMO5.mjs";import"../../chunk-FVA2OPG4.mjs";export{f as buildTransaction,m as deriveTransactionType,n as generateMultiSignersSignedTransaction,e as generateRawTransaction,j as generateSignedTransaction,g as generateSignedTransactionForSimulation,o as generateSigningMessage,a as generateTransactionPayload,b as generateTransactionPayloadWithABI,l as generateUserTransactionHash,c as generateViewFunctionPayload,d as generateViewFunctionPayloadWithABI,h as getAuthenticatorForSimulation,k as hashValues,i as sign};
|
|
2
2
|
//# sourceMappingURL=transactionBuilder.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s}from"../../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s}from"../../chunk-U3YYSIIT.mjs";import"../../chunk-B7X6PSE7.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-MLWIHWNH.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-KAGLWBIJ.mjs";import"../../chunk-UEKKYJGA.mjs";import"../../chunk-QJAI7DNA.mjs";import"../../chunk-RIUFW2OG.mjs";import"../../chunk-XX5J7KKC.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-XDXI3TRT.mjs";import"../../chunk-EV75CYGN.mjs";import"../../chunk-JOLLCFQL.mjs";import"../../chunk-ARGODLTZ.mjs";import"../../chunk-ASXXZH2D.mjs";import"../../chunk-4NHWV5AI.mjs";import"../../chunk-UGPALAPN.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-N3U47Y6Y.mjs";import"../../chunk-CEHCDA3G.mjs";import"../../chunk-G56GPLTB.mjs";import"../../chunk-SRDIYE3M.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-5EN52MUT.mjs";import"../../chunk-QRS4DGP3.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-NJRNZEHX.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-FVA2OPG4.mjs";export{o as StructTag,a as TypeTag,i as TypeTagAddress,b as TypeTagBool,l as TypeTagGeneric,k as TypeTagReference,j as TypeTagSigner,n as TypeTagStruct,g as TypeTagU128,d as TypeTagU16,h as TypeTagU256,e as TypeTagU32,f as TypeTagU64,c as TypeTagU8,m as TypeTagVector,p as aptosCoinStructTag,s as objectStructTag,r as optionStructTag,q as stringStructTag};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c}from"../../chunk-
|
|
1
|
+
import{a,b,c}from"../../chunk-MJPUASSD.mjs";import"../../chunk-U3YYSIIT.mjs";import"../../chunk-B7X6PSE7.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-MLWIHWNH.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-KAGLWBIJ.mjs";import"../../chunk-UEKKYJGA.mjs";import"../../chunk-QJAI7DNA.mjs";import"../../chunk-RIUFW2OG.mjs";import"../../chunk-XX5J7KKC.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-XDXI3TRT.mjs";import"../../chunk-EV75CYGN.mjs";import"../../chunk-JOLLCFQL.mjs";import"../../chunk-ARGODLTZ.mjs";import"../../chunk-ASXXZH2D.mjs";import"../../chunk-4NHWV5AI.mjs";import"../../chunk-UGPALAPN.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-N3U47Y6Y.mjs";import"../../chunk-CEHCDA3G.mjs";import"../../chunk-G56GPLTB.mjs";import"../../chunk-SRDIYE3M.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-5EN52MUT.mjs";import"../../chunk-QRS4DGP3.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-NJRNZEHX.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-FVA2OPG4.mjs";export{b as TypeTagParserError,a as TypeTagParserErrorType,c as parseTypeTag};
|
|
2
2
|
//# sourceMappingURL=parser.mjs.map
|
|
@@ -8,7 +8,9 @@ import { AccountAddress, AccountAddressInput } from '../core/accountAddress.mjs'
|
|
|
8
8
|
import { P as PublicKey } from '../publicKey-B3XRNhHO.mjs';
|
|
9
9
|
import { RawTransaction, MultiAgentRawTransaction, FeePayerRawTransaction } from './instances/rawTransaction.mjs';
|
|
10
10
|
import { TransactionPayloadEntryFunction, TransactionPayloadScript, TransactionPayloadMultiSig } from './instances/transactionPayload.mjs';
|
|
11
|
+
import { SimpleTransaction } from './instances/simpleTransaction.mjs';
|
|
11
12
|
import { TypeTag } from './typeTag/index.mjs';
|
|
13
|
+
import { MultiAgentTransaction } from './instances/multiAgentTransaction.mjs';
|
|
12
14
|
import '../utils/apiEndpoints.mjs';
|
|
13
15
|
import '../utils/const.mjs';
|
|
14
16
|
import '../types/indexer.mjs';
|
|
@@ -174,27 +176,6 @@ interface InputGenerateMultiAgentRawTransactionArgs {
|
|
|
174
176
|
* Unified type that holds all the interfaces to generate different transaction types
|
|
175
177
|
*/
|
|
176
178
|
type InputGenerateRawTransactionArgs = InputGenerateSingleSignerRawTransactionArgs | InputGenerateMultiAgentRawTransactionArgs;
|
|
177
|
-
/**
|
|
178
|
-
* Interface that holds the return data when generating a single signer transaction
|
|
179
|
-
*
|
|
180
|
-
* @param rawTransaction a bcs serialized raw transaction
|
|
181
|
-
*/
|
|
182
|
-
interface SimpleTransaction {
|
|
183
|
-
rawTransaction: RawTransaction;
|
|
184
|
-
feePayerAddress?: AccountAddress;
|
|
185
|
-
secondarySignerAddresses?: undefined;
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* Interface that holds the return data when generating a multi-agent transaction.
|
|
189
|
-
*
|
|
190
|
-
* @param rawTransaction a bcs serialized raw transaction
|
|
191
|
-
* @param secondarySignerAddresses secondary signer addresses for multi-agent transaction
|
|
192
|
-
*/
|
|
193
|
-
interface MultiAgentTransaction {
|
|
194
|
-
rawTransaction: RawTransaction;
|
|
195
|
-
secondarySignerAddresses: AccountAddress[];
|
|
196
|
-
feePayerAddress?: AccountAddress;
|
|
197
|
-
}
|
|
198
179
|
/**
|
|
199
180
|
* Unified type that holds all the return interfaces when generating different transaction types
|
|
200
181
|
*/
|
|
@@ -257,4 +238,4 @@ interface InputSubmitTransactionData {
|
|
|
257
238
|
additionalSignersAuthenticators?: Array<AccountAuthenticator>;
|
|
258
239
|
}
|
|
259
240
|
|
|
260
|
-
export type { AnyRawTransaction, AnyRawTransactionInstance, AnyTransactionPayloadInstance, EntryFunctionABI, EntryFunctionArgumentTypes, FunctionABI, InputEntryFunctionData, InputEntryFunctionDataWithABI, InputEntryFunctionDataWithRemoteABI, InputGenerateMultiAgentRawTransactionArgs, InputGenerateMultiAgentRawTransactionData, InputGenerateRawTransactionArgs, InputGenerateSingleSignerRawTransactionArgs, InputGenerateSingleSignerRawTransactionData, InputGenerateTransactionData, InputGenerateTransactionOptions, InputGenerateTransactionPayloadData, InputGenerateTransactionPayloadDataWithABI, InputGenerateTransactionPayloadDataWithRemoteABI, InputMultiSigData, InputMultiSigDataWithABI, InputMultiSigDataWithRemoteABI, InputScriptData, InputSimulateTransactionData, InputSimulateTransactionOptions, InputSubmitTransactionData, InputViewFunctionData, InputViewFunctionDataWithABI, InputViewFunctionDataWithRemoteABI,
|
|
241
|
+
export type { AnyRawTransaction, AnyRawTransactionInstance, AnyTransactionPayloadInstance, EntryFunctionABI, EntryFunctionArgumentTypes, FunctionABI, InputEntryFunctionData, InputEntryFunctionDataWithABI, InputEntryFunctionDataWithRemoteABI, InputGenerateMultiAgentRawTransactionArgs, InputGenerateMultiAgentRawTransactionData, InputGenerateRawTransactionArgs, InputGenerateSingleSignerRawTransactionArgs, InputGenerateSingleSignerRawTransactionData, InputGenerateTransactionData, InputGenerateTransactionOptions, InputGenerateTransactionPayloadData, InputGenerateTransactionPayloadDataWithABI, InputGenerateTransactionPayloadDataWithRemoteABI, InputMultiSigData, InputMultiSigDataWithABI, InputMultiSigDataWithRemoteABI, InputScriptData, InputSimulateTransactionData, InputSimulateTransactionOptions, InputSubmitTransactionData, InputViewFunctionData, InputViewFunctionDataWithABI, InputViewFunctionDataWithRemoteABI, ScriptFunctionArgumentTypes, SimpleEntryFunctionArgumentTypes, ViewFunctionABI };
|
package/dist/esm/version.d.mts
CHANGED
package/dist/esm/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-CXR7MOBW.mjs";import"./chunk-FVA2OPG4.mjs";export{a as VERSION};
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/package.json
CHANGED
package/src/api/ans.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright © Aptos Foundation
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import { Account, AccountAddressInput } from "../core";
|
|
4
|
+
import { Account, AccountAddress, AccountAddressInput } from "../core";
|
|
5
5
|
import {
|
|
6
6
|
RegisterNameParameters,
|
|
7
7
|
getExpiration,
|
|
@@ -22,9 +22,10 @@ import {
|
|
|
22
22
|
getDomainSubdomains,
|
|
23
23
|
GetDomainSubdomainsArgs,
|
|
24
24
|
} from "../internal/ans";
|
|
25
|
-
import { GetANSNameResponse
|
|
26
|
-
import { InputGenerateTransactionOptions
|
|
25
|
+
import { GetANSNameResponse } from "../types";
|
|
26
|
+
import { InputGenerateTransactionOptions } from "../transactions/types";
|
|
27
27
|
import { AptosConfig } from "./aptosConfig";
|
|
28
|
+
import { SimpleTransaction } from "../transactions/instances/simpleTransaction";
|
|
28
29
|
|
|
29
30
|
/**
|
|
30
31
|
* A class to handle all `ANS` operations
|
|
@@ -43,9 +44,9 @@ export class ANS {
|
|
|
43
44
|
*
|
|
44
45
|
* @param args.name - A string of the name to retrieve
|
|
45
46
|
*
|
|
46
|
-
* @returns
|
|
47
|
+
* @returns AccountAddress if the name is owned, undefined otherwise
|
|
47
48
|
*/
|
|
48
|
-
async getOwnerAddress(args: { name: string }): Promise<
|
|
49
|
+
async getOwnerAddress(args: { name: string }): Promise<AccountAddress | undefined> {
|
|
49
50
|
return getOwnerAddress({ aptosConfig: this.config, ...args });
|
|
50
51
|
}
|
|
51
52
|
|
|
@@ -78,9 +79,9 @@ export class ANS {
|
|
|
78
79
|
*
|
|
79
80
|
* @param args.name - A string of the name: primary, primary.apt, secondary.primary, secondary.primary.apt, etc.
|
|
80
81
|
*
|
|
81
|
-
* @returns
|
|
82
|
+
* @returns AccountAddress if the name has a target, undefined otherwise
|
|
82
83
|
*/
|
|
83
|
-
async getTargetAddress(args: { name: string }): Promise<
|
|
84
|
+
async getTargetAddress(args: { name: string }): Promise<AccountAddress | undefined> {
|
|
84
85
|
return getTargetAddress({ aptosConfig: this.config, ...args });
|
|
85
86
|
}
|
|
86
87
|
|
package/src/api/coin.ts
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
import { AccountAddressInput } from "../core";
|
|
5
5
|
import { transferCoinTransaction } from "../internal/coin";
|
|
6
|
-
import { SimpleTransaction
|
|
6
|
+
import { SimpleTransaction } from "../transactions/instances/simpleTransaction";
|
|
7
|
+
import { InputGenerateTransactionOptions } from "../transactions/types";
|
|
7
8
|
import { AnyNumber, MoveStructId } from "../types";
|
|
8
9
|
import { AptosConfig } from "./aptosConfig";
|
|
9
10
|
|
package/src/api/digitalAsset.ts
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
TokenStandardArg,
|
|
15
15
|
} from "../types";
|
|
16
16
|
import { Account, AccountAddress, AccountAddressInput } from "../core";
|
|
17
|
-
import { InputGenerateTransactionOptions
|
|
17
|
+
import { InputGenerateTransactionOptions } from "../transactions/types";
|
|
18
18
|
import {
|
|
19
19
|
addDigitalAssetPropertyTransaction,
|
|
20
20
|
addDigitalAssetTypedPropertyTransaction,
|
|
@@ -45,6 +45,7 @@ import {
|
|
|
45
45
|
import { ProcessorType } from "../utils/const";
|
|
46
46
|
import { AptosConfig } from "./aptosConfig";
|
|
47
47
|
import { waitForIndexerOnVersion } from "./utils";
|
|
48
|
+
import { SimpleTransaction } from "../transactions/instances/simpleTransaction";
|
|
48
49
|
|
|
49
50
|
/**
|
|
50
51
|
* A class to query all `DigitalAsset` related queries on Aptos.
|
package/src/api/fungibleAsset.ts
CHANGED
|
@@ -24,7 +24,8 @@ import { ProcessorType } from "../utils/const";
|
|
|
24
24
|
import { AptosConfig } from "./aptosConfig";
|
|
25
25
|
import { waitForIndexerOnVersion } from "./utils";
|
|
26
26
|
import { Account, AccountAddress } from "../core";
|
|
27
|
-
import { InputGenerateTransactionOptions
|
|
27
|
+
import { InputGenerateTransactionOptions } from "../transactions";
|
|
28
|
+
import { SimpleTransaction } from "../transactions/instances/simpleTransaction";
|
|
28
29
|
|
|
29
30
|
/**
|
|
30
31
|
* A class to query all `FungibleAsset` related queries on Aptos.
|
package/src/api/transaction.ts
CHANGED
|
@@ -32,13 +32,13 @@ import {
|
|
|
32
32
|
AnyRawTransaction,
|
|
33
33
|
InputGenerateTransactionOptions,
|
|
34
34
|
InputGenerateTransactionPayloadData,
|
|
35
|
-
SimpleTransaction,
|
|
36
35
|
} from "../transactions";
|
|
37
36
|
import { AccountAddressInput, Account, PrivateKey } from "../core";
|
|
38
37
|
import { Build } from "./transactionSubmission/build";
|
|
39
38
|
import { Simulate } from "./transactionSubmission/simulate";
|
|
40
39
|
import { Submit } from "./transactionSubmission/submit";
|
|
41
40
|
import { TransactionManagement } from "./transactionSubmission/management";
|
|
41
|
+
import { SimpleTransaction } from "../transactions/instances/simpleTransaction";
|
|
42
42
|
|
|
43
43
|
export class Transaction {
|
|
44
44
|
readonly config: AptosConfig;
|
|
@@ -3,12 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
import { AccountAddressInput } from "../../core";
|
|
5
5
|
import { generateTransaction } from "../../internal/transactionSubmission";
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
SimpleTransaction,
|
|
10
|
-
MultiAgentTransaction,
|
|
11
|
-
} from "../../transactions";
|
|
6
|
+
import { InputGenerateTransactionPayloadData, InputGenerateTransactionOptions } from "../../transactions";
|
|
7
|
+
import { MultiAgentTransaction } from "../../transactions/instances/multiAgentTransaction";
|
|
8
|
+
import { SimpleTransaction } from "../../transactions/instances/simpleTransaction";
|
|
12
9
|
import { AptosConfig } from "../aptosConfig";
|
|
13
10
|
|
|
14
11
|
/**
|
package/src/cli/localNode.ts
CHANGED
|
@@ -20,6 +20,24 @@ export const createObjectAddress = (creatorAddress: AccountAddress, seed: Uint8A
|
|
|
20
20
|
return new AccountAddress(sha3_256(bytes));
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* Creates an resource address from creator address and seed
|
|
25
|
+
*
|
|
26
|
+
* @param creatorAddress The creator account address
|
|
27
|
+
* @param seed The seed in either Uint8Array | string type
|
|
28
|
+
*
|
|
29
|
+
* @returns The resource account address
|
|
30
|
+
*/
|
|
31
|
+
export const createResourceAddress = (creatorAddress: AccountAddress, seed: Uint8Array | string): AccountAddress => {
|
|
32
|
+
const creatorBytes = creatorAddress.bcsToBytes();
|
|
33
|
+
|
|
34
|
+
const seedBytes = typeof seed === "string" ? Buffer.from(seed, "utf8") : seed;
|
|
35
|
+
|
|
36
|
+
const bytes = new Uint8Array([...creatorBytes, ...seedBytes, DeriveScheme.DeriveResourceAccountAddress]);
|
|
37
|
+
|
|
38
|
+
return new AccountAddress(sha3_256(bytes));
|
|
39
|
+
};
|
|
40
|
+
|
|
23
41
|
/**
|
|
24
42
|
* Creates a token object address from creator address, collection name and token name
|
|
25
43
|
*
|
|
@@ -11,6 +11,7 @@ import { CKDPriv, deriveKey, HARDENED_OFFSET, isValidHardenedPath, mnemonicToSee
|
|
|
11
11
|
import { PrivateKey } from "./privateKey";
|
|
12
12
|
import { AccountPublicKey, VerifySignatureArgs } from "./publicKey";
|
|
13
13
|
import { Signature } from "./signature";
|
|
14
|
+
import { convertSigningMessage } from "./utils";
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* Represents the public key of an Ed25519 key pair.
|
|
@@ -52,7 +53,7 @@ export class Ed25519PublicKey extends AccountPublicKey {
|
|
|
52
53
|
|
|
53
54
|
/**
|
|
54
55
|
* Verifies a signed data with a public key
|
|
55
|
-
* @param args.message a signed message
|
|
56
|
+
* @param args.message a signed message as a Hex string or Uint8Array
|
|
56
57
|
* @param args.signature the signature of the message
|
|
57
58
|
*/
|
|
58
59
|
verifySignature(args: VerifySignatureArgs): boolean {
|
|
@@ -60,8 +61,8 @@ export class Ed25519PublicKey extends AccountPublicKey {
|
|
|
60
61
|
if (!(signature instanceof Ed25519Signature)) {
|
|
61
62
|
return false;
|
|
62
63
|
}
|
|
63
|
-
|
|
64
|
-
const messageBytes = Hex.fromHexInput(
|
|
64
|
+
const messageToVerify = convertSigningMessage(message);
|
|
65
|
+
const messageBytes = Hex.fromHexInput(messageToVerify).toUint8Array();
|
|
65
66
|
const signatureBytes = signature.toUint8Array();
|
|
66
67
|
const publicKeyBytes = this.key.toUint8Array();
|
|
67
68
|
return nacl.sign.detached.verify(messageBytes, signatureBytes, publicKeyBytes);
|
|
@@ -213,11 +214,12 @@ export class Ed25519PrivateKey extends Serializable implements PrivateKey {
|
|
|
213
214
|
/**
|
|
214
215
|
* Sign the given message with the private key.
|
|
215
216
|
*
|
|
216
|
-
* @param message
|
|
217
|
+
* @param message a message as a string or Uint8Array
|
|
217
218
|
* @returns Signature
|
|
218
219
|
*/
|
|
219
220
|
sign(message: HexInput): Ed25519Signature {
|
|
220
|
-
const
|
|
221
|
+
const messageToSign = convertSigningMessage(message);
|
|
222
|
+
const messageBytes = Hex.fromHexInput(messageToSign).toUint8Array();
|
|
221
223
|
const signatureBytes = nacl.sign.detached(messageBytes, this.signingKeyPair.secretKey);
|
|
222
224
|
return new Ed25519Signature(signatureBytes);
|
|
223
225
|
}
|
|
@@ -11,6 +11,7 @@ import { isValidBIP44Path, mnemonicToSeed } from "./hdKey";
|
|
|
11
11
|
import { PrivateKey } from "./privateKey";
|
|
12
12
|
import { PublicKey, VerifySignatureArgs } from "./publicKey";
|
|
13
13
|
import { Signature } from "./signature";
|
|
14
|
+
import { convertSigningMessage } from "./utils";
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* Represents the Secp256k1 ecdsa public key
|
|
@@ -46,8 +47,8 @@ export class Secp256k1PublicKey extends PublicKey {
|
|
|
46
47
|
if (!(signature instanceof Secp256k1Signature)) {
|
|
47
48
|
return false;
|
|
48
49
|
}
|
|
49
|
-
|
|
50
|
-
const messageBytes = Hex.fromHexInput(
|
|
50
|
+
const messageToVerify = convertSigningMessage(message);
|
|
51
|
+
const messageBytes = Hex.fromHexInput(messageToVerify).toUint8Array();
|
|
51
52
|
const messageSha3Bytes = sha3_256(messageBytes);
|
|
52
53
|
const signatureBytes = signature.toUint8Array();
|
|
53
54
|
return secp256k1.verify(signatureBytes, messageSha3Bytes, this.key.toUint8Array());
|
|
@@ -165,11 +166,12 @@ export class Secp256k1PrivateKey extends Serializable implements PrivateKey {
|
|
|
165
166
|
/**
|
|
166
167
|
* Sign the given message with the private key.
|
|
167
168
|
*
|
|
168
|
-
* @param message
|
|
169
|
+
* @param message a message as a string or Uint8Array
|
|
169
170
|
* @returns Signature
|
|
170
171
|
*/
|
|
171
172
|
sign(message: HexInput): Secp256k1Signature {
|
|
172
|
-
const
|
|
173
|
+
const messageToSign = convertSigningMessage(message);
|
|
174
|
+
const messageBytes = Hex.fromHexInput(messageToSign);
|
|
173
175
|
const messageHashBytes = sha3_256(messageBytes.toUint8Array());
|
|
174
176
|
const signature = secp256k1.sign(messageHashBytes, this.key.toUint8Array());
|
|
175
177
|
return new Secp256k1Signature(signature.toCompactRawBytes());
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { HexInput } from "../../types";
|
|
2
|
+
import { Hex } from "../hex";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Helper function to convert a message to sign or to verify to a valid message input
|
|
6
|
+
*
|
|
7
|
+
* @param message a message as a string or Uint8Array
|
|
8
|
+
*
|
|
9
|
+
* @returns a valid HexInput - string or Uint8Array
|
|
10
|
+
*/
|
|
11
|
+
export const convertSigningMessage = (message: HexInput): HexInput => {
|
|
12
|
+
// if message is of type string, verify it is a valid Hex string
|
|
13
|
+
if (typeof message === "string") {
|
|
14
|
+
const isValid = Hex.isValid(message);
|
|
15
|
+
// If message is not a valid Hex string, convert it into a Buffer
|
|
16
|
+
if (!isValid.valid) {
|
|
17
|
+
return Buffer.from(message, "utf8");
|
|
18
|
+
}
|
|
19
|
+
// If message is a valid Hex string, return it
|
|
20
|
+
return message;
|
|
21
|
+
}
|
|
22
|
+
// message is a Uint8Array
|
|
23
|
+
return message;
|
|
24
|
+
};
|
package/src/core/hex.ts
CHANGED
|
@@ -37,7 +37,7 @@ export enum HexInvalidReason {
|
|
|
37
37
|
* with a leading 0x prefix, regardless of what the input format was.
|
|
38
38
|
*
|
|
39
39
|
* These are some other ways to chain the functions together:
|
|
40
|
-
* - `Hex.
|
|
40
|
+
* - `Hex.fromHexString({ hexInput: "0x1f" }).toUint8Array()`
|
|
41
41
|
* - `new Hex([1, 3]).toStringWithoutPrefix()`
|
|
42
42
|
*/
|
|
43
43
|
export class Hex {
|
|
@@ -95,7 +95,7 @@ export class Hex {
|
|
|
95
95
|
*
|
|
96
96
|
* @returns Hex
|
|
97
97
|
*/
|
|
98
|
-
static
|
|
98
|
+
static fromHexString(str: string): Hex {
|
|
99
99
|
let input = str;
|
|
100
100
|
|
|
101
101
|
if (input.startsWith("0x")) {
|
|
@@ -132,7 +132,7 @@ export class Hex {
|
|
|
132
132
|
*/
|
|
133
133
|
static fromHexInput(hexInput: HexInput): Hex {
|
|
134
134
|
if (hexInput instanceof Uint8Array) return new Hex(hexInput);
|
|
135
|
-
return Hex.
|
|
135
|
+
return Hex.fromHexString(hexInput);
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
// ===
|
|
@@ -150,7 +150,7 @@ export class Hex {
|
|
|
150
150
|
*/
|
|
151
151
|
static isValid(str: string): ParsingResult<HexInvalidReason> {
|
|
152
152
|
try {
|
|
153
|
-
Hex.
|
|
153
|
+
Hex.fromHexString(str);
|
|
154
154
|
return { valid: true };
|
|
155
155
|
} catch (error: any) {
|
|
156
156
|
return {
|
package/src/index.ts
CHANGED
package/src/internal/ans.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
import { AptosConfig } from "../api/aptosConfig";
|
|
12
12
|
import { Account, AccountAddress, AccountAddressInput } from "../core";
|
|
13
|
-
import { InputGenerateTransactionOptions
|
|
13
|
+
import { InputGenerateTransactionOptions } from "../transactions/types";
|
|
14
14
|
import { GetANSNameResponse, MoveAddressType, OrderByArg, PaginationArgs, WhereArg } from "../types";
|
|
15
15
|
import { GetNamesQuery } from "../types/generated/operations";
|
|
16
16
|
import { GetNames } from "../types/generated/queries";
|
|
@@ -19,6 +19,7 @@ import { Network } from "../utils/apiEndpoints";
|
|
|
19
19
|
import { queryIndexer } from "./general";
|
|
20
20
|
import { view } from "./view";
|
|
21
21
|
import { generateTransaction } from "./transactionSubmission";
|
|
22
|
+
import { SimpleTransaction } from "../transactions/instances/simpleTransaction";
|
|
22
23
|
|
|
23
24
|
export const VALIDATION_RULES_DESCRIPTION = [
|
|
24
25
|
"A name must be between 3 and 63 characters long,",
|
|
@@ -94,7 +95,10 @@ const unwrapOption = <T>(option: any): T | undefined => {
|
|
|
94
95
|
return undefined;
|
|
95
96
|
};
|
|
96
97
|
|
|
97
|
-
export async function getOwnerAddress(args: {
|
|
98
|
+
export async function getOwnerAddress(args: {
|
|
99
|
+
aptosConfig: AptosConfig;
|
|
100
|
+
name: string;
|
|
101
|
+
}): Promise<AccountAddress | undefined> {
|
|
98
102
|
const { aptosConfig, name } = args;
|
|
99
103
|
const routerAddress = getRouterAddress(aptosConfig);
|
|
100
104
|
const { domainName, subdomainName } = isValidANSName(name);
|
|
@@ -109,7 +113,7 @@ export async function getOwnerAddress(args: { aptosConfig: AptosConfig; name: st
|
|
|
109
113
|
|
|
110
114
|
const owner = unwrapOption<MoveAddressType>(res[0]);
|
|
111
115
|
|
|
112
|
-
return owner ? AccountAddress.from(owner)
|
|
116
|
+
return owner ? AccountAddress.from(owner) : undefined;
|
|
113
117
|
}
|
|
114
118
|
|
|
115
119
|
export interface RegisterNameParameters {
|
|
@@ -289,7 +293,7 @@ export async function setPrimaryName(args: {
|
|
|
289
293
|
export async function getTargetAddress(args: {
|
|
290
294
|
aptosConfig: AptosConfig;
|
|
291
295
|
name: string;
|
|
292
|
-
}): Promise<
|
|
296
|
+
}): Promise<AccountAddress | undefined> {
|
|
293
297
|
const { aptosConfig, name } = args;
|
|
294
298
|
const routerAddress = getRouterAddress(aptosConfig);
|
|
295
299
|
const { domainName, subdomainName } = isValidANSName(name);
|
|
@@ -303,7 +307,7 @@ export async function getTargetAddress(args: {
|
|
|
303
307
|
});
|
|
304
308
|
|
|
305
309
|
const target = unwrapOption<MoveAddressType>(res[0]);
|
|
306
|
-
return target ? AccountAddress.from(target)
|
|
310
|
+
return target ? AccountAddress.from(target) : undefined;
|
|
307
311
|
}
|
|
308
312
|
|
|
309
313
|
export async function setTargetAddress(args: {
|
package/src/internal/coin.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { AptosConfig } from "../api/aptosConfig";
|
|
2
2
|
import { AccountAddressInput } from "../core";
|
|
3
|
-
import { EntryFunctionABI, InputGenerateTransactionOptions
|
|
3
|
+
import { EntryFunctionABI, InputGenerateTransactionOptions } from "../transactions/types";
|
|
4
4
|
import { AnyNumber, MoveStructId } from "../types";
|
|
5
5
|
import { APTOS_COIN } from "../utils/const";
|
|
6
6
|
import { generateTransaction } from "./transactionSubmission";
|
|
7
7
|
import { TypeTagAddress, TypeTagU64 } from "../transactions";
|
|
8
|
+
import { SimpleTransaction } from "../transactions/instances/simpleTransaction";
|
|
8
9
|
|
|
9
10
|
const coinTransferAbi: EntryFunctionABI = {
|
|
10
11
|
typeParameters: [{ constraints: [] }],
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import { AptosConfig } from "../api/aptosConfig";
|
|
12
12
|
import { Bool, MoveString, MoveVector, U64 } from "../bcs";
|
|
13
13
|
import { Account, AccountAddress, AccountAddressInput } from "../core";
|
|
14
|
-
import { EntryFunctionABI, InputGenerateTransactionOptions
|
|
14
|
+
import { EntryFunctionABI, InputGenerateTransactionOptions } from "../transactions/types";
|
|
15
15
|
import {
|
|
16
16
|
AnyNumber,
|
|
17
17
|
GetCollectionDataResponse,
|
|
@@ -53,6 +53,7 @@ import {
|
|
|
53
53
|
TypeTagU64,
|
|
54
54
|
TypeTagVector,
|
|
55
55
|
} from "../transactions";
|
|
56
|
+
import { SimpleTransaction } from "../transactions/instances/simpleTransaction";
|
|
56
57
|
|
|
57
58
|
// A property type map for the user input and what Move expects
|
|
58
59
|
const PropertyTypeMap = {
|
|
@@ -38,11 +38,11 @@ import {
|
|
|
38
38
|
EntryFunctionABI,
|
|
39
39
|
InputGenerateTransactionOptions,
|
|
40
40
|
parseTypeTag,
|
|
41
|
-
SimpleTransaction,
|
|
42
41
|
TypeTagAddress,
|
|
43
42
|
TypeTagU64,
|
|
44
43
|
} from "../transactions";
|
|
45
44
|
import { generateTransaction } from "./transactionSubmission";
|
|
45
|
+
import { SimpleTransaction } from "../transactions/instances/simpleTransaction";
|
|
46
46
|
|
|
47
47
|
export async function getFungibleAssetMetadata(args: {
|
|
48
48
|
aptosConfig: AptosConfig;
|
|
@@ -26,18 +26,18 @@ import {
|
|
|
26
26
|
AnyRawTransaction,
|
|
27
27
|
InputSimulateTransactionData,
|
|
28
28
|
InputGenerateTransactionOptions,
|
|
29
|
-
SimpleTransaction,
|
|
30
29
|
InputGenerateTransactionPayloadDataWithRemoteABI,
|
|
31
30
|
InputSubmitTransactionData,
|
|
32
31
|
InputGenerateMultiAgentRawTransactionData,
|
|
33
32
|
InputGenerateSingleSignerRawTransactionData,
|
|
34
|
-
MultiAgentTransaction,
|
|
35
33
|
AnyTransactionPayloadInstance,
|
|
36
34
|
EntryFunctionABI,
|
|
37
35
|
} from "../transactions/types";
|
|
38
36
|
import { getInfo } from "./account";
|
|
39
37
|
import { UserTransactionResponse, PendingTransactionResponse, MimeType, HexInput, TransactionResponse } from "../types";
|
|
40
38
|
import { TypeTagU8, TypeTagVector } from "../transactions";
|
|
39
|
+
import { SimpleTransaction } from "../transactions/instances/simpleTransaction";
|
|
40
|
+
import { MultiAgentTransaction } from "../transactions/instances/multiAgentTransaction";
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* We are defining function signatures, each with its specific input and output.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// Copyright © Aptos Foundation
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
5
|
+
|
|
6
|
+
import { Deserializer } from "../../bcs/deserializer";
|
|
7
|
+
import { Serializable, Serializer } from "../../bcs/serializer";
|
|
8
|
+
import { AccountAddress } from "../../core";
|
|
9
|
+
import { RawTransaction } from "./rawTransaction";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Representation of a Raw Transaction that can serialized and deserialized
|
|
13
|
+
*/
|
|
14
|
+
export class MultiAgentTransaction extends Serializable {
|
|
15
|
+
public rawTransaction: RawTransaction;
|
|
16
|
+
|
|
17
|
+
public feePayerAddress?: AccountAddress | undefined;
|
|
18
|
+
|
|
19
|
+
public secondarySignerAddresses: AccountAddress[];
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* SimpleTransaction represents a simple transaction type of a single signer that
|
|
23
|
+
* can be submitted to Aptos chain for execution.
|
|
24
|
+
*
|
|
25
|
+
* SimpleTransaction metadata contains the Raw Transaction and an optional
|
|
26
|
+
* sponsor Account Address to pay the gas fees.
|
|
27
|
+
*
|
|
28
|
+
* @param rawTransaction The Raw Tranasaction
|
|
29
|
+
* @param feePayerAddress The sponsor Account Address
|
|
30
|
+
*/
|
|
31
|
+
constructor(
|
|
32
|
+
rawTransaction: RawTransaction,
|
|
33
|
+
secondarySignerAddresses: AccountAddress[],
|
|
34
|
+
feePayerAddress?: AccountAddress,
|
|
35
|
+
) {
|
|
36
|
+
super();
|
|
37
|
+
this.rawTransaction = rawTransaction;
|
|
38
|
+
this.feePayerAddress = feePayerAddress;
|
|
39
|
+
this.secondarySignerAddresses = secondarySignerAddresses;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
serialize(serializer: Serializer): void {
|
|
43
|
+
this.rawTransaction.serialize(serializer);
|
|
44
|
+
|
|
45
|
+
serializer.serializeVector<AccountAddress>(this.secondarySignerAddresses);
|
|
46
|
+
|
|
47
|
+
if (this.feePayerAddress === undefined) {
|
|
48
|
+
serializer.serializeBool(false);
|
|
49
|
+
} else {
|
|
50
|
+
serializer.serializeBool(true);
|
|
51
|
+
this.feePayerAddress.serialize(serializer);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
static deserialize(deserializer: Deserializer): MultiAgentTransaction {
|
|
56
|
+
const rawTransaction = RawTransaction.deserialize(deserializer);
|
|
57
|
+
|
|
58
|
+
const secondarySignerAddresses = deserializer.deserializeVector(AccountAddress);
|
|
59
|
+
|
|
60
|
+
const feepayerPresent = deserializer.deserializeBool();
|
|
61
|
+
let feePayerAddress;
|
|
62
|
+
if (feepayerPresent) {
|
|
63
|
+
feePayerAddress = AccountAddress.deserialize(deserializer);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return new MultiAgentTransaction(rawTransaction, secondarySignerAddresses, feePayerAddress);
|
|
67
|
+
}
|
|
68
|
+
}
|