@aptos-labs/ts-sdk 1.13.0-zeta.1 → 1.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/index.d.ts +1399 -1825
- package/dist/common/index.js +26 -26
- package/dist/common/index.js.map +1 -1
- package/dist/esm/{Ed25519Account-hkKk3b4Z.d.mts → Ed25519Account--qjfup2u.d.mts} +13 -11
- package/dist/esm/api/account.d.mts +1 -13
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.d.mts +12 -12
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +8 -15
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/aptosConfig.d.mts +0 -20
- package/dist/esm/api/aptosConfig.mjs +1 -1
- package/dist/esm/api/coin.d.mts +7 -7
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.d.mts +9 -9
- 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 +9 -9
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.d.mts +7 -7
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +8 -14
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/transaction.d.mts +1 -1
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.d.mts +2 -2
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.d.mts +8 -8
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.d.mts +1 -1
- package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
- package/dist/esm/api/transactionSubmission/simulate.d.mts +6 -6
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/bcs/serializer.d.mts +0 -2
- package/dist/esm/bcs/serializer.mjs +1 -1
- package/dist/esm/{chunk-RBDX3YWC.mjs → chunk-2SPJ7XZB.mjs} +2 -2
- package/dist/esm/chunk-32PB5F74.mjs +2 -0
- package/dist/esm/chunk-32PB5F74.mjs.map +1 -0
- package/dist/esm/chunk-3YCG7Y63.mjs +2 -0
- package/dist/esm/chunk-3YCG7Y63.mjs.map +1 -0
- package/dist/esm/chunk-4QMXOWHP.mjs +1 -0
- package/dist/esm/{chunk-7M3U2I23.mjs → chunk-4UJ5Y6QQ.mjs} +2 -2
- package/dist/esm/{chunk-52DBSOFA.mjs → chunk-52C73T26.mjs} +2 -2
- package/dist/esm/{chunk-52DBSOFA.mjs.map → chunk-52C73T26.mjs.map} +1 -1
- package/dist/esm/chunk-5M7D6SXS.mjs +2 -0
- package/dist/esm/chunk-5M7D6SXS.mjs.map +1 -0
- package/dist/esm/chunk-5RE43AX2.mjs +2 -0
- package/dist/esm/{chunk-OVXWFD2N.mjs.map → chunk-5RE43AX2.mjs.map} +1 -1
- package/dist/esm/{chunk-YNBWXDRS.mjs → chunk-6GZ5SUUK.mjs} +2 -2
- package/dist/esm/{chunk-XESYWLDD.mjs → chunk-6T4IFH73.mjs} +2 -2
- package/dist/esm/chunk-6T4IFH73.mjs.map +1 -0
- package/dist/esm/{chunk-5TNUDFLP.mjs → chunk-BGW77OLE.mjs} +2 -2
- package/dist/esm/{chunk-MRCVSUJQ.mjs → chunk-BWFJHFBQ.mjs} +2 -2
- package/dist/esm/chunk-CYNQRMO5.mjs +2 -0
- package/dist/esm/chunk-CYNQRMO5.mjs.map +1 -0
- package/dist/esm/chunk-CYTNMIOT.mjs +2 -0
- package/dist/esm/chunk-CYTNMIOT.mjs.map +1 -0
- package/dist/esm/{chunk-BQCIUNLZ.mjs → chunk-CZF6JTC2.mjs} +2 -2
- package/dist/esm/chunk-DJ5TUMIY.mjs +2 -0
- package/dist/esm/chunk-DJ5TUMIY.mjs.map +1 -0
- package/dist/esm/{chunk-Q225PZMV.mjs → chunk-DMKUAQB7.mjs} +2 -2
- package/dist/esm/{chunk-RM7D2ITN.mjs → chunk-DSTKXJMA.mjs} +2 -2
- package/dist/esm/{chunk-P4UY6YKM.mjs → chunk-DW4FAHFT.mjs} +2 -2
- package/dist/esm/{chunk-CHL5NDZD.mjs → chunk-DW5XFUDM.mjs} +2 -2
- package/dist/esm/chunk-E7FWVXGX.mjs +1 -0
- package/dist/esm/{chunk-CYWA4AJF.mjs → chunk-E7OPTWPP.mjs} +2 -2
- package/dist/esm/{chunk-5D65Z2SG.mjs → chunk-F2LL2BWZ.mjs} +2 -2
- package/dist/esm/chunk-F2LL2BWZ.mjs.map +1 -0
- package/dist/esm/{chunk-3FL3NLZ6.mjs → chunk-F5O5BBEK.mjs} +2 -2
- package/dist/esm/{chunk-35ZI4WOQ.mjs → chunk-FS3NSGBF.mjs} +2 -2
- package/dist/esm/chunk-H3NRKYG4.mjs +2 -0
- package/dist/esm/chunk-H3NRKYG4.mjs.map +1 -0
- package/dist/esm/chunk-HDDI532F.mjs +2 -0
- package/dist/esm/chunk-HDDI532F.mjs.map +1 -0
- package/dist/esm/chunk-HHETZQ6D.mjs +2 -0
- package/dist/esm/{chunk-TR6Q7RSZ.mjs.map → chunk-HHETZQ6D.mjs.map} +1 -1
- package/dist/esm/{chunk-T3QZ5HSE.mjs → chunk-HLBUOMKA.mjs} +2 -2
- package/dist/esm/chunk-HLBUOMKA.mjs.map +1 -0
- package/dist/esm/{chunk-NU6UF6RM.mjs → chunk-I24X55BI.mjs} +2 -2
- package/dist/esm/{chunk-2QGT5DK3.mjs → chunk-I2RHCBHM.mjs} +2 -2
- package/dist/esm/{chunk-2I2XAOH7.mjs → chunk-ILTVKYMT.mjs} +2 -2
- package/dist/esm/{chunk-U7EZI5D5.mjs → chunk-IOSQVDZI.mjs} +2 -2
- package/dist/esm/{chunk-R25D6NBC.mjs → chunk-J5WUVXKC.mjs} +2 -2
- package/dist/esm/chunk-J5WUVXKC.mjs.map +1 -0
- package/dist/esm/{chunk-VJCQBX6V.mjs → chunk-JAIQBRLH.mjs} +2 -2
- package/dist/esm/{chunk-XJFGX3E4.mjs → chunk-JK23P2GY.mjs} +2 -2
- package/dist/esm/chunk-JK23P2GY.mjs.map +1 -0
- package/dist/esm/chunk-KBRRTSF6.mjs +2 -0
- package/dist/esm/{chunk-T7TIIAWK.mjs.map → chunk-KBRRTSF6.mjs.map} +1 -1
- package/dist/esm/{chunk-YP3RMVL3.mjs → chunk-KECXKWWV.mjs} +2 -2
- package/dist/esm/{chunk-YIG37BG2.mjs → chunk-LGVHYLN2.mjs} +2 -2
- package/dist/esm/chunk-LGVHYLN2.mjs.map +1 -0
- package/dist/esm/chunk-LJ6MB5U7.mjs +2 -0
- package/dist/esm/chunk-LR65XHSF.mjs +2 -0
- package/dist/esm/chunk-LR65XHSF.mjs.map +1 -0
- package/dist/esm/chunk-LYCGUGYR.mjs +2 -0
- package/dist/esm/chunk-LYCGUGYR.mjs.map +1 -0
- package/dist/esm/chunk-M3NK6GOI.mjs +2 -0
- package/dist/esm/chunk-M3NK6GOI.mjs.map +1 -0
- package/dist/esm/{chunk-B645DPPF.mjs → chunk-MFFSJJSY.mjs} +2 -2
- package/dist/esm/chunk-MLWIHWNH.mjs +1 -0
- package/dist/esm/chunk-MQXSU6GN.mjs +2 -0
- package/dist/esm/{chunk-LVYKZS54.mjs.map → chunk-MQXSU6GN.mjs.map} +1 -1
- package/dist/esm/{chunk-JYFKKB34.mjs → chunk-NPFNYP75.mjs} +2 -2
- package/dist/esm/{chunk-RXMGJBCP.mjs → chunk-O5ZLNJ6Z.mjs} +2 -2
- package/dist/esm/chunk-O5ZLNJ6Z.mjs.map +1 -0
- package/dist/esm/{chunk-V7VV5QW4.mjs → chunk-O7P52OOA.mjs} +2 -2
- package/dist/esm/{chunk-ZGWWPB3D.mjs → chunk-O7PPRJJC.mjs} +2 -2
- package/dist/esm/chunk-O7PPRJJC.mjs.map +1 -0
- package/dist/esm/chunk-OATDMLDK.mjs +2 -0
- package/dist/esm/chunk-OATDMLDK.mjs.map +1 -0
- package/dist/esm/chunk-OMC3ZGKN.mjs +2 -0
- package/dist/esm/chunk-OMC3ZGKN.mjs.map +1 -0
- package/dist/esm/chunk-OVJQWQ2N.mjs +2 -0
- package/dist/esm/chunk-OVJQWQ2N.mjs.map +1 -0
- package/dist/esm/chunk-OWW6SIDP.mjs +2 -0
- package/dist/esm/chunk-OWW6SIDP.mjs.map +1 -0
- package/dist/esm/{chunk-MKHPGY3O.mjs → chunk-OZNBOCEF.mjs} +2 -2
- package/dist/esm/chunk-PNGS6IWC.mjs +2 -0
- package/dist/esm/{chunk-VVJEWB26.mjs → chunk-QIAHBEEW.mjs} +2 -2
- package/dist/esm/{chunk-ED6PYTNG.mjs → chunk-QM4UQVGB.mjs} +2 -2
- package/dist/esm/{chunk-KX5ESZO7.mjs → chunk-R5QUBEH6.mjs} +2 -2
- package/dist/esm/chunk-R7G3CLRI.mjs +1 -0
- package/dist/esm/{chunk-WZCUABDL.mjs → chunk-RHBCVCOS.mjs} +2 -2
- package/dist/esm/{chunk-7EQOLMEJ.mjs → chunk-TBMAJ6AW.mjs} +2 -2
- package/dist/esm/{chunk-IVBYTTN7.mjs → chunk-U43IJHQN.mjs} +2 -2
- package/dist/esm/{chunk-XI4LX4EC.mjs → chunk-UML2VQZT.mjs} +2 -2
- package/dist/esm/chunk-UVSRX4SV.mjs +1 -0
- package/dist/esm/chunk-V6SPPOWX.mjs +2 -0
- package/dist/esm/chunk-VVMR7UKB.mjs +2 -0
- package/dist/esm/chunk-VVMR7UKB.mjs.map +1 -0
- package/dist/esm/{chunk-2VCKY2ZJ.mjs → chunk-WFL6YWJS.mjs} +2 -2
- package/dist/esm/{chunk-HZC6A3QL.mjs → chunk-WFZDFFBM.mjs} +2 -2
- package/dist/esm/chunk-WZNX3RBA.mjs +2 -0
- package/dist/esm/chunk-XDGQTMDV.mjs +2 -0
- package/dist/esm/chunk-XDGQTMDV.mjs.map +1 -0
- package/dist/esm/chunk-XRAL7KVT.mjs +2 -0
- package/dist/esm/chunk-XRAL7KVT.mjs.map +1 -0
- package/dist/esm/{chunk-U426PZNM.mjs → chunk-Y5GRH4YJ.mjs} +2 -2
- package/dist/esm/chunk-Y5GRH4YJ.mjs.map +1 -0
- package/dist/esm/{chunk-KMHJNUXU.mjs → chunk-YUN2JVAN.mjs} +2 -2
- package/dist/esm/{chunk-KBSAS57Q.mjs → chunk-YVIP7DMT.mjs} +2 -2
- package/dist/esm/{chunk-OAOJVE5X.mjs → chunk-YWN2T4IU.mjs} +2 -2
- package/dist/esm/chunk-YZKDNVA5.mjs +2 -0
- package/dist/esm/chunk-YZKDNVA5.mjs.map +1 -0
- package/dist/esm/{chunk-UZHVGPGH.mjs → chunk-ZYYK3UXP.mjs} +2 -2
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.d.mts +1 -2
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.d.mts +2 -2
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.d.mts +1 -3
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/core/account/Account.d.mts +20 -0
- package/dist/esm/core/account/Account.mjs +2 -0
- package/dist/esm/core/account/Ed25519Account.d.mts +20 -0
- package/dist/esm/core/account/Ed25519Account.mjs +2 -0
- package/dist/esm/core/account/SingleKeyAccount.d.mts +20 -0
- package/dist/esm/core/account/SingleKeyAccount.mjs +2 -0
- package/dist/esm/core/account/index.d.mts +21 -0
- package/dist/esm/core/account/index.mjs +2 -0
- package/dist/esm/core/account/utils/address.mjs +1 -1
- package/dist/esm/core/account/utils/index.mjs +1 -1
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.d.mts +10 -0
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/hdKey.d.mts +1 -15
- package/dist/esm/core/crypto/hdKey.mjs +1 -1
- package/dist/esm/core/crypto/index.d.mts +5 -7
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.d.mts +3 -4
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/publicKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/index.d.mts +7 -6
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/index.d.mts +9 -15
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/account.d.mts +1 -13
- 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 +7 -7
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.d.mts +10 -10
- 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 +9 -9
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- 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/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.d.mts +1 -1
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/internal/view.d.mts +7 -7
- package/dist/esm/internal/view.mjs +1 -1
- package/dist/esm/transactions/authenticator/account.d.mts +4 -3
- 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 +2 -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.mjs +1 -1
- package/dist/esm/transactions/instances/moduleId.d.mts +1 -1
- package/dist/esm/transactions/instances/moduleId.mjs +1 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/transactionPayload.d.mts +1 -1
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.d.mts +1 -13
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/index.d.mts +2 -2
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.d.mts +1 -1
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.d.mts +9 -9
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.d.mts +9 -9
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +6 -6
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +28 -6
- 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 +6 -6
- package/dist/esm/types/index.d.mts +3 -17
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/utils/apiEndpoints.d.mts +1 -3
- package/dist/esm/utils/apiEndpoints.mjs +1 -1
- package/dist/esm/utils/const.d.mts +3 -5
- package/dist/esm/utils/const.mjs +1 -1
- package/dist/esm/utils/index.d.mts +1 -1
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -7
- package/src/api/account.ts +1 -2
- package/src/api/ans.ts +1 -2
- package/src/api/aptos.ts +0 -6
- package/src/api/aptosConfig.ts +1 -46
- package/src/api/digitalAsset.ts +1 -2
- package/src/api/fungibleAsset.ts +1 -2
- package/src/api/transaction.ts +1 -2
- package/src/api/transactionSubmission/management.ts +1 -1
- package/src/api/transactionSubmission/sign.ts +1 -1
- package/src/bcs/serializer.ts +0 -18
- package/src/client/core.ts +0 -8
- package/src/client/get.ts +0 -6
- package/src/client/post.ts +0 -13
- package/src/{account → core/account}/Account.ts +16 -12
- package/src/{account → core/account}/Ed25519Account.ts +7 -13
- package/src/{account → core/account}/SingleKeyAccount.ts +7 -13
- package/src/core/account/index.ts +4 -0
- package/src/core/crypto/ed25519.ts +24 -6
- package/src/core/crypto/hdKey.ts +0 -31
- package/src/core/crypto/index.ts +0 -2
- package/src/core/crypto/multiKey.ts +11 -23
- package/src/core/crypto/singleKey.ts +0 -11
- package/src/core/index.ts +1 -0
- package/src/index.ts +0 -1
- package/src/internal/account.ts +1 -1
- package/src/internal/ans.ts +1 -2
- package/src/internal/digitalAsset.ts +1 -2
- package/src/internal/fungibleAsset.ts +1 -2
- package/src/internal/transactionSubmission.ts +10 -9
- package/src/transactions/authenticator/account.ts +11 -6
- package/src/transactions/management/accountSequenceNumber.ts +1 -1
- package/src/transactions/management/transactionWorker.ts +2 -8
- package/src/transactions/transactionBuilder/index.ts +0 -2
- package/src/transactions/transactionBuilder/transactionBuilder.ts +128 -40
- package/src/types/index.ts +0 -20
- package/src/utils/apiEndpoints.ts +1 -14
- package/src/utils/const.ts +2 -4
- package/src/version.ts +1 -1
- package/dist/esm/account/Account.d.mts +0 -34
- package/dist/esm/account/Account.mjs +0 -2
- package/dist/esm/account/Ed25519Account.d.mts +0 -34
- package/dist/esm/account/Ed25519Account.mjs +0 -2
- package/dist/esm/account/EphemeralKeyPair.d.mts +0 -42
- package/dist/esm/account/EphemeralKeyPair.mjs +0 -2
- package/dist/esm/account/KeylessAccount.d.mts +0 -85
- package/dist/esm/account/KeylessAccount.mjs +0 -2
- package/dist/esm/account/MultiKeyAccount.d.mts +0 -99
- package/dist/esm/account/MultiKeyAccount.mjs +0 -2
- package/dist/esm/account/SingleKeyAccount.d.mts +0 -34
- package/dist/esm/account/SingleKeyAccount.mjs +0 -2
- package/dist/esm/account/index.d.mts +0 -39
- package/dist/esm/account/index.mjs +0 -2
- package/dist/esm/api/keyless.d.mts +0 -75
- package/dist/esm/api/keyless.mjs +0 -2
- package/dist/esm/chunk-2FKQJL3H.mjs +0 -2
- package/dist/esm/chunk-2FKQJL3H.mjs.map +0 -1
- package/dist/esm/chunk-2HXKDHMA.mjs +0 -2
- package/dist/esm/chunk-2HXKDHMA.mjs.map +0 -1
- package/dist/esm/chunk-2MPLQPZT.mjs +0 -2
- package/dist/esm/chunk-2MPLQPZT.mjs.map +0 -1
- package/dist/esm/chunk-2Z4N3GLA.mjs +0 -2
- package/dist/esm/chunk-2Z4N3GLA.mjs.map +0 -1
- package/dist/esm/chunk-3J2Q7O57.mjs +0 -2
- package/dist/esm/chunk-3J2Q7O57.mjs.map +0 -1
- package/dist/esm/chunk-4AOGG725.mjs +0 -2
- package/dist/esm/chunk-4AOGG725.mjs.map +0 -1
- package/dist/esm/chunk-5D65Z2SG.mjs.map +0 -1
- package/dist/esm/chunk-5GIWRESN.mjs +0 -2
- package/dist/esm/chunk-6OKRMOWR.mjs +0 -2
- package/dist/esm/chunk-6OKRMOWR.mjs.map +0 -1
- package/dist/esm/chunk-7Z6DYLCA.mjs +0 -1
- package/dist/esm/chunk-ACOL3VVP.mjs +0 -2
- package/dist/esm/chunk-ACOL3VVP.mjs.map +0 -1
- package/dist/esm/chunk-AQ4I7VVB.mjs +0 -1
- package/dist/esm/chunk-AQ4I7VVB.mjs.map +0 -1
- package/dist/esm/chunk-ATXQWKVH.mjs +0 -2
- package/dist/esm/chunk-ATXQWKVH.mjs.map +0 -1
- package/dist/esm/chunk-EMFDNUP2.mjs +0 -2
- package/dist/esm/chunk-EMFDNUP2.mjs.map +0 -1
- package/dist/esm/chunk-EY3FIYMV.mjs +0 -2
- package/dist/esm/chunk-EY3FIYMV.mjs.map +0 -1
- package/dist/esm/chunk-FLYEALDB.mjs +0 -2
- package/dist/esm/chunk-FLYEALDB.mjs.map +0 -1
- package/dist/esm/chunk-HTO4EQNT.mjs +0 -2
- package/dist/esm/chunk-HTO4EQNT.mjs.map +0 -1
- package/dist/esm/chunk-J5SQQQPI.mjs +0 -2
- package/dist/esm/chunk-JXCZTOYC.mjs +0 -1
- package/dist/esm/chunk-JXCZTOYC.mjs.map +0 -1
- package/dist/esm/chunk-KWDJ4YOP.mjs +0 -2
- package/dist/esm/chunk-KWDJ4YOP.mjs.map +0 -1
- package/dist/esm/chunk-LVYKZS54.mjs +0 -2
- package/dist/esm/chunk-MAFSWKAF.mjs +0 -2
- package/dist/esm/chunk-MAFSWKAF.mjs.map +0 -1
- package/dist/esm/chunk-MX3YIOU5.mjs +0 -2
- package/dist/esm/chunk-MX3YIOU5.mjs.map +0 -1
- package/dist/esm/chunk-NJWTXEHT.mjs +0 -2
- package/dist/esm/chunk-NJWTXEHT.mjs.map +0 -1
- package/dist/esm/chunk-ODA4KV4Q.mjs +0 -2
- package/dist/esm/chunk-OVXWFD2N.mjs +0 -2
- package/dist/esm/chunk-Q6CZDSLM.mjs +0 -2
- package/dist/esm/chunk-R25D6NBC.mjs.map +0 -1
- package/dist/esm/chunk-RFSO3JRG.mjs +0 -1
- package/dist/esm/chunk-RFSO3JRG.mjs.map +0 -1
- package/dist/esm/chunk-RXMGJBCP.mjs.map +0 -1
- package/dist/esm/chunk-S5HG2QUD.mjs +0 -2
- package/dist/esm/chunk-S5HG2QUD.mjs.map +0 -1
- package/dist/esm/chunk-SCPXFKEK.mjs +0 -2
- package/dist/esm/chunk-SCPXFKEK.mjs.map +0 -1
- package/dist/esm/chunk-T3QZ5HSE.mjs.map +0 -1
- package/dist/esm/chunk-T7TIIAWK.mjs +0 -2
- package/dist/esm/chunk-TR6Q7RSZ.mjs +0 -2
- package/dist/esm/chunk-TT2VLL52.mjs +0 -2
- package/dist/esm/chunk-TT2VLL52.mjs.map +0 -1
- package/dist/esm/chunk-U426PZNM.mjs.map +0 -1
- package/dist/esm/chunk-ULUMROUJ.mjs +0 -2
- package/dist/esm/chunk-ULUMROUJ.mjs.map +0 -1
- package/dist/esm/chunk-VAZQVN5V.mjs +0 -2
- package/dist/esm/chunk-VAZQVN5V.mjs.map +0 -1
- package/dist/esm/chunk-WF737YNO.mjs +0 -2
- package/dist/esm/chunk-WF737YNO.mjs.map +0 -1
- package/dist/esm/chunk-XESYWLDD.mjs.map +0 -1
- package/dist/esm/chunk-XJ3HRNOP.mjs +0 -2
- package/dist/esm/chunk-XJ3HRNOP.mjs.map +0 -1
- package/dist/esm/chunk-XJFGX3E4.mjs.map +0 -1
- package/dist/esm/chunk-YIG37BG2.mjs.map +0 -1
- package/dist/esm/chunk-YPBHGSXY.mjs +0 -2
- package/dist/esm/chunk-YPBHGSXY.mjs.map +0 -1
- package/dist/esm/chunk-YU7DNMEA.mjs +0 -2
- package/dist/esm/chunk-YU7DNMEA.mjs.map +0 -1
- package/dist/esm/chunk-ZG6HOK6A.mjs +0 -2
- package/dist/esm/chunk-ZG6HOK6A.mjs.map +0 -1
- package/dist/esm/chunk-ZGWWPB3D.mjs.map +0 -1
- package/dist/esm/chunk-ZUDMSBVZ.mjs +0 -2
- package/dist/esm/chunk-ZUDMSBVZ.mjs.map +0 -1
- package/dist/esm/core/crypto/ephemeral.d.mts +0 -76
- package/dist/esm/core/crypto/ephemeral.mjs +0 -2
- package/dist/esm/core/crypto/ephemeral.mjs.map +0 -1
- package/dist/esm/core/crypto/keyless.d.mts +0 -217
- package/dist/esm/core/crypto/keyless.mjs +0 -2
- package/dist/esm/core/crypto/keyless.mjs.map +0 -1
- package/dist/esm/core/crypto/poseidon.d.mts +0 -7
- package/dist/esm/core/crypto/poseidon.mjs +0 -2
- package/dist/esm/core/crypto/poseidon.mjs.map +0 -1
- package/dist/esm/internal/keyless.d.mts +0 -68
- package/dist/esm/internal/keyless.mjs +0 -2
- package/dist/esm/internal/keyless.mjs.map +0 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +0 -47
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +0 -2
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs.map +0 -1
- package/dist/esm/types/keyless.d.mts +0 -14
- package/dist/esm/types/keyless.mjs +0 -1
- package/dist/esm/types/keyless.mjs.map +0 -1
- package/src/account/EphemeralKeyPair.ts +0 -78
- package/src/account/KeylessAccount.ts +0 -230
- package/src/account/MultiKeyAccount.ts +0 -121
- package/src/account/index.ts +0 -6
- package/src/api/keyless.ts +0 -55
- package/src/core/crypto/ephemeral.ts +0 -147
- package/src/core/crypto/keyless.ts +0 -502
- package/src/core/crypto/poseidon.ts +0 -134
- package/src/internal/keyless.ts +0 -205
- package/src/transactions/transactionBuilder/signingMessage.ts +0 -75
- package/src/types/keyless.ts +0 -6
- /package/dist/esm/{chunk-RBDX3YWC.mjs.map → chunk-2SPJ7XZB.mjs.map} +0 -0
- /package/dist/esm/{account/Account.mjs.map → chunk-4QMXOWHP.mjs.map} +0 -0
- /package/dist/esm/{chunk-7M3U2I23.mjs.map → chunk-4UJ5Y6QQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-YNBWXDRS.mjs.map → chunk-6GZ5SUUK.mjs.map} +0 -0
- /package/dist/esm/{chunk-5TNUDFLP.mjs.map → chunk-BGW77OLE.mjs.map} +0 -0
- /package/dist/esm/{chunk-MRCVSUJQ.mjs.map → chunk-BWFJHFBQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-BQCIUNLZ.mjs.map → chunk-CZF6JTC2.mjs.map} +0 -0
- /package/dist/esm/{chunk-Q225PZMV.mjs.map → chunk-DMKUAQB7.mjs.map} +0 -0
- /package/dist/esm/{chunk-RM7D2ITN.mjs.map → chunk-DSTKXJMA.mjs.map} +0 -0
- /package/dist/esm/{chunk-P4UY6YKM.mjs.map → chunk-DW4FAHFT.mjs.map} +0 -0
- /package/dist/esm/{chunk-CHL5NDZD.mjs.map → chunk-DW5XFUDM.mjs.map} +0 -0
- /package/dist/esm/{account/Ed25519Account.mjs.map → chunk-E7FWVXGX.mjs.map} +0 -0
- /package/dist/esm/{chunk-CYWA4AJF.mjs.map → chunk-E7OPTWPP.mjs.map} +0 -0
- /package/dist/esm/{chunk-3FL3NLZ6.mjs.map → chunk-F5O5BBEK.mjs.map} +0 -0
- /package/dist/esm/{chunk-35ZI4WOQ.mjs.map → chunk-FS3NSGBF.mjs.map} +0 -0
- /package/dist/esm/{chunk-NU6UF6RM.mjs.map → chunk-I24X55BI.mjs.map} +0 -0
- /package/dist/esm/{chunk-2QGT5DK3.mjs.map → chunk-I2RHCBHM.mjs.map} +0 -0
- /package/dist/esm/{chunk-2I2XAOH7.mjs.map → chunk-ILTVKYMT.mjs.map} +0 -0
- /package/dist/esm/{chunk-U7EZI5D5.mjs.map → chunk-IOSQVDZI.mjs.map} +0 -0
- /package/dist/esm/{chunk-VJCQBX6V.mjs.map → chunk-JAIQBRLH.mjs.map} +0 -0
- /package/dist/esm/{chunk-YP3RMVL3.mjs.map → chunk-KECXKWWV.mjs.map} +0 -0
- /package/dist/esm/{chunk-ODA4KV4Q.mjs.map → chunk-LJ6MB5U7.mjs.map} +0 -0
- /package/dist/esm/{chunk-B645DPPF.mjs.map → chunk-MFFSJJSY.mjs.map} +0 -0
- /package/dist/esm/{account/EphemeralKeyPair.mjs.map → chunk-MLWIHWNH.mjs.map} +0 -0
- /package/dist/esm/{chunk-JYFKKB34.mjs.map → chunk-NPFNYP75.mjs.map} +0 -0
- /package/dist/esm/{chunk-V7VV5QW4.mjs.map → chunk-O7P52OOA.mjs.map} +0 -0
- /package/dist/esm/{chunk-MKHPGY3O.mjs.map → chunk-OZNBOCEF.mjs.map} +0 -0
- /package/dist/esm/{chunk-Q6CZDSLM.mjs.map → chunk-PNGS6IWC.mjs.map} +0 -0
- /package/dist/esm/{chunk-VVJEWB26.mjs.map → chunk-QIAHBEEW.mjs.map} +0 -0
- /package/dist/esm/{chunk-ED6PYTNG.mjs.map → chunk-QM4UQVGB.mjs.map} +0 -0
- /package/dist/esm/{chunk-KX5ESZO7.mjs.map → chunk-R5QUBEH6.mjs.map} +0 -0
- /package/dist/esm/{account/KeylessAccount.mjs.map → chunk-R7G3CLRI.mjs.map} +0 -0
- /package/dist/esm/{chunk-WZCUABDL.mjs.map → chunk-RHBCVCOS.mjs.map} +0 -0
- /package/dist/esm/{chunk-7EQOLMEJ.mjs.map → chunk-TBMAJ6AW.mjs.map} +0 -0
- /package/dist/esm/{chunk-IVBYTTN7.mjs.map → chunk-U43IJHQN.mjs.map} +0 -0
- /package/dist/esm/{chunk-XI4LX4EC.mjs.map → chunk-UML2VQZT.mjs.map} +0 -0
- /package/dist/esm/{account/MultiKeyAccount.mjs.map → chunk-UVSRX4SV.mjs.map} +0 -0
- /package/dist/esm/{chunk-5GIWRESN.mjs.map → chunk-V6SPPOWX.mjs.map} +0 -0
- /package/dist/esm/{chunk-2VCKY2ZJ.mjs.map → chunk-WFL6YWJS.mjs.map} +0 -0
- /package/dist/esm/{chunk-HZC6A3QL.mjs.map → chunk-WFZDFFBM.mjs.map} +0 -0
- /package/dist/esm/{chunk-J5SQQQPI.mjs.map → chunk-WZNX3RBA.mjs.map} +0 -0
- /package/dist/esm/{chunk-KMHJNUXU.mjs.map → chunk-YUN2JVAN.mjs.map} +0 -0
- /package/dist/esm/{chunk-KBSAS57Q.mjs.map → chunk-YVIP7DMT.mjs.map} +0 -0
- /package/dist/esm/{chunk-OAOJVE5X.mjs.map → chunk-YWN2T4IU.mjs.map} +0 -0
- /package/dist/esm/{chunk-UZHVGPGH.mjs.map → chunk-ZYYK3UXP.mjs.map} +0 -0
- /package/dist/esm/{account/SingleKeyAccount.mjs.map → core/account/Account.mjs.map} +0 -0
- /package/dist/esm/{account/index.mjs.map → core/account/Ed25519Account.mjs.map} +0 -0
- /package/dist/esm/{api/keyless.mjs.map → core/account/SingleKeyAccount.mjs.map} +0 -0
- /package/dist/esm/{chunk-7Z6DYLCA.mjs.map → core/account/index.mjs.map} +0 -0
package/src/api/aptos.ts
CHANGED
|
@@ -12,7 +12,6 @@ import { General } from "./general";
|
|
|
12
12
|
import { ANS } from "./ans";
|
|
13
13
|
import { Staking } from "./staking";
|
|
14
14
|
import { Transaction } from "./transaction";
|
|
15
|
-
import { Keyless } from "./keyless";
|
|
16
15
|
|
|
17
16
|
/**
|
|
18
17
|
* This class is the main entry point into Aptos's
|
|
@@ -48,8 +47,6 @@ export class Aptos {
|
|
|
48
47
|
|
|
49
48
|
readonly transaction: Transaction;
|
|
50
49
|
|
|
51
|
-
readonly keyless: Keyless;
|
|
52
|
-
|
|
53
50
|
constructor(settings?: AptosConfig) {
|
|
54
51
|
this.config = new AptosConfig(settings);
|
|
55
52
|
this.account = new Account(this.config);
|
|
@@ -62,7 +59,6 @@ export class Aptos {
|
|
|
62
59
|
this.general = new General(this.config);
|
|
63
60
|
this.staking = new Staking(this.config);
|
|
64
61
|
this.transaction = new Transaction(this.config);
|
|
65
|
-
this.keyless = new Keyless(this.config);
|
|
66
62
|
}
|
|
67
63
|
}
|
|
68
64
|
|
|
@@ -77,7 +73,6 @@ export interface Aptos
|
|
|
77
73
|
Faucet,
|
|
78
74
|
FungibleAsset,
|
|
79
75
|
General,
|
|
80
|
-
Keyless,
|
|
81
76
|
Staking,
|
|
82
77
|
Omit<Transaction, "build" | "simulate" | "submit" | "batch"> {}
|
|
83
78
|
|
|
@@ -112,4 +107,3 @@ applyMixin(Aptos, FungibleAsset, "fungibleAsset");
|
|
|
112
107
|
applyMixin(Aptos, General, "general");
|
|
113
108
|
applyMixin(Aptos, Staking, "staking");
|
|
114
109
|
applyMixin(Aptos, Transaction, "transaction");
|
|
115
|
-
applyMixin(Aptos, Keyless, "keyless");
|
package/src/api/aptosConfig.ts
CHANGED
|
@@ -3,14 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import aptosClient from "@aptos-labs/aptos-client";
|
|
5
5
|
import { AptosSettings, ClientConfig, Client, FullNodeConfig, IndexerConfig, FaucetConfig } from "../types";
|
|
6
|
-
import {
|
|
7
|
-
NetworkToNodeAPI,
|
|
8
|
-
NetworkToFaucetAPI,
|
|
9
|
-
NetworkToIndexerAPI,
|
|
10
|
-
Network,
|
|
11
|
-
NetworkToPepperAPI,
|
|
12
|
-
NetworkToProverAPI,
|
|
13
|
-
} from "../utils/apiEndpoints";
|
|
6
|
+
import { NetworkToNodeAPI, NetworkToFaucetAPI, NetworkToIndexerAPI, Network } from "../utils/apiEndpoints";
|
|
14
7
|
import { AptosApiType } from "../utils/const";
|
|
15
8
|
|
|
16
9
|
/**
|
|
@@ -41,16 +34,6 @@ export class AptosConfig {
|
|
|
41
34
|
*/
|
|
42
35
|
readonly faucet?: string;
|
|
43
36
|
|
|
44
|
-
/**
|
|
45
|
-
* The optional hardcoded pepper service URL to send requests to instead of using the network
|
|
46
|
-
*/
|
|
47
|
-
readonly pepper?: string;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* The optional hardcoded prover service URL to send requests to instead of using the network
|
|
51
|
-
*/
|
|
52
|
-
readonly prover?: string;
|
|
53
|
-
|
|
54
37
|
/**
|
|
55
38
|
* The optional hardcoded indexer URL to send requests to instead of using the network
|
|
56
39
|
*/
|
|
@@ -80,8 +63,6 @@ export class AptosConfig {
|
|
|
80
63
|
this.network = settings?.network ?? Network.DEVNET;
|
|
81
64
|
this.fullnode = settings?.fullnode;
|
|
82
65
|
this.faucet = settings?.faucet;
|
|
83
|
-
this.pepper = settings?.pepper;
|
|
84
|
-
this.prover = settings?.prover;
|
|
85
66
|
this.indexer = settings?.indexer;
|
|
86
67
|
this.client = settings?.client ?? { provider: aptosClient };
|
|
87
68
|
this.clientConfig = settings?.clientConfig ?? {};
|
|
@@ -114,34 +95,8 @@ export class AptosConfig {
|
|
|
114
95
|
if (this.indexer !== undefined) return this.indexer;
|
|
115
96
|
if (this.network === Network.CUSTOM) throw new Error("Please provide a custom indexer url");
|
|
116
97
|
return NetworkToIndexerAPI[this.network];
|
|
117
|
-
case AptosApiType.PEPPER:
|
|
118
|
-
if (this.pepper !== undefined) return this.pepper;
|
|
119
|
-
if (this.network === Network.CUSTOM) throw new Error("Please provide a custom pepper service url");
|
|
120
|
-
return NetworkToPepperAPI[this.network];
|
|
121
|
-
case AptosApiType.PROVER:
|
|
122
|
-
if (this.prover !== undefined) return this.prover;
|
|
123
|
-
if (this.network === Network.CUSTOM) throw new Error("Please provide a custom prover service url");
|
|
124
|
-
return NetworkToProverAPI[this.network];
|
|
125
98
|
default:
|
|
126
99
|
throw Error(`apiType ${apiType} is not supported`);
|
|
127
100
|
}
|
|
128
101
|
}
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Checks if the URL is a known pepper service endpoint
|
|
132
|
-
*
|
|
133
|
-
* @internal
|
|
134
|
-
* */
|
|
135
|
-
isPepperServiceRequest(url: string): boolean {
|
|
136
|
-
return NetworkToPepperAPI[this.network] === url;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Checks if the URL is a known prover service endpoint
|
|
141
|
-
*
|
|
142
|
-
* @internal
|
|
143
|
-
* */
|
|
144
|
-
isProverServiceRequest(url: string): boolean {
|
|
145
|
-
return NetworkToProverAPI[this.network] === url;
|
|
146
|
-
}
|
|
147
102
|
}
|
package/src/api/digitalAsset.ts
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
PaginationArgs,
|
|
14
14
|
TokenStandardArg,
|
|
15
15
|
} from "../types";
|
|
16
|
-
import { AccountAddress, AccountAddressInput } from "../core";
|
|
16
|
+
import { Account, AccountAddress, AccountAddressInput } from "../core";
|
|
17
17
|
import { InputGenerateTransactionOptions } from "../transactions/types";
|
|
18
18
|
import {
|
|
19
19
|
addDigitalAssetPropertyTransaction,
|
|
@@ -45,7 +45,6 @@ import {
|
|
|
45
45
|
import { ProcessorType } from "../utils/const";
|
|
46
46
|
import { AptosConfig } from "./aptosConfig";
|
|
47
47
|
import { waitForIndexerOnVersion } from "./utils";
|
|
48
|
-
import { Account } from "../account";
|
|
49
48
|
import { SimpleTransaction } from "../transactions/instances/simpleTransaction";
|
|
50
49
|
|
|
51
50
|
/**
|
package/src/api/fungibleAsset.ts
CHANGED
|
@@ -23,9 +23,8 @@ import {
|
|
|
23
23
|
import { ProcessorType } from "../utils/const";
|
|
24
24
|
import { AptosConfig } from "./aptosConfig";
|
|
25
25
|
import { waitForIndexerOnVersion } from "./utils";
|
|
26
|
-
import { AccountAddressInput } from "../core";
|
|
26
|
+
import { Account, AccountAddressInput } from "../core";
|
|
27
27
|
import { InputGenerateTransactionOptions } from "../transactions";
|
|
28
|
-
import { Account } from "../account";
|
|
29
28
|
import { SimpleTransaction } from "../transactions/instances/simpleTransaction";
|
|
30
29
|
|
|
31
30
|
/**
|
package/src/api/transaction.ts
CHANGED
|
@@ -33,12 +33,11 @@ import {
|
|
|
33
33
|
InputGenerateTransactionOptions,
|
|
34
34
|
InputGenerateTransactionPayloadData,
|
|
35
35
|
} from "../transactions";
|
|
36
|
-
import { AccountAddressInput, PrivateKey } from "../core";
|
|
36
|
+
import { AccountAddressInput, Account, PrivateKey } from "../core";
|
|
37
37
|
import { Build } from "./transactionSubmission/build";
|
|
38
38
|
import { Simulate } from "./transactionSubmission/simulate";
|
|
39
39
|
import { Submit } from "./transactionSubmission/submit";
|
|
40
40
|
import { TransactionManagement } from "./transactionSubmission/management";
|
|
41
|
-
import { Account } from "../account/Account";
|
|
42
41
|
import { SimpleTransaction } from "../transactions/instances/simpleTransaction";
|
|
43
42
|
|
|
44
43
|
export class Transaction {
|
|
@@ -2,7 +2,7 @@ import EventEmitter from "eventemitter3";
|
|
|
2
2
|
import { TransactionWorkerEvents, TransactionWorker, TransactionWorkerEventsEnum } from "../../transactions/management";
|
|
3
3
|
import { InputGenerateTransactionPayloadData, InputGenerateTransactionOptions } from "../../transactions";
|
|
4
4
|
import { AptosConfig } from "../aptosConfig";
|
|
5
|
-
import { Account } from "../../
|
|
5
|
+
import { Account } from "../../core";
|
|
6
6
|
|
|
7
7
|
export class TransactionManagement extends EventEmitter<TransactionWorkerEvents> {
|
|
8
8
|
account!: Account;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright © Aptos Foundation
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import { Account } from "../../
|
|
4
|
+
import { Account } from "../../core";
|
|
5
5
|
import { signTransaction } from "../../internal/transactionSubmission";
|
|
6
6
|
import { AccountAuthenticator, AnyRawTransaction } from "../../transactions";
|
|
7
7
|
import { AptosConfig } from "../aptosConfig";
|
package/src/bcs/serializer.ts
CHANGED
|
@@ -316,24 +316,6 @@ export class Serializer {
|
|
|
316
316
|
item.serialize(this);
|
|
317
317
|
});
|
|
318
318
|
}
|
|
319
|
-
|
|
320
|
-
serializeOption<T extends Serializable>(value?: T): void {
|
|
321
|
-
if (value === undefined) {
|
|
322
|
-
this.serializeU32AsUleb128(0);
|
|
323
|
-
} else {
|
|
324
|
-
this.serializeU32AsUleb128(1);
|
|
325
|
-
value.serialize(this);
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
serializeOptionStr(value?: string): void {
|
|
330
|
-
if (value === undefined) {
|
|
331
|
-
this.serializeU32AsUleb128(0);
|
|
332
|
-
} else {
|
|
333
|
-
this.serializeU32AsUleb128(1);
|
|
334
|
-
this.serializeStr(value);
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
319
|
}
|
|
338
320
|
|
|
339
321
|
export function ensureBoolean(value: unknown): asserts value is boolean {
|
package/src/client/core.ts
CHANGED
|
@@ -106,14 +106,6 @@ export async function aptosRequest<Req extends {}, Res extends {}>(
|
|
|
106
106
|
return result;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
if (result.status >= 500) {
|
|
110
|
-
throw new AptosApiError(options, result, `${response.data}`);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
if (aptosConfig.isPepperServiceRequest(url)) {
|
|
114
|
-
throw new AptosApiError(options, result, `${response.data}`);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
109
|
let errorMessage: string;
|
|
118
110
|
|
|
119
111
|
if (result && result.data && "message" in result.data && "error_code" in result.data) {
|
package/src/client/get.ts
CHANGED
|
@@ -89,12 +89,6 @@ export async function getAptosFullNode<Req extends {}, Res extends {}>(
|
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
export async function getAptosPepperService<Req extends {}, Res extends {}>(
|
|
93
|
-
options: GetAptosRequestOptions,
|
|
94
|
-
): Promise<AptosResponse<Req, Res>> {
|
|
95
|
-
return get<Req, Res>({ ...options, type: AptosApiType.PEPPER });
|
|
96
|
-
}
|
|
97
|
-
|
|
98
92
|
/// This function is a helper for paginating using a function wrapping an API
|
|
99
93
|
export async function paginateWithCursor<Req extends Record<string, any>, Res extends Array<{}>>(
|
|
100
94
|
options: GetAptosRequestOptions,
|
package/src/client/post.ts
CHANGED
|
@@ -135,16 +135,3 @@ export async function postAptosFaucet<Req extends {}, Res extends {}>(
|
|
|
135
135
|
},
|
|
136
136
|
});
|
|
137
137
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
export async function postAptosPepperService<Req extends {}, Res extends {}>(
|
|
141
|
-
options: PostAptosRequestOptions,
|
|
142
|
-
): Promise<AptosResponse<Req, Res>> {
|
|
143
|
-
return post<Req, Res>({ ...options, type: AptosApiType.PEPPER });
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
export async function postAptosProvingService<Req extends {}, Res extends {}>(
|
|
147
|
-
options: PostAptosRequestOptions,
|
|
148
|
-
): Promise<AptosResponse<Req, Res>> {
|
|
149
|
-
return post<Req, Res>({ ...options, type: AptosApiType.PROVER });
|
|
150
|
-
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type { AccountAuthenticator } from "
|
|
2
|
-
import { HexInput, SigningScheme, SigningSchemeInput } from "
|
|
3
|
-
import type { AccountAddress, AccountAddressInput } from "../
|
|
4
|
-
import { AuthenticationKey } from "../
|
|
5
|
-
import { AccountPublicKey, Ed25519PrivateKey, PrivateKey, Signature, VerifySignatureArgs } from "../
|
|
1
|
+
import type { AccountAuthenticator } from "../../transactions/authenticator/account";
|
|
2
|
+
import { HexInput, SigningScheme, SigningSchemeInput } from "../../types";
|
|
3
|
+
import type { AccountAddress, AccountAddressInput } from "../accountAddress";
|
|
4
|
+
import { AuthenticationKey } from "../authenticationKey";
|
|
5
|
+
import { AccountPublicKey, Ed25519PrivateKey, PrivateKey, Signature, VerifySignatureArgs } from "../crypto";
|
|
6
6
|
import { Ed25519Account } from "./Ed25519Account";
|
|
7
7
|
import { SingleKeyAccount } from "./SingleKeyAccount";
|
|
8
|
-
import { AnyRawTransaction } from "../transactions/types";
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
10
|
* Arguments for creating an `Ed25519Account` from an `Ed25519PrivateKey`.
|
|
@@ -107,6 +106,13 @@ export interface PrivateKeyFromDerivationPathArgs {
|
|
|
107
106
|
* Note: Generating an account instance does not create the account on-chain.
|
|
108
107
|
*/
|
|
109
108
|
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
|
+
|
|
110
116
|
/**
|
|
111
117
|
* Public key associated with the account
|
|
112
118
|
*/
|
|
@@ -216,11 +222,11 @@ export abstract class Account {
|
|
|
216
222
|
}
|
|
217
223
|
|
|
218
224
|
/**
|
|
219
|
-
* Sign a
|
|
220
|
-
* @param
|
|
221
|
-
* @return the AccountAuthenticator containing the signature
|
|
225
|
+
* Sign a message using the available signing capabilities.
|
|
226
|
+
* @param message the signing message, as binary input
|
|
227
|
+
* @return the AccountAuthenticator containing the signature, together with the account's public key
|
|
222
228
|
*/
|
|
223
|
-
abstract signWithAuthenticator(
|
|
229
|
+
abstract signWithAuthenticator(message: HexInput): AccountAuthenticator;
|
|
224
230
|
|
|
225
231
|
/**
|
|
226
232
|
* Sign the given message with the private key.
|
|
@@ -229,8 +235,6 @@ export abstract class Account {
|
|
|
229
235
|
*/
|
|
230
236
|
abstract sign(message: HexInput): Signature;
|
|
231
237
|
|
|
232
|
-
abstract signTransaction(transaction: AnyRawTransaction): Signature;
|
|
233
|
-
|
|
234
238
|
/**
|
|
235
239
|
* @param args.message raw message data in HexInput format
|
|
236
240
|
* @param args.signature signed message signature
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { AccountAuthenticatorEd25519 } from "
|
|
2
|
-
import { HexInput, SigningScheme } from "
|
|
3
|
-
import { AccountAddress, AccountAddressInput } from "../
|
|
4
|
-
import { Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature } from "../
|
|
1
|
+
import { AccountAuthenticatorEd25519 } from "../../transactions/authenticator/account";
|
|
2
|
+
import { HexInput, SigningScheme } from "../../types";
|
|
3
|
+
import { AccountAddress, AccountAddressInput } from "../accountAddress";
|
|
4
|
+
import { Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature } from "../crypto";
|
|
5
5
|
import type { Account } from "./Account";
|
|
6
|
-
import { AnyRawTransaction } from "../transactions/types";
|
|
7
|
-
import { generateSigningMessageForTransaction } from "../transactions/transactionBuilder/signingMessage";
|
|
8
6
|
|
|
9
7
|
export interface Ed25519SignerConstructorArgs {
|
|
10
8
|
privateKey: Ed25519PrivateKey;
|
|
@@ -77,17 +75,13 @@ export class Ed25519Account implements Account {
|
|
|
77
75
|
return this.publicKey.verifySignature(args);
|
|
78
76
|
}
|
|
79
77
|
|
|
80
|
-
signWithAuthenticator(
|
|
81
|
-
const signature = this.privateKey.sign(
|
|
78
|
+
signWithAuthenticator(message: HexInput) {
|
|
79
|
+
const signature = this.privateKey.sign(message);
|
|
82
80
|
return new AccountAuthenticatorEd25519(this.publicKey, signature);
|
|
83
81
|
}
|
|
84
82
|
|
|
85
83
|
sign(message: HexInput) {
|
|
86
|
-
return this.
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
signTransaction(transaction: AnyRawTransaction) {
|
|
90
|
-
return this.sign(generateSigningMessageForTransaction(transaction))
|
|
84
|
+
return this.signWithAuthenticator(message).signature;
|
|
91
85
|
}
|
|
92
86
|
|
|
93
87
|
// endregion
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { AccountAuthenticatorSingleKey } from "
|
|
2
|
-
import { type HexInput, SigningScheme, SigningSchemeInput } from "
|
|
3
|
-
import { AccountAddress, AccountAddressInput } from "../
|
|
4
|
-
import { AnyPublicKey, AnySignature, Ed25519PrivateKey, PrivateKey, Secp256k1PrivateKey } from "../
|
|
1
|
+
import { AccountAuthenticatorSingleKey } from "../../transactions/authenticator/account";
|
|
2
|
+
import { type HexInput, SigningScheme, SigningSchemeInput } from "../../types";
|
|
3
|
+
import { AccountAddress, AccountAddressInput } from "../accountAddress";
|
|
4
|
+
import { AnyPublicKey, AnySignature, Ed25519PrivateKey, PrivateKey, Secp256k1PrivateKey } from "../crypto";
|
|
5
5
|
import type { Account } from "./Account";
|
|
6
|
-
import { generateSigningMessageForTransaction } from "../transactions/transactionBuilder/signingMessage";
|
|
7
|
-
import { AnyRawTransaction } from "../transactions/types";
|
|
8
6
|
|
|
9
7
|
export interface SingleKeySignerConstructorArgs {
|
|
10
8
|
privateKey: PrivateKey;
|
|
@@ -108,18 +106,14 @@ export class SingleKeyAccount implements Account {
|
|
|
108
106
|
return this.publicKey.verifySignature(args);
|
|
109
107
|
}
|
|
110
108
|
|
|
111
|
-
signWithAuthenticator(
|
|
112
|
-
const innerSignature = this.sign(
|
|
109
|
+
signWithAuthenticator(message: HexInput) {
|
|
110
|
+
const innerSignature = this.privateKey.sign(message);
|
|
113
111
|
const signature = new AnySignature(innerSignature);
|
|
114
112
|
return new AccountAuthenticatorSingleKey(this.publicKey, signature);
|
|
115
113
|
}
|
|
116
114
|
|
|
117
115
|
sign(message: HexInput) {
|
|
118
|
-
return this.
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
signTransaction(transaction: AnyRawTransaction) {
|
|
122
|
-
return this.sign(generateSigningMessageForTransaction(transaction))
|
|
116
|
+
return this.signWithAuthenticator(message).signature;
|
|
123
117
|
}
|
|
124
118
|
|
|
125
119
|
// endregion
|
|
@@ -7,11 +7,7 @@ import { Serializable, Serializer } from "../../bcs/serializer";
|
|
|
7
7
|
import { AuthenticationKey } from "../authenticationKey";
|
|
8
8
|
import { Hex } from "../hex";
|
|
9
9
|
import { HexInput, SigningScheme as AuthenticationKeyScheme } from "../../types";
|
|
10
|
-
import {
|
|
11
|
-
isValidHardenedPath,
|
|
12
|
-
fromDerivationPath as fromDerivationPathInner,
|
|
13
|
-
mnemonicToSeed,
|
|
14
|
-
} from "./hdKey";
|
|
10
|
+
import { CKDPriv, deriveKey, HARDENED_OFFSET, isValidHardenedPath, mnemonicToSeed, splitPath } from "./hdKey";
|
|
15
11
|
import { PrivateKey } from "./privateKey";
|
|
16
12
|
import { AccountPublicKey, VerifySignatureArgs } from "./publicKey";
|
|
17
13
|
import { Signature } from "./signature";
|
|
@@ -189,7 +185,29 @@ export class Ed25519PrivateKey extends Serializable implements PrivateKey {
|
|
|
189
185
|
if (!isValidHardenedPath(path)) {
|
|
190
186
|
throw new Error(`Invalid derivation path ${path}`);
|
|
191
187
|
}
|
|
192
|
-
return
|
|
188
|
+
return Ed25519PrivateKey.fromDerivationPathInner(path, mnemonicToSeed(mnemonics));
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* A private inner function so we can separate from the main fromDerivationPath() method
|
|
193
|
+
* to add tests to verify we create the keys correctly.
|
|
194
|
+
*
|
|
195
|
+
* @param path the BIP44 path
|
|
196
|
+
* @param seed the seed phrase created by the mnemonics
|
|
197
|
+
* @param offset the offset used for key derivation, defaults to 0x80000000
|
|
198
|
+
* @returns
|
|
199
|
+
*/
|
|
200
|
+
private static fromDerivationPathInner(path: string, seed: Uint8Array, offset = HARDENED_OFFSET): Ed25519PrivateKey {
|
|
201
|
+
const { key, chainCode } = deriveKey(Ed25519PrivateKey.SLIP_0010_SEED, seed);
|
|
202
|
+
|
|
203
|
+
const segments = splitPath(path).map((el) => parseInt(el, 10));
|
|
204
|
+
|
|
205
|
+
// Derive the child key based on the path
|
|
206
|
+
const { key: privateKey } = segments.reduce((parentKeys, segment) => CKDPriv(parentKeys, segment + offset), {
|
|
207
|
+
key,
|
|
208
|
+
chainCode,
|
|
209
|
+
});
|
|
210
|
+
return new Ed25519PrivateKey(privateKey);
|
|
193
211
|
}
|
|
194
212
|
|
|
195
213
|
// endregion
|
package/src/core/crypto/hdKey.ts
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
import { hmac } from "@noble/hashes/hmac";
|
|
5
5
|
import { sha512 } from "@noble/hashes/sha512";
|
|
6
6
|
import * as bip39 from "@scure/bip39";
|
|
7
|
-
import { HexInput } from "../../types";
|
|
8
7
|
|
|
9
8
|
export type DerivedKeys = {
|
|
10
9
|
key: Uint8Array;
|
|
@@ -16,7 +15,6 @@ export type DerivedKeys = {
|
|
|
16
15
|
*/
|
|
17
16
|
export const APTOS_HARDENED_REGEX = /^m\/44'\/637'\/[0-9]+'\/[0-9]+'\/[0-9]+'?$/;
|
|
18
17
|
export const APTOS_BIP44_REGEX = /^m\/44'\/637'\/[0-9]+'\/[0-9]+\/[0-9]+$/;
|
|
19
|
-
export const APTOS_BIP44_DEFAULT_DERIVATION_PATH = "m/44'/637'/0'/0'/0'";
|
|
20
18
|
|
|
21
19
|
/**
|
|
22
20
|
* A list of supported key types and associated seeds
|
|
@@ -93,35 +91,6 @@ const removeApostrophes = (val: string): string => val.replace("'", "");
|
|
|
93
91
|
*/
|
|
94
92
|
export const splitPath = (path: string): Array<string> => path.split("/").slice(1).map(removeApostrophes);
|
|
95
93
|
|
|
96
|
-
/**
|
|
97
|
-
* @param path the BIP44 path
|
|
98
|
-
* @param seed the seed phrase created by the mnemonics
|
|
99
|
-
* @param offset the offset used for key derivation, defaults to 0x80000000
|
|
100
|
-
* @returns
|
|
101
|
-
*/
|
|
102
|
-
export function fromDerivationPath(
|
|
103
|
-
path: string,
|
|
104
|
-
hashSeed: HexInput,
|
|
105
|
-
seed: Uint8Array,
|
|
106
|
-
offset = HARDENED_OFFSET,
|
|
107
|
-
): Uint8Array {
|
|
108
|
-
if (offset === HARDENED_OFFSET && !isValidHardenedPath(path)) {
|
|
109
|
-
throw new Error(`Invalid hardened derivation path ${path}`);
|
|
110
|
-
} else if (offset !== HARDENED_OFFSET && !isValidBIP44Path(path)) {
|
|
111
|
-
throw new Error(`Invalid derivation path ${path}`);
|
|
112
|
-
}
|
|
113
|
-
const { key, chainCode } = deriveKey(hashSeed, seed);
|
|
114
|
-
|
|
115
|
-
const segments = splitPath(path).map((el) => parseInt(el, 10));
|
|
116
|
-
|
|
117
|
-
// Derive the child key based on the path
|
|
118
|
-
const { key: privateKey } = segments.reduce((parentKeys, segment) => CKDPriv(parentKeys, segment + offset), {
|
|
119
|
-
key,
|
|
120
|
-
chainCode,
|
|
121
|
-
});
|
|
122
|
-
return privateKey;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
94
|
/**
|
|
126
95
|
* Normalizes the mnemonic by removing extra whitespace and making it lowercase
|
|
127
96
|
* @param mnemonic the mnemonic seed phrase
|
package/src/core/crypto/index.ts
CHANGED
|
@@ -5,8 +5,6 @@ export * from "./ed25519";
|
|
|
5
5
|
export * from "./hdKey";
|
|
6
6
|
export * from "./multiEd25519";
|
|
7
7
|
export * from "./multiKey";
|
|
8
|
-
export * from "./ephemeral";
|
|
9
|
-
export * from "./keyless";
|
|
10
8
|
export * from "./privateKey";
|
|
11
9
|
export * from "./publicKey";
|
|
12
10
|
export * from "./secp256k1";
|
|
@@ -139,21 +139,9 @@ export class MultiKey extends AccountPublicKey {
|
|
|
139
139
|
|
|
140
140
|
return bitmap;
|
|
141
141
|
}
|
|
142
|
-
|
|
143
|
-
getIndex(publicKey: PublicKey): number {
|
|
144
|
-
|
|
145
|
-
const anyPublicKey = publicKey instanceof AnyPublicKey ? publicKey : new AnyPublicKey(publicKey)
|
|
146
|
-
const index = this.publicKeys.findIndex((pk) => pk.toString() === anyPublicKey.toString());
|
|
147
|
-
|
|
148
|
-
if (index !== -1) {
|
|
149
|
-
return index;
|
|
150
|
-
}
|
|
151
|
-
throw new Error("Public key not found in MultiKey");
|
|
152
|
-
|
|
153
|
-
}
|
|
154
142
|
}
|
|
155
143
|
|
|
156
|
-
export class
|
|
144
|
+
export class MultiKeySignature extends Signature {
|
|
157
145
|
/**
|
|
158
146
|
* Number of bytes in the bitmap representing who signed the transaction (32-bits)
|
|
159
147
|
*/
|
|
@@ -162,7 +150,7 @@ export class MultiSignature extends Signature {
|
|
|
162
150
|
/**
|
|
163
151
|
* Maximum number of Ed25519 signatures supported
|
|
164
152
|
*/
|
|
165
|
-
static MAX_SIGNATURES_SUPPORTED =
|
|
153
|
+
static MAX_SIGNATURES_SUPPORTED = MultiKeySignature.BITMAP_LEN * 8;
|
|
166
154
|
|
|
167
155
|
/**
|
|
168
156
|
* The list of underlying Ed25519 signatures
|
|
@@ -190,8 +178,8 @@ export class MultiSignature extends Signature {
|
|
|
190
178
|
super();
|
|
191
179
|
const { signatures, bitmap } = args;
|
|
192
180
|
|
|
193
|
-
if (signatures.length >
|
|
194
|
-
throw new Error(`The number of signatures cannot be greater than ${
|
|
181
|
+
if (signatures.length > MultiKeySignature.MAX_SIGNATURES_SUPPORTED) {
|
|
182
|
+
throw new Error(`The number of signatures cannot be greater than ${MultiKeySignature.MAX_SIGNATURES_SUPPORTED}`);
|
|
195
183
|
}
|
|
196
184
|
|
|
197
185
|
// Make sure that all signatures are normalized to the SingleKey authentication scheme
|
|
@@ -200,9 +188,9 @@ export class MultiSignature extends Signature {
|
|
|
200
188
|
);
|
|
201
189
|
|
|
202
190
|
if (!(bitmap instanceof Uint8Array)) {
|
|
203
|
-
this.bitmap =
|
|
204
|
-
} else if (bitmap.length !==
|
|
205
|
-
throw new Error(`"bitmap" length should be ${
|
|
191
|
+
this.bitmap = MultiKeySignature.createBitmap({ bits: bitmap });
|
|
192
|
+
} else if (bitmap.length !== MultiKeySignature.BITMAP_LEN) {
|
|
193
|
+
throw new Error(`"bitmap" length should be ${MultiKeySignature.BITMAP_LEN}`);
|
|
206
194
|
} else {
|
|
207
195
|
this.bitmap = bitmap;
|
|
208
196
|
}
|
|
@@ -238,8 +226,8 @@ export class MultiSignature extends Signature {
|
|
|
238
226
|
const dupCheckSet = new Set();
|
|
239
227
|
|
|
240
228
|
bits.forEach((bit: number) => {
|
|
241
|
-
if (bit >=
|
|
242
|
-
throw new Error(`Cannot have a signature larger than ${
|
|
229
|
+
if (bit >= MultiKeySignature.MAX_SIGNATURES_SUPPORTED) {
|
|
230
|
+
throw new Error(`Cannot have a signature larger than ${MultiKeySignature.MAX_SIGNATURES_SUPPORTED - 1}.`);
|
|
243
231
|
}
|
|
244
232
|
|
|
245
233
|
if (dupCheckSet.has(bit)) {
|
|
@@ -277,7 +265,7 @@ export class MultiSignature extends Signature {
|
|
|
277
265
|
serializer.serializeBytes(this.bitmap);
|
|
278
266
|
}
|
|
279
267
|
|
|
280
|
-
static deserialize(deserializer: Deserializer):
|
|
268
|
+
static deserialize(deserializer: Deserializer): MultiKeySignature {
|
|
281
269
|
const bitmap = deserializer.deserializeBytes();
|
|
282
270
|
const nSignatures = bitmap.reduce((acc, byte) => acc + bitCount(byte), 0);
|
|
283
271
|
const signatures: AnySignature[] = [];
|
|
@@ -285,7 +273,7 @@ export class MultiSignature extends Signature {
|
|
|
285
273
|
const signature = AnySignature.deserialize(deserializer);
|
|
286
274
|
signatures.push(signature);
|
|
287
275
|
}
|
|
288
|
-
return new
|
|
276
|
+
return new MultiKeySignature({ signatures, bitmap });
|
|
289
277
|
}
|
|
290
278
|
|
|
291
279
|
// endregion
|
|
@@ -4,7 +4,6 @@ import { AuthenticationKey } from "../authenticationKey";
|
|
|
4
4
|
import { Ed25519PublicKey, Ed25519Signature } from "./ed25519";
|
|
5
5
|
import { AccountPublicKey, PublicKey, VerifySignatureArgs } from "./publicKey";
|
|
6
6
|
import { Secp256k1PublicKey, Secp256k1Signature } from "./secp256k1";
|
|
7
|
-
import { KeylessPublicKey, KeylessSignature } from "./keyless";
|
|
8
7
|
import { Signature } from "./signature";
|
|
9
8
|
|
|
10
9
|
/**
|
|
@@ -35,8 +34,6 @@ export class AnyPublicKey extends AccountPublicKey {
|
|
|
35
34
|
this.variant = AnyPublicKeyVariant.Ed25519;
|
|
36
35
|
} else if (publicKey instanceof Secp256k1PublicKey) {
|
|
37
36
|
this.variant = AnyPublicKeyVariant.Secp256k1;
|
|
38
|
-
} else if (publicKey instanceof KeylessPublicKey) {
|
|
39
|
-
this.variant = AnyPublicKeyVariant.Keyless;
|
|
40
37
|
} else {
|
|
41
38
|
throw new Error("Unsupported public key type");
|
|
42
39
|
}
|
|
@@ -88,9 +85,6 @@ export class AnyPublicKey extends AccountPublicKey {
|
|
|
88
85
|
case AnyPublicKeyVariant.Secp256k1:
|
|
89
86
|
publicKey = Secp256k1PublicKey.deserialize(deserializer);
|
|
90
87
|
break;
|
|
91
|
-
case AnyPublicKeyVariant.Keyless:
|
|
92
|
-
publicKey = KeylessPublicKey.deserialize(deserializer);
|
|
93
|
-
break;
|
|
94
88
|
default:
|
|
95
89
|
throw new Error(`Unknown variant index for AnyPublicKey: ${variantIndex}`);
|
|
96
90
|
}
|
|
@@ -144,8 +138,6 @@ export class AnySignature extends Signature {
|
|
|
144
138
|
this.variant = AnySignatureVariant.Ed25519;
|
|
145
139
|
} else if (signature instanceof Secp256k1Signature) {
|
|
146
140
|
this.variant = AnySignatureVariant.Secp256k1;
|
|
147
|
-
} else if (signature instanceof KeylessSignature) {
|
|
148
|
-
this.variant = AnySignatureVariant.Keyless;
|
|
149
141
|
} else {
|
|
150
142
|
throw new Error("Unsupported signature type");
|
|
151
143
|
}
|
|
@@ -178,9 +170,6 @@ export class AnySignature extends Signature {
|
|
|
178
170
|
case AnySignatureVariant.Secp256k1:
|
|
179
171
|
signature = Secp256k1Signature.deserialize(deserializer);
|
|
180
172
|
break;
|
|
181
|
-
case AnySignatureVariant.Keyless:
|
|
182
|
-
signature = KeylessSignature.deserialize(deserializer);
|
|
183
|
-
break;
|
|
184
173
|
default:
|
|
185
174
|
throw new Error(`Unknown variant index for AnySignature: ${variantIndex}`);
|
|
186
175
|
}
|
package/src/core/index.ts
CHANGED
package/src/index.ts
CHANGED
package/src/internal/account.ts
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import { AptosConfig } from "../api/aptosConfig";
|
|
12
12
|
import { AptosApiError, getAptosFullNode, paginateWithCursor } from "../client";
|
|
13
13
|
import { AccountAddress, AccountAddressInput } from "../core/accountAddress";
|
|
14
|
-
import { Account } from "../account";
|
|
14
|
+
import { Account } from "../core/account";
|
|
15
15
|
import { AnyPublicKey, Ed25519PublicKey, PrivateKey } from "../core/crypto";
|
|
16
16
|
import { getTableItem, queryIndexer } from "./general";
|
|
17
17
|
import {
|
package/src/internal/ans.ts
CHANGED
|
@@ -8,9 +8,8 @@
|
|
|
8
8
|
* name namespace and without having a dependency cycle error.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import { Account } from "../account";
|
|
12
11
|
import { AptosConfig } from "../api/aptosConfig";
|
|
13
|
-
import { AccountAddress, AccountAddressInput } from "../core";
|
|
12
|
+
import { Account, AccountAddress, AccountAddressInput } from "../core";
|
|
14
13
|
import { InputGenerateTransactionOptions } from "../transactions/types";
|
|
15
14
|
import { GetANSNameResponse, MoveAddressType, OrderByArg, PaginationArgs, WhereArg } from "../types";
|
|
16
15
|
import { GetNamesQuery } from "../types/generated/operations";
|