@aptos-labs/ts-sdk 1.14.0 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/{accountAddress-csDQ8Gnp.d.ts → accountAddress-ccLvlUQe.d.ts} +20 -1
- package/dist/common/cli/index.d.ts +1 -1
- package/dist/common/index.d.ts +1624 -1390
- package/dist/common/index.js +42 -13
- package/dist/common/index.js.map +1 -1
- package/dist/esm/{Ed25519Account--qjfup2u.d.mts → Ed25519Account-B1VMJOY2.d.mts} +77 -10
- package/dist/esm/account/Account.d.mts +34 -0
- package/dist/esm/account/Account.mjs +2 -0
- package/dist/esm/account/Ed25519Account.d.mts +34 -0
- package/dist/esm/account/Ed25519Account.mjs +2 -0
- package/dist/esm/account/MultiKeyAccount.d.mts +133 -0
- package/dist/esm/account/MultiKeyAccount.mjs +2 -0
- package/dist/esm/account/SingleKeyAccount.d.mts +34 -0
- package/dist/esm/account/SingleKeyAccount.mjs +2 -0
- package/dist/esm/account/index.d.mts +35 -0
- package/dist/esm/account/index.mjs +2 -0
- package/dist/esm/api/account.d.mts +14 -2
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.d.mts +3 -3
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +11 -9
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/coin.d.mts +7 -7
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.d.mts +2 -2
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/event.mjs +1 -1
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.d.mts +6 -6
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.d.mts +8 -33
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +10 -9
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/table.d.mts +84 -0
- package/dist/esm/api/table.mjs +2 -0
- package/dist/esm/api/transaction.d.mts +2 -2
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.d.mts +2 -2
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.d.mts +9 -9
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.d.mts +2 -2
- package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
- package/dist/esm/api/transactionSubmission/simulate.d.mts +7 -7
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.d.mts +1 -1
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/bcs/serializer.mjs +1 -1
- package/dist/esm/{chunk-O4JRPZZM.mjs → chunk-2X7A4HUS.mjs} +2 -2
- package/dist/esm/{chunk-PXFIA4BL.mjs → chunk-2XK53QFA.mjs} +2 -2
- package/dist/esm/{chunk-RHBCVCOS.mjs → chunk-35EWRSDK.mjs} +2 -2
- package/dist/esm/{chunk-52C73T26.mjs → chunk-36QXVFR5.mjs} +2 -2
- package/dist/esm/{chunk-P3UFJZY5.mjs → chunk-3Y46WJUR.mjs} +2 -2
- package/dist/esm/chunk-3Y46WJUR.mjs.map +1 -0
- package/dist/esm/{chunk-FXNFWLQC.mjs → chunk-4GWNWSZP.mjs} +2 -2
- package/dist/esm/chunk-4NHWV5AI.mjs +2 -0
- package/dist/esm/chunk-53INTTOI.mjs +2 -0
- package/dist/esm/{chunk-NPFNYP75.mjs → chunk-5EN52MUT.mjs} +2 -2
- package/dist/esm/{chunk-BIAEC6FO.mjs → chunk-A4JUQZXI.mjs} +2 -2
- package/dist/esm/chunk-AF5WNJOP.mjs +2 -0
- package/dist/esm/{chunk-BAV4XY7C.mjs → chunk-AHW3SKT7.mjs} +2 -2
- package/dist/esm/chunk-B7X6PSE7.mjs +2 -0
- package/dist/esm/chunk-BBKE2QJU.mjs +2 -0
- package/dist/esm/chunk-BBKE2QJU.mjs.map +1 -0
- package/dist/esm/{chunk-AOCNYMMX.mjs → chunk-BCUSI3N6.mjs} +2 -2
- package/dist/esm/{chunk-QD2Y3VK4.mjs → chunk-BN22EYXR.mjs} +2 -2
- package/dist/esm/chunk-BN22EYXR.mjs.map +1 -0
- package/dist/esm/chunk-CEHCDA3G.mjs +2 -0
- package/dist/esm/{chunk-PMUT3HZE.mjs → chunk-CHWE77CR.mjs} +2 -2
- package/dist/esm/chunk-CHWE77CR.mjs.map +1 -0
- package/dist/esm/chunk-CJDEPZ4J.mjs +2 -0
- package/dist/esm/{chunk-CPBGL37X.mjs.map → chunk-CJDEPZ4J.mjs.map} +1 -1
- package/dist/esm/{chunk-4P5EKAJB.mjs → chunk-CYTRYBWN.mjs} +2 -2
- package/dist/esm/{chunk-NWYIE7ZX.mjs → chunk-DZSDCUP2.mjs} +2 -2
- package/dist/esm/chunk-E56MTU2U.mjs +2 -0
- package/dist/esm/chunk-E56MTU2U.mjs.map +1 -0
- package/dist/esm/{chunk-5HY3DEPF.mjs → chunk-EA2DKJPX.mjs} +2 -2
- package/dist/esm/{chunk-HG4Q4EFG.mjs → chunk-ERIPXWXJ.mjs} +2 -2
- package/dist/esm/chunk-ERIPXWXJ.mjs.map +1 -0
- package/dist/esm/chunk-EZPUVLME.mjs +2 -0
- package/dist/esm/chunk-F4GDEXZ6.mjs +2 -0
- package/dist/esm/chunk-F4GDEXZ6.mjs.map +1 -0
- package/dist/esm/chunk-F7EMGK4M.mjs +2 -0
- package/dist/esm/chunk-F7NLNWHN.mjs +2 -0
- package/dist/esm/chunk-F7NLNWHN.mjs.map +1 -0
- package/dist/esm/chunk-FFGY7Z4B.mjs +2 -0
- package/dist/esm/chunk-FFGY7Z4B.mjs.map +1 -0
- package/dist/esm/{chunk-FS3NSGBF.mjs → chunk-G56GPLTB.mjs} +2 -2
- package/dist/esm/{chunk-6FBKUTGF.mjs → chunk-GHYE26Q5.mjs} +2 -2
- package/dist/esm/{chunk-QTRYMRYK.mjs → chunk-GM56MMNJ.mjs} +2 -2
- package/dist/esm/chunk-GP6Z47HM.mjs +2 -0
- package/dist/esm/chunk-GP6Z47HM.mjs.map +1 -0
- package/dist/esm/chunk-GPEM3JVU.mjs +2 -0
- package/dist/esm/{chunk-6OV2PQS5.mjs → chunk-GUALXVFI.mjs} +2 -2
- package/dist/esm/chunk-H6FEXRTK.mjs +2 -0
- package/dist/esm/chunk-H6FEXRTK.mjs.map +1 -0
- package/dist/esm/{chunk-S2LTZKM4.mjs → chunk-HSJTQLI2.mjs} +2 -2
- package/dist/esm/chunk-I5T6PHDV.mjs +2 -0
- package/dist/esm/{chunk-AT2A6UGB.mjs → chunk-IENCDVPF.mjs} +2 -2
- package/dist/esm/{chunk-AT2A6UGB.mjs.map → chunk-IENCDVPF.mjs.map} +1 -1
- package/dist/esm/{chunk-PYXJYEAC.mjs → chunk-JGSOTNJ5.mjs} +2 -2
- package/dist/esm/chunk-JGSOTNJ5.mjs.map +1 -0
- package/dist/esm/chunk-JQIGQMNZ.mjs +2 -0
- package/dist/esm/chunk-JQIGQMNZ.mjs.map +1 -0
- package/dist/esm/{chunk-UPIN5AIO.mjs → chunk-JX75UKJX.mjs} +2 -2
- package/dist/esm/chunk-JXCZTOYC.mjs +1 -0
- package/dist/esm/chunk-JXCZTOYC.mjs.map +1 -0
- package/dist/esm/{chunk-UML2VQZT.mjs → chunk-KAGLWBIJ.mjs} +2 -2
- package/dist/esm/chunk-LG7RJQ57.mjs +2 -0
- package/dist/esm/chunk-LQNPI3IR.mjs +2 -0
- package/dist/esm/chunk-LQNPI3IR.mjs.map +1 -0
- package/dist/esm/{chunk-XO3HHRJV.mjs → chunk-MCRRHBFQ.mjs} +2 -2
- package/dist/esm/{chunk-U43IJHQN.mjs → chunk-MJPUASSD.mjs} +2 -2
- package/dist/esm/chunk-N3U47Y6Y.mjs +2 -0
- package/dist/esm/{chunk-3YZGJLW7.mjs → chunk-NGQR5UQ3.mjs} +2 -2
- package/dist/esm/chunk-O2K7RZWM.mjs +2 -0
- package/dist/esm/chunk-O2K7RZWM.mjs.map +1 -0
- package/dist/esm/chunk-O4WVPLUX.mjs +2 -0
- package/dist/esm/{chunk-RW2A63WK.mjs → chunk-P46OPJB4.mjs} +2 -2
- package/dist/esm/chunk-P46OPJB4.mjs.map +1 -0
- package/dist/esm/chunk-P5TZBE3L.mjs +2 -0
- package/dist/esm/chunk-P5TZBE3L.mjs.map +1 -0
- package/dist/esm/chunk-PF57EOJY.mjs +2 -0
- package/dist/esm/chunk-PIVZMT5D.mjs +2 -0
- package/dist/esm/chunk-PIVZMT5D.mjs.map +1 -0
- package/dist/esm/chunk-PZ4SAXY7.mjs +2 -0
- package/dist/esm/chunk-PZ4SAXY7.mjs.map +1 -0
- package/dist/esm/{chunk-IOSQVDZI.mjs → chunk-QRS4DGP3.mjs} +2 -2
- package/dist/esm/{chunk-IOSQVDZI.mjs.map → chunk-QRS4DGP3.mjs.map} +1 -1
- package/dist/esm/{chunk-N77VJHW5.mjs → chunk-R5ST36VJ.mjs} +2 -2
- package/dist/esm/chunk-RFSO3JRG.mjs +1 -0
- package/dist/esm/chunk-RFSO3JRG.mjs.map +1 -0
- package/dist/esm/chunk-RFZ5LTGP.mjs +2 -0
- package/dist/esm/chunk-RFZ5LTGP.mjs.map +1 -0
- package/dist/esm/{chunk-SPU745XV.mjs → chunk-RT6LEYHZ.mjs} +2 -2
- package/dist/esm/{chunk-APDALGDD.mjs → chunk-S2VSJJRJ.mjs} +2 -2
- package/dist/esm/{chunk-S4SEFF4K.mjs → chunk-S3EDNXZE.mjs} +46 -17
- package/dist/esm/chunk-S3EDNXZE.mjs.map +1 -0
- package/dist/esm/chunk-SRDIYE3M.mjs +2 -0
- package/dist/esm/{chunk-QIAHBEEW.mjs.map → chunk-SRDIYE3M.mjs.map} +1 -1
- package/dist/esm/{chunk-CNMQNPNV.mjs → chunk-T2AGN5YT.mjs} +2 -2
- package/dist/esm/chunk-TM7NDDT3.mjs +2 -0
- package/dist/esm/chunk-TM7NDDT3.mjs.map +1 -0
- package/dist/esm/{chunk-DMKUAQB7.mjs → chunk-U3YYSIIT.mjs} +2 -2
- package/dist/esm/chunk-UGPALAPN.mjs +2 -0
- package/dist/esm/chunk-UO3NZ5AH.mjs +1 -0
- package/dist/esm/chunk-UO3NZ5AH.mjs.map +1 -0
- package/dist/esm/chunk-UR3JTLIT.mjs +2 -0
- package/dist/esm/chunk-UR3JTLIT.mjs.map +1 -0
- package/dist/esm/{chunk-2G4ZSGL4.mjs → chunk-UW2FPXYA.mjs} +2 -2
- package/dist/esm/{chunk-CDB34C4N.mjs → chunk-WN3JL7ZT.mjs} +2 -2
- package/dist/esm/chunk-WN3JL7ZT.mjs.map +1 -0
- package/dist/esm/{chunk-HWECUBBA.mjs → chunk-WNPL4SEJ.mjs} +2 -2
- package/dist/esm/chunk-WNPL4SEJ.mjs.map +1 -0
- package/dist/esm/{chunk-WCVUDO5S.mjs → chunk-XFSDV3ND.mjs} +2 -2
- package/dist/esm/{chunk-BE4FOV6X.mjs → chunk-YCC6HN74.mjs} +2 -2
- package/dist/esm/chunk-YK63A5T6.mjs +2 -0
- package/dist/esm/chunk-YK63A5T6.mjs.map +1 -0
- package/dist/esm/{chunk-UDRSFVAK.mjs → chunk-YMB2XW2O.mjs} +2 -2
- package/dist/esm/{chunk-JCD72AW7.mjs → chunk-ZCG6WBLE.mjs} +2 -2
- package/dist/esm/chunk-ZM33M6QO.mjs +2 -0
- package/dist/esm/chunk-ZM33M6QO.mjs.map +1 -0
- package/dist/esm/cli/index.d.mts +1 -1
- package/dist/esm/cli/move.d.mts +1 -1
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/client/types.mjs +1 -1
- package/dist/esm/core/account/index.d.mts +5 -14
- package/dist/esm/core/account/index.mjs +1 -1
- package/dist/esm/core/account/utils/address.mjs +1 -1
- package/dist/esm/core/account/utils/index.mjs +1 -1
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.d.mts +1 -1
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/common.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.d.mts +1 -1
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/index.d.mts +4 -4
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/multiEd25519.d.mts +1 -1
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.d.mts +8 -1
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/privateKey.d.mts +1 -1
- package/dist/esm/core/crypto/publicKey.d.mts +1 -1
- package/dist/esm/core/crypto/publicKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.d.mts +1 -1
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.d.mts +1 -1
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/crypto/utils.mjs +1 -1
- package/dist/esm/core/hex.mjs +1 -1
- package/dist/esm/core/index.d.mts +3 -6
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/index.d.mts +7 -5
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/account.d.mts +15 -3
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.d.mts +3 -3
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.d.mts +8 -8
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.d.mts +3 -3
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/event.d.mts +1 -1
- package/dist/esm/internal/event.mjs +1 -1
- package/dist/esm/internal/faucet.d.mts +1 -1
- package/dist/esm/internal/faucet.mjs +1 -1
- package/dist/esm/internal/fungibleAsset.d.mts +6 -6
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.d.mts +2 -8
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/staking.d.mts +1 -1
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/table.d.mts +31 -0
- package/dist/esm/internal/table.mjs +2 -0
- package/dist/esm/internal/table.mjs.map +1 -0
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.d.mts +2 -2
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/internal/view.d.mts +7 -7
- package/dist/esm/internal/view.mjs +1 -1
- package/dist/esm/transactions/authenticator/account.d.mts +4 -5
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.d.mts +1 -1
- package/dist/esm/transactions/authenticator/index.mjs +1 -1
- package/dist/esm/transactions/authenticator/transaction.d.mts +1 -1
- package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
- package/dist/esm/transactions/index.d.mts +3 -3
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/instances/chainId.mjs +1 -1
- package/dist/esm/transactions/instances/identifier.mjs +1 -1
- package/dist/esm/transactions/instances/index.d.mts +1 -1
- package/dist/esm/transactions/instances/index.mjs +1 -1
- package/dist/esm/transactions/instances/moduleId.d.mts +1 -1
- package/dist/esm/transactions/instances/moduleId.mjs +1 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.d.mts +1 -1
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/transactionPayload.d.mts +1 -1
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.d.mts +14 -2
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/index.d.mts +3 -3
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.d.mts +2 -2
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.d.mts +9 -9
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.d.mts +9 -9
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +6 -6
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +72 -0
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +2 -0
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs.map +1 -0
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +7 -29
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
- package/dist/esm/transactions/typeTag/index.mjs +1 -1
- package/dist/esm/transactions/typeTag/parser.mjs +1 -1
- package/dist/esm/transactions/types.d.mts +7 -7
- package/dist/esm/types/generated/operations.d.mts +31 -2
- package/dist/esm/types/generated/queries.d.mts +6 -2
- package/dist/esm/types/generated/queries.mjs +1 -1
- package/dist/esm/types/generated/types.d.mts +212 -7
- package/dist/esm/types/generated/types.mjs +1 -1
- package/dist/esm/types/generated/types.mjs.map +1 -1
- package/dist/esm/types/index.d.mts +1 -1
- package/dist/esm/types/indexer.d.mts +4 -2
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/utils/normalizeBundle.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
- package/src/{core/account → account}/Account.ts +25 -15
- package/src/{core/account → account}/Ed25519Account.ts +45 -9
- package/src/account/MultiKeyAccount.ts +176 -0
- package/src/{core/account → account}/SingleKeyAccount.ts +45 -10
- package/src/account/index.ts +4 -0
- package/src/api/account.ts +2 -1
- package/src/api/ans.ts +2 -1
- package/src/api/aptos.ts +6 -0
- package/src/api/digitalAsset.ts +2 -1
- package/src/api/fungibleAsset.ts +2 -1
- package/src/api/general.ts +0 -26
- package/src/api/table.ts +108 -0
- package/src/api/transaction.ts +2 -1
- package/src/api/transactionSubmission/management.ts +1 -1
- package/src/api/transactionSubmission/sign.ts +1 -1
- package/src/core/account/index.ts +0 -3
- package/src/core/crypto/multiKey.ts +17 -6
- package/src/core/index.ts +0 -1
- package/src/index.ts +1 -0
- package/src/internal/account.ts +3 -2
- package/src/internal/ans.ts +2 -1
- package/src/internal/digitalAsset.ts +2 -1
- package/src/internal/fungibleAsset.ts +2 -1
- package/src/internal/general.ts +1 -20
- package/src/internal/queries/currentTokenOwnershipFieldsFragment.graphql +1 -0
- package/src/internal/queries/getTableItemsData.graphql +15 -0
- package/src/internal/queries/getTableItemsMetadata.graphql +12 -0
- package/src/internal/table.ts +82 -0
- package/src/internal/transactionSubmission.ts +5 -7
- package/src/transactions/authenticator/account.ts +6 -11
- package/src/transactions/management/accountSequenceNumber.ts +1 -1
- package/src/transactions/management/transactionWorker.ts +1 -1
- package/src/transactions/transactionBuilder/index.ts +1 -0
- package/src/transactions/transactionBuilder/signingMessage.ts +93 -0
- package/src/transactions/transactionBuilder/transactionBuilder.ts +2 -73
- package/src/types/generated/operations.ts +29 -0
- package/src/types/generated/queries.ts +59 -0
- package/src/types/generated/types.ts +223 -4
- package/src/types/indexer.ts +4 -0
- package/src/version.ts +1 -1
- package/dist/esm/chunk-4374JPA6.mjs +0 -2
- package/dist/esm/chunk-4374JPA6.mjs.map +0 -1
- package/dist/esm/chunk-62P5CJAJ.mjs +0 -2
- package/dist/esm/chunk-62P5CJAJ.mjs.map +0 -1
- package/dist/esm/chunk-B3BRR4WP.mjs +0 -2
- package/dist/esm/chunk-B3BRR4WP.mjs.map +0 -1
- package/dist/esm/chunk-BWFJHFBQ.mjs +0 -2
- package/dist/esm/chunk-CDB34C4N.mjs.map +0 -1
- package/dist/esm/chunk-CF5R4HVB.mjs +0 -2
- package/dist/esm/chunk-CPBGL37X.mjs +0 -2
- package/dist/esm/chunk-DSTKXJMA.mjs +0 -2
- package/dist/esm/chunk-E7FWVXGX.mjs +0 -1
- package/dist/esm/chunk-FBPNHF54.mjs +0 -2
- package/dist/esm/chunk-HG4Q4EFG.mjs.map +0 -1
- package/dist/esm/chunk-HWECUBBA.mjs.map +0 -1
- package/dist/esm/chunk-IR46T46A.mjs +0 -2
- package/dist/esm/chunk-IR46T46A.mjs.map +0 -1
- package/dist/esm/chunk-L5IL2IAB.mjs +0 -2
- package/dist/esm/chunk-LBGYH45K.mjs +0 -2
- package/dist/esm/chunk-LBGYH45K.mjs.map +0 -1
- package/dist/esm/chunk-MFL3UCKA.mjs +0 -2
- package/dist/esm/chunk-MFL3UCKA.mjs.map +0 -1
- package/dist/esm/chunk-MLWIHWNH.mjs +0 -1
- package/dist/esm/chunk-NBCHJ75L.mjs +0 -2
- package/dist/esm/chunk-NBCHJ75L.mjs.map +0 -1
- package/dist/esm/chunk-NZGRLKRG.mjs +0 -2
- package/dist/esm/chunk-OGHE4AQA.mjs +0 -2
- package/dist/esm/chunk-P3UFJZY5.mjs.map +0 -1
- package/dist/esm/chunk-PJPXC22D.mjs +0 -2
- package/dist/esm/chunk-PJPXC22D.mjs.map +0 -1
- package/dist/esm/chunk-PMUT3HZE.mjs.map +0 -1
- package/dist/esm/chunk-PYXJYEAC.mjs.map +0 -1
- package/dist/esm/chunk-QD2Y3VK4.mjs.map +0 -1
- package/dist/esm/chunk-QIAHBEEW.mjs +0 -2
- package/dist/esm/chunk-QIAU5K5Y.mjs +0 -2
- package/dist/esm/chunk-QIAU5K5Y.mjs.map +0 -1
- package/dist/esm/chunk-R5QUBEH6.mjs +0 -2
- package/dist/esm/chunk-R7G3CLRI.mjs +0 -1
- package/dist/esm/chunk-RR7I2HLA.mjs +0 -2
- package/dist/esm/chunk-RR7I2HLA.mjs.map +0 -1
- package/dist/esm/chunk-RW2A63WK.mjs.map +0 -1
- package/dist/esm/chunk-S4SEFF4K.mjs.map +0 -1
- package/dist/esm/chunk-TBMAJ6AW.mjs +0 -2
- package/dist/esm/chunk-TGXZVNR5.mjs +0 -2
- package/dist/esm/chunk-TJDC5PWD.mjs +0 -2
- package/dist/esm/chunk-UF534PKA.mjs +0 -2
- package/dist/esm/chunk-UF534PKA.mjs.map +0 -1
- package/dist/esm/chunk-UMDTVVQC.mjs +0 -2
- package/dist/esm/chunk-UMDTVVQC.mjs.map +0 -1
- package/dist/esm/chunk-UNU3RVRJ.mjs +0 -2
- package/dist/esm/chunk-WFZDFFBM.mjs +0 -2
- package/dist/esm/chunk-XIJHRBDL.mjs +0 -2
- package/dist/esm/chunk-XIJHRBDL.mjs.map +0 -1
- package/dist/esm/chunk-ZEHKHKBP.mjs +0 -2
- package/dist/esm/chunk-ZEHKHKBP.mjs.map +0 -1
- package/dist/esm/chunk-ZYYK3UXP.mjs +0 -2
- package/dist/esm/core/account/Account.d.mts +0 -20
- package/dist/esm/core/account/Account.mjs +0 -2
- package/dist/esm/core/account/Ed25519Account.d.mts +0 -20
- package/dist/esm/core/account/Ed25519Account.mjs +0 -2
- package/dist/esm/core/account/SingleKeyAccount.d.mts +0 -20
- package/dist/esm/core/account/SingleKeyAccount.mjs +0 -2
- /package/dist/esm/{core/account → account}/Account.mjs.map +0 -0
- /package/dist/esm/{core/account → account}/Ed25519Account.mjs.map +0 -0
- /package/dist/esm/{chunk-E7FWVXGX.mjs.map → account/MultiKeyAccount.mjs.map} +0 -0
- /package/dist/esm/{core/account → account}/SingleKeyAccount.mjs.map +0 -0
- /package/dist/esm/{chunk-MLWIHWNH.mjs.map → account/index.mjs.map} +0 -0
- /package/dist/esm/{chunk-R7G3CLRI.mjs.map → api/table.mjs.map} +0 -0
- /package/dist/esm/{chunk-O4JRPZZM.mjs.map → chunk-2X7A4HUS.mjs.map} +0 -0
- /package/dist/esm/{chunk-PXFIA4BL.mjs.map → chunk-2XK53QFA.mjs.map} +0 -0
- /package/dist/esm/{chunk-RHBCVCOS.mjs.map → chunk-35EWRSDK.mjs.map} +0 -0
- /package/dist/esm/{chunk-52C73T26.mjs.map → chunk-36QXVFR5.mjs.map} +0 -0
- /package/dist/esm/{chunk-FXNFWLQC.mjs.map → chunk-4GWNWSZP.mjs.map} +0 -0
- /package/dist/esm/{chunk-WFZDFFBM.mjs.map → chunk-4NHWV5AI.mjs.map} +0 -0
- /package/dist/esm/{chunk-OGHE4AQA.mjs.map → chunk-53INTTOI.mjs.map} +0 -0
- /package/dist/esm/{chunk-NPFNYP75.mjs.map → chunk-5EN52MUT.mjs.map} +0 -0
- /package/dist/esm/{chunk-BIAEC6FO.mjs.map → chunk-A4JUQZXI.mjs.map} +0 -0
- /package/dist/esm/{chunk-TGXZVNR5.mjs.map → chunk-AF5WNJOP.mjs.map} +0 -0
- /package/dist/esm/{chunk-BAV4XY7C.mjs.map → chunk-AHW3SKT7.mjs.map} +0 -0
- /package/dist/esm/{chunk-DSTKXJMA.mjs.map → chunk-B7X6PSE7.mjs.map} +0 -0
- /package/dist/esm/{chunk-AOCNYMMX.mjs.map → chunk-BCUSI3N6.mjs.map} +0 -0
- /package/dist/esm/{chunk-TBMAJ6AW.mjs.map → chunk-CEHCDA3G.mjs.map} +0 -0
- /package/dist/esm/{chunk-4P5EKAJB.mjs.map → chunk-CYTRYBWN.mjs.map} +0 -0
- /package/dist/esm/{chunk-NWYIE7ZX.mjs.map → chunk-DZSDCUP2.mjs.map} +0 -0
- /package/dist/esm/{chunk-5HY3DEPF.mjs.map → chunk-EA2DKJPX.mjs.map} +0 -0
- /package/dist/esm/{chunk-L5IL2IAB.mjs.map → chunk-EZPUVLME.mjs.map} +0 -0
- /package/dist/esm/{chunk-TJDC5PWD.mjs.map → chunk-F7EMGK4M.mjs.map} +0 -0
- /package/dist/esm/{chunk-FS3NSGBF.mjs.map → chunk-G56GPLTB.mjs.map} +0 -0
- /package/dist/esm/{chunk-6FBKUTGF.mjs.map → chunk-GHYE26Q5.mjs.map} +0 -0
- /package/dist/esm/{chunk-QTRYMRYK.mjs.map → chunk-GM56MMNJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-NZGRLKRG.mjs.map → chunk-GPEM3JVU.mjs.map} +0 -0
- /package/dist/esm/{chunk-6OV2PQS5.mjs.map → chunk-GUALXVFI.mjs.map} +0 -0
- /package/dist/esm/{chunk-S2LTZKM4.mjs.map → chunk-HSJTQLI2.mjs.map} +0 -0
- /package/dist/esm/{chunk-UNU3RVRJ.mjs.map → chunk-I5T6PHDV.mjs.map} +0 -0
- /package/dist/esm/{chunk-UPIN5AIO.mjs.map → chunk-JX75UKJX.mjs.map} +0 -0
- /package/dist/esm/{chunk-UML2VQZT.mjs.map → chunk-KAGLWBIJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-FBPNHF54.mjs.map → chunk-LG7RJQ57.mjs.map} +0 -0
- /package/dist/esm/{chunk-XO3HHRJV.mjs.map → chunk-MCRRHBFQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-U43IJHQN.mjs.map → chunk-MJPUASSD.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZYYK3UXP.mjs.map → chunk-N3U47Y6Y.mjs.map} +0 -0
- /package/dist/esm/{chunk-3YZGJLW7.mjs.map → chunk-NGQR5UQ3.mjs.map} +0 -0
- /package/dist/esm/{chunk-CF5R4HVB.mjs.map → chunk-O4WVPLUX.mjs.map} +0 -0
- /package/dist/esm/{chunk-BWFJHFBQ.mjs.map → chunk-PF57EOJY.mjs.map} +0 -0
- /package/dist/esm/{chunk-N77VJHW5.mjs.map → chunk-R5ST36VJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-SPU745XV.mjs.map → chunk-RT6LEYHZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-APDALGDD.mjs.map → chunk-S2VSJJRJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-CNMQNPNV.mjs.map → chunk-T2AGN5YT.mjs.map} +0 -0
- /package/dist/esm/{chunk-DMKUAQB7.mjs.map → chunk-U3YYSIIT.mjs.map} +0 -0
- /package/dist/esm/{chunk-R5QUBEH6.mjs.map → chunk-UGPALAPN.mjs.map} +0 -0
- /package/dist/esm/{chunk-2G4ZSGL4.mjs.map → chunk-UW2FPXYA.mjs.map} +0 -0
- /package/dist/esm/{chunk-WCVUDO5S.mjs.map → chunk-XFSDV3ND.mjs.map} +0 -0
- /package/dist/esm/{chunk-BE4FOV6X.mjs.map → chunk-YCC6HN74.mjs.map} +0 -0
- /package/dist/esm/{chunk-UDRSFVAK.mjs.map → chunk-YMB2XW2O.mjs.map} +0 -0
- /package/dist/esm/{chunk-JCD72AW7.mjs.map → chunk-ZCG6WBLE.mjs.map} +0 -0
- /package/dist/esm/{publicKey-lq5djCIY.d.mts → publicKey-B3XRNhHO.d.mts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Network } from '../utils/apiEndpoints.mjs';
|
|
2
2
|
import { TokenStandard, OrderBy } from './indexer.mjs';
|
|
3
|
-
export { GetANSNameResponse, GetAccountCoinsDataResponse, GetAccountCollectionsWithOwnedTokenResponse, GetAccountOwnedObjectsResponse, GetAccountOwnedTokensFromCollectionResponse, GetAccountOwnedTokensQueryResponse, GetChainTopUserTransactionsResponse, GetCollectionDataResponse, GetCurrentFungibleAssetBalancesResponse, GetCurrentTokenOwnershipResponse, GetDelegatedStakingActivitiesResponse, GetEventsResponse, GetFungibleAssetActivitiesResponse, GetFungibleAssetMetadataResponse, GetNumberOfDelegatorsResponse, GetOwnedTokensResponse, GetProcessorStatusResponse, GetTokenActivityResponse, GetTokenDataResponse, GraphqlQuery, OrderByValue } from './indexer.mjs';
|
|
3
|
+
export { GetANSNameResponse, GetAccountCoinsDataResponse, GetAccountCollectionsWithOwnedTokenResponse, GetAccountOwnedObjectsResponse, GetAccountOwnedTokensFromCollectionResponse, GetAccountOwnedTokensQueryResponse, GetChainTopUserTransactionsResponse, GetCollectionDataResponse, GetCurrentFungibleAssetBalancesResponse, GetCurrentTokenOwnershipResponse, GetDelegatedStakingActivitiesResponse, GetEventsResponse, GetFungibleAssetActivitiesResponse, GetFungibleAssetMetadataResponse, GetNumberOfDelegatorsResponse, GetOwnedTokensResponse, GetProcessorStatusResponse, GetTableItemsDataResponse, GetTableItemsMetadataResponse, GetTokenActivityResponse, GetTokenDataResponse, GraphqlQuery, OrderByValue } from './indexer.mjs';
|
|
4
4
|
import './generated/operations.mjs';
|
|
5
5
|
import './generated/types.mjs';
|
|
6
6
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GetAccountOwnedObjectsQuery, GetAccountOwnedTokensQuery, GetAccountOwnedTokensFromCollectionQuery, GetAccountCollectionsWithOwnedTokensQuery, GetAccountCoinsDataQuery, GetChainTopUserTransactionsQuery, GetEventsQuery, GetNumberOfDelegatorsQuery, GetDelegatedStakingActivitiesQuery, GetCollectionDataQuery, GetTokenDataQuery, GetProcessorStatusQuery, GetFungibleAssetMetadataQuery, GetFungibleAssetActivitiesQuery, GetCurrentFungibleAssetBalancesQuery, GetTokenActivityQuery, GetCurrentTokenOwnershipQuery, GetNamesQuery } from './generated/operations.mjs';
|
|
1
|
+
import { GetAccountOwnedObjectsQuery, GetAccountOwnedTokensQuery, GetAccountOwnedTokensFromCollectionQuery, GetAccountCollectionsWithOwnedTokensQuery, GetAccountCoinsDataQuery, GetChainTopUserTransactionsQuery, GetEventsQuery, GetNumberOfDelegatorsQuery, GetDelegatedStakingActivitiesQuery, GetCollectionDataQuery, GetTokenDataQuery, GetProcessorStatusQuery, GetFungibleAssetMetadataQuery, GetFungibleAssetActivitiesQuery, GetCurrentFungibleAssetBalancesQuery, GetTokenActivityQuery, GetCurrentTokenOwnershipQuery, GetTableItemsDataQuery, GetTableItemsMetadataQuery, GetNamesQuery } from './generated/operations.mjs';
|
|
2
2
|
import './generated/types.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -39,6 +39,8 @@ type GetCurrentFungibleAssetBalancesResponse = GetCurrentFungibleAssetBalancesQu
|
|
|
39
39
|
type GetTokenActivityResponse = GetTokenActivityQuery["token_activities_v2"];
|
|
40
40
|
type GetCurrentTokenOwnershipResponse = GetCurrentTokenOwnershipQuery["current_token_ownerships_v2"][0];
|
|
41
41
|
type GetOwnedTokensResponse = GetCurrentTokenOwnershipQuery["current_token_ownerships_v2"];
|
|
42
|
+
type GetTableItemsDataResponse = GetTableItemsDataQuery["table_items"];
|
|
43
|
+
type GetTableItemsMetadataResponse = GetTableItemsMetadataQuery["table_metadatas"];
|
|
42
44
|
type GetANSNameResponse = GetNamesQuery["current_aptos_names"];
|
|
43
45
|
/**
|
|
44
46
|
* A generic type that being passed by each function and holds an
|
|
@@ -60,4 +62,4 @@ type GraphqlQuery = {
|
|
|
60
62
|
variables?: {};
|
|
61
63
|
};
|
|
62
64
|
|
|
63
|
-
export type { GetANSNameResponse, GetAccountCoinsDataResponse, GetAccountCollectionsWithOwnedTokenResponse, GetAccountOwnedObjectsResponse, GetAccountOwnedTokensFromCollectionResponse, GetAccountOwnedTokensQueryResponse, GetChainTopUserTransactionsResponse, GetCollectionDataResponse, GetCurrentFungibleAssetBalancesResponse, GetCurrentTokenOwnershipResponse, GetDelegatedStakingActivitiesResponse, GetEventsResponse, GetFungibleAssetActivitiesResponse, GetFungibleAssetMetadataResponse, GetNumberOfDelegatorsResponse, GetOwnedTokensResponse, GetProcessorStatusResponse, GetTokenActivityResponse, GetTokenDataResponse, GraphqlQuery, OrderBy, OrderByValue, TokenStandard };
|
|
65
|
+
export type { GetANSNameResponse, GetAccountCoinsDataResponse, GetAccountCollectionsWithOwnedTokenResponse, GetAccountOwnedObjectsResponse, GetAccountOwnedTokensFromCollectionResponse, GetAccountOwnedTokensQueryResponse, GetChainTopUserTransactionsResponse, GetCollectionDataResponse, GetCurrentFungibleAssetBalancesResponse, GetCurrentTokenOwnershipResponse, GetDelegatedStakingActivitiesResponse, GetEventsResponse, GetFungibleAssetActivitiesResponse, GetFungibleAssetMetadataResponse, GetNumberOfDelegatorsResponse, GetOwnedTokensResponse, GetProcessorStatusResponse, GetTableItemsDataResponse, GetTableItemsMetadataResponse, GetTokenActivityResponse, GetTokenDataResponse, GraphqlQuery, OrderBy, OrderByValue, TokenStandard };
|
package/dist/esm/utils/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunk-GED6IT3S.mjs";import{a as o}from"../chunk-ROXFCLDT.mjs";import{a,b,c,d,e,f}from"../chunk-HYCGMFC2.mjs";import{a
|
|
1
|
+
import"../chunk-GED6IT3S.mjs";import{a as o}from"../chunk-ROXFCLDT.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n}from"../chunk-HYCGMFC2.mjs";import{a,b,c,d,e,f,g,h}from"../chunk-CYNQRMO5.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-N3U47Y6Y.mjs";import"../chunk-CEHCDA3G.mjs";import"../chunk-G56GPLTB.mjs";import"../chunk-SRDIYE3M.mjs";import"../chunk-OWW6SIDP.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-36QXVFR5.mjs";import"../chunk-BCUSI3N6.mjs";import"../chunk-LG7RJQ57.mjs";import"../chunk-6IFMQ5AS.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{e as APTOS_COIN,a as AptosApiType,b as DEFAULT_MAX_GAS_AMOUNT,c as DEFAULT_TXN_EXP_SEC_FROM_NOW,d as DEFAULT_TXN_TIMEOUT_SEC,l as Network,m as NetworkToChainId,k as NetworkToFaucetAPI,i as NetworkToIndexerAPI,n as NetworkToNetworkName,j as NetworkToNodeAPI,h as ProcessorType,f as RAW_TRANSACTION_SALT,g as RAW_TRANSACTION_WITH_DATA_SALT,o as normalizeBundle};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-ROXFCLDT.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-
|
|
1
|
+
import{a}from"../chunk-ROXFCLDT.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-N3U47Y6Y.mjs";import"../chunk-CEHCDA3G.mjs";import"../chunk-G56GPLTB.mjs";import"../chunk-SRDIYE3M.mjs";import"../chunk-OWW6SIDP.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-36QXVFR5.mjs";import"../chunk-BCUSI3N6.mjs";import"../chunk-LG7RJQ57.mjs";import"../chunk-6IFMQ5AS.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{a as normalizeBundle};
|
|
2
2
|
//# sourceMappingURL=normalizeBundle.mjs.map
|
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-CJDEPZ4J.mjs";import"./chunk-FVA2OPG4.mjs";export{a as VERSION};
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/package.json
CHANGED
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@aptos-labs/aptos-client": "^0.1.0",
|
|
51
|
-
"@aptos-labs/aptos-cli": "^0.1.
|
|
51
|
+
"@aptos-labs/aptos-cli": "^0.1.7",
|
|
52
52
|
"@noble/curves": "^1.4.0",
|
|
53
53
|
"@noble/hashes": "^1.4.0",
|
|
54
54
|
"@scure/bip32": "^1.4.0",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"typedoc": "^0.25.4",
|
|
86
86
|
"typescript": "^5.3.3"
|
|
87
87
|
},
|
|
88
|
-
"version": "1.
|
|
88
|
+
"version": "1.15.0"
|
|
89
89
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type { AccountAuthenticator } from "
|
|
2
|
-
import { HexInput, SigningScheme, SigningSchemeInput } from "
|
|
3
|
-
import type { AccountAddress, AccountAddressInput } from "../accountAddress";
|
|
4
|
-
import { AuthenticationKey } from "../authenticationKey";
|
|
5
|
-
import { AccountPublicKey, Ed25519PrivateKey, PrivateKey, Signature, VerifySignatureArgs } from "../crypto";
|
|
1
|
+
import type { AccountAuthenticator } from "../transactions/authenticator/account";
|
|
2
|
+
import { HexInput, SigningScheme, SigningSchemeInput } from "../types";
|
|
3
|
+
import type { AccountAddress, AccountAddressInput } from "../core/accountAddress";
|
|
4
|
+
import { AuthenticationKey } from "../core/authenticationKey";
|
|
5
|
+
import { AccountPublicKey, Ed25519PrivateKey, PrivateKey, Signature, VerifySignatureArgs } from "../core/crypto";
|
|
6
6
|
import { Ed25519Account } from "./Ed25519Account";
|
|
7
7
|
import { SingleKeyAccount } from "./SingleKeyAccount";
|
|
8
|
+
import { AnyRawTransaction } from "../transactions/types";
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Arguments for creating an `Ed25519Account` from an `Ed25519PrivateKey`.
|
|
@@ -106,13 +107,6 @@ export interface PrivateKeyFromDerivationPathArgs {
|
|
|
106
107
|
* Note: Generating an account instance does not create the account on-chain.
|
|
107
108
|
*/
|
|
108
109
|
export abstract class Account {
|
|
109
|
-
/**
|
|
110
|
-
* Private key associated with the account.
|
|
111
|
-
* Note: this will be removed in the next major release,
|
|
112
|
-
* as not all accounts have a private key.
|
|
113
|
-
*/
|
|
114
|
-
abstract readonly privateKey: PrivateKey;
|
|
115
|
-
|
|
116
110
|
/**
|
|
117
111
|
* Public key associated with the account
|
|
118
112
|
*/
|
|
@@ -229,15 +223,31 @@ export abstract class Account {
|
|
|
229
223
|
abstract signWithAuthenticator(message: HexInput): AccountAuthenticator;
|
|
230
224
|
|
|
231
225
|
/**
|
|
232
|
-
* Sign
|
|
226
|
+
* Sign a transaction using the available signing capabilities.
|
|
227
|
+
* @param transaction the raw transaction
|
|
228
|
+
* @return the AccountAuthenticator containing the signature of the transaction, together with the account's public key
|
|
229
|
+
*/
|
|
230
|
+
abstract signTransactionWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticator;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Sign the given message using the available signing capabilities.
|
|
233
234
|
* @param message in HexInput format
|
|
234
|
-
* @returns
|
|
235
|
+
* @returns Signature
|
|
235
236
|
*/
|
|
236
237
|
abstract sign(message: HexInput): Signature;
|
|
237
238
|
|
|
238
239
|
/**
|
|
240
|
+
* Sign the given transaction using the available signing capabilities.
|
|
241
|
+
* @param transaction the transaction to be signed
|
|
242
|
+
* @returns Signature
|
|
243
|
+
*/
|
|
244
|
+
abstract signTransaction(transaction: AnyRawTransaction): Signature;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Verify the given message and signature with the public key.
|
|
239
248
|
* @param args.message raw message data in HexInput format
|
|
240
|
-
* @param args.signature signed message
|
|
249
|
+
* @param args.signature signed message Signature
|
|
250
|
+
* @returns
|
|
241
251
|
*/
|
|
242
252
|
verifySignature(args: VerifySignatureArgs): boolean {
|
|
243
253
|
return this.publicKey.verifySignature(args);
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { AccountAuthenticatorEd25519 } from "
|
|
2
|
-
import { HexInput, SigningScheme } from "
|
|
3
|
-
import { AccountAddress, AccountAddressInput } from "../accountAddress";
|
|
4
|
-
import { Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature } from "../crypto";
|
|
1
|
+
import { AccountAuthenticatorEd25519 } from "../transactions/authenticator/account";
|
|
2
|
+
import { HexInput, SigningScheme } from "../types";
|
|
3
|
+
import { AccountAddress, AccountAddressInput } from "../core/accountAddress";
|
|
4
|
+
import { Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature } from "../core/crypto";
|
|
5
5
|
import type { Account } from "./Account";
|
|
6
|
+
import { AnyRawTransaction } from "../transactions/types";
|
|
7
|
+
import { generateSigningMessageForTransaction } from "../transactions/transactionBuilder/signingMessage";
|
|
6
8
|
|
|
7
9
|
export interface Ed25519SignerConstructorArgs {
|
|
8
10
|
privateKey: Ed25519PrivateKey;
|
|
@@ -71,17 +73,51 @@ export class Ed25519Account implements Account {
|
|
|
71
73
|
|
|
72
74
|
// region Account
|
|
73
75
|
|
|
76
|
+
/**
|
|
77
|
+
* Verify the given message and signature with the public key.
|
|
78
|
+
*
|
|
79
|
+
* @param args.message raw message data in HexInput format
|
|
80
|
+
* @param args.signature signed message Signature
|
|
81
|
+
* @returns
|
|
82
|
+
*/
|
|
74
83
|
verifySignature(args: VerifyEd25519SignatureArgs): boolean {
|
|
75
84
|
return this.publicKey.verifySignature(args);
|
|
76
85
|
}
|
|
77
86
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
87
|
+
/**
|
|
88
|
+
* Sign a message using the account's Ed25519 private key.
|
|
89
|
+
* @param message the signing message, as binary input
|
|
90
|
+
* @return the AccountAuthenticator containing the signature, together with the account's public key
|
|
91
|
+
*/
|
|
92
|
+
signWithAuthenticator(message: HexInput): AccountAuthenticatorEd25519 {
|
|
93
|
+
return new AccountAuthenticatorEd25519(this.publicKey, this.privateKey.sign(message));
|
|
81
94
|
}
|
|
82
95
|
|
|
83
|
-
|
|
84
|
-
|
|
96
|
+
/**
|
|
97
|
+
* Sign a transaction using the account's Ed25519 private key.
|
|
98
|
+
* @param transaction the raw transaction
|
|
99
|
+
* @return the AccountAuthenticator containing the signature of the transaction, together with the account's public key
|
|
100
|
+
*/
|
|
101
|
+
signTransactionWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorEd25519 {
|
|
102
|
+
return new AccountAuthenticatorEd25519(this.publicKey, this.signTransaction(transaction));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Sign the given message using the account's Ed25519 private key.
|
|
107
|
+
* @param message in HexInput format
|
|
108
|
+
* @returns Signature
|
|
109
|
+
*/
|
|
110
|
+
sign(message: HexInput): Ed25519Signature {
|
|
111
|
+
return this.privateKey.sign(message);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Sign the given transaction using the available signing capabilities.
|
|
116
|
+
* @param transaction the transaction to be signed
|
|
117
|
+
* @returns Signature
|
|
118
|
+
*/
|
|
119
|
+
signTransaction(transaction: AnyRawTransaction): Ed25519Signature {
|
|
120
|
+
return this.sign(generateSigningMessageForTransaction(transaction));
|
|
85
121
|
}
|
|
86
122
|
|
|
87
123
|
// endregion
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
// Copyright © Aptos Foundation
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import { Account } from "./Account";
|
|
5
|
+
import { MultiKey, MultiKeySignature, PublicKey } from "../core/crypto";
|
|
6
|
+
import { AccountAddress } from "../core/accountAddress";
|
|
7
|
+
import { HexInput, SigningScheme } from "../types";
|
|
8
|
+
import { AccountAuthenticatorMultiKey } from "../transactions/authenticator/account";
|
|
9
|
+
import { AnyRawTransaction } from "../transactions/types";
|
|
10
|
+
|
|
11
|
+
export interface VerifyMultiKeySignatureArgs {
|
|
12
|
+
message: HexInput;
|
|
13
|
+
signature: MultiKeySignature;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Signer implementation for the MultiKey authentication scheme.
|
|
18
|
+
*
|
|
19
|
+
* This accounts to use a M of N signing scheme. M and N are specified in the {@link MultiKey}
|
|
20
|
+
* It signs messages via the array of M number of Accounts that individually correspond to a public key in the {@link MultiKey}.
|
|
21
|
+
*
|
|
22
|
+
* Note: Generating a signer instance does not create the account on-chain.
|
|
23
|
+
*/
|
|
24
|
+
export class MultiKeyAccount implements Account {
|
|
25
|
+
/**
|
|
26
|
+
* Public key associated with the account
|
|
27
|
+
*/
|
|
28
|
+
readonly publicKey: MultiKey;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Account address associated with the account
|
|
32
|
+
*/
|
|
33
|
+
readonly accountAddress: AccountAddress;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Signing scheme used to sign transactions
|
|
37
|
+
*/
|
|
38
|
+
readonly signingScheme: SigningScheme;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The signers used to sign messages. These signers should correspond to public keys in the
|
|
42
|
+
* MultiKeyAccount's public key. The number of signers should be equal or greater
|
|
43
|
+
* than this.publicKey.signaturesRequired
|
|
44
|
+
*/
|
|
45
|
+
readonly signers: Account[];
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* An array of indicies where for signer[i], signerIndicies[i] is the index of the corresponding public key in
|
|
49
|
+
* publicKey.publicKeys. Used to derive the right public key to use for verification.
|
|
50
|
+
*/
|
|
51
|
+
readonly signerIndicies: number[];
|
|
52
|
+
|
|
53
|
+
readonly signaturesBitmap: Uint8Array;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* constructor for MultiKeyAccount
|
|
57
|
+
*
|
|
58
|
+
* @param args.multiKey the multikey of the account which consists of N public keys and a number M which is
|
|
59
|
+
* the number of required signatures.
|
|
60
|
+
* @param args.signers an array of M signers that will be used to sign the transaction
|
|
61
|
+
* @returns MultiKeyAccount
|
|
62
|
+
*/
|
|
63
|
+
constructor(args: { multiKey: MultiKey; signers: Account[] }) {
|
|
64
|
+
const { multiKey, signers } = args;
|
|
65
|
+
|
|
66
|
+
this.publicKey = multiKey;
|
|
67
|
+
this.signingScheme = SigningScheme.MultiKey;
|
|
68
|
+
|
|
69
|
+
this.accountAddress = this.publicKey.authKey().derivedAddress();
|
|
70
|
+
|
|
71
|
+
// Get the index of each respective signer in the bitmap
|
|
72
|
+
const bitPositions: number[] = [];
|
|
73
|
+
for (const signer of signers) {
|
|
74
|
+
bitPositions.push(this.publicKey.getIndex(signer.publicKey));
|
|
75
|
+
}
|
|
76
|
+
// Zip signers and bit positions and sort signers by bit positions in order
|
|
77
|
+
// to ensure the signature is signed in ascending order according to the bitmap.
|
|
78
|
+
// Authentication on chain will fail otherwise.
|
|
79
|
+
const signersAndBitPosition: [Account, number][] = signers.map((signer, index) => [signer, bitPositions[index]]);
|
|
80
|
+
signersAndBitPosition.sort((a, b) => a[1] - b[1]);
|
|
81
|
+
this.signers = signersAndBitPosition.map((value) => value[0]);
|
|
82
|
+
this.signerIndicies = signersAndBitPosition.map((value) => value[1]);
|
|
83
|
+
this.signaturesBitmap = this.publicKey.createBitmap({ bits: bitPositions });
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Static constructor for MultiKeyAccount
|
|
88
|
+
*
|
|
89
|
+
* @param args.publicKeys the N public keys of the MultiKeyAccount
|
|
90
|
+
* @param args.signaturesRequired the number of signatures required
|
|
91
|
+
* @param args.signers an array of M signers that will be used to sign the transaction
|
|
92
|
+
* @returns MultiKeyAccount
|
|
93
|
+
*/
|
|
94
|
+
static fromPublicKeysAndSigners(args: {
|
|
95
|
+
publicKeys: PublicKey[];
|
|
96
|
+
signaturesRequired: number;
|
|
97
|
+
signers: Account[];
|
|
98
|
+
}): MultiKeyAccount {
|
|
99
|
+
const { publicKeys, signaturesRequired, signers } = args;
|
|
100
|
+
const multiKey = new MultiKey({ publicKeys, signaturesRequired });
|
|
101
|
+
return new MultiKeyAccount({ multiKey, signers });
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
static isMultiKeySigner(account: Account): account is MultiKeyAccount {
|
|
105
|
+
return account instanceof MultiKeyAccount;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Sign a message using the account's signers.
|
|
110
|
+
* @param message the signing message, as binary input
|
|
111
|
+
* @return the AccountAuthenticator containing the signature, together with the account's public key
|
|
112
|
+
*/
|
|
113
|
+
signWithAuthenticator(message: HexInput): AccountAuthenticatorMultiKey {
|
|
114
|
+
return new AccountAuthenticatorMultiKey(this.publicKey, this.sign(message));
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Sign a transaction using the account's signers.
|
|
119
|
+
* @param transaction the raw transaction
|
|
120
|
+
* @return the AccountAuthenticator containing the signature of the transaction, together with the account's public key
|
|
121
|
+
*/
|
|
122
|
+
signTransactionWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorMultiKey {
|
|
123
|
+
return new AccountAuthenticatorMultiKey(this.publicKey, this.signTransaction(transaction));
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Sign the given message using the MultiKeyAccount's signers
|
|
128
|
+
* @param message in HexInput format
|
|
129
|
+
* @returns MultiKeySignature
|
|
130
|
+
*/
|
|
131
|
+
sign(data: HexInput): MultiKeySignature {
|
|
132
|
+
const signatures = [];
|
|
133
|
+
for (const signer of this.signers) {
|
|
134
|
+
signatures.push(signer.sign(data));
|
|
135
|
+
}
|
|
136
|
+
return new MultiKeySignature({ signatures, bitmap: this.signaturesBitmap });
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Sign the given transaction using the MultiKeyAccount's signers
|
|
141
|
+
* @param transaction the transaction to be signed
|
|
142
|
+
* @returns MultiKeySignature
|
|
143
|
+
*/
|
|
144
|
+
signTransaction(transaction: AnyRawTransaction): MultiKeySignature {
|
|
145
|
+
const signatures = [];
|
|
146
|
+
for (const signer of this.signers) {
|
|
147
|
+
signatures.push(signer.signTransaction(transaction));
|
|
148
|
+
}
|
|
149
|
+
return new MultiKeySignature({ signatures, bitmap: this.signaturesBitmap });
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Verify the given message and signature with the public key.
|
|
154
|
+
*
|
|
155
|
+
* @param args.message raw message data in HexInput format
|
|
156
|
+
* @param args.signatures signed message MultiKeySignature
|
|
157
|
+
* @returns boolean
|
|
158
|
+
*/
|
|
159
|
+
verifySignature(args: VerifyMultiKeySignatureArgs): boolean {
|
|
160
|
+
const { message, signature } = args;
|
|
161
|
+
const isSignerIndiciesSorted = this.signerIndicies.every(
|
|
162
|
+
(value, i) => i === 0 || value >= this.signerIndicies[i - 1],
|
|
163
|
+
);
|
|
164
|
+
if (!isSignerIndiciesSorted) {
|
|
165
|
+
return false;
|
|
166
|
+
}
|
|
167
|
+
for (let i = 0; i < signature.signatures.length; i += 1) {
|
|
168
|
+
const singleSignature = signature.signatures[i];
|
|
169
|
+
const publicKey = this.publicKey.publicKeys[this.signerIndicies[i]];
|
|
170
|
+
if (!publicKey.verifySignature({ message, signature: singleSignature })) {
|
|
171
|
+
return false;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return true;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { AccountAuthenticatorSingleKey } from "
|
|
2
|
-
import { type HexInput, SigningScheme, SigningSchemeInput } from "
|
|
3
|
-
import { AccountAddress, AccountAddressInput } from "../accountAddress";
|
|
4
|
-
import { AnyPublicKey, AnySignature, Ed25519PrivateKey, PrivateKey, Secp256k1PrivateKey } from "../crypto";
|
|
1
|
+
import { AccountAuthenticatorSingleKey } from "../transactions/authenticator/account";
|
|
2
|
+
import { type HexInput, SigningScheme, SigningSchemeInput } from "../types";
|
|
3
|
+
import { AccountAddress, AccountAddressInput } from "../core/accountAddress";
|
|
4
|
+
import { AnyPublicKey, AnySignature, Ed25519PrivateKey, PrivateKey, Secp256k1PrivateKey } from "../core/crypto";
|
|
5
5
|
import type { Account } from "./Account";
|
|
6
|
+
import { generateSigningMessageForTransaction } from "../transactions/transactionBuilder/signingMessage";
|
|
7
|
+
import { AnyRawTransaction } from "../transactions/types";
|
|
6
8
|
|
|
7
9
|
export interface SingleKeySignerConstructorArgs {
|
|
8
10
|
privateKey: PrivateKey;
|
|
@@ -102,18 +104,51 @@ export class SingleKeyAccount implements Account {
|
|
|
102
104
|
|
|
103
105
|
// region Account
|
|
104
106
|
|
|
107
|
+
/**
|
|
108
|
+
* Verify the given message and signature with the public key.
|
|
109
|
+
*
|
|
110
|
+
* @param args.message raw message data in HexInput format
|
|
111
|
+
* @param args.signature signed message Signature
|
|
112
|
+
* @returns
|
|
113
|
+
*/
|
|
105
114
|
verifySignature(args: VerifySingleKeySignatureArgs): boolean {
|
|
106
115
|
return this.publicKey.verifySignature(args);
|
|
107
116
|
}
|
|
108
117
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
118
|
+
/**
|
|
119
|
+
* Sign a message using the account's private key.
|
|
120
|
+
* @param message the signing message, as binary input
|
|
121
|
+
* @return the AccountAuthenticator containing the signature, together with the account's public key
|
|
122
|
+
*/
|
|
123
|
+
signWithAuthenticator(message: HexInput): AccountAuthenticatorSingleKey {
|
|
124
|
+
return new AccountAuthenticatorSingleKey(this.publicKey, this.sign(message));
|
|
113
125
|
}
|
|
114
126
|
|
|
115
|
-
|
|
116
|
-
|
|
127
|
+
/**
|
|
128
|
+
* Sign a transaction using the account's private key.
|
|
129
|
+
* @param transaction the raw transaction
|
|
130
|
+
* @return the AccountAuthenticator containing the signature of the transaction, together with the account's public key
|
|
131
|
+
*/
|
|
132
|
+
signTransactionWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorSingleKey {
|
|
133
|
+
return new AccountAuthenticatorSingleKey(this.publicKey, this.signTransaction(transaction));
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Sign the given message using the account's private key.
|
|
138
|
+
* @param message in HexInput format
|
|
139
|
+
* @returns Signature
|
|
140
|
+
*/
|
|
141
|
+
sign(message: HexInput): AnySignature {
|
|
142
|
+
return new AnySignature(this.privateKey.sign(message));
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Sign the given transaction using the account's private key.
|
|
147
|
+
* @param transaction the transaction to be signed
|
|
148
|
+
* @returns Signature
|
|
149
|
+
*/
|
|
150
|
+
signTransaction(transaction: AnyRawTransaction): AnySignature {
|
|
151
|
+
return this.sign(generateSigningMessageForTransaction(transaction));
|
|
117
152
|
}
|
|
118
153
|
|
|
119
154
|
// endregion
|
package/src/api/account.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// Copyright © Aptos Foundation
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { Account as AccountModule } from "../account";
|
|
5
|
+
import { AccountAddress, PrivateKey, AccountAddressInput } from "../core";
|
|
5
6
|
import {
|
|
6
7
|
AccountData,
|
|
7
8
|
AnyNumber,
|
package/src/api/ans.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// Copyright © Aptos Foundation
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import { Account
|
|
4
|
+
import { Account } from "../account";
|
|
5
|
+
import { AccountAddress, AccountAddressInput } from "../core";
|
|
5
6
|
import {
|
|
6
7
|
RegisterNameParameters,
|
|
7
8
|
getExpiration,
|
package/src/api/aptos.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { General } from "./general";
|
|
|
12
12
|
import { ANS } from "./ans";
|
|
13
13
|
import { Staking } from "./staking";
|
|
14
14
|
import { Transaction } from "./transaction";
|
|
15
|
+
import { Table } from "./table";
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* This class is the main entry point into Aptos's
|
|
@@ -47,6 +48,8 @@ export class Aptos {
|
|
|
47
48
|
|
|
48
49
|
readonly transaction: Transaction;
|
|
49
50
|
|
|
51
|
+
readonly table: Table;
|
|
52
|
+
|
|
50
53
|
constructor(settings?: AptosConfig) {
|
|
51
54
|
this.config = new AptosConfig(settings);
|
|
52
55
|
this.account = new Account(this.config);
|
|
@@ -59,6 +62,7 @@ export class Aptos {
|
|
|
59
62
|
this.general = new General(this.config);
|
|
60
63
|
this.staking = new Staking(this.config);
|
|
61
64
|
this.transaction = new Transaction(this.config);
|
|
65
|
+
this.table = new Table(this.config);
|
|
62
66
|
}
|
|
63
67
|
}
|
|
64
68
|
|
|
@@ -74,6 +78,7 @@ export interface Aptos
|
|
|
74
78
|
FungibleAsset,
|
|
75
79
|
General,
|
|
76
80
|
Staking,
|
|
81
|
+
Table,
|
|
77
82
|
Omit<Transaction, "build" | "simulate" | "submit" | "batch"> {}
|
|
78
83
|
|
|
79
84
|
/**
|
|
@@ -107,3 +112,4 @@ applyMixin(Aptos, FungibleAsset, "fungibleAsset");
|
|
|
107
112
|
applyMixin(Aptos, General, "general");
|
|
108
113
|
applyMixin(Aptos, Staking, "staking");
|
|
109
114
|
applyMixin(Aptos, Transaction, "transaction");
|
|
115
|
+
applyMixin(Aptos, Table, "table");
|
package/src/api/digitalAsset.ts
CHANGED
|
@@ -13,7 +13,8 @@ import {
|
|
|
13
13
|
PaginationArgs,
|
|
14
14
|
TokenStandardArg,
|
|
15
15
|
} from "../types";
|
|
16
|
-
import {
|
|
16
|
+
import { AccountAddress, AccountAddressInput } from "../core";
|
|
17
|
+
import { Account } from "../account";
|
|
17
18
|
import { InputGenerateTransactionOptions } from "../transactions/types";
|
|
18
19
|
import {
|
|
19
20
|
addDigitalAssetPropertyTransaction,
|
package/src/api/fungibleAsset.ts
CHANGED
|
@@ -23,7 +23,8 @@ import {
|
|
|
23
23
|
import { ProcessorType } from "../utils/const";
|
|
24
24
|
import { AptosConfig } from "./aptosConfig";
|
|
25
25
|
import { waitForIndexerOnVersion } from "./utils";
|
|
26
|
-
import { Account
|
|
26
|
+
import { Account } from "../account";
|
|
27
|
+
import { AccountAddressInput } from "../core";
|
|
27
28
|
import { InputGenerateTransactionOptions } from "../transactions";
|
|
28
29
|
import { SimpleTransaction } from "../transactions/instances/simpleTransaction";
|
|
29
30
|
|
package/src/api/general.ts
CHANGED
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
getIndexerLastSuccessVersion,
|
|
10
10
|
getLedgerInfo,
|
|
11
11
|
getProcessorStatus,
|
|
12
|
-
getTableItem,
|
|
13
12
|
queryIndexer,
|
|
14
13
|
} from "../internal/general";
|
|
15
14
|
import { view } from "../internal/view";
|
|
@@ -22,7 +21,6 @@ import {
|
|
|
22
21
|
LedgerInfo,
|
|
23
22
|
LedgerVersionArg,
|
|
24
23
|
MoveValue,
|
|
25
|
-
TableItemRequest,
|
|
26
24
|
} from "../types";
|
|
27
25
|
import { ProcessorType } from "../utils/const";
|
|
28
26
|
import { InputViewFunctionData } from "../transactions";
|
|
@@ -112,30 +110,6 @@ export class General {
|
|
|
112
110
|
return getBlockByHeight({ aptosConfig: this.config, ...args });
|
|
113
111
|
}
|
|
114
112
|
|
|
115
|
-
/**
|
|
116
|
-
* Queries for a table item for a table identified by the handle and the key for the item.
|
|
117
|
-
* Key and value types need to be passed in to help with key serialization and value deserialization.
|
|
118
|
-
*
|
|
119
|
-
* @example https://api.devnet.aptoslabs.com/v1/accounts/0x1/resource/0x1::coin::CoinInfo%3C0x1::aptos_coin::AptosCoin%3E
|
|
120
|
-
* const tableItem = await aptos.getTableItem({
|
|
121
|
-
* handle: "0x123",
|
|
122
|
-
* data: {
|
|
123
|
-
* key_type: "address", // Move type of table key
|
|
124
|
-
* value_type: "u128", // Move type of table value
|
|
125
|
-
* key: "0x619dc29a0aac8fa146714058e8dd6d2d0f3bdf5f6331907bf91f3acd81e6935" // Value of table key
|
|
126
|
-
* },
|
|
127
|
-
* })
|
|
128
|
-
*
|
|
129
|
-
* @param args.handle A pointer to where that table is stored
|
|
130
|
-
* @param args.data Object that describes table item
|
|
131
|
-
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
132
|
-
*
|
|
133
|
-
* @returns Table item value rendered in JSON
|
|
134
|
-
*/
|
|
135
|
-
async getTableItem<T>(args: { handle: string; data: TableItemRequest; options?: LedgerVersionArg }): Promise<T> {
|
|
136
|
-
return getTableItem<T>({ aptosConfig: this.config, ...args });
|
|
137
|
-
}
|
|
138
|
-
|
|
139
113
|
/**
|
|
140
114
|
* Queries for a Move view function
|
|
141
115
|
* @param args.payload Payload for the view function
|