@aptos-labs/ts-sdk 1.16.0-zeta.0 → 1.16.0-zeta.2
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-BtD_TE5q.d.ts → accountAddress-YfW6h4Ja.d.ts} +57 -11
- package/dist/common/{chunk-VLEH6QBR.js → chunk-HPZUSDYP.js} +1 -1
- package/dist/common/{chunk-VLEH6QBR.js.map → chunk-HPZUSDYP.js.map} +1 -1
- package/dist/common/cli/index.d.ts +1 -1
- package/dist/common/cli/index.js +1 -1
- package/dist/common/index.d.ts +199 -87
- package/dist/common/index.js +27 -27
- 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 +4 -4
- package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
- package/dist/esm/account/KeylessAccount.d.mts +69 -23
- package/dist/esm/account/KeylessAccount.mjs +1 -1
- package/dist/esm/account/MultiKeyAccount.mjs +1 -1
- package/dist/esm/account/SingleKeyAccount.mjs +1 -1
- package/dist/esm/account/index.d.mts +3 -4
- package/dist/esm/account/index.mjs +1 -1
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +5 -5
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/aptosConfig.mjs +1 -1
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/event.mjs +1 -1
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +5 -5
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/keyless.d.mts +15 -11
- package/dist/esm/api/keyless.mjs +1 -1
- 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.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/deserializer.d.mts +14 -8
- 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 +40 -0
- package/dist/esm/bcs/serializer.mjs +1 -1
- package/dist/esm/{chunk-4KEEUDZA.mjs → chunk-27PC47S7.mjs} +2 -2
- package/dist/esm/{chunk-W36IQO5K.mjs → chunk-2NGHKNUS.mjs} +2 -2
- package/dist/esm/{chunk-N466X3S6.mjs → chunk-37FFZSIM.mjs} +2 -2
- package/dist/esm/{chunk-VT6XJSRO.mjs → chunk-3IFR6T3V.mjs} +1 -1
- package/dist/esm/chunk-3IFR6T3V.mjs.map +1 -0
- package/dist/esm/chunk-3RJZNUCQ.mjs +2 -0
- package/dist/esm/{chunk-Z2ZR4PTF.mjs → chunk-472OGHMG.mjs} +2 -2
- package/dist/esm/chunk-4TDMJQOJ.mjs +2 -0
- package/dist/esm/chunk-4TDMJQOJ.mjs.map +1 -0
- package/dist/esm/{chunk-STYDBDYL.mjs → chunk-4VPCPASN.mjs} +2 -2
- package/dist/esm/{chunk-M7HZOQ6A.mjs → chunk-5YH2YL3L.mjs} +2 -2
- package/dist/esm/{chunk-EPTCPBVW.mjs → chunk-6DFVM2W6.mjs} +2 -2
- package/dist/esm/{chunk-LEBJNW6Y.mjs → chunk-6FK6OA37.mjs} +2 -2
- package/dist/esm/{chunk-FBLSW5TB.mjs → chunk-6GGHUBUA.mjs} +2 -2
- package/dist/esm/{chunk-3FVRXELT.mjs → chunk-7BW2N4IE.mjs} +2 -2
- package/dist/esm/{chunk-NCDP26DV.mjs → chunk-7JLHN655.mjs} +2 -2
- package/dist/esm/{chunk-SBQRBBRS.mjs → chunk-7XRUPEQ4.mjs} +2 -2
- package/dist/esm/{chunk-Q3AUNZDW.mjs → chunk-B76XCRLH.mjs} +2 -2
- package/dist/esm/{chunk-MTLETLKV.mjs → chunk-BO44HPGU.mjs} +2 -2
- package/dist/esm/{chunk-QZRWRX6P.mjs → chunk-CVCM46UN.mjs} +2 -2
- package/dist/esm/{chunk-QZRWRX6P.mjs.map → chunk-CVCM46UN.mjs.map} +1 -1
- package/dist/esm/{chunk-HGZGTBA4.mjs → chunk-DPWEHSHH.mjs} +2 -2
- package/dist/esm/{chunk-LQH7T3TE.mjs → chunk-E4XMEVB7.mjs} +2 -2
- package/dist/esm/{chunk-7STYQ5ZE.mjs → chunk-EFMAZTIM.mjs} +2 -2
- package/dist/esm/{chunk-NQMF46E5.mjs → chunk-EQN6FVO7.mjs} +2 -2
- package/dist/esm/{chunk-T23OVRNF.mjs → chunk-F3ZVWLDH.mjs} +2 -2
- package/dist/esm/{chunk-F5C4SZZ7.mjs → chunk-FF4L66LJ.mjs} +2 -2
- package/dist/esm/{chunk-EB7AI4B4.mjs → chunk-FGGRPEQ3.mjs} +2 -2
- package/dist/esm/{chunk-IEZO4PIG.mjs → chunk-FIG65OJD.mjs} +2 -2
- package/dist/esm/chunk-FLALKQIK.mjs +2 -0
- package/dist/esm/{chunk-JKZHPY24.mjs.map → chunk-FLALKQIK.mjs.map} +1 -1
- package/dist/esm/{chunk-UDU5L4XH.mjs → chunk-FUKWM4HL.mjs} +2 -2
- package/dist/esm/{chunk-C3L4ETUF.mjs → chunk-GRHLQDHF.mjs} +2 -2
- package/dist/esm/{chunk-MGOHPDX4.mjs → chunk-GSCM444Z.mjs} +2 -2
- package/dist/esm/{chunk-T6OEZ4KP.mjs → chunk-GTUBZWAF.mjs} +2 -2
- package/dist/esm/chunk-GY6LFCB2.mjs +2 -0
- package/dist/esm/chunk-GY6LFCB2.mjs.map +1 -0
- package/dist/esm/{chunk-UWI5D7FD.mjs → chunk-H4AGIUGI.mjs} +2 -2
- package/dist/esm/{chunk-3Y6JNFPD.mjs → chunk-HZOBRRQP.mjs} +2 -2
- package/dist/esm/chunk-I7GRECEJ.mjs +2 -0
- package/dist/esm/{chunk-CNH2RAJQ.mjs.map → chunk-I7GRECEJ.mjs.map} +1 -1
- package/dist/esm/{chunk-6RBUXB5I.mjs → chunk-IBN7ETCB.mjs} +2 -2
- package/dist/esm/{chunk-KFUOOBMJ.mjs → chunk-IGMXAPHY.mjs} +2 -2
- package/dist/esm/{chunk-TEJ7BXJK.mjs → chunk-IPSITJFX.mjs} +2 -2
- package/dist/esm/chunk-IVVWQKCF.mjs +2 -0
- package/dist/esm/chunk-IVVWQKCF.mjs.map +1 -0
- package/dist/esm/{chunk-NC5HHEEM.mjs → chunk-IXFYYWAC.mjs} +2 -2
- package/dist/esm/{chunk-REBMGDZ5.mjs → chunk-J6VDYVNB.mjs} +2 -2
- package/dist/esm/{chunk-Y5BON557.mjs → chunk-JKRWCFUQ.mjs} +2 -2
- package/dist/esm/{chunk-I5JWDZIP.mjs → chunk-JOXU5RWH.mjs} +2 -2
- package/dist/esm/chunk-JOXU5RWH.mjs.map +1 -0
- package/dist/esm/{chunk-IJE5YSXW.mjs → chunk-JWGG6XFS.mjs} +2 -2
- package/dist/esm/{chunk-MWN63XBE.mjs → chunk-K2KJX32L.mjs} +2 -2
- package/dist/esm/chunk-KCRCX6BL.mjs +2 -0
- package/dist/esm/chunk-KCRCX6BL.mjs.map +1 -0
- package/dist/esm/chunk-KGHBTSDR.mjs +2 -0
- package/dist/esm/chunk-KGHBTSDR.mjs.map +1 -0
- package/dist/esm/{chunk-6KNAIXZ3.mjs → chunk-KMVSI4PC.mjs} +2 -2
- package/dist/esm/chunk-KNMQU2TA.mjs +2 -0
- package/dist/esm/chunk-KNMQU2TA.mjs.map +1 -0
- package/dist/esm/{chunk-Y33VGXNI.mjs → chunk-KSSJ3CT5.mjs} +2 -2
- package/dist/esm/{chunk-EIRSA5UU.mjs → chunk-KUMZXNMD.mjs} +2 -2
- package/dist/esm/{chunk-NWWXZ7EW.mjs → chunk-L5CPAOUM.mjs} +2 -2
- package/dist/esm/{chunk-EADBYPUD.mjs → chunk-LMEJ5K6B.mjs} +2 -2
- package/dist/esm/chunk-LYOUEPDG.mjs +2 -0
- package/dist/esm/chunk-LYOUEPDG.mjs.map +1 -0
- package/dist/esm/{chunk-WAXCU6D6.mjs → chunk-MEOGVBMZ.mjs} +2 -2
- package/dist/esm/{chunk-3VGX3TXH.mjs → chunk-MLX6DFMR.mjs} +2 -2
- package/dist/esm/{chunk-KKP4FBWZ.mjs → chunk-MX5Z3EHG.mjs} +2 -2
- package/dist/esm/{chunk-MWUJCP27.mjs → chunk-NW3WUTTD.mjs} +2 -2
- package/dist/esm/{chunk-YHO2EBXH.mjs → chunk-NW6LGHE7.mjs} +2 -2
- package/dist/esm/{chunk-ZCCYHFPK.mjs → chunk-OJL36Q4H.mjs} +2 -2
- package/dist/esm/{chunk-LO7B3CWN.mjs → chunk-OJUFU5TJ.mjs} +2 -2
- package/dist/esm/{chunk-ONIYM7IU.mjs → chunk-PAY7N36H.mjs} +2 -2
- package/dist/esm/{chunk-RUSWW265.mjs → chunk-PHEA3NOJ.mjs} +2 -2
- package/dist/esm/{chunk-OX5GWFHX.mjs → chunk-PUP6XMAV.mjs} +2 -2
- package/dist/esm/{chunk-A3UVZHDJ.mjs → chunk-PWYL5QZP.mjs} +2 -2
- package/dist/esm/{chunk-JM2B5E2I.mjs → chunk-Q6LFIZ3L.mjs} +1 -1
- package/dist/esm/chunk-Q6LFIZ3L.mjs.map +1 -0
- package/dist/esm/{chunk-JCDZ2WXX.mjs → chunk-QHB5A5YP.mjs} +1 -1
- package/dist/esm/chunk-QHB5A5YP.mjs.map +1 -0
- package/dist/esm/{chunk-UFJGYMEB.mjs → chunk-R4KIZ2FK.mjs} +2 -2
- package/dist/esm/{chunk-6M53MDWB.mjs → chunk-RTO3YBWQ.mjs} +2 -2
- package/dist/esm/{chunk-OT37OTT7.mjs → chunk-RURI53PG.mjs} +2 -2
- package/dist/esm/{chunk-5RRZMXND.mjs → chunk-RX5SPT5S.mjs} +2 -2
- package/dist/esm/{chunk-4USAUOCE.mjs → chunk-RYRID5HT.mjs} +2 -2
- package/dist/esm/{chunk-Z6JERVLX.mjs → chunk-SBEZ64HG.mjs} +2 -2
- package/dist/esm/{chunk-C34M4T77.mjs → chunk-SNDFJWYM.mjs} +2 -2
- package/dist/esm/chunk-T4HO5JMQ.mjs +2 -0
- package/dist/esm/chunk-T4HO5JMQ.mjs.map +1 -0
- package/dist/esm/{chunk-7H3HRFVM.mjs → chunk-T5YEMU53.mjs} +2 -2
- package/dist/esm/{chunk-ZNEBMSNC.mjs → chunk-TUCCV62K.mjs} +2 -2
- package/dist/esm/{chunk-7QGIAVW4.mjs → chunk-UBON2G6Y.mjs} +2 -2
- package/dist/esm/{chunk-TVRJ3M7B.mjs → chunk-UMLUOYFK.mjs} +1 -1
- package/dist/esm/{chunk-TVRJ3M7B.mjs.map → chunk-UMLUOYFK.mjs.map} +1 -1
- package/dist/esm/chunk-VCAURUJ3.mjs +2 -0
- package/dist/esm/chunk-VCAURUJ3.mjs.map +1 -0
- package/dist/esm/chunk-VJ3OBIFQ.mjs +2 -0
- package/dist/esm/chunk-VJ3OBIFQ.mjs.map +1 -0
- package/dist/esm/{chunk-COW5IGYC.mjs → chunk-WA2NTBYY.mjs} +2 -2
- package/dist/esm/{chunk-UO5LUYGO.mjs → chunk-XGDLSWBF.mjs} +2 -2
- package/dist/esm/{chunk-EU6CX56Q.mjs → chunk-XH33BXEY.mjs} +2 -2
- package/dist/esm/{chunk-PYUU4OEL.mjs → chunk-XVZBWW46.mjs} +2 -2
- package/dist/esm/chunk-YBXQVY7N.mjs +2 -0
- package/dist/esm/{chunk-N7CE244N.mjs.map → chunk-YBXQVY7N.mjs.map} +1 -1
- package/dist/esm/{chunk-MKUAW7KW.mjs → chunk-YDNOKWV3.mjs} +2 -2
- package/dist/esm/{chunk-W637YAND.mjs → chunk-YRUF6N3U.mjs} +2 -2
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/cli/localNode.mjs +1 -1
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.d.mts +6 -0
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.d.mts +6 -0
- 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/cryptoHasher.d.mts +21 -0
- package/dist/esm/core/crypto/cryptoHasher.mjs +2 -0
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/ephemeral.mjs +1 -1
- package/dist/esm/core/crypto/index.d.mts +2 -1
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/keyless.d.mts +52 -8
- package/dist/esm/core/crypto/keyless.mjs +1 -1
- 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 +14 -2
- package/dist/esm/core/crypto/poseidon.mjs +1 -1
- package/dist/esm/core/crypto/proof.mjs +1 -1
- 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 +2 -1
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/index.d.mts +6 -5
- 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 +10 -9
- package/dist/esm/internal/keyless.mjs +1 -1
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/table.mjs +1 -1
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.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.d.mts +1 -2
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/instances/chainId.mjs +1 -1
- package/dist/esm/transactions/instances/identifier.mjs +1 -1
- package/dist/esm/transactions/instances/index.mjs +1 -1
- package/dist/esm/transactions/instances/moduleId.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.d.mts +1 -2
- 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 +1 -11
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
- package/dist/esm/transactions/typeTag/index.mjs +1 -1
- package/dist/esm/transactions/typeTag/parser.mjs +1 -1
- package/dist/esm/types/index.d.mts +2 -2
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/types/keyless.d.mts +37 -1
- package/dist/esm/utils/apiEndpoints.mjs +1 -1
- package/dist/esm/utils/helpers.mjs +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 +1 -2
- package/src/account/EphemeralKeyPair.ts +6 -6
- package/src/account/KeylessAccount.ts +72 -66
- package/src/api/keyless.ts +13 -4
- package/src/bcs/deserializer.ts +14 -8
- package/src/bcs/serializer.ts +40 -0
- package/src/client/core.ts +4 -8
- package/src/client/get.ts +6 -0
- package/src/client/post.ts +6 -0
- package/src/core/crypto/cryptoHasher.ts +16 -0
- package/src/core/crypto/keyless.ts +155 -23
- package/src/core/crypto/poseidon.ts +19 -8
- package/src/internal/keyless.ts +83 -15
- package/src/internal/transactionSubmission.ts +2 -2
- package/src/transactions/transactionBuilder/signingMessage.ts +0 -13
- package/src/transactions/transactionBuilder/transactionBuilder.ts +4 -2
- package/src/types/index.ts +2 -2
- package/src/types/keyless.ts +36 -0
- package/src/utils/apiEndpoints.ts +5 -3
- package/src/utils/helpers.ts +0 -1
- package/src/version.ts +1 -1
- package/dist/esm/bcs/cryptoHasher.d.mts +0 -15
- package/dist/esm/bcs/cryptoHasher.mjs +0 -2
- package/dist/esm/chunk-5ADNWXP2.mjs +0 -2
- package/dist/esm/chunk-5ADNWXP2.mjs.map +0 -1
- package/dist/esm/chunk-5V2RGYYK.mjs +0 -2
- package/dist/esm/chunk-5V2RGYYK.mjs.map +0 -1
- package/dist/esm/chunk-5YI2GEG5.mjs +0 -2
- package/dist/esm/chunk-5YI2GEG5.mjs.map +0 -1
- package/dist/esm/chunk-CNH2RAJQ.mjs +0 -2
- package/dist/esm/chunk-I5JWDZIP.mjs.map +0 -1
- package/dist/esm/chunk-JCDZ2WXX.mjs.map +0 -1
- package/dist/esm/chunk-JKZHPY24.mjs +0 -2
- package/dist/esm/chunk-JM2B5E2I.mjs.map +0 -1
- package/dist/esm/chunk-KPZDC5ZE.mjs +0 -2
- package/dist/esm/chunk-KPZDC5ZE.mjs.map +0 -1
- package/dist/esm/chunk-LECNIPW7.mjs +0 -2
- package/dist/esm/chunk-LECNIPW7.mjs.map +0 -1
- package/dist/esm/chunk-N7CE244N.mjs +0 -2
- package/dist/esm/chunk-R2P2XANA.mjs +0 -2
- package/dist/esm/chunk-R2P2XANA.mjs.map +0 -1
- package/dist/esm/chunk-UTXJOB3O.mjs +0 -2
- package/dist/esm/chunk-VT6XJSRO.mjs.map +0 -1
- package/dist/esm/chunk-W4IWORPF.mjs +0 -2
- package/dist/esm/chunk-W4IWORPF.mjs.map +0 -1
- package/dist/esm/chunk-WDE54GRQ.mjs +0 -2
- package/dist/esm/chunk-WDE54GRQ.mjs.map +0 -1
- package/dist/esm/chunk-YZPQVZ7S.mjs +0 -2
- package/dist/esm/chunk-YZPQVZ7S.mjs.map +0 -1
- package/dist/esm/chunk-ZUQJLFR2.mjs +0 -2
- package/dist/esm/chunk-ZUQJLFR2.mjs.map +0 -1
- package/src/bcs/cryptoHasher.ts +0 -6
- /package/dist/esm/{chunk-4KEEUDZA.mjs.map → chunk-27PC47S7.mjs.map} +0 -0
- /package/dist/esm/{chunk-W36IQO5K.mjs.map → chunk-2NGHKNUS.mjs.map} +0 -0
- /package/dist/esm/{chunk-N466X3S6.mjs.map → chunk-37FFZSIM.mjs.map} +0 -0
- /package/dist/esm/{chunk-UTXJOB3O.mjs.map → chunk-3RJZNUCQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-Z2ZR4PTF.mjs.map → chunk-472OGHMG.mjs.map} +0 -0
- /package/dist/esm/{chunk-STYDBDYL.mjs.map → chunk-4VPCPASN.mjs.map} +0 -0
- /package/dist/esm/{chunk-M7HZOQ6A.mjs.map → chunk-5YH2YL3L.mjs.map} +0 -0
- /package/dist/esm/{chunk-EPTCPBVW.mjs.map → chunk-6DFVM2W6.mjs.map} +0 -0
- /package/dist/esm/{chunk-LEBJNW6Y.mjs.map → chunk-6FK6OA37.mjs.map} +0 -0
- /package/dist/esm/{chunk-FBLSW5TB.mjs.map → chunk-6GGHUBUA.mjs.map} +0 -0
- /package/dist/esm/{chunk-3FVRXELT.mjs.map → chunk-7BW2N4IE.mjs.map} +0 -0
- /package/dist/esm/{chunk-NCDP26DV.mjs.map → chunk-7JLHN655.mjs.map} +0 -0
- /package/dist/esm/{chunk-SBQRBBRS.mjs.map → chunk-7XRUPEQ4.mjs.map} +0 -0
- /package/dist/esm/{chunk-Q3AUNZDW.mjs.map → chunk-B76XCRLH.mjs.map} +0 -0
- /package/dist/esm/{chunk-MTLETLKV.mjs.map → chunk-BO44HPGU.mjs.map} +0 -0
- /package/dist/esm/{chunk-HGZGTBA4.mjs.map → chunk-DPWEHSHH.mjs.map} +0 -0
- /package/dist/esm/{chunk-LQH7T3TE.mjs.map → chunk-E4XMEVB7.mjs.map} +0 -0
- /package/dist/esm/{chunk-7STYQ5ZE.mjs.map → chunk-EFMAZTIM.mjs.map} +0 -0
- /package/dist/esm/{chunk-NQMF46E5.mjs.map → chunk-EQN6FVO7.mjs.map} +0 -0
- /package/dist/esm/{chunk-T23OVRNF.mjs.map → chunk-F3ZVWLDH.mjs.map} +0 -0
- /package/dist/esm/{chunk-F5C4SZZ7.mjs.map → chunk-FF4L66LJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-EB7AI4B4.mjs.map → chunk-FGGRPEQ3.mjs.map} +0 -0
- /package/dist/esm/{chunk-IEZO4PIG.mjs.map → chunk-FIG65OJD.mjs.map} +0 -0
- /package/dist/esm/{chunk-UDU5L4XH.mjs.map → chunk-FUKWM4HL.mjs.map} +0 -0
- /package/dist/esm/{chunk-C3L4ETUF.mjs.map → chunk-GRHLQDHF.mjs.map} +0 -0
- /package/dist/esm/{chunk-MGOHPDX4.mjs.map → chunk-GSCM444Z.mjs.map} +0 -0
- /package/dist/esm/{chunk-T6OEZ4KP.mjs.map → chunk-GTUBZWAF.mjs.map} +0 -0
- /package/dist/esm/{chunk-UWI5D7FD.mjs.map → chunk-H4AGIUGI.mjs.map} +0 -0
- /package/dist/esm/{chunk-3Y6JNFPD.mjs.map → chunk-HZOBRRQP.mjs.map} +0 -0
- /package/dist/esm/{chunk-6RBUXB5I.mjs.map → chunk-IBN7ETCB.mjs.map} +0 -0
- /package/dist/esm/{chunk-KFUOOBMJ.mjs.map → chunk-IGMXAPHY.mjs.map} +0 -0
- /package/dist/esm/{chunk-TEJ7BXJK.mjs.map → chunk-IPSITJFX.mjs.map} +0 -0
- /package/dist/esm/{chunk-NC5HHEEM.mjs.map → chunk-IXFYYWAC.mjs.map} +0 -0
- /package/dist/esm/{chunk-REBMGDZ5.mjs.map → chunk-J6VDYVNB.mjs.map} +0 -0
- /package/dist/esm/{chunk-Y5BON557.mjs.map → chunk-JKRWCFUQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-IJE5YSXW.mjs.map → chunk-JWGG6XFS.mjs.map} +0 -0
- /package/dist/esm/{chunk-MWN63XBE.mjs.map → chunk-K2KJX32L.mjs.map} +0 -0
- /package/dist/esm/{chunk-6KNAIXZ3.mjs.map → chunk-KMVSI4PC.mjs.map} +0 -0
- /package/dist/esm/{chunk-Y33VGXNI.mjs.map → chunk-KSSJ3CT5.mjs.map} +0 -0
- /package/dist/esm/{chunk-EIRSA5UU.mjs.map → chunk-KUMZXNMD.mjs.map} +0 -0
- /package/dist/esm/{chunk-NWWXZ7EW.mjs.map → chunk-L5CPAOUM.mjs.map} +0 -0
- /package/dist/esm/{chunk-EADBYPUD.mjs.map → chunk-LMEJ5K6B.mjs.map} +0 -0
- /package/dist/esm/{chunk-WAXCU6D6.mjs.map → chunk-MEOGVBMZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-3VGX3TXH.mjs.map → chunk-MLX6DFMR.mjs.map} +0 -0
- /package/dist/esm/{chunk-KKP4FBWZ.mjs.map → chunk-MX5Z3EHG.mjs.map} +0 -0
- /package/dist/esm/{chunk-MWUJCP27.mjs.map → chunk-NW3WUTTD.mjs.map} +0 -0
- /package/dist/esm/{chunk-YHO2EBXH.mjs.map → chunk-NW6LGHE7.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZCCYHFPK.mjs.map → chunk-OJL36Q4H.mjs.map} +0 -0
- /package/dist/esm/{chunk-LO7B3CWN.mjs.map → chunk-OJUFU5TJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-ONIYM7IU.mjs.map → chunk-PAY7N36H.mjs.map} +0 -0
- /package/dist/esm/{chunk-RUSWW265.mjs.map → chunk-PHEA3NOJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-OX5GWFHX.mjs.map → chunk-PUP6XMAV.mjs.map} +0 -0
- /package/dist/esm/{chunk-A3UVZHDJ.mjs.map → chunk-PWYL5QZP.mjs.map} +0 -0
- /package/dist/esm/{chunk-UFJGYMEB.mjs.map → chunk-R4KIZ2FK.mjs.map} +0 -0
- /package/dist/esm/{chunk-6M53MDWB.mjs.map → chunk-RTO3YBWQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-OT37OTT7.mjs.map → chunk-RURI53PG.mjs.map} +0 -0
- /package/dist/esm/{chunk-5RRZMXND.mjs.map → chunk-RX5SPT5S.mjs.map} +0 -0
- /package/dist/esm/{chunk-4USAUOCE.mjs.map → chunk-RYRID5HT.mjs.map} +0 -0
- /package/dist/esm/{chunk-Z6JERVLX.mjs.map → chunk-SBEZ64HG.mjs.map} +0 -0
- /package/dist/esm/{chunk-C34M4T77.mjs.map → chunk-SNDFJWYM.mjs.map} +0 -0
- /package/dist/esm/{chunk-7H3HRFVM.mjs.map → chunk-T5YEMU53.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZNEBMSNC.mjs.map → chunk-TUCCV62K.mjs.map} +0 -0
- /package/dist/esm/{chunk-7QGIAVW4.mjs.map → chunk-UBON2G6Y.mjs.map} +0 -0
- /package/dist/esm/{chunk-COW5IGYC.mjs.map → chunk-WA2NTBYY.mjs.map} +0 -0
- /package/dist/esm/{chunk-UO5LUYGO.mjs.map → chunk-XGDLSWBF.mjs.map} +0 -0
- /package/dist/esm/{chunk-EU6CX56Q.mjs.map → chunk-XH33BXEY.mjs.map} +0 -0
- /package/dist/esm/{chunk-PYUU4OEL.mjs.map → chunk-XVZBWW46.mjs.map} +0 -0
- /package/dist/esm/{chunk-MKUAW7KW.mjs.map → chunk-YDNOKWV3.mjs.map} +0 -0
- /package/dist/esm/{chunk-W637YAND.mjs.map → chunk-YRUF6N3U.mjs.map} +0 -0
- /package/dist/esm/{bcs → core/crypto}/cryptoHasher.mjs.map +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/account/EphemeralKeyPair.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { randomBytes } from \"@noble/hashes/utils\";\n\nimport {\n EPK_HORIZON_SECS,\n Ed25519PrivateKey,\n EphemeralPublicKey,\n EphemeralSignature,\n PrivateKey,\n} from \"../core/crypto\";\nimport { Hex } from \"../core/hex\";\nimport { bytesToBigIntLE, padAndPackBytesWithLen, poseidonHash } from \"../core/crypto/poseidon\";\nimport { EphemeralPublicKeyVariant, HexInput } from \"../types\";\nimport { Deserializer, Serializable, Serializer } from \"../bcs\";\nimport { currentTimeInSeconds, floorToWholeHour } from \"../utils/helpers\";\n\nexport class EphemeralKeyPair extends Serializable {\n static readonly BLINDER_LENGTH: number = 31;\n\n /**\n * A byte array of length BLINDER_LENGTH used to obfuscate the public key from the IdP.\n * Used in calculating the nonce passed to the IdP and as a secret witness in proof generation.\n */\n readonly blinder: Uint8Array;\n\n /**\n * A timestamp in seconds indicating when the ephemeral key pair is expired. After expiry, a new\n * EphemeralKeyPair must be generated and a new JWT needs to be created.\n */\n readonly expiryDateSecs: number;\n\n /**\n * The value passed to the IdP when the user authenticates. It comprises of a hash of the\n * ephermeral public key, expiry date, and blinder.\n */\n readonly nonce: string;\n\n /**\n * A private key used to sign transactions. This private key is not tied to any account on the chain as it\n * is ephemeral (not permanent) in nature.\n */\n private privateKey: PrivateKey;\n\n /**\n * A public key used to verify transactions. This public key is not tied to any account on the chain as it\n * is ephemeral (not permanent) in nature.\n */\n private publicKey: EphemeralPublicKey;\n\n constructor(args: { privateKey: PrivateKey; expiryDateSecs?: number; blinder?: HexInput }) {\n super();\n const { privateKey, expiryDateSecs, blinder } = args;\n this.privateKey = privateKey;\n this.publicKey = new EphemeralPublicKey(privateKey.publicKey());\n // We set the expiry date to be the nearest floored hour\n this.expiryDateSecs = expiryDateSecs || floorToWholeHour(currentTimeInSeconds() + EPK_HORIZON_SECS);\n // Generate the blinder if not provided\n this.blinder = blinder !== undefined ? Hex.fromHexInput(blinder).toUint8Array() : generateBlinder();\n // Calculate the nonce\n this.nonce = this.generateNonce();\n }\n\n /**\n * Returns the public key of the key pair.\n * @return EphemeralPublicKey\n */\n getPublicKey(): EphemeralPublicKey {\n return this.publicKey;\n }\n\n /**\n * Returns the public key of the key pair.\n * @return boolean\n */\n isExpired(): boolean {\n const currentTimeSecs: number = Math.floor(Date.now() / 1000);\n return currentTimeSecs > this.expiryDateSecs;\n }\n\n serialize(serializer: Serializer): void {\n serializer.serializeU32AsUleb128(this.publicKey.variant);\n serializer.serializeBytes(this.privateKey.toUint8Array());\n serializer.serializeU64(this.expiryDateSecs);\n serializer.serializeFixedBytes(this.blinder);\n }\n\n static deserialize(deserializer: Deserializer): EphemeralKeyPair {\n const variantIndex = deserializer.deserializeUleb128AsU32();\n let privateKey: PrivateKey;\n switch (variantIndex) {\n case EphemeralPublicKeyVariant.Ed25519:\n privateKey = Ed25519PrivateKey.deserialize(deserializer);\n break;\n default:\n throw new Error(`Unknown variant index for EphemeralPublicKey: ${variantIndex}`);\n }\n const expiryDateSecs = deserializer.deserializeU64();\n const blinder = deserializer.deserializeFixedBytes(31);\n return new EphemeralKeyPair({ privateKey, expiryDateSecs: Number(expiryDateSecs), blinder });\n }\n\n static fromBytes(bytes: Uint8Array): EphemeralKeyPair {\n return EphemeralKeyPair.deserialize(new Deserializer(bytes));\n }\n\n /**\n * Returns the public key of the key pair.\n * @param scheme the type of keypair to use for the EphemeralKeyPair. Only Ed25519 supported for now.\n * @param expiryDateSecs the date of expiry.\n * @return boolean\n */\n static generate(args?: { scheme: EphemeralPublicKeyVariant; expiryDateSecs?: number }): EphemeralKeyPair {\n let privateKey: PrivateKey;\n\n switch (args?.scheme) {\n case EphemeralPublicKeyVariant.Ed25519:\n default:\n privateKey = Ed25519PrivateKey.generate();\n }\n\n return new EphemeralKeyPair({ privateKey, expiryDateSecs: args?.expiryDateSecs });\n }\n\n /**\n * From the ephemeral public key, expiry timestamp, and blinder, calculate the nonce to be used at authentication via OIDC.\n * @returns string\n */\n private generateNonce(): string {\n const fields = padAndPackBytesWithLen(this.publicKey.bcsToBytes(), 93);\n fields.push(BigInt(this.expiryDateSecs));\n fields.push(bytesToBigIntLE(this.blinder));\n const nonceHash = poseidonHash(fields);\n return nonceHash.toString();\n }\n\n /**\n * Sign the given message with the private key.\n * @param data in HexInput format\n * @returns EphemeralSignature\n */\n sign(data: HexInput): EphemeralSignature {\n if (this.isExpired()) {\n throw new Error(\"EphemeralKeyPair has expired\");\n }\n return new EphemeralSignature(this.privateKey.sign(data));\n }\n}\n\n/**\n * Generates a random byte array of length EphemeralKeyPair.BLINDER_LENGTH\n * @returns Uint8Array\n */\nfunction generateBlinder(): Uint8Array {\n return randomBytes(EphemeralKeyPair.BLINDER_LENGTH);\n}\n"],"mappings":"+VAGA,OAAS,eAAAA,MAAmB,sBAerB,IAAMC,EAAN,MAAMA,UAAyBC,CAAa,CAiCjD,YAAYC,EAA+E,CACzF,MAAM,EACN,GAAM,CAAE,WAAAC,EAAY,eAAAC,EAAgB,QAAAC,CAAQ,EAAIH,EAChD,KAAK,WAAaC,EAClB,KAAK,UAAY,IAAIG,EAAmBH,EAAW,UAAU,CAAC,EAE9D,KAAK,eAAiBC,GAAkBG,EAAiBC,EAAqB,EAAIC,CAAgB,EAElG,KAAK,QAAUJ,IAAY,OAAYK,EAAI,aAAaL,CAAO,EAAE,aAAa,EAAIM,EAAgB,EAElG,KAAK,MAAQ,KAAK,cAAc,CAClC,CAMA,cAAmC,CACjC,OAAO,KAAK,SACd,CAMA,WAAqB,CAEnB,OADgC,KAAK,MAAM,KAAK,IAAI,EAAI,GAAI,EACnC,KAAK,cAChC,CAEA,UAAUC,EAA8B,CACtCA,EAAW,sBAAsB,KAAK,UAAU,OAAO,EACvDA,EAAW,eAAe,KAAK,WAAW,aAAa,CAAC,EACxDA,EAAW,aAAa,KAAK,cAAc,EAC3CA,EAAW,oBAAoB,KAAK,OAAO,CAC7C,CAEA,OAAO,YAAYC,EAA8C,CAC/D,IAAMC,EAAeD,EAAa,wBAAwB,EACtDV,EACJ,OAAQW,EAAc,CACpB,OACEX,EAAaY,EAAkB,YAAYF,CAAY,EACvD,MACF,QACE,MAAM,IAAI,MAAM,iDAAiDC,CAAY,EAAE,CACnF,CACA,IAAMV,EAAiBS,EAAa,eAAe,EAC7CR,EAAUQ,EAAa,sBAAsB,EAAE,EACrD,OAAO,IAAIb,EAAiB,CAAE,WAAAG,EAAY,eAAgB,OAAOC,CAAc,EAAG,QAAAC,CAAQ,CAAC,CAC7F,CAEA,OAAO,UAAUW,EAAqC,CACpD,OAAOhB,EAAiB,YAAY,IAAIiB,EAAaD,CAAK,CAAC,CAC7D,CAQA,OAAO,SAASd,EAAyF,CACvG,IAAIC,EAEJ,OAAQD,GAAM,OAAQ,CACpB,OACA,QACEC,EAAaY,EAAkB,SAAS,CAC5C,CAEA,OAAO,IAAIf,EAAiB,CAAE,WAAAG,EAAY,eAAgBD,GAAM,cAAe,CAAC,CAClF,CAMQ,eAAwB,CAC9B,IAAMgB,EAASC,EAAuB,KAAK,UAAU,WAAW,EAAG,EAAE,EACrE,OAAAD,EAAO,KAAK,OAAO,KAAK,cAAc,CAAC,EACvCA,EAAO,KAAKE,EAAgB,KAAK,OAAO,CAAC,EACvBC,EAAaH,CAAM,EACpB,SAAS,CAC5B,CAOA,KAAKI,EAAoC,CACvC,GAAI,KAAK,UAAU,EACjB,MAAM,IAAI,MAAM,8BAA8B,EAEhD,OAAO,IAAIC,EAAmB,KAAK,WAAW,KAAKD,CAAI,CAAC,CAC1D,CACF,EAlIatB,EACK,eAAyB,GADpC,IAAMwB,EAANxB,EAwIP,SAASW,GAA8B,CACrC,OAAOc,EAAYD,EAAiB,cAAc,CACpD","names":["randomBytes","_EphemeralKeyPair","Serializable","args","privateKey","expiryDateSecs","blinder","EphemeralPublicKey","floorToWholeHour","currentTimeInSeconds","EPK_HORIZON_SECS","Hex","generateBlinder","serializer","deserializer","variantIndex","Ed25519PrivateKey","bytes","Deserializer","fields","padAndPackBytesWithLen","bytesToBigIntLE","poseidonHash","data","EphemeralSignature","EphemeralKeyPair","randomBytes"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-UMLUOYFK.mjs";import{b as r}from"./chunk-AOCNYMMX.mjs";var t=class extends e{toString(){let n=this.toUint8Array();return r.fromHexInput(n).toString()}},a=class extends t{};export{t as a,a as b};
|
|
2
|
+
//# sourceMappingURL=chunk-WA2NTBYY.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a,c}from"./chunk-BO44HPGU.mjs";import{i as o,j as l}from"./chunk-T4HO5JMQ.mjs";import{a as n,c as s}from"./chunk-XVZBWW46.mjs";import{b}from"./chunk-WA2NTBYY.mjs";import{a as p}from"./chunk-4VPCPASN.mjs";import{a as y}from"./chunk-EFMAZTIM.mjs";var f=class t extends b{constructor(e){super();if(this.publicKey=e,e instanceof n)this.variant=0;else if(e instanceof a)this.variant=1;else if(e instanceof o)this.variant=3;else throw new Error("Unsupported public key type")}verifySignature(e){let{message:r,signature:i}=e;return i instanceof u?this.publicKey.verifySignature({message:r,signature:i.signature}):!1}authKey(){return y.fromSchemeAndBytes({scheme:2,input:this.toUint8Array()})}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeU32AsUleb128(this.variant),this.publicKey.serialize(e)}static deserialize(e){let r=e.deserializeUleb128AsU32(),i;switch(r){case 0:i=n.deserialize(e);break;case 1:i=a.deserialize(e);break;case 3:i=o.deserialize(e);break;default:throw new Error(`Unknown variant index for AnyPublicKey: ${r}`)}return new t(i)}static isPublicKey(e){return e instanceof t}isEd25519(){return this.publicKey instanceof n}isSecp256k1PublicKey(){return this.publicKey instanceof a}},u=class t extends p{constructor(e){super();if(this.signature=e,e instanceof s)this.variant=0;else if(e instanceof c)this.variant=1;else if(e instanceof l)this.variant=3;else throw new Error("Unsupported signature type")}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeU32AsUleb128(this.variant),this.signature.serialize(e)}static deserialize(e){let r=e.deserializeUleb128AsU32(),i;switch(r){case 0:i=s.deserialize(e);break;case 1:i=c.deserialize(e);break;case 3:i=l.deserialize(e);break;default:throw new Error(`Unknown variant index for AnySignature: ${r}`)}return new t(i)}};export{f as a,u as b};
|
|
2
|
+
//# sourceMappingURL=chunk-XGDLSWBF.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as y,c as f,d as x,e as v,f as A,g as C,h as U,i as b,j as I,k as M,l as P,m as E,n as G,o as N}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as y,c as f,d as x,e as v,f as A,g as C,h as U,i as b,j as I,k as M,l as P,m as E,n as G,o as N}from"./chunk-MLX6DFMR.mjs";import{a as l}from"./chunk-GSCM444Z.mjs";import{b as w}from"./chunk-F3ZVWLDH.mjs";function V(e){return!!e.match(/^[_a-zA-Z0-9]+$/)}function W(e){return!!e.match(/\s/)}function $(e){return!!e.match(/^T[0-9]+$/)}function F(e){return!!e.match(/^&.+$/)}function k(e){switch(e){case"signer":case"address":case"bool":case"u8":case"u16":case"u32":case"u64":case"u128":case"u256":return!0;default:return!1}}function L(e,i){let c=i;for(;c<e.length;c+=1){let s=e[c];if(!W(s))break}return c}var R=(a=>(a.InvalidTypeTag="unknown type",a.UnexpectedGenericType="unexpected generic type",a.UnexpectedTypeArgumentClose="unexpected '>'",a.UnexpectedWhitespaceCharacter="unexpected whitespace character",a.UnexpectedComma="unexpected ','",a.TypeArgumentCountMismatch="type argument count doesn't match expected amount",a.MissingTypeArgumentClose="no matching '>' for '<'",a.MissingTypeArgument="no type argument before ','",a.UnexpectedPrimitiveTypeArguments="primitive types not expected to have type arguments",a.UnexpectedVectorTypeArgumentCount="vector type expected to have exactly one type argument",a.UnexpectedStructFormat="unexpected struct format, must be of the form 0xaddress::module_name::struct_name",a.InvalidModuleNameCharacter="module name must only contain alphanumeric or '_' characters",a.InvalidStructNameCharacter="struct name must only contain alphanumeric or '_' characters",a.InvalidAddress="struct address must be valid",a))(R||{}),t=class extends Error{constructor(i,c){super(`Failed to parse typeTag '${i}', ${c}`)}};function j(e,i){let c=i?.allowGenerics??!1,s=[],u=[],n=[],o=0,r="",T=1;for(;o<e.length;){let d=e[o];if(d==="<")s.push({savedExpectedTypes:T,savedStr:r,savedTypes:n}),r="",n=[],T=1;else if(d===">"){if(r!==""){let a=g(r,u,c);n.push(a)}let p=s.pop();if(p===void 0)throw new t(e,"unexpected '>'");if(T!==n.length)throw new t(e,"type argument count doesn't match expected amount");let{savedStr:m,savedTypes:h,savedExpectedTypes:_}=p;u=n,n=h,r=m,T=_}else if(d===","){if(s.length===0)throw new t(e,"unexpected ','");if(r.length===0)throw new t(e,"no type argument before ','");let p=g(r,u,c);u=[],n.push(p),r="",T+=1}else if(W(d)){let p=!1;if(r.length!==0){let h=g(r,u,c);u=[],n.push(h),r="",p=!0}o=L(e,o);let m=e[o];if(o<e.length&&p&&m!==","&&m!==">")throw new t(e,"unexpected whitespace character");continue}else r+=d;o+=1}if(s.length>0)throw new t(e,"no matching '>' for '<'");switch(n.length){case 0:return g(r,u,c);case 1:if(r==="")return n[0];throw new t(e,"unexpected ','");default:throw new t(e,"unexpected whitespace character")}}function g(e,i,c){let s=e.trim(),u=s.toLowerCase();if(k(u)&&i.length>0)throw new t(e,"primitive types not expected to have type arguments");switch(s.toLowerCase()){case"signer":return new I;case"bool":return new y;case"address":return new b;case"u8":return new f;case"u16":return new x;case"u32":return new v;case"u64":return new A;case"u128":return new C;case"u256":return new U;case"vector":if(i.length!==1)throw new t(e,"vector type expected to have exactly one type argument");return new E(i[0]);default:if(F(s)){let r=s.substring(1);return new M(g(r,i,c))}if($(s)){if(c)return new P(Number(s.split("T")[1]));throw new t(e,"unexpected generic type")}if(!s.match(/:/))throw new t(e,"unknown type");let n=s.split("::");if(n.length!==3)throw new t(e,"unexpected struct format, must be of the form 0xaddress::module_name::struct_name");let o;try{o=w.fromString(n[0])}catch{throw new t(e,"struct address must be valid")}if(!V(n[1]))throw new t(e,"module name must only contain alphanumeric or '_' characters");if(!V(n[2]))throw new t(e,"struct name must only contain alphanumeric or '_' characters");return new G(new N(o,new l(n[1]),new l(n[2]),i))}}export{R as a,t as b,j as c};
|
|
2
|
+
//# sourceMappingURL=chunk-XH33BXEY.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as U}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as U}from"./chunk-WA2NTBYY.mjs";import{a as P}from"./chunk-4VPCPASN.mjs";import{a as d}from"./chunk-TJDC5PWD.mjs";import{d as A,f as K,g as v,h as H,i as S,j as E}from"./chunk-LR65XHSF.mjs";import{a as p}from"./chunk-EFMAZTIM.mjs";import{a as h}from"./chunk-UMLUOYFK.mjs";import{b as s}from"./chunk-AOCNYMMX.mjs";import{ed25519 as y}from"@noble/curves/ed25519";var b=[237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16],n=class n extends U{constructor(e){super();let t=s.fromHexInput(e);if(t.toUint8Array().length!==n.LENGTH)throw new Error(`PublicKey length should be ${n.LENGTH}`);this.key=t}verifySignature(e){let{message:t,signature:i}=e;if(!(i instanceof c))return!1;let o=d(t),u=s.fromHexInput(o).toUint8Array(),l=i.toUint8Array(),x=this.key.toUint8Array();return i.isCanonicalSignature()?y.verify(l,u,x):!1}authKey(){return p.fromSchemeAndBytes({scheme:0,input:this.toUint8Array()})}toUint8Array(){return this.key.toUint8Array()}serialize(e){e.serializeBytes(this.key.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new n(t)}static isPublicKey(e){return e instanceof n}};n.LENGTH=32;var m=n,r=class r extends h{constructor(e){super();let t=s.fromHexInput(e);if(t.toUint8Array().length!==r.LENGTH)throw new Error(`PrivateKey length should be ${r.LENGTH}`);this.signingKey=t}static generate(){let e=y.utils.randomPrivateKey();return new r(e)}static fromDerivationPath(e,t){if(!K(e))throw new Error(`Invalid derivation path ${e}`);return r.fromDerivationPathInner(e,E(t))}static fromDerivationPathInner(e,t,i=A){let{key:o,chainCode:u}=v(r.SLIP_0010_SEED,t),l=S(e).map(g=>parseInt(g,10)),{key:x}=l.reduce((g,I)=>H(g,I+i),{key:o,chainCode:u});return new r(x)}publicKey(){let e=y.getPublicKey(this.signingKey.toUint8Array());return new m(e)}sign(e){let t=d(e),i=s.fromHexInput(t).toUint8Array(),o=y.sign(i,this.signingKey.toUint8Array());return new c(o)}toUint8Array(){return this.signingKey.toUint8Array()}toString(){return this.signingKey.toString()}serialize(e){e.serializeBytes(this.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new r(t)}static isPrivateKey(e){return e instanceof r}};r.LENGTH=32,r.SLIP_0010_SEED="ed25519 seed";var z=r,a=class a extends P{constructor(e){super();let t=s.fromHexInput(e);if(t.toUint8Array().length!==a.LENGTH)throw new Error(`Signature length should be ${a.LENGTH}`);this.data=t}toUint8Array(){return this.data.toUint8Array()}serialize(e){e.serializeBytes(this.data.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new a(t)}isCanonicalSignature(){let e=this.toUint8Array().slice(32);for(let t=e.length-1;t>=0;t-=1){if(e[t]<b[t])return!0;if(e[t]>b[t])return!1}return!1}};a.LENGTH=64;var c=a;export{m as a,z as b,c};
|
|
2
|
+
//# sourceMappingURL=chunk-XVZBWW46.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-RKHPXZM6.mjs";import{a as p}from"./chunk-FLALKQIK.mjs";var l={400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",429:"Too Many Requests",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"};async function c(s,R){let{url:o,method:i,body:u,contentType:d,params:t,overrides:e,originMethod:n}=s,r={...e?.HEADERS,"x-aptos-client":`aptos-typescript-sdk/${p}`,"content-type":d??"application/json","x-aptos-typescript-sdk-origin-method":n};return e?.AUTH_TOKEN&&(r.Authorization=`Bearer ${e?.AUTH_TOKEN}`),e?.API_KEY&&(r.Authorization=`Bearer ${e?.API_KEY}`),R.provider({url:o,method:i,body:u,params:t,headers:r,overrides:e})}async function N(s,R,o){let{url:i,path:u}=s,d=u?`${i}/${u}`:i,t=await c({...s,url:d},R.client),e={status:t.status,statusText:t.statusText,data:t.data,headers:t.headers,config:t.config,request:t.request,url:d};if(e.status===401)throw new a(s,e,`Error: ${e.data}`);if(o==="Indexer"){let r=e.data;if(r.errors)throw new a(s,e,`Indexer error: ${r.errors[0].message}`??`Indexer unhandled Error ${t.status} : ${t.statusText}`);e.data=r.data}else if((o==="Pepper"||o==="Prover")&&e.status>=500)throw new a(s,e,`${t.data}`);if(e.status>=200&&e.status<300)return e;let n;throw e&&e.data&&"message"in e.data&&"error_code"in e.data?n=JSON.stringify(e.data):e.status in l?n=l[e.status]:n=`Unhandled Error ${e.status} : ${e.statusText}`,new a(s,e,`${o} error: ${n}`)}export{c as a,N as b};
|
|
2
|
+
//# sourceMappingURL=chunk-YBXQVY7N.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/client/core.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { AptosConfig } from \"../api/aptosConfig\";\nimport { AptosApiError, AptosResponse } from \"./types\";\nimport { VERSION } from \"../version\";\nimport { AnyNumber, AptosRequest, Client, ClientRequest, ClientResponse, MimeType } from \"../types\";\nimport { AptosApiType } from \"../utils\";\n\n/**\n * Meaningful errors map\n */\nconst errors: Record<number, string> = {\n 400: \"Bad Request\",\n 401: \"Unauthorized\",\n 403: \"Forbidden\",\n 404: \"Not Found\",\n 429: \"Too Many Requests\",\n 500: \"Internal Server Error\",\n 502: \"Bad Gateway\",\n 503: \"Service Unavailable\",\n};\n\n/**\n * Given a url and method, sends the request with axios and\n * returns the response.\n */\nexport async function request<Req, Res>(options: ClientRequest<Req>, client: Client): Promise<ClientResponse<Res>> {\n const { url, method, body, contentType, params, overrides, originMethod } = options;\n const headers: Record<string, string | AnyNumber | boolean | undefined> = {\n ...overrides?.HEADERS,\n \"x-aptos-client\": `aptos-typescript-sdk/${VERSION}`,\n \"content-type\": contentType ?? MimeType.JSON,\n \"x-aptos-typescript-sdk-origin-method\": originMethod,\n };\n\n if (overrides?.AUTH_TOKEN) {\n headers.Authorization = `Bearer ${overrides?.AUTH_TOKEN}`;\n }\n if (overrides?.API_KEY) {\n headers.Authorization = `Bearer ${overrides?.API_KEY}`;\n }\n\n /*\n * make a call using the @aptos-labs/aptos-client package\n * {@link https://www.npmjs.com/package/@aptos-labs/aptos-client}\n */\n return client.provider<Req, Res>({\n url,\n method,\n body,\n params,\n headers,\n overrides,\n });\n}\n\n/**\n * The main function to use when doing an API request.\n *\n * @param options AptosRequest\n * @param aptosConfig The config information for the SDK client instance\n * @returns the response or AptosApiError\n */\nexport async function aptosRequest<Req extends {}, Res extends {}>(\n options: AptosRequest,\n aptosConfig: AptosConfig,\n apiType: AptosApiType,\n): Promise<AptosResponse<Req, Res>> {\n const { url, path } = options;\n const fullUrl = path ? `${url}/${path}` : url;\n const response = await request<Req, Res>({ ...options, url: fullUrl }, aptosConfig.client);\n\n const result: AptosResponse<Req, Res> = {\n status: response.status,\n statusText: response.statusText!,\n data: response.data,\n headers: response.headers,\n config: response.config,\n request: response.request,\n url: fullUrl,\n };\n\n // Handle case for `Unauthorized` error (i.e API_KEY error)\n if (result.status === 401) {\n throw new AptosApiError(options, result, `Error: ${result.data}`);\n }\n\n // to support both fullnode and indexer responses,\n // check if it is an indexer query, and adjust response.data\n if (apiType === AptosApiType.INDEXER) {\n const indexerResponse = result.data as any;\n // Handle Indexer general errors\n if (indexerResponse.errors) {\n throw new AptosApiError(\n options,\n result,\n `Indexer error: ${indexerResponse.errors[0].message}` ??\n `Indexer unhandled Error ${response.status} : ${response.statusText}`,\n );\n }\n result.data = indexerResponse.data as Res;\n }
|
|
1
|
+
{"version":3,"sources":["../../src/client/core.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { AptosConfig } from \"../api/aptosConfig\";\nimport { AptosApiError, AptosResponse } from \"./types\";\nimport { VERSION } from \"../version\";\nimport { AnyNumber, AptosRequest, Client, ClientRequest, ClientResponse, MimeType } from \"../types\";\nimport { AptosApiType } from \"../utils\";\n\n/**\n * Meaningful errors map\n */\nconst errors: Record<number, string> = {\n 400: \"Bad Request\",\n 401: \"Unauthorized\",\n 403: \"Forbidden\",\n 404: \"Not Found\",\n 429: \"Too Many Requests\",\n 500: \"Internal Server Error\",\n 502: \"Bad Gateway\",\n 503: \"Service Unavailable\",\n};\n\n/**\n * Given a url and method, sends the request with axios and\n * returns the response.\n */\nexport async function request<Req, Res>(options: ClientRequest<Req>, client: Client): Promise<ClientResponse<Res>> {\n const { url, method, body, contentType, params, overrides, originMethod } = options;\n const headers: Record<string, string | AnyNumber | boolean | undefined> = {\n ...overrides?.HEADERS,\n \"x-aptos-client\": `aptos-typescript-sdk/${VERSION}`,\n \"content-type\": contentType ?? MimeType.JSON,\n \"x-aptos-typescript-sdk-origin-method\": originMethod,\n };\n\n if (overrides?.AUTH_TOKEN) {\n headers.Authorization = `Bearer ${overrides?.AUTH_TOKEN}`;\n }\n if (overrides?.API_KEY) {\n headers.Authorization = `Bearer ${overrides?.API_KEY}`;\n }\n\n /*\n * make a call using the @aptos-labs/aptos-client package\n * {@link https://www.npmjs.com/package/@aptos-labs/aptos-client}\n */\n return client.provider<Req, Res>({\n url,\n method,\n body,\n params,\n headers,\n overrides,\n });\n}\n\n/**\n * The main function to use when doing an API request.\n *\n * @param options AptosRequest\n * @param aptosConfig The config information for the SDK client instance\n * @returns the response or AptosApiError\n */\nexport async function aptosRequest<Req extends {}, Res extends {}>(\n options: AptosRequest,\n aptosConfig: AptosConfig,\n apiType: AptosApiType,\n): Promise<AptosResponse<Req, Res>> {\n const { url, path } = options;\n const fullUrl = path ? `${url}/${path}` : url;\n const response = await request<Req, Res>({ ...options, url: fullUrl }, aptosConfig.client);\n\n const result: AptosResponse<Req, Res> = {\n status: response.status,\n statusText: response.statusText!,\n data: response.data,\n headers: response.headers,\n config: response.config,\n request: response.request,\n url: fullUrl,\n };\n\n // Handle case for `Unauthorized` error (i.e API_KEY error)\n if (result.status === 401) {\n throw new AptosApiError(options, result, `Error: ${result.data}`);\n }\n\n // to support both fullnode and indexer responses,\n // check if it is an indexer query, and adjust response.data\n if (apiType === AptosApiType.INDEXER) {\n const indexerResponse = result.data as any;\n // Handle Indexer general errors\n if (indexerResponse.errors) {\n throw new AptosApiError(\n options,\n result,\n `Indexer error: ${indexerResponse.errors[0].message}` ??\n `Indexer unhandled Error ${response.status} : ${response.statusText}`,\n );\n }\n result.data = indexerResponse.data as Res;\n } else if (apiType === AptosApiType.PEPPER || apiType === AptosApiType.PROVER) {\n if (result.status >= 500) {\n throw new AptosApiError(options, result, `${response.data}`);\n }\n }\n\n if (result.status >= 200 && result.status < 300) {\n return result;\n }\n\n let errorMessage: string;\n\n if (result && result.data && \"message\" in result.data && \"error_code\" in result.data) {\n errorMessage = JSON.stringify(result.data);\n } else if (result.status in errors) {\n // If it's not an API type, it must come form infra, these are prehandled\n errorMessage = errors[result.status];\n } else {\n // Everything else is unhandled\n errorMessage = `Unhandled Error ${result.status} : ${result.statusText}`;\n }\n\n // We have to explicitly check for all request types, because if the error is a non-indexer error, but\n // comes from an indexer request (e.g. 404), we'll need to mention it appropriately\n throw new AptosApiError(options, result, `${apiType} error: ${errorMessage}`);\n}\n"],"mappings":"6EAYA,IAAMA,EAAiC,CACrC,IAAK,cACL,IAAK,eACL,IAAK,YACL,IAAK,YACL,IAAK,oBACL,IAAK,wBACL,IAAK,cACL,IAAK,qBACP,EAMA,eAAsBC,EAAkBC,EAA6BC,EAA8C,CACjH,GAAM,CAAE,IAAAC,EAAK,OAAAC,EAAQ,KAAAC,EAAM,YAAAC,EAAa,OAAAC,EAAQ,UAAAC,EAAW,aAAAC,CAAa,EAAIR,EACtES,EAAoE,CACxE,GAAGF,GAAW,QACd,iBAAkB,wBAAwBG,CAAO,GACjD,eAAgBL,sBAChB,uCAAwCG,CAC1C,EAEA,OAAID,GAAW,aACbE,EAAQ,cAAgB,UAAUF,GAAW,UAAU,IAErDA,GAAW,UACbE,EAAQ,cAAgB,UAAUF,GAAW,OAAO,IAO/CN,EAAO,SAAmB,CAC/B,IAAAC,EACA,OAAAC,EACA,KAAAC,EACA,OAAAE,EACA,QAAAG,EACA,UAAAF,CACF,CAAC,CACH,CASA,eAAsBI,EACpBX,EACAY,EACAC,EACkC,CAClC,GAAM,CAAE,IAAAX,EAAK,KAAAY,CAAK,EAAId,EAChBe,EAAUD,EAAO,GAAGZ,CAAG,IAAIY,CAAI,GAAKZ,EACpCc,EAAW,MAAMjB,EAAkB,CAAE,GAAGC,EAAS,IAAKe,CAAQ,EAAGH,EAAY,MAAM,EAEnFK,EAAkC,CACtC,OAAQD,EAAS,OACjB,WAAYA,EAAS,WACrB,KAAMA,EAAS,KACf,QAASA,EAAS,QAClB,OAAQA,EAAS,OACjB,QAASA,EAAS,QAClB,IAAKD,CACP,EAGA,GAAIE,EAAO,SAAW,IACpB,MAAM,IAAIC,EAAclB,EAASiB,EAAQ,UAAUA,EAAO,IAAI,EAAE,EAKlE,GAAIJ,cAAkC,CACpC,IAAMM,EAAkBF,EAAO,KAE/B,GAAIE,EAAgB,OAClB,MAAM,IAAID,EACRlB,EACAiB,EACA,kBAAkBE,EAAgB,OAAO,CAAC,EAAE,OAAO,IACjD,2BAA2BH,EAAS,MAAM,MAAMA,EAAS,UAAU,EACvE,EAEFC,EAAO,KAAOE,EAAgB,IAChC,UAAWN,cAAmCA,eACxCI,EAAO,QAAU,IACnB,MAAM,IAAIC,EAAclB,EAASiB,EAAQ,GAAGD,EAAS,IAAI,EAAE,EAI/D,GAAIC,EAAO,QAAU,KAAOA,EAAO,OAAS,IAC1C,OAAOA,EAGT,IAAIG,EAEJ,MAAIH,GAAUA,EAAO,MAAQ,YAAaA,EAAO,MAAQ,eAAgBA,EAAO,KAC9EG,EAAe,KAAK,UAAUH,EAAO,IAAI,EAChCA,EAAO,UAAUnB,EAE1BsB,EAAetB,EAAOmB,EAAO,MAAM,EAGnCG,EAAe,mBAAmBH,EAAO,MAAM,MAAMA,EAAO,UAAU,GAKlE,IAAIC,EAAclB,EAASiB,EAAQ,GAAGJ,CAAO,WAAWO,CAAY,EAAE,CAC9E","names":["errors","request","options","client","url","method","body","contentType","params","overrides","originMethod","headers","VERSION","aptosRequest","aptosConfig","apiType","path","fullUrl","response","result","AptosApiError","indexerResponse","errorMessage"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-472OGHMG.mjs";import{b as a}from"./chunk-F3ZVWLDH.mjs";import{a as i}from"./chunk-UMLUOYFK.mjs";var o=class t extends i{constructor(e,r){super();this.rawTransaction=e,this.feePayerAddress=r}serialize(e){this.rawTransaction.serialize(e),this.feePayerAddress===void 0?e.serializeBool(!1):(e.serializeBool(!0),this.feePayerAddress.serialize(e))}static deserialize(e){let r=n.deserialize(e),d=e.deserializeBool(),s;return d&&(s=a.deserialize(e)),new t(r,s)}};export{o as a};
|
|
2
|
+
//# sourceMappingURL=chunk-YDNOKWV3.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-472OGHMG.mjs";import{b as i}from"./chunk-F3ZVWLDH.mjs";import{a as d}from"./chunk-UMLUOYFK.mjs";var o=class t extends d{constructor(e,s,r){super();this.rawTransaction=e,this.feePayerAddress=r,this.secondarySignerAddresses=s}serialize(e){this.rawTransaction.serialize(e),e.serializeVector(this.secondarySignerAddresses),this.feePayerAddress===void 0?e.serializeBool(!1):(e.serializeBool(!0),this.feePayerAddress.serialize(e))}static deserialize(e){let s=n.deserialize(e),r=e.deserializeVector(i),c=e.deserializeBool(),a;return c&&(a=i.deserialize(e)),new t(s,r,a)}};export{o as a};
|
|
2
|
+
//# sourceMappingURL=chunk-YRUF6N3U.mjs.map
|
package/dist/esm/cli/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as o}from"../chunk-UBON2G6Y.mjs";import{a as r}from"../chunk-7UBKXR37.mjs";import"../chunk-QHB5A5YP.mjs";import"../chunk-FVA2OPG4.mjs";export{o as LocalNode,r as Move};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-UBON2G6Y.mjs";import"../chunk-QHB5A5YP.mjs";import"../chunk-FVA2OPG4.mjs";export{a as LocalNode};
|
|
2
2
|
//# sourceMappingURL=localNode.mjs.map
|
package/dist/esm/client/core.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../chunk-
|
|
1
|
+
import{a,b}from"../chunk-YBXQVY7N.mjs";import"../chunk-GED6IT3S.mjs";import"../chunk-3RJZNUCQ.mjs";import"../chunk-RKHPXZM6.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-GRHLQDHF.mjs";import"../chunk-7BW2N4IE.mjs";import"../chunk-FGGRPEQ3.mjs";import"../chunk-IBN7ETCB.mjs";import"../chunk-Q6LFIZ3L.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-3IFR6T3V.mjs";import"../chunk-UMLUOYFK.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FLALKQIK.mjs";import"../chunk-GY6LFCB2.mjs";import"../chunk-YE5B2S5L.mjs";import"../chunk-FVA2OPG4.mjs";export{b as aptosRequest,a as request};
|
|
2
2
|
//# sourceMappingURL=core.mjs.map
|
|
@@ -50,6 +50,12 @@ type GetAptosRequestOptions = Omit<GetRequestOptions, "type">;
|
|
|
50
50
|
*/
|
|
51
51
|
declare function get<Req extends {}, Res extends {}>(options: GetRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
52
52
|
declare function getAptosFullNode<Req extends {}, Res extends {}>(options: GetAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
53
|
+
/**
|
|
54
|
+
* Makes a get request to the pepper service
|
|
55
|
+
*
|
|
56
|
+
* @param options GetAptosRequestOptions
|
|
57
|
+
* @returns AptosResponse
|
|
58
|
+
*/
|
|
53
59
|
declare function getAptosPepperService<Req extends {}, Res extends {}>(options: GetAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
54
60
|
declare function paginateWithCursor<Req extends Record<string, any>, Res extends Array<{}>>(options: GetAptosRequestOptions): Promise<Res>;
|
|
55
61
|
|
package/dist/esm/client/get.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d}from"../chunk-
|
|
1
|
+
import{a,b,c,d}from"../chunk-JOXU5RWH.mjs";import"../chunk-YBXQVY7N.mjs";import"../chunk-GED6IT3S.mjs";import"../chunk-3RJZNUCQ.mjs";import"../chunk-RKHPXZM6.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-GRHLQDHF.mjs";import"../chunk-7BW2N4IE.mjs";import"../chunk-FGGRPEQ3.mjs";import"../chunk-IBN7ETCB.mjs";import"../chunk-Q6LFIZ3L.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-3IFR6T3V.mjs";import"../chunk-UMLUOYFK.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FLALKQIK.mjs";import"../chunk-GY6LFCB2.mjs";import"../chunk-YE5B2S5L.mjs";import"../chunk-FVA2OPG4.mjs";export{a as get,b as getAptosFullNode,c as getAptosPepperService,d as paginateWithCursor};
|
|
2
2
|
//# sourceMappingURL=get.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunk-N2FKVZ4D.mjs";import{a as d,b as e,c as f,d as g}from"../chunk-
|
|
1
|
+
import"../chunk-N2FKVZ4D.mjs";import{a as d,b as e,c as f,d as g}from"../chunk-JOXU5RWH.mjs";import{a as h,b as i,c as j,d as k,e as l,f as m}from"../chunk-CVCM46UN.mjs";import{a as b,b as c}from"../chunk-YBXQVY7N.mjs";import"../chunk-GED6IT3S.mjs";import"../chunk-3RJZNUCQ.mjs";import{a}from"../chunk-RKHPXZM6.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-GRHLQDHF.mjs";import"../chunk-7BW2N4IE.mjs";import"../chunk-FGGRPEQ3.mjs";import"../chunk-IBN7ETCB.mjs";import"../chunk-Q6LFIZ3L.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-3IFR6T3V.mjs";import"../chunk-UMLUOYFK.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FLALKQIK.mjs";import"../chunk-GY6LFCB2.mjs";import"../chunk-YE5B2S5L.mjs";import"../chunk-FVA2OPG4.mjs";export{a as AptosApiError,c as aptosRequest,d as get,e as getAptosFullNode,f as getAptosPepperService,g as paginateWithCursor,h as post,k as postAptosFaucet,i as postAptosFullNode,j as postAptosIndexer,l as postAptosPepperService,m as postAptosProvingService,b as request};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -56,6 +56,12 @@ declare function post<Req extends {}, Res extends {}>(options: PostRequestOption
|
|
|
56
56
|
declare function postAptosFullNode<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
57
57
|
declare function postAptosIndexer<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
58
58
|
declare function postAptosFaucet<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
59
|
+
/**
|
|
60
|
+
* Makes a post request to the pepper service
|
|
61
|
+
*
|
|
62
|
+
* @param options GetAptosRequestOptions
|
|
63
|
+
* @returns AptosResponse
|
|
64
|
+
*/
|
|
59
65
|
declare function postAptosPepperService<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
60
66
|
declare function postAptosProvingService<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
61
67
|
|
package/dist/esm/client/post.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f}from"../chunk-CVCM46UN.mjs";import"../chunk-YBXQVY7N.mjs";import"../chunk-GED6IT3S.mjs";import"../chunk-3RJZNUCQ.mjs";import"../chunk-RKHPXZM6.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-GRHLQDHF.mjs";import"../chunk-7BW2N4IE.mjs";import"../chunk-FGGRPEQ3.mjs";import"../chunk-IBN7ETCB.mjs";import"../chunk-Q6LFIZ3L.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-3IFR6T3V.mjs";import"../chunk-UMLUOYFK.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FLALKQIK.mjs";import"../chunk-GY6LFCB2.mjs";import"../chunk-YE5B2S5L.mjs";import"../chunk-FVA2OPG4.mjs";export{a as post,d as postAptosFaucet,b as postAptosFullNode,c as postAptosIndexer,e as postAptosPepperService,f as postAptosProvingService};
|
|
2
2
|
//# sourceMappingURL=post.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../chunk-4QMXOWHP.mjs";import{a as o,b as r,c as e}from"../../chunk-
|
|
1
|
+
import"../../chunk-4QMXOWHP.mjs";import{a as o,b as r,c as e}from"../../chunk-DPWEHSHH.mjs";import"../../chunk-F3ZVWLDH.mjs";import"../../chunk-Q6LFIZ3L.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-UMLUOYFK.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{o as createObjectAddress,r as createResourceAddress,e as createTokenAddress};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c}from"../../../chunk-
|
|
1
|
+
import{a,b,c}from"../../../chunk-DPWEHSHH.mjs";import"../../../chunk-F3ZVWLDH.mjs";import"../../../chunk-Q6LFIZ3L.mjs";import"../../../chunk-4WPQQPUF.mjs";import"../../../chunk-UMLUOYFK.mjs";import"../../../chunk-AOCNYMMX.mjs";import"../../../chunk-FBPNHF54.mjs";import"../../../chunk-56CNRT2K.mjs";import"../../../chunk-FVA2OPG4.mjs";export{a as createObjectAddress,b as createResourceAddress,c as createTokenAddress};
|
|
2
2
|
//# sourceMappingURL=address.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../../chunk-4QMXOWHP.mjs";import{a,b,c}from"../../../chunk-
|
|
1
|
+
import"../../../chunk-4QMXOWHP.mjs";import{a,b,c}from"../../../chunk-DPWEHSHH.mjs";import"../../../chunk-F3ZVWLDH.mjs";import"../../../chunk-Q6LFIZ3L.mjs";import"../../../chunk-4WPQQPUF.mjs";import"../../../chunk-UMLUOYFK.mjs";import"../../../chunk-AOCNYMMX.mjs";import"../../../chunk-FBPNHF54.mjs";import"../../../chunk-56CNRT2K.mjs";import"../../../chunk-FVA2OPG4.mjs";export{a as createObjectAddress,b as createResourceAddress,c as createTokenAddress};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../chunk-
|
|
1
|
+
import{a,b}from"../chunk-F3ZVWLDH.mjs";import"../chunk-Q6LFIZ3L.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-UMLUOYFK.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{b as AccountAddress,a as AddressInvalidReason};
|
|
2
2
|
//# sourceMappingURL=accountAddress.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-EFMAZTIM.mjs";import"../chunk-F3ZVWLDH.mjs";import"../chunk-Q6LFIZ3L.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-UMLUOYFK.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{a as AuthenticationKey};
|
|
2
2
|
//# sourceMappingURL=authenticationKey.mjs.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Serializable } from '../../bcs/serializer.mjs';
|
|
2
|
+
import '../hex.mjs';
|
|
3
|
+
import '../common.mjs';
|
|
4
|
+
import '../../types/index.mjs';
|
|
5
|
+
import '../../utils/apiEndpoints.mjs';
|
|
6
|
+
import '../../types/indexer.mjs';
|
|
7
|
+
import '../../types/generated/operations.mjs';
|
|
8
|
+
import '../../types/generated/types.mjs';
|
|
9
|
+
|
|
10
|
+
type AptsoDomainSeparator = `APTOS::${string}`;
|
|
11
|
+
declare abstract class CryptoHashable extends Serializable {
|
|
12
|
+
abstract readonly domainSeparator: AptsoDomainSeparator;
|
|
13
|
+
/**
|
|
14
|
+
* Hashes the bcs serialized from of the class. This is the typescript corollary to the BCSCryptoHash macro in aptos-core.
|
|
15
|
+
*
|
|
16
|
+
* @returns Uint8Array
|
|
17
|
+
*/
|
|
18
|
+
hash(): Uint8Array;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { type AptsoDomainSeparator, CryptoHashable };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"../../chunk-LYOUEPDG.mjs";import"../../chunk-KGHBTSDR.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-JKRWCFUQ.mjs";import"../../chunk-YDNOKWV3.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-YRUF6N3U.mjs";import"../../chunk-472OGHMG.mjs";import"../../chunk-FIG65OJD.mjs";import"../../chunk-MLX6DFMR.mjs";import"../../chunk-NW3WUTTD.mjs";import"../../chunk-TUCCV62K.mjs";import"../../chunk-GSCM444Z.mjs";import"../../chunk-IXFYYWAC.mjs";import"../../chunk-PHEA3NOJ.mjs";import"../../chunk-RYRID5HT.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-SNDFJWYM.mjs";import"../../chunk-E4XMEVB7.mjs";import"../../chunk-XGDLSWBF.mjs";import"../../chunk-BO44HPGU.mjs";import"../../chunk-T4HO5JMQ.mjs";import"../../chunk-37FFZSIM.mjs";import"../../chunk-L5CPAOUM.mjs";import"../../chunk-IVVWQKCF.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-XVZBWW46.mjs";import"../../chunk-WA2NTBYY.mjs";import"../../chunk-4VPCPASN.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-EFMAZTIM.mjs";import"../../chunk-F3ZVWLDH.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-GRHLQDHF.mjs";import"../../chunk-7BW2N4IE.mjs";import"../../chunk-FGGRPEQ3.mjs";import"../../chunk-IBN7ETCB.mjs";import"../../chunk-Q6LFIZ3L.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-3IFR6T3V.mjs";import"../../chunk-UMLUOYFK.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-YE5B2S5L.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as CryptoHashable};
|
|
2
|
+
//# sourceMappingURL=cryptoHasher.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c}from"../../chunk-
|
|
1
|
+
import{a,b,c}from"../../chunk-XVZBWW46.mjs";import"../../chunk-WA2NTBYY.mjs";import"../../chunk-4VPCPASN.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-EFMAZTIM.mjs";import"../../chunk-F3ZVWLDH.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-GRHLQDHF.mjs";import"../../chunk-7BW2N4IE.mjs";import"../../chunk-FGGRPEQ3.mjs";import"../../chunk-IBN7ETCB.mjs";import"../../chunk-Q6LFIZ3L.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-3IFR6T3V.mjs";import"../../chunk-UMLUOYFK.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{b as Ed25519PrivateKey,a as Ed25519PublicKey,c as Ed25519Signature};
|
|
2
2
|
//# sourceMappingURL=ed25519.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../chunk-
|
|
1
|
+
import{a,b}from"../../chunk-L5CPAOUM.mjs";import"../../chunk-XVZBWW46.mjs";import"../../chunk-WA2NTBYY.mjs";import"../../chunk-4VPCPASN.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-EFMAZTIM.mjs";import"../../chunk-F3ZVWLDH.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-GRHLQDHF.mjs";import"../../chunk-7BW2N4IE.mjs";import"../../chunk-FGGRPEQ3.mjs";import"../../chunk-IBN7ETCB.mjs";import"../../chunk-Q6LFIZ3L.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-3IFR6T3V.mjs";import"../../chunk-UMLUOYFK.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as EphemeralPublicKey,b as EphemeralSignature};
|
|
2
2
|
//# sourceMappingURL=ephemeral.mjs.map
|
|
@@ -3,7 +3,7 @@ export { APTOS_BIP44_REGEX, APTOS_HARDENED_REGEX, CKDPriv, DerivedKeys, HARDENED
|
|
|
3
3
|
export { MultiEd25519PublicKey, MultiEd25519Signature } from './multiEd25519.mjs';
|
|
4
4
|
export { MultiKey, MultiKeySignature } from './multiKey.mjs';
|
|
5
5
|
export { EphemeralPublicKey, EphemeralSignature } from './ephemeral.mjs';
|
|
6
|
-
export { EPK_HORIZON_SECS, EphemeralCertificate, Groth16Zkp, KeylessPublicKey, KeylessSignature, 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, ZeroKnowledgeSig, ZkProof } from './keyless.mjs';
|
|
6
|
+
export { EPK_HORIZON_SECS, EphemeralCertificate, Groth16Zkp, KeylessConfiguration, KeylessPublicKey, KeylessSignature, 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, ZeroKnowledgeSig, ZkProof } from './keyless.mjs';
|
|
7
7
|
export { PrivateKey } from './privateKey.mjs';
|
|
8
8
|
export { a as AccountPublicKey, P as PublicKey, V as VerifySignatureArgs } from '../../publicKey-lq5djCIY.mjs';
|
|
9
9
|
export { Secp256k1PrivateKey, Secp256k1PublicKey, Secp256k1Signature } from './secp256k1.mjs';
|
|
@@ -20,4 +20,5 @@ import '../../types/generated/operations.mjs';
|
|
|
20
20
|
import '../../types/generated/types.mjs';
|
|
21
21
|
import '../../bcs/serializer.mjs';
|
|
22
22
|
import './proof.mjs';
|
|
23
|
+
import '../../types/keyless.mjs';
|
|
23
24
|
import '../../transactions/instances/transactionArgument.mjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../chunk-AQ4I7VVB.mjs";import{a as q,b as r}from"../../chunk-
|
|
1
|
+
import"../../chunk-AQ4I7VVB.mjs";import{a as q,b as r}from"../../chunk-SNDFJWYM.mjs";import{a as O,b as P}from"../../chunk-E4XMEVB7.mjs";import{a as M,b as N}from"../../chunk-XGDLSWBF.mjs";import{a as s,b as t,c as u}from"../../chunk-BO44HPGU.mjs";import{a as x,b as y,c as z,d as A,e as B,f as C,g as D,h as E,i as F,j as G,k as H,l as I,m as J,n as K,o as L}from"../../chunk-T4HO5JMQ.mjs";import"../../chunk-37FFZSIM.mjs";import{a as v,b as w}from"../../chunk-L5CPAOUM.mjs";import"../../chunk-IVVWQKCF.mjs";import"../../chunk-KUX6GQ2E.mjs";import{a as n,b as o,c as p}from"../../chunk-XVZBWW46.mjs";import{a as k,b as l}from"../../chunk-WA2NTBYY.mjs";import{a as m}from"../../chunk-4VPCPASN.mjs";import"../../chunk-TJDC5PWD.mjs";import{a,b,c,d,e,f,g,h,i,j}from"../../chunk-LR65XHSF.mjs";import"../../chunk-EFMAZTIM.mjs";import"../../chunk-F3ZVWLDH.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-GRHLQDHF.mjs";import"../../chunk-7BW2N4IE.mjs";import"../../chunk-FGGRPEQ3.mjs";import"../../chunk-IBN7ETCB.mjs";import"../../chunk-Q6LFIZ3L.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-3IFR6T3V.mjs";import"../../chunk-UMLUOYFK.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{b as APTOS_BIP44_REGEX,a as APTOS_HARDENED_REGEX,l as AccountPublicKey,M as AnyPublicKey,N as AnySignature,h as CKDPriv,x as EPK_HORIZON_SECS,o as Ed25519PrivateKey,n as Ed25519PublicKey,p as Ed25519Signature,H as EphemeralCertificate,v as EphemeralPublicKey,w as EphemeralSignature,I as Groth16Zkp,d as HARDENED_OFFSET,c as KeyType,L as KeylessConfiguration,F as KeylessPublicKey,G as KeylessSignature,y as MAX_AUD_VAL_BYTES,E as MAX_COMMITED_EPK_BYTES,C as MAX_EXTRA_FIELD_BYTES,B as MAX_ISS_VAL_BYTES,D as MAX_JWT_HEADER_B64_BYTES,z as MAX_UID_KEY_BYTES,A as MAX_UID_VAL_BYTES,q as MultiEd25519PublicKey,r as MultiEd25519Signature,O as MultiKey,P as MultiKeySignature,k as PublicKey,t as Secp256k1PrivateKey,s as Secp256k1PublicKey,u as Secp256k1Signature,m as Signature,K as ZeroKnowledgeSig,J as ZkProof,g as deriveKey,e as isValidBIP44Path,f as isValidHardenedPath,j as mnemonicToSeed,i as splitPath};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -5,6 +5,7 @@ import { Serializer, Serializable } from '../../bcs/serializer.mjs';
|
|
|
5
5
|
import { HexInput, EphemeralCertificateVariant, ZkpVariant } from '../../types/index.mjs';
|
|
6
6
|
import { EphemeralPublicKey, EphemeralSignature } from './ephemeral.mjs';
|
|
7
7
|
import { Proof } from './proof.mjs';
|
|
8
|
+
import { Groth16VerificationKeyResponse } from '../../types/keyless.mjs';
|
|
8
9
|
import '../accountAddress.mjs';
|
|
9
10
|
import '../common.mjs';
|
|
10
11
|
import '../../transactions/instances/transactionArgument.mjs';
|
|
@@ -29,7 +30,15 @@ declare const MAX_COMMITED_EPK_BYTES = 93;
|
|
|
29
30
|
*/
|
|
30
31
|
declare class KeylessPublicKey extends AccountPublicKey {
|
|
31
32
|
static readonly ID_COMMITMENT_LENGTH: number;
|
|
33
|
+
/**
|
|
34
|
+
* The value of the 'iss' claim on the JWT which identifies the OIDC provider.
|
|
35
|
+
*/
|
|
32
36
|
readonly iss: string;
|
|
37
|
+
/**
|
|
38
|
+
* A value representing a cryptographic commitment to a user identity.
|
|
39
|
+
*
|
|
40
|
+
* It is calculated from the aud, uidKey, uidVal, pepper.
|
|
41
|
+
*/
|
|
33
42
|
readonly idCommitment: Uint8Array;
|
|
34
43
|
constructor(iss: string, idCommitment: HexInput);
|
|
35
44
|
/**
|
|
@@ -98,7 +107,7 @@ declare class KeylessSignature extends Signature {
|
|
|
98
107
|
/**
|
|
99
108
|
* The expiry timestamp in seconds of the EphemeralKeyPair used to sign
|
|
100
109
|
*/
|
|
101
|
-
readonly expiryDateSecs:
|
|
110
|
+
readonly expiryDateSecs: number;
|
|
102
111
|
/**
|
|
103
112
|
* The ephemeral public key used to verify the signature
|
|
104
113
|
*/
|
|
@@ -110,7 +119,7 @@ declare class KeylessSignature extends Signature {
|
|
|
110
119
|
constructor(args: {
|
|
111
120
|
jwtHeader: string;
|
|
112
121
|
ephemeralCertificate: EphemeralCertificate;
|
|
113
|
-
expiryDateSecs:
|
|
122
|
+
expiryDateSecs: number;
|
|
114
123
|
ephemeralPublicKey: EphemeralPublicKey;
|
|
115
124
|
ephemeralSignature: EphemeralSignature;
|
|
116
125
|
});
|
|
@@ -123,6 +132,7 @@ declare class KeylessSignature extends Signature {
|
|
|
123
132
|
serialize(serializer: Serializer): void;
|
|
124
133
|
static deserialize(deserializer: Deserializer): KeylessSignature;
|
|
125
134
|
static load(deserializer: Deserializer): KeylessSignature;
|
|
135
|
+
static getSimulationSignature(): KeylessSignature;
|
|
126
136
|
static isSignature(signature: Signature): signature is KeylessSignature;
|
|
127
137
|
}
|
|
128
138
|
/**
|
|
@@ -144,6 +154,18 @@ declare class EphemeralCertificate extends Signature {
|
|
|
144
154
|
serialize(serializer: Serializer): void;
|
|
145
155
|
static deserialize(deserializer: Deserializer): EphemeralCertificate;
|
|
146
156
|
}
|
|
157
|
+
declare class G1Bytes extends Serializable {
|
|
158
|
+
data: Uint8Array;
|
|
159
|
+
constructor(data: HexInput);
|
|
160
|
+
serialize(serializer: Serializer): void;
|
|
161
|
+
static deserialize(deserializer: Deserializer): G1Bytes;
|
|
162
|
+
}
|
|
163
|
+
declare class G2Bytes extends Serializable {
|
|
164
|
+
data: Uint8Array;
|
|
165
|
+
constructor(data: HexInput);
|
|
166
|
+
serialize(serializer: Serializer): void;
|
|
167
|
+
static deserialize(deserializer: Deserializer): G2Bytes;
|
|
168
|
+
}
|
|
147
169
|
/**
|
|
148
170
|
* A representation of a Groth16 proof. The points are the compressed serialization of affine reprentation of the proof.
|
|
149
171
|
*/
|
|
@@ -151,15 +173,15 @@ declare class Groth16Zkp extends Proof {
|
|
|
151
173
|
/**
|
|
152
174
|
* The bytes of G1 proof point a
|
|
153
175
|
*/
|
|
154
|
-
a:
|
|
176
|
+
a: G1Bytes;
|
|
155
177
|
/**
|
|
156
178
|
* The bytes of G2 proof point b
|
|
157
179
|
*/
|
|
158
|
-
b:
|
|
180
|
+
b: G2Bytes;
|
|
159
181
|
/**
|
|
160
182
|
* The bytes of G1 proof point c
|
|
161
183
|
*/
|
|
162
|
-
c:
|
|
184
|
+
c: G1Bytes;
|
|
163
185
|
constructor(args: {
|
|
164
186
|
a: HexInput;
|
|
165
187
|
b: HexInput;
|
|
@@ -194,11 +216,12 @@ declare class ZeroKnowledgeSig extends Signature {
|
|
|
194
216
|
*/
|
|
195
217
|
readonly expHorizonSecs: bigint;
|
|
196
218
|
/**
|
|
197
|
-
* A key value pair on the JWT token that can be
|
|
219
|
+
* A key value pair on the JWT token that can be specified on the signature which would reveal the value on chain.
|
|
220
|
+
* Can be used to assert identity or other attributes.
|
|
198
221
|
*/
|
|
199
222
|
readonly extraField?: string;
|
|
200
223
|
/**
|
|
201
|
-
*
|
|
224
|
+
* The 'aud' value of the recovery service which is set when recovering an account.
|
|
202
225
|
*/
|
|
203
226
|
readonly overrideAudVal?: string;
|
|
204
227
|
/**
|
|
@@ -228,5 +251,26 @@ declare class ZeroKnowledgeSig extends Signature {
|
|
|
228
251
|
static deserialize(deserializer: Deserializer): ZeroKnowledgeSig;
|
|
229
252
|
static load(deserializer: Deserializer): ZeroKnowledgeSig;
|
|
230
253
|
}
|
|
254
|
+
declare class KeylessConfiguration {
|
|
255
|
+
readonly verficationKey: Groth16VerificationKey;
|
|
256
|
+
readonly maxExpHorizonSecs: number;
|
|
257
|
+
constructor(verficationKey: Groth16VerificationKey, maxExpHorizonSecs: number);
|
|
258
|
+
static create(res: Groth16VerificationKeyResponse, maxExpHorizonSecs: number): KeylessConfiguration;
|
|
259
|
+
}
|
|
260
|
+
declare class Groth16VerificationKey {
|
|
261
|
+
readonly alphaG1: G1Bytes;
|
|
262
|
+
readonly betaG2: G2Bytes;
|
|
263
|
+
readonly deltaG2: G2Bytes;
|
|
264
|
+
readonly gammaAbcG1: G1Bytes[];
|
|
265
|
+
readonly gammaG2: G2Bytes;
|
|
266
|
+
constructor(args: {
|
|
267
|
+
alphaG1: HexInput;
|
|
268
|
+
betaG2: HexInput;
|
|
269
|
+
deltaG2: HexInput;
|
|
270
|
+
gammaAbcG1: [HexInput, HexInput];
|
|
271
|
+
gammaG2: HexInput;
|
|
272
|
+
});
|
|
273
|
+
static fromGroth16VerificationKeyResponse(res: Groth16VerificationKeyResponse): Groth16VerificationKey;
|
|
274
|
+
}
|
|
231
275
|
|
|
232
|
-
export { EPK_HORIZON_SECS, EphemeralCertificate, Groth16Zkp, KeylessPublicKey, KeylessSignature, 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, ZeroKnowledgeSig, ZkProof };
|
|
276
|
+
export { EPK_HORIZON_SECS, EphemeralCertificate, Groth16Zkp, KeylessConfiguration, KeylessPublicKey, KeylessSignature, 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, ZeroKnowledgeSig, ZkProof };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"../../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"../../chunk-T4HO5JMQ.mjs";import"../../chunk-37FFZSIM.mjs";import"../../chunk-L5CPAOUM.mjs";import"../../chunk-IVVWQKCF.mjs";import"../../chunk-XVZBWW46.mjs";import"../../chunk-WA2NTBYY.mjs";import"../../chunk-4VPCPASN.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-EFMAZTIM.mjs";import"../../chunk-F3ZVWLDH.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-GRHLQDHF.mjs";import"../../chunk-7BW2N4IE.mjs";import"../../chunk-FGGRPEQ3.mjs";import"../../chunk-IBN7ETCB.mjs";import"../../chunk-Q6LFIZ3L.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-3IFR6T3V.mjs";import"../../chunk-UMLUOYFK.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as EPK_HORIZON_SECS,k as EphemeralCertificate,l as Groth16Zkp,o as KeylessConfiguration,i as KeylessPublicKey,j as KeylessSignature,b as MAX_AUD_VAL_BYTES,h as MAX_COMMITED_EPK_BYTES,f as MAX_EXTRA_FIELD_BYTES,e as MAX_ISS_VAL_BYTES,g as MAX_JWT_HEADER_B64_BYTES,c as MAX_UID_KEY_BYTES,d as MAX_UID_VAL_BYTES,n as ZeroKnowledgeSig,m as ZkProof};
|
|
2
2
|
//# sourceMappingURL=keyless.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../chunk-
|
|
1
|
+
import{a,b}from"../../chunk-SNDFJWYM.mjs";import"../../chunk-XVZBWW46.mjs";import"../../chunk-WA2NTBYY.mjs";import"../../chunk-4VPCPASN.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-EFMAZTIM.mjs";import"../../chunk-F3ZVWLDH.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-GRHLQDHF.mjs";import"../../chunk-7BW2N4IE.mjs";import"../../chunk-FGGRPEQ3.mjs";import"../../chunk-IBN7ETCB.mjs";import"../../chunk-Q6LFIZ3L.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-3IFR6T3V.mjs";import"../../chunk-UMLUOYFK.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as MultiEd25519PublicKey,b as MultiEd25519Signature};
|
|
2
2
|
//# sourceMappingURL=multiEd25519.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../chunk-
|
|
1
|
+
import{a,b}from"../../chunk-E4XMEVB7.mjs";import"../../chunk-XGDLSWBF.mjs";import"../../chunk-BO44HPGU.mjs";import"../../chunk-T4HO5JMQ.mjs";import"../../chunk-37FFZSIM.mjs";import"../../chunk-L5CPAOUM.mjs";import"../../chunk-IVVWQKCF.mjs";import"../../chunk-XVZBWW46.mjs";import"../../chunk-WA2NTBYY.mjs";import"../../chunk-4VPCPASN.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-EFMAZTIM.mjs";import"../../chunk-F3ZVWLDH.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-GRHLQDHF.mjs";import"../../chunk-7BW2N4IE.mjs";import"../../chunk-FGGRPEQ3.mjs";import"../../chunk-IBN7ETCB.mjs";import"../../chunk-Q6LFIZ3L.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-3IFR6T3V.mjs";import"../../chunk-UMLUOYFK.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as MultiKey,b as MultiKeySignature};
|
|
2
2
|
//# sourceMappingURL=multiKey.mjs.map
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Hashes a string to a field element via poseidon
|
|
3
|
+
*
|
|
4
|
+
* @returns bigint result of the hash
|
|
5
|
+
*/
|
|
6
|
+
declare function hashStrToField(str: string, maxSizeBytes: number): bigint;
|
|
2
7
|
declare function padAndPackBytesWithLen(bytes: Uint8Array, maxSizeBytes: number): bigint[];
|
|
3
8
|
declare function bytesToBigIntLE(bytes: Uint8Array): bigint;
|
|
4
9
|
declare function bigIntToBytesLE(value: bigint, length: number): Uint8Array;
|
|
10
|
+
/**
|
|
11
|
+
* Hashes up to 16 scalar elements via the poseidon hashing algorithm.
|
|
12
|
+
*
|
|
13
|
+
* Each element must be scalar fields of the BN254 elliptic curve group.
|
|
14
|
+
*
|
|
15
|
+
* @returns bigint result of the hash
|
|
16
|
+
*/
|
|
5
17
|
declare function poseidonHash(inputs: (number | bigint | string)[]): bigint;
|
|
6
18
|
|
|
7
|
-
export { bigIntToBytesLE, bytesToBigIntLE,
|
|
19
|
+
export { bigIntToBytesLE, bytesToBigIntLE, hashStrToField, padAndPackBytesWithLen, poseidonHash };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e}from"../../chunk-
|
|
1
|
+
import{a,b,c,d,e}from"../../chunk-IVVWQKCF.mjs";import"../../chunk-FVA2OPG4.mjs";export{d as bigIntToBytesLE,c as bytesToBigIntLE,a as hashStrToField,b as padAndPackBytesWithLen,e as poseidonHash};
|
|
2
2
|
//# sourceMappingURL=poseidon.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-37FFZSIM.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-GRHLQDHF.mjs";import"../../chunk-7BW2N4IE.mjs";import"../../chunk-FGGRPEQ3.mjs";import"../../chunk-IBN7ETCB.mjs";import"../../chunk-Q6LFIZ3L.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-3IFR6T3V.mjs";import"../../chunk-UMLUOYFK.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Proof};
|
|
2
2
|
//# sourceMappingURL=proof.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../chunk-
|
|
1
|
+
import{a,b}from"../../chunk-WA2NTBYY.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-GRHLQDHF.mjs";import"../../chunk-7BW2N4IE.mjs";import"../../chunk-FGGRPEQ3.mjs";import"../../chunk-IBN7ETCB.mjs";import"../../chunk-Q6LFIZ3L.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-3IFR6T3V.mjs";import"../../chunk-UMLUOYFK.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{b as AccountPublicKey,a as PublicKey};
|
|
2
2
|
//# sourceMappingURL=publicKey.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c}from"../../chunk-
|
|
1
|
+
import{a,b,c}from"../../chunk-BO44HPGU.mjs";import"../../chunk-WA2NTBYY.mjs";import"../../chunk-4VPCPASN.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-GRHLQDHF.mjs";import"../../chunk-7BW2N4IE.mjs";import"../../chunk-FGGRPEQ3.mjs";import"../../chunk-IBN7ETCB.mjs";import"../../chunk-Q6LFIZ3L.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-3IFR6T3V.mjs";import"../../chunk-UMLUOYFK.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{b as Secp256k1PrivateKey,a as Secp256k1PublicKey,c as Secp256k1Signature};
|
|
2
2
|
//# sourceMappingURL=secp256k1.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-4VPCPASN.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-GRHLQDHF.mjs";import"../../chunk-7BW2N4IE.mjs";import"../../chunk-FGGRPEQ3.mjs";import"../../chunk-IBN7ETCB.mjs";import"../../chunk-Q6LFIZ3L.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-3IFR6T3V.mjs";import"../../chunk-UMLUOYFK.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Signature};
|
|
2
2
|
//# sourceMappingURL=signature.mjs.map
|