@aptos-labs/ts-sdk 1.13.3 → 1.14.0-zeta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/accountAddress-NPQwRmxn.d.ts +2121 -0
- package/dist/common/cli/index.d.ts +94 -1
- package/dist/common/cli/index.js +1 -1
- package/dist/common/cli/index.js.map +1 -1
- package/dist/common/index.d.ts +2588 -4127
- package/dist/common/index.js +26 -26
- package/dist/common/index.js.map +1 -1
- package/dist/esm/{Ed25519Account--qjfup2u.d.mts → Ed25519Account-9zBaZEnp.d.mts} +76 -9
- package/dist/esm/account/Account.d.mts +34 -0
- package/dist/esm/account/Account.mjs +2 -0
- package/dist/esm/account/Ed25519Account.d.mts +34 -0
- package/dist/esm/account/Ed25519Account.mjs +2 -0
- package/dist/esm/account/EphemeralKeyPair.d.mts +47 -0
- package/dist/esm/account/EphemeralKeyPair.mjs +2 -0
- package/dist/esm/account/KeylessAccount.d.mts +107 -0
- package/dist/esm/account/KeylessAccount.mjs +2 -0
- package/dist/esm/account/MultiKeyAccount.d.mts +134 -0
- package/dist/esm/account/MultiKeyAccount.mjs +2 -0
- package/dist/esm/account/SingleKeyAccount.d.mts +34 -0
- package/dist/esm/account/SingleKeyAccount.mjs +2 -0
- package/dist/esm/account/index.d.mts +40 -0
- package/dist/esm/account/index.mjs +2 -0
- package/dist/esm/api/account.d.mts +13 -1
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.d.mts +2 -2
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +14 -8
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/aptosConfig.d.mts +20 -0
- package/dist/esm/api/aptosConfig.mjs +1 -1
- package/dist/esm/api/coin.d.mts +7 -7
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.d.mts +1 -1
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/event.mjs +1 -1
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.d.mts +5 -5
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.d.mts +7 -7
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +13 -8
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/keyless.d.mts +67 -0
- package/dist/esm/api/keyless.mjs +2 -0
- package/dist/esm/api/keyless.mjs.map +1 -0
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/transaction.d.mts +1 -1
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.d.mts +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 +2 -0
- package/dist/esm/bcs/serializer.mjs +1 -1
- package/dist/esm/{chunk-IKYIJYBY.mjs → chunk-25N7RLBW.mjs} +2 -2
- package/dist/esm/chunk-25N7RLBW.mjs.map +1 -0
- package/dist/esm/chunk-32355KGV.mjs +2 -0
- package/dist/esm/chunk-32355KGV.mjs.map +1 -0
- package/dist/esm/{chunk-TBMAJ6AW.mjs → chunk-3FVRXELT.mjs} +2 -2
- package/dist/esm/chunk-3OELNIC6.mjs +2 -0
- package/dist/esm/{chunk-734YX27W.mjs.map → chunk-3OELNIC6.mjs.map} +1 -1
- package/dist/esm/chunk-3U5VRZLS.mjs +2 -0
- package/dist/esm/chunk-3U5VRZLS.mjs.map +1 -0
- package/dist/esm/{chunk-DMKUAQB7.mjs → chunk-3VGX3TXH.mjs} +2 -2
- package/dist/esm/chunk-43WARVT3.mjs +2 -0
- package/dist/esm/chunk-43WARVT3.mjs.map +1 -0
- package/dist/esm/{chunk-CU67XZNB.mjs → chunk-52ECIIIH.mjs} +2 -2
- package/dist/esm/chunk-56NB52W6.mjs +2 -0
- package/dist/esm/chunk-56NB52W6.mjs.map +1 -0
- package/dist/esm/chunk-5DW2AJPI.mjs +2 -0
- package/dist/esm/chunk-5DW2AJPI.mjs.map +1 -0
- package/dist/esm/chunk-5QWUIVAQ.mjs +2 -0
- package/dist/esm/chunk-5QWUIVAQ.mjs.map +1 -0
- package/dist/esm/chunk-6456EI2E.mjs +2 -0
- package/dist/esm/chunk-6456EI2E.mjs.map +1 -0
- package/dist/esm/{chunk-Q3TZGQVC.mjs → chunk-65UZZNN2.mjs} +2 -2
- package/dist/esm/chunk-65UZZNN2.mjs.map +1 -0
- package/dist/esm/{chunk-MFKMAAWA.mjs → chunk-6LOTZ4GY.mjs} +2 -2
- package/dist/esm/{chunk-QIAHBEEW.mjs → chunk-6RBUXB5I.mjs} +2 -2
- package/dist/esm/{chunk-IIPYR7PF.mjs → chunk-6SHLLRJA.mjs} +2 -2
- package/dist/esm/chunk-6SHLLRJA.mjs.map +1 -0
- package/dist/esm/chunk-73Y4NTDU.mjs +2 -0
- package/dist/esm/chunk-73Y4NTDU.mjs.map +1 -0
- package/dist/esm/chunk-7PSX4LCV.mjs +2 -0
- package/dist/esm/{chunk-B7TQGVGL.mjs.map → chunk-7PSX4LCV.mjs.map} +1 -1
- package/dist/esm/chunk-7Q2NVO5M.mjs +2 -0
- package/dist/esm/chunk-7Q2NVO5M.mjs.map +1 -0
- package/dist/esm/{chunk-NPFNYP75.mjs → chunk-7STYQ5ZE.mjs} +2 -2
- package/dist/esm/{chunk-PZGLV5UQ.mjs → chunk-7WJTKYRG.mjs} +2 -2
- package/dist/esm/chunk-7Z6DYLCA.mjs +1 -0
- package/dist/esm/chunk-7Z6DYLCA.mjs.map +1 -0
- package/dist/esm/chunk-AQ4I7VVB.mjs +1 -0
- package/dist/esm/chunk-AQ4I7VVB.mjs.map +1 -0
- package/dist/esm/{chunk-ZYYK3UXP.mjs → chunk-C3L4ETUF.mjs} +2 -2
- package/dist/esm/chunk-C5UVSNZW.mjs +2 -0
- package/dist/esm/chunk-C5UVSNZW.mjs.map +1 -0
- package/dist/esm/{chunk-CTIN3GTP.mjs → chunk-CLVAGDXO.mjs} +2 -2
- package/dist/esm/{chunk-WFZDFFBM.mjs → chunk-COW5IGYC.mjs} +2 -2
- package/dist/esm/chunk-D22EMNIY.mjs +2 -0
- package/dist/esm/{chunk-QMURTXFM.mjs.map → chunk-D22EMNIY.mjs.map} +1 -1
- package/dist/esm/{chunk-6CFRW26C.mjs → chunk-DLTC6PJP.mjs} +2 -2
- package/dist/esm/chunk-DLTC6PJP.mjs.map +1 -0
- package/dist/esm/{chunk-FS3NSGBF.mjs → chunk-EB7AI4B4.mjs} +2 -2
- package/dist/esm/{chunk-YU3KB3UV.mjs → chunk-EKABTHUZ.mjs} +2 -2
- package/dist/esm/chunk-EOMDZYSJ.mjs +2 -0
- package/dist/esm/chunk-EOMDZYSJ.mjs.map +1 -0
- package/dist/esm/{chunk-SG4MAOCF.mjs → chunk-FKSACFCB.mjs} +2 -2
- package/dist/esm/chunk-FLYEALDB.mjs +2 -0
- package/dist/esm/chunk-FLYEALDB.mjs.map +1 -0
- package/dist/esm/{chunk-WLF5YQM4.mjs → chunk-G4XSNSOT.mjs} +2 -2
- package/dist/esm/chunk-G4XSNSOT.mjs.map +1 -0
- package/dist/esm/{chunk-MACC2BLE.mjs → chunk-H3TFQ7K4.mjs} +2 -2
- package/dist/esm/chunk-H6LYW7HG.mjs +2 -0
- package/dist/esm/chunk-H6LYW7HG.mjs.map +1 -0
- package/dist/esm/chunk-HCGWCB5E.mjs +2 -0
- package/dist/esm/chunk-HCGWCB5E.mjs.map +1 -0
- package/dist/esm/{chunk-UML2VQZT.mjs → chunk-HGZGTBA4.mjs} +2 -2
- package/dist/esm/{chunk-XO3HHRJV.mjs → chunk-HXSW6X7K.mjs} +2 -2
- package/dist/esm/chunk-IXYXFDJZ.mjs +2 -0
- package/dist/esm/{chunk-UFT7US42.mjs → chunk-J7J7ZTBF.mjs} +2 -2
- package/dist/esm/chunk-JVKMQ64G.mjs +2 -0
- package/dist/esm/chunk-JVKMQ64G.mjs.map +1 -0
- package/dist/esm/chunk-JXCZTOYC.mjs +1 -0
- package/dist/esm/chunk-JXCZTOYC.mjs.map +1 -0
- package/dist/esm/chunk-KWNBC5MF.mjs +2 -0
- package/dist/esm/chunk-KWNBC5MF.mjs.map +1 -0
- package/dist/esm/chunk-LDQ6JFEF.mjs +2 -0
- package/dist/esm/chunk-LDQ6JFEF.mjs.map +1 -0
- package/dist/esm/{chunk-DSTKXJMA.mjs → chunk-MGOHPDX4.mjs} +2 -2
- package/dist/esm/{chunk-BWFJHFBQ.mjs → chunk-MWUJCP27.mjs} +2 -2
- package/dist/esm/{chunk-QTRYMRYK.mjs → chunk-NC5HHEEM.mjs} +2 -2
- package/dist/esm/chunk-NGNETNK2.mjs +2 -0
- package/dist/esm/chunk-NGNETNK2.mjs.map +1 -0
- package/dist/esm/chunk-NKCZ4KGO.mjs +2 -0
- package/dist/esm/chunk-NKCZ4KGO.mjs.map +1 -0
- package/dist/esm/chunk-NMECYE3D.mjs +2 -0
- package/dist/esm/chunk-NMECYE3D.mjs.map +1 -0
- package/dist/esm/{chunk-AU6W5OIH.mjs → chunk-NNIHTVLA.mjs} +2 -2
- package/dist/esm/chunk-NNW6HWIO.mjs +2 -0
- package/dist/esm/{chunk-G2O323HP.mjs → chunk-O34EOOVF.mjs} +2 -2
- package/dist/esm/chunk-OBEVVLF7.mjs +2 -0
- package/dist/esm/chunk-OBEVVLF7.mjs.map +1 -0
- package/dist/esm/chunk-OKRUEVF3.mjs +2 -0
- package/dist/esm/chunk-OKRUEVF3.mjs.map +1 -0
- package/dist/esm/{chunk-PFIMEXNN.mjs → chunk-OLGSIKFB.mjs} +2 -2
- package/dist/esm/chunk-OLGSIKFB.mjs.map +1 -0
- package/dist/esm/chunk-OZC3FCJP.mjs +2 -0
- package/dist/esm/chunk-OZC3FCJP.mjs.map +1 -0
- package/dist/esm/{chunk-U43IJHQN.mjs → chunk-PFFAQZHT.mjs} +2 -2
- package/dist/esm/{chunk-ZZZZVONX.mjs → chunk-PINF6ZWP.mjs} +2 -2
- package/dist/esm/chunk-PJXRQBF6.mjs +2 -0
- package/dist/esm/chunk-PJXRQBF6.mjs.map +1 -0
- package/dist/esm/{chunk-7QJ6YJXP.mjs → chunk-QHVZL3LZ.mjs} +2 -2
- package/dist/esm/{chunk-DPV25ZKR.mjs → chunk-QNHDS64I.mjs} +2 -2
- package/dist/esm/{chunk-O2F53NKI.mjs → chunk-RBPGL6YB.mjs} +2 -2
- package/dist/esm/chunk-RFSO3JRG.mjs +1 -0
- package/dist/esm/chunk-RFSO3JRG.mjs.map +1 -0
- package/dist/esm/{chunk-DM44OGQH.mjs → chunk-RJ4PSGZ4.mjs} +2 -2
- package/dist/esm/{chunk-B3R6G6QP.mjs → chunk-RTSEMQCK.mjs} +2 -2
- package/dist/esm/chunk-RTSEMQCK.mjs.map +1 -0
- package/dist/esm/{chunk-V3Q2KXJU.mjs → chunk-SRPTQ4VV.mjs} +2 -2
- package/dist/esm/{chunk-R5QUBEH6.mjs → chunk-STYDBDYL.mjs} +2 -2
- package/dist/esm/{chunk-IOSQVDZI.mjs → chunk-T23OVRNF.mjs} +2 -2
- package/dist/esm/{chunk-RIUZPGI5.mjs → chunk-TICM455H.mjs} +2 -2
- package/dist/esm/{chunk-52C73T26.mjs → chunk-TVRJ3M7B.mjs} +2 -2
- package/dist/esm/{chunk-52C73T26.mjs.map → chunk-TVRJ3M7B.mjs.map} +1 -1
- package/dist/esm/{chunk-3WUGR46O.mjs → chunk-TXMPXZBG.mjs} +2 -2
- package/dist/esm/{chunk-W4ZW7QHA.mjs → chunk-UGIJHLL3.mjs} +2 -2
- package/dist/esm/{chunk-O4JRPZZM.mjs → chunk-UVOU6BW2.mjs} +2 -2
- package/dist/esm/{chunk-GSD4OOM3.mjs → chunk-V7P6MLSY.mjs} +2 -2
- package/dist/esm/{chunk-V6OS74OS.mjs → chunk-VJJN3GFD.mjs} +2 -2
- package/dist/esm/chunk-WOLIXKOK.mjs +2 -0
- package/dist/esm/chunk-WOLIXKOK.mjs.map +1 -0
- package/dist/esm/{chunk-Z5YFM2AW.mjs → chunk-WVIPPU2C.mjs} +2 -2
- package/dist/esm/chunk-WVIPPU2C.mjs.map +1 -0
- package/dist/esm/chunk-XCR3YNHW.mjs +2 -0
- package/dist/esm/chunk-XCR3YNHW.mjs.map +1 -0
- package/dist/esm/{chunk-5P2S2SZZ.mjs → chunk-XMFPKHB5.mjs} +2 -2
- package/dist/esm/chunk-XN4SQWI5.mjs +2 -0
- package/dist/esm/chunk-XN4SQWI5.mjs.map +1 -0
- package/dist/esm/chunk-YE5B2S5L.mjs +2 -0
- package/dist/esm/chunk-YE5B2S5L.mjs.map +1 -0
- package/dist/esm/chunk-Z5KKUXYI.mjs +2 -0
- package/dist/esm/chunk-Z5KKUXYI.mjs.map +1 -0
- package/dist/esm/chunk-ZM436N3W.mjs +2 -0
- package/dist/esm/chunk-ZM436N3W.mjs.map +1 -0
- package/dist/esm/{chunk-RHBCVCOS.mjs → chunk-ZNEBMSNC.mjs} +2 -2
- package/dist/esm/cli/index.d.mts +12 -0
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/cli/move.d.mts +105 -0
- package/dist/esm/cli/move.mjs +2 -0
- package/dist/esm/cli/move.mjs.map +1 -0
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.d.mts +2 -1
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.d.mts +2 -2
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.d.mts +3 -1
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/core/account/index.d.mts +5 -14
- package/dist/esm/core/account/index.mjs +1 -1
- package/dist/esm/core/account/utils/address.mjs +1 -1
- package/dist/esm/core/account/utils/index.mjs +1 -1
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.d.mts +0 -10
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/ephemeral.d.mts +77 -0
- package/dist/esm/core/crypto/ephemeral.mjs +2 -0
- package/dist/esm/core/crypto/ephemeral.mjs.map +1 -0
- package/dist/esm/core/crypto/hdKey.d.mts +15 -1
- package/dist/esm/core/crypto/hdKey.mjs +1 -1
- package/dist/esm/core/crypto/index.d.mts +6 -4
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/keyless.d.mts +217 -0
- package/dist/esm/core/crypto/keyless.mjs +2 -0
- package/dist/esm/core/crypto/keyless.mjs.map +1 -0
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.d.mts +7 -0
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/poseidon.d.mts +7 -0
- package/dist/esm/core/crypto/poseidon.mjs +2 -0
- package/dist/esm/core/crypto/poseidon.mjs.map +1 -0
- package/dist/esm/core/crypto/publicKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/index.d.mts +5 -6
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/index.d.mts +15 -9
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/account.d.mts +13 -1
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.d.mts +1 -1
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.d.mts +7 -7
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.d.mts +2 -2
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/event.d.mts +1 -1
- package/dist/esm/internal/event.mjs +1 -1
- package/dist/esm/internal/faucet.d.mts +1 -1
- package/dist/esm/internal/faucet.mjs +1 -1
- package/dist/esm/internal/fungibleAsset.d.mts +5 -5
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/keyless.d.mts +67 -0
- package/dist/esm/internal/keyless.mjs +2 -0
- package/dist/esm/internal/keyless.mjs.map +1 -0
- package/dist/esm/internal/staking.d.mts +1 -1
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.d.mts +1 -1
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/internal/view.d.mts +7 -7
- package/dist/esm/internal/view.mjs +1 -1
- package/dist/esm/transactions/authenticator/account.d.mts +3 -4
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.mjs +1 -1
- package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
- package/dist/esm/transactions/index.d.mts +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 +13 -1
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/index.d.mts +2 -2
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.d.mts +1 -1
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.d.mts +9 -9
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.d.mts +9 -9
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +6 -6
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +72 -0
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +2 -0
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs.map +1 -0
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +6 -28
- 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 +17 -3
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/types/keyless.d.mts +16 -0
- package/dist/esm/types/keyless.mjs +1 -0
- package/dist/esm/types/keyless.mjs.map +1 -0
- package/dist/esm/utils/apiEndpoints.d.mts +3 -2
- package/dist/esm/utils/apiEndpoints.mjs +1 -1
- package/dist/esm/utils/const.d.mts +3 -1
- package/dist/esm/utils/const.mjs +1 -1
- package/dist/esm/utils/index.d.mts +1 -1
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/utils/normalizeBundle.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +7 -2
- package/src/{core/account → account}/Account.ts +25 -15
- package/src/{core/account → account}/Ed25519Account.ts +45 -9
- package/src/account/EphemeralKeyPair.ts +123 -0
- package/src/account/KeylessAccount.ts +303 -0
- package/src/account/MultiKeyAccount.ts +182 -0
- package/src/{core/account → account}/SingleKeyAccount.ts +45 -10
- package/src/account/index.ts +6 -0
- package/src/api/account.ts +2 -1
- package/src/api/ans.ts +2 -1
- package/src/api/aptos.ts +6 -0
- package/src/api/aptosConfig.ts +46 -1
- package/src/api/digitalAsset.ts +2 -1
- package/src/api/fungibleAsset.ts +2 -1
- package/src/api/keyless.ts +35 -0
- package/src/api/transaction.ts +2 -1
- package/src/api/transactionSubmission/management.ts +1 -1
- package/src/api/transactionSubmission/sign.ts +1 -1
- package/src/bcs/serializer.ts +18 -0
- package/src/cli/index.ts +1 -0
- package/src/cli/move.ts +183 -0
- package/src/client/core.ts +8 -0
- package/src/client/get.ts +6 -0
- package/src/client/post.ts +12 -0
- package/src/core/account/index.ts +1 -3
- package/src/core/crypto/ed25519.ts +4 -24
- package/src/core/crypto/ephemeral.ts +149 -0
- package/src/core/crypto/hdKey.ts +31 -0
- package/src/core/crypto/index.ts +2 -0
- package/src/core/crypto/keyless.ts +508 -0
- package/src/core/crypto/multiKey.ts +17 -6
- package/src/core/crypto/poseidon.ts +134 -0
- package/src/core/crypto/singleKey.ts +11 -0
- package/src/core/index.ts +0 -1
- package/src/index.ts +1 -0
- package/src/internal/account.ts +1 -1
- package/src/internal/ans.ts +2 -2
- package/src/internal/digitalAsset.ts +2 -1
- package/src/internal/fungibleAsset.ts +3 -2
- package/src/internal/keyless.ts +118 -0
- package/src/internal/transactionSubmission.ts +8 -7
- package/src/transactions/authenticator/account.ts +6 -11
- package/src/transactions/management/accountSequenceNumber.ts +1 -1
- package/src/transactions/management/transactionWorker.ts +8 -2
- package/src/transactions/transactionBuilder/index.ts +1 -0
- package/src/transactions/transactionBuilder/signingMessage.ts +93 -0
- package/src/transactions/transactionBuilder/transactionBuilder.ts +2 -75
- package/src/types/index.ts +19 -0
- package/src/types/keyless.ts +6 -0
- package/src/utils/apiEndpoints.ts +14 -6
- package/src/utils/const.ts +2 -0
- package/src/version.ts +1 -1
- package/dist/esm/chunk-24IKVZBK.mjs +0 -2
- package/dist/esm/chunk-24IKVZBK.mjs.map +0 -1
- package/dist/esm/chunk-2HISPUZZ.mjs +0 -2
- package/dist/esm/chunk-2HISPUZZ.mjs.map +0 -1
- package/dist/esm/chunk-6CFRW26C.mjs.map +0 -1
- package/dist/esm/chunk-734YX27W.mjs +0 -2
- package/dist/esm/chunk-AD3VLZ7I.mjs +0 -2
- package/dist/esm/chunk-AD3VLZ7I.mjs.map +0 -1
- package/dist/esm/chunk-B3R6G6QP.mjs.map +0 -1
- package/dist/esm/chunk-B7TQGVGL.mjs +0 -2
- package/dist/esm/chunk-CNMQNPNV.mjs +0 -2
- package/dist/esm/chunk-CNMQNPNV.mjs.map +0 -1
- package/dist/esm/chunk-CYNQRMO5.mjs +0 -2
- package/dist/esm/chunk-CYNQRMO5.mjs.map +0 -1
- package/dist/esm/chunk-E7FWVXGX.mjs +0 -1
- package/dist/esm/chunk-EOFJFE4T.mjs +0 -2
- package/dist/esm/chunk-EOFJFE4T.mjs.map +0 -1
- package/dist/esm/chunk-FATWMUXK.mjs +0 -2
- package/dist/esm/chunk-FATWMUXK.mjs.map +0 -1
- package/dist/esm/chunk-HQ5I4Q3H.mjs +0 -2
- package/dist/esm/chunk-HQ5I4Q3H.mjs.map +0 -1
- package/dist/esm/chunk-IIPYR7PF.mjs.map +0 -1
- package/dist/esm/chunk-IKYIJYBY.mjs.map +0 -1
- package/dist/esm/chunk-KVZ4XMZS.mjs +0 -2
- package/dist/esm/chunk-KVZ4XMZS.mjs.map +0 -1
- package/dist/esm/chunk-LR65XHSF.mjs +0 -2
- package/dist/esm/chunk-LR65XHSF.mjs.map +0 -1
- package/dist/esm/chunk-MC6G725U.mjs +0 -2
- package/dist/esm/chunk-MC6G725U.mjs.map +0 -1
- package/dist/esm/chunk-MLWIHWNH.mjs +0 -1
- package/dist/esm/chunk-NNQJBFRB.mjs +0 -2
- package/dist/esm/chunk-ODRO4CSA.mjs +0 -2
- package/dist/esm/chunk-ODRO4CSA.mjs.map +0 -1
- package/dist/esm/chunk-OVJQWQ2N.mjs +0 -2
- package/dist/esm/chunk-OVJQWQ2N.mjs.map +0 -1
- package/dist/esm/chunk-OWW6SIDP.mjs +0 -2
- package/dist/esm/chunk-OWW6SIDP.mjs.map +0 -1
- package/dist/esm/chunk-PFIMEXNN.mjs.map +0 -1
- package/dist/esm/chunk-Q3TZGQVC.mjs.map +0 -1
- package/dist/esm/chunk-QMURTXFM.mjs +0 -2
- package/dist/esm/chunk-R7G3CLRI.mjs +0 -1
- package/dist/esm/chunk-SUAKPNKQ.mjs +0 -2
- package/dist/esm/chunk-SUAKPNKQ.mjs.map +0 -1
- package/dist/esm/chunk-TLOPIURC.mjs +0 -2
- package/dist/esm/chunk-TLOPIURC.mjs.map +0 -1
- package/dist/esm/chunk-UVSRX4SV.mjs +0 -1
- package/dist/esm/chunk-V4SRNEV3.mjs +0 -2
- package/dist/esm/chunk-V4SRNEV3.mjs.map +0 -1
- package/dist/esm/chunk-VVIG4E7Q.mjs +0 -2
- package/dist/esm/chunk-WLF5YQM4.mjs.map +0 -1
- package/dist/esm/chunk-XDGQTMDV.mjs +0 -2
- package/dist/esm/chunk-XDGQTMDV.mjs.map +0 -1
- package/dist/esm/chunk-YFRXBEOC.mjs +0 -2
- package/dist/esm/chunk-YFRXBEOC.mjs.map +0 -1
- package/dist/esm/chunk-YPTF6MLX.mjs +0 -2
- package/dist/esm/chunk-YPTF6MLX.mjs.map +0 -1
- package/dist/esm/chunk-Z5YFM2AW.mjs.map +0 -1
- package/dist/esm/core/account/Account.d.mts +0 -20
- package/dist/esm/core/account/Account.mjs +0 -2
- package/dist/esm/core/account/Ed25519Account.d.mts +0 -20
- package/dist/esm/core/account/Ed25519Account.mjs +0 -2
- package/dist/esm/core/account/SingleKeyAccount.d.mts +0 -20
- package/dist/esm/core/account/SingleKeyAccount.mjs +0 -2
- /package/dist/esm/{core/account → account}/Account.mjs.map +0 -0
- /package/dist/esm/{core/account → account}/Ed25519Account.mjs.map +0 -0
- /package/dist/esm/{chunk-E7FWVXGX.mjs.map → account/EphemeralKeyPair.mjs.map} +0 -0
- /package/dist/esm/{chunk-MLWIHWNH.mjs.map → account/KeylessAccount.mjs.map} +0 -0
- /package/dist/esm/{chunk-R7G3CLRI.mjs.map → account/MultiKeyAccount.mjs.map} +0 -0
- /package/dist/esm/{core/account → account}/SingleKeyAccount.mjs.map +0 -0
- /package/dist/esm/{chunk-UVSRX4SV.mjs.map → account/index.mjs.map} +0 -0
- /package/dist/esm/{chunk-TBMAJ6AW.mjs.map → chunk-3FVRXELT.mjs.map} +0 -0
- /package/dist/esm/{chunk-DMKUAQB7.mjs.map → chunk-3VGX3TXH.mjs.map} +0 -0
- /package/dist/esm/{chunk-CU67XZNB.mjs.map → chunk-52ECIIIH.mjs.map} +0 -0
- /package/dist/esm/{chunk-MFKMAAWA.mjs.map → chunk-6LOTZ4GY.mjs.map} +0 -0
- /package/dist/esm/{chunk-QIAHBEEW.mjs.map → chunk-6RBUXB5I.mjs.map} +0 -0
- /package/dist/esm/{chunk-NPFNYP75.mjs.map → chunk-7STYQ5ZE.mjs.map} +0 -0
- /package/dist/esm/{chunk-PZGLV5UQ.mjs.map → chunk-7WJTKYRG.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZYYK3UXP.mjs.map → chunk-C3L4ETUF.mjs.map} +0 -0
- /package/dist/esm/{chunk-CTIN3GTP.mjs.map → chunk-CLVAGDXO.mjs.map} +0 -0
- /package/dist/esm/{chunk-WFZDFFBM.mjs.map → chunk-COW5IGYC.mjs.map} +0 -0
- /package/dist/esm/{chunk-FS3NSGBF.mjs.map → chunk-EB7AI4B4.mjs.map} +0 -0
- /package/dist/esm/{chunk-YU3KB3UV.mjs.map → chunk-EKABTHUZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-SG4MAOCF.mjs.map → chunk-FKSACFCB.mjs.map} +0 -0
- /package/dist/esm/{chunk-MACC2BLE.mjs.map → chunk-H3TFQ7K4.mjs.map} +0 -0
- /package/dist/esm/{chunk-UML2VQZT.mjs.map → chunk-HGZGTBA4.mjs.map} +0 -0
- /package/dist/esm/{chunk-XO3HHRJV.mjs.map → chunk-HXSW6X7K.mjs.map} +0 -0
- /package/dist/esm/{chunk-VVIG4E7Q.mjs.map → chunk-IXYXFDJZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-UFT7US42.mjs.map → chunk-J7J7ZTBF.mjs.map} +0 -0
- /package/dist/esm/{chunk-DSTKXJMA.mjs.map → chunk-MGOHPDX4.mjs.map} +0 -0
- /package/dist/esm/{chunk-BWFJHFBQ.mjs.map → chunk-MWUJCP27.mjs.map} +0 -0
- /package/dist/esm/{chunk-QTRYMRYK.mjs.map → chunk-NC5HHEEM.mjs.map} +0 -0
- /package/dist/esm/{chunk-AU6W5OIH.mjs.map → chunk-NNIHTVLA.mjs.map} +0 -0
- /package/dist/esm/{chunk-NNQJBFRB.mjs.map → chunk-NNW6HWIO.mjs.map} +0 -0
- /package/dist/esm/{chunk-G2O323HP.mjs.map → chunk-O34EOOVF.mjs.map} +0 -0
- /package/dist/esm/{chunk-U43IJHQN.mjs.map → chunk-PFFAQZHT.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZZZZVONX.mjs.map → chunk-PINF6ZWP.mjs.map} +0 -0
- /package/dist/esm/{chunk-7QJ6YJXP.mjs.map → chunk-QHVZL3LZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-DPV25ZKR.mjs.map → chunk-QNHDS64I.mjs.map} +0 -0
- /package/dist/esm/{chunk-O2F53NKI.mjs.map → chunk-RBPGL6YB.mjs.map} +0 -0
- /package/dist/esm/{chunk-DM44OGQH.mjs.map → chunk-RJ4PSGZ4.mjs.map} +0 -0
- /package/dist/esm/{chunk-V3Q2KXJU.mjs.map → chunk-SRPTQ4VV.mjs.map} +0 -0
- /package/dist/esm/{chunk-R5QUBEH6.mjs.map → chunk-STYDBDYL.mjs.map} +0 -0
- /package/dist/esm/{chunk-IOSQVDZI.mjs.map → chunk-T23OVRNF.mjs.map} +0 -0
- /package/dist/esm/{chunk-RIUZPGI5.mjs.map → chunk-TICM455H.mjs.map} +0 -0
- /package/dist/esm/{chunk-3WUGR46O.mjs.map → chunk-TXMPXZBG.mjs.map} +0 -0
- /package/dist/esm/{chunk-W4ZW7QHA.mjs.map → chunk-UGIJHLL3.mjs.map} +0 -0
- /package/dist/esm/{chunk-O4JRPZZM.mjs.map → chunk-UVOU6BW2.mjs.map} +0 -0
- /package/dist/esm/{chunk-GSD4OOM3.mjs.map → chunk-V7P6MLSY.mjs.map} +0 -0
- /package/dist/esm/{chunk-V6OS74OS.mjs.map → chunk-VJJN3GFD.mjs.map} +0 -0
- /package/dist/esm/{chunk-5P2S2SZZ.mjs.map → chunk-XMFPKHB5.mjs.map} +0 -0
- /package/dist/esm/{chunk-RHBCVCOS.mjs.map → chunk-ZNEBMSNC.mjs.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k}from"../../chunk-ZM436N3W.mjs";import"../../chunk-EKABTHUZ.mjs";import"../../chunk-PFFAQZHT.mjs";import"../../chunk-TICM455H.mjs";import"../../chunk-6SHLLRJA.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-QHVZL3LZ.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-UGIJHLL3.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-OZC3FCJP.mjs";import"../../chunk-D22EMNIY.mjs";import"../../chunk-3OELNIC6.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-ROXFCLDT.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-32355KGV.mjs";import"../../chunk-7PSX4LCV.mjs";import"../../chunk-25N7RLBW.mjs";import"../../chunk-NMECYE3D.mjs";import"../../chunk-C5UVSNZW.mjs";import"../../chunk-XCR3YNHW.mjs";import"../../chunk-PJXRQBF6.mjs";import"../../chunk-JVKMQ64G.mjs";import"../../chunk-56NB52W6.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-52ECIIIH.mjs";import"../../chunk-NC5HHEEM.mjs";import"../../chunk-IXYXFDJZ.mjs";import"../../chunk-NNIHTVLA.mjs";import"../../chunk-7WJTKYRG.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-RJ4PSGZ4.mjs";import"../../chunk-3VGX3TXH.mjs";import"../../chunk-ZNEBMSNC.mjs";import"../../chunk-O34EOOVF.mjs";import"../../chunk-XN4SQWI5.mjs";import"../../chunk-MWUJCP27.mjs";import"../../chunk-MGOHPDX4.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-YE5B2S5L.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-HXSW6X7K.mjs";import"../../chunk-NGNETNK2.mjs";import"../../chunk-H6LYW7HG.mjs";import"../../chunk-6456EI2E.mjs";import"../../chunk-FLYEALDB.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-UVOU6BW2.mjs";import"../../chunk-HCGWCB5E.mjs";import"../../chunk-OBEVVLF7.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-COW5IGYC.mjs";import"../../chunk-STYDBDYL.mjs";import"../../chunk-3U5VRZLS.mjs";import"../../chunk-7STYQ5ZE.mjs";import"../../chunk-T23OVRNF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-EB7AI4B4.mjs";import"../../chunk-6RBUXB5I.mjs";import"../../chunk-C3L4ETUF.mjs";import"../../chunk-3FVRXELT.mjs";import"../../chunk-OKRUEVF3.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-TVRJ3M7B.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{f as buildTransaction,e as generateRawTransaction,i as generateSignedTransaction,g as generateSignedTransactionForSimulation,a as generateTransactionPayload,b as generateTransactionPayloadWithABI,k as generateUserTransactionHash,c as generateViewFunctionPayload,d as generateViewFunctionPayloadWithABI,h as getAuthenticatorForSimulation,j as hashValues};
|
|
2
2
|
//# sourceMappingURL=transactionBuilder.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s}from"../../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s}from"../../chunk-3VGX3TXH.mjs";import"../../chunk-MGOHPDX4.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-HXSW6X7K.mjs";import"../../chunk-NGNETNK2.mjs";import"../../chunk-H6LYW7HG.mjs";import"../../chunk-6456EI2E.mjs";import"../../chunk-FLYEALDB.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-UVOU6BW2.mjs";import"../../chunk-HCGWCB5E.mjs";import"../../chunk-OBEVVLF7.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-COW5IGYC.mjs";import"../../chunk-STYDBDYL.mjs";import"../../chunk-3U5VRZLS.mjs";import"../../chunk-7STYQ5ZE.mjs";import"../../chunk-T23OVRNF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-EB7AI4B4.mjs";import"../../chunk-6RBUXB5I.mjs";import"../../chunk-C3L4ETUF.mjs";import"../../chunk-3FVRXELT.mjs";import"../../chunk-OKRUEVF3.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-TVRJ3M7B.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{o as StructTag,a as TypeTag,i as TypeTagAddress,b as TypeTagBool,l as TypeTagGeneric,k as TypeTagReference,j as TypeTagSigner,n as TypeTagStruct,g as TypeTagU128,d as TypeTagU16,h as TypeTagU256,e as TypeTagU32,f as TypeTagU64,c as TypeTagU8,m as TypeTagVector,p as aptosCoinStructTag,s as objectStructTag,r as optionStructTag,q as stringStructTag};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c}from"../../chunk-
|
|
1
|
+
import{a,b,c}from"../../chunk-PFFAQZHT.mjs";import"../../chunk-3VGX3TXH.mjs";import"../../chunk-MGOHPDX4.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-HXSW6X7K.mjs";import"../../chunk-NGNETNK2.mjs";import"../../chunk-H6LYW7HG.mjs";import"../../chunk-6456EI2E.mjs";import"../../chunk-FLYEALDB.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-UVOU6BW2.mjs";import"../../chunk-HCGWCB5E.mjs";import"../../chunk-OBEVVLF7.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-COW5IGYC.mjs";import"../../chunk-STYDBDYL.mjs";import"../../chunk-3U5VRZLS.mjs";import"../../chunk-7STYQ5ZE.mjs";import"../../chunk-T23OVRNF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-EB7AI4B4.mjs";import"../../chunk-6RBUXB5I.mjs";import"../../chunk-C3L4ETUF.mjs";import"../../chunk-3FVRXELT.mjs";import"../../chunk-OKRUEVF3.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-TVRJ3M7B.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{b as TypeTagParserError,a as TypeTagParserErrorType,c as parseTypeTag};
|
|
2
2
|
//# sourceMappingURL=parser.mjs.map
|
|
@@ -2,11 +2,11 @@ import { AptosConfig } from '../api/aptosConfig.mjs';
|
|
|
2
2
|
import { MoveVector, MoveOption, MoveString } from '../bcs/serializable/moveStructs.mjs';
|
|
3
3
|
import { Bool, U8, U16, U32, U64, U128, U256 } from '../bcs/serializable/movePrimitives.mjs';
|
|
4
4
|
import { FixedBytes } from '../bcs/serializable/fixedBytes.mjs';
|
|
5
|
-
import { AccountAuthenticator } from './authenticator/account.mjs';
|
|
6
|
-
import { AnyNumber, MoveFunctionId, HexInput, MoveFunctionGenericTypeParam } from '../types/index.mjs';
|
|
7
5
|
import { AccountAddress, AccountAddressInput } from '../core/accountAddress.mjs';
|
|
6
|
+
import { AnyNumber, MoveFunctionId, HexInput, MoveFunctionGenericTypeParam } from '../types/index.mjs';
|
|
8
7
|
import { P as PublicKey } from '../publicKey-lq5djCIY.mjs';
|
|
9
8
|
import { RawTransaction, MultiAgentRawTransaction, FeePayerRawTransaction } from './instances/rawTransaction.mjs';
|
|
9
|
+
import { AccountAuthenticator } from './authenticator/account.mjs';
|
|
10
10
|
import { TransactionPayloadEntryFunction, TransactionPayloadScript, TransactionPayloadMultiSig } from './instances/transactionPayload.mjs';
|
|
11
11
|
import { SimpleTransaction } from './instances/simpleTransaction.mjs';
|
|
12
12
|
import { MultiAgentTransaction } from './instances/multiAgentTransaction.mjs';
|
|
@@ -21,15 +21,15 @@ import '../core/hex.mjs';
|
|
|
21
21
|
import '../core/common.mjs';
|
|
22
22
|
import '../bcs/deserializer.mjs';
|
|
23
23
|
import './instances/transactionArgument.mjs';
|
|
24
|
+
import '../core/crypto/signature.mjs';
|
|
25
|
+
import './instances/chainId.mjs';
|
|
26
|
+
import './instances/identifier.mjs';
|
|
27
|
+
import './instances/moduleId.mjs';
|
|
24
28
|
import '../core/crypto/ed25519.mjs';
|
|
25
29
|
import '../core/crypto/privateKey.mjs';
|
|
26
|
-
import '../core/crypto/signature.mjs';
|
|
27
30
|
import '../core/crypto/multiEd25519.mjs';
|
|
28
31
|
import '../core/crypto/multiKey.mjs';
|
|
29
32
|
import '../core/crypto/singleKey.mjs';
|
|
30
|
-
import './instances/chainId.mjs';
|
|
31
|
-
import './instances/identifier.mjs';
|
|
32
|
-
import './instances/moduleId.mjs';
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
35
|
* Entry function arguments to be used when building a raw transaction using remote ABI
|
|
@@ -97,11 +97,23 @@ declare enum AccountAuthenticatorVariant {
|
|
|
97
97
|
}
|
|
98
98
|
declare enum AnyPublicKeyVariant {
|
|
99
99
|
Ed25519 = 0,
|
|
100
|
-
Secp256k1 = 1
|
|
100
|
+
Secp256k1 = 1,
|
|
101
|
+
Keyless = 3
|
|
101
102
|
}
|
|
102
103
|
declare enum AnySignatureVariant {
|
|
103
104
|
Ed25519 = 0,
|
|
104
|
-
Secp256k1 = 1
|
|
105
|
+
Secp256k1 = 1,
|
|
106
|
+
Keyless = 3
|
|
107
|
+
}
|
|
108
|
+
declare enum EphemeralPublicKeyVariant {
|
|
109
|
+
Ed25519 = 0
|
|
110
|
+
}
|
|
111
|
+
declare enum EphemeralSignatureVariant {
|
|
112
|
+
Ed25519 = 0
|
|
113
|
+
}
|
|
114
|
+
declare enum EphemeralCertificate {
|
|
115
|
+
ZkProof = 0,
|
|
116
|
+
OpenIdSignature = 1
|
|
105
117
|
}
|
|
106
118
|
/**
|
|
107
119
|
* BCS types
|
|
@@ -123,6 +135,8 @@ type AptosSettings = {
|
|
|
123
135
|
readonly fullnode?: string;
|
|
124
136
|
readonly faucet?: string;
|
|
125
137
|
readonly indexer?: string;
|
|
138
|
+
readonly pepper?: string;
|
|
139
|
+
readonly prover?: string;
|
|
126
140
|
readonly clientConfig?: ClientConfig;
|
|
127
141
|
readonly client?: Client;
|
|
128
142
|
readonly fullnodeConfig?: FullNodeConfig;
|
|
@@ -935,4 +949,4 @@ type GenerateAccountWithSingleSignerSecp256k1Key = {
|
|
|
935
949
|
};
|
|
936
950
|
type GenerateAccount = GenerateAccountWithEd25519 | GenerateAccountWithSingleSignerSecp256k1Key;
|
|
937
951
|
|
|
938
|
-
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 ClientHeadersType, type ClientRequest, type ClientResponse, type CommittedTransactionResponse, type DecodedTableData, type DeletedTableData, DeriveScheme, type DirectWriteSet, type EntryFunctionPayloadResponse, type Event, type EventGuid, type FaucetConfig, type FullNodeConfig, type GasEstimation, type GenerateAccount, type GenerateAccountWithEd25519, type GenerateAccountWithSingleSignerSecp256k1Key, type GenesisPayload, type GenesisTransactionResponse, type HexInput, type IndexerConfig, 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 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 };
|
|
952
|
+
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 ClientHeadersType, type ClientRequest, type ClientResponse, type CommittedTransactionResponse, type DecodedTableData, type DeletedTableData, DeriveScheme, type DirectWriteSet, type EntryFunctionPayloadResponse, EphemeralCertificate, EphemeralPublicKeyVariant, EphemeralSignatureVariant, type Event, type EventGuid, type FaucetConfig, type FullNodeConfig, type GasEstimation, type GenerateAccount, type GenerateAccountWithEd25519, type GenerateAccountWithSingleSignerSecp256k1Key, type GenesisPayload, type GenesisTransactionResponse, type HexInput, type IndexerConfig, 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 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,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,B,C,D,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-OKRUEVF3.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-FVA2OPG4.mjs";export{g as AccountAuthenticatorVariant,h as AnyPublicKeyVariant,i as AnySignatureVariant,D as DeriveScheme,l as EphemeralCertificate,j as EphemeralPublicKeyVariant,k as EphemeralSignatureVariant,a as MimeType,z as MoveAbility,y as MoveFunctionVisibility,A as RoleType,c as ScriptTransactionArgumentVariants,B as SigningScheme,C as SigningSchemeInput,f as TransactionAuthenticatorVariant,d as TransactionPayloadVariants,m as TransactionResponseType,e as TransactionVariants,b as TypeTagVariants,q as isBlockMetadataTransactionResponse,t as isEd25519Signature,w as isFeePayerSignature,p as isGenesisTransactionResponse,v as isMultiAgentSignature,x as isMultiEd25519Signature,n as isPendingTransactionResponse,u as isSecp256k1Signature,r as isStateCheckpointTransactionResponse,o as isUserTransactionResponse,s as isValidatorTransactionResponse};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type ProverResponse = {
|
|
2
|
+
proof: {
|
|
3
|
+
a: string;
|
|
4
|
+
b: string;
|
|
5
|
+
c: string;
|
|
6
|
+
};
|
|
7
|
+
public_inputs_hash: string;
|
|
8
|
+
training_wheels_signature: string;
|
|
9
|
+
};
|
|
10
|
+
type PepperFetchResponse = {
|
|
11
|
+
signature: string;
|
|
12
|
+
pepper: string;
|
|
13
|
+
address: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type { PepperFetchResponse, ProverResponse };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=keyless.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
declare const NetworkToIndexerAPI: Record<string, string>;
|
|
2
2
|
declare const NetworkToNodeAPI: Record<string, string>;
|
|
3
3
|
declare const NetworkToFaucetAPI: Record<string, string>;
|
|
4
|
+
declare const NetworkToPepperAPI: Record<string, string>;
|
|
5
|
+
declare const NetworkToProverAPI: Record<string, string>;
|
|
4
6
|
declare enum Network {
|
|
5
7
|
MAINNET = "mainnet",
|
|
6
8
|
TESTNET = "testnet",
|
|
7
9
|
DEVNET = "devnet",
|
|
8
|
-
RANDOMNET = "randomnet",
|
|
9
10
|
LOCAL = "local",
|
|
10
11
|
CUSTOM = "custom"
|
|
11
12
|
}
|
|
12
13
|
declare const NetworkToChainId: Record<string, number>;
|
|
13
14
|
declare const NetworkToNetworkName: Record<string, Network>;
|
|
14
15
|
|
|
15
|
-
export { Network, NetworkToChainId, NetworkToFaucetAPI, NetworkToIndexerAPI, NetworkToNetworkName, NetworkToNodeAPI };
|
|
16
|
+
export { Network, NetworkToChainId, NetworkToFaucetAPI, NetworkToIndexerAPI, NetworkToNetworkName, NetworkToNodeAPI, NetworkToPepperAPI, NetworkToProverAPI };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h}from"../chunk-32355KGV.mjs";import"../chunk-FVA2OPG4.mjs";export{f as Network,g as NetworkToChainId,c as NetworkToFaucetAPI,a as NetworkToIndexerAPI,h as NetworkToNetworkName,b as NetworkToNodeAPI,d as NetworkToPepperAPI,e as NetworkToProverAPI};
|
|
2
2
|
//# sourceMappingURL=apiEndpoints.mjs.map
|
package/dist/esm/utils/const.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h}from"../chunk-YE5B2S5L.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,4 +1,4 @@
|
|
|
1
|
-
export { Network, NetworkToChainId, NetworkToFaucetAPI, NetworkToIndexerAPI, NetworkToNetworkName, NetworkToNodeAPI } from './apiEndpoints.mjs';
|
|
1
|
+
export { Network, NetworkToChainId, NetworkToFaucetAPI, NetworkToIndexerAPI, NetworkToNetworkName, NetworkToNodeAPI, NetworkToPepperAPI, NetworkToProverAPI } from './apiEndpoints.mjs';
|
|
2
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';
|
|
3
3
|
export { DeserializableClass, normalizeBundle } from './normalizeBundle.mjs';
|
|
4
4
|
import '../bcs/deserializer.mjs';
|
package/dist/esm/utils/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunk-GED6IT3S.mjs";import{a as
|
|
1
|
+
import"../chunk-GED6IT3S.mjs";import{a as q}from"../chunk-ROXFCLDT.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n,g as o,h as p}from"../chunk-32355KGV.mjs";import{a,b,c,d,e,f,g,h}from"../chunk-YE5B2S5L.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-EB7AI4B4.mjs";import"../chunk-6RBUXB5I.mjs";import"../chunk-C3L4ETUF.mjs";import"../chunk-3FVRXELT.mjs";import"../chunk-OKRUEVF3.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-6IFMQ5AS.mjs";import"../chunk-TVRJ3M7B.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{e as APTOS_COIN,a as AptosApiType,b as DEFAULT_MAX_GAS_AMOUNT,c as DEFAULT_TXN_EXP_SEC_FROM_NOW,d as DEFAULT_TXN_TIMEOUT_SEC,n as Network,o as NetworkToChainId,k as NetworkToFaucetAPI,i as NetworkToIndexerAPI,p as NetworkToNetworkName,j as NetworkToNodeAPI,l as NetworkToPepperAPI,m as NetworkToProverAPI,h as ProcessorType,f as RAW_TRANSACTION_SALT,g as RAW_TRANSACTION_WITH_DATA_SALT,q as normalizeBundle};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-ROXFCLDT.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-
|
|
1
|
+
import{a}from"../chunk-ROXFCLDT.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-EB7AI4B4.mjs";import"../chunk-6RBUXB5I.mjs";import"../chunk-C3L4ETUF.mjs";import"../chunk-3FVRXELT.mjs";import"../chunk-OKRUEVF3.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-6IFMQ5AS.mjs";import"../chunk-TVRJ3M7B.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{a as normalizeBundle};
|
|
2
2
|
//# sourceMappingURL=normalizeBundle.mjs.map
|
package/dist/esm/version.d.mts
CHANGED
package/dist/esm/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-7PSX4LCV.mjs";import"./chunk-FVA2OPG4.mjs";export{a as VERSION};
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/package.json
CHANGED
|
@@ -53,8 +53,12 @@
|
|
|
53
53
|
"@noble/hashes": "^1.4.0",
|
|
54
54
|
"@scure/bip32": "^1.4.0",
|
|
55
55
|
"@scure/bip39": "^1.3.0",
|
|
56
|
+
"base-64": "^1.0.0",
|
|
57
|
+
"eventemitter3": "^5.0.1",
|
|
56
58
|
"form-data": "^4.0.0",
|
|
57
|
-
"
|
|
59
|
+
"jose": "^5.1.3",
|
|
60
|
+
"jwt-decode": "^4.0.0",
|
|
61
|
+
"poseidon-lite": "^0.2.0"
|
|
58
62
|
},
|
|
59
63
|
"devDependencies": {
|
|
60
64
|
"@babel/traverse": "^7.23.6",
|
|
@@ -63,6 +67,7 @@
|
|
|
63
67
|
"@graphql-codegen/typescript": "^4.0.1",
|
|
64
68
|
"@graphql-codegen/typescript-graphql-request": "^6.0.1",
|
|
65
69
|
"@graphql-codegen/typescript-operations": "^4.0.1",
|
|
70
|
+
"@types/base-64": "^1.0.2",
|
|
66
71
|
"@types/jest": "^29.5.11",
|
|
67
72
|
"@types/node": "^20.10.4",
|
|
68
73
|
"@typescript-eslint/eslint-plugin": "^6.14.0",
|
|
@@ -85,5 +90,5 @@
|
|
|
85
90
|
"typedoc": "^0.25.4",
|
|
86
91
|
"typescript": "^5.3.3"
|
|
87
92
|
},
|
|
88
|
-
"version": "1.
|
|
93
|
+
"version": "1.14.0-zeta.0"
|
|
89
94
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type { AccountAuthenticator } from "
|
|
2
|
-
import { HexInput, SigningScheme, SigningSchemeInput } from "
|
|
3
|
-
import type { AccountAddress, AccountAddressInput } from "../accountAddress";
|
|
4
|
-
import { AuthenticationKey } from "../authenticationKey";
|
|
5
|
-
import { AccountPublicKey, Ed25519PrivateKey, PrivateKey, Signature, VerifySignatureArgs } from "../crypto";
|
|
1
|
+
import type { AccountAuthenticator } from "../transactions/authenticator/account";
|
|
2
|
+
import { HexInput, SigningScheme, SigningSchemeInput } from "../types";
|
|
3
|
+
import type { AccountAddress, AccountAddressInput } from "../core/accountAddress";
|
|
4
|
+
import { AuthenticationKey } from "../core/authenticationKey";
|
|
5
|
+
import { AccountPublicKey, Ed25519PrivateKey, PrivateKey, Signature, VerifySignatureArgs } from "../core/crypto";
|
|
6
6
|
import { Ed25519Account } from "./Ed25519Account";
|
|
7
7
|
import { SingleKeyAccount } from "./SingleKeyAccount";
|
|
8
|
+
import { AnyRawTransaction } from "../transactions/types";
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Arguments for creating an `Ed25519Account` from an `Ed25519PrivateKey`.
|
|
@@ -106,13 +107,6 @@ export interface PrivateKeyFromDerivationPathArgs {
|
|
|
106
107
|
* Note: Generating an account instance does not create the account on-chain.
|
|
107
108
|
*/
|
|
108
109
|
export abstract class Account {
|
|
109
|
-
/**
|
|
110
|
-
* Private key associated with the account.
|
|
111
|
-
* Note: this will be removed in the next major release,
|
|
112
|
-
* as not all accounts have a private key.
|
|
113
|
-
*/
|
|
114
|
-
abstract readonly privateKey: PrivateKey;
|
|
115
|
-
|
|
116
110
|
/**
|
|
117
111
|
* Public key associated with the account
|
|
118
112
|
*/
|
|
@@ -229,15 +223,31 @@ export abstract class Account {
|
|
|
229
223
|
abstract signWithAuthenticator(message: HexInput): AccountAuthenticator;
|
|
230
224
|
|
|
231
225
|
/**
|
|
232
|
-
* Sign
|
|
226
|
+
* Sign a transaction using the available signing capabilities.
|
|
227
|
+
* @param transaction the raw transaction
|
|
228
|
+
* @return the AccountAuthenticator containing the signature of the transaction, together with the account's public key
|
|
229
|
+
*/
|
|
230
|
+
abstract signTransactionWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticator;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Sign the given message using the available signing capabilities.
|
|
233
234
|
* @param message in HexInput format
|
|
234
|
-
* @returns
|
|
235
|
+
* @returns Signature
|
|
235
236
|
*/
|
|
236
237
|
abstract sign(message: HexInput): Signature;
|
|
237
238
|
|
|
238
239
|
/**
|
|
240
|
+
* Sign the given transaction using the available signing capabilities.
|
|
241
|
+
* @param transaction the transaction to be signed
|
|
242
|
+
* @returns Signature
|
|
243
|
+
*/
|
|
244
|
+
abstract signTransaction(transaction: AnyRawTransaction): Signature;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Verify the given message and signature with the public key.
|
|
239
248
|
* @param args.message raw message data in HexInput format
|
|
240
|
-
* @param args.signature signed message
|
|
249
|
+
* @param args.signature signed message Signature
|
|
250
|
+
* @returns
|
|
241
251
|
*/
|
|
242
252
|
verifySignature(args: VerifySignatureArgs): boolean {
|
|
243
253
|
return this.publicKey.verifySignature(args);
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { AccountAuthenticatorEd25519 } from "
|
|
2
|
-
import { HexInput, SigningScheme } from "
|
|
3
|
-
import { AccountAddress, AccountAddressInput } from "../accountAddress";
|
|
4
|
-
import { Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature } from "../crypto";
|
|
1
|
+
import { AccountAuthenticatorEd25519 } from "../transactions/authenticator/account";
|
|
2
|
+
import { HexInput, SigningScheme } from "../types";
|
|
3
|
+
import { AccountAddress, AccountAddressInput } from "../core/accountAddress";
|
|
4
|
+
import { Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature } from "../core/crypto";
|
|
5
5
|
import type { Account } from "./Account";
|
|
6
|
+
import { AnyRawTransaction } from "../transactions/types";
|
|
7
|
+
import { generateSigningMessageForTransaction } from "../transactions/transactionBuilder/signingMessage";
|
|
6
8
|
|
|
7
9
|
export interface Ed25519SignerConstructorArgs {
|
|
8
10
|
privateKey: Ed25519PrivateKey;
|
|
@@ -71,17 +73,51 @@ export class Ed25519Account implements Account {
|
|
|
71
73
|
|
|
72
74
|
// region Account
|
|
73
75
|
|
|
76
|
+
/**
|
|
77
|
+
* Verify the given message and signature with the public key.
|
|
78
|
+
*
|
|
79
|
+
* @param args.message raw message data in HexInput format
|
|
80
|
+
* @param args.signature signed message Signature
|
|
81
|
+
* @returns
|
|
82
|
+
*/
|
|
74
83
|
verifySignature(args: VerifyEd25519SignatureArgs): boolean {
|
|
75
84
|
return this.publicKey.verifySignature(args);
|
|
76
85
|
}
|
|
77
86
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
87
|
+
/**
|
|
88
|
+
* Sign a message using the account's Ed25519 private key.
|
|
89
|
+
* @param message the signing message, as binary input
|
|
90
|
+
* @return the AccountAuthenticator containing the signature, together with the account's public key
|
|
91
|
+
*/
|
|
92
|
+
signWithAuthenticator(message: HexInput): AccountAuthenticatorEd25519 {
|
|
93
|
+
return new AccountAuthenticatorEd25519(this.publicKey, this.privateKey.sign(message));
|
|
81
94
|
}
|
|
82
95
|
|
|
83
|
-
|
|
84
|
-
|
|
96
|
+
/**
|
|
97
|
+
* Sign a transaction using the account's Ed25519 private key.
|
|
98
|
+
* @param transaction the raw transaction
|
|
99
|
+
* @return the AccountAuthenticator containing the signature of the transaction, together with the account's public key
|
|
100
|
+
*/
|
|
101
|
+
signTransactionWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorEd25519 {
|
|
102
|
+
return new AccountAuthenticatorEd25519(this.publicKey, this.signTransaction(transaction));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Sign the given message using the account's Ed25519 private key.
|
|
107
|
+
* @param message in HexInput format
|
|
108
|
+
* @returns Signature
|
|
109
|
+
*/
|
|
110
|
+
sign(message: HexInput): Ed25519Signature {
|
|
111
|
+
return this.privateKey.sign(message);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Sign the given transaction using the available signing capabilities.
|
|
116
|
+
* @param transaction the transaction to be signed
|
|
117
|
+
* @returns Signature
|
|
118
|
+
*/
|
|
119
|
+
signTransaction(transaction: AnyRawTransaction): Ed25519Signature {
|
|
120
|
+
return this.sign(generateSigningMessageForTransaction(transaction));
|
|
85
121
|
}
|
|
86
122
|
|
|
87
123
|
// endregion
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
// Copyright © Aptos Foundation
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import { randomBytes } from "@noble/hashes/utils";
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
EPK_HORIZON_SECS,
|
|
8
|
+
Ed25519PrivateKey,
|
|
9
|
+
EphemeralPublicKey,
|
|
10
|
+
EphemeralSignature,
|
|
11
|
+
PrivateKey,
|
|
12
|
+
} from "../core/crypto";
|
|
13
|
+
import { Hex } from "../core/hex";
|
|
14
|
+
import { bytesToBigIntLE, padAndPackBytesWithLen, poseidonHash } from "../core/crypto/poseidon";
|
|
15
|
+
import { EphemeralPublicKeyVariant, HexInput, SigningSchemeInput } from "../types";
|
|
16
|
+
import { Deserializer, Serializable, Serializer } from "../bcs";
|
|
17
|
+
|
|
18
|
+
export class EphemeralKeyPair extends Serializable {
|
|
19
|
+
readonly blinder: Uint8Array;
|
|
20
|
+
|
|
21
|
+
readonly expiryDateSecs: bigint | number;
|
|
22
|
+
|
|
23
|
+
readonly nonce: string;
|
|
24
|
+
|
|
25
|
+
private privateKey: PrivateKey;
|
|
26
|
+
|
|
27
|
+
private publicKey: EphemeralPublicKey;
|
|
28
|
+
|
|
29
|
+
constructor(args: { privateKey: PrivateKey; expiryDateSecs?: bigint | number; blinder?: HexInput }) {
|
|
30
|
+
super();
|
|
31
|
+
const { privateKey, expiryDateSecs, blinder } = args;
|
|
32
|
+
this.privateKey = privateKey;
|
|
33
|
+
this.publicKey = new EphemeralPublicKey(privateKey.publicKey());
|
|
34
|
+
this.expiryDateSecs = expiryDateSecs || BigInt(floorToWholeHour(currentTimeInSeconds() + EPK_HORIZON_SECS));
|
|
35
|
+
this.blinder = blinder !== undefined ? Hex.fromHexInput(blinder).toUint8Array() : generateBlinder();
|
|
36
|
+
this.nonce = this.generateNonce();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
getPublicKey(): EphemeralPublicKey {
|
|
40
|
+
return this.publicKey;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
isExpired(): boolean {
|
|
44
|
+
const currentTimeSecs: number = Math.floor(Date.now() / 1000);
|
|
45
|
+
return currentTimeSecs > this.expiryDateSecs;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
serialize(serializer: Serializer): void {
|
|
49
|
+
serializer.serializeU32AsUleb128(this.publicKey.variant);
|
|
50
|
+
serializer.serializeBytes(this.privateKey.toUint8Array());
|
|
51
|
+
serializer.serializeU64(this.expiryDateSecs);
|
|
52
|
+
serializer.serializeFixedBytes(this.blinder);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
static deserialize(deserializer: Deserializer): EphemeralKeyPair {
|
|
56
|
+
const variantIndex = deserializer.deserializeUleb128AsU32();
|
|
57
|
+
let privateKey: PrivateKey;
|
|
58
|
+
switch (variantIndex) {
|
|
59
|
+
case EphemeralPublicKeyVariant.Ed25519:
|
|
60
|
+
privateKey = Ed25519PrivateKey.deserialize(deserializer);
|
|
61
|
+
break;
|
|
62
|
+
default:
|
|
63
|
+
throw new Error(`Unknown variant index for EphemeralPublicKey: ${variantIndex}`);
|
|
64
|
+
}
|
|
65
|
+
const expiryDateSecs = deserializer.deserializeU64();
|
|
66
|
+
const blinder = deserializer.deserializeFixedBytes(31);
|
|
67
|
+
return new EphemeralKeyPair({ privateKey, expiryDateSecs, blinder });
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
static fromBytes(bytes: Uint8Array): EphemeralKeyPair {
|
|
71
|
+
return EphemeralKeyPair.deserialize(new Deserializer(bytes));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
static generate(args?: { scheme: SigningSchemeInput }): EphemeralKeyPair {
|
|
75
|
+
let privateKey: PrivateKey;
|
|
76
|
+
|
|
77
|
+
switch (args?.scheme) {
|
|
78
|
+
case SigningSchemeInput.Ed25519:
|
|
79
|
+
default:
|
|
80
|
+
privateKey = Ed25519PrivateKey.generate();
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return new EphemeralKeyPair({ privateKey });
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
generateNonce(): string {
|
|
87
|
+
const fields = padAndPackBytesWithLen(this.publicKey.bcsToBytes(), 93);
|
|
88
|
+
fields.push(BigInt(this.expiryDateSecs));
|
|
89
|
+
fields.push(bytesToBigIntLE(this.blinder));
|
|
90
|
+
const nonceHash = poseidonHash(fields);
|
|
91
|
+
return nonceHash.toString();
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Sign the given message with the private key.
|
|
96
|
+
* *
|
|
97
|
+
* @param data in HexInput format
|
|
98
|
+
* @returns EphemeralSignature
|
|
99
|
+
*/
|
|
100
|
+
sign(data: HexInput): EphemeralSignature {
|
|
101
|
+
if (this.isExpired()) {
|
|
102
|
+
throw new Error("EphemeralKeyPair has expired")
|
|
103
|
+
}
|
|
104
|
+
return new EphemeralSignature(this.privateKey.sign(data));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function generateBlinder(): Uint8Array {
|
|
109
|
+
return randomBytes(31);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function currentTimeInSeconds(): number {
|
|
113
|
+
return Math.floor(new Date().getTime() / 1000);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function floorToWholeHour(timestampInSeconds: number): number {
|
|
117
|
+
const date = new Date(timestampInSeconds * 1000);
|
|
118
|
+
// Reset minutes and seconds to zero
|
|
119
|
+
date.setMinutes(0);
|
|
120
|
+
date.setSeconds(0);
|
|
121
|
+
date.setMilliseconds(0);
|
|
122
|
+
return Math.floor(date.getTime() / 1000);
|
|
123
|
+
}
|