@aptos-labs/ts-sdk 1.15.0 → 1.16.0-zeta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/{accountAddress-ccLvlUQe.d.ts → accountAddress-OUd5ov6z.d.ts} +97 -5
- package/dist/common/chunk-VLEH6QBR.js +2 -0
- package/dist/common/chunk-VLEH6QBR.js.map +1 -0
- package/dist/common/cli/index.d.ts +1 -1
- package/dist/common/cli/index.js +1 -1
- package/dist/common/cli/index.js.map +1 -1
- package/dist/common/index.d.ts +757 -58
- package/dist/common/index.js +28 -28
- package/dist/common/index.js.map +1 -1
- package/dist/esm/{Ed25519Account-B1VMJOY2.d.mts → Ed25519Account-9zBaZEnp.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/EphemeralKeyPair.d.mts +85 -0
- package/dist/esm/account/EphemeralKeyPair.mjs +2 -0
- package/dist/esm/account/KeylessAccount.d.mts +225 -0
- package/dist/esm/account/KeylessAccount.mjs +2 -0
- package/dist/esm/account/MultiKeyAccount.d.mts +13 -7
- 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 +10 -2
- package/dist/esm/account/index.mjs +1 -1
- package/dist/esm/api/account.d.mts +2 -2
- 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 +13 -3
- 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 +1 -1
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.d.mts +2 -2
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/event.mjs +1 -1
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.d.mts +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 +11 -2
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/keyless.d.mts +88 -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/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 +1 -1
- 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 +2 -2
- package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
- package/dist/esm/api/transactionSubmission/simulate.d.mts +1 -1
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.d.mts +1 -1
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/deserializer.d.mts +32 -0
- 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 +42 -0
- package/dist/esm/bcs/serializer.mjs +1 -1
- package/dist/esm/{chunk-36QXVFR5.mjs → chunk-272NA6H5.mjs} +2 -2
- package/dist/esm/{chunk-36QXVFR5.mjs.map → chunk-272NA6H5.mjs.map} +1 -1
- package/dist/esm/{chunk-R5ST36VJ.mjs → chunk-34WI7I3Z.mjs} +2 -2
- package/dist/esm/chunk-3DP4R3FI.mjs +2 -0
- package/dist/esm/{chunk-FFGY7Z4B.mjs → chunk-3J53BCEQ.mjs} +2 -2
- package/dist/esm/chunk-3SXTTG2X.mjs +2 -0
- package/dist/esm/chunk-3SXTTG2X.mjs.map +1 -0
- package/dist/esm/{chunk-4GWNWSZP.mjs → chunk-3YIUOKWW.mjs} +2 -2
- package/dist/esm/{chunk-EA2DKJPX.mjs → chunk-45ESRYGP.mjs} +2 -2
- package/dist/esm/chunk-4RXGVY2H.mjs +2 -0
- package/dist/esm/chunk-4RXGVY2H.mjs.map +1 -0
- package/dist/esm/chunk-4VAYXBD2.mjs +2 -0
- package/dist/esm/chunk-5SGIYAB7.mjs +2 -0
- package/dist/esm/chunk-5SGIYAB7.mjs.map +1 -0
- package/dist/esm/chunk-5VLCYHNJ.mjs +2 -0
- package/dist/esm/chunk-5VLCYHNJ.mjs.map +1 -0
- package/dist/esm/{chunk-JGSOTNJ5.mjs → chunk-6F3HFDL3.mjs} +2 -2
- package/dist/esm/{chunk-BN22EYXR.mjs → chunk-6MDYCC7P.mjs} +2 -2
- package/dist/esm/{chunk-F7NLNWHN.mjs → chunk-7CJAEAQZ.mjs} +2 -2
- package/dist/esm/chunk-7QGIAVW4.mjs +2 -0
- package/dist/esm/chunk-7QGIAVW4.mjs.map +1 -0
- package/dist/esm/chunk-7UBKXR37.mjs +2 -0
- package/dist/esm/chunk-7UBKXR37.mjs.map +1 -0
- package/dist/esm/{chunk-JQIGQMNZ.mjs → chunk-7Y6AWDBZ.mjs} +2 -2
- package/dist/esm/chunk-7Z6DYLCA.mjs +1 -0
- package/dist/esm/chunk-7Z6DYLCA.mjs.map +1 -0
- package/dist/esm/{chunk-BCUSI3N6.mjs → chunk-AOCNYMMX.mjs} +2 -2
- package/dist/esm/chunk-AQ4I7VVB.mjs +1 -0
- package/dist/esm/chunk-AQ4I7VVB.mjs.map +1 -0
- package/dist/esm/chunk-AUAL3H36.mjs +2 -0
- package/dist/esm/{chunk-I5T6PHDV.mjs → chunk-AUV4VAXK.mjs} +2 -2
- package/dist/esm/{chunk-2X7A4HUS.mjs → chunk-AVWAYKNS.mjs} +2 -2
- package/dist/esm/{chunk-EZPUVLME.mjs → chunk-BNA3SGG6.mjs} +2 -2
- package/dist/esm/chunk-CEGCSC3T.mjs +2 -0
- package/dist/esm/chunk-CIPPNT3W.mjs +2 -0
- package/dist/esm/chunk-CIPPNT3W.mjs.map +1 -0
- package/dist/esm/{chunk-F4GDEXZ6.mjs → chunk-CZOUSIAD.mjs} +2 -2
- package/dist/esm/chunk-D76FE35G.mjs +2 -0
- package/dist/esm/chunk-D76FE35G.mjs.map +1 -0
- package/dist/esm/{chunk-A4JUQZXI.mjs → chunk-DSVNXD5A.mjs} +2 -2
- package/dist/esm/chunk-EJ7ODMDA.mjs +2 -0
- package/dist/esm/{chunk-UR3JTLIT.mjs → chunk-EJURLI4L.mjs} +2 -2
- package/dist/esm/chunk-FBPNHF54.mjs +2 -0
- package/dist/esm/chunk-FUQDDIKQ.mjs +2 -0
- package/dist/esm/chunk-FUQDDIKQ.mjs.map +1 -0
- package/dist/esm/chunk-FWTJQHJR.mjs +2 -0
- package/dist/esm/chunk-FWTJQHJR.mjs.map +1 -0
- package/dist/esm/{chunk-AHW3SKT7.mjs → chunk-GHHIUWPP.mjs} +2 -2
- package/dist/esm/{chunk-G56GPLTB.mjs → chunk-GS5Z3HO7.mjs} +2 -2
- package/dist/esm/chunk-HGRU3HWY.mjs +2 -0
- package/dist/esm/{chunk-P5TZBE3L.mjs.map → chunk-HGRU3HWY.mjs.map} +1 -1
- package/dist/esm/{chunk-XFSDV3ND.mjs → chunk-HOX6Q6ZP.mjs} +2 -2
- package/dist/esm/chunk-HQK6MF3G.mjs +2 -0
- package/dist/esm/chunk-IMVC2JKU.mjs +2 -0
- package/dist/esm/{chunk-2XK53QFA.mjs.map → chunk-IMVC2JKU.mjs.map} +1 -1
- package/dist/esm/chunk-ISXBJPLD.mjs +2 -0
- package/dist/esm/{chunk-JX75UKJX.mjs → chunk-IU6REVKX.mjs} +2 -2
- package/dist/esm/{chunk-ERIPXWXJ.mjs → chunk-IWKIZLFW.mjs} +2 -2
- package/dist/esm/{chunk-PIVZMT5D.mjs → chunk-J534ICWA.mjs} +2 -2
- package/dist/esm/chunk-J577ODDM.mjs +2 -0
- package/dist/esm/chunk-JBTLE33X.mjs +2 -0
- package/dist/esm/{chunk-CJDEPZ4J.mjs.map → chunk-JBTLE33X.mjs.map} +1 -1
- package/dist/esm/chunk-JCDZ2WXX.mjs +2 -0
- package/dist/esm/chunk-JCDZ2WXX.mjs.map +1 -0
- package/dist/esm/{chunk-YK63A5T6.mjs → chunk-LLRWILVZ.mjs} +2 -2
- package/dist/esm/chunk-M4Q4XDVR.mjs +2 -0
- package/dist/esm/chunk-M4Q4XDVR.mjs.map +1 -0
- package/dist/esm/chunk-MEOBWD6V.mjs +2 -0
- package/dist/esm/chunk-MEOBWD6V.mjs.map +1 -0
- package/dist/esm/{chunk-35EWRSDK.mjs → chunk-MLQT5I6K.mjs} +2 -2
- package/dist/esm/chunk-MSGHGK52.mjs +2 -0
- package/dist/esm/{chunk-5EN52MUT.mjs → chunk-NGTNMV6Q.mjs} +2 -2
- package/dist/esm/{chunk-P46OPJB4.mjs → chunk-NH466YFP.mjs} +2 -2
- package/dist/esm/chunk-NMD45OTM.mjs +2 -0
- package/dist/esm/chunk-NMD45OTM.mjs.map +1 -0
- package/dist/esm/{chunk-ZM33M6QO.mjs → chunk-NUBYALZP.mjs} +2 -2
- package/dist/esm/{chunk-CHWE77CR.mjs → chunk-OFC75EWS.mjs} +2 -2
- package/dist/esm/{chunk-H6FEXRTK.mjs → chunk-OOYRJQPD.mjs} +2 -2
- package/dist/esm/chunk-OZ3GSAFK.mjs +2 -0
- package/dist/esm/chunk-OZ3GSAFK.mjs.map +1 -0
- package/dist/esm/chunk-PENBUSGL.mjs +2 -0
- package/dist/esm/chunk-PENBUSGL.mjs.map +1 -0
- package/dist/esm/{chunk-WN3JL7ZT.mjs → chunk-PG7KSUMN.mjs} +2 -2
- package/dist/esm/{chunk-KAGLWBIJ.mjs → chunk-PGP2XMDE.mjs} +2 -2
- package/dist/esm/chunk-Q6LFIZ3L.mjs +2 -0
- package/dist/esm/chunk-Q6LFIZ3L.mjs.map +1 -0
- package/dist/esm/{chunk-CYTRYBWN.mjs → chunk-QJIMZI32.mjs} +2 -2
- package/dist/esm/{chunk-E56MTU2U.mjs → chunk-QLE5JL4X.mjs} +2 -2
- package/dist/esm/{chunk-WNPL4SEJ.mjs → chunk-QOOHLRRJ.mjs} +2 -2
- package/dist/esm/chunk-QYEJOEWB.mjs +2 -0
- package/dist/esm/chunk-QYEJOEWB.mjs.map +1 -0
- package/dist/esm/{chunk-TM7NDDT3.mjs → chunk-R4HLV32L.mjs} +2 -2
- package/dist/esm/chunk-RAHMGSBW.mjs +2 -0
- package/dist/esm/chunk-RAHMGSBW.mjs.map +1 -0
- package/dist/esm/{chunk-GHYE26Q5.mjs → chunk-RKHPXZM6.mjs} +2 -2
- package/dist/esm/{chunk-GHYE26Q5.mjs.map → chunk-RKHPXZM6.mjs.map} +1 -1
- package/dist/esm/{chunk-MCRRHBFQ.mjs → chunk-RWYPGTNL.mjs} +2 -2
- package/dist/esm/chunk-SCHMTP4N.mjs +2 -0
- package/dist/esm/chunk-SCHZ67F3.mjs +2 -0
- package/dist/esm/chunk-SCHZ67F3.mjs.map +1 -0
- package/dist/esm/{chunk-GP6Z47HM.mjs → chunk-SCRIQQV3.mjs} +2 -2
- package/dist/esm/{chunk-NGQR5UQ3.mjs → chunk-SNBE5YAC.mjs} +2 -2
- package/dist/esm/chunk-SSDWEOF7.mjs +2 -0
- package/dist/esm/chunk-SSDWEOF7.mjs.map +1 -0
- package/dist/esm/chunk-SZ6KR73C.mjs +2 -0
- package/dist/esm/chunk-SZ6KR73C.mjs.map +1 -0
- package/dist/esm/{chunk-UW2FPXYA.mjs → chunk-THURV6CN.mjs} +2 -2
- package/dist/esm/chunk-TJDC5PWD.mjs +2 -0
- package/dist/esm/{chunk-GUALXVFI.mjs → chunk-TU6VKYDC.mjs} +2 -2
- package/dist/esm/{chunk-DZSDCUP2.mjs → chunk-UFMIMN7W.mjs} +2 -2
- package/dist/esm/{chunk-3Y46WJUR.mjs → chunk-ULW5LX5H.mjs} +2 -2
- package/dist/esm/chunk-V6M7FGQT.mjs +2 -0
- package/dist/esm/chunk-V6M7FGQT.mjs.map +1 -0
- package/dist/esm/{chunk-U3YYSIIT.mjs → chunk-VBODXPT3.mjs} +2 -2
- package/dist/esm/chunk-VMVSUH2K.mjs +2 -0
- package/dist/esm/{chunk-QRS4DGP3.mjs → chunk-WHSN42R2.mjs} +2 -2
- package/dist/esm/{chunk-QRS4DGP3.mjs.map → chunk-WHSN42R2.mjs.map} +1 -1
- package/dist/esm/{chunk-ZCG6WBLE.mjs → chunk-WJIICWOB.mjs} +2 -2
- package/dist/esm/{chunk-T2AGN5YT.mjs → chunk-WOLLRMXR.mjs} +2 -2
- package/dist/esm/chunk-WSVJNBSJ.mjs +2 -0
- package/dist/esm/{chunk-YMB2XW2O.mjs.map → chunk-WSVJNBSJ.mjs.map} +1 -1
- package/dist/esm/chunk-WXLSJF4A.mjs +2 -0
- package/dist/esm/chunk-WXLSJF4A.mjs.map +1 -0
- package/dist/esm/{chunk-GM56MMNJ.mjs → chunk-XQ7I34AL.mjs} +2 -2
- package/dist/esm/{chunk-RT6LEYHZ.mjs → chunk-Y24BMR2W.mjs} +2 -2
- package/dist/esm/chunk-YE5B2S5L.mjs +2 -0
- package/dist/esm/chunk-YE5B2S5L.mjs.map +1 -0
- package/dist/esm/{chunk-HSJTQLI2.mjs → chunk-YLQJBXUF.mjs} +2 -2
- package/dist/esm/chunk-ZAXWW7VW.mjs +2 -0
- package/dist/esm/chunk-ZAXWW7VW.mjs.map +1 -0
- package/dist/esm/chunk-ZV5P2GSJ.mjs +2 -0
- package/dist/esm/{chunk-SRDIYE3M.mjs.map → chunk-ZV5P2GSJ.mjs.map} +1 -1
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/cli/localNode.mjs +1 -1
- package/dist/esm/cli/move.mjs +1 -1
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.d.mts +8 -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 +9 -1
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/client/types.d.mts +5 -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/cryptoHasher.d.mts +21 -0
- package/dist/esm/core/crypto/cryptoHasher.mjs +2 -0
- package/dist/esm/core/crypto/cryptoHasher.mjs.map +1 -0
- package/dist/esm/core/crypto/ed25519.d.mts +1 -1
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/ephemeral.d.mts +73 -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/index.d.mts +5 -1
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/keyless.d.mts +276 -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.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/poseidon.d.mts +19 -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/privateKey.d.mts +1 -1
- package/dist/esm/core/crypto/proof.d.mts +21 -0
- package/dist/esm/core/crypto/proof.mjs +2 -0
- package/dist/esm/core/crypto/proof.mjs.map +1 -0
- 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 +5 -1
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/index.d.mts +16 -8
- 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/keyless.d.mts +78 -0
- package/dist/esm/internal/keyless.mjs +2 -0
- package/dist/esm/internal/keyless.mjs.map +1 -0
- 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 +3 -3
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/instances/chainId.mjs +1 -1
- package/dist/esm/transactions/instances/identifier.mjs +1 -1
- package/dist/esm/transactions/instances/index.d.mts +1 -1
- package/dist/esm/transactions/instances/index.mjs +1 -1
- package/dist/esm/transactions/instances/moduleId.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 +2 -2
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +3 -3
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +4 -13
- 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.d.mts +3 -1
- package/dist/esm/transactions/typeTag/parser.mjs +1 -1
- package/dist/esm/transactions/types.d.mts +23 -5
- package/dist/esm/types/index.d.mts +21 -5
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/types/keyless.d.mts +52 -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 -1
- 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/helpers.d.mts +4 -1
- 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/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +11 -3
- package/src/account/EphemeralKeyPair.ts +157 -0
- package/src/account/KeylessAccount.ts +404 -0
- package/src/account/MultiKeyAccount.ts +11 -0
- package/src/account/index.ts +2 -0
- package/src/api/aptos.ts +6 -0
- package/src/api/aptosConfig.ts +46 -1
- package/src/api/keyless.ts +59 -0
- package/src/bcs/deserializer.ts +46 -0
- package/src/bcs/serializer.ts +58 -0
- package/src/cli/localNode.ts +11 -1
- package/src/cli/move.ts +11 -1
- package/src/client/core.ts +5 -0
- package/src/client/get.ts +12 -0
- package/src/client/post.ts +18 -0
- package/src/client/types.ts +1 -1
- package/src/core/crypto/cryptoHasher.ts +16 -0
- package/src/core/crypto/ephemeral.ts +138 -0
- package/src/core/crypto/index.ts +2 -0
- package/src/core/crypto/keyless.ts +589 -0
- package/src/core/crypto/poseidon.ts +142 -0
- package/src/core/crypto/proof.ts +16 -0
- package/src/core/crypto/singleKey.ts +11 -0
- package/src/internal/keyless.ts +175 -0
- package/src/internal/transactionSubmission.ts +7 -2
- package/src/transactions/transactionBuilder/remoteAbi.ts +16 -2
- package/src/transactions/transactionBuilder/signingMessage.ts +0 -13
- package/src/transactions/transactionBuilder/transactionBuilder.ts +22 -2
- package/src/transactions/typeTag/parser.ts +98 -52
- package/src/transactions/types.ts +22 -3
- package/src/types/index.ts +24 -2
- package/src/types/keyless.ts +42 -0
- package/src/utils/apiEndpoints.ts +16 -0
- package/src/utils/const.ts +2 -0
- package/src/utils/helpers.ts +25 -0
- package/src/version.ts +1 -1
- package/dist/common/chunk-KSEUZTKY.js +0 -2
- package/dist/common/chunk-KSEUZTKY.js.map +0 -1
- package/dist/esm/chunk-2XK53QFA.mjs +0 -2
- package/dist/esm/chunk-3JPVQHOR.mjs +0 -2
- package/dist/esm/chunk-3JPVQHOR.mjs.map +0 -1
- package/dist/esm/chunk-4NHWV5AI.mjs +0 -2
- package/dist/esm/chunk-53INTTOI.mjs +0 -2
- package/dist/esm/chunk-6IFMQ5AS.mjs +0 -2
- package/dist/esm/chunk-6IFMQ5AS.mjs.map +0 -1
- package/dist/esm/chunk-AF5WNJOP.mjs +0 -2
- package/dist/esm/chunk-B7X6PSE7.mjs +0 -2
- package/dist/esm/chunk-BBKE2QJU.mjs +0 -2
- package/dist/esm/chunk-BBKE2QJU.mjs.map +0 -1
- package/dist/esm/chunk-CEHCDA3G.mjs +0 -2
- package/dist/esm/chunk-CJDEPZ4J.mjs +0 -2
- package/dist/esm/chunk-CYNQRMO5.mjs +0 -2
- package/dist/esm/chunk-CYNQRMO5.mjs.map +0 -1
- package/dist/esm/chunk-F7EMGK4M.mjs +0 -2
- package/dist/esm/chunk-GPEM3JVU.mjs +0 -2
- package/dist/esm/chunk-HYCGMFC2.mjs +0 -2
- package/dist/esm/chunk-HYCGMFC2.mjs.map +0 -1
- package/dist/esm/chunk-IENCDVPF.mjs +0 -2
- package/dist/esm/chunk-IENCDVPF.mjs.map +0 -1
- package/dist/esm/chunk-L54P6EGN.mjs +0 -2
- package/dist/esm/chunk-L54P6EGN.mjs.map +0 -1
- package/dist/esm/chunk-LDQ6JFEF.mjs +0 -2
- package/dist/esm/chunk-LDQ6JFEF.mjs.map +0 -1
- package/dist/esm/chunk-LG7RJQ57.mjs +0 -2
- package/dist/esm/chunk-LQNPI3IR.mjs +0 -2
- package/dist/esm/chunk-LQNPI3IR.mjs.map +0 -1
- package/dist/esm/chunk-MJPUASSD.mjs +0 -2
- package/dist/esm/chunk-MJPUASSD.mjs.map +0 -1
- package/dist/esm/chunk-N3U47Y6Y.mjs +0 -2
- package/dist/esm/chunk-O2K7RZWM.mjs +0 -2
- package/dist/esm/chunk-O2K7RZWM.mjs.map +0 -1
- package/dist/esm/chunk-O4WVPLUX.mjs +0 -2
- package/dist/esm/chunk-OWW6SIDP.mjs +0 -2
- package/dist/esm/chunk-OWW6SIDP.mjs.map +0 -1
- package/dist/esm/chunk-P5TZBE3L.mjs +0 -2
- package/dist/esm/chunk-PF57EOJY.mjs +0 -2
- package/dist/esm/chunk-PZ4SAXY7.mjs +0 -2
- package/dist/esm/chunk-PZ4SAXY7.mjs.map +0 -1
- package/dist/esm/chunk-RFZ5LTGP.mjs +0 -2
- package/dist/esm/chunk-RFZ5LTGP.mjs.map +0 -1
- package/dist/esm/chunk-ROXFCLDT.mjs +0 -2
- package/dist/esm/chunk-RTSWVT2Q.mjs +0 -2
- package/dist/esm/chunk-RTSWVT2Q.mjs.map +0 -1
- package/dist/esm/chunk-S2VSJJRJ.mjs +0 -2
- package/dist/esm/chunk-S2VSJJRJ.mjs.map +0 -1
- package/dist/esm/chunk-SRDIYE3M.mjs +0 -2
- package/dist/esm/chunk-UGPALAPN.mjs +0 -2
- package/dist/esm/chunk-UO3NZ5AH.mjs +0 -1
- package/dist/esm/chunk-UVSRX4SV.mjs +0 -1
- package/dist/esm/chunk-YCC6HN74.mjs +0 -2
- package/dist/esm/chunk-YCC6HN74.mjs.map +0 -1
- package/dist/esm/chunk-YMB2XW2O.mjs +0 -2
- /package/dist/esm/{chunk-UO3NZ5AH.mjs.map → account/EphemeralKeyPair.mjs.map} +0 -0
- /package/dist/esm/{chunk-UVSRX4SV.mjs.map → account/KeylessAccount.mjs.map} +0 -0
- /package/dist/esm/{chunk-R5ST36VJ.mjs.map → chunk-34WI7I3Z.mjs.map} +0 -0
- /package/dist/esm/{chunk-53INTTOI.mjs.map → chunk-3DP4R3FI.mjs.map} +0 -0
- /package/dist/esm/{chunk-FFGY7Z4B.mjs.map → chunk-3J53BCEQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-4GWNWSZP.mjs.map → chunk-3YIUOKWW.mjs.map} +0 -0
- /package/dist/esm/{chunk-EA2DKJPX.mjs.map → chunk-45ESRYGP.mjs.map} +0 -0
- /package/dist/esm/{chunk-PF57EOJY.mjs.map → chunk-4VAYXBD2.mjs.map} +0 -0
- /package/dist/esm/{chunk-JGSOTNJ5.mjs.map → chunk-6F3HFDL3.mjs.map} +0 -0
- /package/dist/esm/{chunk-BN22EYXR.mjs.map → chunk-6MDYCC7P.mjs.map} +0 -0
- /package/dist/esm/{chunk-F7NLNWHN.mjs.map → chunk-7CJAEAQZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-JQIGQMNZ.mjs.map → chunk-7Y6AWDBZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-BCUSI3N6.mjs.map → chunk-AOCNYMMX.mjs.map} +0 -0
- /package/dist/esm/{chunk-4NHWV5AI.mjs.map → chunk-AUAL3H36.mjs.map} +0 -0
- /package/dist/esm/{chunk-I5T6PHDV.mjs.map → chunk-AUV4VAXK.mjs.map} +0 -0
- /package/dist/esm/{chunk-2X7A4HUS.mjs.map → chunk-AVWAYKNS.mjs.map} +0 -0
- /package/dist/esm/{chunk-EZPUVLME.mjs.map → chunk-BNA3SGG6.mjs.map} +0 -0
- /package/dist/esm/{chunk-GPEM3JVU.mjs.map → chunk-CEGCSC3T.mjs.map} +0 -0
- /package/dist/esm/{chunk-F4GDEXZ6.mjs.map → chunk-CZOUSIAD.mjs.map} +0 -0
- /package/dist/esm/{chunk-A4JUQZXI.mjs.map → chunk-DSVNXD5A.mjs.map} +0 -0
- /package/dist/esm/{chunk-AF5WNJOP.mjs.map → chunk-EJ7ODMDA.mjs.map} +0 -0
- /package/dist/esm/{chunk-UR3JTLIT.mjs.map → chunk-EJURLI4L.mjs.map} +0 -0
- /package/dist/esm/{chunk-LG7RJQ57.mjs.map → chunk-FBPNHF54.mjs.map} +0 -0
- /package/dist/esm/{chunk-AHW3SKT7.mjs.map → chunk-GHHIUWPP.mjs.map} +0 -0
- /package/dist/esm/{chunk-G56GPLTB.mjs.map → chunk-GS5Z3HO7.mjs.map} +0 -0
- /package/dist/esm/{chunk-XFSDV3ND.mjs.map → chunk-HOX6Q6ZP.mjs.map} +0 -0
- /package/dist/esm/{chunk-ROXFCLDT.mjs.map → chunk-HQK6MF3G.mjs.map} +0 -0
- /package/dist/esm/{chunk-O4WVPLUX.mjs.map → chunk-ISXBJPLD.mjs.map} +0 -0
- /package/dist/esm/{chunk-JX75UKJX.mjs.map → chunk-IU6REVKX.mjs.map} +0 -0
- /package/dist/esm/{chunk-ERIPXWXJ.mjs.map → chunk-IWKIZLFW.mjs.map} +0 -0
- /package/dist/esm/{chunk-PIVZMT5D.mjs.map → chunk-J534ICWA.mjs.map} +0 -0
- /package/dist/esm/{chunk-UGPALAPN.mjs.map → chunk-J577ODDM.mjs.map} +0 -0
- /package/dist/esm/{chunk-YK63A5T6.mjs.map → chunk-LLRWILVZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-35EWRSDK.mjs.map → chunk-MLQT5I6K.mjs.map} +0 -0
- /package/dist/esm/{chunk-N3U47Y6Y.mjs.map → chunk-MSGHGK52.mjs.map} +0 -0
- /package/dist/esm/{chunk-5EN52MUT.mjs.map → chunk-NGTNMV6Q.mjs.map} +0 -0
- /package/dist/esm/{chunk-P46OPJB4.mjs.map → chunk-NH466YFP.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZM33M6QO.mjs.map → chunk-NUBYALZP.mjs.map} +0 -0
- /package/dist/esm/{chunk-CHWE77CR.mjs.map → chunk-OFC75EWS.mjs.map} +0 -0
- /package/dist/esm/{chunk-H6FEXRTK.mjs.map → chunk-OOYRJQPD.mjs.map} +0 -0
- /package/dist/esm/{chunk-WN3JL7ZT.mjs.map → chunk-PG7KSUMN.mjs.map} +0 -0
- /package/dist/esm/{chunk-KAGLWBIJ.mjs.map → chunk-PGP2XMDE.mjs.map} +0 -0
- /package/dist/esm/{chunk-CYTRYBWN.mjs.map → chunk-QJIMZI32.mjs.map} +0 -0
- /package/dist/esm/{chunk-E56MTU2U.mjs.map → chunk-QLE5JL4X.mjs.map} +0 -0
- /package/dist/esm/{chunk-WNPL4SEJ.mjs.map → chunk-QOOHLRRJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-TM7NDDT3.mjs.map → chunk-R4HLV32L.mjs.map} +0 -0
- /package/dist/esm/{chunk-MCRRHBFQ.mjs.map → chunk-RWYPGTNL.mjs.map} +0 -0
- /package/dist/esm/{chunk-CEHCDA3G.mjs.map → chunk-SCHMTP4N.mjs.map} +0 -0
- /package/dist/esm/{chunk-GP6Z47HM.mjs.map → chunk-SCRIQQV3.mjs.map} +0 -0
- /package/dist/esm/{chunk-NGQR5UQ3.mjs.map → chunk-SNBE5YAC.mjs.map} +0 -0
- /package/dist/esm/{chunk-UW2FPXYA.mjs.map → chunk-THURV6CN.mjs.map} +0 -0
- /package/dist/esm/{chunk-F7EMGK4M.mjs.map → chunk-TJDC5PWD.mjs.map} +0 -0
- /package/dist/esm/{chunk-GUALXVFI.mjs.map → chunk-TU6VKYDC.mjs.map} +0 -0
- /package/dist/esm/{chunk-DZSDCUP2.mjs.map → chunk-UFMIMN7W.mjs.map} +0 -0
- /package/dist/esm/{chunk-3Y46WJUR.mjs.map → chunk-ULW5LX5H.mjs.map} +0 -0
- /package/dist/esm/{chunk-U3YYSIIT.mjs.map → chunk-VBODXPT3.mjs.map} +0 -0
- /package/dist/esm/{chunk-B7X6PSE7.mjs.map → chunk-VMVSUH2K.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZCG6WBLE.mjs.map → chunk-WJIICWOB.mjs.map} +0 -0
- /package/dist/esm/{chunk-T2AGN5YT.mjs.map → chunk-WOLLRMXR.mjs.map} +0 -0
- /package/dist/esm/{chunk-GM56MMNJ.mjs.map → chunk-XQ7I34AL.mjs.map} +0 -0
- /package/dist/esm/{chunk-RT6LEYHZ.mjs.map → chunk-Y24BMR2W.mjs.map} +0 -0
- /package/dist/esm/{chunk-HSJTQLI2.mjs.map → chunk-YLQJBXUF.mjs.map} +0 -0
- /package/dist/esm/{publicKey-B3XRNhHO.d.mts → publicKey-lq5djCIY.d.mts} +0 -0
package/dist/common/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as Serializable, T as TransactionArgument, H as HexInput, a as Serializer, D as Deserializer, E as EntryFunctionArgument, U as Uint8, b as Uint16, c as Uint32, A as AnyNumber, d as Deserializable, e as Hex, f as AuthenticationKeyScheme, g as AccountAddress, h as AnyPublicKeyVariant, N as Network, C as Client,
|
|
2
|
-
export {
|
|
1
|
+
import { S as Serializable, T as TransactionArgument, H as HexInput, a as Serializer, D as Deserializer, E as EntryFunctionArgument, U as Uint8, b as Uint16, c as Uint32, A as AnyNumber, d as Deserializable, e as Hex, f as AuthenticationKeyScheme, g as AccountAddress, h as AnyPublicKeyVariant, i as EphemeralPublicKeyVariant, j as EphemeralCertificateVariant, Z as ZkpVariant, N as Network, C as Client, k as ClientConfig, F as FullNodeConfig, I as IndexerConfig, l as FaucetConfig, m as AptosSettings, M as MoveModuleId, n as ScriptFunctionArgument, o as MoveFunctionId, p as AccountAddressInput, q as MoveFunctionGenericTypeParam, r as SigningSchemeInput, s as SigningScheme, t as AptosRequest, u as AccountData, P as PaginationArgs, L as LedgerVersionArg, v as MoveModuleBytecode, w as TransactionResponse, x as MoveResource, y as MoveStructId, z as TokenStandardArg, O as OrderByArg, G as GetAccountOwnedTokensQueryResponse, B as GetAccountOwnedTokensFromCollectionResponse, J as GetAccountCollectionsWithOwnedTokenResponse, K as GetAccountCoinsDataResponse, W as WhereArg, Q as GetAccountOwnedObjectsResponse, R as GetCollectionDataResponse, V as GetTokenDataResponse, X as GetCurrentTokenOwnershipResponse, Y as GetOwnedTokensResponse, _ as GetTokenActivityResponse, $ as GetEventsResponse, a0 as WaitForTransactionOptions, a1 as UserTransactionResponse, a2 as MoveFunction, a3 as GetFungibleAssetMetadataResponse, a4 as GetFungibleAssetActivitiesResponse, a5 as GetCurrentFungibleAssetBalancesResponse, a6 as LedgerInfo, a7 as Block, a8 as MoveValue, a9 as GetChainTopUserTransactionsResponse, aa as GraphqlQuery, ab as GetProcessorStatusResponse, ac as GetANSNameResponse, ad as GetNumberOfDelegatorsResponse, ae as GetDelegatedStakingActivitiesResponse, af as PendingTransactionResponse, ag as CommittedTransactionResponse, ah as GasEstimation, ai as TableItemRequest, aj as GetTableItemsDataResponse, ak as GetTableItemsMetadataResponse, al as ClientRequest, am as ClientResponse, an as MimeType } from './accountAddress-OUd5ov6z.js';
|
|
2
|
+
export { aA as AccountAuthenticatorVariant, bg as AccountSignature, ar as AddressInvalidReason, aB as AnySignatureVariant, aP as BlockMetadataTransactionResponse, aG as ClientHeadersType, aZ as DecodedTableData, a_ as DeletedTableData, bD as DeriveScheme, bj as DirectWriteSet, b0 as EntryFunctionPayloadResponse, aC as EphemeralSignatureVariant, bl as Event, bk as EventGuid, bG as GenerateAccount, bE as GenerateAccountWithEd25519, bF as GenerateAccountWithSingleSignerSecp256k1Key, b3 as GenesisPayload, aO as GenesisTransactionResponse, au as HexInvalidReason, by as MoveAbility, bs as MoveAddressType, bx as MoveFunctionVisibility, bA as MoveModule, bt as MoveObjectType, bu as MoveOptionType, b4 as MoveScriptBytecode, bB as MoveStruct, bz as MoveStructField, bv as MoveStructType, bw as MoveType, bq as MoveUint128Type, bn as MoveUint16Type, br as MoveUint256Type, bo as MoveUint32Type, bp as MoveUint64Type, bm as MoveUint8Type, b2 as MultisigPayloadResponse, bP as NetworkToChainId, bM as NetworkToFaucetAPI, bK as NetworkToIndexerAPI, bQ as NetworkToNetworkName, bL as NetworkToNodeAPI, bN as NetworkToPepperAPI, bO as NetworkToProverAPI, bH as OrderBy, bI as OrderByValue, as as ParsingError, at as ParsingResult, bC as RoleType, b1 as ScriptPayloadResponse, aw as ScriptTransactionArgumentVariants, bi as ScriptWriteSet, aQ as StateCheckpointTransactionResponse, bJ as TokenStandard, az as TransactionAuthenticatorVariant, bb as TransactionEd25519Signature, bf as TransactionFeePayerSignature, be as TransactionMultiAgentSignature, bd as TransactionMultiEd25519Signature, a$ as TransactionPayloadResponse, ax as TransactionPayloadVariants, aH as TransactionResponseType, bc as TransactionSecp256k1Signature, b5 as TransactionSignature, ay as TransactionVariants, av as TypeTagVariants, aE as Uint128, aF as Uint256, aD as Uint64, aR as ValidatorTransactionResponse, bh as WriteSet, aS as WriteSetChange, aT as WriteSetChangeDeleteModule, aU as WriteSetChangeDeleteResource, aV as WriteSetChangeDeleteTableItem, aW as WriteSetChangeWriteModule, aX as WriteSetChangeWriteResource, aY as WriteSetChangeWriteTableItem, ao as ensureBoolean, aL as isBlockMetadataTransactionResponse, b6 as isEd25519Signature, b9 as isFeePayerSignature, aK as isGenesisTransactionResponse, b8 as isMultiAgentSignature, ba as isMultiEd25519Signature, aI as isPendingTransactionResponse, b7 as isSecp256k1Signature, aM as isStateCheckpointTransactionResponse, aJ as isUserTransactionResponse, aN as isValidatorTransactionResponse, ap as outOfRangeErrorMessage, aq as validateNumberInRange } from './accountAddress-OUd5ov6z.js';
|
|
3
3
|
import EventEmitter from 'eventemitter3';
|
|
4
4
|
|
|
5
5
|
type Maybe<T> = T | null;
|
|
@@ -1367,6 +1367,341 @@ declare class MultiKeySignature extends Signature {
|
|
|
1367
1367
|
static deserialize(deserializer: Deserializer): MultiKeySignature;
|
|
1368
1368
|
}
|
|
1369
1369
|
|
|
1370
|
+
/**
|
|
1371
|
+
* Represents ephemeral public keys for Aptos Keyless accounts.
|
|
1372
|
+
*
|
|
1373
|
+
* These are not public keys used as a public key on an account. They are only used ephemerally on Keyless accounts.
|
|
1374
|
+
*/
|
|
1375
|
+
declare class EphemeralPublicKey extends PublicKey {
|
|
1376
|
+
/**
|
|
1377
|
+
* The public key itself
|
|
1378
|
+
*/
|
|
1379
|
+
readonly publicKey: PublicKey;
|
|
1380
|
+
/**
|
|
1381
|
+
* An enum indicating the scheme of the ephemeral public key
|
|
1382
|
+
*/
|
|
1383
|
+
readonly variant: EphemeralPublicKeyVariant;
|
|
1384
|
+
constructor(publicKey: PublicKey);
|
|
1385
|
+
/**
|
|
1386
|
+
* Get the public key in bytes (Uint8Array).
|
|
1387
|
+
*
|
|
1388
|
+
* @returns Uint8Array representation of the public key
|
|
1389
|
+
*/
|
|
1390
|
+
toUint8Array(): Uint8Array;
|
|
1391
|
+
/**
|
|
1392
|
+
* Verifies a signed data with a the ephemeral public key
|
|
1393
|
+
*
|
|
1394
|
+
* @param args.message message
|
|
1395
|
+
* @param args.signature The signature that was signed by the private key of the ephemeral public key
|
|
1396
|
+
* @returns true if the signature is valid
|
|
1397
|
+
*/
|
|
1398
|
+
verifySignature(args: {
|
|
1399
|
+
message: HexInput;
|
|
1400
|
+
signature: EphemeralSignature;
|
|
1401
|
+
}): boolean;
|
|
1402
|
+
serialize(serializer: Serializer): void;
|
|
1403
|
+
static deserialize(deserializer: Deserializer): EphemeralPublicKey;
|
|
1404
|
+
static isPublicKey(publicKey: PublicKey): publicKey is EphemeralPublicKey;
|
|
1405
|
+
}
|
|
1406
|
+
/**
|
|
1407
|
+
* Represents ephemeral signatures used in Aptos Keyless accounts.
|
|
1408
|
+
*
|
|
1409
|
+
* These signatures are used inside of KeylessSignature
|
|
1410
|
+
*/
|
|
1411
|
+
declare class EphemeralSignature extends Signature {
|
|
1412
|
+
/**
|
|
1413
|
+
* The signature signed by the private key of an EphemeralKeyPair
|
|
1414
|
+
*/
|
|
1415
|
+
readonly signature: Signature;
|
|
1416
|
+
constructor(signature: Signature);
|
|
1417
|
+
/**
|
|
1418
|
+
* Get the public key in bytes (Uint8Array).
|
|
1419
|
+
*
|
|
1420
|
+
* @returns Uint8Array representation of the public key
|
|
1421
|
+
*/
|
|
1422
|
+
toUint8Array(): Uint8Array;
|
|
1423
|
+
static fromHex(hexInput: HexInput): EphemeralSignature;
|
|
1424
|
+
serialize(serializer: Serializer): void;
|
|
1425
|
+
static deserialize(deserializer: Deserializer): EphemeralSignature;
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
/**
|
|
1429
|
+
* An abstract representation of a crypto proof.
|
|
1430
|
+
* associated to a specific zero knowledge proof schemes e.g. Groth16, PLONK
|
|
1431
|
+
*/
|
|
1432
|
+
declare abstract class Proof extends Serializable {
|
|
1433
|
+
/**
|
|
1434
|
+
* Get the proof as a hex string with a 0x prefix e.g. 0x123456...
|
|
1435
|
+
*/
|
|
1436
|
+
toString(): string;
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
type Groth16VerificationKeyResponse = {
|
|
1440
|
+
alpha_g1: string;
|
|
1441
|
+
beta_g2: string;
|
|
1442
|
+
delta_g2: string;
|
|
1443
|
+
gamma_abc_g1: [string, string];
|
|
1444
|
+
gamma_g2: string;
|
|
1445
|
+
};
|
|
1446
|
+
|
|
1447
|
+
declare const EPK_HORIZON_SECS = 10000000;
|
|
1448
|
+
declare const MAX_AUD_VAL_BYTES = 120;
|
|
1449
|
+
declare const MAX_UID_KEY_BYTES = 30;
|
|
1450
|
+
declare const MAX_UID_VAL_BYTES = 330;
|
|
1451
|
+
declare const MAX_ISS_VAL_BYTES = 120;
|
|
1452
|
+
declare const MAX_EXTRA_FIELD_BYTES = 350;
|
|
1453
|
+
declare const MAX_JWT_HEADER_B64_BYTES = 300;
|
|
1454
|
+
declare const MAX_COMMITED_EPK_BYTES = 93;
|
|
1455
|
+
/**
|
|
1456
|
+
* Represents the KeylessPublicKey public key
|
|
1457
|
+
*
|
|
1458
|
+
* KeylessPublicKey authentication key is represented in the SDK as `AnyPublicKey`.
|
|
1459
|
+
*/
|
|
1460
|
+
declare class KeylessPublicKey extends AccountPublicKey {
|
|
1461
|
+
static readonly ID_COMMITMENT_LENGTH: number;
|
|
1462
|
+
/**
|
|
1463
|
+
* The value of the 'iss' claim on the JWT which identifies the OIDC provider.
|
|
1464
|
+
*/
|
|
1465
|
+
readonly iss: string;
|
|
1466
|
+
/**
|
|
1467
|
+
* A value representing a cryptographic commitment to a user identity.
|
|
1468
|
+
*
|
|
1469
|
+
* It is calculated from the aud, uidKey, uidVal, pepper.
|
|
1470
|
+
*/
|
|
1471
|
+
readonly idCommitment: Uint8Array;
|
|
1472
|
+
constructor(iss: string, idCommitment: HexInput);
|
|
1473
|
+
/**
|
|
1474
|
+
* Get the authentication key for the keyless public key
|
|
1475
|
+
*
|
|
1476
|
+
* @returns AuthenticationKey
|
|
1477
|
+
*/
|
|
1478
|
+
authKey(): AuthenticationKey;
|
|
1479
|
+
/**
|
|
1480
|
+
* Get the public key in bytes (Uint8Array).
|
|
1481
|
+
*
|
|
1482
|
+
* @returns Uint8Array representation of the public key
|
|
1483
|
+
*/
|
|
1484
|
+
toUint8Array(): Uint8Array;
|
|
1485
|
+
/**
|
|
1486
|
+
* Get the public key as a hex string with the 0x prefix.
|
|
1487
|
+
*
|
|
1488
|
+
* @returns string representation of the public key
|
|
1489
|
+
*/
|
|
1490
|
+
toString(): string;
|
|
1491
|
+
/**
|
|
1492
|
+
* Verifies a signed data with a public key
|
|
1493
|
+
*
|
|
1494
|
+
* @param args.message message
|
|
1495
|
+
* @param args.signature The signature
|
|
1496
|
+
* @returns true if the signature is valid
|
|
1497
|
+
*/
|
|
1498
|
+
verifySignature(args: {
|
|
1499
|
+
message: HexInput;
|
|
1500
|
+
signature: KeylessSignature;
|
|
1501
|
+
}): boolean;
|
|
1502
|
+
serialize(serializer: Serializer): void;
|
|
1503
|
+
static deserialize(deserializer: Deserializer): KeylessPublicKey;
|
|
1504
|
+
static load(deserializer: Deserializer): KeylessPublicKey;
|
|
1505
|
+
static isPublicKey(publicKey: PublicKey): publicKey is KeylessPublicKey;
|
|
1506
|
+
/**
|
|
1507
|
+
* Creates a KeylessPublicKey from the JWT components plus pepper
|
|
1508
|
+
*
|
|
1509
|
+
* @param args.iss the iss of the identity
|
|
1510
|
+
* @param args.uidKey the key to use to get the uidVal in the JWT token
|
|
1511
|
+
* @param args.uidVal the value of the uidKey in the JWT token
|
|
1512
|
+
* @param args.aud the client ID of the application
|
|
1513
|
+
* @param args.pepper The pepper used to maintain privacy of the account
|
|
1514
|
+
* @returns KeylessPublicKey
|
|
1515
|
+
*/
|
|
1516
|
+
static create(args: {
|
|
1517
|
+
iss: string;
|
|
1518
|
+
uidKey: string;
|
|
1519
|
+
uidVal: string;
|
|
1520
|
+
aud: string;
|
|
1521
|
+
pepper: HexInput;
|
|
1522
|
+
}): KeylessPublicKey;
|
|
1523
|
+
}
|
|
1524
|
+
/**
|
|
1525
|
+
* A signature of a message signed via Keyless Accounnt that uses proofs or the jwt token to authenticate.
|
|
1526
|
+
*/
|
|
1527
|
+
declare class KeylessSignature extends Signature {
|
|
1528
|
+
/**
|
|
1529
|
+
* The inner signature ZeroKnowledgeSigniature or OpenIdSignature
|
|
1530
|
+
*/
|
|
1531
|
+
readonly ephemeralCertificate: EphemeralCertificate;
|
|
1532
|
+
/**
|
|
1533
|
+
* The jwt header in the token used to create the proof/signature. In json string representation.
|
|
1534
|
+
*/
|
|
1535
|
+
readonly jwtHeader: string;
|
|
1536
|
+
/**
|
|
1537
|
+
* The expiry timestamp in seconds of the EphemeralKeyPair used to sign
|
|
1538
|
+
*/
|
|
1539
|
+
readonly expiryDateSecs: number;
|
|
1540
|
+
/**
|
|
1541
|
+
* The ephemeral public key used to verify the signature
|
|
1542
|
+
*/
|
|
1543
|
+
readonly ephemeralPublicKey: EphemeralPublicKey;
|
|
1544
|
+
/**
|
|
1545
|
+
* The signature resulting from signing with the private key of the EphemeralKeyPair
|
|
1546
|
+
*/
|
|
1547
|
+
readonly ephemeralSignature: EphemeralSignature;
|
|
1548
|
+
constructor(args: {
|
|
1549
|
+
jwtHeader: string;
|
|
1550
|
+
ephemeralCertificate: EphemeralCertificate;
|
|
1551
|
+
expiryDateSecs: number;
|
|
1552
|
+
ephemeralPublicKey: EphemeralPublicKey;
|
|
1553
|
+
ephemeralSignature: EphemeralSignature;
|
|
1554
|
+
});
|
|
1555
|
+
/**
|
|
1556
|
+
* Get the signature in bytes (Uint8Array).
|
|
1557
|
+
*
|
|
1558
|
+
* @returns Uint8Array representation of the signature
|
|
1559
|
+
*/
|
|
1560
|
+
toUint8Array(): Uint8Array;
|
|
1561
|
+
serialize(serializer: Serializer): void;
|
|
1562
|
+
static deserialize(deserializer: Deserializer): KeylessSignature;
|
|
1563
|
+
static load(deserializer: Deserializer): KeylessSignature;
|
|
1564
|
+
static getSimulationSignature(): KeylessSignature;
|
|
1565
|
+
static isSignature(signature: Signature): signature is KeylessSignature;
|
|
1566
|
+
}
|
|
1567
|
+
/**
|
|
1568
|
+
* A container for a signature that is a ZeroKnowledgeSig. Can be expanded to support OpenIdSignature.
|
|
1569
|
+
*/
|
|
1570
|
+
declare class EphemeralCertificate extends Signature {
|
|
1571
|
+
readonly signature: Signature;
|
|
1572
|
+
/**
|
|
1573
|
+
* Index of the underlying enum variant
|
|
1574
|
+
*/
|
|
1575
|
+
private readonly variant;
|
|
1576
|
+
constructor(signature: Signature, variant: EphemeralCertificateVariant);
|
|
1577
|
+
/**
|
|
1578
|
+
* Get the public key in bytes (Uint8Array).
|
|
1579
|
+
*
|
|
1580
|
+
* @returns Uint8Array representation of the public key
|
|
1581
|
+
*/
|
|
1582
|
+
toUint8Array(): Uint8Array;
|
|
1583
|
+
serialize(serializer: Serializer): void;
|
|
1584
|
+
static deserialize(deserializer: Deserializer): EphemeralCertificate;
|
|
1585
|
+
}
|
|
1586
|
+
declare class G1Bytes extends Serializable {
|
|
1587
|
+
data: Uint8Array;
|
|
1588
|
+
constructor(data: HexInput);
|
|
1589
|
+
serialize(serializer: Serializer): void;
|
|
1590
|
+
static deserialize(deserializer: Deserializer): G1Bytes;
|
|
1591
|
+
}
|
|
1592
|
+
declare class G2Bytes extends Serializable {
|
|
1593
|
+
data: Uint8Array;
|
|
1594
|
+
constructor(data: HexInput);
|
|
1595
|
+
serialize(serializer: Serializer): void;
|
|
1596
|
+
static deserialize(deserializer: Deserializer): G2Bytes;
|
|
1597
|
+
}
|
|
1598
|
+
/**
|
|
1599
|
+
* A representation of a Groth16 proof. The points are the compressed serialization of affine reprentation of the proof.
|
|
1600
|
+
*/
|
|
1601
|
+
declare class Groth16Zkp extends Proof {
|
|
1602
|
+
/**
|
|
1603
|
+
* The bytes of G1 proof point a
|
|
1604
|
+
*/
|
|
1605
|
+
a: G1Bytes;
|
|
1606
|
+
/**
|
|
1607
|
+
* The bytes of G2 proof point b
|
|
1608
|
+
*/
|
|
1609
|
+
b: G2Bytes;
|
|
1610
|
+
/**
|
|
1611
|
+
* The bytes of G1 proof point c
|
|
1612
|
+
*/
|
|
1613
|
+
c: G1Bytes;
|
|
1614
|
+
constructor(args: {
|
|
1615
|
+
a: HexInput;
|
|
1616
|
+
b: HexInput;
|
|
1617
|
+
c: HexInput;
|
|
1618
|
+
});
|
|
1619
|
+
serialize(serializer: Serializer): void;
|
|
1620
|
+
static deserialize(deserializer: Deserializer): Groth16Zkp;
|
|
1621
|
+
}
|
|
1622
|
+
/**
|
|
1623
|
+
* A container for a different zero knowledge proof types
|
|
1624
|
+
*/
|
|
1625
|
+
declare class ZkProof extends Serializable {
|
|
1626
|
+
readonly proof: Proof;
|
|
1627
|
+
/**
|
|
1628
|
+
* Index of the underlying enum variant
|
|
1629
|
+
*/
|
|
1630
|
+
private readonly variant;
|
|
1631
|
+
constructor(proof: Proof, variant: ZkpVariant);
|
|
1632
|
+
serialize(serializer: Serializer): void;
|
|
1633
|
+
static deserialize(deserializer: Deserializer): ZkProof;
|
|
1634
|
+
}
|
|
1635
|
+
/**
|
|
1636
|
+
* The signature representation of a proof
|
|
1637
|
+
*/
|
|
1638
|
+
declare class ZeroKnowledgeSig extends Signature {
|
|
1639
|
+
/**
|
|
1640
|
+
* The proof
|
|
1641
|
+
*/
|
|
1642
|
+
readonly proof: ZkProof;
|
|
1643
|
+
/**
|
|
1644
|
+
* The max lifespan of the proof
|
|
1645
|
+
*/
|
|
1646
|
+
readonly expHorizonSecs: bigint;
|
|
1647
|
+
/**
|
|
1648
|
+
* A key value pair on the JWT token that can be specified on the signature which would reveal the value on chain.
|
|
1649
|
+
* Can be used to assert identity or other attributes.
|
|
1650
|
+
*/
|
|
1651
|
+
readonly extraField?: string;
|
|
1652
|
+
/**
|
|
1653
|
+
* The 'aud' value of the recovery service which is set when recovering an account.
|
|
1654
|
+
*/
|
|
1655
|
+
readonly overrideAudVal?: string;
|
|
1656
|
+
/**
|
|
1657
|
+
* The training wheels signature
|
|
1658
|
+
*/
|
|
1659
|
+
readonly trainingWheelsSignature?: EphemeralSignature;
|
|
1660
|
+
constructor(args: {
|
|
1661
|
+
proof: ZkProof;
|
|
1662
|
+
expHorizonSecs?: bigint;
|
|
1663
|
+
extraField?: string;
|
|
1664
|
+
overrideAudVal?: string;
|
|
1665
|
+
trainingWheelsSignature?: EphemeralSignature;
|
|
1666
|
+
});
|
|
1667
|
+
/**
|
|
1668
|
+
* Get the signature in bytes (Uint8Array).
|
|
1669
|
+
*
|
|
1670
|
+
* @returns Uint8Array representation of the signature
|
|
1671
|
+
*/
|
|
1672
|
+
toUint8Array(): Uint8Array;
|
|
1673
|
+
/**
|
|
1674
|
+
* Return a ZeroKnowledgeSig object from its bcs serialization in bytes.
|
|
1675
|
+
*
|
|
1676
|
+
* @returns ZeroKnowledgeSig
|
|
1677
|
+
*/
|
|
1678
|
+
static fromBytes(bytes: Uint8Array): ZeroKnowledgeSig;
|
|
1679
|
+
serialize(serializer: Serializer): void;
|
|
1680
|
+
static deserialize(deserializer: Deserializer): ZeroKnowledgeSig;
|
|
1681
|
+
static load(deserializer: Deserializer): ZeroKnowledgeSig;
|
|
1682
|
+
}
|
|
1683
|
+
declare class KeylessConfiguration {
|
|
1684
|
+
readonly verficationKey: Groth16VerificationKey;
|
|
1685
|
+
readonly maxExpHorizonSecs: number;
|
|
1686
|
+
constructor(verficationKey: Groth16VerificationKey, maxExpHorizonSecs: number);
|
|
1687
|
+
static create(res: Groth16VerificationKeyResponse, maxExpHorizonSecs: number): KeylessConfiguration;
|
|
1688
|
+
}
|
|
1689
|
+
declare class Groth16VerificationKey {
|
|
1690
|
+
readonly alphaG1: G1Bytes;
|
|
1691
|
+
readonly betaG2: G2Bytes;
|
|
1692
|
+
readonly deltaG2: G2Bytes;
|
|
1693
|
+
readonly gammaAbcG1: G1Bytes[];
|
|
1694
|
+
readonly gammaG2: G2Bytes;
|
|
1695
|
+
constructor(args: {
|
|
1696
|
+
alphaG1: HexInput;
|
|
1697
|
+
betaG2: HexInput;
|
|
1698
|
+
deltaG2: HexInput;
|
|
1699
|
+
gammaAbcG1: [HexInput, HexInput];
|
|
1700
|
+
gammaG2: HexInput;
|
|
1701
|
+
});
|
|
1702
|
+
static fromGroth16VerificationKeyResponse(res: Groth16VerificationKeyResponse): Groth16VerificationKey;
|
|
1703
|
+
}
|
|
1704
|
+
|
|
1370
1705
|
/**
|
|
1371
1706
|
* Represents the Secp256k1 ecdsa public key
|
|
1372
1707
|
*
|
|
@@ -1569,7 +1904,9 @@ declare class AccountAuthenticatorMultiKey extends AccountAuthenticator {
|
|
|
1569
1904
|
declare enum AptosApiType {
|
|
1570
1905
|
FULLNODE = "Fullnode",
|
|
1571
1906
|
INDEXER = "Indexer",
|
|
1572
|
-
FAUCET = "Faucet"
|
|
1907
|
+
FAUCET = "Faucet",
|
|
1908
|
+
PEPPER = "Pepper",
|
|
1909
|
+
PROVER = "Prover"
|
|
1573
1910
|
}
|
|
1574
1911
|
/**
|
|
1575
1912
|
* The default max gas amount when none is given.
|
|
@@ -1642,6 +1979,14 @@ declare class AptosConfig {
|
|
|
1642
1979
|
* The optional hardcoded faucet URL to send requests to instead of using the network
|
|
1643
1980
|
*/
|
|
1644
1981
|
readonly faucet?: string;
|
|
1982
|
+
/**
|
|
1983
|
+
* The optional hardcoded pepper service URL to send requests to instead of using the network
|
|
1984
|
+
*/
|
|
1985
|
+
readonly pepper?: string;
|
|
1986
|
+
/**
|
|
1987
|
+
* The optional hardcoded prover service URL to send requests to instead of using the network
|
|
1988
|
+
*/
|
|
1989
|
+
readonly prover?: string;
|
|
1645
1990
|
/**
|
|
1646
1991
|
* The optional hardcoded indexer URL to send requests to instead of using the network
|
|
1647
1992
|
*/
|
|
@@ -1674,6 +2019,18 @@ declare class AptosConfig {
|
|
|
1674
2019
|
* @internal
|
|
1675
2020
|
*/
|
|
1676
2021
|
getRequestUrl(apiType: AptosApiType): string;
|
|
2022
|
+
/**
|
|
2023
|
+
* Checks if the URL is a known pepper service endpoint
|
|
2024
|
+
*
|
|
2025
|
+
* @internal
|
|
2026
|
+
* */
|
|
2027
|
+
isPepperServiceRequest(url: string): boolean;
|
|
2028
|
+
/**
|
|
2029
|
+
* Checks if the URL is a known prover service endpoint
|
|
2030
|
+
*
|
|
2031
|
+
* @internal
|
|
2032
|
+
* */
|
|
2033
|
+
isProverServiceRequest(url: string): boolean;
|
|
1677
2034
|
}
|
|
1678
2035
|
|
|
1679
2036
|
/**
|
|
@@ -2291,6 +2648,24 @@ type EntryFunctionArgumentTypes = Bool | U8 | U16 | U32 | U64 | U128 | U256 | Ac
|
|
|
2291
2648
|
* Script function arguments to be used when building a raw transaction using BCS serialized arguments
|
|
2292
2649
|
*/
|
|
2293
2650
|
type ScriptFunctionArgumentTypes = Bool | U8 | U16 | U32 | U64 | U128 | U256 | AccountAddress | MoveVector<U8> | MoveString | FixedBytes;
|
|
2651
|
+
/**
|
|
2652
|
+
* TypeArgument inputs for Entry functions, view functions, and scripts
|
|
2653
|
+
*
|
|
2654
|
+
* This can be a string version of the type argument such as:
|
|
2655
|
+
* - u8
|
|
2656
|
+
* - u16
|
|
2657
|
+
* - u32
|
|
2658
|
+
* - u64
|
|
2659
|
+
* - u128
|
|
2660
|
+
* - u256
|
|
2661
|
+
* - bool
|
|
2662
|
+
* - address
|
|
2663
|
+
* - signer
|
|
2664
|
+
* - vector<Type>
|
|
2665
|
+
* - address::module::struct
|
|
2666
|
+
* - address::module::struct<Type1, Type2>
|
|
2667
|
+
*/
|
|
2668
|
+
type TypeArgument = TypeTag | string;
|
|
2294
2669
|
/**
|
|
2295
2670
|
* Type that holds all raw transaction instances Aptos SDK supports
|
|
2296
2671
|
*/
|
|
@@ -2319,7 +2694,7 @@ type InputGenerateTransactionPayloadDataWithRemoteABI = InputScriptData | InputE
|
|
|
2319
2694
|
*/
|
|
2320
2695
|
type InputEntryFunctionData = {
|
|
2321
2696
|
function: MoveFunctionId;
|
|
2322
|
-
typeArguments?: Array<
|
|
2697
|
+
typeArguments?: Array<TypeArgument>;
|
|
2323
2698
|
functionArguments: Array<EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes>;
|
|
2324
2699
|
abi?: EntryFunctionABI;
|
|
2325
2700
|
};
|
|
@@ -2350,7 +2725,7 @@ type InputMultiSigDataWithRemoteABI = {
|
|
|
2350
2725
|
*/
|
|
2351
2726
|
type InputScriptData = {
|
|
2352
2727
|
bytecode: HexInput;
|
|
2353
|
-
typeArguments?: Array<
|
|
2728
|
+
typeArguments?: Array<TypeArgument>;
|
|
2354
2729
|
functionArguments: Array<ScriptFunctionArgumentTypes>;
|
|
2355
2730
|
};
|
|
2356
2731
|
/**
|
|
@@ -2358,7 +2733,7 @@ type InputScriptData = {
|
|
|
2358
2733
|
*/
|
|
2359
2734
|
type InputViewFunctionData = {
|
|
2360
2735
|
function: MoveFunctionId;
|
|
2361
|
-
typeArguments?: Array<
|
|
2736
|
+
typeArguments?: Array<TypeArgument>;
|
|
2362
2737
|
functionArguments?: Array<EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes>;
|
|
2363
2738
|
abi?: ViewFunctionABI;
|
|
2364
2739
|
};
|
|
@@ -2836,6 +3211,310 @@ declare class Ed25519Account implements Account$1 {
|
|
|
2836
3211
|
signTransaction(transaction: AnyRawTransaction): Ed25519Signature;
|
|
2837
3212
|
}
|
|
2838
3213
|
|
|
3214
|
+
declare class EphemeralKeyPair extends Serializable {
|
|
3215
|
+
static readonly BLINDER_LENGTH: number;
|
|
3216
|
+
/**
|
|
3217
|
+
* A byte array of length BLINDER_LENGTH used to obfuscate the public key from the IdP.
|
|
3218
|
+
* Used in calculating the nonce passed to the IdP and as a secret witness in proof generation.
|
|
3219
|
+
*/
|
|
3220
|
+
readonly blinder: Uint8Array;
|
|
3221
|
+
/**
|
|
3222
|
+
* A timestamp in seconds indicating when the ephemeral key pair is expired. After expiry, a new
|
|
3223
|
+
* EphemeralKeyPair must be generated and a new JWT needs to be created.
|
|
3224
|
+
*/
|
|
3225
|
+
readonly expiryDateSecs: number;
|
|
3226
|
+
/**
|
|
3227
|
+
* The value passed to the IdP when the user authenticates. It comprises of a hash of the
|
|
3228
|
+
* ephermeral public key, expiry date, and blinder.
|
|
3229
|
+
*/
|
|
3230
|
+
readonly nonce: string;
|
|
3231
|
+
/**
|
|
3232
|
+
* A private key used to sign transactions. This private key is not tied to any account on the chain as it
|
|
3233
|
+
* is ephemeral (not permanent) in nature.
|
|
3234
|
+
*/
|
|
3235
|
+
private privateKey;
|
|
3236
|
+
/**
|
|
3237
|
+
* A public key used to verify transactions. This public key is not tied to any account on the chain as it
|
|
3238
|
+
* is ephemeral (not permanent) in nature.
|
|
3239
|
+
*/
|
|
3240
|
+
private publicKey;
|
|
3241
|
+
constructor(args: {
|
|
3242
|
+
privateKey: PrivateKey;
|
|
3243
|
+
expiryDateSecs?: number;
|
|
3244
|
+
blinder?: HexInput;
|
|
3245
|
+
});
|
|
3246
|
+
/**
|
|
3247
|
+
* Returns the public key of the key pair.
|
|
3248
|
+
* @return EphemeralPublicKey
|
|
3249
|
+
*/
|
|
3250
|
+
getPublicKey(): EphemeralPublicKey;
|
|
3251
|
+
/**
|
|
3252
|
+
* Returns the public key of the key pair.
|
|
3253
|
+
* @return boolean
|
|
3254
|
+
*/
|
|
3255
|
+
isExpired(): boolean;
|
|
3256
|
+
serialize(serializer: Serializer): void;
|
|
3257
|
+
static deserialize(deserializer: Deserializer): EphemeralKeyPair;
|
|
3258
|
+
static fromBytes(bytes: Uint8Array): EphemeralKeyPair;
|
|
3259
|
+
/**
|
|
3260
|
+
* Returns the public key of the key pair.
|
|
3261
|
+
* @param scheme the type of keypair to use for the EphemeralKeyPair. Only Ed25519 supported for now.
|
|
3262
|
+
* @param expiryDateSecs the date of expiry.
|
|
3263
|
+
* @return boolean
|
|
3264
|
+
*/
|
|
3265
|
+
static generate(args?: {
|
|
3266
|
+
scheme: EphemeralPublicKeyVariant;
|
|
3267
|
+
expiryDateSecs?: number;
|
|
3268
|
+
}): EphemeralKeyPair;
|
|
3269
|
+
/**
|
|
3270
|
+
* From the ephemeral public key, expiry timestamp, and blinder, calculate the nonce to be used at authentication via OIDC.
|
|
3271
|
+
* @returns string
|
|
3272
|
+
*/
|
|
3273
|
+
private generateNonce;
|
|
3274
|
+
/**
|
|
3275
|
+
* Sign the given message with the private key.
|
|
3276
|
+
* @param data in HexInput format
|
|
3277
|
+
* @returns EphemeralSignature
|
|
3278
|
+
*/
|
|
3279
|
+
sign(data: HexInput): EphemeralSignature;
|
|
3280
|
+
}
|
|
3281
|
+
|
|
3282
|
+
/**
|
|
3283
|
+
* The API response type
|
|
3284
|
+
*
|
|
3285
|
+
* @param status - the response status. i.e. 200
|
|
3286
|
+
* @param statusText - the response message
|
|
3287
|
+
* @param data the response data
|
|
3288
|
+
* @param url the url the request was made to
|
|
3289
|
+
* @param headers the response headers
|
|
3290
|
+
* @param config (optional) - the request object
|
|
3291
|
+
* @param request (optional) - the request object
|
|
3292
|
+
*/
|
|
3293
|
+
interface AptosResponse<Req, Res> {
|
|
3294
|
+
status: number;
|
|
3295
|
+
statusText: string;
|
|
3296
|
+
data: Res;
|
|
3297
|
+
url: string;
|
|
3298
|
+
headers: any;
|
|
3299
|
+
config?: any;
|
|
3300
|
+
request?: Req;
|
|
3301
|
+
}
|
|
3302
|
+
/**
|
|
3303
|
+
* The type returned from an API error
|
|
3304
|
+
*
|
|
3305
|
+
* @param name - the error name "AptosApiError"
|
|
3306
|
+
* @param url the url the request was made to
|
|
3307
|
+
* @param status - the response status. i.e. 400
|
|
3308
|
+
* @param statusText - the response message
|
|
3309
|
+
* @param data the response data
|
|
3310
|
+
* @param request - the AptosRequest
|
|
3311
|
+
*/
|
|
3312
|
+
declare class AptosApiError extends Error {
|
|
3313
|
+
readonly url: string;
|
|
3314
|
+
readonly status: number;
|
|
3315
|
+
readonly statusText: string;
|
|
3316
|
+
readonly data: {
|
|
3317
|
+
message: string;
|
|
3318
|
+
error_code?: string;
|
|
3319
|
+
vm_error_code?: number;
|
|
3320
|
+
};
|
|
3321
|
+
readonly request: AptosRequest;
|
|
3322
|
+
constructor(request: AptosRequest, response: AptosResponse<any, any>, message: string);
|
|
3323
|
+
}
|
|
3324
|
+
|
|
3325
|
+
type AptsoDomainSeparator = `APTOS::${string}`;
|
|
3326
|
+
declare abstract class CryptoHashable extends Serializable {
|
|
3327
|
+
abstract readonly domainSeparator: AptsoDomainSeparator;
|
|
3328
|
+
/**
|
|
3329
|
+
* Hashes the bcs serialized from of the class. This is the typescript corollary to the BCSCryptoHash macro in aptos-core.
|
|
3330
|
+
*
|
|
3331
|
+
* @returns Uint8Array
|
|
3332
|
+
*/
|
|
3333
|
+
hash(): Uint8Array;
|
|
3334
|
+
}
|
|
3335
|
+
|
|
3336
|
+
declare const IssuerToJwkEndpoint: Record<string, string>;
|
|
3337
|
+
declare enum KeylessErrorType {
|
|
3338
|
+
JWK_EXPIRED = 0,
|
|
3339
|
+
EPK_EXPIRED = 1,
|
|
3340
|
+
PROOF_NOT_FOUND = 2,
|
|
3341
|
+
UNKNOWN_INVALID_SIGNATURE = 3,
|
|
3342
|
+
UNKNOWN = 4
|
|
3343
|
+
}
|
|
3344
|
+
declare class KeylessError extends Error {
|
|
3345
|
+
readonly type: KeylessErrorType;
|
|
3346
|
+
constructor(type: KeylessErrorType);
|
|
3347
|
+
static fromAptosApiError(error: AptosApiError, signer: KeylessAccount): Promise<KeylessError>;
|
|
3348
|
+
}
|
|
3349
|
+
/**
|
|
3350
|
+
* Account implementation for the Keyless authentication scheme.
|
|
3351
|
+
*
|
|
3352
|
+
* Used to represent a Keyless based account and sign transactions with it.
|
|
3353
|
+
*
|
|
3354
|
+
* Use KeylessAccount.fromJWTAndProof to instantiate a KeylessAccount with a JWT, proof and EphemeralKeyPair.
|
|
3355
|
+
*
|
|
3356
|
+
* When the proof expires or the JWT becomes invalid, the KeylessAccount must be instantiated again with a new JWT,
|
|
3357
|
+
* EphemeralKeyPair, and corresponding proof.
|
|
3358
|
+
*/
|
|
3359
|
+
declare class KeylessAccount extends Serializable implements Account$1 {
|
|
3360
|
+
static readonly PEPPER_LENGTH: number;
|
|
3361
|
+
/**
|
|
3362
|
+
* The KeylessPublicKey associated with the account
|
|
3363
|
+
*/
|
|
3364
|
+
readonly publicKey: KeylessPublicKey;
|
|
3365
|
+
/**
|
|
3366
|
+
* The EphemeralKeyPair used to generate sign.
|
|
3367
|
+
*/
|
|
3368
|
+
readonly ephemeralKeyPair: EphemeralKeyPair;
|
|
3369
|
+
/**
|
|
3370
|
+
* The claim on the JWT to identify a user. This is typically 'sub' or 'email'.
|
|
3371
|
+
*/
|
|
3372
|
+
readonly uidKey: string;
|
|
3373
|
+
/**
|
|
3374
|
+
* The value of the uidKey claim on the JWT. This intended to be a stable user identifier.
|
|
3375
|
+
*/
|
|
3376
|
+
readonly uidVal: string;
|
|
3377
|
+
/**
|
|
3378
|
+
* The value of the 'aud' claim on the JWT, also known as client ID. This is the identifier for the dApp's
|
|
3379
|
+
* OIDC registration with the identity provider.
|
|
3380
|
+
*/
|
|
3381
|
+
readonly aud: string;
|
|
3382
|
+
/**
|
|
3383
|
+
* A value contains 31 bytes of entropy that preserves privacy of the account. Typically fetched from a pepper provider.
|
|
3384
|
+
*/
|
|
3385
|
+
readonly pepper: Uint8Array;
|
|
3386
|
+
/**
|
|
3387
|
+
* Account address associated with the account
|
|
3388
|
+
*/
|
|
3389
|
+
readonly accountAddress: AccountAddress;
|
|
3390
|
+
/**
|
|
3391
|
+
* The zero knowledge signature (if ready) which contains the proof used to validate the EphemeralKeyPair.
|
|
3392
|
+
*/
|
|
3393
|
+
proof: ZeroKnowledgeSig | undefined;
|
|
3394
|
+
/**
|
|
3395
|
+
* The proof of the EphemeralKeyPair or a promise that provides the proof. This is used to allow for awaiting on
|
|
3396
|
+
* fetching the proof.
|
|
3397
|
+
*/
|
|
3398
|
+
readonly proofOrPromise: ZeroKnowledgeSig | Promise<ZeroKnowledgeSig>;
|
|
3399
|
+
/**
|
|
3400
|
+
* Signing scheme used to sign transactions
|
|
3401
|
+
*/
|
|
3402
|
+
readonly signingScheme: SigningScheme;
|
|
3403
|
+
/**
|
|
3404
|
+
* The JWT token used to derive the account
|
|
3405
|
+
*/
|
|
3406
|
+
private jwt;
|
|
3407
|
+
/**
|
|
3408
|
+
* A value that caches the JWT's validity. A JWT becomes invalid when it's corresponding JWK is rotated from the
|
|
3409
|
+
* identity provider's JWK keyset.
|
|
3410
|
+
*/
|
|
3411
|
+
private isJwtValid;
|
|
3412
|
+
/**
|
|
3413
|
+
* An event emitter used to assist in handling asycronous proof fetching.
|
|
3414
|
+
*/
|
|
3415
|
+
private readonly emitter;
|
|
3416
|
+
constructor(args: {
|
|
3417
|
+
address?: AccountAddress;
|
|
3418
|
+
ephemeralKeyPair: EphemeralKeyPair;
|
|
3419
|
+
iss: string;
|
|
3420
|
+
uidKey: string;
|
|
3421
|
+
uidVal: string;
|
|
3422
|
+
aud: string;
|
|
3423
|
+
pepper: HexInput;
|
|
3424
|
+
proofOrFetcher: ZeroKnowledgeSig | Promise<ZeroKnowledgeSig>;
|
|
3425
|
+
proofFetchCallback?: ProofFetchCallback;
|
|
3426
|
+
jwt: string;
|
|
3427
|
+
});
|
|
3428
|
+
/**
|
|
3429
|
+
* This initializes the asyncronous proof fetch
|
|
3430
|
+
* @return
|
|
3431
|
+
*/
|
|
3432
|
+
init(promise: Promise<ZeroKnowledgeSig>): Promise<void>;
|
|
3433
|
+
serialize(serializer: Serializer): void;
|
|
3434
|
+
static deserialize(deserializer: Deserializer): KeylessAccount;
|
|
3435
|
+
/**
|
|
3436
|
+
* Checks if the proof is expired. If so the account must be rederived with a new EphemeralKeyPair
|
|
3437
|
+
* and JWT token.
|
|
3438
|
+
* @return boolean
|
|
3439
|
+
*/
|
|
3440
|
+
isExpired(): boolean;
|
|
3441
|
+
/**
|
|
3442
|
+
* Sign a message using Keyless.
|
|
3443
|
+
* @param message the message to sign, as binary input
|
|
3444
|
+
* @return the AccountAuthenticator containing the signature, together with the account's public key
|
|
3445
|
+
*/
|
|
3446
|
+
signWithAuthenticator(message: HexInput): AccountAuthenticatorSingleKey;
|
|
3447
|
+
/**
|
|
3448
|
+
* Sign a transaction using Keyless.
|
|
3449
|
+
* @param transaction the raw transaction
|
|
3450
|
+
* @return the AccountAuthenticator containing the signature of the transaction, together with the account's public key
|
|
3451
|
+
*/
|
|
3452
|
+
signTransactionWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorSingleKey;
|
|
3453
|
+
/**
|
|
3454
|
+
* Waits for asyncronous proof fetching to finish.
|
|
3455
|
+
* @return
|
|
3456
|
+
*/
|
|
3457
|
+
waitForProofFetch(): Promise<void>;
|
|
3458
|
+
/**
|
|
3459
|
+
* Sign the given message using Keyless.
|
|
3460
|
+
* @param message in HexInput format
|
|
3461
|
+
* @returns Signature
|
|
3462
|
+
*/
|
|
3463
|
+
sign(data: HexInput): KeylessSignature;
|
|
3464
|
+
/**
|
|
3465
|
+
* Sign the given transaction with Keyless.
|
|
3466
|
+
* Signs the transaction and proof to guard against proof malleability.
|
|
3467
|
+
* @param transaction the transaction to be signed
|
|
3468
|
+
* @returns KeylessSignature
|
|
3469
|
+
*/
|
|
3470
|
+
signTransaction(transaction: AnyRawTransaction): KeylessSignature;
|
|
3471
|
+
verifySignature(args: {
|
|
3472
|
+
message: HexInput;
|
|
3473
|
+
signature: Signature;
|
|
3474
|
+
}): boolean;
|
|
3475
|
+
static fromBytes(bytes: Uint8Array): KeylessAccount;
|
|
3476
|
+
static fromJWTAndProof(args: {
|
|
3477
|
+
proof: ZeroKnowledgeSig | Promise<ZeroKnowledgeSig>;
|
|
3478
|
+
jwt: string;
|
|
3479
|
+
ephemeralKeyPair: EphemeralKeyPair;
|
|
3480
|
+
pepper: HexInput;
|
|
3481
|
+
uidKey?: string;
|
|
3482
|
+
proofFetchCallback?: ProofFetchCallback;
|
|
3483
|
+
}): KeylessAccount;
|
|
3484
|
+
}
|
|
3485
|
+
/**
|
|
3486
|
+
* A container class to hold a transaction and a proof. It implements CryptoHashable which is used to create
|
|
3487
|
+
* the signing message for Keyless transactions. We sign over the proof to ensure non-malleability.
|
|
3488
|
+
*/
|
|
3489
|
+
declare class TransactionAndProof extends CryptoHashable {
|
|
3490
|
+
/**
|
|
3491
|
+
* The transaction to sign.
|
|
3492
|
+
*/
|
|
3493
|
+
transaction: AnyRawTransactionInstance;
|
|
3494
|
+
/**
|
|
3495
|
+
* The zero knowledge proof used in signing the transaction.
|
|
3496
|
+
*/
|
|
3497
|
+
proof?: ZkProof;
|
|
3498
|
+
/**
|
|
3499
|
+
* The domain separator prefix used when hashing.
|
|
3500
|
+
*/
|
|
3501
|
+
domainSeparator: AptsoDomainSeparator;
|
|
3502
|
+
constructor(transaction: AnyRawTransactionInstance, proof?: ZkProof);
|
|
3503
|
+
serialize(serializer: Serializer): void;
|
|
3504
|
+
}
|
|
3505
|
+
type ProofFetchSuccess = {
|
|
3506
|
+
status: "Success";
|
|
3507
|
+
};
|
|
3508
|
+
type ProofFetchFailure = {
|
|
3509
|
+
status: "Failed";
|
|
3510
|
+
error: string;
|
|
3511
|
+
};
|
|
3512
|
+
type ProofFetchStatus = ProofFetchSuccess | ProofFetchFailure;
|
|
3513
|
+
type ProofFetchCallback = (status: ProofFetchStatus) => Promise<void>;
|
|
3514
|
+
interface ProofFetchEvents {
|
|
3515
|
+
proofFetchFinish: (status: ProofFetchStatus) => void;
|
|
3516
|
+
}
|
|
3517
|
+
|
|
2839
3518
|
interface VerifyMultiKeySignatureArgs {
|
|
2840
3519
|
message: HexInput;
|
|
2841
3520
|
signature: MultiKeySignature;
|
|
@@ -2911,6 +3590,12 @@ declare class MultiKeyAccount implements Account$1 {
|
|
|
2911
3590
|
* @return the AccountAuthenticator containing the signature of the transaction, together with the account's public key
|
|
2912
3591
|
*/
|
|
2913
3592
|
signTransactionWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorMultiKey;
|
|
3593
|
+
/**
|
|
3594
|
+
* Waits for any proofs on any KeylessAccount signers to be fetched. If the proof is fetched a syncronously, call this
|
|
3595
|
+
* to ensure signing with the KeylessAccount does not fail as the proof must be ready.
|
|
3596
|
+
* @return
|
|
3597
|
+
*/
|
|
3598
|
+
waitForProofFetch(): Promise<void>;
|
|
2914
3599
|
/**
|
|
2915
3600
|
* Sign the given message using the MultiKeyAccount's signers
|
|
2916
3601
|
* @param message in HexInput format
|
|
@@ -4082,7 +4767,7 @@ declare function generateUserTransactionHash(args: InputSubmitTransactionData):
|
|
|
4082
4767
|
/**
|
|
4083
4768
|
* Convert type arguments to only type tags, allowing for string representations of type tags
|
|
4084
4769
|
*/
|
|
4085
|
-
declare function standardizeTypeTags(typeArguments?: Array<
|
|
4770
|
+
declare function standardizeTypeTags(typeArguments?: Array<TypeArgument>): Array<TypeTag>;
|
|
4086
4771
|
/**
|
|
4087
4772
|
* Fetches a function ABI from the on-chain module ABI. It doesn't validate whether it's a view or entry function.
|
|
4088
4773
|
* @param moduleAddress
|
|
@@ -4136,15 +4821,6 @@ declare function deriveTransactionType(transaction: AnyRawTransaction): AnyRawTr
|
|
|
4136
4821
|
* @returns The Uint8Array of the signing message
|
|
4137
4822
|
*/
|
|
4138
4823
|
declare function generateSigningMessage(bytes: Uint8Array, domainSeparator: string): Uint8Array;
|
|
4139
|
-
/**
|
|
4140
|
-
* Generates the 'signing message' form of a serilizable value. It bcs serializes the value and uses the name of
|
|
4141
|
-
* its constructor as the domain separator.
|
|
4142
|
-
*
|
|
4143
|
-
* @param serializable An object that has a bcs serialized form
|
|
4144
|
-
*
|
|
4145
|
-
* @returns The Uint8Array of the signing message
|
|
4146
|
-
*/
|
|
4147
|
-
declare function generateSigningMessageForSerializable(serializable: Serializable): Uint8Array;
|
|
4148
4824
|
/**
|
|
4149
4825
|
* Generates the 'signing message' form of a transaction. It derives the type of transaction and
|
|
4150
4826
|
* applies the appropriate domain separator based on if there is extra data such as a fee payer or
|
|
@@ -4164,11 +4840,13 @@ declare enum TypeTagParserErrorType {
|
|
|
4164
4840
|
UnexpectedComma = "unexpected ','",
|
|
4165
4841
|
TypeArgumentCountMismatch = "type argument count doesn't match expected amount",
|
|
4166
4842
|
MissingTypeArgumentClose = "no matching '>' for '<'",
|
|
4843
|
+
MissingTypeArgument = "no type argument before ','",
|
|
4167
4844
|
UnexpectedPrimitiveTypeArguments = "primitive types not expected to have type arguments",
|
|
4168
4845
|
UnexpectedVectorTypeArgumentCount = "vector type expected to have exactly one type argument",
|
|
4169
4846
|
UnexpectedStructFormat = "unexpected struct format, must be of the form 0xaddress::module_name::struct_name",
|
|
4170
4847
|
InvalidModuleNameCharacter = "module name must only contain alphanumeric or '_' characters",
|
|
4171
|
-
InvalidStructNameCharacter = "struct name must only contain alphanumeric or '_' characters"
|
|
4848
|
+
InvalidStructNameCharacter = "struct name must only contain alphanumeric or '_' characters",
|
|
4849
|
+
InvalidAddress = "struct address must be valid"
|
|
4172
4850
|
}
|
|
4173
4851
|
declare class TypeTagParserError extends Error {
|
|
4174
4852
|
constructor(typeTagStr: string, invalidReason: TypeTagParserErrorType);
|
|
@@ -5509,6 +6187,50 @@ declare class Table {
|
|
|
5509
6187
|
}): Promise<GetTableItemsMetadataResponse>;
|
|
5510
6188
|
}
|
|
5511
6189
|
|
|
6190
|
+
/**
|
|
6191
|
+
* A class to query all `Keyless` related queries on Aptos.
|
|
6192
|
+
*/
|
|
6193
|
+
declare class Keyless {
|
|
6194
|
+
readonly config: AptosConfig;
|
|
6195
|
+
constructor(config: AptosConfig);
|
|
6196
|
+
/**
|
|
6197
|
+
* Gets the parameters of how Keyless Accounts are configured on chain.
|
|
6198
|
+
*
|
|
6199
|
+
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
6200
|
+
* @returns KeylessConfiguration
|
|
6201
|
+
*/
|
|
6202
|
+
getKeylessConfig(options?: LedgerVersionArg): Promise<KeylessConfiguration>;
|
|
6203
|
+
/**
|
|
6204
|
+
* Fetches the pepper from the Aptos pepper service API.
|
|
6205
|
+
*
|
|
6206
|
+
* @param args.jwt JWT token
|
|
6207
|
+
* @param args.ephemeralKeyPair the EphemeralKeyPair used to generate the nonce in the JWT token
|
|
6208
|
+
* @returns The pepper which is a Uint8Array of length 31.
|
|
6209
|
+
*/
|
|
6210
|
+
getPepper(args: {
|
|
6211
|
+
jwt: string;
|
|
6212
|
+
ephemeralKeyPair: EphemeralKeyPair;
|
|
6213
|
+
}): Promise<Uint8Array>;
|
|
6214
|
+
/**
|
|
6215
|
+
* Fetches the pepper from the Aptos pepper service API.
|
|
6216
|
+
*
|
|
6217
|
+
* @param args.jwt JWT token
|
|
6218
|
+
* @param args.ephemeralKeyPair the EphemeralKeyPair used to generate the nonce in the JWT token
|
|
6219
|
+
* @param args.uidKey a key in the JWT token to use to set the uidVal in the IdCommitment
|
|
6220
|
+
* @param args.pepper the pepper
|
|
6221
|
+
* @param args.proofFetchCallback a callback function that if set, the fetch of the proof will be done asyncronously. Once
|
|
6222
|
+
* if finishes the callback function will be called.
|
|
6223
|
+
* @returns A KeylessAccount that can be used to sign transactions
|
|
6224
|
+
*/
|
|
6225
|
+
deriveKeylessAccount(args: {
|
|
6226
|
+
jwt: string;
|
|
6227
|
+
ephemeralKeyPair: EphemeralKeyPair;
|
|
6228
|
+
uidKey?: string;
|
|
6229
|
+
pepper?: HexInput;
|
|
6230
|
+
proofFetchCallback?: ProofFetchCallback;
|
|
6231
|
+
}): Promise<KeylessAccount>;
|
|
6232
|
+
}
|
|
6233
|
+
|
|
5512
6234
|
/**
|
|
5513
6235
|
* This class is the main entry point into Aptos's
|
|
5514
6236
|
* APIs and separates functionality into different namespaces.
|
|
@@ -5533,48 +6255,10 @@ declare class Aptos {
|
|
|
5533
6255
|
readonly staking: Staking;
|
|
5534
6256
|
readonly transaction: Transaction;
|
|
5535
6257
|
readonly table: Table;
|
|
6258
|
+
readonly keyless: Keyless;
|
|
5536
6259
|
constructor(settings?: AptosConfig);
|
|
5537
6260
|
}
|
|
5538
|
-
interface Aptos extends Account, ANS, Coin, DigitalAsset, Event, Faucet, FungibleAsset, General, Staking, Table, Omit<Transaction, "build" | "simulate" | "submit" | "batch"> {
|
|
5539
|
-
}
|
|
5540
|
-
|
|
5541
|
-
/**
|
|
5542
|
-
* The API response type
|
|
5543
|
-
*
|
|
5544
|
-
* @param status - the response status. i.e. 200
|
|
5545
|
-
* @param statusText - the response message
|
|
5546
|
-
* @param data the response data
|
|
5547
|
-
* @param url the url the request was made to
|
|
5548
|
-
* @param headers the response headers
|
|
5549
|
-
* @param config (optional) - the request object
|
|
5550
|
-
* @param request (optional) - the request object
|
|
5551
|
-
*/
|
|
5552
|
-
interface AptosResponse<Req, Res> {
|
|
5553
|
-
status: number;
|
|
5554
|
-
statusText: string;
|
|
5555
|
-
data: Res;
|
|
5556
|
-
url: string;
|
|
5557
|
-
headers: any;
|
|
5558
|
-
config?: any;
|
|
5559
|
-
request?: Req;
|
|
5560
|
-
}
|
|
5561
|
-
/**
|
|
5562
|
-
* The type returned from an API error
|
|
5563
|
-
*
|
|
5564
|
-
* @param name - the error name "AptosApiError"
|
|
5565
|
-
* @param url the url the request was made to
|
|
5566
|
-
* @param status - the response status. i.e. 400
|
|
5567
|
-
* @param statusText - the response message
|
|
5568
|
-
* @param data the response data
|
|
5569
|
-
* @param request - the AptosRequest
|
|
5570
|
-
*/
|
|
5571
|
-
declare class AptosApiError extends Error {
|
|
5572
|
-
readonly url: string;
|
|
5573
|
-
readonly status: number;
|
|
5574
|
-
readonly statusText: string;
|
|
5575
|
-
readonly data: any;
|
|
5576
|
-
readonly request: AptosRequest;
|
|
5577
|
-
constructor(request: AptosRequest, response: AptosResponse<any, any>, message: string);
|
|
6261
|
+
interface Aptos extends Account, ANS, Coin, DigitalAsset, Event, Faucet, FungibleAsset, General, Keyless, Staking, Table, Omit<Transaction, "build" | "simulate" | "submit" | "batch"> {
|
|
5578
6262
|
}
|
|
5579
6263
|
|
|
5580
6264
|
type DeserializableClass<T extends Serializable> = {
|
|
@@ -5646,6 +6330,13 @@ type GetAptosRequestOptions = Omit<GetRequestOptions, "type">;
|
|
|
5646
6330
|
*/
|
|
5647
6331
|
declare function get<Req extends {}, Res extends {}>(options: GetRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
5648
6332
|
declare function getAptosFullNode<Req extends {}, Res extends {}>(options: GetAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
6333
|
+
/**
|
|
6334
|
+
* Makes a get request to the pepper service
|
|
6335
|
+
*
|
|
6336
|
+
* @param options GetAptosRequestOptions
|
|
6337
|
+
* @returns AptosResponse
|
|
6338
|
+
*/
|
|
6339
|
+
declare function getAptosPepperService<Req extends {}, Res extends {}>(options: GetAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
5649
6340
|
declare function paginateWithCursor<Req extends Record<string, any>, Res extends Array<{}>>(options: GetAptosRequestOptions): Promise<Res>;
|
|
5650
6341
|
|
|
5651
6342
|
type PostRequestOptions = {
|
|
@@ -5697,5 +6388,13 @@ declare function post<Req extends {}, Res extends {}>(options: PostRequestOption
|
|
|
5697
6388
|
declare function postAptosFullNode<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
5698
6389
|
declare function postAptosIndexer<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
5699
6390
|
declare function postAptosFaucet<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
6391
|
+
/**
|
|
6392
|
+
* Makes a post request to the pepper service
|
|
6393
|
+
*
|
|
6394
|
+
* @param options GetAptosRequestOptions
|
|
6395
|
+
* @returns AptosResponse
|
|
6396
|
+
*/
|
|
6397
|
+
declare function postAptosPepperService<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
6398
|
+
declare function postAptosProvingService<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
5700
6399
|
|
|
5701
|
-
export { APTOS_BIP44_REGEX, APTOS_COIN, APTOS_HARDENED_REGEX, Account$1 as Account, AccountAddress, AccountAddressInput, AccountAuthenticator, AccountAuthenticatorEd25519, AccountAuthenticatorMultiEd25519, AccountAuthenticatorMultiKey, AccountAuthenticatorSingleKey, AccountData, AccountPublicKey, AccountSequenceNumber, AnyNumber, AnyPublicKey, AnyPublicKeyVariant, type AnyRawTransaction, type AnyRawTransactionInstance, AnySignature, type AnyTransactionPayloadInstance, Aptos, AptosApiError, AptosApiType, AptosConfig, AptosRequest, type AptosResponse, AptosSettings, AuthenticationKey, AuthenticationKeyScheme, Block, Bool, CKDPriv, ChainId, Client, ClientConfig, ClientRequest, ClientResponse, CommittedTransactionResponse, type CreateAccountFromPrivateKeyArgs, type CreateEd25519AccountFromPrivateKeyArgs, type CreateEd25519SingleKeyAccountFromPrivateKeyArgs, type CreateSingleKeyAccountFromPrivateKeyArgs, DEFAULT_MAX_GAS_AMOUNT, DEFAULT_TXN_EXP_SEC_FROM_NOW, DEFAULT_TXN_TIMEOUT_SEC, type DerivedKeys, Deserializable, type DeserializableClass, Deserializer, Ed25519Account, Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature, type Ed25519SignerConstructorArgs, type Ed25519SignerFromDerivationPathArgs, EntryFunction, type EntryFunctionABI, EntryFunctionArgument, type EntryFunctionArgumentTypes, EntryFunctionBytes, type ExecutionFinishEventData, type FailureEventData, FaucetConfig, FeePayerRawTransaction, FixedBytes, FullNodeConfig, type FunctionABI, GasEstimation, type GenerateAccountArgs, type GenerateEd25519AccountArgs, type GenerateEd25519SingleKeyAccountArgs, type GenerateSingleKeyAccountArgs, GetANSNameResponse, GetAccountCoinsDataResponse, GetAccountCollectionsWithOwnedTokenResponse, GetAccountOwnedObjectsResponse, GetAccountOwnedTokensFromCollectionResponse, GetAccountOwnedTokensQueryResponse, type GetAptosRequestOptions, GetChainTopUserTransactionsResponse, GetCollectionDataResponse, GetCurrentFungibleAssetBalancesResponse, GetCurrentTokenOwnershipResponse, GetDelegatedStakingActivitiesResponse, GetEventsResponse, GetFungibleAssetActivitiesResponse, GetFungibleAssetMetadataResponse, GetNumberOfDelegatorsResponse, GetOwnedTokensResponse, GetProcessorStatusResponse, type GetRequestOptions, GetTableItemsDataResponse, GetTableItemsMetadataResponse, GetTokenActivityResponse, GetTokenDataResponse, GraphqlQuery, HARDENED_OFFSET, Hex, HexInput, Identifier, IndexerConfig, type InputEntryFunctionData, type InputEntryFunctionDataWithABI, type InputEntryFunctionDataWithRemoteABI, type InputGenerateMultiAgentRawTransactionArgs, type InputGenerateMultiAgentRawTransactionData, type InputGenerateRawTransactionArgs, type InputGenerateSingleSignerRawTransactionArgs, type InputGenerateSingleSignerRawTransactionData, type InputGenerateTransactionData, type InputGenerateTransactionOptions, type InputGenerateTransactionPayloadData, type InputGenerateTransactionPayloadDataWithABI, type InputGenerateTransactionPayloadDataWithRemoteABI, type InputMultiSigData, type InputMultiSigDataWithABI, type InputMultiSigDataWithRemoteABI, type InputScriptData, type InputSimulateTransactionData, type InputSimulateTransactionOptions, type InputSubmitTransactionData, type InputViewFunctionData, type InputViewFunctionDataWithABI, type InputViewFunctionDataWithRemoteABI, KeyType, LedgerInfo, LedgerVersionArg, MimeType, ModuleId, MoveFunction, MoveFunctionGenericTypeParam, MoveFunctionId, MoveModuleBytecode, MoveModuleId, MoveOption, MoveResource, MoveString, MoveStructId, MoveValue, MoveVector, MultiAgentRawTransaction, MultiAgentTransaction, MultiEd25519PublicKey, MultiEd25519Signature, MultiKey, MultiKeyAccount, MultiKeySignature, MultiSig, MultiSigTransactionPayload, Network, OrderByArg, PaginationArgs, PendingTransactionResponse, type PostAptosRequestOptions, type PostRequestOptions, type PrivateKey, type PrivateKeyFromDerivationPathArgs, ProcessorType, PublicKey, RAW_TRANSACTION_SALT, RAW_TRANSACTION_WITH_DATA_SALT, RawTransaction, RawTransactionWithData, RotationProofChallenge, Script, ScriptFunctionArgument, type ScriptFunctionArgumentTypes, Secp256k1PrivateKey, Secp256k1PublicKey, Secp256k1Signature, Serializable, Serializer, Signature, SignedTransaction, SigningScheme, SigningSchemeInput, type SimpleEntryFunctionArgumentTypes, SimpleTransaction, SingleKeyAccount, type SingleKeySignerConstructorArgs, type SingleKeySignerFromDerivationPathArgs, type SingleKeySignerGenerateArgs, StructTag, type SuccessEventData, TableItemRequest, TokenStandardArg, TransactionArgument, TransactionAuthenticator, TransactionAuthenticatorEd25519, TransactionAuthenticatorFeePayer, TransactionAuthenticatorMultiAgent, TransactionAuthenticatorMultiEd25519, TransactionAuthenticatorSingleSender, TransactionPayload, TransactionPayloadEntryFunction, TransactionPayloadMultiSig, TransactionPayloadScript, TransactionResponse, TransactionWorker, type TransactionWorkerEvents, TransactionWorkerEventsEnum, TypeTag, TypeTagAddress, TypeTagBool, TypeTagGeneric, TypeTagParserError, TypeTagParserErrorType, TypeTagReference, TypeTagSigner, TypeTagStruct, TypeTagU128, TypeTagU16, TypeTagU256, TypeTagU32, TypeTagU64, TypeTagU8, TypeTagVector, U128, U16, U256, U32, U64, U8, Uint16, Uint32, Uint8, UserTransactionResponse, type VerifyEd25519SignatureArgs, type VerifyMultiKeySignatureArgs, type VerifySignatureArgs, type VerifySingleKeySignatureArgs, type ViewFunctionABI, WaitForTransactionOptions, WhereArg, aptosCoinStructTag, aptosRequest, buildTransaction, checkOrConvertArgument, convertArgument, deriveKey, deriveTransactionType, deserializeFromScriptArgument, fetchEntryFunctionAbi, fetchFunctionAbi, fetchViewFunctionAbi, findFirstNonSignerArg, generateRawTransaction, generateSignedTransaction, generateSignedTransactionForSimulation, generateSigningMessage,
|
|
6400
|
+
export { APTOS_BIP44_REGEX, APTOS_COIN, APTOS_HARDENED_REGEX, Account$1 as Account, AccountAddress, AccountAddressInput, AccountAuthenticator, AccountAuthenticatorEd25519, AccountAuthenticatorMultiEd25519, AccountAuthenticatorMultiKey, AccountAuthenticatorSingleKey, AccountData, AccountPublicKey, AccountSequenceNumber, AnyNumber, AnyPublicKey, AnyPublicKeyVariant, type AnyRawTransaction, type AnyRawTransactionInstance, AnySignature, type AnyTransactionPayloadInstance, Aptos, AptosApiError, AptosApiType, AptosConfig, AptosRequest, type AptosResponse, AptosSettings, AuthenticationKey, AuthenticationKeyScheme, Block, Bool, CKDPriv, ChainId, Client, ClientConfig, ClientRequest, ClientResponse, CommittedTransactionResponse, type CreateAccountFromPrivateKeyArgs, type CreateEd25519AccountFromPrivateKeyArgs, type CreateEd25519SingleKeyAccountFromPrivateKeyArgs, type CreateSingleKeyAccountFromPrivateKeyArgs, DEFAULT_MAX_GAS_AMOUNT, DEFAULT_TXN_EXP_SEC_FROM_NOW, DEFAULT_TXN_TIMEOUT_SEC, type DerivedKeys, Deserializable, type DeserializableClass, Deserializer, EPK_HORIZON_SECS, Ed25519Account, Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature, type Ed25519SignerConstructorArgs, type Ed25519SignerFromDerivationPathArgs, EntryFunction, type EntryFunctionABI, EntryFunctionArgument, type EntryFunctionArgumentTypes, EntryFunctionBytes, EphemeralCertificate, EphemeralCertificateVariant, EphemeralKeyPair, EphemeralPublicKey, EphemeralPublicKeyVariant, EphemeralSignature, type ExecutionFinishEventData, type FailureEventData, FaucetConfig, FeePayerRawTransaction, FixedBytes, FullNodeConfig, type FunctionABI, GasEstimation, type GenerateAccountArgs, type GenerateEd25519AccountArgs, type GenerateEd25519SingleKeyAccountArgs, type GenerateSingleKeyAccountArgs, GetANSNameResponse, GetAccountCoinsDataResponse, GetAccountCollectionsWithOwnedTokenResponse, GetAccountOwnedObjectsResponse, GetAccountOwnedTokensFromCollectionResponse, GetAccountOwnedTokensQueryResponse, type GetAptosRequestOptions, GetChainTopUserTransactionsResponse, GetCollectionDataResponse, GetCurrentFungibleAssetBalancesResponse, GetCurrentTokenOwnershipResponse, GetDelegatedStakingActivitiesResponse, GetEventsResponse, GetFungibleAssetActivitiesResponse, GetFungibleAssetMetadataResponse, GetNumberOfDelegatorsResponse, GetOwnedTokensResponse, GetProcessorStatusResponse, type GetRequestOptions, GetTableItemsDataResponse, GetTableItemsMetadataResponse, GetTokenActivityResponse, GetTokenDataResponse, GraphqlQuery, Groth16Zkp, HARDENED_OFFSET, Hex, HexInput, Identifier, IndexerConfig, type InputEntryFunctionData, type InputEntryFunctionDataWithABI, type InputEntryFunctionDataWithRemoteABI, type InputGenerateMultiAgentRawTransactionArgs, type InputGenerateMultiAgentRawTransactionData, type InputGenerateRawTransactionArgs, type InputGenerateSingleSignerRawTransactionArgs, type InputGenerateSingleSignerRawTransactionData, type InputGenerateTransactionData, type InputGenerateTransactionOptions, type InputGenerateTransactionPayloadData, type InputGenerateTransactionPayloadDataWithABI, type InputGenerateTransactionPayloadDataWithRemoteABI, type InputMultiSigData, type InputMultiSigDataWithABI, type InputMultiSigDataWithRemoteABI, type InputScriptData, type InputSimulateTransactionData, type InputSimulateTransactionOptions, type InputSubmitTransactionData, type InputViewFunctionData, type InputViewFunctionDataWithABI, type InputViewFunctionDataWithRemoteABI, IssuerToJwkEndpoint, KeyType, KeylessAccount, KeylessConfiguration, KeylessError, KeylessErrorType, KeylessPublicKey, KeylessSignature, LedgerInfo, LedgerVersionArg, MAX_AUD_VAL_BYTES, MAX_COMMITED_EPK_BYTES, MAX_EXTRA_FIELD_BYTES, MAX_ISS_VAL_BYTES, MAX_JWT_HEADER_B64_BYTES, MAX_UID_KEY_BYTES, MAX_UID_VAL_BYTES, MimeType, ModuleId, MoveFunction, MoveFunctionGenericTypeParam, MoveFunctionId, MoveModuleBytecode, MoveModuleId, MoveOption, MoveResource, MoveString, MoveStructId, MoveValue, MoveVector, MultiAgentRawTransaction, MultiAgentTransaction, MultiEd25519PublicKey, MultiEd25519Signature, MultiKey, MultiKeyAccount, MultiKeySignature, MultiSig, MultiSigTransactionPayload, Network, OrderByArg, PaginationArgs, PendingTransactionResponse, type PostAptosRequestOptions, type PostRequestOptions, type PrivateKey, type PrivateKeyFromDerivationPathArgs, ProcessorType, type ProofFetchCallback, type ProofFetchEvents, type ProofFetchFailure, type ProofFetchStatus, type ProofFetchSuccess, PublicKey, RAW_TRANSACTION_SALT, RAW_TRANSACTION_WITH_DATA_SALT, RawTransaction, RawTransactionWithData, RotationProofChallenge, Script, ScriptFunctionArgument, type ScriptFunctionArgumentTypes, Secp256k1PrivateKey, Secp256k1PublicKey, Secp256k1Signature, Serializable, Serializer, Signature, SignedTransaction, SigningScheme, SigningSchemeInput, type SimpleEntryFunctionArgumentTypes, SimpleTransaction, SingleKeyAccount, type SingleKeySignerConstructorArgs, type SingleKeySignerFromDerivationPathArgs, type SingleKeySignerGenerateArgs, StructTag, type SuccessEventData, TableItemRequest, TokenStandardArg, TransactionAndProof, TransactionArgument, TransactionAuthenticator, TransactionAuthenticatorEd25519, TransactionAuthenticatorFeePayer, TransactionAuthenticatorMultiAgent, TransactionAuthenticatorMultiEd25519, TransactionAuthenticatorSingleSender, TransactionPayload, TransactionPayloadEntryFunction, TransactionPayloadMultiSig, TransactionPayloadScript, TransactionResponse, TransactionWorker, type TransactionWorkerEvents, TransactionWorkerEventsEnum, type TypeArgument, TypeTag, TypeTagAddress, TypeTagBool, TypeTagGeneric, TypeTagParserError, TypeTagParserErrorType, TypeTagReference, TypeTagSigner, TypeTagStruct, TypeTagU128, TypeTagU16, TypeTagU256, TypeTagU32, TypeTagU64, TypeTagU8, TypeTagVector, U128, U16, U256, U32, U64, U8, Uint16, Uint32, Uint8, UserTransactionResponse, type VerifyEd25519SignatureArgs, type VerifyMultiKeySignatureArgs, type VerifySignatureArgs, type VerifySingleKeySignatureArgs, type ViewFunctionABI, WaitForTransactionOptions, WhereArg, ZeroKnowledgeSig, ZkProof, ZkpVariant, aptosCoinStructTag, aptosRequest, buildTransaction, checkOrConvertArgument, convertArgument, deriveKey, deriveTransactionType, deserializeFromScriptArgument, fetchEntryFunctionAbi, fetchFunctionAbi, fetchViewFunctionAbi, findFirstNonSignerArg, generateRawTransaction, generateSignedTransaction, generateSignedTransactionForSimulation, generateSigningMessage, generateSigningMessageForTransaction, generateTransactionPayload, generateTransactionPayloadWithABI, generateUserTransactionHash, generateViewFunctionPayload, generateViewFunctionPayloadWithABI, get, getAptosFullNode, getAptosPepperService, getAuthenticatorForSimulation, getFunctionParts, hashValues, isBcsAddress, isBcsBool, isBcsFixedBytes, isBcsString, isBcsU128, isBcsU16, isBcsU256, isBcsU32, isBcsU64, isBcsU8, isBool, isEncodedEntryFunctionArgument, isLargeNumber, isNull, isNumber, isScriptDataInput, isString, isValidBIP44Path, isValidHardenedPath, mnemonicToSeed, normalizeBundle, objectStructTag, optionStructTag, paginateWithCursor, parseTypeTag, post, postAptosFaucet, postAptosFullNode, postAptosIndexer, postAptosPepperService, postAptosProvingService, promiseFulfilledStatus, request, splitPath, standardizeTypeTags, stringStructTag, throwTypeMismatch };
|