@aptos-labs/ts-sdk 1.17.0 → 1.18.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-Lv-GSihU.d.ts} +107 -13
- package/dist/common/chunk-BHKSQXUZ.js +2 -0
- package/dist/common/chunk-BHKSQXUZ.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 +808 -117
- package/dist/common/index.js +30 -28
- package/dist/common/index.js.map +1 -1
- package/dist/esm/account/Account.mjs +1 -1
- 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 +175 -0
- package/dist/esm/account/KeylessAccount.mjs +2 -0
- package/dist/esm/account/MultiKeyAccount.d.mts +11 -5
- package/dist/esm/account/MultiKeyAccount.mjs +1 -1
- package/dist/esm/account/SingleKeyAccount.mjs +1 -1
- package/dist/esm/account/index.d.mts +6 -0
- 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 +9 -1
- 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 +2 -2
- 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.mjs +1 -1
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +7 -0
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/keyless.d.mts +104 -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.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.d.mts +2 -2
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.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 +2 -2
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.d.mts +2 -2
- 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-TQLED4KC.mjs → chunk-2DSPX6BX.mjs} +2 -2
- package/dist/esm/chunk-2QWQ6RX5.mjs +2 -0
- package/dist/esm/chunk-2QWQ6RX5.mjs.map +1 -0
- package/dist/esm/chunk-362JBD4O.mjs +2 -0
- package/dist/esm/{chunk-SUAMDMAA.mjs.map → chunk-362JBD4O.mjs.map} +1 -1
- package/dist/esm/{chunk-RWXHA4QZ.mjs → chunk-3VUSIKCF.mjs} +2 -2
- package/dist/esm/chunk-3ZCQQ3L2.mjs +2 -0
- package/dist/esm/chunk-3ZCQQ3L2.mjs.map +1 -0
- package/dist/esm/chunk-42SZQH5Z.mjs +2 -0
- package/dist/esm/chunk-42SZQH5Z.mjs.map +1 -0
- package/dist/esm/{chunk-MCRRHBFQ.mjs → chunk-4EPLOSKY.mjs} +2 -2
- package/dist/esm/{chunk-BSVNV6SJ.mjs → chunk-4IBJW3PB.mjs} +2 -2
- package/dist/esm/{chunk-J6HKAEKY.mjs → chunk-5X2BJDOB.mjs} +2 -2
- package/dist/esm/{chunk-5UKBTF7N.mjs → chunk-5YHI7WOB.mjs} +2 -2
- package/dist/esm/{chunk-J5I4OZAS.mjs → chunk-6DYDZSEW.mjs} +2 -2
- package/dist/esm/{chunk-J4Z6XR5D.mjs → chunk-6JL2U7JB.mjs} +2 -2
- package/dist/esm/{chunk-RNL5TAQT.mjs → chunk-6UDHM6YZ.mjs} +2 -2
- package/dist/esm/{chunk-2X7A4HUS.mjs → chunk-6ZQWPHLV.mjs} +2 -2
- package/dist/esm/{chunk-4NHWV5AI.mjs → chunk-76OH2Z4Q.mjs} +2 -2
- package/dist/esm/{chunk-5EN52MUT.mjs → chunk-77NXCSLY.mjs} +2 -2
- package/dist/esm/{chunk-ND6OMSQU.mjs → chunk-7Y45UTRL.mjs} +2 -2
- package/dist/esm/chunk-7Z6DYLCA.mjs +1 -0
- package/dist/esm/chunk-7Z6DYLCA.mjs.map +1 -0
- package/dist/esm/{chunk-T2AGN5YT.mjs → chunk-A2Z7I2EY.mjs} +2 -2
- package/dist/esm/{chunk-36QXVFR5.mjs → chunk-A63SMUOU.mjs} +2 -2
- package/dist/esm/{chunk-36QXVFR5.mjs.map → chunk-A63SMUOU.mjs.map} +1 -1
- package/dist/esm/chunk-AQ4I7VVB.mjs +1 -0
- package/dist/esm/chunk-AQ4I7VVB.mjs.map +1 -0
- package/dist/esm/{chunk-3XFID2N4.mjs → chunk-AVH5SYTL.mjs} +2 -2
- package/dist/esm/{chunk-3N6N3KOS.mjs → chunk-AYKZA676.mjs} +2 -2
- package/dist/esm/{chunk-QRS4DGP3.mjs → chunk-BF46IXHH.mjs} +2 -2
- package/dist/esm/chunk-BLVYB7Y3.mjs +2 -0
- package/dist/esm/chunk-BLVYB7Y3.mjs.map +1 -0
- package/dist/esm/{chunk-PF57EOJY.mjs → chunk-BOYYQAB4.mjs} +2 -2
- package/dist/esm/{chunk-RPND23OR.mjs → chunk-BS7EVBWX.mjs} +2 -2
- package/dist/esm/{chunk-JX75UKJX.mjs → chunk-BVB3QII3.mjs} +2 -2
- package/dist/esm/{chunk-KZZWY4YI.mjs → chunk-C5V4EBVP.mjs} +2 -2
- package/dist/esm/{chunk-3BNA74V5.mjs → chunk-CZ6TC4GO.mjs} +2 -2
- package/dist/esm/{chunk-2HF2XEHO.mjs → chunk-DLDGUTFV.mjs} +2 -2
- package/dist/esm/{chunk-YR7JRJ25.mjs → chunk-DPO352QL.mjs} +2 -2
- package/dist/esm/{chunk-GM56MMNJ.mjs → chunk-DW2KZREM.mjs} +2 -2
- package/dist/esm/chunk-DZXM2MQY.mjs +2 -0
- package/dist/esm/chunk-DZXM2MQY.mjs.map +1 -0
- package/dist/esm/{chunk-6YV3366Z.mjs → chunk-EAW6AWYD.mjs} +2 -2
- package/dist/esm/{chunk-NUK6JT5I.mjs → chunk-EYIJYUN7.mjs} +2 -2
- package/dist/esm/{chunk-AF5WNJOP.mjs → chunk-F74FF323.mjs} +2 -2
- package/dist/esm/chunk-FM6ALU5B.mjs +2 -0
- package/dist/esm/chunk-FM6ALU5B.mjs.map +1 -0
- package/dist/esm/{chunk-ISIUQQMV.mjs → chunk-FNFQA7NS.mjs} +2 -2
- package/dist/esm/chunk-FTIW5GGG.mjs +2 -0
- package/dist/esm/{chunk-BRVWHCP3.mjs.map → chunk-FTIW5GGG.mjs.map} +1 -1
- package/dist/esm/{chunk-G2XVNF2T.mjs → chunk-FYB7C42X.mjs} +2 -2
- package/dist/esm/chunk-GFRNBBTY.mjs +2 -0
- package/dist/esm/chunk-GFRNBBTY.mjs.map +1 -0
- package/dist/esm/{chunk-CEHCDA3G.mjs → chunk-H6YNXJNF.mjs} +2 -2
- package/dist/esm/{chunk-47IIBESV.mjs → chunk-HCN7YJGB.mjs} +2 -2
- package/dist/esm/chunk-HHE63GFW.mjs +2 -0
- package/dist/esm/chunk-HHE63GFW.mjs.map +1 -0
- package/dist/esm/{chunk-S3EDNXZE.mjs → chunk-HIHKTLLM.mjs} +20 -18
- package/dist/esm/chunk-HIHKTLLM.mjs.map +1 -0
- package/dist/esm/chunk-IVVWQKCF.mjs +2 -0
- package/dist/esm/chunk-IVVWQKCF.mjs.map +1 -0
- package/dist/esm/{chunk-53INTTOI.mjs → chunk-JPDT6E3B.mjs} +2 -2
- package/dist/esm/{chunk-J4VNDDKJ.mjs → chunk-JSWBLHMX.mjs} +2 -2
- package/dist/esm/{chunk-73QJNN7O.mjs → chunk-K4CTCBLY.mjs} +2 -2
- package/dist/esm/{chunk-AQAH67IV.mjs → chunk-K7DBDI2I.mjs} +2 -2
- package/dist/esm/{chunk-PIVZMT5D.mjs → chunk-L22R3OIW.mjs} +2 -2
- package/dist/esm/{chunk-4GWNWSZP.mjs → chunk-LVSOUCFD.mjs} +2 -2
- package/dist/esm/{chunk-AHW3SKT7.mjs → chunk-M3JHXCGV.mjs} +2 -2
- package/dist/esm/{chunk-ZRKXS7XG.mjs → chunk-MHZ64FIW.mjs} +2 -2
- package/dist/esm/{chunk-UGPALAPN.mjs → chunk-MLDQ2TY2.mjs} +2 -2
- package/dist/esm/chunk-MQGW234H.mjs +2 -0
- package/dist/esm/chunk-MQGW234H.mjs.map +1 -0
- package/dist/esm/chunk-NCUBVHUW.mjs +2 -0
- package/dist/esm/chunk-NCUBVHUW.mjs.map +1 -0
- package/dist/esm/chunk-NMD45OTM.mjs +2 -0
- package/dist/esm/chunk-NMD45OTM.mjs.map +1 -0
- package/dist/esm/{chunk-R5VVKRJ2.mjs → chunk-NNQYSSLH.mjs} +2 -2
- package/dist/esm/{chunk-CZOD4SCZ.mjs → chunk-NSQLZBCA.mjs} +2 -2
- package/dist/esm/{chunk-KAGLWBIJ.mjs → chunk-OPGMT27G.mjs} +2 -2
- package/dist/esm/{chunk-N3U47Y6Y.mjs → chunk-P5V7OZNN.mjs} +2 -2
- package/dist/esm/{chunk-337U6Q6K.mjs → chunk-PTA3VHTQ.mjs} +2 -2
- package/dist/esm/chunk-Q6LFIZ3L.mjs +2 -0
- package/dist/esm/chunk-Q6LFIZ3L.mjs.map +1 -0
- package/dist/esm/chunk-QAMV4L3K.mjs +2 -0
- package/dist/esm/chunk-QAMV4L3K.mjs.map +1 -0
- package/dist/esm/{chunk-BEVXJJJF.mjs → chunk-QL2QFRKV.mjs} +2 -2
- package/dist/esm/chunk-QVWBJJRF.mjs +2 -0
- package/dist/esm/chunk-QVWBJJRF.mjs.map +1 -0
- package/dist/esm/{chunk-U3YYSIIT.mjs → chunk-RFA7BIDN.mjs} +2 -2
- package/dist/esm/{chunk-G56GPLTB.mjs → chunk-RJ4RKVVQ.mjs} +2 -2
- package/dist/esm/{chunk-BBVIJO6X.mjs → chunk-S32JHML7.mjs} +2 -2
- package/dist/esm/chunk-SCHZ67F3.mjs +2 -0
- package/dist/esm/chunk-SCHZ67F3.mjs.map +1 -0
- package/dist/esm/chunk-SFUTXSDK.mjs +2 -0
- package/dist/esm/chunk-SFUTXSDK.mjs.map +1 -0
- package/dist/esm/{chunk-3SPIFLBZ.mjs → chunk-SLFAROVZ.mjs} +2 -2
- package/dist/esm/{chunk-CT2BQQTZ.mjs → chunk-TG2LLWVU.mjs} +2 -2
- package/dist/esm/{chunk-35EWRSDK.mjs → chunk-TY4IEDJD.mjs} +2 -2
- package/dist/esm/chunk-U4A56FN2.mjs +2 -0
- package/dist/esm/{chunk-7UBKXR37.mjs.map → chunk-U4A56FN2.mjs.map} +1 -1
- package/dist/esm/chunk-U6X2FYNI.mjs +2 -0
- package/dist/esm/chunk-U6X2FYNI.mjs.map +1 -0
- package/dist/esm/{chunk-G2UPF44Z.mjs → chunk-UAZUO75M.mjs} +2 -2
- package/dist/esm/{chunk-HLC4HAYY.mjs → chunk-UGVNOSD3.mjs} +2 -2
- package/dist/esm/{chunk-LGNSPATO.mjs → chunk-VCMP3MXN.mjs} +2 -2
- package/dist/esm/{chunk-PZ4SAXY7.mjs → chunk-VTKPSYKA.mjs} +2 -2
- package/dist/esm/chunk-VTKPSYKA.mjs.map +1 -0
- package/dist/esm/chunk-WQHW4WQN.mjs +2 -0
- package/dist/esm/chunk-WQHW4WQN.mjs.map +1 -0
- package/dist/esm/chunk-WV5AD4IE.mjs +2 -0
- package/dist/esm/{chunk-CE65OKFI.mjs → chunk-XWVU4G57.mjs} +2 -2
- package/dist/esm/{chunk-ZHCSSCC5.mjs → chunk-XYLM277Z.mjs} +2 -2
- package/dist/esm/chunk-YE5B2S5L.mjs +2 -0
- package/dist/esm/chunk-YE5B2S5L.mjs.map +1 -0
- package/dist/esm/{chunk-FAFJKSVZ.mjs → chunk-YMUCYX3B.mjs} +2 -2
- package/dist/esm/{chunk-SRDIYE3M.mjs → chunk-YPHH6CAO.mjs} +2 -2
- package/dist/esm/chunk-YTQVMLFD.mjs +2 -0
- package/dist/esm/chunk-YTQVMLFD.mjs.map +1 -0
- package/dist/esm/{chunk-B7X6PSE7.mjs → chunk-YUNDX5I7.mjs} +2 -2
- package/dist/esm/chunk-Z4YHE4A5.mjs +2 -0
- package/dist/esm/{chunk-4BJA3QUQ.mjs.map → chunk-Z4YHE4A5.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/core/account/index.mjs +1 -1
- package/dist/esm/core/account/utils/address.mjs +1 -1
- package/dist/esm/core/account/utils/index.mjs +1 -1
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.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 +6 -0
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/keyless.d.mts +321 -0
- package/dist/esm/core/crypto/keyless.mjs +2 -0
- package/dist/esm/core/crypto/keyless.mjs.map +1 -0
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.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/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.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/index.d.mts +6 -0
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/index.d.mts +11 -4
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.mjs +1 -1
- 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.mjs +1 -1
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/keyless.d.mts +72 -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.mjs +1 -1
- package/dist/esm/internal/view.mjs +1 -1
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.mjs +1 -1
- package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/instances/chainId.mjs +1 -1
- package/dist/esm/transactions/instances/identifier.mjs +1 -1
- package/dist/esm/transactions/instances/index.mjs +1 -1
- package/dist/esm/transactions/instances/moduleId.mjs +1 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +3 -0
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +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/types/generated/operations.d.mts +14 -12
- package/dist/esm/types/generated/queries.d.mts +4 -4
- package/dist/esm/types/generated/queries.mjs +1 -1
- package/dist/esm/types/generated/types.d.mts +20 -2
- package/dist/esm/types/generated/types.mjs +1 -1
- package/dist/esm/types/generated/types.mjs.map +1 -1
- package/dist/esm/types/index.d.mts +21 -5
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/types/keyless.d.mts +51 -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 +9 -3
- package/src/account/EphemeralKeyPair.ts +150 -0
- package/src/account/KeylessAccount.ts +370 -0
- package/src/account/MultiKeyAccount.ts +12 -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 +78 -0
- package/src/bcs/deserializer.ts +40 -0
- package/src/bcs/serializer.ts +57 -0
- package/src/cli/move.ts +4 -7
- package/src/client/core.ts +4 -0
- package/src/client/get.ts +12 -0
- package/src/client/post.ts +18 -0
- package/src/core/crypto/ephemeral.ts +138 -0
- package/src/core/crypto/index.ts +2 -0
- package/src/core/crypto/keyless.ts +679 -0
- package/src/core/crypto/poseidon.ts +144 -0
- package/src/core/crypto/proof.ts +16 -0
- package/src/core/crypto/singleKey.ts +11 -0
- package/src/internal/keyless.ts +129 -0
- package/src/internal/queries/getFungibleAssetMetadata.graphql +2 -0
- package/src/internal/transactionSubmission.ts +6 -1
- package/src/transactions/management/accountSequenceNumber.ts +5 -8
- package/src/transactions/transactionBuilder/signingMessage.ts +3 -0
- package/src/transactions/transactionBuilder/transactionBuilder.ts +16 -1
- package/src/types/generated/operations.ts +14 -12
- package/src/types/generated/queries.ts +30 -3
- package/src/types/generated/types.ts +20 -2
- 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 +22 -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-3JPVQHOR.mjs +0 -2
- package/dist/esm/chunk-3JPVQHOR.mjs.map +0 -1
- package/dist/esm/chunk-4BJA3QUQ.mjs +0 -2
- package/dist/esm/chunk-6IFMQ5AS.mjs +0 -2
- package/dist/esm/chunk-6IFMQ5AS.mjs.map +0 -1
- package/dist/esm/chunk-746MU2AB.mjs +0 -2
- package/dist/esm/chunk-746MU2AB.mjs.map +0 -1
- package/dist/esm/chunk-7UBKXR37.mjs +0 -2
- package/dist/esm/chunk-BRVWHCP3.mjs +0 -2
- package/dist/esm/chunk-CYNQRMO5.mjs +0 -2
- package/dist/esm/chunk-CYNQRMO5.mjs.map +0 -1
- package/dist/esm/chunk-D2LNQMKD.mjs +0 -2
- package/dist/esm/chunk-D2LNQMKD.mjs.map +0 -1
- package/dist/esm/chunk-DLAIJ2UM.mjs +0 -2
- package/dist/esm/chunk-DLAIJ2UM.mjs.map +0 -1
- 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-MM5VMKFE.mjs +0 -2
- package/dist/esm/chunk-MM5VMKFE.mjs.map +0 -1
- package/dist/esm/chunk-OWW6SIDP.mjs +0 -2
- package/dist/esm/chunk-OWW6SIDP.mjs.map +0 -1
- package/dist/esm/chunk-PZ4SAXY7.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-S3EDNXZE.mjs.map +0 -1
- package/dist/esm/chunk-SUAMDMAA.mjs +0 -2
- package/dist/esm/chunk-UO3NZ5AH.mjs +0 -1
- package/dist/esm/chunk-UTKM2WYS.mjs +0 -2
- package/dist/esm/chunk-UTKM2WYS.mjs.map +0 -1
- package/dist/esm/chunk-UVSRX4SV.mjs +0 -1
- package/dist/esm/chunk-W33BZ6IQ.mjs +0 -2
- package/dist/esm/chunk-W33BZ6IQ.mjs.map +0 -1
- /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-TQLED4KC.mjs.map → chunk-2DSPX6BX.mjs.map} +0 -0
- /package/dist/esm/{chunk-RWXHA4QZ.mjs.map → chunk-3VUSIKCF.mjs.map} +0 -0
- /package/dist/esm/{chunk-MCRRHBFQ.mjs.map → chunk-4EPLOSKY.mjs.map} +0 -0
- /package/dist/esm/{chunk-BSVNV6SJ.mjs.map → chunk-4IBJW3PB.mjs.map} +0 -0
- /package/dist/esm/{chunk-J6HKAEKY.mjs.map → chunk-5X2BJDOB.mjs.map} +0 -0
- /package/dist/esm/{chunk-5UKBTF7N.mjs.map → chunk-5YHI7WOB.mjs.map} +0 -0
- /package/dist/esm/{chunk-J5I4OZAS.mjs.map → chunk-6DYDZSEW.mjs.map} +0 -0
- /package/dist/esm/{chunk-J4Z6XR5D.mjs.map → chunk-6JL2U7JB.mjs.map} +0 -0
- /package/dist/esm/{chunk-RNL5TAQT.mjs.map → chunk-6UDHM6YZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-2X7A4HUS.mjs.map → chunk-6ZQWPHLV.mjs.map} +0 -0
- /package/dist/esm/{chunk-4NHWV5AI.mjs.map → chunk-76OH2Z4Q.mjs.map} +0 -0
- /package/dist/esm/{chunk-5EN52MUT.mjs.map → chunk-77NXCSLY.mjs.map} +0 -0
- /package/dist/esm/{chunk-ND6OMSQU.mjs.map → chunk-7Y45UTRL.mjs.map} +0 -0
- /package/dist/esm/{chunk-T2AGN5YT.mjs.map → chunk-A2Z7I2EY.mjs.map} +0 -0
- /package/dist/esm/{chunk-3XFID2N4.mjs.map → chunk-AVH5SYTL.mjs.map} +0 -0
- /package/dist/esm/{chunk-3N6N3KOS.mjs.map → chunk-AYKZA676.mjs.map} +0 -0
- /package/dist/esm/{chunk-QRS4DGP3.mjs.map → chunk-BF46IXHH.mjs.map} +0 -0
- /package/dist/esm/{chunk-PF57EOJY.mjs.map → chunk-BOYYQAB4.mjs.map} +0 -0
- /package/dist/esm/{chunk-RPND23OR.mjs.map → chunk-BS7EVBWX.mjs.map} +0 -0
- /package/dist/esm/{chunk-JX75UKJX.mjs.map → chunk-BVB3QII3.mjs.map} +0 -0
- /package/dist/esm/{chunk-KZZWY4YI.mjs.map → chunk-C5V4EBVP.mjs.map} +0 -0
- /package/dist/esm/{chunk-3BNA74V5.mjs.map → chunk-CZ6TC4GO.mjs.map} +0 -0
- /package/dist/esm/{chunk-2HF2XEHO.mjs.map → chunk-DLDGUTFV.mjs.map} +0 -0
- /package/dist/esm/{chunk-YR7JRJ25.mjs.map → chunk-DPO352QL.mjs.map} +0 -0
- /package/dist/esm/{chunk-GM56MMNJ.mjs.map → chunk-DW2KZREM.mjs.map} +0 -0
- /package/dist/esm/{chunk-6YV3366Z.mjs.map → chunk-EAW6AWYD.mjs.map} +0 -0
- /package/dist/esm/{chunk-NUK6JT5I.mjs.map → chunk-EYIJYUN7.mjs.map} +0 -0
- /package/dist/esm/{chunk-AF5WNJOP.mjs.map → chunk-F74FF323.mjs.map} +0 -0
- /package/dist/esm/{chunk-ISIUQQMV.mjs.map → chunk-FNFQA7NS.mjs.map} +0 -0
- /package/dist/esm/{chunk-G2XVNF2T.mjs.map → chunk-FYB7C42X.mjs.map} +0 -0
- /package/dist/esm/{chunk-CEHCDA3G.mjs.map → chunk-H6YNXJNF.mjs.map} +0 -0
- /package/dist/esm/{chunk-47IIBESV.mjs.map → chunk-HCN7YJGB.mjs.map} +0 -0
- /package/dist/esm/{chunk-53INTTOI.mjs.map → chunk-JPDT6E3B.mjs.map} +0 -0
- /package/dist/esm/{chunk-J4VNDDKJ.mjs.map → chunk-JSWBLHMX.mjs.map} +0 -0
- /package/dist/esm/{chunk-73QJNN7O.mjs.map → chunk-K4CTCBLY.mjs.map} +0 -0
- /package/dist/esm/{chunk-AQAH67IV.mjs.map → chunk-K7DBDI2I.mjs.map} +0 -0
- /package/dist/esm/{chunk-PIVZMT5D.mjs.map → chunk-L22R3OIW.mjs.map} +0 -0
- /package/dist/esm/{chunk-4GWNWSZP.mjs.map → chunk-LVSOUCFD.mjs.map} +0 -0
- /package/dist/esm/{chunk-AHW3SKT7.mjs.map → chunk-M3JHXCGV.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZRKXS7XG.mjs.map → chunk-MHZ64FIW.mjs.map} +0 -0
- /package/dist/esm/{chunk-UGPALAPN.mjs.map → chunk-MLDQ2TY2.mjs.map} +0 -0
- /package/dist/esm/{chunk-R5VVKRJ2.mjs.map → chunk-NNQYSSLH.mjs.map} +0 -0
- /package/dist/esm/{chunk-CZOD4SCZ.mjs.map → chunk-NSQLZBCA.mjs.map} +0 -0
- /package/dist/esm/{chunk-KAGLWBIJ.mjs.map → chunk-OPGMT27G.mjs.map} +0 -0
- /package/dist/esm/{chunk-N3U47Y6Y.mjs.map → chunk-P5V7OZNN.mjs.map} +0 -0
- /package/dist/esm/{chunk-337U6Q6K.mjs.map → chunk-PTA3VHTQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-BEVXJJJF.mjs.map → chunk-QL2QFRKV.mjs.map} +0 -0
- /package/dist/esm/{chunk-U3YYSIIT.mjs.map → chunk-RFA7BIDN.mjs.map} +0 -0
- /package/dist/esm/{chunk-G56GPLTB.mjs.map → chunk-RJ4RKVVQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-BBVIJO6X.mjs.map → chunk-S32JHML7.mjs.map} +0 -0
- /package/dist/esm/{chunk-3SPIFLBZ.mjs.map → chunk-SLFAROVZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-CT2BQQTZ.mjs.map → chunk-TG2LLWVU.mjs.map} +0 -0
- /package/dist/esm/{chunk-35EWRSDK.mjs.map → chunk-TY4IEDJD.mjs.map} +0 -0
- /package/dist/esm/{chunk-G2UPF44Z.mjs.map → chunk-UAZUO75M.mjs.map} +0 -0
- /package/dist/esm/{chunk-HLC4HAYY.mjs.map → chunk-UGVNOSD3.mjs.map} +0 -0
- /package/dist/esm/{chunk-LGNSPATO.mjs.map → chunk-VCMP3MXN.mjs.map} +0 -0
- /package/dist/esm/{chunk-ROXFCLDT.mjs.map → chunk-WV5AD4IE.mjs.map} +0 -0
- /package/dist/esm/{chunk-CE65OKFI.mjs.map → chunk-XWVU4G57.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZHCSSCC5.mjs.map → chunk-XYLM277Z.mjs.map} +0 -0
- /package/dist/esm/{chunk-FAFJKSVZ.mjs.map → chunk-YMUCYX3B.mjs.map} +0 -0
- /package/dist/esm/{chunk-SRDIYE3M.mjs.map → chunk-YPHH6CAO.mjs.map} +0 -0
- /package/dist/esm/{chunk-B7X6PSE7.mjs.map → chunk-YUNDX5I7.mjs.map} +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, N as Network, C as Client, j as ClientConfig, F as FullNodeConfig, I as IndexerConfig, k as FaucetConfig, l as AptosSettings, m as EphemeralCertificateVariant, Z as ZkpVariant, L as LedgerVersionArg, M as MoveModuleId, n as ScriptFunctionArgument, o as MoveFunctionId, p as AccountAddressInput, q as MoveFunctionGenericTypeParam, r as SigningSchemeInput, s as SigningScheme, t as AccountData, P as PaginationArgs, u as MoveModuleBytecode, v as TransactionResponse, w as MoveResource, x as MoveStructId, y as TokenStandardArg, O as OrderByArg, G as GetAccountOwnedTokensQueryResponse, z as GetAccountOwnedTokensFromCollectionResponse, B as GetAccountCollectionsWithOwnedTokenResponse, J as GetAccountCoinsDataResponse, W as WhereArg, K as GetAccountOwnedObjectsResponse, Q as GetCollectionDataResponse, R as GetTokenDataResponse, V as GetCurrentTokenOwnershipResponse, X as GetOwnedTokensResponse, Y as GetTokenActivityResponse, _ as GetEventsResponse, $ as WaitForTransactionOptions, a0 as UserTransactionResponse, a1 as MoveFunction, a2 as GetFungibleAssetMetadataResponse, a3 as GetFungibleAssetActivitiesResponse, a4 as GetCurrentFungibleAssetBalancesResponse, a5 as LedgerInfo, a6 as Block, a7 as MoveValue, a8 as GetChainTopUserTransactionsResponse, a9 as GraphqlQuery, aa as GetProcessorStatusResponse, ab as GetANSNameResponse, ac as GetNumberOfDelegatorsResponse, ad as GetDelegatedStakingActivitiesResponse, ae as PendingTransactionResponse, af as CommittedTransactionResponse, ag as GasEstimation, ah as TableItemRequest, ai as GetTableItemsDataResponse, aj as GetTableItemsMetadataResponse, ak as AptosRequest, al as ClientRequest, am as ClientResponse, an as MimeType } from './accountAddress-Lv-GSihU.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-Lv-GSihU.js';
|
|
3
3
|
import EventEmitter from 'eventemitter3';
|
|
4
4
|
|
|
5
5
|
type Maybe<T> = T | null;
|
|
@@ -268,10 +268,12 @@ type FungibleAssetMetadataBoolExp = {
|
|
|
268
268
|
icon_uri?: InputMaybe<StringComparisonExp>;
|
|
269
269
|
last_transaction_timestamp?: InputMaybe<TimestampComparisonExp>;
|
|
270
270
|
last_transaction_version?: InputMaybe<BigintComparisonExp>;
|
|
271
|
+
maximum_v2?: InputMaybe<NumericComparisonExp>;
|
|
271
272
|
name?: InputMaybe<StringComparisonExp>;
|
|
272
273
|
project_uri?: InputMaybe<StringComparisonExp>;
|
|
273
274
|
supply_aggregator_table_handle_v1?: InputMaybe<StringComparisonExp>;
|
|
274
275
|
supply_aggregator_table_key_v1?: InputMaybe<StringComparisonExp>;
|
|
276
|
+
supply_v2?: InputMaybe<NumericComparisonExp>;
|
|
275
277
|
symbol?: InputMaybe<StringComparisonExp>;
|
|
276
278
|
token_standard?: InputMaybe<StringComparisonExp>;
|
|
277
279
|
};
|
|
@@ -1367,6 +1369,519 @@ declare class MultiKeySignature extends Signature {
|
|
|
1367
1369
|
static deserialize(deserializer: Deserializer): MultiKeySignature;
|
|
1368
1370
|
}
|
|
1369
1371
|
|
|
1372
|
+
/**
|
|
1373
|
+
* Represents ephemeral public keys for Aptos Keyless accounts.
|
|
1374
|
+
*
|
|
1375
|
+
* These are not public keys used as a public key on an account. They are only used ephemerally on Keyless accounts.
|
|
1376
|
+
*/
|
|
1377
|
+
declare class EphemeralPublicKey extends PublicKey {
|
|
1378
|
+
/**
|
|
1379
|
+
* The public key itself
|
|
1380
|
+
*/
|
|
1381
|
+
readonly publicKey: PublicKey;
|
|
1382
|
+
/**
|
|
1383
|
+
* An enum indicating the scheme of the ephemeral public key
|
|
1384
|
+
*/
|
|
1385
|
+
readonly variant: EphemeralPublicKeyVariant;
|
|
1386
|
+
constructor(publicKey: PublicKey);
|
|
1387
|
+
/**
|
|
1388
|
+
* Get the public key in bytes (Uint8Array).
|
|
1389
|
+
*
|
|
1390
|
+
* @returns Uint8Array representation of the public key
|
|
1391
|
+
*/
|
|
1392
|
+
toUint8Array(): Uint8Array;
|
|
1393
|
+
/**
|
|
1394
|
+
* Verifies a signed data with a the ephemeral public key
|
|
1395
|
+
*
|
|
1396
|
+
* @param args.message message
|
|
1397
|
+
* @param args.signature The signature that was signed by the private key of the ephemeral public key
|
|
1398
|
+
* @returns true if the signature is valid
|
|
1399
|
+
*/
|
|
1400
|
+
verifySignature(args: {
|
|
1401
|
+
message: HexInput;
|
|
1402
|
+
signature: EphemeralSignature;
|
|
1403
|
+
}): boolean;
|
|
1404
|
+
serialize(serializer: Serializer): void;
|
|
1405
|
+
static deserialize(deserializer: Deserializer): EphemeralPublicKey;
|
|
1406
|
+
static isPublicKey(publicKey: PublicKey): publicKey is EphemeralPublicKey;
|
|
1407
|
+
}
|
|
1408
|
+
/**
|
|
1409
|
+
* Represents ephemeral signatures used in Aptos Keyless accounts.
|
|
1410
|
+
*
|
|
1411
|
+
* These signatures are used inside of KeylessSignature
|
|
1412
|
+
*/
|
|
1413
|
+
declare class EphemeralSignature extends Signature {
|
|
1414
|
+
/**
|
|
1415
|
+
* The signature signed by the private key of an EphemeralKeyPair
|
|
1416
|
+
*/
|
|
1417
|
+
readonly signature: Signature;
|
|
1418
|
+
constructor(signature: Signature);
|
|
1419
|
+
/**
|
|
1420
|
+
* Get the public key in bytes (Uint8Array).
|
|
1421
|
+
*
|
|
1422
|
+
* @returns Uint8Array representation of the public key
|
|
1423
|
+
*/
|
|
1424
|
+
toUint8Array(): Uint8Array;
|
|
1425
|
+
static fromHex(hexInput: HexInput): EphemeralSignature;
|
|
1426
|
+
serialize(serializer: Serializer): void;
|
|
1427
|
+
static deserialize(deserializer: Deserializer): EphemeralSignature;
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
/**
|
|
1431
|
+
* An abstract representation of a crypto proof.
|
|
1432
|
+
* associated to a specific zero knowledge proof schemes e.g. Groth16, PLONK
|
|
1433
|
+
*/
|
|
1434
|
+
declare abstract class Proof extends Serializable {
|
|
1435
|
+
/**
|
|
1436
|
+
* Get the proof as a hex string with a 0x prefix e.g. 0x123456...
|
|
1437
|
+
*/
|
|
1438
|
+
toString(): string;
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
type Groth16VerificationKeyResponse = {
|
|
1442
|
+
alpha_g1: string;
|
|
1443
|
+
beta_g2: string;
|
|
1444
|
+
delta_g2: string;
|
|
1445
|
+
gamma_abc_g1: [string, string];
|
|
1446
|
+
gamma_g2: string;
|
|
1447
|
+
};
|
|
1448
|
+
|
|
1449
|
+
/**
|
|
1450
|
+
* Type of API endpoint for request routing
|
|
1451
|
+
*/
|
|
1452
|
+
declare enum AptosApiType {
|
|
1453
|
+
FULLNODE = "Fullnode",
|
|
1454
|
+
INDEXER = "Indexer",
|
|
1455
|
+
FAUCET = "Faucet",
|
|
1456
|
+
PEPPER = "Pepper",
|
|
1457
|
+
PROVER = "Prover"
|
|
1458
|
+
}
|
|
1459
|
+
/**
|
|
1460
|
+
* The default max gas amount when none is given.
|
|
1461
|
+
*
|
|
1462
|
+
* This is the maximum number of gas units that will be used by a transaction before being rejected.
|
|
1463
|
+
*
|
|
1464
|
+
* Note that max gas amount varies based on the transaction. A larger transaction will go over this
|
|
1465
|
+
* default gas amount, and the value will need to be changed for the specific transaction.
|
|
1466
|
+
*/
|
|
1467
|
+
declare const DEFAULT_MAX_GAS_AMOUNT = 200000;
|
|
1468
|
+
/**
|
|
1469
|
+
* The default transaction expiration seconds from now.
|
|
1470
|
+
*
|
|
1471
|
+
* This time is how long until the blockchain nodes will reject the transaction.
|
|
1472
|
+
*
|
|
1473
|
+
* Note that the transaction expiration time varies based on network connection and network load. It may need to be
|
|
1474
|
+
* increased for the transaction to be processed.
|
|
1475
|
+
*/
|
|
1476
|
+
declare const DEFAULT_TXN_EXP_SEC_FROM_NOW = 20;
|
|
1477
|
+
/**
|
|
1478
|
+
* The default number of seconds to wait for a transaction to be processed.
|
|
1479
|
+
*
|
|
1480
|
+
* This time is the amount of time that the SDK will wait for a transaction to be processed when waiting for
|
|
1481
|
+
* the results of the transaction. It may take longer based on network connection and network load.
|
|
1482
|
+
*/
|
|
1483
|
+
declare const DEFAULT_TXN_TIMEOUT_SEC = 20;
|
|
1484
|
+
/**
|
|
1485
|
+
* The default gas currency for the network.
|
|
1486
|
+
*/
|
|
1487
|
+
declare const APTOS_COIN = "0x1::aptos_coin::AptosCoin";
|
|
1488
|
+
declare const RAW_TRANSACTION_SALT = "APTOS::RawTransaction";
|
|
1489
|
+
declare const RAW_TRANSACTION_WITH_DATA_SALT = "APTOS::RawTransactionWithData";
|
|
1490
|
+
/**
|
|
1491
|
+
* The list of supported Processor types for our indexer api.
|
|
1492
|
+
*
|
|
1493
|
+
* These can be found from the processor_status table in the indexer database.
|
|
1494
|
+
* {@link https://cloud.hasura.io/public/graphiql?endpoint=https://api.mainnet.aptoslabs.com/v1/graphql}
|
|
1495
|
+
*/
|
|
1496
|
+
declare enum ProcessorType {
|
|
1497
|
+
ACCOUNT_TRANSACTION_PROCESSOR = "account_transactions_processor",
|
|
1498
|
+
DEFAULT = "default_processor",
|
|
1499
|
+
EVENTS_PROCESSOR = "events_processor",
|
|
1500
|
+
FUNGIBLE_ASSET_PROCESSOR = "fungible_asset_processor",
|
|
1501
|
+
STAKE_PROCESSOR = "stake_processor",
|
|
1502
|
+
TOKEN_V2_PROCESSOR = "token_v2_processor",
|
|
1503
|
+
USER_TRANSACTION_PROCESSOR = "user_transaction_processor"
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
/**
|
|
1507
|
+
* This class holds the config information for the SDK client instance.
|
|
1508
|
+
*
|
|
1509
|
+
* @example
|
|
1510
|
+
*
|
|
1511
|
+
* const aptosConfig = new AptosConfig({network:Network.TESTNET})
|
|
1512
|
+
*/
|
|
1513
|
+
declare class AptosConfig {
|
|
1514
|
+
/**
|
|
1515
|
+
* The Network that this SDK is associated with. Defaults to DEVNET
|
|
1516
|
+
*/
|
|
1517
|
+
readonly network: Network;
|
|
1518
|
+
/**
|
|
1519
|
+
* The client instance the SDK uses. Defaults to `@aptos-labs/aptos-client
|
|
1520
|
+
*/
|
|
1521
|
+
readonly client: Client;
|
|
1522
|
+
/**
|
|
1523
|
+
* The optional hardcoded fullnode URL to send requests to instead of using the network
|
|
1524
|
+
*/
|
|
1525
|
+
readonly fullnode?: string;
|
|
1526
|
+
/**
|
|
1527
|
+
* The optional hardcoded faucet URL to send requests to instead of using the network
|
|
1528
|
+
*/
|
|
1529
|
+
readonly faucet?: string;
|
|
1530
|
+
/**
|
|
1531
|
+
* The optional hardcoded pepper service URL to send requests to instead of using the network
|
|
1532
|
+
*/
|
|
1533
|
+
readonly pepper?: string;
|
|
1534
|
+
/**
|
|
1535
|
+
* The optional hardcoded prover service URL to send requests to instead of using the network
|
|
1536
|
+
*/
|
|
1537
|
+
readonly prover?: string;
|
|
1538
|
+
/**
|
|
1539
|
+
* The optional hardcoded indexer URL to send requests to instead of using the network
|
|
1540
|
+
*/
|
|
1541
|
+
readonly indexer?: string;
|
|
1542
|
+
/**
|
|
1543
|
+
* Optional client configurations
|
|
1544
|
+
*/
|
|
1545
|
+
readonly clientConfig?: ClientConfig;
|
|
1546
|
+
/**
|
|
1547
|
+
* Optional specific Fullnode configurations
|
|
1548
|
+
*/
|
|
1549
|
+
readonly fullnodeConfig?: FullNodeConfig;
|
|
1550
|
+
/**
|
|
1551
|
+
* Optional specific Indexer configurations
|
|
1552
|
+
*/
|
|
1553
|
+
readonly indexerConfig?: IndexerConfig;
|
|
1554
|
+
/**
|
|
1555
|
+
* Optional specific Faucet configurations
|
|
1556
|
+
*/
|
|
1557
|
+
readonly faucetConfig?: FaucetConfig;
|
|
1558
|
+
constructor(settings?: AptosSettings);
|
|
1559
|
+
/**
|
|
1560
|
+
* Returns the URL endpoint to send the request to.
|
|
1561
|
+
* If a custom URL was provided in the config, that URL is returned.
|
|
1562
|
+
* If a custom URL was provided but not URL endpoints, an error is thrown.
|
|
1563
|
+
* Otherwise, the URL endpoint is derived from the network.
|
|
1564
|
+
*
|
|
1565
|
+
* @param apiType - The type of Aptos API to get the URL for.
|
|
1566
|
+
*
|
|
1567
|
+
* @internal
|
|
1568
|
+
*/
|
|
1569
|
+
getRequestUrl(apiType: AptosApiType): string;
|
|
1570
|
+
/**
|
|
1571
|
+
* Checks if the URL is a known pepper service endpoint
|
|
1572
|
+
*
|
|
1573
|
+
* @internal
|
|
1574
|
+
* */
|
|
1575
|
+
isPepperServiceRequest(url: string): boolean;
|
|
1576
|
+
/**
|
|
1577
|
+
* Checks if the URL is a known prover service endpoint
|
|
1578
|
+
*
|
|
1579
|
+
* @internal
|
|
1580
|
+
* */
|
|
1581
|
+
isProverServiceRequest(url: string): boolean;
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1584
|
+
declare const EPK_HORIZON_SECS = 10000000;
|
|
1585
|
+
declare const MAX_AUD_VAL_BYTES = 120;
|
|
1586
|
+
declare const MAX_UID_KEY_BYTES = 30;
|
|
1587
|
+
declare const MAX_UID_VAL_BYTES = 330;
|
|
1588
|
+
declare const MAX_ISS_VAL_BYTES = 120;
|
|
1589
|
+
declare const MAX_EXTRA_FIELD_BYTES = 350;
|
|
1590
|
+
declare const MAX_JWT_HEADER_B64_BYTES = 300;
|
|
1591
|
+
declare const MAX_COMMITED_EPK_BYTES = 93;
|
|
1592
|
+
/**
|
|
1593
|
+
* Represents the KeylessPublicKey public key
|
|
1594
|
+
*
|
|
1595
|
+
* KeylessPublicKey authentication key is represented in the SDK as `AnyPublicKey`.
|
|
1596
|
+
*/
|
|
1597
|
+
declare class KeylessPublicKey extends AccountPublicKey {
|
|
1598
|
+
/**
|
|
1599
|
+
* The number of bytes that `idCommitment` should be
|
|
1600
|
+
*/
|
|
1601
|
+
static readonly ID_COMMITMENT_LENGTH: number;
|
|
1602
|
+
/**
|
|
1603
|
+
* The value of the 'iss' claim on the JWT which identifies the OIDC provider.
|
|
1604
|
+
*/
|
|
1605
|
+
readonly iss: string;
|
|
1606
|
+
/**
|
|
1607
|
+
* A value representing a cryptographic commitment to a user identity.
|
|
1608
|
+
*
|
|
1609
|
+
* It is calculated from the aud, uidKey, uidVal, pepper.
|
|
1610
|
+
*/
|
|
1611
|
+
readonly idCommitment: Uint8Array;
|
|
1612
|
+
constructor(iss: string, idCommitment: HexInput);
|
|
1613
|
+
/**
|
|
1614
|
+
* Get the authentication key for the keyless public key
|
|
1615
|
+
*
|
|
1616
|
+
* @returns AuthenticationKey
|
|
1617
|
+
*/
|
|
1618
|
+
authKey(): AuthenticationKey;
|
|
1619
|
+
/**
|
|
1620
|
+
* Get the public key in bytes (Uint8Array).
|
|
1621
|
+
*
|
|
1622
|
+
* @returns Uint8Array representation of the public key
|
|
1623
|
+
*/
|
|
1624
|
+
toUint8Array(): Uint8Array;
|
|
1625
|
+
/**
|
|
1626
|
+
* Get the public key as a hex string with the 0x prefix.
|
|
1627
|
+
*
|
|
1628
|
+
* @returns string representation of the public key
|
|
1629
|
+
*/
|
|
1630
|
+
toString(): string;
|
|
1631
|
+
/**
|
|
1632
|
+
* Verifies a signed data with a public key
|
|
1633
|
+
*
|
|
1634
|
+
* @param args.message message
|
|
1635
|
+
* @param args.signature The signature
|
|
1636
|
+
* @returns true if the signature is valid
|
|
1637
|
+
*/
|
|
1638
|
+
verifySignature(args: {
|
|
1639
|
+
message: HexInput;
|
|
1640
|
+
signature: KeylessSignature;
|
|
1641
|
+
}): boolean;
|
|
1642
|
+
serialize(serializer: Serializer): void;
|
|
1643
|
+
static deserialize(deserializer: Deserializer): KeylessPublicKey;
|
|
1644
|
+
static load(deserializer: Deserializer): KeylessPublicKey;
|
|
1645
|
+
static isPublicKey(publicKey: PublicKey): publicKey is KeylessPublicKey;
|
|
1646
|
+
/**
|
|
1647
|
+
* Creates a KeylessPublicKey from the JWT components plus pepper
|
|
1648
|
+
*
|
|
1649
|
+
* @param args.iss the iss of the identity
|
|
1650
|
+
* @param args.uidKey the key to use to get the uidVal in the JWT token
|
|
1651
|
+
* @param args.uidVal the value of the uidKey in the JWT token
|
|
1652
|
+
* @param args.aud the client ID of the application
|
|
1653
|
+
* @param args.pepper The pepper used to maintain privacy of the account
|
|
1654
|
+
* @returns KeylessPublicKey
|
|
1655
|
+
*/
|
|
1656
|
+
static create(args: {
|
|
1657
|
+
iss: string;
|
|
1658
|
+
uidKey: string;
|
|
1659
|
+
uidVal: string;
|
|
1660
|
+
aud: string;
|
|
1661
|
+
pepper: HexInput;
|
|
1662
|
+
}): KeylessPublicKey;
|
|
1663
|
+
static fromJwtAndPepper(args: {
|
|
1664
|
+
jwt: string;
|
|
1665
|
+
pepper: HexInput;
|
|
1666
|
+
uidKey?: string;
|
|
1667
|
+
}): KeylessPublicKey;
|
|
1668
|
+
}
|
|
1669
|
+
/**
|
|
1670
|
+
* A signature of a message signed via Keyless Accounnt that uses proofs or the jwt token to authenticate.
|
|
1671
|
+
*/
|
|
1672
|
+
declare class KeylessSignature extends Signature {
|
|
1673
|
+
/**
|
|
1674
|
+
* The inner signature ZeroKnowledgeSigniature or OpenIdSignature
|
|
1675
|
+
*/
|
|
1676
|
+
readonly ephemeralCertificate: EphemeralCertificate;
|
|
1677
|
+
/**
|
|
1678
|
+
* The jwt header in the token used to create the proof/signature. In json string representation.
|
|
1679
|
+
*/
|
|
1680
|
+
readonly jwtHeader: string;
|
|
1681
|
+
/**
|
|
1682
|
+
* The expiry timestamp in seconds of the EphemeralKeyPair used to sign
|
|
1683
|
+
*/
|
|
1684
|
+
readonly expiryDateSecs: number;
|
|
1685
|
+
/**
|
|
1686
|
+
* The ephemeral public key used to verify the signature
|
|
1687
|
+
*/
|
|
1688
|
+
readonly ephemeralPublicKey: EphemeralPublicKey;
|
|
1689
|
+
/**
|
|
1690
|
+
* The signature resulting from signing with the private key of the EphemeralKeyPair
|
|
1691
|
+
*/
|
|
1692
|
+
readonly ephemeralSignature: EphemeralSignature;
|
|
1693
|
+
constructor(args: {
|
|
1694
|
+
jwtHeader: string;
|
|
1695
|
+
ephemeralCertificate: EphemeralCertificate;
|
|
1696
|
+
expiryDateSecs: number;
|
|
1697
|
+
ephemeralPublicKey: EphemeralPublicKey;
|
|
1698
|
+
ephemeralSignature: EphemeralSignature;
|
|
1699
|
+
});
|
|
1700
|
+
/**
|
|
1701
|
+
* Get the signature in bytes (Uint8Array).
|
|
1702
|
+
*
|
|
1703
|
+
* @returns Uint8Array representation of the signature
|
|
1704
|
+
*/
|
|
1705
|
+
toUint8Array(): Uint8Array;
|
|
1706
|
+
serialize(serializer: Serializer): void;
|
|
1707
|
+
static deserialize(deserializer: Deserializer): KeylessSignature;
|
|
1708
|
+
static getSimulationSignature(): KeylessSignature;
|
|
1709
|
+
static isSignature(signature: Signature): signature is KeylessSignature;
|
|
1710
|
+
}
|
|
1711
|
+
/**
|
|
1712
|
+
* A container for a signature that is a ZeroKnowledgeSig. Can be expanded to support OpenIdSignature.
|
|
1713
|
+
*/
|
|
1714
|
+
declare class EphemeralCertificate extends Signature {
|
|
1715
|
+
readonly signature: Signature;
|
|
1716
|
+
/**
|
|
1717
|
+
* Index of the underlying enum variant
|
|
1718
|
+
*/
|
|
1719
|
+
private readonly variant;
|
|
1720
|
+
constructor(signature: Signature, variant: EphemeralCertificateVariant);
|
|
1721
|
+
/**
|
|
1722
|
+
* Get the public key in bytes (Uint8Array).
|
|
1723
|
+
*
|
|
1724
|
+
* @returns Uint8Array representation of the public key
|
|
1725
|
+
*/
|
|
1726
|
+
toUint8Array(): Uint8Array;
|
|
1727
|
+
serialize(serializer: Serializer): void;
|
|
1728
|
+
static deserialize(deserializer: Deserializer): EphemeralCertificate;
|
|
1729
|
+
}
|
|
1730
|
+
declare class G1Bytes extends Serializable {
|
|
1731
|
+
data: Uint8Array;
|
|
1732
|
+
constructor(data: HexInput);
|
|
1733
|
+
serialize(serializer: Serializer): void;
|
|
1734
|
+
static deserialize(deserializer: Deserializer): G1Bytes;
|
|
1735
|
+
}
|
|
1736
|
+
declare class G2Bytes extends Serializable {
|
|
1737
|
+
data: Uint8Array;
|
|
1738
|
+
constructor(data: HexInput);
|
|
1739
|
+
serialize(serializer: Serializer): void;
|
|
1740
|
+
static deserialize(deserializer: Deserializer): G2Bytes;
|
|
1741
|
+
}
|
|
1742
|
+
/**
|
|
1743
|
+
* A representation of a Groth16 proof. The points are the compressed serialization of affine reprentation of the proof.
|
|
1744
|
+
*/
|
|
1745
|
+
declare class Groth16Zkp extends Proof {
|
|
1746
|
+
/**
|
|
1747
|
+
* The bytes of G1 proof point a
|
|
1748
|
+
*/
|
|
1749
|
+
a: G1Bytes;
|
|
1750
|
+
/**
|
|
1751
|
+
* The bytes of G2 proof point b
|
|
1752
|
+
*/
|
|
1753
|
+
b: G2Bytes;
|
|
1754
|
+
/**
|
|
1755
|
+
* The bytes of G1 proof point c
|
|
1756
|
+
*/
|
|
1757
|
+
c: G1Bytes;
|
|
1758
|
+
constructor(args: {
|
|
1759
|
+
a: HexInput;
|
|
1760
|
+
b: HexInput;
|
|
1761
|
+
c: HexInput;
|
|
1762
|
+
});
|
|
1763
|
+
serialize(serializer: Serializer): void;
|
|
1764
|
+
static deserialize(deserializer: Deserializer): Groth16Zkp;
|
|
1765
|
+
}
|
|
1766
|
+
/**
|
|
1767
|
+
* A container for a different zero knowledge proof types
|
|
1768
|
+
*/
|
|
1769
|
+
declare class ZkProof extends Serializable {
|
|
1770
|
+
readonly proof: Proof;
|
|
1771
|
+
/**
|
|
1772
|
+
* Index of the underlying enum variant
|
|
1773
|
+
*/
|
|
1774
|
+
private readonly variant;
|
|
1775
|
+
constructor(proof: Proof, variant: ZkpVariant);
|
|
1776
|
+
serialize(serializer: Serializer): void;
|
|
1777
|
+
static deserialize(deserializer: Deserializer): ZkProof;
|
|
1778
|
+
}
|
|
1779
|
+
/**
|
|
1780
|
+
* The signature representation of a proof
|
|
1781
|
+
*/
|
|
1782
|
+
declare class ZeroKnowledgeSig extends Signature {
|
|
1783
|
+
/**
|
|
1784
|
+
* The proof
|
|
1785
|
+
*/
|
|
1786
|
+
readonly proof: ZkProof;
|
|
1787
|
+
/**
|
|
1788
|
+
* The max lifespan of the proof
|
|
1789
|
+
*/
|
|
1790
|
+
readonly expHorizonSecs: number;
|
|
1791
|
+
/**
|
|
1792
|
+
* A key value pair on the JWT token that can be specified on the signature which would reveal the value on chain.
|
|
1793
|
+
* Can be used to assert identity or other attributes.
|
|
1794
|
+
*/
|
|
1795
|
+
readonly extraField?: string;
|
|
1796
|
+
/**
|
|
1797
|
+
* The 'aud' value of the recovery service which is set when recovering an account.
|
|
1798
|
+
*/
|
|
1799
|
+
readonly overrideAudVal?: string;
|
|
1800
|
+
/**
|
|
1801
|
+
* The training wheels signature
|
|
1802
|
+
*/
|
|
1803
|
+
readonly trainingWheelsSignature?: EphemeralSignature;
|
|
1804
|
+
constructor(args: {
|
|
1805
|
+
proof: ZkProof;
|
|
1806
|
+
expHorizonSecs: number;
|
|
1807
|
+
extraField?: string;
|
|
1808
|
+
overrideAudVal?: string;
|
|
1809
|
+
trainingWheelsSignature?: EphemeralSignature;
|
|
1810
|
+
});
|
|
1811
|
+
/**
|
|
1812
|
+
* Get the signature in bytes (Uint8Array).
|
|
1813
|
+
*
|
|
1814
|
+
* @returns Uint8Array representation of the signature
|
|
1815
|
+
*/
|
|
1816
|
+
toUint8Array(): Uint8Array;
|
|
1817
|
+
/**
|
|
1818
|
+
* Return a ZeroKnowledgeSig object from its bcs serialization in bytes.
|
|
1819
|
+
*
|
|
1820
|
+
* @returns ZeroKnowledgeSig
|
|
1821
|
+
*/
|
|
1822
|
+
static fromBytes(bytes: Uint8Array): ZeroKnowledgeSig;
|
|
1823
|
+
serialize(serializer: Serializer): void;
|
|
1824
|
+
static deserialize(deserializer: Deserializer): ZeroKnowledgeSig;
|
|
1825
|
+
}
|
|
1826
|
+
/**
|
|
1827
|
+
* A class which represents the on-chain configuration for how Keyless accounts work
|
|
1828
|
+
*/
|
|
1829
|
+
declare class KeylessConfiguration {
|
|
1830
|
+
/**
|
|
1831
|
+
* The verification key used to verify Groth16 proofs on chain
|
|
1832
|
+
*/
|
|
1833
|
+
readonly verficationKey: Groth16VerificationKey;
|
|
1834
|
+
/**
|
|
1835
|
+
* The maximum lifespan of an ephemeral key pair. This is configured on chain.
|
|
1836
|
+
*/
|
|
1837
|
+
readonly maxExpHorizonSecs: number;
|
|
1838
|
+
constructor(verficationKey: Groth16VerificationKey, maxExpHorizonSecs: number);
|
|
1839
|
+
static create(res: Groth16VerificationKeyResponse, maxExpHorizonSecs: number): KeylessConfiguration;
|
|
1840
|
+
}
|
|
1841
|
+
/**
|
|
1842
|
+
* A representation of the verification key stored on chain used to verify Groth16 proofs
|
|
1843
|
+
*/
|
|
1844
|
+
declare class Groth16VerificationKey {
|
|
1845
|
+
/**
|
|
1846
|
+
* The `alpha * G`, where `G` is the generator of G1
|
|
1847
|
+
*/
|
|
1848
|
+
readonly alphaG1: G1Bytes;
|
|
1849
|
+
/**
|
|
1850
|
+
* The `alpha * H`, where `H` is the generator of G2
|
|
1851
|
+
*/
|
|
1852
|
+
readonly betaG2: G2Bytes;
|
|
1853
|
+
/**
|
|
1854
|
+
* The `delta * H`, where `H` is the generator of G2
|
|
1855
|
+
*/
|
|
1856
|
+
readonly deltaG2: G2Bytes;
|
|
1857
|
+
/**
|
|
1858
|
+
* The `gamma^{-1} * (beta * a_i + alpha * b_i + c_i) * H`, where H is the generator of G1
|
|
1859
|
+
*/
|
|
1860
|
+
readonly gammaAbcG1: G1Bytes[];
|
|
1861
|
+
/**
|
|
1862
|
+
* The `gamma * H`, where `H` is the generator of G2
|
|
1863
|
+
*/
|
|
1864
|
+
readonly gammaG2: G2Bytes;
|
|
1865
|
+
constructor(args: {
|
|
1866
|
+
alphaG1: HexInput;
|
|
1867
|
+
betaG2: HexInput;
|
|
1868
|
+
deltaG2: HexInput;
|
|
1869
|
+
gammaAbcG1: [HexInput, HexInput];
|
|
1870
|
+
gammaG2: HexInput;
|
|
1871
|
+
});
|
|
1872
|
+
static fromGroth16VerificationKeyResponse(res: Groth16VerificationKeyResponse): Groth16VerificationKey;
|
|
1873
|
+
}
|
|
1874
|
+
/**
|
|
1875
|
+
* Gets the parameters of how Keyless Accounts are configured on chain including the verifying key and the max expiry horizon
|
|
1876
|
+
*
|
|
1877
|
+
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
1878
|
+
* @returns KeylessConfiguration
|
|
1879
|
+
*/
|
|
1880
|
+
declare function getKeylessConfig(args: {
|
|
1881
|
+
aptosConfig: AptosConfig;
|
|
1882
|
+
options?: LedgerVersionArg;
|
|
1883
|
+
}): Promise<KeylessConfiguration>;
|
|
1884
|
+
|
|
1370
1885
|
/**
|
|
1371
1886
|
* Represents the Secp256k1 ecdsa public key
|
|
1372
1887
|
*
|
|
@@ -1563,119 +2078,6 @@ declare class AccountAuthenticatorMultiKey extends AccountAuthenticator {
|
|
|
1563
2078
|
static load(deserializer: Deserializer): AccountAuthenticatorMultiKey;
|
|
1564
2079
|
}
|
|
1565
2080
|
|
|
1566
|
-
/**
|
|
1567
|
-
* Type of API endpoint for request routing
|
|
1568
|
-
*/
|
|
1569
|
-
declare enum AptosApiType {
|
|
1570
|
-
FULLNODE = "Fullnode",
|
|
1571
|
-
INDEXER = "Indexer",
|
|
1572
|
-
FAUCET = "Faucet"
|
|
1573
|
-
}
|
|
1574
|
-
/**
|
|
1575
|
-
* The default max gas amount when none is given.
|
|
1576
|
-
*
|
|
1577
|
-
* This is the maximum number of gas units that will be used by a transaction before being rejected.
|
|
1578
|
-
*
|
|
1579
|
-
* Note that max gas amount varies based on the transaction. A larger transaction will go over this
|
|
1580
|
-
* default gas amount, and the value will need to be changed for the specific transaction.
|
|
1581
|
-
*/
|
|
1582
|
-
declare const DEFAULT_MAX_GAS_AMOUNT = 200000;
|
|
1583
|
-
/**
|
|
1584
|
-
* The default transaction expiration seconds from now.
|
|
1585
|
-
*
|
|
1586
|
-
* This time is how long until the blockchain nodes will reject the transaction.
|
|
1587
|
-
*
|
|
1588
|
-
* Note that the transaction expiration time varies based on network connection and network load. It may need to be
|
|
1589
|
-
* increased for the transaction to be processed.
|
|
1590
|
-
*/
|
|
1591
|
-
declare const DEFAULT_TXN_EXP_SEC_FROM_NOW = 20;
|
|
1592
|
-
/**
|
|
1593
|
-
* The default number of seconds to wait for a transaction to be processed.
|
|
1594
|
-
*
|
|
1595
|
-
* This time is the amount of time that the SDK will wait for a transaction to be processed when waiting for
|
|
1596
|
-
* the results of the transaction. It may take longer based on network connection and network load.
|
|
1597
|
-
*/
|
|
1598
|
-
declare const DEFAULT_TXN_TIMEOUT_SEC = 20;
|
|
1599
|
-
/**
|
|
1600
|
-
* The default gas currency for the network.
|
|
1601
|
-
*/
|
|
1602
|
-
declare const APTOS_COIN = "0x1::aptos_coin::AptosCoin";
|
|
1603
|
-
declare const RAW_TRANSACTION_SALT = "APTOS::RawTransaction";
|
|
1604
|
-
declare const RAW_TRANSACTION_WITH_DATA_SALT = "APTOS::RawTransactionWithData";
|
|
1605
|
-
/**
|
|
1606
|
-
* The list of supported Processor types for our indexer api.
|
|
1607
|
-
*
|
|
1608
|
-
* These can be found from the processor_status table in the indexer database.
|
|
1609
|
-
* {@link https://cloud.hasura.io/public/graphiql?endpoint=https://api.mainnet.aptoslabs.com/v1/graphql}
|
|
1610
|
-
*/
|
|
1611
|
-
declare enum ProcessorType {
|
|
1612
|
-
ACCOUNT_TRANSACTION_PROCESSOR = "account_transactions_processor",
|
|
1613
|
-
DEFAULT = "default_processor",
|
|
1614
|
-
EVENTS_PROCESSOR = "events_processor",
|
|
1615
|
-
FUNGIBLE_ASSET_PROCESSOR = "fungible_asset_processor",
|
|
1616
|
-
STAKE_PROCESSOR = "stake_processor",
|
|
1617
|
-
TOKEN_V2_PROCESSOR = "token_v2_processor",
|
|
1618
|
-
USER_TRANSACTION_PROCESSOR = "user_transaction_processor"
|
|
1619
|
-
}
|
|
1620
|
-
|
|
1621
|
-
/**
|
|
1622
|
-
* This class holds the config information for the SDK client instance.
|
|
1623
|
-
*
|
|
1624
|
-
* @example
|
|
1625
|
-
*
|
|
1626
|
-
* const aptosConfig = new AptosConfig({network:Network.TESTNET})
|
|
1627
|
-
*/
|
|
1628
|
-
declare class AptosConfig {
|
|
1629
|
-
/**
|
|
1630
|
-
* The Network that this SDK is associated with. Defaults to DEVNET
|
|
1631
|
-
*/
|
|
1632
|
-
readonly network: Network;
|
|
1633
|
-
/**
|
|
1634
|
-
* The client instance the SDK uses. Defaults to `@aptos-labs/aptos-client
|
|
1635
|
-
*/
|
|
1636
|
-
readonly client: Client;
|
|
1637
|
-
/**
|
|
1638
|
-
* The optional hardcoded fullnode URL to send requests to instead of using the network
|
|
1639
|
-
*/
|
|
1640
|
-
readonly fullnode?: string;
|
|
1641
|
-
/**
|
|
1642
|
-
* The optional hardcoded faucet URL to send requests to instead of using the network
|
|
1643
|
-
*/
|
|
1644
|
-
readonly faucet?: string;
|
|
1645
|
-
/**
|
|
1646
|
-
* The optional hardcoded indexer URL to send requests to instead of using the network
|
|
1647
|
-
*/
|
|
1648
|
-
readonly indexer?: string;
|
|
1649
|
-
/**
|
|
1650
|
-
* Optional client configurations
|
|
1651
|
-
*/
|
|
1652
|
-
readonly clientConfig?: ClientConfig;
|
|
1653
|
-
/**
|
|
1654
|
-
* Optional specific Fullnode configurations
|
|
1655
|
-
*/
|
|
1656
|
-
readonly fullnodeConfig?: FullNodeConfig;
|
|
1657
|
-
/**
|
|
1658
|
-
* Optional specific Indexer configurations
|
|
1659
|
-
*/
|
|
1660
|
-
readonly indexerConfig?: IndexerConfig;
|
|
1661
|
-
/**
|
|
1662
|
-
* Optional specific Faucet configurations
|
|
1663
|
-
*/
|
|
1664
|
-
readonly faucetConfig?: FaucetConfig;
|
|
1665
|
-
constructor(settings?: AptosSettings);
|
|
1666
|
-
/**
|
|
1667
|
-
* Returns the URL endpoint to send the request to.
|
|
1668
|
-
* If a custom URL was provided in the config, that URL is returned.
|
|
1669
|
-
* If a custom URL was provided but not URL endpoints, an error is thrown.
|
|
1670
|
-
* Otherwise, the URL endpoint is derived from the network.
|
|
1671
|
-
*
|
|
1672
|
-
* @param apiType - The type of Aptos API to get the URL for.
|
|
1673
|
-
*
|
|
1674
|
-
* @internal
|
|
1675
|
-
*/
|
|
1676
|
-
getRequestUrl(apiType: AptosApiType): string;
|
|
1677
|
-
}
|
|
1678
|
-
|
|
1679
2081
|
/**
|
|
1680
2082
|
* Representation of a ChainId that can serialized and deserialized
|
|
1681
2083
|
*/
|
|
@@ -2854,6 +3256,208 @@ declare class Ed25519Account implements Account$1 {
|
|
|
2854
3256
|
signTransaction(transaction: AnyRawTransaction): Ed25519Signature;
|
|
2855
3257
|
}
|
|
2856
3258
|
|
|
3259
|
+
/**
|
|
3260
|
+
* A class which contains a key pair that is used in signing transactions via the Keyless authentication scheme. This key pair
|
|
3261
|
+
* is ephemeral and has an expiration time. For more details on how this class is used -
|
|
3262
|
+
* https://aptos.dev/guides/keyless-accounts/#1-present-the-user-with-a-sign-in-with-idp-button-on-the-ui
|
|
3263
|
+
*/
|
|
3264
|
+
declare class EphemeralKeyPair extends Serializable {
|
|
3265
|
+
static readonly BLINDER_LENGTH: number;
|
|
3266
|
+
/**
|
|
3267
|
+
* A byte array of length BLINDER_LENGTH used to obfuscate the public key from the IdP.
|
|
3268
|
+
* Used in calculating the nonce passed to the IdP and as a secret witness in proof generation.
|
|
3269
|
+
*/
|
|
3270
|
+
readonly blinder: Uint8Array;
|
|
3271
|
+
/**
|
|
3272
|
+
* A timestamp in seconds indicating when the ephemeral key pair is expired. After expiry, a new
|
|
3273
|
+
* EphemeralKeyPair must be generated and a new JWT needs to be created.
|
|
3274
|
+
*/
|
|
3275
|
+
readonly expiryDateSecs: number;
|
|
3276
|
+
/**
|
|
3277
|
+
* The value passed to the IdP when the user authenticates. It comprises of a hash of the
|
|
3278
|
+
* ephermeral public key, expiry date, and blinder.
|
|
3279
|
+
*/
|
|
3280
|
+
readonly nonce: string;
|
|
3281
|
+
/**
|
|
3282
|
+
* A private key used to sign transactions. This private key is not tied to any account on the chain as it
|
|
3283
|
+
* is ephemeral (not permanent) in nature.
|
|
3284
|
+
*/
|
|
3285
|
+
private privateKey;
|
|
3286
|
+
/**
|
|
3287
|
+
* A public key used to verify transactions. This public key is not tied to any account on the chain as it
|
|
3288
|
+
* is ephemeral (not permanent) in nature.
|
|
3289
|
+
*/
|
|
3290
|
+
private publicKey;
|
|
3291
|
+
constructor(args: {
|
|
3292
|
+
privateKey: PrivateKey;
|
|
3293
|
+
expiryDateSecs?: number;
|
|
3294
|
+
blinder?: HexInput;
|
|
3295
|
+
});
|
|
3296
|
+
/**
|
|
3297
|
+
* Returns the public key of the key pair.
|
|
3298
|
+
* @return EphemeralPublicKey
|
|
3299
|
+
*/
|
|
3300
|
+
getPublicKey(): EphemeralPublicKey;
|
|
3301
|
+
/**
|
|
3302
|
+
* Returns the public key of the key pair.
|
|
3303
|
+
* @return boolean
|
|
3304
|
+
*/
|
|
3305
|
+
isExpired(): boolean;
|
|
3306
|
+
serialize(serializer: Serializer): void;
|
|
3307
|
+
static deserialize(deserializer: Deserializer): EphemeralKeyPair;
|
|
3308
|
+
static fromBytes(bytes: Uint8Array): EphemeralKeyPair;
|
|
3309
|
+
/**
|
|
3310
|
+
* Returns the public key of the key pair.
|
|
3311
|
+
* @param scheme the type of keypair to use for the EphemeralKeyPair. Only Ed25519 supported for now.
|
|
3312
|
+
* @param expiryDateSecs the date of expiry.
|
|
3313
|
+
* @return boolean
|
|
3314
|
+
*/
|
|
3315
|
+
static generate(args?: {
|
|
3316
|
+
scheme?: EphemeralPublicKeyVariant;
|
|
3317
|
+
expiryDateSecs?: number;
|
|
3318
|
+
}): EphemeralKeyPair;
|
|
3319
|
+
/**
|
|
3320
|
+
* Sign the given message with the private key.
|
|
3321
|
+
* @param data in HexInput format
|
|
3322
|
+
* @returns EphemeralSignature
|
|
3323
|
+
*/
|
|
3324
|
+
sign(data: HexInput): EphemeralSignature;
|
|
3325
|
+
}
|
|
3326
|
+
|
|
3327
|
+
/**
|
|
3328
|
+
* Account implementation for the Keyless authentication scheme.
|
|
3329
|
+
*
|
|
3330
|
+
* Used to represent a Keyless based account and sign transactions with it.
|
|
3331
|
+
*
|
|
3332
|
+
* Use KeylessAccount.fromJWTAndProof to instantiate a KeylessAccount with a JWT, proof and EphemeralKeyPair.
|
|
3333
|
+
*
|
|
3334
|
+
* When the proof expires or the JWT becomes invalid, the KeylessAccount must be instantiated again with a new JWT,
|
|
3335
|
+
* EphemeralKeyPair, and corresponding proof.
|
|
3336
|
+
*/
|
|
3337
|
+
declare class KeylessAccount extends Serializable implements Account$1 {
|
|
3338
|
+
static readonly PEPPER_LENGTH: number;
|
|
3339
|
+
/**
|
|
3340
|
+
* The KeylessPublicKey associated with the account
|
|
3341
|
+
*/
|
|
3342
|
+
readonly publicKey: KeylessPublicKey;
|
|
3343
|
+
/**
|
|
3344
|
+
* The EphemeralKeyPair used to generate sign.
|
|
3345
|
+
*/
|
|
3346
|
+
readonly ephemeralKeyPair: EphemeralKeyPair;
|
|
3347
|
+
/**
|
|
3348
|
+
* The claim on the JWT to identify a user. This is typically 'sub' or 'email'.
|
|
3349
|
+
*/
|
|
3350
|
+
readonly uidKey: string;
|
|
3351
|
+
/**
|
|
3352
|
+
* The value of the uidKey claim on the JWT. This intended to be a stable user identifier.
|
|
3353
|
+
*/
|
|
3354
|
+
readonly uidVal: string;
|
|
3355
|
+
/**
|
|
3356
|
+
* The value of the 'aud' claim on the JWT, also known as client ID. This is the identifier for the dApp's
|
|
3357
|
+
* OIDC registration with the identity provider.
|
|
3358
|
+
*/
|
|
3359
|
+
readonly aud: string;
|
|
3360
|
+
/**
|
|
3361
|
+
* A value contains 31 bytes of entropy that preserves privacy of the account. Typically fetched from a pepper provider.
|
|
3362
|
+
*/
|
|
3363
|
+
readonly pepper: Uint8Array;
|
|
3364
|
+
/**
|
|
3365
|
+
* Account address associated with the account
|
|
3366
|
+
*/
|
|
3367
|
+
readonly accountAddress: AccountAddress;
|
|
3368
|
+
/**
|
|
3369
|
+
* The zero knowledge signature (if ready) which contains the proof used to validate the EphemeralKeyPair.
|
|
3370
|
+
*/
|
|
3371
|
+
proof: ZeroKnowledgeSig | undefined;
|
|
3372
|
+
/**
|
|
3373
|
+
* The proof of the EphemeralKeyPair or a promise that provides the proof. This is used to allow for awaiting on
|
|
3374
|
+
* fetching the proof.
|
|
3375
|
+
*/
|
|
3376
|
+
readonly proofOrPromise: ZeroKnowledgeSig | Promise<ZeroKnowledgeSig>;
|
|
3377
|
+
/**
|
|
3378
|
+
* Signing scheme used to sign transactions
|
|
3379
|
+
*/
|
|
3380
|
+
readonly signingScheme: SigningScheme;
|
|
3381
|
+
/**
|
|
3382
|
+
* The JWT token used to derive the account
|
|
3383
|
+
*/
|
|
3384
|
+
readonly jwt: string;
|
|
3385
|
+
/**
|
|
3386
|
+
* An event emitter used to assist in handling asycronous proof fetching.
|
|
3387
|
+
*/
|
|
3388
|
+
private readonly emitter;
|
|
3389
|
+
private constructor();
|
|
3390
|
+
/**
|
|
3391
|
+
* This initializes the asyncronous proof fetch
|
|
3392
|
+
* @return
|
|
3393
|
+
*/
|
|
3394
|
+
init(promise: Promise<ZeroKnowledgeSig>): Promise<void>;
|
|
3395
|
+
serialize(serializer: Serializer): void;
|
|
3396
|
+
static deserialize(deserializer: Deserializer): KeylessAccount;
|
|
3397
|
+
/**
|
|
3398
|
+
* Checks if the proof is expired. If so the account must be rederived with a new EphemeralKeyPair
|
|
3399
|
+
* and JWT token.
|
|
3400
|
+
* @return boolean
|
|
3401
|
+
*/
|
|
3402
|
+
isExpired(): boolean;
|
|
3403
|
+
/**
|
|
3404
|
+
* Sign a message using Keyless.
|
|
3405
|
+
* @param message the message to sign, as binary input
|
|
3406
|
+
* @return the AccountAuthenticator containing the signature, together with the account's public key
|
|
3407
|
+
*/
|
|
3408
|
+
signWithAuthenticator(message: HexInput): AccountAuthenticatorSingleKey;
|
|
3409
|
+
/**
|
|
3410
|
+
* Sign a transaction using Keyless.
|
|
3411
|
+
* @param transaction the raw transaction
|
|
3412
|
+
* @return the AccountAuthenticator containing the signature of the transaction, together with the account's public key
|
|
3413
|
+
*/
|
|
3414
|
+
signTransactionWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorSingleKey;
|
|
3415
|
+
/**
|
|
3416
|
+
* Waits for asyncronous proof fetching to finish.
|
|
3417
|
+
* @return
|
|
3418
|
+
*/
|
|
3419
|
+
waitForProofFetch(): Promise<void>;
|
|
3420
|
+
/**
|
|
3421
|
+
* Sign the given message using Keyless.
|
|
3422
|
+
* @param message in HexInput format
|
|
3423
|
+
* @returns Signature
|
|
3424
|
+
*/
|
|
3425
|
+
sign(data: HexInput): KeylessSignature;
|
|
3426
|
+
/**
|
|
3427
|
+
* Sign the given transaction with Keyless.
|
|
3428
|
+
* Signs the transaction and proof to guard against proof malleability.
|
|
3429
|
+
* @param transaction the transaction to be signed
|
|
3430
|
+
* @returns KeylessSignature
|
|
3431
|
+
*/
|
|
3432
|
+
signTransaction(transaction: AnyRawTransaction): KeylessSignature;
|
|
3433
|
+
verifySignature(args: {
|
|
3434
|
+
message: HexInput;
|
|
3435
|
+
signature: Signature;
|
|
3436
|
+
}): boolean;
|
|
3437
|
+
static fromBytes(bytes: Uint8Array): KeylessAccount;
|
|
3438
|
+
static create(args: {
|
|
3439
|
+
address?: AccountAddress;
|
|
3440
|
+
proof: ZeroKnowledgeSig | Promise<ZeroKnowledgeSig>;
|
|
3441
|
+
jwt: string;
|
|
3442
|
+
ephemeralKeyPair: EphemeralKeyPair;
|
|
3443
|
+
pepper: HexInput;
|
|
3444
|
+
uidKey?: string;
|
|
3445
|
+
proofFetchCallback?: ProofFetchCallback;
|
|
3446
|
+
}): KeylessAccount;
|
|
3447
|
+
}
|
|
3448
|
+
type ProofFetchSuccess = {
|
|
3449
|
+
status: "Success";
|
|
3450
|
+
};
|
|
3451
|
+
type ProofFetchFailure = {
|
|
3452
|
+
status: "Failed";
|
|
3453
|
+
error: string;
|
|
3454
|
+
};
|
|
3455
|
+
type ProofFetchStatus = ProofFetchSuccess | ProofFetchFailure;
|
|
3456
|
+
type ProofFetchCallback = (status: ProofFetchStatus) => Promise<void>;
|
|
3457
|
+
interface ProofFetchEvents {
|
|
3458
|
+
proofFetchFinish: (status: ProofFetchStatus) => void;
|
|
3459
|
+
}
|
|
3460
|
+
|
|
2857
3461
|
interface VerifyMultiKeySignatureArgs {
|
|
2858
3462
|
message: HexInput;
|
|
2859
3463
|
signature: MultiKeySignature;
|
|
@@ -2929,6 +3533,12 @@ declare class MultiKeyAccount implements Account$1 {
|
|
|
2929
3533
|
* @return the AccountAuthenticator containing the signature of the transaction, together with the account's public key
|
|
2930
3534
|
*/
|
|
2931
3535
|
signTransactionWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorMultiKey;
|
|
3536
|
+
/**
|
|
3537
|
+
* Waits for any proofs on any KeylessAccount signers to be fetched. If the proof is fetched a syncronously, call this
|
|
3538
|
+
* to ensure signing with the KeylessAccount does not fail as the proof must be ready.
|
|
3539
|
+
* @return
|
|
3540
|
+
*/
|
|
3541
|
+
waitForProofFetch(): Promise<void>;
|
|
2932
3542
|
/**
|
|
2933
3543
|
* Sign the given message using the MultiKeyAccount's signers
|
|
2934
3544
|
* @param message in HexInput format
|
|
@@ -4155,6 +4765,9 @@ declare function deriveTransactionType(transaction: AnyRawTransaction): AnyRawTr
|
|
|
4155
4765
|
*/
|
|
4156
4766
|
declare function generateSigningMessage(bytes: Uint8Array, domainSeparator: string): Uint8Array;
|
|
4157
4767
|
/**
|
|
4768
|
+
* @deprecated
|
|
4769
|
+
* Use CryptoHashable instead by having your class implement it and call hash() to get the signing message.
|
|
4770
|
+
*
|
|
4158
4771
|
* Generates the 'signing message' form of a serilizable value. It bcs serializes the value and uses the name of
|
|
4159
4772
|
* its constructor as the domain separator.
|
|
4160
4773
|
*
|
|
@@ -5529,6 +6142,68 @@ declare class Table {
|
|
|
5529
6142
|
}): Promise<GetTableItemsMetadataResponse>;
|
|
5530
6143
|
}
|
|
5531
6144
|
|
|
6145
|
+
/**
|
|
6146
|
+
* A class to query all `Keyless` related queries on Aptos.
|
|
6147
|
+
*
|
|
6148
|
+
* More documentation on how to integrate Keyless Accounts see the below
|
|
6149
|
+
* https://aptos.dev/guides/keyless-accounts/#aptos-keyless-integration-guide
|
|
6150
|
+
*/
|
|
6151
|
+
declare class Keyless {
|
|
6152
|
+
readonly config: AptosConfig;
|
|
6153
|
+
constructor(config: AptosConfig);
|
|
6154
|
+
/**
|
|
6155
|
+
* Fetches the pepper from the Aptos pepper service API.
|
|
6156
|
+
*
|
|
6157
|
+
* @param args.jwt JWT token
|
|
6158
|
+
* @param args.ephemeralKeyPair the EphemeralKeyPair used to generate the nonce in the JWT token
|
|
6159
|
+
* @param args.derivationPath a derivation path used for creating multiple accounts per user via the BIP-44 standard. Defaults
|
|
6160
|
+
* to "m/44'/637'/0'/0'/0".
|
|
6161
|
+
* @returns The pepper which is a Uint8Array of length 31.
|
|
6162
|
+
*/
|
|
6163
|
+
getPepper(args: {
|
|
6164
|
+
jwt: string;
|
|
6165
|
+
ephemeralKeyPair: EphemeralKeyPair;
|
|
6166
|
+
derivationPath?: string;
|
|
6167
|
+
}): Promise<Uint8Array>;
|
|
6168
|
+
/**
|
|
6169
|
+
* Fetches a proof from the Aptos prover service API.
|
|
6170
|
+
*
|
|
6171
|
+
* @param args.jwt JWT token
|
|
6172
|
+
* @param args.ephemeralKeyPair the EphemeralKeyPair used to generate the nonce in the JWT token
|
|
6173
|
+
* @param args.uidKey a key in the JWT token to use to set the uidVal in the IdCommitment
|
|
6174
|
+
* @param args.pepper the pepper used for the account. If not provided it will be fetched from the Aptos pepper service
|
|
6175
|
+
*
|
|
6176
|
+
* @returns The proof which is represented by a ZeroKnowledgeSig.
|
|
6177
|
+
*/
|
|
6178
|
+
getProof(args: {
|
|
6179
|
+
jwt: string;
|
|
6180
|
+
ephemeralKeyPair: EphemeralKeyPair;
|
|
6181
|
+
pepper?: HexInput;
|
|
6182
|
+
uidKey?: string;
|
|
6183
|
+
}): Promise<ZeroKnowledgeSig>;
|
|
6184
|
+
/**
|
|
6185
|
+
* Derives the Keyless Account from the JWT token and corresponding EphemeralKeyPair. It will lookup the pepper from
|
|
6186
|
+
* the pepper service if not explicitly provided. It will compute the proof via the proving service. It will ch
|
|
6187
|
+
*
|
|
6188
|
+
* @param args.jwt JWT token
|
|
6189
|
+
* @param args.ephemeralKeyPair the EphemeralKeyPair used to generate the nonce in the JWT token
|
|
6190
|
+
* @param args.uidKey a key in the JWT token to use to set the uidVal in the IdCommitment
|
|
6191
|
+
* @param args.pepper the pepper
|
|
6192
|
+
* @param args.proofFetchCallback a callback function that if set, the fetch of the proof will be done in the background. Once
|
|
6193
|
+
* fetching finishes the callback function will be called. This should be used to provide a more responsive user experience as now
|
|
6194
|
+
* they are not blocked on fetching the proof. Thus the function will return much more quickly.
|
|
6195
|
+
*
|
|
6196
|
+
* @returns A KeylessAccount that can be used to sign transactions
|
|
6197
|
+
*/
|
|
6198
|
+
deriveKeylessAccount(args: {
|
|
6199
|
+
jwt: string;
|
|
6200
|
+
ephemeralKeyPair: EphemeralKeyPair;
|
|
6201
|
+
uidKey?: string;
|
|
6202
|
+
pepper?: HexInput;
|
|
6203
|
+
proofFetchCallback?: ProofFetchCallback;
|
|
6204
|
+
}): Promise<KeylessAccount>;
|
|
6205
|
+
}
|
|
6206
|
+
|
|
5532
6207
|
/**
|
|
5533
6208
|
* This class is the main entry point into Aptos's
|
|
5534
6209
|
* APIs and separates functionality into different namespaces.
|
|
@@ -5553,9 +6228,10 @@ declare class Aptos {
|
|
|
5553
6228
|
readonly staking: Staking;
|
|
5554
6229
|
readonly transaction: Transaction;
|
|
5555
6230
|
readonly table: Table;
|
|
6231
|
+
readonly keyless: Keyless;
|
|
5556
6232
|
constructor(settings?: AptosConfig);
|
|
5557
6233
|
}
|
|
5558
|
-
interface Aptos extends Account, ANS, Coin, DigitalAsset, Event, Faucet, FungibleAsset, General, Staking, Table, Omit<Transaction, "build" | "simulate" | "submit" | "batch"> {
|
|
6234
|
+
interface Aptos extends Account, ANS, Coin, DigitalAsset, Event, Faucet, FungibleAsset, General, Keyless, Staking, Table, Omit<Transaction, "build" | "simulate" | "submit" | "batch"> {
|
|
5559
6235
|
}
|
|
5560
6236
|
|
|
5561
6237
|
/**
|
|
@@ -5666,6 +6342,13 @@ type GetAptosRequestOptions = Omit<GetRequestOptions, "type">;
|
|
|
5666
6342
|
*/
|
|
5667
6343
|
declare function get<Req extends {}, Res extends {}>(options: GetRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
5668
6344
|
declare function getAptosFullNode<Req extends {}, Res extends {}>(options: GetAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
6345
|
+
/**
|
|
6346
|
+
* Makes a get request to the pepper service
|
|
6347
|
+
*
|
|
6348
|
+
* @param options GetAptosRequestOptions
|
|
6349
|
+
* @returns AptosResponse
|
|
6350
|
+
*/
|
|
6351
|
+
declare function getAptosPepperService<Req extends {}, Res extends {}>(options: GetAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
5669
6352
|
declare function paginateWithCursor<Req extends Record<string, any>, Res extends Array<{}>>(options: GetAptosRequestOptions): Promise<Res>;
|
|
5670
6353
|
|
|
5671
6354
|
type PostRequestOptions = {
|
|
@@ -5717,5 +6400,13 @@ declare function post<Req extends {}, Res extends {}>(options: PostRequestOption
|
|
|
5717
6400
|
declare function postAptosFullNode<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
5718
6401
|
declare function postAptosIndexer<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
5719
6402
|
declare function postAptosFaucet<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
6403
|
+
/**
|
|
6404
|
+
* Makes a post request to the pepper service
|
|
6405
|
+
*
|
|
6406
|
+
* @param options GetAptosRequestOptions
|
|
6407
|
+
* @returns AptosResponse
|
|
6408
|
+
*/
|
|
6409
|
+
declare function postAptosPepperService<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
6410
|
+
declare function postAptosProvingService<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
5720
6411
|
|
|
5721
|
-
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, 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, aptosCoinStructTag, aptosRequest, buildTransaction, checkOrConvertArgument, convertArgument, deriveKey, deriveTransactionType, deserializeFromScriptArgument, fetchEntryFunctionAbi, fetchFunctionAbi, fetchViewFunctionAbi, findFirstNonSignerArg, generateRawTransaction, generateSignedTransaction, generateSignedTransactionForSimulation, generateSigningMessage, generateSigningMessageForSerializable, generateSigningMessageForTransaction, generateTransactionPayload, generateTransactionPayloadWithABI, generateUserTransactionHash, generateViewFunctionPayload, generateViewFunctionPayloadWithABI, get, getAptosFullNode, 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, promiseFulfilledStatus, request, splitPath, standardizeTypeTags, stringStructTag, throwTypeMismatch };
|
|
6412
|
+
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, KeyType, KeylessAccount, KeylessConfiguration, 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, 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, generateSigningMessageForSerializable, generateSigningMessageForTransaction, generateTransactionPayload, generateTransactionPayloadWithABI, generateUserTransactionHash, generateViewFunctionPayload, generateViewFunctionPayloadWithABI, get, getAptosFullNode, getAptosPepperService, getAuthenticatorForSimulation, getFunctionParts, getKeylessConfig, 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 };
|