@aptos-labs/ts-sdk 1.17.0-zeta.1 → 1.17.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-jP2Ua0t9.d.ts → accountAddress-ccLvlUQe.d.ts} +5 -97
- package/dist/common/chunk-KSEUZTKY.js +2 -0
- package/dist/common/chunk-KSEUZTKY.js.map +1 -0
- package/dist/common/cli/index.d.ts +1 -1
- package/dist/common/cli/index.js +1 -1
- package/dist/common/index.d.ts +117 -832
- package/dist/common/index.js +28 -28
- package/dist/common/index.js.map +1 -1
- package/dist/esm/{Ed25519Account-9zBaZEnp.d.mts → Ed25519Account-B1VMJOY2.d.mts} +1 -1
- package/dist/esm/account/Account.d.mts +2 -2
- package/dist/esm/account/Account.mjs +1 -1
- package/dist/esm/account/Ed25519Account.d.mts +2 -2
- package/dist/esm/account/Ed25519Account.mjs +1 -1
- package/dist/esm/account/MultiKeyAccount.d.mts +7 -13
- package/dist/esm/account/MultiKeyAccount.mjs +1 -1
- package/dist/esm/account/SingleKeyAccount.d.mts +2 -2
- package/dist/esm/account/SingleKeyAccount.mjs +1 -1
- package/dist/esm/account/index.d.mts +2 -9
- package/dist/esm/account/index.mjs +1 -1
- package/dist/esm/api/account.d.mts +3 -3
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.d.mts +4 -4
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +3 -12
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/aptosConfig.d.mts +0 -20
- package/dist/esm/api/aptosConfig.mjs +1 -1
- package/dist/esm/api/coin.d.mts +3 -3
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.d.mts +4 -4
- 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 +2 -2
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.d.mts +1 -1
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +2 -10
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/table.mjs +1 -1
- package/dist/esm/api/transaction.d.mts +2 -2
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.d.mts +3 -3
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.d.mts +2 -2
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.d.mts +4 -4
- 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 +3 -3
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.d.mts +3 -3
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/deserializer.d.mts +0 -32
- package/dist/esm/bcs/deserializer.mjs +1 -1
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/bcs/serializer.d.mts +0 -42
- package/dist/esm/bcs/serializer.mjs +1 -1
- package/dist/esm/{chunk-7M6OCGHL.mjs → chunk-2HF2XEHO.mjs} +2 -2
- package/dist/esm/{chunk-BO44HPGU.mjs → chunk-2X7A4HUS.mjs} +2 -2
- package/dist/esm/{chunk-EQF5MW2W.mjs → chunk-337U6Q6K.mjs} +2 -2
- package/dist/esm/{chunk-TUCCV62K.mjs → chunk-35EWRSDK.mjs} +2 -2
- package/dist/esm/{chunk-UMLUOYFK.mjs → chunk-36QXVFR5.mjs} +2 -2
- package/dist/esm/{chunk-UMLUOYFK.mjs.map → chunk-36QXVFR5.mjs.map} +1 -1
- package/dist/esm/{chunk-TCK35M7E.mjs → chunk-3BNA74V5.mjs} +2 -2
- package/dist/esm/chunk-3JPVQHOR.mjs +2 -0
- package/dist/esm/chunk-3JPVQHOR.mjs.map +1 -0
- package/dist/esm/chunk-3N6N3KOS.mjs +2 -0
- package/dist/esm/{chunk-HP6YVTTT.mjs.map → chunk-3N6N3KOS.mjs.map} +1 -1
- package/dist/esm/{chunk-IFAWCHUG.mjs → chunk-3SPIFLBZ.mjs} +2 -2
- package/dist/esm/{chunk-HJAB473N.mjs → chunk-3XFID2N4.mjs} +2 -2
- package/dist/esm/{chunk-OHZHYL3E.mjs → chunk-47IIBESV.mjs} +2 -2
- package/dist/esm/{chunk-T5YEMU53.mjs → chunk-4GWNWSZP.mjs} +2 -2
- package/dist/esm/chunk-4NHWV5AI.mjs +2 -0
- package/dist/esm/chunk-53INTTOI.mjs +2 -0
- package/dist/esm/{chunk-EFMAZTIM.mjs → chunk-5EN52MUT.mjs} +2 -2
- package/dist/esm/{chunk-QFVQSFBZ.mjs → chunk-5UKBTF7N.mjs} +2 -2
- package/dist/esm/chunk-6IFMQ5AS.mjs +2 -0
- package/dist/esm/chunk-6IFMQ5AS.mjs.map +1 -0
- package/dist/esm/{chunk-P67NJHS5.mjs → chunk-6YV3366Z.mjs} +2 -2
- package/dist/esm/{chunk-DJPYZIJY.mjs → chunk-73QJNN7O.mjs} +2 -2
- package/dist/esm/chunk-746MU2AB.mjs +2 -0
- package/dist/esm/chunk-746MU2AB.mjs.map +1 -0
- package/dist/esm/chunk-AF5WNJOP.mjs +2 -0
- package/dist/esm/{chunk-YRUF6N3U.mjs → chunk-AHW3SKT7.mjs} +2 -2
- package/dist/esm/chunk-AQAH67IV.mjs +2 -0
- package/dist/esm/chunk-B7X6PSE7.mjs +2 -0
- package/dist/esm/{chunk-5UXARGTJ.mjs → chunk-BBVIJO6X.mjs} +2 -2
- package/dist/esm/{chunk-AOCNYMMX.mjs → chunk-BCUSI3N6.mjs} +2 -2
- package/dist/esm/{chunk-WIYDJE6F.mjs → chunk-BEVXJJJF.mjs} +2 -2
- package/dist/esm/chunk-BRVWHCP3.mjs +2 -0
- package/dist/esm/{chunk-2G4IGSGM.mjs.map → chunk-BRVWHCP3.mjs.map} +1 -1
- package/dist/esm/chunk-BSVNV6SJ.mjs +2 -0
- package/dist/esm/{chunk-PBMSO6WI.mjs → chunk-CE65OKFI.mjs} +2 -2
- package/dist/esm/chunk-CEHCDA3G.mjs +2 -0
- package/dist/esm/{chunk-5C5GZJ57.mjs → chunk-CT2BQQTZ.mjs} +2 -2
- package/dist/esm/chunk-CYNQRMO5.mjs +2 -0
- package/dist/esm/chunk-CYNQRMO5.mjs.map +1 -0
- package/dist/esm/{chunk-YA4XTZNZ.mjs → chunk-CZOD4SCZ.mjs} +2 -2
- package/dist/esm/chunk-D2LNQMKD.mjs +2 -0
- package/dist/esm/chunk-D2LNQMKD.mjs.map +1 -0
- package/dist/esm/chunk-DLAIJ2UM.mjs +2 -0
- package/dist/esm/chunk-DLAIJ2UM.mjs.map +1 -0
- package/dist/esm/chunk-F7EMGK4M.mjs +2 -0
- package/dist/esm/{chunk-2H24BEJI.mjs → chunk-FAFJKSVZ.mjs} +2 -2
- package/dist/esm/{chunk-ET4WC6TJ.mjs → chunk-G2UPF44Z.mjs} +2 -2
- package/dist/esm/{chunk-ZIDLP5MI.mjs → chunk-G2XVNF2T.mjs} +2 -2
- package/dist/esm/{chunk-FGGRPEQ3.mjs → chunk-G56GPLTB.mjs} +2 -2
- package/dist/esm/{chunk-6FBKUTGF.mjs → chunk-GHYE26Q5.mjs} +2 -2
- package/dist/esm/{chunk-IXFYYWAC.mjs → chunk-GM56MMNJ.mjs} +2 -2
- package/dist/esm/{chunk-Y4E6NTAS.mjs → chunk-HLC4HAYY.mjs} +2 -2
- package/dist/esm/chunk-HYCGMFC2.mjs +2 -0
- package/dist/esm/chunk-HYCGMFC2.mjs.map +1 -0
- package/dist/esm/chunk-IENCDVPF.mjs +2 -0
- package/dist/esm/chunk-IENCDVPF.mjs.map +1 -0
- package/dist/esm/{chunk-FNFQA7NS.mjs → chunk-ISIUQQMV.mjs} +2 -2
- package/dist/esm/{chunk-KGKEU2WI.mjs → chunk-J4VNDDKJ.mjs} +2 -2
- package/dist/esm/{chunk-MNTLX37G.mjs → chunk-J4Z6XR5D.mjs} +2 -2
- package/dist/esm/{chunk-U2R36WTE.mjs → chunk-J5I4OZAS.mjs} +2 -2
- package/dist/esm/{chunk-5X5GQF3E.mjs → chunk-J6HKAEKY.mjs} +2 -2
- package/dist/esm/{chunk-YDNOKWV3.mjs → chunk-JX75UKJX.mjs} +2 -2
- package/dist/esm/{chunk-DPWEHSHH.mjs → chunk-KAGLWBIJ.mjs} +2 -2
- package/dist/esm/{chunk-ZMHGGT4E.mjs → chunk-KZZWY4YI.mjs} +2 -2
- package/dist/esm/chunk-LG7RJQ57.mjs +2 -0
- package/dist/esm/{chunk-JLXE5JF6.mjs → chunk-LGNSPATO.mjs} +2 -2
- package/dist/esm/{chunk-SNDFJWYM.mjs → chunk-MCRRHBFQ.mjs} +2 -2
- package/dist/esm/chunk-MM5VMKFE.mjs +2 -0
- package/dist/esm/chunk-MM5VMKFE.mjs.map +1 -0
- package/dist/esm/chunk-N3U47Y6Y.mjs +2 -0
- package/dist/esm/{chunk-J7HG6SQO.mjs → chunk-ND6OMSQU.mjs} +2 -2
- package/dist/esm/{chunk-TAT3K5M7.mjs → chunk-NUK6JT5I.mjs} +2 -2
- package/dist/esm/chunk-OWW6SIDP.mjs +2 -0
- package/dist/esm/chunk-OWW6SIDP.mjs.map +1 -0
- package/dist/esm/chunk-PF57EOJY.mjs +2 -0
- package/dist/esm/{chunk-ZV5MKFV7.mjs → chunk-PIVZMT5D.mjs} +2 -2
- package/dist/esm/{chunk-FR6UGCOX.mjs → chunk-PZ4SAXY7.mjs} +2 -2
- package/dist/esm/chunk-PZ4SAXY7.mjs.map +1 -0
- package/dist/esm/{chunk-F3ZVWLDH.mjs → chunk-QRS4DGP3.mjs} +2 -2
- package/dist/esm/{chunk-F3ZVWLDH.mjs.map → chunk-QRS4DGP3.mjs.map} +1 -1
- package/dist/esm/{chunk-MRUDDEJ3.mjs → chunk-R5VVKRJ2.mjs} +2 -2
- package/dist/esm/{chunk-KDLQ2V3L.mjs → chunk-RNL5TAQT.mjs} +2 -2
- package/dist/esm/chunk-ROXFCLDT.mjs +2 -0
- package/dist/esm/{chunk-R5THMTSP.mjs → chunk-RPND23OR.mjs} +2 -2
- package/dist/esm/chunk-RTSWVT2Q.mjs +2 -0
- package/dist/esm/chunk-RTSWVT2Q.mjs.map +1 -0
- package/dist/esm/{chunk-XH33BXEY.mjs → chunk-RWXHA4QZ.mjs} +2 -2
- package/dist/esm/chunk-SRDIYE3M.mjs +2 -0
- package/dist/esm/{chunk-IBN7ETCB.mjs.map → chunk-SRDIYE3M.mjs.map} +1 -1
- package/dist/esm/chunk-SUAMDMAA.mjs +2 -0
- package/dist/esm/{chunk-3SACE4I2.mjs.map → chunk-SUAMDMAA.mjs.map} +1 -1
- package/dist/esm/{chunk-XVZBWW46.mjs → chunk-T2AGN5YT.mjs} +2 -2
- package/dist/esm/{chunk-ASK3DESW.mjs → chunk-TQLED4KC.mjs} +2 -2
- package/dist/esm/{chunk-MLX6DFMR.mjs → chunk-U3YYSIIT.mjs} +2 -2
- package/dist/esm/chunk-UGPALAPN.mjs +2 -0
- package/dist/esm/chunk-UO3NZ5AH.mjs +1 -0
- package/dist/esm/chunk-UTKM2WYS.mjs +2 -0
- package/dist/esm/chunk-UTKM2WYS.mjs.map +1 -0
- package/dist/esm/chunk-UVSRX4SV.mjs +1 -0
- package/dist/esm/chunk-W33BZ6IQ.mjs +2 -0
- package/dist/esm/chunk-W33BZ6IQ.mjs.map +1 -0
- package/dist/esm/{chunk-O6QLAP7N.mjs → chunk-YR7JRJ25.mjs} +2 -2
- package/dist/esm/{chunk-3AIEYUPP.mjs → chunk-ZHCSSCC5.mjs} +2 -2
- package/dist/esm/{chunk-L5ZHZWHI.mjs → chunk-ZRKXS7XG.mjs} +2 -2
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/cli/localNode.mjs +1 -1
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.d.mts +1 -8
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.d.mts +2 -2
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.d.mts +1 -9
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/client/types.mjs +1 -1
- package/dist/esm/core/account/index.mjs +1 -1
- package/dist/esm/core/account/utils/address.mjs +1 -1
- package/dist/esm/core/account/utils/index.mjs +1 -1
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.d.mts +1 -1
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/common.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.d.mts +1 -1
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/index.d.mts +1 -7
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/multiEd25519.d.mts +1 -1
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.d.mts +1 -1
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/privateKey.d.mts +1 -1
- package/dist/esm/core/crypto/publicKey.d.mts +1 -1
- package/dist/esm/core/crypto/publicKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.d.mts +1 -1
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.d.mts +1 -1
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/crypto/utils.mjs +1 -1
- package/dist/esm/core/hex.mjs +1 -1
- package/dist/esm/core/index.d.mts +1 -7
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/index.d.mts +6 -14
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/account.d.mts +2 -2
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.d.mts +2 -2
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.d.mts +1 -1
- 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.mjs +1 -1
- package/dist/esm/internal/faucet.mjs +1 -1
- package/dist/esm/internal/fungibleAsset.d.mts +2 -2
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/table.mjs +1 -1
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.d.mts +2 -2
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/internal/view.d.mts +1 -1
- package/dist/esm/internal/view.mjs +1 -1
- package/dist/esm/transactions/authenticator/account.d.mts +1 -1
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.d.mts +1 -1
- package/dist/esm/transactions/authenticator/index.mjs +1 -1
- package/dist/esm/transactions/authenticator/transaction.d.mts +1 -1
- package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
- package/dist/esm/transactions/index.d.mts +1 -1
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/instances/chainId.mjs +1 -1
- package/dist/esm/transactions/instances/identifier.mjs +1 -1
- package/dist/esm/transactions/instances/index.d.mts +1 -1
- package/dist/esm/transactions/instances/index.mjs +1 -1
- package/dist/esm/transactions/instances/moduleId.mjs +1 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.d.mts +1 -1
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.d.mts +2 -2
- 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 +2 -2
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.d.mts +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.d.mts +1 -1
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +1 -4
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +1 -1
- 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 +1 -1
- package/dist/esm/types/index.d.mts +5 -21
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/utils/apiEndpoints.d.mts +1 -3
- package/dist/esm/utils/apiEndpoints.mjs +1 -1
- package/dist/esm/utils/const.d.mts +1 -3
- package/dist/esm/utils/const.mjs +1 -1
- package/dist/esm/utils/helpers.d.mts +1 -4
- package/dist/esm/utils/helpers.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/package.json +4 -11
- package/src/account/MultiKeyAccount.ts +0 -11
- package/src/account/index.ts +0 -2
- package/src/api/aptos.ts +0 -6
- package/src/api/aptosConfig.ts +1 -46
- package/src/bcs/deserializer.ts +0 -46
- package/src/bcs/serializer.ts +0 -58
- package/src/client/core.ts +0 -4
- package/src/client/get.ts +0 -12
- package/src/client/post.ts +0 -18
- package/src/core/crypto/index.ts +0 -2
- package/src/core/crypto/singleKey.ts +0 -11
- package/src/internal/transactionSubmission.ts +1 -6
- package/src/transactions/management/accountSequenceNumber.ts +8 -5
- package/src/transactions/transactionBuilder/signingMessage.ts +1 -4
- package/src/transactions/transactionBuilder/transactionBuilder.ts +1 -17
- package/src/types/index.ts +2 -24
- package/src/utils/apiEndpoints.ts +0 -16
- package/src/utils/const.ts +0 -2
- package/src/utils/helpers.ts +0 -22
- package/dist/common/chunk-BHKSQXUZ.js +0 -2
- package/dist/common/chunk-BHKSQXUZ.js.map +0 -1
- package/dist/esm/account/EphemeralKeyPair.d.mts +0 -90
- package/dist/esm/account/EphemeralKeyPair.mjs +0 -2
- package/dist/esm/account/KeylessAccount.d.mts +0 -206
- package/dist/esm/account/KeylessAccount.mjs +0 -2
- package/dist/esm/api/keyless.d.mts +0 -85
- package/dist/esm/api/keyless.mjs +0 -2
- package/dist/esm/api/keyless.mjs.map +0 -1
- package/dist/esm/chunk-2G4IGSGM.mjs +0 -2
- package/dist/esm/chunk-37FFZSIM.mjs +0 -2
- package/dist/esm/chunk-37FFZSIM.mjs.map +0 -1
- package/dist/esm/chunk-3IFR6T3V.mjs +0 -2
- package/dist/esm/chunk-3IFR6T3V.mjs.map +0 -1
- package/dist/esm/chunk-3RJZNUCQ.mjs +0 -2
- package/dist/esm/chunk-3SACE4I2.mjs +0 -2
- package/dist/esm/chunk-472OGHMG.mjs +0 -2
- package/dist/esm/chunk-474YDCFP.mjs +0 -2
- package/dist/esm/chunk-474YDCFP.mjs.map +0 -1
- package/dist/esm/chunk-4CUDBBTC.mjs +0 -2
- package/dist/esm/chunk-4CUDBBTC.mjs.map +0 -1
- package/dist/esm/chunk-4VPCPASN.mjs +0 -2
- package/dist/esm/chunk-4W7T4HRZ.mjs +0 -2
- package/dist/esm/chunk-4W7T4HRZ.mjs.map +0 -1
- package/dist/esm/chunk-54LCK6EN.mjs +0 -2
- package/dist/esm/chunk-54LCK6EN.mjs.map +0 -1
- package/dist/esm/chunk-5SEAQESO.mjs +0 -2
- package/dist/esm/chunk-5SEAQESO.mjs.map +0 -1
- package/dist/esm/chunk-7BW2N4IE.mjs +0 -2
- package/dist/esm/chunk-7Z6DYLCA.mjs +0 -1
- package/dist/esm/chunk-7Z6DYLCA.mjs.map +0 -1
- package/dist/esm/chunk-AQ4I7VVB.mjs +0 -1
- package/dist/esm/chunk-AQ4I7VVB.mjs.map +0 -1
- package/dist/esm/chunk-CKQ74DYE.mjs +0 -2
- package/dist/esm/chunk-CKQ74DYE.mjs.map +0 -1
- package/dist/esm/chunk-FBPNHF54.mjs +0 -2
- package/dist/esm/chunk-FIG65OJD.mjs +0 -2
- package/dist/esm/chunk-FR6UGCOX.mjs.map +0 -1
- package/dist/esm/chunk-GRHLQDHF.mjs +0 -2
- package/dist/esm/chunk-GSCM444Z.mjs +0 -2
- package/dist/esm/chunk-HP6YVTTT.mjs +0 -2
- package/dist/esm/chunk-IBDBKQMF.mjs +0 -2
- package/dist/esm/chunk-IBDBKQMF.mjs.map +0 -1
- package/dist/esm/chunk-IBN7ETCB.mjs +0 -2
- package/dist/esm/chunk-IEVABWIO.mjs +0 -2
- package/dist/esm/chunk-IEVABWIO.mjs.map +0 -1
- package/dist/esm/chunk-IT7YNITU.mjs +0 -2
- package/dist/esm/chunk-IVVWQKCF.mjs +0 -2
- package/dist/esm/chunk-IVVWQKCF.mjs.map +0 -1
- package/dist/esm/chunk-L5CPAOUM.mjs +0 -2
- package/dist/esm/chunk-L5CPAOUM.mjs.map +0 -1
- package/dist/esm/chunk-M3KFXIQ6.mjs +0 -2
- package/dist/esm/chunk-M3KFXIQ6.mjs.map +0 -1
- package/dist/esm/chunk-NMD45OTM.mjs +0 -2
- package/dist/esm/chunk-NMD45OTM.mjs.map +0 -1
- package/dist/esm/chunk-NW3WUTTD.mjs +0 -2
- package/dist/esm/chunk-Q6LFIZ3L.mjs +0 -2
- package/dist/esm/chunk-Q6LFIZ3L.mjs.map +0 -1
- package/dist/esm/chunk-SCHZ67F3.mjs +0 -2
- package/dist/esm/chunk-SCHZ67F3.mjs.map +0 -1
- package/dist/esm/chunk-TJDC5PWD.mjs +0 -2
- package/dist/esm/chunk-U5F4NL24.mjs +0 -2
- package/dist/esm/chunk-VAKWRPVP.mjs +0 -2
- package/dist/esm/chunk-VAKWRPVP.mjs.map +0 -1
- package/dist/esm/chunk-VJFCEX7W.mjs +0 -2
- package/dist/esm/chunk-VJFCEX7W.mjs.map +0 -1
- package/dist/esm/chunk-WA2NTBYY.mjs +0 -2
- package/dist/esm/chunk-XBVVP7O2.mjs +0 -2
- package/dist/esm/chunk-XBVVP7O2.mjs.map +0 -1
- package/dist/esm/chunk-YD5IB4TH.mjs +0 -2
- package/dist/esm/chunk-YD5IB4TH.mjs.map +0 -1
- package/dist/esm/chunk-YE5B2S5L.mjs +0 -2
- package/dist/esm/chunk-YE5B2S5L.mjs.map +0 -1
- package/dist/esm/chunk-YTQVMLFD.mjs +0 -2
- package/dist/esm/chunk-YTQVMLFD.mjs.map +0 -1
- package/dist/esm/core/crypto/cryptoHashable.d.mts +0 -21
- package/dist/esm/core/crypto/cryptoHashable.mjs +0 -2
- package/dist/esm/core/crypto/cryptoHashable.mjs.map +0 -1
- package/dist/esm/core/crypto/ephemeral.d.mts +0 -73
- package/dist/esm/core/crypto/ephemeral.mjs +0 -2
- package/dist/esm/core/crypto/ephemeral.mjs.map +0 -1
- package/dist/esm/core/crypto/keyless.d.mts +0 -321
- package/dist/esm/core/crypto/keyless.mjs +0 -2
- package/dist/esm/core/crypto/keyless.mjs.map +0 -1
- package/dist/esm/core/crypto/poseidon.d.mts +0 -19
- package/dist/esm/core/crypto/poseidon.mjs +0 -2
- package/dist/esm/core/crypto/poseidon.mjs.map +0 -1
- package/dist/esm/core/crypto/proof.d.mts +0 -21
- package/dist/esm/core/crypto/proof.mjs +0 -2
- package/dist/esm/core/crypto/proof.mjs.map +0 -1
- package/dist/esm/internal/keyless.d.mts +0 -73
- package/dist/esm/internal/keyless.mjs +0 -2
- package/dist/esm/internal/keyless.mjs.map +0 -1
- package/dist/esm/types/keyless.d.mts +0 -52
- package/dist/esm/types/keyless.mjs +0 -1
- package/dist/esm/types/keyless.mjs.map +0 -1
- package/src/account/EphemeralKeyPair.ts +0 -158
- package/src/account/KeylessAccount.ts +0 -360
- package/src/api/keyless.ts +0 -51
- package/src/core/crypto/cryptoHashable.ts +0 -16
- package/src/core/crypto/ephemeral.ts +0 -138
- package/src/core/crypto/keyless.ts +0 -679
- package/src/core/crypto/poseidon.ts +0 -144
- package/src/core/crypto/proof.ts +0 -16
- package/src/internal/keyless.ts +0 -121
- package/src/types/keyless.ts +0 -42
- /package/dist/esm/{chunk-7M6OCGHL.mjs.map → chunk-2HF2XEHO.mjs.map} +0 -0
- /package/dist/esm/{chunk-BO44HPGU.mjs.map → chunk-2X7A4HUS.mjs.map} +0 -0
- /package/dist/esm/{chunk-EQF5MW2W.mjs.map → chunk-337U6Q6K.mjs.map} +0 -0
- /package/dist/esm/{chunk-TUCCV62K.mjs.map → chunk-35EWRSDK.mjs.map} +0 -0
- /package/dist/esm/{chunk-TCK35M7E.mjs.map → chunk-3BNA74V5.mjs.map} +0 -0
- /package/dist/esm/{chunk-IFAWCHUG.mjs.map → chunk-3SPIFLBZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-HJAB473N.mjs.map → chunk-3XFID2N4.mjs.map} +0 -0
- /package/dist/esm/{chunk-OHZHYL3E.mjs.map → chunk-47IIBESV.mjs.map} +0 -0
- /package/dist/esm/{chunk-T5YEMU53.mjs.map → chunk-4GWNWSZP.mjs.map} +0 -0
- /package/dist/esm/{chunk-WA2NTBYY.mjs.map → chunk-4NHWV5AI.mjs.map} +0 -0
- /package/dist/esm/{chunk-472OGHMG.mjs.map → chunk-53INTTOI.mjs.map} +0 -0
- /package/dist/esm/{chunk-EFMAZTIM.mjs.map → chunk-5EN52MUT.mjs.map} +0 -0
- /package/dist/esm/{chunk-QFVQSFBZ.mjs.map → chunk-5UKBTF7N.mjs.map} +0 -0
- /package/dist/esm/{chunk-P67NJHS5.mjs.map → chunk-6YV3366Z.mjs.map} +0 -0
- /package/dist/esm/{chunk-DJPYZIJY.mjs.map → chunk-73QJNN7O.mjs.map} +0 -0
- /package/dist/esm/{chunk-FIG65OJD.mjs.map → chunk-AF5WNJOP.mjs.map} +0 -0
- /package/dist/esm/{chunk-YRUF6N3U.mjs.map → chunk-AHW3SKT7.mjs.map} +0 -0
- /package/dist/esm/{chunk-U5F4NL24.mjs.map → chunk-AQAH67IV.mjs.map} +0 -0
- /package/dist/esm/{chunk-GSCM444Z.mjs.map → chunk-B7X6PSE7.mjs.map} +0 -0
- /package/dist/esm/{chunk-5UXARGTJ.mjs.map → chunk-BBVIJO6X.mjs.map} +0 -0
- /package/dist/esm/{chunk-AOCNYMMX.mjs.map → chunk-BCUSI3N6.mjs.map} +0 -0
- /package/dist/esm/{chunk-WIYDJE6F.mjs.map → chunk-BEVXJJJF.mjs.map} +0 -0
- /package/dist/esm/{chunk-IT7YNITU.mjs.map → chunk-BSVNV6SJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-PBMSO6WI.mjs.map → chunk-CE65OKFI.mjs.map} +0 -0
- /package/dist/esm/{chunk-7BW2N4IE.mjs.map → chunk-CEHCDA3G.mjs.map} +0 -0
- /package/dist/esm/{chunk-5C5GZJ57.mjs.map → chunk-CT2BQQTZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-YA4XTZNZ.mjs.map → chunk-CZOD4SCZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-TJDC5PWD.mjs.map → chunk-F7EMGK4M.mjs.map} +0 -0
- /package/dist/esm/{chunk-2H24BEJI.mjs.map → chunk-FAFJKSVZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-ET4WC6TJ.mjs.map → chunk-G2UPF44Z.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZIDLP5MI.mjs.map → chunk-G2XVNF2T.mjs.map} +0 -0
- /package/dist/esm/{chunk-FGGRPEQ3.mjs.map → chunk-G56GPLTB.mjs.map} +0 -0
- /package/dist/esm/{chunk-6FBKUTGF.mjs.map → chunk-GHYE26Q5.mjs.map} +0 -0
- /package/dist/esm/{chunk-IXFYYWAC.mjs.map → chunk-GM56MMNJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-Y4E6NTAS.mjs.map → chunk-HLC4HAYY.mjs.map} +0 -0
- /package/dist/esm/{chunk-FNFQA7NS.mjs.map → chunk-ISIUQQMV.mjs.map} +0 -0
- /package/dist/esm/{chunk-KGKEU2WI.mjs.map → chunk-J4VNDDKJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-MNTLX37G.mjs.map → chunk-J4Z6XR5D.mjs.map} +0 -0
- /package/dist/esm/{chunk-U2R36WTE.mjs.map → chunk-J5I4OZAS.mjs.map} +0 -0
- /package/dist/esm/{chunk-5X5GQF3E.mjs.map → chunk-J6HKAEKY.mjs.map} +0 -0
- /package/dist/esm/{chunk-YDNOKWV3.mjs.map → chunk-JX75UKJX.mjs.map} +0 -0
- /package/dist/esm/{chunk-DPWEHSHH.mjs.map → chunk-KAGLWBIJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZMHGGT4E.mjs.map → chunk-KZZWY4YI.mjs.map} +0 -0
- /package/dist/esm/{chunk-FBPNHF54.mjs.map → chunk-LG7RJQ57.mjs.map} +0 -0
- /package/dist/esm/{chunk-JLXE5JF6.mjs.map → chunk-LGNSPATO.mjs.map} +0 -0
- /package/dist/esm/{chunk-SNDFJWYM.mjs.map → chunk-MCRRHBFQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-GRHLQDHF.mjs.map → chunk-N3U47Y6Y.mjs.map} +0 -0
- /package/dist/esm/{chunk-J7HG6SQO.mjs.map → chunk-ND6OMSQU.mjs.map} +0 -0
- /package/dist/esm/{chunk-TAT3K5M7.mjs.map → chunk-NUK6JT5I.mjs.map} +0 -0
- /package/dist/esm/{chunk-NW3WUTTD.mjs.map → chunk-PF57EOJY.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZV5MKFV7.mjs.map → chunk-PIVZMT5D.mjs.map} +0 -0
- /package/dist/esm/{chunk-MRUDDEJ3.mjs.map → chunk-R5VVKRJ2.mjs.map} +0 -0
- /package/dist/esm/{chunk-KDLQ2V3L.mjs.map → chunk-RNL5TAQT.mjs.map} +0 -0
- /package/dist/esm/{chunk-3RJZNUCQ.mjs.map → chunk-ROXFCLDT.mjs.map} +0 -0
- /package/dist/esm/{chunk-R5THMTSP.mjs.map → chunk-RPND23OR.mjs.map} +0 -0
- /package/dist/esm/{chunk-XH33BXEY.mjs.map → chunk-RWXHA4QZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-XVZBWW46.mjs.map → chunk-T2AGN5YT.mjs.map} +0 -0
- /package/dist/esm/{chunk-ASK3DESW.mjs.map → chunk-TQLED4KC.mjs.map} +0 -0
- /package/dist/esm/{chunk-MLX6DFMR.mjs.map → chunk-U3YYSIIT.mjs.map} +0 -0
- /package/dist/esm/{chunk-4VPCPASN.mjs.map → chunk-UGPALAPN.mjs.map} +0 -0
- /package/dist/esm/{account/EphemeralKeyPair.mjs.map → chunk-UO3NZ5AH.mjs.map} +0 -0
- /package/dist/esm/{account/KeylessAccount.mjs.map → chunk-UVSRX4SV.mjs.map} +0 -0
- /package/dist/esm/{chunk-O6QLAP7N.mjs.map → chunk-YR7JRJ25.mjs.map} +0 -0
- /package/dist/esm/{chunk-3AIEYUPP.mjs.map → chunk-ZHCSSCC5.mjs.map} +0 -0
- /package/dist/esm/{chunk-L5ZHZWHI.mjs.map → chunk-ZRKXS7XG.mjs.map} +0 -0
- /package/dist/esm/{publicKey-lq5djCIY.d.mts → publicKey-B3XRNhHO.d.mts} +0 -0
|
@@ -8,7 +8,7 @@ import { sha3_256 as sha3Hash } from "@noble/hashes/sha3";
|
|
|
8
8
|
import { RAW_TRANSACTION_SALT, RAW_TRANSACTION_WITH_DATA_SALT } from "../../utils/const";
|
|
9
9
|
import { FeePayerRawTransaction, MultiAgentRawTransaction } from "../instances";
|
|
10
10
|
import { AnyRawTransaction, AnyRawTransactionInstance } from "../types";
|
|
11
|
-
import { Serializable } from "../../bcs
|
|
11
|
+
import { Serializable } from "../../bcs";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Derive the raw transaction type - FeePayerRawTransaction or MultiAgentRawTransaction or RawTransaction
|
|
@@ -61,9 +61,6 @@ export function generateSigningMessage(bytes: Uint8Array, domainSeparator: strin
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
|
-
* @deprected
|
|
65
|
-
* Use CryptoHashable instead by having your class implement it and call hash() to get the signing message.
|
|
66
|
-
*
|
|
67
64
|
* Generates the 'signing message' form of a serilizable value. It bcs serializes the value and uses the name of
|
|
68
65
|
* its constructor as the domain separator.
|
|
69
66
|
*
|
|
@@ -9,13 +9,7 @@
|
|
|
9
9
|
import { sha3_256 as sha3Hash } from "@noble/hashes/sha3";
|
|
10
10
|
import { AptosConfig } from "../../api/aptosConfig";
|
|
11
11
|
import { AccountAddress, AccountAddressInput, Hex, PublicKey } from "../../core";
|
|
12
|
-
import {
|
|
13
|
-
AnyPublicKey,
|
|
14
|
-
AnySignature,
|
|
15
|
-
KeylessPublicKey,
|
|
16
|
-
Secp256k1PublicKey,
|
|
17
|
-
Secp256k1Signature,
|
|
18
|
-
} from "../../core/crypto";
|
|
12
|
+
import { AnyPublicKey, AnySignature, Secp256k1PublicKey, Secp256k1Signature } from "../../core/crypto";
|
|
19
13
|
import { Ed25519PublicKey, Ed25519Signature } from "../../core/crypto/ed25519";
|
|
20
14
|
import { getInfo } from "../../internal/account";
|
|
21
15
|
import { getLedgerInfo } from "../../internal/general";
|
|
@@ -451,11 +445,6 @@ export function generateSignedTransactionForSimulation(args: InputSimulateTransa
|
|
|
451
445
|
}
|
|
452
446
|
|
|
453
447
|
export function getAuthenticatorForSimulation(publicKey: PublicKey) {
|
|
454
|
-
if (publicKey instanceof KeylessPublicKey || publicKey instanceof Secp256k1PublicKey) {
|
|
455
|
-
// eslint-disable-next-line no-param-reassign
|
|
456
|
-
publicKey = new AnyPublicKey(publicKey);
|
|
457
|
-
}
|
|
458
|
-
|
|
459
448
|
// TODO add support for AnyMultiKey
|
|
460
449
|
if (publicKey instanceof AnyPublicKey) {
|
|
461
450
|
if (publicKey.publicKey instanceof Ed25519PublicKey) {
|
|
@@ -464,11 +453,6 @@ export function getAuthenticatorForSimulation(publicKey: PublicKey) {
|
|
|
464
453
|
if (publicKey.publicKey instanceof Secp256k1PublicKey) {
|
|
465
454
|
return new AccountAuthenticatorSingleKey(publicKey, new AnySignature(new Secp256k1Signature(new Uint8Array(64))));
|
|
466
455
|
}
|
|
467
|
-
if (publicKey.publicKey instanceof KeylessPublicKey) {
|
|
468
|
-
// TODO: Replace with the line below one simulation works properly for Keyless
|
|
469
|
-
// return new AccountAuthenticatorSingleKey(publicKey, new AnySignature(KeylessSignature.getSimulationSignature()));
|
|
470
|
-
return new AccountAuthenticatorSingleKey(publicKey, new AnySignature(new Ed25519Signature(new Uint8Array(64))));
|
|
471
|
-
}
|
|
472
456
|
}
|
|
473
457
|
|
|
474
458
|
// legacy code
|
package/src/types/index.ts
CHANGED
|
@@ -108,29 +108,11 @@ export enum AccountAuthenticatorVariant {
|
|
|
108
108
|
export enum AnyPublicKeyVariant {
|
|
109
109
|
Ed25519 = 0,
|
|
110
110
|
Secp256k1 = 1,
|
|
111
|
-
Keyless = 3,
|
|
112
111
|
}
|
|
113
112
|
|
|
114
113
|
export enum AnySignatureVariant {
|
|
115
114
|
Ed25519 = 0,
|
|
116
115
|
Secp256k1 = 1,
|
|
117
|
-
Keyless = 3,
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
export enum EphemeralPublicKeyVariant {
|
|
121
|
-
Ed25519 = 0,
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export enum EphemeralSignatureVariant {
|
|
125
|
-
Ed25519 = 0,
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
export enum EphemeralCertificateVariant {
|
|
129
|
-
ZkProof = 0,
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export enum ZkpVariant {
|
|
133
|
-
Groth16 = 0,
|
|
134
116
|
}
|
|
135
117
|
|
|
136
118
|
/**
|
|
@@ -158,10 +140,6 @@ export type AptosSettings = {
|
|
|
158
140
|
|
|
159
141
|
readonly indexer?: string;
|
|
160
142
|
|
|
161
|
-
readonly pepper?: string;
|
|
162
|
-
|
|
163
|
-
readonly prover?: string;
|
|
164
|
-
|
|
165
143
|
readonly clientConfig?: ClientConfig;
|
|
166
144
|
|
|
167
145
|
readonly client?: Client;
|
|
@@ -322,9 +300,9 @@ export type GasEstimation = {
|
|
|
322
300
|
prioritized_gas_estimate?: number;
|
|
323
301
|
};
|
|
324
302
|
|
|
325
|
-
export type MoveResource
|
|
303
|
+
export type MoveResource = {
|
|
326
304
|
type: MoveStructId;
|
|
327
|
-
data:
|
|
305
|
+
data: {};
|
|
328
306
|
};
|
|
329
307
|
|
|
330
308
|
export type AccountData = {
|
|
@@ -22,22 +22,6 @@ export const NetworkToFaucetAPI: Record<string, string> = {
|
|
|
22
22
|
local: "http://127.0.0.1:8081",
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
export const NetworkToPepperAPI: Record<string, string> = {
|
|
26
|
-
mainnet: "https://api.mainnet.aptoslabs.com/keyless/pepper/v0",
|
|
27
|
-
testnet: "https://api.testnet.aptoslabs.com/keyless/pepper/v0",
|
|
28
|
-
devnet: "https://api.devnet.aptoslabs.com/keyless/pepper/v0",
|
|
29
|
-
// Use the devnet service for local environment
|
|
30
|
-
local: "https://api.devnet.aptoslabs.com/keyless/pepper/v0",
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export const NetworkToProverAPI: Record<string, string> = {
|
|
34
|
-
mainnet: "https://api.mainnet.aptoslabs.com/keyless/prover/v0",
|
|
35
|
-
testnet: "https://api.testnet.aptoslabs.com/keyless/prover/v0",
|
|
36
|
-
devnet: "https://api.devnet.aptoslabs.com/keyless/prover/v0",
|
|
37
|
-
// Use the devnet service for local environment
|
|
38
|
-
local: "https://api.devnet.aptoslabs.com/keyless/prover/v0",
|
|
39
|
-
};
|
|
40
|
-
|
|
41
25
|
export enum Network {
|
|
42
26
|
MAINNET = "mainnet",
|
|
43
27
|
TESTNET = "testnet",
|
package/src/utils/const.ts
CHANGED
package/src/utils/helpers.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
// Copyright © Aptos Foundation
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import { decode } from "js-base64";
|
|
5
|
-
|
|
6
4
|
/**
|
|
7
5
|
* Sleep the current thread for the given amount of time
|
|
8
6
|
* @param timeMs time in milliseconds to sleep
|
|
@@ -12,23 +10,3 @@ export async function sleep(timeMs: number): Promise<null> {
|
|
|
12
10
|
setTimeout(resolve, timeMs);
|
|
13
11
|
});
|
|
14
12
|
}
|
|
15
|
-
|
|
16
|
-
export const nowInSeconds = () => Math.floor(Date.now() / 1000);
|
|
17
|
-
|
|
18
|
-
export function floorToWholeHour(timestampInSeconds: number): number {
|
|
19
|
-
const date = new Date(timestampInSeconds * 1000);
|
|
20
|
-
// Reset minutes and seconds to zero
|
|
21
|
-
date.setMinutes(0);
|
|
22
|
-
date.setSeconds(0);
|
|
23
|
-
date.setMilliseconds(0);
|
|
24
|
-
return Math.floor(date.getTime() / 1000);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export function base64UrlDecode(base64Url: string): string {
|
|
28
|
-
// Replace base64url-specific characters
|
|
29
|
-
const base64 = base64Url.replace(/-/g, "+").replace(/_/g, "/");
|
|
30
|
-
// Pad the string with '=' characters if needed
|
|
31
|
-
const paddedBase64 = base64 + "==".substring(0, (3 - (base64.length % 3)) % 3);
|
|
32
|
-
const decodedString = decode(paddedBase64);
|
|
33
|
-
return decodedString;
|
|
34
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var d=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var l=(o,e,t,r)=>{for(var n=r>1?void 0:r?i(e,t):e,s=o.length-1,c;s>=0;s--)(c=o[s])&&(n=(r?c(e,t,n):c(n))||n);return r&&n&&d(e,t,n),n};var _jsbase64 = require('js-base64');async function m(o){return new Promise(e=>{setTimeout(e,o)})}var p=()=>Math.floor(Date.now()/1e3);function f(o){let e=new Date(o*1e3);return e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),Math.floor(e.getTime()/1e3)}function b(o){let e=o.replace(/-/g,"+").replace(/_/g,"/"),t=e+"==".substring(0,(3-e.length%3)%3);return _jsbase64.decode.call(void 0, t)}exports.a = l; exports.b = m; exports.c = p; exports.d = f; exports.e = b;
|
|
2
|
-
//# sourceMappingURL=chunk-BHKSQXUZ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/helpers.ts"],"names":["decode","sleep","timeMs","resolve","nowInSeconds","floorToWholeHour","timestampInSeconds","date","base64UrlDecode","base64Url","base64","paddedBase64"],"mappings":"wMAGA,OAAS,UAAAA,MAAc,YAMvB,eAAsBC,EAAMC,EAA+B,CACzD,OAAO,IAAI,QAASC,GAAY,CAC9B,WAAWA,EAASD,CAAM,CAC5B,CAAC,CACH,CAEO,IAAME,EAAe,IAAM,KAAK,MAAM,KAAK,IAAI,EAAI,GAAI,EAEvD,SAASC,EAAiBC,EAAoC,CACnE,IAAMC,EAAO,IAAI,KAAKD,EAAqB,GAAI,EAE/C,OAAAC,EAAK,WAAW,CAAC,EACjBA,EAAK,WAAW,CAAC,EACjBA,EAAK,gBAAgB,CAAC,EACf,KAAK,MAAMA,EAAK,QAAQ,EAAI,GAAI,CACzC,CAEO,SAASC,EAAgBC,EAA2B,CAEzD,IAAMC,EAASD,EAAU,QAAQ,KAAM,GAAG,EAAE,QAAQ,KAAM,GAAG,EAEvDE,EAAeD,EAAS,KAAK,UAAU,GAAI,EAAKA,EAAO,OAAS,GAAM,CAAC,EAE7E,OADsBV,EAAOW,CAAY,CAE3C","sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { decode } from \"js-base64\";\n\n/**\n * Sleep the current thread for the given amount of time\n * @param timeMs time in milliseconds to sleep\n */\nexport async function sleep(timeMs: number): Promise<null> {\n return new Promise((resolve) => {\n setTimeout(resolve, timeMs);\n });\n}\n\nexport const nowInSeconds = () => Math.floor(Date.now() / 1000);\n\nexport function floorToWholeHour(timestampInSeconds: number): number {\n const date = new Date(timestampInSeconds * 1000);\n // Reset minutes and seconds to zero\n date.setMinutes(0);\n date.setSeconds(0);\n date.setMilliseconds(0);\n return Math.floor(date.getTime() / 1000);\n}\n\nexport function base64UrlDecode(base64Url: string): string {\n // Replace base64url-specific characters\n const base64 = base64Url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n // Pad the string with '=' characters if needed\n const paddedBase64 = base64 + \"==\".substring(0, (3 - (base64.length % 3)) % 3);\n const decodedString = decode(paddedBase64);\n return decodedString;\n}\n"]}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { Deserializer } from '../bcs/deserializer.mjs';
|
|
2
|
-
import { Serializable, Serializer } from '../bcs/serializer.mjs';
|
|
3
|
-
import { HexInput, EphemeralPublicKeyVariant } from '../types/index.mjs';
|
|
4
|
-
import { PrivateKey } from '../core/crypto/privateKey.mjs';
|
|
5
|
-
import { EphemeralPublicKey, EphemeralSignature } from '../core/crypto/ephemeral.mjs';
|
|
6
|
-
import '../core/hex.mjs';
|
|
7
|
-
import '../core/common.mjs';
|
|
8
|
-
import '../utils/apiEndpoints.mjs';
|
|
9
|
-
import '../types/indexer.mjs';
|
|
10
|
-
import '../types/generated/operations.mjs';
|
|
11
|
-
import '../types/generated/types.mjs';
|
|
12
|
-
import '../publicKey-lq5djCIY.mjs';
|
|
13
|
-
import '../core/accountAddress.mjs';
|
|
14
|
-
import '../transactions/instances/transactionArgument.mjs';
|
|
15
|
-
import '../core/crypto/signature.mjs';
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* A class which contains a key pair that is used in signing transactions via the Keyless authentication scheme. This key pair
|
|
19
|
-
* is ephemeral and has an expiration time. For more details on how this class is used -
|
|
20
|
-
* https://aptos.dev/guides/keyless-accounts/#1-present-the-user-with-a-sign-in-with-idp-button-on-the-ui
|
|
21
|
-
*/
|
|
22
|
-
declare class EphemeralKeyPair extends Serializable {
|
|
23
|
-
static readonly BLINDER_LENGTH: number;
|
|
24
|
-
/**
|
|
25
|
-
* A byte array of length BLINDER_LENGTH used to obfuscate the public key from the IdP.
|
|
26
|
-
* Used in calculating the nonce passed to the IdP and as a secret witness in proof generation.
|
|
27
|
-
*/
|
|
28
|
-
readonly blinder: Uint8Array;
|
|
29
|
-
/**
|
|
30
|
-
* A timestamp in seconds indicating when the ephemeral key pair is expired. After expiry, a new
|
|
31
|
-
* EphemeralKeyPair must be generated and a new JWT needs to be created.
|
|
32
|
-
*/
|
|
33
|
-
readonly expiryDateSecs: number;
|
|
34
|
-
/**
|
|
35
|
-
* The value passed to the IdP when the user authenticates. It comprises of a hash of the
|
|
36
|
-
* ephermeral public key, expiry date, and blinder.
|
|
37
|
-
*/
|
|
38
|
-
readonly nonce: string;
|
|
39
|
-
/**
|
|
40
|
-
* A private key used to sign transactions. This private key is not tied to any account on the chain as it
|
|
41
|
-
* is ephemeral (not permanent) in nature.
|
|
42
|
-
*/
|
|
43
|
-
private privateKey;
|
|
44
|
-
/**
|
|
45
|
-
* A public key used to verify transactions. This public key is not tied to any account on the chain as it
|
|
46
|
-
* is ephemeral (not permanent) in nature.
|
|
47
|
-
*/
|
|
48
|
-
private publicKey;
|
|
49
|
-
constructor(args: {
|
|
50
|
-
privateKey: PrivateKey;
|
|
51
|
-
expiryDateSecs?: number;
|
|
52
|
-
blinder?: HexInput;
|
|
53
|
-
});
|
|
54
|
-
/**
|
|
55
|
-
* Returns the public key of the key pair.
|
|
56
|
-
* @return EphemeralPublicKey
|
|
57
|
-
*/
|
|
58
|
-
getPublicKey(): EphemeralPublicKey;
|
|
59
|
-
/**
|
|
60
|
-
* Returns the public key of the key pair.
|
|
61
|
-
* @return boolean
|
|
62
|
-
*/
|
|
63
|
-
isExpired(): boolean;
|
|
64
|
-
serialize(serializer: Serializer): void;
|
|
65
|
-
static deserialize(deserializer: Deserializer): EphemeralKeyPair;
|
|
66
|
-
static fromBytes(bytes: Uint8Array): EphemeralKeyPair;
|
|
67
|
-
/**
|
|
68
|
-
* Returns the public key of the key pair.
|
|
69
|
-
* @param scheme the type of keypair to use for the EphemeralKeyPair. Only Ed25519 supported for now.
|
|
70
|
-
* @param expiryDateSecs the date of expiry.
|
|
71
|
-
* @return boolean
|
|
72
|
-
*/
|
|
73
|
-
static generate(args?: {
|
|
74
|
-
scheme?: EphemeralPublicKeyVariant;
|
|
75
|
-
expiryDateSecs?: number;
|
|
76
|
-
}): EphemeralKeyPair;
|
|
77
|
-
/**
|
|
78
|
-
* From the ephemeral public key, expiry timestamp, and blinder, calculate the nonce to be used at authentication via OIDC.
|
|
79
|
-
* @returns string
|
|
80
|
-
*/
|
|
81
|
-
private generateNonce;
|
|
82
|
-
/**
|
|
83
|
-
* Sign the given message with the private key.
|
|
84
|
-
* @param data in HexInput format
|
|
85
|
-
* @returns EphemeralSignature
|
|
86
|
-
*/
|
|
87
|
-
sign(data: HexInput): EphemeralSignature;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export { EphemeralKeyPair };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a}from"../chunk-474YDCFP.mjs";import"../chunk-AQ4I7VVB.mjs";import"../chunk-SNDFJWYM.mjs";import"../chunk-ZV5MKFV7.mjs";import"../chunk-4CUDBBTC.mjs";import"../chunk-BO44HPGU.mjs";import"../chunk-54LCK6EN.mjs";import"../chunk-37FFZSIM.mjs";import"../chunk-L5CPAOUM.mjs";import"../chunk-IVVWQKCF.mjs";import"../chunk-KUX6GQ2E.mjs";import"../chunk-XVZBWW46.mjs";import"../chunk-WA2NTBYY.mjs";import"../chunk-4VPCPASN.mjs";import"../chunk-TJDC5PWD.mjs";import"../chunk-LR65XHSF.mjs";import"../chunk-EFMAZTIM.mjs";import"../chunk-F3ZVWLDH.mjs";import"../chunk-YTQVMLFD.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-IBDBKQMF.mjs";import"../chunk-2G4IGSGM.mjs";import"../chunk-3SACE4I2.mjs";import"../chunk-GED6IT3S.mjs";import"../chunk-3RJZNUCQ.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-GRHLQDHF.mjs";import"../chunk-7BW2N4IE.mjs";import"../chunk-FGGRPEQ3.mjs";import"../chunk-IBN7ETCB.mjs";import"../chunk-Q6LFIZ3L.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-3IFR6T3V.mjs";import"../chunk-UMLUOYFK.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-4BJA3QUQ.mjs";import"../chunk-SCHZ67F3.mjs";import"../chunk-YE5B2S5L.mjs";import"../chunk-FVA2OPG4.mjs";export{a as EphemeralKeyPair};
|
|
2
|
-
//# sourceMappingURL=EphemeralKeyPair.mjs.map
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
import { SigningScheme, HexInput } from '../types/index.mjs';
|
|
2
|
-
import { AccountAddress } from '../core/accountAddress.mjs';
|
|
3
|
-
import { Deserializer } from '../bcs/deserializer.mjs';
|
|
4
|
-
import { Serializable, Serializer } from '../bcs/serializer.mjs';
|
|
5
|
-
import { Signature } from '../core/crypto/signature.mjs';
|
|
6
|
-
import { KeylessPublicKey, ZeroKnowledgeSig, KeylessSignature, ZkProof } from '../core/crypto/keyless.mjs';
|
|
7
|
-
import { A as Account } from '../Ed25519Account-9zBaZEnp.mjs';
|
|
8
|
-
import { EphemeralKeyPair } from './EphemeralKeyPair.mjs';
|
|
9
|
-
import { AccountAuthenticatorSingleKey } from '../transactions/authenticator/account.mjs';
|
|
10
|
-
import { AnyRawTransaction, AnyRawTransactionInstance } from '../transactions/types.mjs';
|
|
11
|
-
import { CryptoHashable, AptsoDomainSeparator } from '../core/crypto/cryptoHashable.mjs';
|
|
12
|
-
import '../utils/apiEndpoints.mjs';
|
|
13
|
-
import '../types/indexer.mjs';
|
|
14
|
-
import '../types/generated/operations.mjs';
|
|
15
|
-
import '../types/generated/types.mjs';
|
|
16
|
-
import '../core/common.mjs';
|
|
17
|
-
import '../transactions/instances/transactionArgument.mjs';
|
|
18
|
-
import '../core/hex.mjs';
|
|
19
|
-
import '../publicKey-lq5djCIY.mjs';
|
|
20
|
-
import '../core/crypto/ephemeral.mjs';
|
|
21
|
-
import '../core/crypto/proof.mjs';
|
|
22
|
-
import '../types/keyless.mjs';
|
|
23
|
-
import '../api/aptosConfig.mjs';
|
|
24
|
-
import '../utils/const.mjs';
|
|
25
|
-
import '../core/crypto/ed25519.mjs';
|
|
26
|
-
import '../core/crypto/privateKey.mjs';
|
|
27
|
-
import '../core/crypto/singleKey.mjs';
|
|
28
|
-
import '../core/crypto/multiEd25519.mjs';
|
|
29
|
-
import '../core/crypto/multiKey.mjs';
|
|
30
|
-
import '../bcs/serializable/moveStructs.mjs';
|
|
31
|
-
import '../bcs/serializable/movePrimitives.mjs';
|
|
32
|
-
import '../bcs/serializable/fixedBytes.mjs';
|
|
33
|
-
import '../transactions/instances/rawTransaction.mjs';
|
|
34
|
-
import '../transactions/instances/chainId.mjs';
|
|
35
|
-
import '../transactions/instances/transactionPayload.mjs';
|
|
36
|
-
import '../transactions/instances/identifier.mjs';
|
|
37
|
-
import '../transactions/instances/moduleId.mjs';
|
|
38
|
-
import '../transactions/typeTag/index.mjs';
|
|
39
|
-
import '../transactions/instances/simpleTransaction.mjs';
|
|
40
|
-
import '../transactions/instances/multiAgentTransaction.mjs';
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Account implementation for the Keyless authentication scheme.
|
|
44
|
-
*
|
|
45
|
-
* Used to represent a Keyless based account and sign transactions with it.
|
|
46
|
-
*
|
|
47
|
-
* Use KeylessAccount.fromJWTAndProof to instantiate a KeylessAccount with a JWT, proof and EphemeralKeyPair.
|
|
48
|
-
*
|
|
49
|
-
* When the proof expires or the JWT becomes invalid, the KeylessAccount must be instantiated again with a new JWT,
|
|
50
|
-
* EphemeralKeyPair, and corresponding proof.
|
|
51
|
-
*/
|
|
52
|
-
declare class KeylessAccount extends Serializable implements Account {
|
|
53
|
-
static readonly PEPPER_LENGTH: number;
|
|
54
|
-
/**
|
|
55
|
-
* The KeylessPublicKey associated with the account
|
|
56
|
-
*/
|
|
57
|
-
readonly publicKey: KeylessPublicKey;
|
|
58
|
-
/**
|
|
59
|
-
* The EphemeralKeyPair used to generate sign.
|
|
60
|
-
*/
|
|
61
|
-
readonly ephemeralKeyPair: EphemeralKeyPair;
|
|
62
|
-
/**
|
|
63
|
-
* The claim on the JWT to identify a user. This is typically 'sub' or 'email'.
|
|
64
|
-
*/
|
|
65
|
-
readonly uidKey: string;
|
|
66
|
-
/**
|
|
67
|
-
* The value of the uidKey claim on the JWT. This intended to be a stable user identifier.
|
|
68
|
-
*/
|
|
69
|
-
readonly uidVal: string;
|
|
70
|
-
/**
|
|
71
|
-
* The value of the 'aud' claim on the JWT, also known as client ID. This is the identifier for the dApp's
|
|
72
|
-
* OIDC registration with the identity provider.
|
|
73
|
-
*/
|
|
74
|
-
readonly aud: string;
|
|
75
|
-
/**
|
|
76
|
-
* A value contains 31 bytes of entropy that preserves privacy of the account. Typically fetched from a pepper provider.
|
|
77
|
-
*/
|
|
78
|
-
readonly pepper: Uint8Array;
|
|
79
|
-
/**
|
|
80
|
-
* Account address associated with the account
|
|
81
|
-
*/
|
|
82
|
-
readonly accountAddress: AccountAddress;
|
|
83
|
-
/**
|
|
84
|
-
* The zero knowledge signature (if ready) which contains the proof used to validate the EphemeralKeyPair.
|
|
85
|
-
*/
|
|
86
|
-
proof: ZeroKnowledgeSig | undefined;
|
|
87
|
-
/**
|
|
88
|
-
* The proof of the EphemeralKeyPair or a promise that provides the proof. This is used to allow for awaiting on
|
|
89
|
-
* fetching the proof.
|
|
90
|
-
*/
|
|
91
|
-
readonly proofOrPromise: ZeroKnowledgeSig | Promise<ZeroKnowledgeSig>;
|
|
92
|
-
/**
|
|
93
|
-
* Signing scheme used to sign transactions
|
|
94
|
-
*/
|
|
95
|
-
readonly signingScheme: SigningScheme;
|
|
96
|
-
/**
|
|
97
|
-
* The JWT token used to derive the account
|
|
98
|
-
*/
|
|
99
|
-
readonly jwt: string;
|
|
100
|
-
/**
|
|
101
|
-
* An event emitter used to assist in handling asycronous proof fetching.
|
|
102
|
-
*/
|
|
103
|
-
private readonly emitter;
|
|
104
|
-
constructor(args: {
|
|
105
|
-
address?: AccountAddress;
|
|
106
|
-
ephemeralKeyPair: EphemeralKeyPair;
|
|
107
|
-
iss: string;
|
|
108
|
-
uidKey: string;
|
|
109
|
-
uidVal: string;
|
|
110
|
-
aud: string;
|
|
111
|
-
pepper: HexInput;
|
|
112
|
-
proofOrFetcher: ZeroKnowledgeSig | Promise<ZeroKnowledgeSig>;
|
|
113
|
-
proofFetchCallback?: ProofFetchCallback;
|
|
114
|
-
jwt: string;
|
|
115
|
-
});
|
|
116
|
-
/**
|
|
117
|
-
* This initializes the asyncronous proof fetch
|
|
118
|
-
* @return
|
|
119
|
-
*/
|
|
120
|
-
init(promise: Promise<ZeroKnowledgeSig>): Promise<void>;
|
|
121
|
-
serialize(serializer: Serializer): void;
|
|
122
|
-
static deserialize(deserializer: Deserializer): KeylessAccount;
|
|
123
|
-
/**
|
|
124
|
-
* Checks if the proof is expired. If so the account must be rederived with a new EphemeralKeyPair
|
|
125
|
-
* and JWT token.
|
|
126
|
-
* @return boolean
|
|
127
|
-
*/
|
|
128
|
-
isExpired(): boolean;
|
|
129
|
-
/**
|
|
130
|
-
* Sign a message using Keyless.
|
|
131
|
-
* @param message the message to sign, as binary input
|
|
132
|
-
* @return the AccountAuthenticator containing the signature, together with the account's public key
|
|
133
|
-
*/
|
|
134
|
-
signWithAuthenticator(message: HexInput): AccountAuthenticatorSingleKey;
|
|
135
|
-
/**
|
|
136
|
-
* Sign a transaction using Keyless.
|
|
137
|
-
* @param transaction the raw transaction
|
|
138
|
-
* @return the AccountAuthenticator containing the signature of the transaction, together with the account's public key
|
|
139
|
-
*/
|
|
140
|
-
signTransactionWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorSingleKey;
|
|
141
|
-
/**
|
|
142
|
-
* Waits for asyncronous proof fetching to finish.
|
|
143
|
-
* @return
|
|
144
|
-
*/
|
|
145
|
-
waitForProofFetch(): Promise<void>;
|
|
146
|
-
/**
|
|
147
|
-
* Sign the given message using Keyless.
|
|
148
|
-
* @param message in HexInput format
|
|
149
|
-
* @returns Signature
|
|
150
|
-
*/
|
|
151
|
-
sign(data: HexInput): KeylessSignature;
|
|
152
|
-
/**
|
|
153
|
-
* Sign the given transaction with Keyless.
|
|
154
|
-
* Signs the transaction and proof to guard against proof malleability.
|
|
155
|
-
* @param transaction the transaction to be signed
|
|
156
|
-
* @returns KeylessSignature
|
|
157
|
-
*/
|
|
158
|
-
signTransaction(transaction: AnyRawTransaction): KeylessSignature;
|
|
159
|
-
verifySignature(args: {
|
|
160
|
-
message: HexInput;
|
|
161
|
-
signature: Signature;
|
|
162
|
-
}): boolean;
|
|
163
|
-
static fromBytes(bytes: Uint8Array): KeylessAccount;
|
|
164
|
-
static create(args: {
|
|
165
|
-
proof: ZeroKnowledgeSig | Promise<ZeroKnowledgeSig>;
|
|
166
|
-
jwt: string;
|
|
167
|
-
ephemeralKeyPair: EphemeralKeyPair;
|
|
168
|
-
pepper: HexInput;
|
|
169
|
-
uidKey?: string;
|
|
170
|
-
proofFetchCallback?: ProofFetchCallback;
|
|
171
|
-
}): KeylessAccount;
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* A container class to hold a transaction and a proof. It implements CryptoHashable which is used to create
|
|
175
|
-
* the signing message for Keyless transactions. We sign over the proof to ensure non-malleability.
|
|
176
|
-
*/
|
|
177
|
-
declare class TransactionAndProof extends CryptoHashable {
|
|
178
|
-
/**
|
|
179
|
-
* The transaction to sign.
|
|
180
|
-
*/
|
|
181
|
-
transaction: AnyRawTransactionInstance;
|
|
182
|
-
/**
|
|
183
|
-
* The zero knowledge proof used in signing the transaction.
|
|
184
|
-
*/
|
|
185
|
-
proof?: ZkProof;
|
|
186
|
-
/**
|
|
187
|
-
* The domain separator prefix used when hashing.
|
|
188
|
-
*/
|
|
189
|
-
domainSeparator: AptsoDomainSeparator;
|
|
190
|
-
constructor(transaction: AnyRawTransactionInstance, proof?: ZkProof);
|
|
191
|
-
serialize(serializer: Serializer): void;
|
|
192
|
-
}
|
|
193
|
-
type ProofFetchSuccess = {
|
|
194
|
-
status: "Success";
|
|
195
|
-
};
|
|
196
|
-
type ProofFetchFailure = {
|
|
197
|
-
status: "Failed";
|
|
198
|
-
error: string;
|
|
199
|
-
};
|
|
200
|
-
type ProofFetchStatus = ProofFetchSuccess | ProofFetchFailure;
|
|
201
|
-
type ProofFetchCallback = (status: ProofFetchStatus) => Promise<void>;
|
|
202
|
-
interface ProofFetchEvents {
|
|
203
|
-
proofFetchFinish: (status: ProofFetchStatus) => void;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
export { KeylessAccount, type ProofFetchCallback, type ProofFetchEvents, type ProofFetchFailure, type ProofFetchStatus, type ProofFetchSuccess, TransactionAndProof };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a,b}from"../chunk-IEVABWIO.mjs";import"../chunk-YD5IB4TH.mjs";import"../chunk-474YDCFP.mjs";import"../chunk-FR6UGCOX.mjs";import"../chunk-4NMDYPUD.mjs";import"../chunk-IT7YNITU.mjs";import"../chunk-YDNOKWV3.mjs";import"../chunk-UYVPNUH3.mjs";import"../chunk-YRUF6N3U.mjs";import"../chunk-472OGHMG.mjs";import"../chunk-FIG65OJD.mjs";import"../chunk-MLX6DFMR.mjs";import"../chunk-NW3WUTTD.mjs";import"../chunk-TUCCV62K.mjs";import"../chunk-GSCM444Z.mjs";import"../chunk-IXFYYWAC.mjs";import"../chunk-U5F4NL24.mjs";import"../chunk-HP6YVTTT.mjs";import"../chunk-RFSO3JRG.mjs";import"../chunk-AQ4I7VVB.mjs";import"../chunk-SNDFJWYM.mjs";import"../chunk-ZV5MKFV7.mjs";import"../chunk-4CUDBBTC.mjs";import"../chunk-BO44HPGU.mjs";import"../chunk-54LCK6EN.mjs";import"../chunk-37FFZSIM.mjs";import"../chunk-L5CPAOUM.mjs";import"../chunk-IVVWQKCF.mjs";import"../chunk-KUX6GQ2E.mjs";import"../chunk-XVZBWW46.mjs";import"../chunk-WA2NTBYY.mjs";import"../chunk-4VPCPASN.mjs";import"../chunk-TJDC5PWD.mjs";import"../chunk-LR65XHSF.mjs";import"../chunk-EFMAZTIM.mjs";import"../chunk-F3ZVWLDH.mjs";import"../chunk-YTQVMLFD.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-IBDBKQMF.mjs";import"../chunk-2G4IGSGM.mjs";import"../chunk-3SACE4I2.mjs";import"../chunk-GED6IT3S.mjs";import"../chunk-3RJZNUCQ.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-GRHLQDHF.mjs";import"../chunk-7BW2N4IE.mjs";import"../chunk-FGGRPEQ3.mjs";import"../chunk-IBN7ETCB.mjs";import"../chunk-Q6LFIZ3L.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-3IFR6T3V.mjs";import"../chunk-UMLUOYFK.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-4BJA3QUQ.mjs";import"../chunk-SCHZ67F3.mjs";import"../chunk-YE5B2S5L.mjs";import"../chunk-FVA2OPG4.mjs";export{a as KeylessAccount,b as TransactionAndProof};
|
|
2
|
-
//# sourceMappingURL=KeylessAccount.mjs.map
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { HexInput } from '../types/index.mjs';
|
|
2
|
-
import { AptosConfig } from './aptosConfig.mjs';
|
|
3
|
-
import { EphemeralKeyPair } from '../account/EphemeralKeyPair.mjs';
|
|
4
|
-
import { ProofFetchCallback, KeylessAccount } from '../account/KeylessAccount.mjs';
|
|
5
|
-
import '../utils/apiEndpoints.mjs';
|
|
6
|
-
import '../types/indexer.mjs';
|
|
7
|
-
import '../types/generated/operations.mjs';
|
|
8
|
-
import '../types/generated/types.mjs';
|
|
9
|
-
import '../utils/const.mjs';
|
|
10
|
-
import '../bcs/deserializer.mjs';
|
|
11
|
-
import '../bcs/serializer.mjs';
|
|
12
|
-
import '../core/hex.mjs';
|
|
13
|
-
import '../core/common.mjs';
|
|
14
|
-
import '../core/crypto/privateKey.mjs';
|
|
15
|
-
import '../publicKey-lq5djCIY.mjs';
|
|
16
|
-
import '../core/accountAddress.mjs';
|
|
17
|
-
import '../transactions/instances/transactionArgument.mjs';
|
|
18
|
-
import '../core/crypto/signature.mjs';
|
|
19
|
-
import '../core/crypto/ephemeral.mjs';
|
|
20
|
-
import '../core/crypto/keyless.mjs';
|
|
21
|
-
import '../core/crypto/proof.mjs';
|
|
22
|
-
import '../types/keyless.mjs';
|
|
23
|
-
import '../Ed25519Account-9zBaZEnp.mjs';
|
|
24
|
-
import '../transactions/authenticator/account.mjs';
|
|
25
|
-
import '../core/crypto/ed25519.mjs';
|
|
26
|
-
import '../core/crypto/multiEd25519.mjs';
|
|
27
|
-
import '../core/crypto/multiKey.mjs';
|
|
28
|
-
import '../core/crypto/singleKey.mjs';
|
|
29
|
-
import '../transactions/types.mjs';
|
|
30
|
-
import '../bcs/serializable/moveStructs.mjs';
|
|
31
|
-
import '../bcs/serializable/movePrimitives.mjs';
|
|
32
|
-
import '../bcs/serializable/fixedBytes.mjs';
|
|
33
|
-
import '../transactions/instances/rawTransaction.mjs';
|
|
34
|
-
import '../transactions/instances/chainId.mjs';
|
|
35
|
-
import '../transactions/instances/transactionPayload.mjs';
|
|
36
|
-
import '../transactions/instances/identifier.mjs';
|
|
37
|
-
import '../transactions/instances/moduleId.mjs';
|
|
38
|
-
import '../transactions/typeTag/index.mjs';
|
|
39
|
-
import '../transactions/instances/simpleTransaction.mjs';
|
|
40
|
-
import '../transactions/instances/multiAgentTransaction.mjs';
|
|
41
|
-
import '../core/crypto/cryptoHashable.mjs';
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* A class to query all `Keyless` related queries on Aptos.
|
|
45
|
-
*
|
|
46
|
-
* More documentation on how to integrate Keyless Accounts see the below
|
|
47
|
-
* https://aptos.dev/guides/keyless-accounts/#aptos-keyless-integration-guide
|
|
48
|
-
*/
|
|
49
|
-
declare class Keyless {
|
|
50
|
-
readonly config: AptosConfig;
|
|
51
|
-
constructor(config: AptosConfig);
|
|
52
|
-
/**
|
|
53
|
-
* Fetches the pepper from the Aptos pepper service API.
|
|
54
|
-
*
|
|
55
|
-
* @param args.jwt JWT token
|
|
56
|
-
* @param args.ephemeralKeyPair the EphemeralKeyPair used to generate the nonce in the JWT token
|
|
57
|
-
* @returns The pepper which is a Uint8Array of length 31.
|
|
58
|
-
*/
|
|
59
|
-
getPepper(args: {
|
|
60
|
-
jwt: string;
|
|
61
|
-
ephemeralKeyPair: EphemeralKeyPair;
|
|
62
|
-
}): Promise<Uint8Array>;
|
|
63
|
-
/**
|
|
64
|
-
* Fetches the pepper from the Aptos pepper service API.
|
|
65
|
-
*
|
|
66
|
-
* @param args.jwt JWT token
|
|
67
|
-
* @param args.ephemeralKeyPair the EphemeralKeyPair used to generate the nonce in the JWT token
|
|
68
|
-
* @param args.uidKey a key in the JWT token to use to set the uidVal in the IdCommitment
|
|
69
|
-
* @param args.pepper the pepper
|
|
70
|
-
* @param args.proofFetchCallback a callback function that if set, the fetch of the proof will be done in the background. Once
|
|
71
|
-
* fetching finishes the callback function will be called. This should be used to provide a more responsive user experience as now
|
|
72
|
-
* they are not blocked on fetching the proof. Thus the function will return much more quickly.
|
|
73
|
-
*
|
|
74
|
-
* @returns A KeylessAccount that can be used to sign transactions
|
|
75
|
-
*/
|
|
76
|
-
deriveKeylessAccount(args: {
|
|
77
|
-
jwt: string;
|
|
78
|
-
ephemeralKeyPair: EphemeralKeyPair;
|
|
79
|
-
uidKey?: string;
|
|
80
|
-
pepper?: HexInput;
|
|
81
|
-
proofFetchCallback?: ProofFetchCallback;
|
|
82
|
-
}): Promise<KeylessAccount>;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export { Keyless };
|
package/dist/esm/api/keyless.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a}from"../chunk-4W7T4HRZ.mjs";import"../chunk-5SEAQESO.mjs";import"../chunk-7Z6DYLCA.mjs";import"../chunk-QFVQSFBZ.mjs";import"../chunk-WIYDJE6F.mjs";import"../chunk-M3KFXIQ6.mjs";import"../chunk-IEVABWIO.mjs";import"../chunk-YD5IB4TH.mjs";import"../chunk-474YDCFP.mjs";import"../chunk-L5ZHZWHI.mjs";import"../chunk-FR6UGCOX.mjs";import"../chunk-4NMDYPUD.mjs";import"../chunk-IT7YNITU.mjs";import"../chunk-YDNOKWV3.mjs";import"../chunk-UYVPNUH3.mjs";import"../chunk-YRUF6N3U.mjs";import"../chunk-472OGHMG.mjs";import"../chunk-FIG65OJD.mjs";import"../chunk-MLX6DFMR.mjs";import"../chunk-NW3WUTTD.mjs";import"../chunk-TUCCV62K.mjs";import"../chunk-GSCM444Z.mjs";import"../chunk-IXFYYWAC.mjs";import"../chunk-U5F4NL24.mjs";import"../chunk-HP6YVTTT.mjs";import"../chunk-RFSO3JRG.mjs";import"../chunk-AQ4I7VVB.mjs";import"../chunk-SNDFJWYM.mjs";import"../chunk-ZV5MKFV7.mjs";import"../chunk-4CUDBBTC.mjs";import"../chunk-BO44HPGU.mjs";import"../chunk-54LCK6EN.mjs";import"../chunk-37FFZSIM.mjs";import"../chunk-L5CPAOUM.mjs";import"../chunk-IVVWQKCF.mjs";import"../chunk-KUX6GQ2E.mjs";import"../chunk-XVZBWW46.mjs";import"../chunk-WA2NTBYY.mjs";import"../chunk-4VPCPASN.mjs";import"../chunk-TJDC5PWD.mjs";import"../chunk-LR65XHSF.mjs";import"../chunk-EFMAZTIM.mjs";import"../chunk-F3ZVWLDH.mjs";import"../chunk-YTQVMLFD.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-IBDBKQMF.mjs";import"../chunk-2G4IGSGM.mjs";import"../chunk-3SACE4I2.mjs";import"../chunk-GED6IT3S.mjs";import"../chunk-3RJZNUCQ.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-GRHLQDHF.mjs";import"../chunk-7BW2N4IE.mjs";import"../chunk-FGGRPEQ3.mjs";import"../chunk-IBN7ETCB.mjs";import"../chunk-Q6LFIZ3L.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-3IFR6T3V.mjs";import"../chunk-UMLUOYFK.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-4BJA3QUQ.mjs";import"../chunk-SCHZ67F3.mjs";import"../chunk-YE5B2S5L.mjs";import"../chunk-FVA2OPG4.mjs";export{a as Keyless};
|
|
2
|
-
//# sourceMappingURL=keyless.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as p}from"./chunk-3SACE4I2.mjs";async function o(e){let{type:t,originMethod:s,path:i,body:r,acceptType:R,contentType:f,params:c,aptosConfig:n,overrides:A}=e,d=n.getRequestUrl(t);return p({url:d,method:"POST",originMethod:s,path:i,body:r,contentType:f,acceptType:R,params:c,overrides:A},n,e.type)}async function q(e){let{aptosConfig:t}=e;return o({...e,type:"Fullnode",overrides:{...t.clientConfig,...t.fullnodeConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.fullnodeConfig?.HEADERS}}})}async function C(e){let{aptosConfig:t}=e;return o({...e,type:"Indexer",overrides:{...t.clientConfig,...t.indexerConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.indexerConfig?.HEADERS}}})}async function m(e){let{aptosConfig:t}=e,s={...t,clientConfig:{...t.clientConfig}};return delete s?.clientConfig?.API_KEY,o({...e,type:"Faucet",overrides:{...s.clientConfig,...s.faucetConfig,...e.overrides,HEADERS:{...s.clientConfig?.HEADERS,...s.faucetConfig?.HEADERS}}})}async function E(e){return o({...e,type:"Pepper"})}async function a(e){return o({...e,type:"Prover"})}export{o as a,q as b,C as c,m as d,E as e,a as f};
|
|
2
|
-
//# sourceMappingURL=chunk-2G4IGSGM.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/core/crypto/proof.ts"],"sourcesContent":["import { Serializable } from \"../../bcs\";\nimport { Hex } from \"../hex\";\n\n/**\n * An abstract representation of a crypto proof.\n * associated to a specific zero knowledge proof schemes e.g. Groth16, PLONK\n */\nexport abstract class Proof extends Serializable {\n /**\n * Get the proof as a hex string with a 0x prefix e.g. 0x123456...\n */\n toString(): string {\n const bytes = this.bcsToBytes();\n return Hex.fromHexInput(bytes).toString();\n }\n}\n"],"mappings":"kFAOO,IAAeA,EAAf,cAA6BC,CAAa,CAI/C,UAAmB,CACjB,IAAMC,EAAQ,KAAK,WAAW,EAC9B,OAAOC,EAAI,aAAaD,CAAK,EAAE,SAAS,CAC1C,CACF","names":["Proof","Serializable","bytes","Hex"]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as r}from"./chunk-56CNRT2K.mjs";var n=class{constructor(e){this.buffer=new ArrayBuffer(e.length),new Uint8Array(this.buffer).set(e,0),this.offset=0}read(e){if(this.offset+e>this.buffer.byteLength)throw new Error("Reached to the end of buffer");let i=this.buffer.slice(this.offset,this.offset+e);return this.offset+=e,i}deserializeStr(){let e=this.deserializeBytes();return new TextDecoder().decode(e)}deserializeOptionStr(){if(this.deserializeUleb128AsU32()===1)return this.deserializeStr()}deserializeOption(e){if(this.deserializeUleb128AsU32()===1)return this.deserialize(e)}deserializeBytes(){let e=this.deserializeUleb128AsU32();return new Uint8Array(this.read(e))}deserializeFixedBytes(e){return new Uint8Array(this.read(e))}deserializeBool(){let e=new Uint8Array(this.read(1))[0];if(e!==1&&e!==0)throw new Error("Invalid boolean value");return e===1}deserializeU8(){return new DataView(this.read(1)).getUint8(0)}deserializeU16(){return new DataView(this.read(2)).getUint16(0,!0)}deserializeU32(){return new DataView(this.read(4)).getUint32(0,!0)}deserializeU64(){let e=this.deserializeU32(),i=this.deserializeU32();return BigInt(BigInt(i)<<BigInt(32)|BigInt(e))}deserializeU128(){let e=this.deserializeU64(),i=this.deserializeU64();return BigInt(i<<BigInt(64)|e)}deserializeU256(){let e=this.deserializeU128(),i=this.deserializeU128();return BigInt(i<<BigInt(128)|e)}deserializeUleb128AsU32(){let e=BigInt(0),i=0;for(;e<r;){let t=this.deserializeU8();if(e|=BigInt(t&127)<<BigInt(i),!(t&128))break;i+=7}if(e>r)throw new Error("Overflow while parsing uleb128-encoded uint32 value");return Number(e)}deserialize(e){return e.deserialize(this)}deserializeVector(e){let i=this.deserializeUleb128AsU32(),t=new Array;for(let s=0;s<i;s+=1)t.push(this.deserialize(e));return t}};export{n as a};
|
|
2
|
-
//# sourceMappingURL=chunk-3IFR6T3V.mjs.map
|