@aptos-labs/ts-sdk 1.7.0 → 1.9.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/browser/index.d.ts +1226 -975
- package/dist/browser/index.global.js +32 -30
- package/dist/browser/index.global.js.map +1 -1
- package/dist/common/index.d.ts +1226 -975
- package/dist/common/index.js +27 -25
- package/dist/common/index.js.map +1 -1
- package/dist/esm/api/account.d.mts +12 -6
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.d.mts +11 -12
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +13 -14
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/aptosConfig.mjs +1 -1
- package/dist/esm/api/coin.d.mts +13 -13
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.d.mts +20 -10
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/event.d.mts +14 -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 -10
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +13 -14
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/transaction.d.mts +5 -6
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.d.mts +8 -8
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.d.mts +11 -12
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.d.mts +11 -12
- 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 +11 -11
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.d.mts +6 -6
- 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/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/chunk-2E2JOGE5.mjs +2 -0
- package/dist/esm/chunk-2E2JOGE5.mjs.map +1 -0
- package/dist/esm/chunk-3EUOBVCT.mjs +2 -0
- package/dist/esm/{chunk-A2QH4A6D.mjs.map → chunk-3EUOBVCT.mjs.map} +1 -1
- package/dist/esm/{chunk-RNO5ZG3C.mjs → chunk-52RTAMN7.mjs} +2 -2
- package/dist/esm/chunk-7BDYKJXX.mjs +2 -0
- package/dist/esm/chunk-7BDYKJXX.mjs.map +1 -0
- package/dist/esm/{chunk-WQI2RH2S.mjs → chunk-7U36LMP4.mjs} +2 -2
- package/dist/esm/{chunk-NWRKJFHV.mjs → chunk-ARIC32W7.mjs} +2 -2
- package/dist/esm/{chunk-RIL4SHXC.mjs → chunk-B7M3OWHV.mjs} +2 -2
- package/dist/esm/{chunk-C7ZX475J.mjs → chunk-BBUAAJRA.mjs} +2 -2
- package/dist/esm/chunk-C3HM7HQP.mjs +2 -0
- package/dist/esm/chunk-C3HM7HQP.mjs.map +1 -0
- package/dist/esm/{chunk-DRF6AMEZ.mjs → chunk-CHA5DSSD.mjs} +2 -2
- package/dist/esm/chunk-CVEJHRAU.mjs +2 -0
- package/dist/esm/chunk-CVEJHRAU.mjs.map +1 -0
- package/dist/esm/chunk-DE5OOOVY.mjs +2 -0
- package/dist/esm/{chunk-3UYBNX3P.mjs.map → chunk-DE5OOOVY.mjs.map} +1 -1
- package/dist/esm/{chunk-IKCBGNRD.mjs → chunk-DGOT2VR5.mjs} +2 -2
- package/dist/esm/{chunk-GVHOHNHT.mjs → chunk-EF2F7NWO.mjs} +2 -2
- package/dist/esm/{chunk-J6RCCKOA.mjs → chunk-EQZ757ES.mjs} +2 -2
- package/dist/esm/{chunk-CX5ULWJQ.mjs → chunk-F67Y7YH6.mjs} +2 -2
- package/dist/esm/{chunk-JLL7BCD4.mjs → chunk-FVMVV4V3.mjs} +2 -2
- package/dist/esm/chunk-FWDKABRW.mjs +2 -0
- package/dist/esm/chunk-FWDKABRW.mjs.map +1 -0
- package/dist/esm/chunk-G62HQC77.mjs +2 -0
- package/dist/esm/chunk-G62HQC77.mjs.map +1 -0
- package/dist/esm/{chunk-ESX5X52V.mjs → chunk-GQOOXOTN.mjs} +2 -2
- package/dist/esm/chunk-GRJJBGHT.mjs +2 -0
- package/dist/esm/chunk-GRJJBGHT.mjs.map +1 -0
- package/dist/esm/chunk-HEPV52CH.mjs +2 -0
- package/dist/esm/chunk-HEPV52CH.mjs.map +1 -0
- package/dist/esm/{chunk-XQIWF5HY.mjs → chunk-I3TCHVQQ.mjs} +2 -2
- package/dist/esm/{chunk-3NOQE6U3.mjs → chunk-ILJWEPDW.mjs} +2 -2
- package/dist/esm/chunk-INORE66K.mjs +2 -0
- package/dist/esm/chunk-INORE66K.mjs.map +1 -0
- package/dist/esm/{chunk-5L6SRCJP.mjs → chunk-J6MWD4XN.mjs} +2 -2
- package/dist/esm/{chunk-YGMT4GQ5.mjs → chunk-JEHR6GKW.mjs} +2 -2
- package/dist/esm/chunk-JEHR6GKW.mjs.map +1 -0
- package/dist/esm/chunk-KUX6GQ2E.mjs +1 -0
- package/dist/esm/{chunk-6UNBJAV6.mjs → chunk-KWJTVJ7C.mjs} +2 -2
- package/dist/esm/chunk-KWJTVJ7C.mjs.map +1 -0
- package/dist/esm/{chunk-WK36MJRI.mjs → chunk-LLL2LFYH.mjs} +2 -2
- package/dist/esm/chunk-LMXP3JUU.mjs +2 -0
- package/dist/esm/chunk-LMXP3JUU.mjs.map +1 -0
- package/dist/esm/{chunk-5WXR2O3T.mjs → chunk-N65SOKJQ.mjs} +2 -2
- package/dist/esm/{chunk-XOBXX273.mjs → chunk-NL3XVNS5.mjs} +2 -2
- package/dist/esm/{chunk-Q7JKS6WV.mjs → chunk-NURFZOR4.mjs} +2 -2
- package/dist/esm/{chunk-MKERJNYN.mjs → chunk-OG56TYZE.mjs} +2 -2
- package/dist/esm/chunk-Q6WOHF4A.mjs +2 -0
- package/dist/esm/chunk-Q6WOHF4A.mjs.map +1 -0
- package/dist/esm/chunk-QA4XWNIH.mjs +2 -0
- package/dist/esm/chunk-QA4XWNIH.mjs.map +1 -0
- package/dist/esm/chunk-QE4ASJ5K.mjs +1 -0
- package/dist/esm/chunk-QR72RXBS.mjs +2 -0
- package/dist/esm/chunk-QR72RXBS.mjs.map +1 -0
- package/dist/esm/{chunk-TVURQPLA.mjs → chunk-R4VJDSIP.mjs} +2 -2
- package/dist/esm/{chunk-O57QZZF2.mjs → chunk-S2F6CSH4.mjs} +2 -2
- package/dist/esm/chunk-S2F6CSH4.mjs.map +1 -0
- package/dist/esm/{chunk-BQSE5HHW.mjs → chunk-S4SEFF4K.mjs} +3 -1
- package/dist/esm/chunk-S4SEFF4K.mjs.map +1 -0
- package/dist/esm/{chunk-OVSV4Y32.mjs → chunk-SXIFL5DQ.mjs} +2 -2
- package/dist/esm/{chunk-OVSV4Y32.mjs.map → chunk-SXIFL5DQ.mjs.map} +1 -1
- package/dist/esm/{chunk-Z6XNTGNK.mjs → chunk-TN5BUH4F.mjs} +2 -2
- package/dist/esm/chunk-TNVR7SNR.mjs +2 -0
- package/dist/esm/chunk-TNVR7SNR.mjs.map +1 -0
- package/dist/esm/chunk-TX7UK75Q.mjs +2 -0
- package/dist/esm/chunk-TX7UK75Q.mjs.map +1 -0
- package/dist/esm/{chunk-YE3DZD6T.mjs → chunk-UIUSDBCL.mjs} +2 -2
- package/dist/esm/{chunk-7JTOGYO7.mjs → chunk-UMLDKLDL.mjs} +2 -2
- package/dist/esm/chunk-UVSRX4SV.mjs +1 -0
- package/dist/esm/{chunk-6Y3VBRMN.mjs → chunk-VEVBHH3M.mjs} +2 -2
- package/dist/esm/{chunk-T5IFXLOP.mjs → chunk-VMXBMAYK.mjs} +2 -2
- package/dist/esm/chunk-WKUXBIYB.mjs +2 -0
- package/dist/esm/chunk-WKUXBIYB.mjs.map +1 -0
- package/dist/esm/chunk-WME5D6YR.mjs +2 -0
- package/dist/esm/chunk-WME5D6YR.mjs.map +1 -0
- package/dist/esm/chunk-WTHNSNAX.mjs +2 -0
- package/dist/esm/chunk-WTHNSNAX.mjs.map +1 -0
- package/dist/esm/{chunk-WC2WSKYZ.mjs → chunk-X5C3LYI7.mjs} +2 -2
- package/dist/esm/chunk-XKD7W5NO.mjs +2 -0
- package/dist/esm/{chunk-UJAX75ON.mjs.map → chunk-XKD7W5NO.mjs.map} +1 -1
- package/dist/esm/{chunk-OWZLBIDD.mjs → chunk-XTPFQ4MH.mjs} +2 -2
- package/dist/esm/{chunk-D2GNCG27.mjs → chunk-Y5AJLNUD.mjs} +2 -2
- package/dist/esm/chunk-YDAA4RG4.mjs +2 -0
- package/dist/esm/chunk-YDAA4RG4.mjs.map +1 -0
- package/dist/esm/{chunk-ZFPA45OK.mjs → chunk-YR2R3LW4.mjs} +2 -2
- package/dist/esm/chunk-YZZO6VDC.mjs +2 -0
- package/dist/esm/chunk-YZZO6VDC.mjs.map +1 -0
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/core/account/Account.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/SingleKeyAccount.mjs.map +1 -0
- package/dist/esm/core/account/index.d.mts +305 -0
- package/dist/esm/core/account/index.mjs +2 -0
- package/dist/esm/core/account/index.mjs.map +1 -0
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.d.mts +7 -68
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.d.mts +49 -61
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/index.d.mts +9 -6
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/multiEd25519.d.mts +17 -14
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.d.mts +70 -17
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/privateKey.d.mts +35 -0
- package/dist/esm/core/crypto/privateKey.mjs +2 -0
- package/dist/esm/core/crypto/privateKey.mjs.map +1 -0
- package/dist/esm/core/crypto/publicKey.d.mts +13 -0
- package/dist/esm/core/crypto/publicKey.mjs +2 -0
- package/dist/esm/core/crypto/publicKey.mjs.map +1 -0
- package/dist/esm/core/crypto/secp256k1.d.mts +43 -67
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/signature.d.mts +28 -0
- package/dist/esm/core/crypto/signature.mjs +2 -0
- package/dist/esm/core/crypto/signature.mjs.map +1 -0
- package/dist/esm/core/crypto/singleKey.d.mts +68 -0
- package/dist/esm/core/crypto/singleKey.mjs +2 -0
- package/dist/esm/core/crypto/singleKey.mjs.map +1 -0
- package/dist/esm/core/index.d.mts +9 -8
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/index.d.mts +9 -9
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/account.d.mts +9 -3
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.d.mts +10 -11
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.d.mts +9 -9
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.d.mts +15 -12
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/event.d.mts +7 -2
- 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 -10
- 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 +10 -11
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/publicKey-lq5djCIY.d.mts +113 -0
- package/dist/esm/transactions/authenticator/account.d.mts +6 -4
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.d.mts +6 -6
- package/dist/esm/transactions/authenticator/index.mjs +1 -1
- package/dist/esm/transactions/authenticator/transaction.d.mts +5 -5
- package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
- package/dist/esm/transactions/index.d.mts +6 -7
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/instances/index.d.mts +4 -4
- 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/rawTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +2 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.d.mts +8 -8
- package/dist/esm/transactions/instances/signedTransaction.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 +11 -5
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/index.d.mts +11 -12
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.d.mts +11 -12
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.d.mts +10 -10
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.d.mts +9 -10
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +8 -8
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +9 -10
- 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 +9 -9
- package/dist/esm/types/generated/operations.d.mts +6 -0
- package/dist/esm/types/generated/queries.d.mts +6 -6
- package/dist/esm/types/generated/queries.mjs +1 -1
- package/dist/esm/types/generated/types.d.mts +594 -56
- 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 +35 -6
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/utils/const.d.mts +1 -2
- 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 +16 -16
- package/src/api/aptosConfig.ts +2 -2
- package/src/api/digitalAsset.ts +20 -0
- package/src/api/event.ts +27 -1
- package/src/core/account/Account.ts +245 -0
- package/src/core/account/Ed25519Account.ts +88 -0
- package/src/core/account/SingleKeyAccount.ts +120 -0
- package/src/core/account/index.ts +3 -0
- package/src/core/authenticationKey.ts +18 -52
- package/src/core/crypto/ed25519.ts +118 -104
- package/src/core/crypto/index.ts +6 -5
- package/src/core/crypto/multiEd25519.ts +98 -44
- package/src/core/crypto/multiKey.ts +192 -34
- package/src/core/crypto/privateKey.ts +25 -0
- package/src/core/crypto/publicKey.ts +52 -0
- package/src/core/crypto/secp256k1.ts +108 -111
- package/src/core/crypto/signature.ts +46 -0
- package/src/core/crypto/singleKey.ts +180 -0
- package/src/internal/account.ts +5 -3
- package/src/internal/digitalAsset.ts +26 -0
- package/src/internal/event.ts +33 -1
- package/src/internal/queries/currentTokenOwnershipFieldsFragment.graphql +1 -0
- package/src/internal/queries/getTokenData.graphql +1 -0
- package/src/transactions/authenticator/account.ts +1 -2
- package/src/transactions/instances/rotationProofChallenge.ts +1 -1
- package/src/transactions/transactionBuilder/transactionBuilder.ts +3 -21
- package/src/transactions/types.ts +1 -1
- package/src/types/generated/operations.ts +6 -0
- package/src/types/generated/queries.ts +2 -0
- package/src/types/generated/types.ts +662 -55
- package/src/types/index.ts +40 -4
- package/src/utils/const.ts +0 -4
- package/src/version.ts +1 -1
- package/dist/esm/chunk-2QV6HI3M.mjs +0 -2
- package/dist/esm/chunk-2QV6HI3M.mjs.map +0 -1
- package/dist/esm/chunk-3UYBNX3P.mjs +0 -2
- package/dist/esm/chunk-4SAUEZTN.mjs +0 -2
- package/dist/esm/chunk-4SAUEZTN.mjs.map +0 -1
- package/dist/esm/chunk-6UNBJAV6.mjs.map +0 -1
- package/dist/esm/chunk-7IGH7N52.mjs +0 -2
- package/dist/esm/chunk-7IGH7N52.mjs.map +0 -1
- package/dist/esm/chunk-A2QH4A6D.mjs +0 -2
- package/dist/esm/chunk-AA3GRJNL.mjs +0 -2
- package/dist/esm/chunk-AA3GRJNL.mjs.map +0 -1
- package/dist/esm/chunk-ALFESCPU.mjs +0 -2
- package/dist/esm/chunk-ALFESCPU.mjs.map +0 -1
- package/dist/esm/chunk-BQSE5HHW.mjs.map +0 -1
- package/dist/esm/chunk-CCUD52OF.mjs +0 -2
- package/dist/esm/chunk-CCUD52OF.mjs.map +0 -1
- package/dist/esm/chunk-ERWQOVBF.mjs +0 -2
- package/dist/esm/chunk-ERWQOVBF.mjs.map +0 -1
- package/dist/esm/chunk-FBFMQZTM.mjs +0 -2
- package/dist/esm/chunk-FBFMQZTM.mjs.map +0 -1
- package/dist/esm/chunk-FP5DPRYL.mjs +0 -2
- package/dist/esm/chunk-FP5DPRYL.mjs.map +0 -1
- package/dist/esm/chunk-HHJBCGAQ.mjs +0 -2
- package/dist/esm/chunk-HHJBCGAQ.mjs.map +0 -1
- package/dist/esm/chunk-I7WRJY7K.mjs +0 -2
- package/dist/esm/chunk-I7WRJY7K.mjs.map +0 -1
- package/dist/esm/chunk-INV6U3KS.mjs +0 -2
- package/dist/esm/chunk-INV6U3KS.mjs.map +0 -1
- package/dist/esm/chunk-O57QZZF2.mjs.map +0 -1
- package/dist/esm/chunk-SBMJNU2O.mjs +0 -2
- package/dist/esm/chunk-SBMJNU2O.mjs.map +0 -1
- package/dist/esm/chunk-SZYATFM7.mjs +0 -2
- package/dist/esm/chunk-SZYATFM7.mjs.map +0 -1
- package/dist/esm/chunk-UCHGKGCF.mjs +0 -2
- package/dist/esm/chunk-UCHGKGCF.mjs.map +0 -1
- package/dist/esm/chunk-UIVJXLRM.mjs +0 -1
- package/dist/esm/chunk-UJAX75ON.mjs +0 -2
- package/dist/esm/chunk-V6JFR2CB.mjs +0 -2
- package/dist/esm/chunk-V6JFR2CB.mjs.map +0 -1
- package/dist/esm/chunk-YGMT4GQ5.mjs.map +0 -1
- package/dist/esm/chunk-ZFIMVSCR.mjs +0 -2
- package/dist/esm/chunk-ZFIMVSCR.mjs.map +0 -1
- package/dist/esm/chunk-ZIZ7PVK2.mjs +0 -2
- package/dist/esm/chunk-ZIZ7PVK2.mjs.map +0 -1
- package/dist/esm/core/account.d.mts +0 -184
- package/dist/esm/core/account.mjs +0 -2
- package/dist/esm/core/crypto/anyPublicKey.d.mts +0 -59
- package/dist/esm/core/crypto/anyPublicKey.mjs +0 -2
- package/dist/esm/core/crypto/anySignature.d.mts +0 -31
- package/dist/esm/core/crypto/anySignature.mjs +0 -2
- package/dist/esm/core/crypto/asymmetricCrypto.d.mts +0 -74
- package/dist/esm/core/crypto/asymmetricCrypto.mjs +0 -2
- package/src/core/account.ts +0 -282
- package/src/core/crypto/anyPublicKey.ts +0 -92
- package/src/core/crypto/anySignature.ts +0 -56
- package/src/core/crypto/asymmetricCrypto.ts +0 -77
- /package/dist/esm/{chunk-RNO5ZG3C.mjs.map → chunk-52RTAMN7.mjs.map} +0 -0
- /package/dist/esm/{chunk-WQI2RH2S.mjs.map → chunk-7U36LMP4.mjs.map} +0 -0
- /package/dist/esm/{chunk-NWRKJFHV.mjs.map → chunk-ARIC32W7.mjs.map} +0 -0
- /package/dist/esm/{chunk-RIL4SHXC.mjs.map → chunk-B7M3OWHV.mjs.map} +0 -0
- /package/dist/esm/{chunk-C7ZX475J.mjs.map → chunk-BBUAAJRA.mjs.map} +0 -0
- /package/dist/esm/{chunk-DRF6AMEZ.mjs.map → chunk-CHA5DSSD.mjs.map} +0 -0
- /package/dist/esm/{chunk-IKCBGNRD.mjs.map → chunk-DGOT2VR5.mjs.map} +0 -0
- /package/dist/esm/{chunk-GVHOHNHT.mjs.map → chunk-EF2F7NWO.mjs.map} +0 -0
- /package/dist/esm/{chunk-J6RCCKOA.mjs.map → chunk-EQZ757ES.mjs.map} +0 -0
- /package/dist/esm/{chunk-CX5ULWJQ.mjs.map → chunk-F67Y7YH6.mjs.map} +0 -0
- /package/dist/esm/{chunk-JLL7BCD4.mjs.map → chunk-FVMVV4V3.mjs.map} +0 -0
- /package/dist/esm/{chunk-ESX5X52V.mjs.map → chunk-GQOOXOTN.mjs.map} +0 -0
- /package/dist/esm/{chunk-XQIWF5HY.mjs.map → chunk-I3TCHVQQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-3NOQE6U3.mjs.map → chunk-ILJWEPDW.mjs.map} +0 -0
- /package/dist/esm/{chunk-5L6SRCJP.mjs.map → chunk-J6MWD4XN.mjs.map} +0 -0
- /package/dist/esm/{chunk-UIVJXLRM.mjs.map → chunk-KUX6GQ2E.mjs.map} +0 -0
- /package/dist/esm/{chunk-WK36MJRI.mjs.map → chunk-LLL2LFYH.mjs.map} +0 -0
- /package/dist/esm/{chunk-5WXR2O3T.mjs.map → chunk-N65SOKJQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-XOBXX273.mjs.map → chunk-NL3XVNS5.mjs.map} +0 -0
- /package/dist/esm/{chunk-Q7JKS6WV.mjs.map → chunk-NURFZOR4.mjs.map} +0 -0
- /package/dist/esm/{chunk-MKERJNYN.mjs.map → chunk-OG56TYZE.mjs.map} +0 -0
- /package/dist/esm/{core/account.mjs.map → chunk-QE4ASJ5K.mjs.map} +0 -0
- /package/dist/esm/{chunk-TVURQPLA.mjs.map → chunk-R4VJDSIP.mjs.map} +0 -0
- /package/dist/esm/{chunk-Z6XNTGNK.mjs.map → chunk-TN5BUH4F.mjs.map} +0 -0
- /package/dist/esm/{chunk-YE3DZD6T.mjs.map → chunk-UIUSDBCL.mjs.map} +0 -0
- /package/dist/esm/{chunk-7JTOGYO7.mjs.map → chunk-UMLDKLDL.mjs.map} +0 -0
- /package/dist/esm/{core/crypto/anyPublicKey.mjs.map → chunk-UVSRX4SV.mjs.map} +0 -0
- /package/dist/esm/{chunk-6Y3VBRMN.mjs.map → chunk-VEVBHH3M.mjs.map} +0 -0
- /package/dist/esm/{chunk-T5IFXLOP.mjs.map → chunk-VMXBMAYK.mjs.map} +0 -0
- /package/dist/esm/{chunk-WC2WSKYZ.mjs.map → chunk-X5C3LYI7.mjs.map} +0 -0
- /package/dist/esm/{chunk-OWZLBIDD.mjs.map → chunk-XTPFQ4MH.mjs.map} +0 -0
- /package/dist/esm/{chunk-D2GNCG27.mjs.map → chunk-Y5AJLNUD.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZFPA45OK.mjs.map → chunk-YR2R3LW4.mjs.map} +0 -0
- /package/dist/esm/core/{crypto/anySignature.mjs.map → account/Account.mjs.map} +0 -0
- /package/dist/esm/core/{crypto/asymmetricCrypto.mjs.map → account/Ed25519Account.mjs.map} +0 -0
|
@@ -252,15 +252,17 @@ declare enum TransactionResponseType {
|
|
|
252
252
|
User = "user_transaction",
|
|
253
253
|
Genesis = "genesis_transaction",
|
|
254
254
|
BlockMetadata = "block_metadata_transaction",
|
|
255
|
-
StateCheckpoint = "state_checkpoint_transaction"
|
|
255
|
+
StateCheckpoint = "state_checkpoint_transaction",
|
|
256
|
+
Validator = "validator_transaction"
|
|
256
257
|
}
|
|
257
258
|
type TransactionResponse = PendingTransactionResponse | CommittedTransactionResponse;
|
|
258
|
-
type CommittedTransactionResponse = UserTransactionResponse | GenesisTransactionResponse | BlockMetadataTransactionResponse | StateCheckpointTransactionResponse;
|
|
259
|
+
type CommittedTransactionResponse = UserTransactionResponse | GenesisTransactionResponse | BlockMetadataTransactionResponse | StateCheckpointTransactionResponse | ValidatorTransactionResponse;
|
|
259
260
|
declare function isPendingTransactionResponse(response: TransactionResponse): response is PendingTransactionResponse;
|
|
260
261
|
declare function isUserTransactionResponse(response: TransactionResponse): response is UserTransactionResponse;
|
|
261
262
|
declare function isGenesisTransactionResponse(response: TransactionResponse): response is GenesisTransactionResponse;
|
|
262
263
|
declare function isBlockMetadataTransactionResponse(response: TransactionResponse): response is BlockMetadataTransactionResponse;
|
|
263
264
|
declare function isStateCheckpointTransactionResponse(response: TransactionResponse): response is StateCheckpointTransactionResponse;
|
|
265
|
+
declare function isValidatorTransactionResponse(response: TransactionResponse): response is ValidatorTransactionResponse;
|
|
264
266
|
type PendingTransactionResponse = {
|
|
265
267
|
type: TransactionResponseType.Pending;
|
|
266
268
|
hash: string;
|
|
@@ -278,7 +280,7 @@ type UserTransactionResponse = {
|
|
|
278
280
|
hash: string;
|
|
279
281
|
state_change_hash: string;
|
|
280
282
|
event_root_hash: string;
|
|
281
|
-
state_checkpoint_hash
|
|
283
|
+
state_checkpoint_hash: string | null;
|
|
282
284
|
gas_used: string;
|
|
283
285
|
/**
|
|
284
286
|
* Whether the transaction was successful
|
|
@@ -339,7 +341,7 @@ type BlockMetadataTransactionResponse = {
|
|
|
339
341
|
hash: string;
|
|
340
342
|
state_change_hash: string;
|
|
341
343
|
event_root_hash: string;
|
|
342
|
-
state_checkpoint_hash
|
|
344
|
+
state_checkpoint_hash: string | null;
|
|
343
345
|
gas_used: string;
|
|
344
346
|
/**
|
|
345
347
|
* Whether the transaction was successful
|
|
@@ -378,7 +380,30 @@ type StateCheckpointTransactionResponse = {
|
|
|
378
380
|
hash: string;
|
|
379
381
|
state_change_hash: string;
|
|
380
382
|
event_root_hash: string;
|
|
381
|
-
state_checkpoint_hash
|
|
383
|
+
state_checkpoint_hash: string | null;
|
|
384
|
+
gas_used: string;
|
|
385
|
+
/**
|
|
386
|
+
* Whether the transaction was successful
|
|
387
|
+
*/
|
|
388
|
+
success: boolean;
|
|
389
|
+
/**
|
|
390
|
+
* The VM status of the transaction, can tell useful information in a failure
|
|
391
|
+
*/
|
|
392
|
+
vm_status: string;
|
|
393
|
+
accumulator_root_hash: string;
|
|
394
|
+
/**
|
|
395
|
+
* Final state of resources changed by the transaction
|
|
396
|
+
*/
|
|
397
|
+
changes: Array<WriteSetChange>;
|
|
398
|
+
timestamp: string;
|
|
399
|
+
};
|
|
400
|
+
type ValidatorTransactionResponse = {
|
|
401
|
+
type: TransactionResponseType.Validator;
|
|
402
|
+
version: string;
|
|
403
|
+
hash: string;
|
|
404
|
+
state_change_hash: string;
|
|
405
|
+
event_root_hash: string;
|
|
406
|
+
state_checkpoint_hash: string | null;
|
|
382
407
|
gas_used: string;
|
|
383
408
|
/**
|
|
384
409
|
* Whether the transaction was successful
|
|
@@ -393,6 +418,10 @@ type StateCheckpointTransactionResponse = {
|
|
|
393
418
|
* Final state of resources changed by the transaction
|
|
394
419
|
*/
|
|
395
420
|
changes: Array<WriteSetChange>;
|
|
421
|
+
/**
|
|
422
|
+
* The events emitted by the validator transaction
|
|
423
|
+
*/
|
|
424
|
+
events: Array<Event>;
|
|
396
425
|
timestamp: string;
|
|
397
426
|
};
|
|
398
427
|
/**
|
|
@@ -901,4 +930,4 @@ type GenerateAccountWithSingleSignerSecp256k1Key = {
|
|
|
901
930
|
};
|
|
902
931
|
type GenerateAccount = GenerateAccountWithEd25519 | GenerateAccountWithSingleSignerSecp256k1Key;
|
|
903
932
|
|
|
904
|
-
export { AccountAuthenticatorVariant, type AccountData, type AccountSignature, type AnyNumber, AnyPublicKeyVariant, AnySignatureVariant, type AptosRequest, type AptosSettings, type AuthenticationKeyScheme, type Block, type BlockMetadataTransactionResponse, type Client, type ClientConfig, type ClientRequest, type ClientResponse, type CommittedTransactionResponse, type DecodedTableData, type DeletedTableData, DeriveScheme, type DirectWriteSet, type EntryFunctionPayloadResponse, type Event, type EventGuid, type GasEstimation, type GenerateAccount, type GenerateAccountWithEd25519, type GenerateAccountWithSingleSignerSecp256k1Key, type GenesisPayload, type GenesisTransactionResponse, type HexInput, type InputViewRequestData, type LedgerInfo, type LedgerVersionArg, MimeType, MoveAbility, type MoveAddressType, type MoveFunction, type MoveFunctionGenericTypeParam, type MoveFunctionId, MoveFunctionVisibility, type MoveModule, type MoveModuleBytecode, type MoveModuleId, type MoveObjectType, type MoveOptionType, type MoveResource, type MoveScriptBytecode, type MoveStruct, type MoveStructField, type MoveStructId, type MoveStructType, type MoveType, type MoveUint128Type, type MoveUint16Type, type MoveUint256Type, type MoveUint32Type, type MoveUint64Type, type MoveUint8Type, type MoveValue, type MultisigPayloadResponse, OrderBy, type OrderByArg, type PaginationArgs, type PendingTransactionResponse, RoleType, type ScriptPayloadResponse, ScriptTransactionArgumentVariants, type ScriptWriteSet, SigningScheme, SigningSchemeInput, type StateCheckpointTransactionResponse, type TableItemRequest, TokenStandard, type TokenStandardArg, TransactionAuthenticatorVariant, type TransactionEd25519Signature, type TransactionFeePayerSignature, type TransactionMultiAgentSignature, type TransactionMultiEd25519Signature, type TransactionPayloadResponse, TransactionPayloadVariants, type TransactionResponse, TransactionResponseType, type TransactionSecp256k1Signature, type TransactionSignature, TransactionVariants, TypeTagVariants, type Uint128, type Uint16, type Uint256, type Uint32, type Uint64, type Uint8, type UserTransactionResponse, type ViewRequest, type WaitForTransactionOptions, type WhereArg, type WriteSet, type WriteSetChange, type WriteSetChangeDeleteModule, type WriteSetChangeDeleteResource, type WriteSetChangeDeleteTableItem, type WriteSetChangeWriteModule, type WriteSetChangeWriteResource, type WriteSetChangeWriteTableItem, isBlockMetadataTransactionResponse, isEd25519Signature, isFeePayerSignature, isGenesisTransactionResponse, isMultiAgentSignature, isMultiEd25519Signature, isPendingTransactionResponse, isSecp256k1Signature, isStateCheckpointTransactionResponse, isUserTransactionResponse };
|
|
933
|
+
export { AccountAuthenticatorVariant, type AccountData, type AccountSignature, type AnyNumber, AnyPublicKeyVariant, AnySignatureVariant, type AptosRequest, type AptosSettings, type AuthenticationKeyScheme, type Block, type BlockMetadataTransactionResponse, type Client, type ClientConfig, type ClientRequest, type ClientResponse, type CommittedTransactionResponse, type DecodedTableData, type DeletedTableData, DeriveScheme, type DirectWriteSet, type EntryFunctionPayloadResponse, type Event, type EventGuid, type GasEstimation, type GenerateAccount, type GenerateAccountWithEd25519, type GenerateAccountWithSingleSignerSecp256k1Key, type GenesisPayload, type GenesisTransactionResponse, type HexInput, type InputViewRequestData, type LedgerInfo, type LedgerVersionArg, MimeType, MoveAbility, type MoveAddressType, type MoveFunction, type MoveFunctionGenericTypeParam, type MoveFunctionId, MoveFunctionVisibility, type MoveModule, type MoveModuleBytecode, type MoveModuleId, type MoveObjectType, type MoveOptionType, type MoveResource, type MoveScriptBytecode, type MoveStruct, type MoveStructField, type MoveStructId, type MoveStructType, type MoveType, type MoveUint128Type, type MoveUint16Type, type MoveUint256Type, type MoveUint32Type, type MoveUint64Type, type MoveUint8Type, type MoveValue, type MultisigPayloadResponse, OrderBy, type OrderByArg, type PaginationArgs, type PendingTransactionResponse, RoleType, type ScriptPayloadResponse, ScriptTransactionArgumentVariants, type ScriptWriteSet, SigningScheme, SigningSchemeInput, type StateCheckpointTransactionResponse, type TableItemRequest, TokenStandard, type TokenStandardArg, TransactionAuthenticatorVariant, type TransactionEd25519Signature, type TransactionFeePayerSignature, type TransactionMultiAgentSignature, type TransactionMultiEd25519Signature, type TransactionPayloadResponse, TransactionPayloadVariants, type TransactionResponse, TransactionResponseType, type TransactionSecp256k1Signature, type TransactionSignature, TransactionVariants, TypeTagVariants, type Uint128, type Uint16, type Uint256, type Uint32, type Uint64, type Uint8, type UserTransactionResponse, type ValidatorTransactionResponse, type ViewRequest, type WaitForTransactionOptions, type WhereArg, type WriteSet, type WriteSetChange, type WriteSetChangeDeleteModule, type WriteSetChangeDeleteResource, type WriteSetChangeDeleteTableItem, type WriteSetChangeWriteModule, type WriteSetChangeWriteResource, type WriteSetChangeWriteTableItem, isBlockMetadataTransactionResponse, isEd25519Signature, isFeePayerSignature, isGenesisTransactionResponse, isMultiAgentSignature, isMultiEd25519Signature, isPendingTransactionResponse, isSecp256k1Signature, isStateCheckpointTransactionResponse, isUserTransactionResponse, isValidatorTransactionResponse };
|
package/dist/esm/types/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-
|
|
1
|
+
import{A,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-CVEJHRAU.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-FVA2OPG4.mjs";export{g as AccountAuthenticatorVariant,h as AnyPublicKeyVariant,i as AnySignatureVariant,A as DeriveScheme,a as MimeType,w as MoveAbility,v as MoveFunctionVisibility,x as RoleType,c as ScriptTransactionArgumentVariants,y as SigningScheme,z as SigningSchemeInput,f as TransactionAuthenticatorVariant,d as TransactionPayloadVariants,j as TransactionResponseType,e as TransactionVariants,b as TypeTagVariants,n as isBlockMetadataTransactionResponse,q as isEd25519Signature,t as isFeePayerSignature,m as isGenesisTransactionResponse,s as isMultiAgentSignature,u as isMultiEd25519Signature,k as isPendingTransactionResponse,r as isSecp256k1Signature,o as isStateCheckpointTransactionResponse,l as isUserTransactionResponse,p as isValidatorTransactionResponse};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -6,7 +6,6 @@ declare enum AptosApiType {
|
|
|
6
6
|
INDEXER = 1,
|
|
7
7
|
FAUCET = 2
|
|
8
8
|
}
|
|
9
|
-
declare const DEFAULT_NETWORK = Network.DEVNET;
|
|
10
9
|
/**
|
|
11
10
|
* The default max gas amount when none is given.
|
|
12
11
|
*
|
|
@@ -54,4 +53,4 @@ declare enum ProcessorType {
|
|
|
54
53
|
USER_TRANSACTION_PROCESSOR = "user_transaction_processor"
|
|
55
54
|
}
|
|
56
55
|
|
|
57
|
-
export { APTOS_COIN, AptosApiType, DEFAULT_MAX_GAS_AMOUNT,
|
|
56
|
+
export { APTOS_COIN, AptosApiType, DEFAULT_MAX_GAS_AMOUNT, DEFAULT_TXN_EXP_SEC_FROM_NOW, DEFAULT_TXN_TIMEOUT_SEC, ProcessorType, RAW_TRANSACTION_SALT, RAW_TRANSACTION_WITH_DATA_SALT };
|
package/dist/esm/utils/const.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h
|
|
1
|
+
import{a,b,c,d,e,f,g,h}from"../chunk-HEPV52CH.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,h as ProcessorType,f as RAW_TRANSACTION_SALT,g as RAW_TRANSACTION_WITH_DATA_SALT};
|
|
2
2
|
//# sourceMappingURL=const.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Network, NetworkToChainId, NetworkToFaucetAPI, NetworkToIndexerAPI, NetworkToNetworkName, NetworkToNodeAPI } from './apiEndpoints.mjs';
|
|
2
|
-
export { APTOS_COIN, AptosApiType, DEFAULT_MAX_GAS_AMOUNT,
|
|
2
|
+
export { APTOS_COIN, AptosApiType, DEFAULT_MAX_GAS_AMOUNT, DEFAULT_TXN_EXP_SEC_FROM_NOW, DEFAULT_TXN_TIMEOUT_SEC, ProcessorType, RAW_TRANSACTION_SALT, RAW_TRANSACTION_WITH_DATA_SALT } from './const.mjs';
|
package/dist/esm/utils/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunk-CYDWEPFL.mjs";import{a as
|
|
1
|
+
import"../chunk-CYDWEPFL.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n}from"../chunk-77SKA4HT.mjs";import{a,b,c,d,e,f,g,h}from"../chunk-HEPV52CH.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};
|
|
2
2
|
//# sourceMappingURL=index.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-DE5OOOVY.mjs";import"./chunk-FVA2OPG4.mjs";export{a as VERSION};
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/package.json
CHANGED
|
@@ -30,6 +30,20 @@
|
|
|
30
30
|
"dist",
|
|
31
31
|
"src"
|
|
32
32
|
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build:clean": "rm -rf dist",
|
|
35
|
+
"build": "pnpm build:clean && tsup",
|
|
36
|
+
"_fmt": "prettier 'src/**/*.ts' 'tests/**/*.ts' 'examples/**/*.js' 'examples/**/*.ts' '.eslintrc.js'",
|
|
37
|
+
"fmt": "pnpm _fmt --write",
|
|
38
|
+
"lint": "eslint 'src/**/*.ts' 'tests/**/*.ts' 'examples/**/*.ts'",
|
|
39
|
+
"test": "pnpm jest",
|
|
40
|
+
"unit-test": "pnpm jest tests/unit",
|
|
41
|
+
"e2e-test": "pnpm jest tests/e2e",
|
|
42
|
+
"indexer-codegen": "graphql-codegen --config ./src/types/codegen.yaml && pnpm fmt",
|
|
43
|
+
"doc": "scripts/generateDocs.sh",
|
|
44
|
+
"check-version": "scripts/checkVersion.sh",
|
|
45
|
+
"update-version": "scripts/updateVersion.sh && pnpm doc"
|
|
46
|
+
},
|
|
33
47
|
"dependencies": {
|
|
34
48
|
"@aptos-labs/aptos-client": "^0.1.0",
|
|
35
49
|
"@noble/curves": "^1.2.0",
|
|
@@ -70,19 +84,5 @@
|
|
|
70
84
|
"typedoc": "^0.25.4",
|
|
71
85
|
"typescript": "^5.3.3"
|
|
72
86
|
},
|
|
73
|
-
"version": "1.
|
|
74
|
-
|
|
75
|
-
"build:clean": "rm -rf dist",
|
|
76
|
-
"build": "pnpm build:clean && tsup",
|
|
77
|
-
"_fmt": "prettier 'src/**/*.ts' 'tests/**/*.ts' 'examples/**/*.js' 'examples/**/*.ts' '.eslintrc.js'",
|
|
78
|
-
"fmt": "pnpm _fmt --write",
|
|
79
|
-
"lint": "eslint 'src/**/*.ts' 'tests/**/*.ts' 'examples/**/*.ts'",
|
|
80
|
-
"test": "pnpm jest",
|
|
81
|
-
"unit-test": "pnpm jest tests/unit",
|
|
82
|
-
"e2e-test": "pnpm jest tests/e2e",
|
|
83
|
-
"indexer-codegen": "graphql-codegen --config ./src/types/codegen.yaml && pnpm fmt",
|
|
84
|
-
"doc": "scripts/generateDocs.sh",
|
|
85
|
-
"check-version": "scripts/checkVersion.sh",
|
|
86
|
-
"update-version": "scripts/updateVersion.sh && pnpm doc"
|
|
87
|
-
}
|
|
88
|
-
}
|
|
87
|
+
"version": "1.9.0"
|
|
88
|
+
}
|
package/src/api/aptosConfig.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import aptosClient from "@aptos-labs/aptos-client";
|
|
5
5
|
import { AptosSettings, ClientConfig, Client } from "../types";
|
|
6
6
|
import { NetworkToNodeAPI, NetworkToFaucetAPI, NetworkToIndexerAPI, Network } from "../utils/apiEndpoints";
|
|
7
|
-
import { AptosApiType
|
|
7
|
+
import { AptosApiType } from "../utils/const";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* This class holds the config information for the SDK client instance.
|
|
@@ -36,7 +36,7 @@ export class AptosConfig {
|
|
|
36
36
|
readonly clientConfig?: ClientConfig;
|
|
37
37
|
|
|
38
38
|
constructor(settings?: AptosSettings) {
|
|
39
|
-
this.network = settings?.network ??
|
|
39
|
+
this.network = settings?.network ?? Network.DEVNET;
|
|
40
40
|
this.fullnode = settings?.fullnode;
|
|
41
41
|
this.faucet = settings?.faucet;
|
|
42
42
|
this.indexer = settings?.indexer;
|
package/src/api/digitalAsset.ts
CHANGED
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
createCollectionTransaction,
|
|
24
24
|
freezeDigitalAssetTransferTransaction,
|
|
25
25
|
getCollectionData,
|
|
26
|
+
getCollectionDataByCollectionId,
|
|
26
27
|
getCollectionId,
|
|
27
28
|
getCurrentDigitalAssetOwnership,
|
|
28
29
|
getDigitalAssetActivity,
|
|
@@ -77,6 +78,25 @@ export class DigitalAsset {
|
|
|
77
78
|
return getCollectionData({ aptosConfig: this.config, ...args });
|
|
78
79
|
}
|
|
79
80
|
|
|
81
|
+
/**
|
|
82
|
+
* Queries data of a specific collection by the collection ID.
|
|
83
|
+
*
|
|
84
|
+
* @param args.collectionId the ID of the collection, it's the same thing as the address of the collection object
|
|
85
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
86
|
+
* @returns GetCollectionDataResponse response type
|
|
87
|
+
*/
|
|
88
|
+
async getCollectionDataByCollectionId(args: {
|
|
89
|
+
collectionId: AccountAddressInput;
|
|
90
|
+
minimumLedgerVersion?: AnyNumber;
|
|
91
|
+
}): Promise<GetCollectionDataResponse> {
|
|
92
|
+
await waitForIndexerOnVersion({
|
|
93
|
+
config: this.config,
|
|
94
|
+
minimumLedgerVersion: args.minimumLedgerVersion,
|
|
95
|
+
processorType: ProcessorType.TOKEN_V2_PROCESSOR,
|
|
96
|
+
});
|
|
97
|
+
return getCollectionDataByCollectionId({ aptosConfig: this.config, ...args });
|
|
98
|
+
}
|
|
99
|
+
|
|
80
100
|
/**
|
|
81
101
|
* Queries a collection's ID.
|
|
82
102
|
*
|
package/src/api/event.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
// Copyright © Aptos Foundation
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
getAccountEventsByCreationNumber,
|
|
6
|
+
getAccountEventsByEventType,
|
|
7
|
+
getModuleEventsByEventType,
|
|
8
|
+
getEvents,
|
|
9
|
+
} from "../internal/event";
|
|
5
10
|
import { AnyNumber, GetEventsResponse, MoveStructId, OrderByArg, PaginationArgs, WhereArg } from "../types";
|
|
6
11
|
import { EventsBoolExp } from "../types/generated/types";
|
|
7
12
|
import { AccountAddressInput } from "../core";
|
|
@@ -15,6 +20,27 @@ import { waitForIndexerOnVersion } from "./utils";
|
|
|
15
20
|
export class Event {
|
|
16
21
|
constructor(readonly config: AptosConfig) {}
|
|
17
22
|
|
|
23
|
+
/**
|
|
24
|
+
* Get module events by event type
|
|
25
|
+
*
|
|
26
|
+
* @param args.eventType - The event type
|
|
27
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
28
|
+
*
|
|
29
|
+
* @returns Promise<GetEventsResponse>
|
|
30
|
+
*/
|
|
31
|
+
async getModuleEventsByEventType(args: {
|
|
32
|
+
eventType: MoveStructId;
|
|
33
|
+
minimumLedgerVersion?: AnyNumber;
|
|
34
|
+
options?: PaginationArgs & OrderByArg<GetEventsResponse[0]>;
|
|
35
|
+
}): Promise<GetEventsResponse> {
|
|
36
|
+
await waitForIndexerOnVersion({
|
|
37
|
+
config: this.config,
|
|
38
|
+
minimumLedgerVersion: args.minimumLedgerVersion,
|
|
39
|
+
processorType: ProcessorType.EVENTS_PROCESSOR,
|
|
40
|
+
});
|
|
41
|
+
return getModuleEventsByEventType({ aptosConfig: this.config, ...args });
|
|
42
|
+
}
|
|
43
|
+
|
|
18
44
|
/**
|
|
19
45
|
* Get events by creation number and an account address
|
|
20
46
|
*
|
|
@@ -0,0 +1,245 @@
|
|
|
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
|
+
import { Ed25519Account } from "./Ed25519Account";
|
|
7
|
+
import { SingleKeyAccount } from "./SingleKeyAccount";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Arguments for creating an `Ed25519Account` from an `Ed25519PrivateKey`.
|
|
11
|
+
* This is the default input type when passing an `Ed25519PrivateKey`.
|
|
12
|
+
* In order to use the SingleKey authentication scheme, `legacy` needs to be explicitly set to false.
|
|
13
|
+
*/
|
|
14
|
+
export interface CreateEd25519AccountFromPrivateKeyArgs {
|
|
15
|
+
privateKey: Ed25519PrivateKey;
|
|
16
|
+
address?: AccountAddressInput;
|
|
17
|
+
legacy?: true;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Arguments for creating an `SingleKeyAccount` from an `Ed25519PrivateKey`.
|
|
22
|
+
* The `legacy` argument needs to be explicitly set to false in order to
|
|
23
|
+
* use the `SingleKey` authentication scheme.
|
|
24
|
+
*/
|
|
25
|
+
export interface CreateEd25519SingleKeyAccountFromPrivateKeyArgs {
|
|
26
|
+
privateKey: Ed25519PrivateKey;
|
|
27
|
+
address?: AccountAddressInput;
|
|
28
|
+
legacy: false;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Arguments for creating an `SingleKeyAccount` from any supported private key
|
|
33
|
+
* that is not an `Ed25519PrivateKey`.
|
|
34
|
+
* The `legacy` argument defaults to false and cannot be explicitly set to true.
|
|
35
|
+
*/
|
|
36
|
+
export interface CreateSingleKeyAccountFromPrivateKeyArgs {
|
|
37
|
+
privateKey: Exclude<PrivateKey, Ed25519PrivateKey>;
|
|
38
|
+
address?: AccountAddressInput;
|
|
39
|
+
legacy?: false;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Arguments for creating an opaque `Account` from any supported private key.
|
|
44
|
+
* This is used when the private key type is not known at compilation time.
|
|
45
|
+
*/
|
|
46
|
+
export interface CreateAccountFromPrivateKeyArgs {
|
|
47
|
+
privateKey: PrivateKey;
|
|
48
|
+
address?: AccountAddressInput;
|
|
49
|
+
legacy?: boolean;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Arguments for generating an `Ed25519Account`.
|
|
54
|
+
* This is the input type used by default.
|
|
55
|
+
*/
|
|
56
|
+
export interface GenerateEd25519AccountArgs {
|
|
57
|
+
scheme?: SigningSchemeInput.Ed25519;
|
|
58
|
+
legacy?: true;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Arguments for generating an `SingleKeyAccount` with ah underlying `Ed25519PrivateKey`.
|
|
63
|
+
* The `legacy` argument needs to be explicitly set to false,
|
|
64
|
+
* otherwise an `Ed25519Account` will be returned instead.
|
|
65
|
+
*/
|
|
66
|
+
export interface GenerateEd25519SingleKeyAccountArgs {
|
|
67
|
+
scheme?: SigningSchemeInput.Ed25519;
|
|
68
|
+
legacy: false;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Arguments for generating an `SingleKeyAccount` with any supported private key
|
|
73
|
+
* that is not an `Ed25519PrivateKey`.
|
|
74
|
+
* The `legacy` argument defaults to false and cannot be explicitly set to true.
|
|
75
|
+
*/
|
|
76
|
+
export interface GenerateSingleKeyAccountArgs {
|
|
77
|
+
scheme: Exclude<SigningSchemeInput, SigningSchemeInput.Ed25519>;
|
|
78
|
+
legacy?: false;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Arguments for generating an opaque `Account`.
|
|
83
|
+
* This is used when the input signature scheme is not known at compilation time.
|
|
84
|
+
*/
|
|
85
|
+
export interface GenerateAccountArgs {
|
|
86
|
+
scheme?: SigningSchemeInput;
|
|
87
|
+
legacy?: boolean;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Arguments for deriving a private key from a mnemonic phrase and a BIP44 path.
|
|
92
|
+
*/
|
|
93
|
+
export interface PrivateKeyFromDerivationPathArgs {
|
|
94
|
+
path: string;
|
|
95
|
+
mnemonic: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Interface for a generic Aptos account.
|
|
100
|
+
*
|
|
101
|
+
* The interface is defined as abstract class to provide a single entrypoint for account generation,
|
|
102
|
+
* either through `Account.generate()` or `Account.fromDerivationPath`.
|
|
103
|
+
* Despite this being an abstract class, it should be treated as an interface and enforced using
|
|
104
|
+
* the `implements` keyword.
|
|
105
|
+
*
|
|
106
|
+
* Note: Generating an account instance does not create the account on-chain.
|
|
107
|
+
*/
|
|
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
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Public key associated with the account
|
|
118
|
+
*/
|
|
119
|
+
abstract readonly publicKey: AccountPublicKey;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Account address associated with the account
|
|
123
|
+
*/
|
|
124
|
+
abstract readonly accountAddress: AccountAddress;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Signing scheme used to sign transactions
|
|
128
|
+
*/
|
|
129
|
+
abstract signingScheme: SigningScheme;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Derives an account from a randomly generated private key.
|
|
133
|
+
* @param args.scheme The signature scheme to use, to generate the private key
|
|
134
|
+
* @param args.legacy Whether to use a legacy authentication scheme, when applicable
|
|
135
|
+
* @returns An account compatible with the provided signature scheme
|
|
136
|
+
*/
|
|
137
|
+
static generate(args?: GenerateEd25519AccountArgs): Ed25519Account;
|
|
138
|
+
static generate(args: GenerateEd25519SingleKeyAccountArgs): SingleKeyAccount;
|
|
139
|
+
static generate(args: GenerateSingleKeyAccountArgs): SingleKeyAccount;
|
|
140
|
+
static generate(args: GenerateAccountArgs): Account;
|
|
141
|
+
static generate(args: GenerateAccountArgs = {}) {
|
|
142
|
+
const { scheme = SigningSchemeInput.Ed25519, legacy = true } = args;
|
|
143
|
+
if (scheme === SigningSchemeInput.Ed25519 && legacy) {
|
|
144
|
+
return Ed25519Account.generate();
|
|
145
|
+
}
|
|
146
|
+
return SingleKeyAccount.generate({ scheme });
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Creates an account from the provided private key.
|
|
151
|
+
*
|
|
152
|
+
* @param args.privateKey a valid private key
|
|
153
|
+
* @param args.address the account's address. If not provided, it will be derived from the public key.
|
|
154
|
+
* @param args.legacy Whether to use a legacy authentication scheme, when applicable
|
|
155
|
+
*/
|
|
156
|
+
static fromPrivateKey(args: CreateEd25519AccountFromPrivateKeyArgs): Ed25519Account;
|
|
157
|
+
static fromPrivateKey(args: CreateEd25519SingleKeyAccountFromPrivateKeyArgs): SingleKeyAccount;
|
|
158
|
+
static fromPrivateKey(args: CreateSingleKeyAccountFromPrivateKeyArgs): SingleKeyAccount;
|
|
159
|
+
static fromPrivateKey(args: CreateAccountFromPrivateKeyArgs): Account;
|
|
160
|
+
static fromPrivateKey(args: CreateAccountFromPrivateKeyArgs) {
|
|
161
|
+
const { privateKey, address, legacy = true } = args;
|
|
162
|
+
if (privateKey instanceof Ed25519PrivateKey && legacy) {
|
|
163
|
+
return new Ed25519Account({
|
|
164
|
+
privateKey,
|
|
165
|
+
address,
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
return new SingleKeyAccount({ privateKey, address });
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* @deprecated use `fromPrivateKey` instead.
|
|
173
|
+
* Instantiates an account given a private key and a specified account address.
|
|
174
|
+
* This is primarily used to instantiate an `Account` that has had its authentication key rotated.
|
|
175
|
+
*
|
|
176
|
+
* @param args.privateKey PrivateKey - the underlying private key for the account
|
|
177
|
+
* @param args.address AccountAddress - The account address the `Account` will sign for
|
|
178
|
+
* @param args.legacy optional. If set to false, the keypair generated is a Unified keypair. Defaults
|
|
179
|
+
* to generating a Legacy Ed25519 keypair
|
|
180
|
+
*
|
|
181
|
+
* @returns Account
|
|
182
|
+
*/
|
|
183
|
+
static fromPrivateKeyAndAddress(args: CreateAccountFromPrivateKeyArgs) {
|
|
184
|
+
return this.fromPrivateKey(args);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Derives an account with bip44 path and mnemonics
|
|
189
|
+
*
|
|
190
|
+
* @param args.scheme The signature scheme to derive the private key with
|
|
191
|
+
* @param args.path the BIP44 derive hardened path (e.g. m/44'/637'/0'/0'/0') for Ed25519,
|
|
192
|
+
* or non-hardened path (e.g. m/44'/637'/0'/0/0) for secp256k1
|
|
193
|
+
* Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
|
|
194
|
+
* @param args.mnemonic the mnemonic seed phrase of the account
|
|
195
|
+
*/
|
|
196
|
+
static fromDerivationPath(args: GenerateEd25519AccountArgs & PrivateKeyFromDerivationPathArgs): Ed25519Account;
|
|
197
|
+
static fromDerivationPath(
|
|
198
|
+
args: GenerateEd25519SingleKeyAccountArgs & PrivateKeyFromDerivationPathArgs,
|
|
199
|
+
): SingleKeyAccount;
|
|
200
|
+
static fromDerivationPath(args: GenerateSingleKeyAccountArgs & PrivateKeyFromDerivationPathArgs): SingleKeyAccount;
|
|
201
|
+
static fromDerivationPath(args: GenerateAccountArgs & PrivateKeyFromDerivationPathArgs): Account;
|
|
202
|
+
static fromDerivationPath(args: GenerateAccountArgs & PrivateKeyFromDerivationPathArgs) {
|
|
203
|
+
const { scheme = SigningSchemeInput.Ed25519, mnemonic, path, legacy = true } = args;
|
|
204
|
+
if (scheme === SigningSchemeInput.Ed25519 && legacy) {
|
|
205
|
+
return Ed25519Account.fromDerivationPath({ mnemonic, path });
|
|
206
|
+
}
|
|
207
|
+
return SingleKeyAccount.fromDerivationPath({ scheme, mnemonic, path });
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* @deprecated use `publicKey.authKey()` instead.
|
|
212
|
+
* This key enables account owners to rotate their private key(s)
|
|
213
|
+
* associated with the account without changing the address that hosts their account.
|
|
214
|
+
* See here for more info: {@link https://aptos.dev/concepts/accounts#single-signer-authentication}
|
|
215
|
+
*
|
|
216
|
+
* @param args.publicKey PublicKey - public key of the account
|
|
217
|
+
* @returns The authentication key for the associated account
|
|
218
|
+
*/
|
|
219
|
+
static authKey(args: { publicKey: AccountPublicKey }): AuthenticationKey {
|
|
220
|
+
const { publicKey } = args;
|
|
221
|
+
return publicKey.authKey();
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/**
|
|
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
|
|
228
|
+
*/
|
|
229
|
+
abstract signWithAuthenticator(message: HexInput): AccountAuthenticator;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Sign the given message with the private key.
|
|
233
|
+
* @param message in HexInput format
|
|
234
|
+
* @returns AccountSignature
|
|
235
|
+
*/
|
|
236
|
+
abstract sign(message: HexInput): Signature;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* @param args.message raw message data in HexInput format
|
|
240
|
+
* @param args.signature signed message signature
|
|
241
|
+
*/
|
|
242
|
+
verifySignature(args: VerifySignatureArgs): boolean {
|
|
243
|
+
return this.publicKey.verifySignature(args);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
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
|
+
import type { Account } from "./Account";
|
|
6
|
+
|
|
7
|
+
export interface Ed25519SignerConstructorArgs {
|
|
8
|
+
privateKey: Ed25519PrivateKey;
|
|
9
|
+
address?: AccountAddressInput;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface Ed25519SignerFromDerivationPathArgs {
|
|
13
|
+
path: string;
|
|
14
|
+
mnemonic: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface VerifyEd25519SignatureArgs {
|
|
18
|
+
message: HexInput;
|
|
19
|
+
signature: Ed25519Signature;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Signer implementation for the Ed25519 authentication scheme.
|
|
24
|
+
* This extends an {@link Ed25519Account} by adding signing capabilities through an {@link Ed25519PrivateKey}.
|
|
25
|
+
*
|
|
26
|
+
* Note: Generating a signer instance does not create the account on-chain.
|
|
27
|
+
*/
|
|
28
|
+
export class Ed25519Account implements Account {
|
|
29
|
+
/**
|
|
30
|
+
* Private key associated with the account
|
|
31
|
+
*/
|
|
32
|
+
readonly privateKey: Ed25519PrivateKey;
|
|
33
|
+
|
|
34
|
+
readonly publicKey: Ed25519PublicKey;
|
|
35
|
+
|
|
36
|
+
readonly accountAddress: AccountAddress;
|
|
37
|
+
|
|
38
|
+
readonly signingScheme = SigningScheme.Ed25519;
|
|
39
|
+
|
|
40
|
+
// region Constructors
|
|
41
|
+
|
|
42
|
+
constructor(args: Ed25519SignerConstructorArgs) {
|
|
43
|
+
const { privateKey, address } = args;
|
|
44
|
+
this.privateKey = privateKey;
|
|
45
|
+
this.publicKey = privateKey.publicKey();
|
|
46
|
+
this.accountAddress = address ? AccountAddress.from(address) : this.publicKey.authKey().derivedAddress();
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Derives a signer from a randomly generated private key
|
|
51
|
+
*/
|
|
52
|
+
static generate() {
|
|
53
|
+
const privateKey = Ed25519PrivateKey.generate();
|
|
54
|
+
return new Ed25519Account({ privateKey });
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Derives an account with bip44 path and mnemonics
|
|
59
|
+
*
|
|
60
|
+
* @param args.path the BIP44 derive hardened path e.g. m/44'/637'/0'/0'/0'
|
|
61
|
+
* Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
|
|
62
|
+
* @param args.mnemonic the mnemonic seed phrase of the account
|
|
63
|
+
*/
|
|
64
|
+
static fromDerivationPath(args: Ed25519SignerFromDerivationPathArgs) {
|
|
65
|
+
const { path, mnemonic } = args;
|
|
66
|
+
const privateKey = Ed25519PrivateKey.fromDerivationPath(path, mnemonic);
|
|
67
|
+
return new Ed25519Account({ privateKey });
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// endregion
|
|
71
|
+
|
|
72
|
+
// region Account
|
|
73
|
+
|
|
74
|
+
verifySignature(args: VerifyEd25519SignatureArgs): boolean {
|
|
75
|
+
return this.publicKey.verifySignature(args);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
signWithAuthenticator(message: HexInput) {
|
|
79
|
+
const signature = this.privateKey.sign(message);
|
|
80
|
+
return new AccountAuthenticatorEd25519(this.publicKey, signature);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
sign(message: HexInput) {
|
|
84
|
+
return this.signWithAuthenticator(message).signature;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// endregion
|
|
88
|
+
}
|