@aptos-labs/ts-sdk 1.16.0-zeta.1 → 1.16.0-zeta.3
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-OUd5ov6z.d.ts → accountAddress-YfW6h4Ja.d.ts} +1 -1
- 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 +77 -68
- package/dist/common/index.js +12 -12
- 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.mjs +1 -1
- package/dist/esm/account/KeylessAccount.d.mts +2 -15
- 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 +1 -2
- 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 +3 -4
- package/dist/esm/api/aptos.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 +3 -4
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/keyless.d.mts +6 -14
- 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.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.mjs +1 -1
- package/dist/esm/{chunk-CEGCSC3T.mjs → chunk-2BDKITTE.mjs} +2 -2
- package/dist/esm/{chunk-3J53BCEQ.mjs → chunk-2DESIV2P.mjs} +2 -2
- package/dist/esm/{chunk-WSVJNBSJ.mjs → chunk-2SJENNM4.mjs} +2 -2
- package/dist/esm/{chunk-RAHMGSBW.mjs → chunk-2Y7GVUQQ.mjs} +2 -2
- package/dist/esm/{chunk-SZ6KR73C.mjs → chunk-37FFZSIM.mjs} +2 -2
- package/dist/esm/{chunk-WXLSJF4A.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-ULW5LX5H.mjs → chunk-3TIXNBXM.mjs} +2 -2
- package/dist/esm/{chunk-3DP4R3FI.mjs → chunk-472OGHMG.mjs} +2 -2
- package/dist/esm/{chunk-PG7KSUMN.mjs → chunk-4AWM7GGV.mjs} +2 -2
- package/dist/esm/{chunk-J577ODDM.mjs → chunk-4VPCPASN.mjs} +2 -2
- package/dist/esm/{chunk-D76FE35G.mjs → chunk-572AE4D7.mjs} +2 -2
- package/dist/esm/{chunk-NUBYALZP.mjs → chunk-5SGAX4VT.mjs} +2 -2
- package/dist/esm/{chunk-J534ICWA.mjs → chunk-66G6MKI6.mjs} +2 -2
- package/dist/esm/{chunk-RKHPXZM6.mjs → chunk-6FBKUTGF.mjs} +2 -2
- package/dist/esm/{chunk-RKHPXZM6.mjs.map → chunk-6FBKUTGF.mjs.map} +1 -1
- package/dist/esm/{chunk-NH466YFP.mjs → chunk-6OQBDCDK.mjs} +2 -2
- package/dist/esm/{chunk-SCHMTP4N.mjs → chunk-7BW2N4IE.mjs} +2 -2
- package/dist/esm/chunk-7FUZE7F4.mjs +2 -0
- package/dist/esm/chunk-7FUZE7F4.mjs.map +1 -0
- package/dist/esm/chunk-7GU3E2FJ.mjs +2 -0
- package/dist/esm/chunk-7GU3E2FJ.mjs.map +1 -0
- package/dist/esm/{chunk-ISXBJPLD.mjs → chunk-7SOLAI6Q.mjs} +2 -2
- package/dist/esm/{chunk-EJURLI4L.mjs → chunk-AEWSL7BS.mjs} +2 -2
- package/dist/esm/{chunk-45ESRYGP.mjs → chunk-ARHEUGVT.mjs} +2 -2
- package/dist/esm/{chunk-6F3HFDL3.mjs → chunk-AXR47GFL.mjs} +2 -2
- package/dist/esm/{chunk-LLRWILVZ.mjs → chunk-B74ZAMWR.mjs} +2 -2
- package/dist/esm/{chunk-AVWAYKNS.mjs → chunk-BO44HPGU.mjs} +2 -2
- package/dist/esm/{chunk-HOX6Q6ZP.mjs → chunk-CCIY5VLR.mjs} +2 -2
- package/dist/esm/{chunk-R4HLV32L.mjs → chunk-CI64RKDE.mjs} +2 -2
- package/dist/esm/{chunk-PGP2XMDE.mjs → chunk-DPWEHSHH.mjs} +2 -2
- package/dist/esm/{chunk-QOOHLRRJ.mjs → chunk-E62NBNHE.mjs} +2 -2
- package/dist/esm/{chunk-NGTNMV6Q.mjs → chunk-EFMAZTIM.mjs} +2 -2
- package/dist/esm/{chunk-UFMIMN7W.mjs → chunk-EJA532W4.mjs} +2 -2
- package/dist/esm/{chunk-OOYRJQPD.mjs → chunk-EJQ2EYJ7.mjs} +2 -2
- package/dist/esm/{chunk-WJIICWOB.mjs → chunk-ERPUZQVK.mjs} +2 -2
- package/dist/esm/{chunk-WHSN42R2.mjs → chunk-F3ZVWLDH.mjs} +2 -2
- package/dist/esm/chunk-F7XWXQHU.mjs +2 -0
- package/dist/esm/{chunk-JBTLE33X.mjs.map → chunk-F7XWXQHU.mjs.map} +1 -1
- package/dist/esm/{chunk-GS5Z3HO7.mjs → chunk-FGGRPEQ3.mjs} +2 -2
- package/dist/esm/{chunk-EJ7ODMDA.mjs → chunk-FIG65OJD.mjs} +2 -2
- package/dist/esm/{chunk-MSGHGK52.mjs → chunk-GRHLQDHF.mjs} +2 -2
- package/dist/esm/{chunk-VMVSUH2K.mjs → chunk-GSCM444Z.mjs} +2 -2
- package/dist/esm/{chunk-QJIMZI32.mjs → chunk-GTXZNAYI.mjs} +2 -2
- package/dist/esm/{chunk-ZV5P2GSJ.mjs → chunk-IBN7ETCB.mjs} +2 -2
- package/dist/esm/{chunk-DSVNXD5A.mjs → chunk-IPI3VB62.mjs} +2 -2
- package/dist/esm/{chunk-ZAXWW7VW.mjs → chunk-IVVWQKCF.mjs} +1 -1
- package/dist/esm/chunk-IVVWQKCF.mjs.map +1 -0
- package/dist/esm/{chunk-XQ7I34AL.mjs → chunk-IXFYYWAC.mjs} +2 -2
- package/dist/esm/{chunk-HGRU3HWY.mjs → chunk-J63BIFB7.mjs} +2 -2
- package/dist/esm/{chunk-Y24BMR2W.mjs → chunk-JBX3JBIW.mjs} +2 -2
- package/dist/esm/{chunk-SSDWEOF7.mjs → chunk-JEE2OXOZ.mjs} +2 -2
- package/dist/esm/{chunk-6MDYCC7P.mjs → chunk-JV6JCXCH.mjs} +2 -2
- package/dist/esm/{chunk-OZ3GSAFK.mjs → chunk-KGHBTSDR.mjs} +2 -2
- package/dist/esm/{chunk-3SXTTG2X.mjs → chunk-L5CPAOUM.mjs} +2 -2
- package/dist/esm/chunk-LA67NWMV.mjs +2 -0
- package/dist/esm/chunk-LA67NWMV.mjs.map +1 -0
- package/dist/esm/chunk-LYOUEPDG.mjs +2 -0
- package/dist/esm/{chunk-5VLCYHNJ.mjs.map → chunk-LYOUEPDG.mjs.map} +1 -1
- package/dist/esm/{chunk-VBODXPT3.mjs → chunk-MLX6DFMR.mjs} +2 -2
- package/dist/esm/{chunk-SNBE5YAC.mjs → chunk-MMM5NTKW.mjs} +2 -2
- package/dist/esm/{chunk-OFC75EWS.mjs → chunk-MPTKOK27.mjs} +2 -2
- package/dist/esm/chunk-NTQLNAKS.mjs +2 -0
- package/dist/esm/chunk-NTQLNAKS.mjs.map +1 -0
- package/dist/esm/{chunk-4VAYXBD2.mjs → chunk-NW3WUTTD.mjs} +2 -2
- package/dist/esm/{chunk-AUV4VAXK.mjs → chunk-NZBZV7RP.mjs} +2 -2
- package/dist/esm/{chunk-QYEJOEWB.mjs → chunk-O3BRX56F.mjs} +2 -2
- package/dist/esm/chunk-OAX7LYUZ.mjs +2 -0
- package/dist/esm/chunk-OAX7LYUZ.mjs.map +1 -0
- package/dist/esm/{chunk-QLE5JL4X.mjs → chunk-OJ6AF4YT.mjs} +2 -2
- package/dist/esm/{chunk-5SGIYAB7.mjs → chunk-OR27VDOE.mjs} +2 -2
- package/dist/esm/{chunk-M4Q4XDVR.mjs → chunk-PAJXNH6J.mjs} +2 -2
- package/dist/esm/{chunk-JCDZ2WXX.mjs → chunk-QHB5A5YP.mjs} +1 -1
- package/dist/esm/chunk-QHB5A5YP.mjs.map +1 -0
- package/dist/esm/{chunk-THURV6CN.mjs → chunk-QMYYNCC2.mjs} +2 -2
- package/dist/esm/chunk-QNDR3S5U.mjs +2 -0
- package/dist/esm/chunk-QNDR3S5U.mjs.map +1 -0
- package/dist/esm/{chunk-RWYPGTNL.mjs → chunk-SNDFJWYM.mjs} +2 -2
- package/dist/esm/{chunk-3YIUOKWW.mjs → chunk-T5YEMU53.mjs} +2 -2
- package/dist/esm/{chunk-34WI7I3Z.mjs → chunk-TDDJZLWB.mjs} +2 -2
- package/dist/esm/{chunk-IMVC2JKU.mjs → chunk-TEGJAM44.mjs} +2 -2
- package/dist/esm/{chunk-IMVC2JKU.mjs.map → chunk-TEGJAM44.mjs.map} +1 -1
- package/dist/esm/{chunk-MLQT5I6K.mjs → chunk-TUCCV62K.mjs} +2 -2
- package/dist/esm/{chunk-YLQJBXUF.mjs → chunk-TV7RXL3V.mjs} +2 -2
- package/dist/esm/{chunk-7QGIAVW4.mjs → chunk-UBON2G6Y.mjs} +2 -2
- package/dist/esm/chunk-UKKHWC4Y.mjs +2 -0
- package/dist/esm/chunk-UKKHWC4Y.mjs.map +1 -0
- package/dist/esm/{chunk-272NA6H5.mjs → chunk-UMLUOYFK.mjs} +1 -1
- package/dist/esm/{chunk-272NA6H5.mjs.map → chunk-UMLUOYFK.mjs.map} +1 -1
- package/dist/esm/chunk-VRO3J43Z.mjs +2 -0
- package/dist/esm/chunk-VRO3J43Z.mjs.map +1 -0
- package/dist/esm/{chunk-AUAL3H36.mjs → chunk-WA2NTBYY.mjs} +2 -2
- package/dist/esm/{chunk-IWKIZLFW.mjs → chunk-WT5HOIK6.mjs} +2 -2
- package/dist/esm/{chunk-V6M7FGQT.mjs → chunk-X2VUS374.mjs} +2 -2
- package/dist/esm/{chunk-PENBUSGL.mjs → chunk-XH33BXEY.mjs} +2 -2
- package/dist/esm/{chunk-WOLLRMXR.mjs → chunk-XVZBWW46.mjs} +2 -2
- package/dist/esm/{chunk-IU6REVKX.mjs → chunk-YDNOKWV3.mjs} +2 -2
- package/dist/esm/{chunk-CZOUSIAD.mjs → chunk-YDSBZMZB.mjs} +2 -2
- package/dist/esm/{chunk-GHHIUWPP.mjs → chunk-YRUF6N3U.mjs} +2 -2
- package/dist/esm/{chunk-SCRIQQV3.mjs → chunk-Z6FMMNAL.mjs} +2 -2
- package/dist/esm/{chunk-TU6VKYDC.mjs → chunk-ZNPEUH4I.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.mjs +1 -1
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/client/types.d.mts +1 -5
- package/dist/esm/client/types.mjs +1 -1
- package/dist/esm/core/account/index.mjs +1 -1
- package/dist/esm/core/account/utils/address.mjs +1 -1
- package/dist/esm/core/account/utils/index.mjs +1 -1
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/crypto/cryptoHasher.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/ephemeral.mjs +1 -1
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/keyless.d.mts +34 -2
- 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.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.mjs +1 -1
- package/dist/esm/index.d.mts +1 -1
- 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.d.mts +2 -16
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/keyless.d.mts +3 -8
- 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.d.mts +16 -2
- 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.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/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/KeylessAccount.ts +11 -44
- package/src/api/general.ts +1 -2
- package/src/api/keyless.ts +2 -15
- package/src/bcs/deserializer.ts +4 -4
- package/src/bcs/serializer.ts +2 -2
- package/src/client/core.ts +1 -2
- package/src/client/types.ts +1 -1
- package/src/core/crypto/cryptoHasher.ts +1 -1
- package/src/core/crypto/keyless.ts +97 -64
- package/src/core/crypto/poseidon.ts +5 -3
- package/src/internal/general.ts +1 -38
- package/src/internal/keyless.ts +31 -12
- package/src/internal/transaction.ts +92 -0
- package/src/internal/transactionSubmission.ts +2 -2
- package/src/types/keyless.ts +22 -22
- package/src/utils/helpers.ts +6 -1
- package/src/version.ts +1 -1
- package/dist/esm/chunk-4RXGVY2H.mjs +0 -2
- package/dist/esm/chunk-4RXGVY2H.mjs.map +0 -1
- package/dist/esm/chunk-5VLCYHNJ.mjs +0 -2
- package/dist/esm/chunk-7CJAEAQZ.mjs +0 -2
- package/dist/esm/chunk-7CJAEAQZ.mjs.map +0 -1
- package/dist/esm/chunk-7Y6AWDBZ.mjs +0 -2
- package/dist/esm/chunk-7Y6AWDBZ.mjs.map +0 -1
- package/dist/esm/chunk-BNA3SGG6.mjs +0 -2
- package/dist/esm/chunk-BNA3SGG6.mjs.map +0 -1
- package/dist/esm/chunk-CIPPNT3W.mjs +0 -2
- package/dist/esm/chunk-CIPPNT3W.mjs.map +0 -1
- package/dist/esm/chunk-FUQDDIKQ.mjs +0 -2
- package/dist/esm/chunk-FUQDDIKQ.mjs.map +0 -1
- package/dist/esm/chunk-FWTJQHJR.mjs +0 -2
- package/dist/esm/chunk-FWTJQHJR.mjs.map +0 -1
- package/dist/esm/chunk-HQK6MF3G.mjs +0 -2
- package/dist/esm/chunk-JBTLE33X.mjs +0 -2
- package/dist/esm/chunk-JCDZ2WXX.mjs.map +0 -1
- package/dist/esm/chunk-MEOBWD6V.mjs +0 -2
- package/dist/esm/chunk-MEOBWD6V.mjs.map +0 -1
- package/dist/esm/chunk-WXLSJF4A.mjs.map +0 -1
- package/dist/esm/chunk-ZAXWW7VW.mjs.map +0 -1
- /package/dist/esm/{chunk-CEGCSC3T.mjs.map → chunk-2BDKITTE.mjs.map} +0 -0
- /package/dist/esm/{chunk-3J53BCEQ.mjs.map → chunk-2DESIV2P.mjs.map} +0 -0
- /package/dist/esm/{chunk-WSVJNBSJ.mjs.map → chunk-2SJENNM4.mjs.map} +0 -0
- /package/dist/esm/{chunk-RAHMGSBW.mjs.map → chunk-2Y7GVUQQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-SZ6KR73C.mjs.map → chunk-37FFZSIM.mjs.map} +0 -0
- /package/dist/esm/{chunk-HQK6MF3G.mjs.map → chunk-3RJZNUCQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-ULW5LX5H.mjs.map → chunk-3TIXNBXM.mjs.map} +0 -0
- /package/dist/esm/{chunk-3DP4R3FI.mjs.map → chunk-472OGHMG.mjs.map} +0 -0
- /package/dist/esm/{chunk-PG7KSUMN.mjs.map → chunk-4AWM7GGV.mjs.map} +0 -0
- /package/dist/esm/{chunk-J577ODDM.mjs.map → chunk-4VPCPASN.mjs.map} +0 -0
- /package/dist/esm/{chunk-D76FE35G.mjs.map → chunk-572AE4D7.mjs.map} +0 -0
- /package/dist/esm/{chunk-NUBYALZP.mjs.map → chunk-5SGAX4VT.mjs.map} +0 -0
- /package/dist/esm/{chunk-J534ICWA.mjs.map → chunk-66G6MKI6.mjs.map} +0 -0
- /package/dist/esm/{chunk-NH466YFP.mjs.map → chunk-6OQBDCDK.mjs.map} +0 -0
- /package/dist/esm/{chunk-SCHMTP4N.mjs.map → chunk-7BW2N4IE.mjs.map} +0 -0
- /package/dist/esm/{chunk-ISXBJPLD.mjs.map → chunk-7SOLAI6Q.mjs.map} +0 -0
- /package/dist/esm/{chunk-EJURLI4L.mjs.map → chunk-AEWSL7BS.mjs.map} +0 -0
- /package/dist/esm/{chunk-45ESRYGP.mjs.map → chunk-ARHEUGVT.mjs.map} +0 -0
- /package/dist/esm/{chunk-6F3HFDL3.mjs.map → chunk-AXR47GFL.mjs.map} +0 -0
- /package/dist/esm/{chunk-LLRWILVZ.mjs.map → chunk-B74ZAMWR.mjs.map} +0 -0
- /package/dist/esm/{chunk-AVWAYKNS.mjs.map → chunk-BO44HPGU.mjs.map} +0 -0
- /package/dist/esm/{chunk-HOX6Q6ZP.mjs.map → chunk-CCIY5VLR.mjs.map} +0 -0
- /package/dist/esm/{chunk-R4HLV32L.mjs.map → chunk-CI64RKDE.mjs.map} +0 -0
- /package/dist/esm/{chunk-PGP2XMDE.mjs.map → chunk-DPWEHSHH.mjs.map} +0 -0
- /package/dist/esm/{chunk-QOOHLRRJ.mjs.map → chunk-E62NBNHE.mjs.map} +0 -0
- /package/dist/esm/{chunk-NGTNMV6Q.mjs.map → chunk-EFMAZTIM.mjs.map} +0 -0
- /package/dist/esm/{chunk-UFMIMN7W.mjs.map → chunk-EJA532W4.mjs.map} +0 -0
- /package/dist/esm/{chunk-OOYRJQPD.mjs.map → chunk-EJQ2EYJ7.mjs.map} +0 -0
- /package/dist/esm/{chunk-WJIICWOB.mjs.map → chunk-ERPUZQVK.mjs.map} +0 -0
- /package/dist/esm/{chunk-WHSN42R2.mjs.map → chunk-F3ZVWLDH.mjs.map} +0 -0
- /package/dist/esm/{chunk-GS5Z3HO7.mjs.map → chunk-FGGRPEQ3.mjs.map} +0 -0
- /package/dist/esm/{chunk-EJ7ODMDA.mjs.map → chunk-FIG65OJD.mjs.map} +0 -0
- /package/dist/esm/{chunk-MSGHGK52.mjs.map → chunk-GRHLQDHF.mjs.map} +0 -0
- /package/dist/esm/{chunk-VMVSUH2K.mjs.map → chunk-GSCM444Z.mjs.map} +0 -0
- /package/dist/esm/{chunk-QJIMZI32.mjs.map → chunk-GTXZNAYI.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZV5P2GSJ.mjs.map → chunk-IBN7ETCB.mjs.map} +0 -0
- /package/dist/esm/{chunk-DSVNXD5A.mjs.map → chunk-IPI3VB62.mjs.map} +0 -0
- /package/dist/esm/{chunk-XQ7I34AL.mjs.map → chunk-IXFYYWAC.mjs.map} +0 -0
- /package/dist/esm/{chunk-HGRU3HWY.mjs.map → chunk-J63BIFB7.mjs.map} +0 -0
- /package/dist/esm/{chunk-Y24BMR2W.mjs.map → chunk-JBX3JBIW.mjs.map} +0 -0
- /package/dist/esm/{chunk-SSDWEOF7.mjs.map → chunk-JEE2OXOZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-6MDYCC7P.mjs.map → chunk-JV6JCXCH.mjs.map} +0 -0
- /package/dist/esm/{chunk-OZ3GSAFK.mjs.map → chunk-KGHBTSDR.mjs.map} +0 -0
- /package/dist/esm/{chunk-3SXTTG2X.mjs.map → chunk-L5CPAOUM.mjs.map} +0 -0
- /package/dist/esm/{chunk-VBODXPT3.mjs.map → chunk-MLX6DFMR.mjs.map} +0 -0
- /package/dist/esm/{chunk-SNBE5YAC.mjs.map → chunk-MMM5NTKW.mjs.map} +0 -0
- /package/dist/esm/{chunk-OFC75EWS.mjs.map → chunk-MPTKOK27.mjs.map} +0 -0
- /package/dist/esm/{chunk-4VAYXBD2.mjs.map → chunk-NW3WUTTD.mjs.map} +0 -0
- /package/dist/esm/{chunk-AUV4VAXK.mjs.map → chunk-NZBZV7RP.mjs.map} +0 -0
- /package/dist/esm/{chunk-QYEJOEWB.mjs.map → chunk-O3BRX56F.mjs.map} +0 -0
- /package/dist/esm/{chunk-QLE5JL4X.mjs.map → chunk-OJ6AF4YT.mjs.map} +0 -0
- /package/dist/esm/{chunk-5SGIYAB7.mjs.map → chunk-OR27VDOE.mjs.map} +0 -0
- /package/dist/esm/{chunk-M4Q4XDVR.mjs.map → chunk-PAJXNH6J.mjs.map} +0 -0
- /package/dist/esm/{chunk-THURV6CN.mjs.map → chunk-QMYYNCC2.mjs.map} +0 -0
- /package/dist/esm/{chunk-RWYPGTNL.mjs.map → chunk-SNDFJWYM.mjs.map} +0 -0
- /package/dist/esm/{chunk-3YIUOKWW.mjs.map → chunk-T5YEMU53.mjs.map} +0 -0
- /package/dist/esm/{chunk-34WI7I3Z.mjs.map → chunk-TDDJZLWB.mjs.map} +0 -0
- /package/dist/esm/{chunk-MLQT5I6K.mjs.map → chunk-TUCCV62K.mjs.map} +0 -0
- /package/dist/esm/{chunk-YLQJBXUF.mjs.map → chunk-TV7RXL3V.mjs.map} +0 -0
- /package/dist/esm/{chunk-7QGIAVW4.mjs.map → chunk-UBON2G6Y.mjs.map} +0 -0
- /package/dist/esm/{chunk-AUAL3H36.mjs.map → chunk-WA2NTBYY.mjs.map} +0 -0
- /package/dist/esm/{chunk-IWKIZLFW.mjs.map → chunk-WT5HOIK6.mjs.map} +0 -0
- /package/dist/esm/{chunk-V6M7FGQT.mjs.map → chunk-X2VUS374.mjs.map} +0 -0
- /package/dist/esm/{chunk-PENBUSGL.mjs.map → chunk-XH33BXEY.mjs.map} +0 -0
- /package/dist/esm/{chunk-WOLLRMXR.mjs.map → chunk-XVZBWW46.mjs.map} +0 -0
- /package/dist/esm/{chunk-IU6REVKX.mjs.map → chunk-YDNOKWV3.mjs.map} +0 -0
- /package/dist/esm/{chunk-CZOUSIAD.mjs.map → chunk-YDSBZMZB.mjs.map} +0 -0
- /package/dist/esm/{chunk-GHHIUWPP.mjs.map → chunk-YRUF6N3U.mjs.map} +0 -0
- /package/dist/esm/{chunk-SCRIQQV3.mjs.map → chunk-Z6FMMNAL.mjs.map} +0 -0
- /package/dist/esm/{chunk-TU6VKYDC.mjs.map → chunk-ZNPEUH4I.mjs.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-ERPUZQVK.mjs";import"../../chunk-OAX7LYUZ.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-2Y7GVUQQ.mjs";import"../../chunk-OR27VDOE.mjs";import"../../chunk-T5YEMU53.mjs";import"../../chunk-XH33BXEY.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-2DESIV2P.mjs";import"../../chunk-CI64RKDE.mjs";import"../../chunk-QNDR3S5U.mjs";import"../../chunk-LA67NWMV.mjs";import"../../chunk-S3EDNXZE.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-PAJXNH6J.mjs";import"../../chunk-2SJENNM4.mjs";import"../../chunk-TEGJAM44.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-3RJZNUCQ.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-SCHZ67F3.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-F7XWXQHU.mjs";import"../../chunk-4AWM7GGV.mjs";import"../../chunk-OJ6AF4YT.mjs";import"../../chunk-JEE2OXOZ.mjs";import"../../chunk-7FUZE7F4.mjs";import"../../chunk-LYOUEPDG.mjs";import"../../chunk-572AE4D7.mjs";import"../../chunk-QHB5A5YP.mjs";import"../../chunk-YDSBZMZB.mjs";import"../../chunk-KGHBTSDR.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-2BDKITTE.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-7SOLAI6Q.mjs";import"../../chunk-J63BIFB7.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-YE5B2S5L.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-SNDFJWYM.mjs";import"../../chunk-66G6MKI6.mjs";import"../../chunk-O3BRX56F.mjs";import"../../chunk-BO44HPGU.mjs";import"../../chunk-UKKHWC4Y.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-FVA2OPG4.mjs";export{a as Build};
|
|
2
2
|
//# sourceMappingURL=build.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-AXR47GFL.mjs";import"../../chunk-IHYTP2EW.mjs";import"../../chunk-JV6JCXCH.mjs";import"../../chunk-WT5HOIK6.mjs";import"../../chunk-U6Z4FNB7.mjs";import"../../chunk-OAX7LYUZ.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-2Y7GVUQQ.mjs";import"../../chunk-OR27VDOE.mjs";import"../../chunk-T5YEMU53.mjs";import"../../chunk-XH33BXEY.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-2DESIV2P.mjs";import"../../chunk-CI64RKDE.mjs";import"../../chunk-QNDR3S5U.mjs";import"../../chunk-LA67NWMV.mjs";import"../../chunk-S3EDNXZE.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-PAJXNH6J.mjs";import"../../chunk-2SJENNM4.mjs";import"../../chunk-TEGJAM44.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-3RJZNUCQ.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-SCHZ67F3.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-F7XWXQHU.mjs";import"../../chunk-4AWM7GGV.mjs";import"../../chunk-OJ6AF4YT.mjs";import"../../chunk-JEE2OXOZ.mjs";import"../../chunk-7FUZE7F4.mjs";import"../../chunk-LYOUEPDG.mjs";import"../../chunk-572AE4D7.mjs";import"../../chunk-QHB5A5YP.mjs";import"../../chunk-YDSBZMZB.mjs";import"../../chunk-KGHBTSDR.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-2BDKITTE.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-7SOLAI6Q.mjs";import"../../chunk-J63BIFB7.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-YE5B2S5L.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-SNDFJWYM.mjs";import"../../chunk-66G6MKI6.mjs";import"../../chunk-O3BRX56F.mjs";import"../../chunk-BO44HPGU.mjs";import"../../chunk-UKKHWC4Y.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-FVA2OPG4.mjs";export{a as TransactionManagement};
|
|
2
2
|
//# sourceMappingURL=management.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e as o}from"../../chunk-
|
|
1
|
+
import{e as o}from"../../chunk-OAX7LYUZ.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-2Y7GVUQQ.mjs";import"../../chunk-OR27VDOE.mjs";import"../../chunk-T5YEMU53.mjs";import"../../chunk-XH33BXEY.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-2DESIV2P.mjs";import"../../chunk-CI64RKDE.mjs";import"../../chunk-QNDR3S5U.mjs";import"../../chunk-LA67NWMV.mjs";import"../../chunk-S3EDNXZE.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-PAJXNH6J.mjs";import"../../chunk-2SJENNM4.mjs";import"../../chunk-TEGJAM44.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-3RJZNUCQ.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-SCHZ67F3.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-F7XWXQHU.mjs";import"../../chunk-4AWM7GGV.mjs";import"../../chunk-OJ6AF4YT.mjs";import"../../chunk-JEE2OXOZ.mjs";import"../../chunk-7FUZE7F4.mjs";import"../../chunk-LYOUEPDG.mjs";import"../../chunk-572AE4D7.mjs";import"../../chunk-QHB5A5YP.mjs";import"../../chunk-YDSBZMZB.mjs";import"../../chunk-KGHBTSDR.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-2BDKITTE.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-7SOLAI6Q.mjs";import"../../chunk-J63BIFB7.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-YE5B2S5L.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-SNDFJWYM.mjs";import"../../chunk-66G6MKI6.mjs";import"../../chunk-O3BRX56F.mjs";import"../../chunk-BO44HPGU.mjs";import"../../chunk-UKKHWC4Y.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-FVA2OPG4.mjs";var a=class{constructor(n){this.config=n}transaction(n){return o({...n})}transactionAsFeePayer(n){let{signer:r,transaction:t}=n;if(!t.feePayerAddress)throw new Error(`Transaction ${t} is not a Fee Payer transaction`);return t.feePayerAddress=r.accountAddress,o({signer:r,transaction:t})}};export{a as Sign};
|
|
2
2
|
//# sourceMappingURL=sign.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-GTXZNAYI.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-OAX7LYUZ.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-2Y7GVUQQ.mjs";import"../../chunk-OR27VDOE.mjs";import"../../chunk-T5YEMU53.mjs";import"../../chunk-XH33BXEY.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-2DESIV2P.mjs";import"../../chunk-CI64RKDE.mjs";import"../../chunk-QNDR3S5U.mjs";import"../../chunk-LA67NWMV.mjs";import"../../chunk-S3EDNXZE.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-PAJXNH6J.mjs";import"../../chunk-2SJENNM4.mjs";import"../../chunk-TEGJAM44.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-3RJZNUCQ.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-SCHZ67F3.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-F7XWXQHU.mjs";import"../../chunk-4AWM7GGV.mjs";import"../../chunk-OJ6AF4YT.mjs";import"../../chunk-JEE2OXOZ.mjs";import"../../chunk-7FUZE7F4.mjs";import"../../chunk-LYOUEPDG.mjs";import"../../chunk-572AE4D7.mjs";import"../../chunk-QHB5A5YP.mjs";import"../../chunk-YDSBZMZB.mjs";import"../../chunk-KGHBTSDR.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-2BDKITTE.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-7SOLAI6Q.mjs";import"../../chunk-J63BIFB7.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-YE5B2S5L.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-SNDFJWYM.mjs";import"../../chunk-66G6MKI6.mjs";import"../../chunk-O3BRX56F.mjs";import"../../chunk-BO44HPGU.mjs";import"../../chunk-UKKHWC4Y.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-FVA2OPG4.mjs";export{a as Simulate};
|
|
2
2
|
//# sourceMappingURL=simulate.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-EJA532W4.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-OAX7LYUZ.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-2Y7GVUQQ.mjs";import"../../chunk-OR27VDOE.mjs";import"../../chunk-T5YEMU53.mjs";import"../../chunk-XH33BXEY.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-2DESIV2P.mjs";import"../../chunk-CI64RKDE.mjs";import"../../chunk-QNDR3S5U.mjs";import"../../chunk-LA67NWMV.mjs";import"../../chunk-S3EDNXZE.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-PAJXNH6J.mjs";import"../../chunk-2SJENNM4.mjs";import"../../chunk-TEGJAM44.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-3RJZNUCQ.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-SCHZ67F3.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-F7XWXQHU.mjs";import"../../chunk-4AWM7GGV.mjs";import"../../chunk-OJ6AF4YT.mjs";import"../../chunk-JEE2OXOZ.mjs";import"../../chunk-7FUZE7F4.mjs";import"../../chunk-LYOUEPDG.mjs";import"../../chunk-572AE4D7.mjs";import"../../chunk-QHB5A5YP.mjs";import"../../chunk-YDSBZMZB.mjs";import"../../chunk-KGHBTSDR.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-2BDKITTE.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-7SOLAI6Q.mjs";import"../../chunk-J63BIFB7.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-YE5B2S5L.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-SNDFJWYM.mjs";import"../../chunk-66G6MKI6.mjs";import"../../chunk-O3BRX56F.mjs";import"../../chunk-BO44HPGU.mjs";import"../../chunk-UKKHWC4Y.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-FVA2OPG4.mjs";export{a as Submit};
|
|
2
2
|
//# sourceMappingURL=submit.mjs.map
|
package/dist/esm/api/utils.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-IPI3VB62.mjs";import"../chunk-QNDR3S5U.mjs";import"../chunk-LA67NWMV.mjs";import"../chunk-S3EDNXZE.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-PAJXNH6J.mjs";import"../chunk-2SJENNM4.mjs";import"../chunk-TEGJAM44.mjs";import"../chunk-GED6IT3S.mjs";import"../chunk-3RJZNUCQ.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-SCHZ67F3.mjs";import"../chunk-F7XWXQHU.mjs";import"../chunk-QHB5A5YP.mjs";import"../chunk-YE5B2S5L.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 waitForIndexerOnVersion};
|
|
2
2
|
//# sourceMappingURL=utils.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-3IFR6T3V.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{a as Deserializer};
|
|
2
2
|
//# sourceMappingURL=deserializer.mjs.map
|
package/dist/esm/bcs/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunk-FZY4PMEE.mjs";import{a as h}from"../chunk-
|
|
1
|
+
import"../chunk-FZY4PMEE.mjs";import{a as h}from"../chunk-GRHLQDHF.mjs";import{a as g}from"../chunk-7BW2N4IE.mjs";import{a as p,b as q,c as r}from"../chunk-FGGRPEQ3.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n,g as o}from"../chunk-IBN7ETCB.mjs";import"../chunk-Q6LFIZ3L.mjs";import"../chunk-4WPQQPUF.mjs";import{a}from"../chunk-3IFR6T3V.mjs";import{a as b,b as c,c as d,d as e,e as f}from"../chunk-UMLUOYFK.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{i as Bool,a as Deserializer,h as EntryFunctionBytes,g as FixedBytes,r as MoveOption,q as MoveString,p as MoveVector,b as Serializable,c as Serializer,n as U128,k as U16,o as U256,l as U32,m as U64,j as U8,d as ensureBoolean,e as outOfRangeErrorMessage,f as validateNumberInRange};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-GRHLQDHF.mjs";import"../../chunk-7BW2N4IE.mjs";import"../../chunk-UMLUOYFK.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as EntryFunctionBytes};
|
|
2
2
|
//# sourceMappingURL=entryFunctionBytes.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-7BW2N4IE.mjs";import"../../chunk-UMLUOYFK.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as FixedBytes};
|
|
2
2
|
//# sourceMappingURL=fixedBytes.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g}from"../../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g}from"../../chunk-IBN7ETCB.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 Bool,f as U128,c as U16,g as U256,d as U32,e as U64,b as U8};
|
|
2
2
|
//# sourceMappingURL=movePrimitives.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c}from"../../chunk-
|
|
1
|
+
import{a,b,c}from"../../chunk-FGGRPEQ3.mjs";import"../../chunk-IBN7ETCB.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{c as MoveOption,b as MoveString,a as MoveVector};
|
|
2
2
|
//# sourceMappingURL=moveStructs.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e}from"../chunk-UMLUOYFK.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{a as Serializable,b as Serializer,c as ensureBoolean,d as outOfRangeErrorMessage,e as validateNumberInRange};
|
|
2
2
|
//# sourceMappingURL=serializer.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-472OGHMG.mjs";import{a as e}from"./chunk-7SOLAI6Q.mjs";import{a as r}from"./chunk-UMLUOYFK.mjs";var n=class o extends r{constructor(t,a){super();this.raw_txn=t,this.authenticator=a}serialize(t){this.raw_txn.serialize(t),this.authenticator.serialize(t)}static deserialize(t){let a=i.deserialize(t),s=e.deserialize(t);return new o(a,s)}};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2BDKITTE.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as P}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as P}from"./chunk-CI64RKDE.mjs";import{c as d}from"./chunk-LA67NWMV.mjs";import{d as C,e as w,f as h,g as k,h as T,j as b,k as O,l as q}from"./chunk-S3EDNXZE.mjs";import{a as v}from"./chunk-AH44UPM4.mjs";import{b as p,d as f}from"./chunk-PAJXNH6J.mjs";import{a as _}from"./chunk-6FBKUTGF.mjs";import{a as A}from"./chunk-4AWM7GGV.mjs";import{a as m}from"./chunk-O3BRX56F.mjs";import{b as y}from"./chunk-BO44HPGU.mjs";import{b as l}from"./chunk-XVZBWW46.mjs";import{a as g}from"./chunk-EFMAZTIM.mjs";import{b as c}from"./chunk-F3ZVWLDH.mjs";async function S(t){let{aptosConfig:n,accountAddress:e}=t,{data:o}=await p({aptosConfig:n,originMethod:"getInfo",path:`accounts/${c.from(e).toString()}`});return o}async function H(t){let{aptosConfig:n,accountAddress:e,options:o}=t;return f({aptosConfig:n,originMethod:"getModules",path:`accounts/${c.from(e).toString()}/modules`,params:{ledger_version:o?.ledgerVersion,start:o?.offset,limit:o?.limit??1e3}})}async function J(t){return t.options?.ledgerVersion!==void 0?G(t):v(async()=>G(t),`module-${t.accountAddress}-${t.moduleName}`,1e3*60*5)()}async function G(t){let{aptosConfig:n,accountAddress:e,moduleName:o,options:s}=t,{data:r}=await p({aptosConfig:n,originMethod:"getModule",path:`accounts/${c.from(e).toString()}/module/${o}`,params:{ledger_version:s?.ledgerVersion}});return r}async function U(t){let{aptosConfig:n,accountAddress:e,options:o}=t;return f({aptosConfig:n,originMethod:"getTransactions",path:`accounts/${c.from(e).toString()}/transactions`,params:{start:o?.offset,limit:o?.limit}})}async function X(t){let{aptosConfig:n,accountAddress:e,options:o}=t;return f({aptosConfig:n,originMethod:"getResources",path:`accounts/${c.from(e).toString()}/resources`,params:{ledger_version:o?.ledgerVersion,start:o?.offset,limit:o?.limit??999}})}async function K(t){let{aptosConfig:n,accountAddress:e,resourceType:o,options:s}=t,{data:r}=await p({aptosConfig:n,originMethod:"getResource",path:`accounts/${c.from(e).toString()}/resource/${o}`,params:{ledger_version:s?.ledgerVersion}});return r.data}async function Q(t){let{aptosConfig:n,authenticationKey:e,options:o}=t,s=await K({aptosConfig:n,accountAddress:"0x1",resourceType:"0x1::account::OriginatingAddress",options:o}),{address_map:{handle:r}}=s,a=c.from(e);try{let i=await P({aptosConfig:n,handle:r,data:{key:a.toString(),key_type:"address",value_type:"address"},options:o});return c.from(i)}catch(i){if(i instanceof _&&i.data.error_code==="table_item_not_found")return a;throw i}}async function Y(t){let{aptosConfig:n,accountAddress:e}=t,s={owner_address:{_eq:c.from(e).toStringLong()},amount:{_gt:0}},a=await d({aptosConfig:n,query:{query:O,variables:{where_condition:s}},originMethod:"getAccountTokensCount"});return a.current_token_ownerships_v2_aggregate.aggregate?a.current_token_ownerships_v2_aggregate.aggregate.count:0}async function Z(t){let{aptosConfig:n,accountAddress:e,options:o}=t,r={owner_address:{_eq:c.from(e).toStringLong()},amount:{_gt:0}};o?.tokenStandard&&(r.token_standard={_eq:o?.tokenStandard});let a={query:T,variables:{where_condition:r,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountOwnedTokens"})).current_token_ownerships_v2}async function oo(t){let{aptosConfig:n,accountAddress:e,collectionAddress:o,options:s}=t,r=c.from(e).toStringLong(),a=c.from(o).toStringLong(),i={owner_address:{_eq:r},current_token_data:{collection_id:{_eq:a}},amount:{_gt:0}};s?.tokenStandard&&(i.token_standard={_eq:s?.tokenStandard});let u={query:b,variables:{where_condition:i,offset:s?.offset,limit:s?.limit,order_by:s?.orderBy}};return(await d({aptosConfig:n,query:u,originMethod:"getAccountOwnedTokensFromCollectionAddress"})).current_token_ownerships_v2}async function to(t){let{aptosConfig:n,accountAddress:e,options:o}=t,r={owner_address:{_eq:c.from(e).toStringLong()},amount:{_gt:0}};o?.tokenStandard&&(r.current_collection={token_standard:{_eq:o?.tokenStandard}});let a={query:h,variables:{where_condition:r,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountCollectionsWithOwnedTokens"})).current_collection_ownership_v2_view}async function eo(t){let{aptosConfig:n,accountAddress:e}=t,o=c.from(e).toStringLong(),r=await d({aptosConfig:n,query:{query:q,variables:{address:o}},originMethod:"getAccountTransactionsCount"});return r.account_transactions_aggregate.aggregate?r.account_transactions_aggregate.aggregate.count:0}async function no(t){let{aptosConfig:n,accountAddress:e,coinType:o}=t,s=c.from(e).toStringLong(),r=await I({aptosConfig:n,accountAddress:s,options:{where:{asset_type:{_eq:o}}}});return r[0]?r[0].amount:0}async function I(t){let{aptosConfig:n,accountAddress:e,options:o}=t,s=c.from(e).toStringLong(),r={...o?.where,owner_address:{_eq:s}},a={query:w,variables:{where_condition:r,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountCoinsData"})).current_fungible_asset_balances}async function ro(t){let{aptosConfig:n,accountAddress:e}=t,o=c.from(e).toStringLong(),r=await d({aptosConfig:n,query:{query:C,variables:{address:o}},originMethod:"getAccountCoinsCount"});if(!r.current_fungible_asset_balances_aggregate.aggregate)throw Error("Failed to get the count of account coins");return r.current_fungible_asset_balances_aggregate.aggregate.count}async function so(t){let{aptosConfig:n,accountAddress:e,options:o}=t,r={owner_address:{_eq:c.from(e).toStringLong()}},a={query:k,variables:{where_condition:r,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountOwnedObjects"})).current_objects}async function co(t){let{aptosConfig:n,privateKey:e}=t,o=new m(e.publicKey());if(e instanceof y){let r=g.fromPublicKey({publicKey:o}).derivedAddress();return A.fromPrivateKey({privateKey:e,address:r})}if(e instanceof l){let s=g.fromPublicKey({publicKey:o});if(await M({authKey:s,aptosConfig:n})){let u=s.derivedAddress();return A.fromPrivateKey({privateKey:e,address:u,legacy:!1})}let a=g.fromPublicKey({publicKey:o.publicKey});if(await M({authKey:a,aptosConfig:n})){let u=a.derivedAddress();return A.fromPrivateKey({privateKey:e,address:u,legacy:!0})}}throw new Error(`Can't derive account from private key ${e}`)}async function M(t){let{aptosConfig:n,authKey:e}=t,o=await Q({aptosConfig:n,authenticationKey:e.derivedAddress()});try{return await S({aptosConfig:n,accountAddress:o}),!0}catch(s){if(s.status===404)return!1;throw new Error(`Error while looking for an account info ${o.toString()}`)}}export{S as a,H as b,J as c,U as d,X as e,K as f,Q as g,Y as h,Z as i,oo as j,to as k,eo as l,no as m,I as n,ro as o,so as p,co as q,M as r};
|
|
2
|
+
//# sourceMappingURL=chunk-2DESIV2P.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as p}from"./chunk-TEGJAM44.mjs";async function o(e){let{type:t,originMethod:s,path:i,body:r,acceptType:R,contentType:f,params:c,aptosConfig:n,overrides:A}=e,d=n.getRequestUrl(t);return p({url:d,method:"POST",originMethod:s,path:i,body:r,contentType:f,acceptType:R,params:c,overrides:A},n,e.type)}async function q(e){let{aptosConfig:t}=e;return o({...e,type:"Fullnode",overrides:{...t.clientConfig,...t.fullnodeConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.fullnodeConfig?.HEADERS}}})}async function C(e){let{aptosConfig:t}=e;return o({...e,type:"Indexer",overrides:{...t.clientConfig,...t.indexerConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.indexerConfig?.HEADERS}}})}async function m(e){let{aptosConfig:t}=e,s={...t,clientConfig:{...t.clientConfig}};return delete s?.clientConfig?.API_KEY,o({...e,type:"Faucet",overrides:{...s.clientConfig,...s.faucetConfig,...e.overrides,HEADERS:{...s.clientConfig?.HEADERS,...s.faucetConfig?.HEADERS}}})}async function E(e){return o({...e,type:"Pepper"})}async function a(e){return o({...e,type:"Prover"})}export{o as a,q as b,C as c,m as d,E as e,a as f};
|
|
2
|
+
//# sourceMappingURL=chunk-2SJENNM4.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as T,c as en,d as an,e as N}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as T,c as en,d as an,e as N}from"./chunk-OR27VDOE.mjs";import{q as tn,t as y}from"./chunk-T5YEMU53.mjs";import{a as Y}from"./chunk-2DESIV2P.mjs";import{b as nn}from"./chunk-QNDR3S5U.mjs";import{a as J}from"./chunk-LA67NWMV.mjs";import{a as Q}from"./chunk-AH44UPM4.mjs";import{a as j}from"./chunk-3RJZNUCQ.mjs";import{g as M}from"./chunk-SCHZ67F3.mjs";import{a as f}from"./chunk-2BDKITTE.mjs";import{a as L}from"./chunk-YDNOKWV3.mjs";import{a as Z}from"./chunk-YRUF6N3U.mjs";import{a as X,c as z,d as K}from"./chunk-472OGHMG.mjs";import{c as k,d as O,e as V,f as E,g as q,h as v,i as H}from"./chunk-FIG65OJD.mjs";import{a as _}from"./chunk-NW3WUTTD.mjs";import{b as F,d as D,e as R,f as $}from"./chunk-7SOLAI6Q.mjs";import{a as W,b as w,d as m}from"./chunk-J63BIFB7.mjs";import{b as G,c as C}from"./chunk-YE5B2S5L.mjs";import{a as B,b as l}from"./chunk-O3BRX56F.mjs";import{a as b,c as U}from"./chunk-BO44HPGU.mjs";import{i as x}from"./chunk-UKKHWC4Y.mjs";import{a as S,c as p}from"./chunk-XVZBWW46.mjs";import{b as u}from"./chunk-F3ZVWLDH.mjs";import{b as P}from"./chunk-AOCNYMMX.mjs";import{sha3_256 as dn}from"@noble/hashes/sha3";async function On(n){if(tn(n))return fn(n);let{moduleAddress:t,moduleName:e,functionName:i}=y(n.function),a=await on({key:"entry-function",moduleAddress:t,moduleName:e,functionName:i,aptosConfig:n.aptosConfig,abi:n.abi,fetch:en});return An({...n,abi:a})}function An(n){let t=n.abi,{moduleAddress:e,moduleName:i,functionName:a}=y(n.function),r=T(n.typeArguments);if(r.length!==t.typeParameters.length)throw new Error(`Type argument count mismatch, expected ${t.typeParameters.length}, received ${r.length}`);let o=n.functionArguments.map((s,d)=>N(n.function,t,s,d,r));if(o.length!==t.parameters.length)throw new Error(`Too few arguments for '${e}::${i}::${a}', expected ${t.parameters.length} but got ${o.length}`);let c=E.build(`${e}::${i}`,a,r,o);if("multisigAddress"in n){let s=u.from(n.multisigAddress);return new V(new v(s,new H(c)))}return new O(c)}async function Vn(n){let{moduleAddress:t,moduleName:e,functionName:i}=y(n.function),a=await on({key:"view-function",moduleAddress:t,moduleName:e,functionName:i,aptosConfig:n.aptosConfig,abi:n.abi,fetch:an});return mn({abi:a,...n})}function mn(n){let t=n.abi,{moduleAddress:e,moduleName:i,functionName:a}=y(n.function),r=T(n.typeArguments);if(r.length!==t.typeParameters.length)throw new Error(`Type argument count mismatch, expected ${t.typeParameters.length}, received ${r.length}`);let o=n?.functionArguments?.map((c,s)=>N(n.function,t,c,s,r))??[];if(o.length!==t.parameters.length)throw new Error(`Too few arguments for '${e}::${i}::${a}', expected ${t.parameters.length} but got ${o.length}`);return E.build(`${e}::${i}`,a,r,o)}function fn(n){return new k(new q(P.fromHexInput(n.bytecode).toUint8Array(),T(n.typeArguments),n.functionArguments))}async function yn(n){let{aptosConfig:t,sender:e,payload:i,options:a,feePayerAddress:r}=n,o=async()=>M[t.network]?{chainId:M[t.network]}:{chainId:(await J({aptosConfig:t})).chain_id},c=async()=>a?.gasUnitPrice?{gasEstimate:a.gasUnitPrice}:{gasEstimate:(await nn({aptosConfig:t})).gas_estimate},s=async()=>{let g=async()=>a?.accountSequenceNumber!==void 0?a.accountSequenceNumber:(await Y({aptosConfig:t,accountAddress:e})).sequence_number;if(r&&u.from(r).equals(u.ZERO))try{return await g()}catch{return 0}else return g()},[{chainId:d},{gasEstimate:A},I]=await Promise.all([o(),c(),s()]),{maxGasAmount:sn,gasUnitPrice:cn,expireTimestamp:un}={maxGasAmount:a?.maxGasAmount?BigInt(a.maxGasAmount):BigInt(2e5),gasUnitPrice:a?.gasUnitPrice??BigInt(A),expireTimestamp:a?.expireTimestamp??BigInt(Math.floor(Date.now()/1e3)+20)};return new X(u.from(e),BigInt(I),i,BigInt(sn),BigInt(cn),BigInt(un),new _(d))}async function qn(n){let{aptosConfig:t,sender:e,payload:i,options:a,feePayerAddress:r}=n,o=await yn({aptosConfig:t,sender:e,payload:i,options:a,feePayerAddress:r});if("secondarySignerAddresses"in n){let c=n.secondarySignerAddresses?.map(s=>u.from(s))??[];return new Z(o,c,n.feePayerAddress?u.from(n.feePayerAddress):void 0)}return new L(o,n.feePayerAddress?u.from(n.feePayerAddress):void 0)}function vn(n){let{signerPublicKey:t,transaction:e,secondarySignersPublicKeys:i,feePayerPublicKey:a}=n,r=h(t);if(e.feePayerAddress){let c=new K(e.rawTransaction,e.secondarySignerAddresses??[],e.feePayerAddress),s=[];i&&(s=i.map(I=>h(I)));let d=h(a),A=new R(r,e.secondarySignerAddresses??[],s,{address:e.feePayerAddress,authenticator:d});return new f(c.raw_txn,A).bcsToBytes()}if(e.secondarySignerAddresses){let c=new z(e.rawTransaction,e.secondarySignerAddresses),s=[];s=i.map(A=>h(A));let d=new D(r,e.secondarySignerAddresses,s);return new f(c.raw_txn,d).bcsToBytes()}let o;if(r instanceof w)o=new F(r.public_key,r.signature);else if(r instanceof m)o=new $(r);else throw new Error("Invalid public key");return new f(e.rawTransaction,o).bcsToBytes()}function h(n){if((n instanceof x||n instanceof b)&&(n=new B(n)),n instanceof B){if(n.publicKey instanceof S)return new m(n,new l(new p(new Uint8Array(64))));if(n.publicKey instanceof b)return new m(n,new l(new U(new Uint8Array(64))));if(n.publicKey instanceof x)return new m(n,new l(new p(new Uint8Array(64))))}return new w(new S(n.toUint8Array()),new p(new Uint8Array(64)))}function gn(n){let{transaction:t,feePayerAuthenticator:e,additionalSignersAuthenticators:i}=n,a=j(W,n.senderAuthenticator),r;if(t.feePayerAddress){if(!e)throw new Error("Must provide a feePayerAuthenticator argument to generate a signed fee payer transaction");r=new R(a,t.secondarySignerAddresses??[],i??[],{address:t.feePayerAddress,authenticator:e})}else if(t.secondarySignerAddresses){if(!i)throw new Error("Must provide a additionalSignersAuthenticators argument to generate a signed multi agent transaction");r=new D(a,t.secondarySignerAddresses,i)}else a instanceof w?r=new F(a.public_key,a.signature):r=new $(a);return new f(t.rawTransaction,r).bcsToBytes()}function rn(n){let t=dn.create();for(let e of n)t.update(e);return t.digest()}var pn=rn(["APTOS::Transaction"]);function Hn(n){let t=gn(n);return new P(rn([pn,new Uint8Array([0]),t])).toString()}async function on({key:n,moduleAddress:t,moduleName:e,functionName:i,aptosConfig:a,abi:r,fetch:o}){return r!==void 0?r:Q(async()=>o(t,e,i,a),`${n}-${a.network}-${t}-${e}-${i}`,1e3*60*5)()}export{On as a,An as b,Vn as c,mn as d,yn as e,qn as f,vn as g,h,gn as i,rn as j,Hn as k};
|
|
2
|
+
//# sourceMappingURL=chunk-2Y7GVUQQ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-UMLUOYFK.mjs";import{b as t}from"./chunk-AOCNYMMX.mjs";var e=class extends r{toString(){let s=this.bcsToBytes();return t.fromHexInput(s).toString()}};export{e as a};
|
|
2
|
+
//# sourceMappingURL=chunk-37FFZSIM.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{c as r}from"./chunk-56CNRT2K.mjs";var n=class{constructor(e){this.buffer=new ArrayBuffer(e.length),new Uint8Array(this.buffer).set(e,0),this.offset=0}read(e){if(this.offset+e>this.buffer.byteLength)throw new Error("Reached to the end of buffer");let i=this.buffer.slice(this.offset,this.offset+e);return this.offset+=e,i}deserializeStr(){let e=this.deserializeBytes();return new TextDecoder().decode(e)}deserializeOptionStr(){if(this.deserializeUleb128AsU32()===1)return this.deserializeStr()}deserializeOption(e){if(this.deserializeUleb128AsU32()===1)return this.deserialize(e)}deserializeBytes(){let e=this.deserializeUleb128AsU32();return new Uint8Array(this.read(e))}deserializeFixedBytes(e){return new Uint8Array(this.read(e))}deserializeBool(){let e=new Uint8Array(this.read(1))[0];if(e!==1&&e!==0)throw new Error("Invalid boolean value");return e===1}deserializeU8(){return new DataView(this.read(1)).getUint8(0)}deserializeU16(){return new DataView(this.read(2)).getUint16(0,!0)}deserializeU32(){return new DataView(this.read(4)).getUint32(0,!0)}deserializeU64(){let e=this.deserializeU32(),i=this.deserializeU32();return BigInt(BigInt(i)<<BigInt(32)|BigInt(e))}deserializeU128(){let e=this.deserializeU64(),i=this.deserializeU64();return BigInt(i<<BigInt(64)|e)}deserializeU256(){let e=this.deserializeU128(),i=this.deserializeU128();return BigInt(i<<BigInt(128)|e)}deserializeUleb128AsU32(){let e=BigInt(0),i=0;for(;e<r;){let t=this.deserializeU8();if(e|=BigInt(t&127)<<BigInt(i),!(t&128))break;i+=7}if(e>r)throw new Error("Overflow while parsing uleb128-encoded uint32 value");return Number(e)}deserialize(e){return e.deserialize(this)}deserializeVector(e){let i=this.deserializeUleb128AsU32(),t=new Array;for(let s=0;s<i;s+=1)t.push(this.deserialize(e));return t}};export{n as a};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
//# sourceMappingURL=chunk-3IFR6T3V.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/bcs/deserializer.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/* eslint-disable no-bitwise */\nimport { MAX_U32_NUMBER } from \"./consts\";\nimport { Uint8, Uint16, Uint32, Uint64, Uint128, Uint256 } from \"../types\";\n\n/**\n * This interface exists to define Deserializable<T> inputs for functions that\n * deserialize a byte buffer into a type T.\n * It is not intended to be implemented or extended, because Typescript has no support\n * for static methods in interfaces.\n */\nexport interface Deserializable<T> {\n deserialize(deserializer: Deserializer): T;\n}\n\nexport class Deserializer {\n private buffer: ArrayBuffer;\n\n private offset: number;\n\n constructor(data: Uint8Array) {\n // copies data to prevent outside mutation of buffer.\n this.buffer = new ArrayBuffer(data.length);\n new Uint8Array(this.buffer).set(data, 0);\n this.offset = 0;\n }\n\n private read(length: number): ArrayBuffer {\n if (this.offset + length > this.buffer.byteLength) {\n throw new Error(\"Reached to the end of buffer\");\n }\n\n const bytes = this.buffer.slice(this.offset, this.offset + length);\n this.offset += length;\n return bytes;\n }\n\n /**\n * Deserializes a string. UTF8 string is supported. Reads the string's bytes length \"l\" first,\n * and then reads \"l\" bytes of content. Decodes the byte array into a string.\n *\n * BCS layout for \"string\": string_length | string_content\n * where string_length is a u32 integer encoded as a uleb128 integer, equal to the number of bytes in string_content.\n *\n * @example\n * ```ts\n * const deserializer = new Deserializer(new Uint8Array([8, 49, 50, 51, 52, 97, 98, 99, 100]));\n * assert(deserializer.deserializeStr() === \"1234abcd\");\n * ```\n */\n deserializeStr(): string {\n const value = this.deserializeBytes();\n const textDecoder = new TextDecoder();\n return textDecoder.decode(value);\n }\n\n /**\n * Deserializes a an optional string.\n *\n * BCS layout for Optional<String>: 0 if none, else 1 | string_length | string_content\n * @example\n * ```ts\n * const deserializer = new Deserializer(new Uint8Array([0x00]));\n * assert(deserializer.deserializeOptionStr() === undefined);\n * const deserializer = new Deserializer(new Uint8Array([1, 8, 49, 50, 51, 52, 97, 98, 99, 100]));\n * assert(deserializer.deserializeOptionStr() === \"1234abcd\");\n * ```\n */\n deserializeOptionStr(): string | undefined {\n const exists = this.deserializeUleb128AsU32();\n if (exists === 1) {\n return this.deserializeStr();\n }\n return undefined;\n }\n\n /**\n * Deserializes a an optional deserializable class.\n *\n * BCS layout for Optional<T>: 0 if none, else 1 | bcs representation of class\n *\n * @example\n * const deserializer = new Deserializer(new Uint8Array([1, 2, 3]));\n * const value = deserializer.deserializeOption(MyClass); // where MyClass has a `deserialize` function\n * // value is now an instance of MyClass\n *\n * const deserializer = new Deserializer(new Uint8Array([0]));\n * const value = deserializer.deserializeOption(MyClass); // where MyClass has a `deserialize` function\n * // value is undefined\n *\n * @param cls The BCS-deserializable class to deserialize the buffered bytes into.\n *\n * @returns the deserialized value of class type T\n */\n deserializeOption<T>(cls: Deserializable<T>): T | undefined {\n const exists = this.deserializeUleb128AsU32();\n if (exists === 1) {\n return this.deserialize(cls);\n }\n return undefined;\n }\n\n /**\n * Deserializes an array of bytes.\n *\n * BCS layout for \"bytes\": bytes_length | bytes\n * where bytes_length is a u32 integer encoded as a uleb128 integer, equal to the length of the bytes array.\n */\n deserializeBytes(): Uint8Array {\n const len = this.deserializeUleb128AsU32();\n return new Uint8Array(this.read(len));\n }\n\n /**\n * Deserializes an array of bytes. The number of bytes to read is already known.\n *\n */\n deserializeFixedBytes(len: number): Uint8Array {\n return new Uint8Array(this.read(len));\n }\n\n /**\n * Deserializes a boolean value.\n *\n * BCS layout for \"boolean\": One byte. \"0x01\" for true and \"0x00\" for false.\n */\n deserializeBool(): boolean {\n const bool = new Uint8Array(this.read(1))[0];\n if (bool !== 1 && bool !== 0) {\n throw new Error(\"Invalid boolean value\");\n }\n return bool === 1;\n }\n\n /**\n * Deserializes a uint8 number.\n *\n * BCS layout for \"uint8\": One byte. Binary format in little-endian representation.\n */\n deserializeU8(): Uint8 {\n return new DataView(this.read(1)).getUint8(0);\n }\n\n /**\n * Deserializes a uint16 number.\n *\n * BCS layout for \"uint16\": Two bytes. Binary format in little-endian representation.\n * @example\n * ```ts\n * const deserializer = new Deserializer(new Uint8Array([0x34, 0x12]));\n * assert(deserializer.deserializeU16() === 4660);\n * ```\n */\n deserializeU16(): Uint16 {\n return new DataView(this.read(2)).getUint16(0, true);\n }\n\n /**\n * Deserializes a uint32 number.\n *\n * BCS layout for \"uint32\": Four bytes. Binary format in little-endian representation.\n * @example\n * ```ts\n * const deserializer = new Deserializer(new Uint8Array([0x78, 0x56, 0x34, 0x12]));\n * assert(deserializer.deserializeU32() === 305419896);\n * ```\n */\n deserializeU32(): Uint32 {\n return new DataView(this.read(4)).getUint32(0, true);\n }\n\n /**\n * Deserializes a uint64 number.\n *\n * BCS layout for \"uint64\": Eight bytes. Binary format in little-endian representation.\n * @example\n * ```ts\n * const deserializer = new Deserializer(new Uint8Array([0x00, 0xEF, 0xCD, 0xAB, 0x78, 0x56, 0x34, 0x12]));\n * assert(deserializer.deserializeU64() === 1311768467750121216);\n * ```\n */\n deserializeU64(): Uint64 {\n const low = this.deserializeU32();\n const high = this.deserializeU32();\n\n // combine the two 32-bit values and return (little endian)\n return BigInt((BigInt(high) << BigInt(32)) | BigInt(low));\n }\n\n /**\n * Deserializes a uint128 number.\n *\n * BCS layout for \"uint128\": Sixteen bytes. Binary format in little-endian representation.\n */\n deserializeU128(): Uint128 {\n const low = this.deserializeU64();\n const high = this.deserializeU64();\n\n // combine the two 64-bit values and return (little endian)\n return BigInt((high << BigInt(64)) | low);\n }\n\n /**\n * Deserializes a uint256 number.\n *\n * BCS layout for \"uint256\": Thirty-two bytes. Binary format in little-endian representation.\n */\n deserializeU256(): Uint256 {\n const low = this.deserializeU128();\n const high = this.deserializeU128();\n\n // combine the two 128-bit values and return (little endian)\n return BigInt((high << BigInt(128)) | low);\n }\n\n /**\n * Deserializes a uleb128 encoded uint32 number.\n *\n * BCS use uleb128 encoding in two cases: (1) lengths of variable-length sequences and (2) tags of enum values\n */\n deserializeUleb128AsU32(): Uint32 {\n let value: bigint = BigInt(0);\n let shift = 0;\n\n while (value < MAX_U32_NUMBER) {\n const byte = this.deserializeU8();\n value |= BigInt(byte & 0x7f) << BigInt(shift);\n\n if ((byte & 0x80) === 0) {\n break;\n }\n shift += 7;\n }\n\n if (value > MAX_U32_NUMBER) {\n throw new Error(\"Overflow while parsing uleb128-encoded uint32 value\");\n }\n\n return Number(value);\n }\n\n /**\n * Helper function that primarily exists to support alternative syntax for deserialization.\n * That is, if we have a `const deserializer: new Deserializer(...)`, instead of having to use\n * `MyClass.deserialize(deserializer)`, we can call `deserializer.deserialize(MyClass)`.\n *\n * @example const deserializer = new Deserializer(new Uint8Array([1, 2, 3]));\n * const value = deserializer.deserialize(MyClass); // where MyClass has a `deserialize` function\n * // value is now an instance of MyClass\n * // equivalent to `const value = MyClass.deserialize(deserializer)`\n * @param cls The BCS-deserializable class to deserialize the buffered bytes into.\n *\n * @returns the deserialized value of class type T\n */\n deserialize<T>(cls: Deserializable<T>): T {\n // NOTE: `deserialize` in `cls.deserialize(this)` here is a static method defined in `cls`,\n // It is separate from the `deserialize` instance method defined here in Deserializer.\n return cls.deserialize(this);\n }\n\n /**\n * Deserializes an array of BCS Deserializable values given an existing Deserializer\n * instance with a loaded byte buffer.\n *\n * @param cls The BCS-deserializable class to deserialize the buffered bytes into.\n * @example\n * // serialize a vector of addresses\n * const addresses = new Array<AccountAddress>(\n * AccountAddress.from(\"0x1\"),\n * AccountAddress.from(\"0x2\"),\n * AccountAddress.from(\"0xa\"),\n * AccountAddress.from(\"0xb\"),\n * );\n * const serializer = new Serializer();\n * serializer.serializeVector(addresses);\n * const serializedBytes = serializer.toUint8Array();\n *\n * // deserialize the bytes into an array of addresses\n * const deserializer = new Deserializer(serializedBytes);\n * const deserializedAddresses = deserializer.deserializeVector(AccountAddress);\n * // deserializedAddresses is now an array of AccountAddress instances\n * @returns an array of deserialized values of type T\n */\n deserializeVector<T>(cls: Deserializable<T>): Array<T> {\n const length = this.deserializeUleb128AsU32();\n const vector = new Array<T>();\n for (let i = 0; i < length; i += 1) {\n vector.push(this.deserialize(cls));\n }\n return vector;\n }\n}\n"],"mappings":"yCAiBO,IAAMA,EAAN,KAAmB,CAKxB,YAAYC,EAAkB,CAE5B,KAAK,OAAS,IAAI,YAAYA,EAAK,MAAM,EACzC,IAAI,WAAW,KAAK,MAAM,EAAE,IAAIA,EAAM,CAAC,EACvC,KAAK,OAAS,CAChB,CAEQ,KAAKC,EAA6B,CACxC,GAAI,KAAK,OAASA,EAAS,KAAK,OAAO,WACrC,MAAM,IAAI,MAAM,8BAA8B,EAGhD,IAAMC,EAAQ,KAAK,OAAO,MAAM,KAAK,OAAQ,KAAK,OAASD,CAAM,EACjE,YAAK,QAAUA,EACRC,CACT,CAeA,gBAAyB,CACvB,IAAMC,EAAQ,KAAK,iBAAiB,EAEpC,OADoB,IAAI,YAAY,EACjB,OAAOA,CAAK,CACjC,CAcA,sBAA2C,CAEzC,GADe,KAAK,wBAAwB,IAC7B,EACb,OAAO,KAAK,eAAe,CAG/B,CAoBA,kBAAqBC,EAAuC,CAE1D,GADe,KAAK,wBAAwB,IAC7B,EACb,OAAO,KAAK,YAAYA,CAAG,CAG/B,CAQA,kBAA+B,CAC7B,IAAMC,EAAM,KAAK,wBAAwB,EACzC,OAAO,IAAI,WAAW,KAAK,KAAKA,CAAG,CAAC,CACtC,CAMA,sBAAsBA,EAAyB,CAC7C,OAAO,IAAI,WAAW,KAAK,KAAKA,CAAG,CAAC,CACtC,CAOA,iBAA2B,CACzB,IAAMC,EAAO,IAAI,WAAW,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC,EAC3C,GAAIA,IAAS,GAAKA,IAAS,EACzB,MAAM,IAAI,MAAM,uBAAuB,EAEzC,OAAOA,IAAS,CAClB,CAOA,eAAuB,CACrB,OAAO,IAAI,SAAS,KAAK,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAC9C,CAYA,gBAAyB,CACvB,OAAO,IAAI,SAAS,KAAK,KAAK,CAAC,CAAC,EAAE,UAAU,EAAG,EAAI,CACrD,CAYA,gBAAyB,CACvB,OAAO,IAAI,SAAS,KAAK,KAAK,CAAC,CAAC,EAAE,UAAU,EAAG,EAAI,CACrD,CAYA,gBAAyB,CACvB,IAAMC,EAAM,KAAK,eAAe,EAC1BC,EAAO,KAAK,eAAe,EAGjC,OAAO,OAAQ,OAAOA,CAAI,GAAK,OAAO,EAAE,EAAK,OAAOD,CAAG,CAAC,CAC1D,CAOA,iBAA2B,CACzB,IAAMA,EAAM,KAAK,eAAe,EAC1BC,EAAO,KAAK,eAAe,EAGjC,OAAO,OAAQA,GAAQ,OAAO,EAAE,EAAKD,CAAG,CAC1C,CAOA,iBAA2B,CACzB,IAAMA,EAAM,KAAK,gBAAgB,EAC3BC,EAAO,KAAK,gBAAgB,EAGlC,OAAO,OAAQA,GAAQ,OAAO,GAAG,EAAKD,CAAG,CAC3C,CAOA,yBAAkC,CAChC,IAAIJ,EAAgB,OAAO,CAAC,EACxBM,EAAQ,EAEZ,KAAON,EAAQO,GAAgB,CAC7B,IAAMC,EAAO,KAAK,cAAc,EAGhC,GAFAR,GAAS,OAAOQ,EAAO,GAAI,GAAK,OAAOF,CAAK,EAEvC,EAAAE,EAAO,KACV,MAEFF,GAAS,CACX,CAEA,GAAIN,EAAQO,EACV,MAAM,IAAI,MAAM,qDAAqD,EAGvE,OAAO,OAAOP,CAAK,CACrB,CAeA,YAAeC,EAA2B,CAGxC,OAAOA,EAAI,YAAY,IAAI,CAC7B,CAyBA,kBAAqBA,EAAkC,CACrD,IAAMH,EAAS,KAAK,wBAAwB,EACtCW,EAAS,IAAI,MACnB,QAASC,EAAI,EAAGA,EAAIZ,EAAQY,GAAK,EAC/BD,EAAO,KAAK,KAAK,YAAYR,CAAG,CAAC,EAEnC,OAAOQ,CACT,CACF","names":["Deserializer","data","length","bytes","value","cls","len","bool","low","high","shift","MAX_U32_NUMBER","byte","vector","i"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i,b as t,c as n,d as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i,b as t,c as n,d as o}from"./chunk-Z6FMMNAL.mjs";import{a as s}from"./chunk-IPI3VB62.mjs";var r=class{constructor(e){this.config=e}async getFungibleAssetMetadata(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),i({aptosConfig:this.config,...e})}async getFungibleAssetMetadataByAssetType(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),(await i({aptosConfig:this.config,options:{where:{asset_type:{_eq:e.assetType}}}}))[0]}async getFungibleAssetActivities(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),t({aptosConfig:this.config,...e})}async getCurrentFungibleAssetBalances(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),n({aptosConfig:this.config,...e})}async transferFungibleAsset(e){return o({aptosConfig:this.config,...e})}};export{r as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3TIXNBXM.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as m}from"./chunk-FIG65OJD.mjs";import{a as h}from"./chunk-NW3WUTTD.mjs";import{b as t}from"./chunk-F3ZVWLDH.mjs";import{a as u}from"./chunk-UMLUOYFK.mjs";var o=class i extends u{constructor(e,s,a,n,d,l,_){super();this.sender=e,this.sequence_number=s,this.payload=a,this.max_gas_amount=n,this.gas_unit_price=d,this.expiration_timestamp_secs=l,this.chain_id=_}serialize(e){this.sender.serialize(e),e.serializeU64(this.sequence_number),this.payload.serialize(e),e.serializeU64(this.max_gas_amount),e.serializeU64(this.gas_unit_price),e.serializeU64(this.expiration_timestamp_secs),this.chain_id.serialize(e)}static deserialize(e){let s=t.deserialize(e),a=e.deserializeU64(),n=m.deserialize(e),d=e.deserializeU64(),l=e.deserializeU64(),_=e.deserializeU64(),b=h.deserialize(e);return new i(s,a,n,d,l,_,b)}},c=class extends u{static deserialize(r){let e=r.deserializeUleb128AsU32();switch(e){case 0:return p.load(r);case 1:return y.load(r);default:throw new Error(`Unknown variant index for RawTransactionWithData: ${e}`)}}},p=class i extends c{constructor(e,s){super();this.raw_txn=e,this.secondary_signer_addresses=s}serialize(e){e.serializeU32AsUleb128(0),this.raw_txn.serialize(e),e.serializeVector(this.secondary_signer_addresses)}static load(e){let s=o.deserialize(e),a=e.deserializeVector(t);return new i(s,a)}},y=class i extends c{constructor(e,s,a){super();this.raw_txn=e,this.secondary_signer_addresses=s,this.fee_payer_address=a}serialize(e){e.serializeU32AsUleb128(1),this.raw_txn.serialize(e),e.serializeVector(this.secondary_signer_addresses),this.fee_payer_address.serialize(e)}static load(e){let s=o.deserialize(e),a=e.deserializeVector(t),n=t.deserialize(e);return new i(s,a,n)}};export{o as a,c as b,p as c,y as d};
|
|
2
|
+
//# sourceMappingURL=chunk-472OGHMG.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-OJ6AF4YT.mjs";import{a as c}from"./chunk-YDSBZMZB.mjs";import{b as i}from"./chunk-XVZBWW46.mjs";var o=class{static generate(e={}){let{scheme:t=0,legacy:r=!0}=e;return t===0&&r?n.generate():c.generate({scheme:t})}static fromPrivateKey(e){let{privateKey:t,address:r,legacy:a=!0}=e;return t instanceof i&&a?new n({privateKey:t,address:r}):new c({privateKey:t,address:r})}static fromPrivateKeyAndAddress(e){return this.fromPrivateKey(e)}static fromDerivationPath(e){let{scheme:t=0,mnemonic:r,path:a,legacy:s=!0}=e;return t===0&&s?n.fromDerivationPath({mnemonic:r,path:a}):c.fromDerivationPath({scheme:t,mnemonic:r,path:a})}static authKey(e){let{publicKey:t}=e;return t.authKey()}verifySignature(e){return this.publicKey.verifySignature(e)}};export{o as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4AWM7GGV.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-UMLUOYFK.mjs";import{b as t}from"./chunk-AOCNYMMX.mjs";var o=class extends r{toString(){let i=this.toUint8Array();return t.fromHexInput(i).toString()}};export{o as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4VPCPASN.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b,c as K}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b,c as K}from"./chunk-QHB5A5YP.mjs";import{a as d}from"./chunk-UKKHWC4Y.mjs";import{a as l,b as y}from"./chunk-L5CPAOUM.mjs";import{b as u,c as h,e as m}from"./chunk-IVVWQKCF.mjs";import{b as a}from"./chunk-XVZBWW46.mjs";import{a as o}from"./chunk-3IFR6T3V.mjs";import{a as p}from"./chunk-UMLUOYFK.mjs";import{b as c}from"./chunk-AOCNYMMX.mjs";import{randomBytes as E}from"@noble/hashes/utils";var i=class i extends p{constructor(e){super();let{privateKey:r,expiryDateSecs:t,blinder:n}=e;this.privateKey=r,this.publicKey=new l(r.publicKey()),this.expiryDateSecs=t||K(b()+d),this.blinder=n!==void 0?c.fromHexInput(n).toUint8Array():S(),this.nonce=this.generateNonce()}getPublicKey(){return this.publicKey}isExpired(){return Math.floor(Date.now()/1e3)>this.expiryDateSecs}serialize(e){e.serializeU32AsUleb128(this.publicKey.variant),e.serializeBytes(this.privateKey.toUint8Array()),e.serializeU64(this.expiryDateSecs),e.serializeFixedBytes(this.blinder)}static deserialize(e){let r=e.deserializeUleb128AsU32(),t;switch(r){case 0:t=a.deserialize(e);break;default:throw new Error(`Unknown variant index for EphemeralPublicKey: ${r}`)}let n=e.deserializeU64(),x=e.deserializeFixedBytes(31);return new i({privateKey:t,expiryDateSecs:Number(n),blinder:x})}static fromBytes(e){return i.deserialize(new o(e))}static generate(e){let r;switch(e?.scheme){case 0:default:r=a.generate()}return new i({privateKey:r,expiryDateSecs:e?.expiryDateSecs})}generateNonce(){let e=u(this.publicKey.bcsToBytes(),93);return e.push(BigInt(this.expiryDateSecs)),e.push(h(this.blinder)),m(e).toString()}sign(e){if(this.isExpired())throw new Error("EphemeralKeyPair has expired");return new y(this.privateKey.sign(e))}};i.BLINDER_LENGTH=31;var s=i;function S(){return E(s.BLINDER_LENGTH)}export{s as a};
|
|
2
|
+
//# sourceMappingURL=chunk-572AE4D7.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as d}from"./chunk-OAX7LYUZ.mjs";import{f as M}from"./chunk-OR27VDOE.mjs";import{c as V}from"./chunk-XH33BXEY.mjs";import{c as b}from"./chunk-LA67NWMV.mjs";import{A as q,n as x,y as E,z as G}from"./chunk-S3EDNXZE.mjs";import{b as w,f as v,i as h,l as A,m as f,n as s,q as p,s as g}from"./chunk-MLX6DFMR.mjs";import{b as u}from"./chunk-F3ZVWLDH.mjs";import{a as I,b as c}from"./chunk-FGGRPEQ3.mjs";import{a as T,e as S}from"./chunk-IBN7ETCB.mjs";import{d as O}from"./chunk-56CNRT2K.mjs";var C={BOOLEAN:"bool",U8:"u8",U16:"u16",U32:"u32",U64:"u64",U128:"u128",U256:"u256",ADDRESS:"address",STRING:"0x1::string::String",ARRAY:"vector<u8>"},m="0x4::token::Token";async function It(t){let{aptosConfig:o,digitalAssetAddress:n}=t,e={token_data_id:{_eq:u.from(n).toStringLong()}};return(await b({aptosConfig:o,query:{query:q,variables:{where_condition:e}},originMethod:"getDigitalAssetData"})).current_token_datas_v2[0]}async function _t(t){let{aptosConfig:o,digitalAssetAddress:n}=t,e={token_data_id:{_eq:u.from(n).toStringLong()},amount:{_gt:0}};return(await b({aptosConfig:o,query:{query:G,variables:{where_condition:e}},originMethod:"getCurrentDigitalAssetOwnership"})).current_token_ownerships_v2[0]}async function Pt(t){let{aptosConfig:o,ownerAddress:n,options:e}=t,r={owner_address:{_eq:u.from(n).toStringLong()},amount:{_gt:0}},i={query:G,variables:{where_condition:r,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await b({aptosConfig:o,query:i,originMethod:"getOwnedDigitalAssets"})).current_token_ownerships_v2}async function kt(t){let{aptosConfig:o,digitalAssetAddress:n,options:e}=t,r={token_data_id:{_eq:u.from(n).toStringLong()}},i={query:E,variables:{where_condition:r,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await b({aptosConfig:o,query:i,originMethod:"getDigitalAssetActivity"})).token_activities_v2}var Q={typeParameters:[],parameters:[new s(p()),new v,new s(p()),new s(p()),new w,new w,new w,new w,new w,new w,new w,new w,new w,new v,new v]};async function Dt(t){let{aptosConfig:o,options:n,creator:e}=t;return d({aptosConfig:o,sender:e.accountAddress,data:{function:"0x4::aptos_token::create_collection",functionArguments:[new c(t.description),new S(t.maxSupply??O),new c(t.name),new c(t.uri),new T(t.mutableDescription??!0),new T(t.mutableRoyalty??!0),new T(t.mutableURI??!0),new T(t.mutableTokenDescription??!0),new T(t.mutableTokenName??!0),new T(t.mutableTokenProperties??!0),new T(t.mutableTokenURI??!0),new T(t.tokensBurnableByCreator??!0),new T(t.tokensFreezableByCreator??!0),new S(t.royaltyNumerator??0),new S(t.royaltyDenominator??1)],abi:Q},options:n})}async function U(t){let{aptosConfig:o,creatorAddress:n,collectionName:e,options:r}=t,i=u.from(n),a={collection_name:{_eq:e},creator_address:{_eq:i.toStringLong()}};return r?.tokenStandard&&(a.token_standard={_eq:r?.tokenStandard??"v2"}),(await b({aptosConfig:o,query:{query:x,variables:{where_condition:a}},originMethod:"getCollectionData"})).current_collections_v2[0]}async function St(t){let{aptosConfig:o,collectionId:n}=t,r={collection_id:{_eq:u.from(n).toStringLong()}};return(await b({aptosConfig:o,query:{query:x,variables:{where_condition:r}},originMethod:"getCollectionData"})).current_collections_v2[0]}async function vt(t){return(await U(t)).collection_id}var F={typeParameters:[],parameters:[new s(p()),new s(p()),new s(p()),new s(p()),new f(new s(p())),new f(new s(p())),new f(f.u8())]};async function ht(t){let{aptosConfig:o,options:n,creator:e,collection:r,description:i,name:a,uri:l,propertyKeys:y,propertyTypes:P,propertyValues:_}=t,k=P?.map(D=>C[D]);return d({aptosConfig:o,sender:e.accountAddress,data:{function:"0x4::aptos_token::mint",functionArguments:[new c(r),new c(i),new c(a),new c(l),I.MoveString(y??[]),I.MoveString(k??[]),R(_??[],k??[])],abi:F},options:n})}var N={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new h]};async function xt(t){let{aptosConfig:o,sender:n,digitalAssetAddress:e,recipient:r,digitalAssetType:i,options:a}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x1::object::transfer",typeArguments:[i??m],functionArguments:[u.from(e),u.from(r)],abi:N},options:a})}var Y={typeParameters:[],parameters:[new s(p()),new s(p()),new s(p()),new s(p()),new f(new s(p())),new f(new s(p())),new f(f.u8()),new h]};async function Gt(t){let{aptosConfig:o,account:n,collection:e,description:r,name:i,uri:a,recipient:l,propertyKeys:y,propertyTypes:P,propertyValues:_,options:k}=t;if(y?.length!==_?.length)throw new Error("Property keys and property values counts do not match");if(P?.length!==_?.length)throw new Error("Property types and property values counts do not match");let D=P?.map(K=>C[K]);return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::mint_soul_bound",functionArguments:[e,r,i,a,I.MoveString(y??[]),I.MoveString(D??[]),R(_??[],D??[]),l],abi:Y},options:k})}var z={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0)))]};async function Bt(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:i}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::burn",typeArguments:[r??m],functionArguments:[u.from(e)],abi:z},options:i})}var L={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0)))]};async function Ot(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:i}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::freeze_transfer",typeArguments:[r??m],functionArguments:[e],abi:L},options:i})}var j={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0)))]};async function Et(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:i}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::unfreeze_transfer",typeArguments:[r??m],functionArguments:[e],abi:j},options:i})}var X={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p())]};async function qt(t){let{aptosConfig:o,creator:n,description:e,digitalAssetAddress:r,digitalAssetType:i,options:a}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_description",typeArguments:[i??m],functionArguments:[u.from(r),new c(e)],abi:X},options:a})}var H={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p())]};async function Vt(t){let{aptosConfig:o,creator:n,name:e,digitalAssetAddress:r,digitalAssetType:i,options:a}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_name",typeArguments:[i??m],functionArguments:[u.from(r),new c(e)],abi:H},options:a})}var J={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p())]};async function Mt(t){let{aptosConfig:o,creator:n,uri:e,digitalAssetAddress:r,digitalAssetType:i,options:a}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_uri",typeArguments:[i??m],functionArguments:[u.from(r),new c(e)],abi:J},options:a})}var W={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p()),new s(p()),f.u8()]};async function Rt(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:i,digitalAssetAddress:a,digitalAssetType:l,options:y}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::add_property",typeArguments:[l??m],functionArguments:[u.from(a),new c(e),new c(C[r]),I.U8(B(i,C[r]))],abi:W},options:y})}var Z={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p())]};async function Kt(t){let{aptosConfig:o,creator:n,propertyKey:e,digitalAssetAddress:r,digitalAssetType:i,options:a}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::remove_property",typeArguments:[i??m],functionArguments:[u.from(r),new c(e)],abi:Z},options:a})}var $={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p()),new s(p()),f.u8()]};async function Qt(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:i,digitalAssetAddress:a,digitalAssetType:l,options:y}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::update_property",typeArguments:[l??m],functionArguments:[u.from(a),new c(e),new c(C[r]),B(i,C[r])],abi:$},options:y})}var tt={typeParameters:[{constraints:["key"]},{constraints:[]}],parameters:[new s(g(new A(0))),new s(p()),new A(1)]};async function Ut(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:i,digitalAssetAddress:a,digitalAssetType:l,options:y}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::add_typed_property",typeArguments:[l??m,C[r]],functionArguments:[u.from(a),new c(e),i],abi:tt},options:y})}var et={typeParameters:[{constraints:["key"]},{constraints:[]}],parameters:[new s(g(new A(0))),new s(p()),new A(1)]};async function Ft(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:i,digitalAssetAddress:a,digitalAssetType:l,options:y}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::update_typed_property",typeArguments:[l??m,C[r]],functionArguments:[u.from(a),new c(e),i],abi:et},options:y})}function R(t,o){let n=new Array;return o.forEach((e,r)=>{n.push(B(t[r],e))}),n}function B(t,o){let n=V(o);return M(t,n,0,[]).bcsToBytes()}export{It as a,_t as b,Pt as c,kt as d,Dt as e,U as f,St as g,vt as h,ht as i,xt as j,Gt as k,Bt as l,Ot as m,Et as n,qt as o,Vt as p,Mt as q,Rt as r,Kt as s,Qt as t,Ut as u,Ft as v};
|
|
2
|
+
//# sourceMappingURL=chunk-5SGAX4VT.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u,b as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u,b as l}from"./chunk-O3BRX56F.mjs";import{b as g}from"./chunk-WA2NTBYY.mjs";import{a as f}from"./chunk-4VPCPASN.mjs";import{a as m}from"./chunk-EFMAZTIM.mjs";function A(y){let o=y;return o-=o>>1&1431655765,o=(o&858993459)+(o>>2&858993459),(o+(o>>4)&252645135)*16843009>>24}var p=class y extends g{constructor(e){super();let{publicKeys:r,signaturesRequired:t}=e;if(t<1)throw new Error("The number of required signatures needs to be greater than 0");if(r.length<t)throw new Error(`Provided ${r.length} public keys is smaller than the ${t} required signatures`);this.publicKeys=r.map(i=>i instanceof u?i:new u(i)),this.signaturesRequired=t}verifySignature(e){throw new Error("not implemented")}authKey(){return m.fromSchemeAndBytes({scheme:3,input:this.toUint8Array()})}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeVector(this.publicKeys),e.serializeU8(this.signaturesRequired)}static deserialize(e){let r=e.deserializeVector(u),t=e.deserializeU8();return new y({publicKeys:r,signaturesRequired:t})}createBitmap(e){let{bits:r}=e,t=128,i=new Uint8Array([0,0,0,0]),a=new Set;return r.forEach((n,c)=>{if(c+1>this.publicKeys.length)throw new Error(`Signature index ${c+1} is out of public keys range, ${this.publicKeys.length}.`);if(a.has(n))throw new Error(`Duplicate bit ${n} detected.`);a.add(n);let h=Math.floor(n/8),b=i[h];b|=t>>n%8,i[h]=b}),i}getIndex(e){let r=e instanceof u?e:new u(e),t=this.publicKeys.findIndex(i=>i.toString()===r.toString());if(t!==-1)return t;throw new Error("Public key not found in MultiKey")}},s=class s extends f{constructor(e){super();let{signatures:r,bitmap:t}=e;if(r.length>s.MAX_SIGNATURES_SUPPORTED)throw new Error(`The number of signatures cannot be greater than ${s.MAX_SIGNATURES_SUPPORTED}`);if(this.signatures=r.map(a=>a instanceof l?a:new l(a)),!(t instanceof Uint8Array))this.bitmap=s.createBitmap({bits:t});else{if(t.length!==s.BITMAP_LEN)throw new Error(`"bitmap" length should be ${s.BITMAP_LEN}`);this.bitmap=t}let i=this.bitmap.reduce((a,n)=>a+A(n),0);if(i!==this.signatures.length)throw new Error(`Expecting ${i} signatures from the bitmap, but got ${this.signatures.length}`)}static createBitmap(e){let{bits:r}=e,t=128,i=new Uint8Array([0,0,0,0]),a=new Set;return r.forEach(n=>{if(n>=s.MAX_SIGNATURES_SUPPORTED)throw new Error(`Cannot have a signature larger than ${s.MAX_SIGNATURES_SUPPORTED-1}.`);if(a.has(n))throw new Error("Duplicate bits detected.");a.add(n);let c=Math.floor(n/8),h=i[c];h|=t>>n%8,i[c]=h}),i}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeVector(this.signatures),e.serializeBytes(this.bitmap)}static deserialize(e){let r=e.deserializeVector(l),t=e.deserializeBytes();return new s({signatures:r,bitmap:t})}};s.BITMAP_LEN=4,s.MAX_SIGNATURES_SUPPORTED=s.BITMAP_LEN*8;var d=s;export{p as a,d as b};
|
|
2
|
+
//# sourceMappingURL=chunk-66G6MKI6.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var s=class extends Error{constructor(e,t,
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
var s=class extends Error{constructor(e,t,a){super(a);this.name="AptosApiError",this.url=t.url,this.status=t.status,this.statusText=t.statusText,this.data=t.data,this.request=e}};export{s as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6FBKUTGF.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/client/types.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { AptosRequest } from \"../types\";\n\n/**\n * The API response type\n *\n * @param status - the response status. i.e. 200\n * @param statusText - the response message\n * @param data the response data\n * @param url the url the request was made to\n * @param headers the response headers\n * @param config (optional) - the request object\n * @param request (optional) - the request object\n */\nexport interface AptosResponse<Req, Res> {\n status: number;\n statusText: string;\n data: Res;\n url: string;\n headers: any;\n config?: any;\n request?: Req;\n}\n\n/**\n * The type returned from an API error\n *\n * @param name - the error name \"AptosApiError\"\n * @param url the url the request was made to\n * @param status - the response status. i.e. 400\n * @param statusText - the response message\n * @param data the response data\n * @param request - the AptosRequest\n */\nexport class AptosApiError extends Error {\n readonly url: string;\n\n readonly status: number;\n\n readonly statusText: string;\n\n readonly data:
|
|
1
|
+
{"version":3,"sources":["../../src/client/types.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { AptosRequest } from \"../types\";\n\n/**\n * The API response type\n *\n * @param status - the response status. i.e. 200\n * @param statusText - the response message\n * @param data the response data\n * @param url the url the request was made to\n * @param headers the response headers\n * @param config (optional) - the request object\n * @param request (optional) - the request object\n */\nexport interface AptosResponse<Req, Res> {\n status: number;\n statusText: string;\n data: Res;\n url: string;\n headers: any;\n config?: any;\n request?: Req;\n}\n\n/**\n * The type returned from an API error\n *\n * @param name - the error name \"AptosApiError\"\n * @param url the url the request was made to\n * @param status - the response status. i.e. 400\n * @param statusText - the response message\n * @param data the response data\n * @param request - the AptosRequest\n */\nexport class AptosApiError extends Error {\n readonly url: string;\n\n readonly status: number;\n\n readonly statusText: string;\n\n readonly data: any;\n\n readonly request: AptosRequest;\n\n constructor(request: AptosRequest, response: AptosResponse<any, any>, message: string) {\n super(message);\n\n this.name = \"AptosApiError\";\n this.url = response.url;\n this.status = response.status;\n this.statusText = response.statusText;\n this.data = response.data;\n this.request = request;\n }\n}\n"],"mappings":"AAoCO,IAAMA,EAAN,cAA4B,KAAM,CAWvC,YAAYC,EAAuBC,EAAmCC,EAAiB,CACrF,MAAMA,CAAO,EAEb,KAAK,KAAO,gBACZ,KAAK,IAAMD,EAAS,IACpB,KAAK,OAASA,EAAS,OACvB,KAAK,WAAaA,EAAS,WAC3B,KAAK,KAAOA,EAAS,KACrB,KAAK,QAAUD,CACjB,CACF","names":["AptosApiError","request","response","message"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as m}from"./chunk-OAX7LYUZ.mjs";import{a as g}from"./chunk-QMYYNCC2.mjs";import{c as A}from"./chunk-LA67NWMV.mjs";import{t as f}from"./chunk-S3EDNXZE.mjs";import{b as w}from"./chunk-F3ZVWLDH.mjs";var T=["A name must be between 3 and 63 characters long,","and can only contain lowercase a-z, 0-9, and hyphens.","A name may not start or end with a hyphen."].join(" ");function E(e){return!(!e||e.length<3||e.length>63||!/^[a-z\d][a-z\d-]{1,61}[a-z\d]$/.test(e))}function c(e){let[n,t,...o]=e.replace(/\.apt$/,"").split(".");if(o.length>0)throw new Error(`${e} is invalid. A name can only have two parts, a domain and a subdomain separated by a "."`);if(!E(n))throw new Error(`${n} is not valid. ${T}`);if(t&&!E(t))throw new Error(`${t} is not valid. ${T}`);return{domainName:t||n,subdomainName:t?n:void 0}}var z="0x37368b46ce665362562c6d1d4ec01a08c8644c488690df5a17e13ba163e20221",G="0x585fc9f0f0c54183b039ffc770ca282ebd87307916c215a3e692f2f8e4305e82",P={testnet:"0x5f8fd2347449685cf41d4db97926ec3a096eaf381332be4f1318ad4d16a8497c",mainnet:"0x867ed1f6bf916171b1de3ee92849b8978b7d1b9e0a8cc982a3d19d535dfd9c0c",local:G,custom:null,devnet:null};function d(e){let n=P[e.network];if(!n)throw new Error(`The ANS contract is not deployed to ${e.network}`);return n}var b=e=>{if(e&&typeof e=="object"&&"vec"in e&&Array.isArray(e.vec))return e.vec[0]};async function V(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t),i=await g({aptosConfig:n,payload:{function:`${o}::router::get_owner_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function j(e){let{aptosConfig:n,expiration:t,name:o,sender:r,targetAddress:s,toAddress:i,options:a,transferable:u}=e,p=d(n),{domainName:N,subdomainName:l}=c(o),S=t.policy==="subdomain:independent"||t.policy==="subdomain:follow-domain";if(l&&!S)throw new Error("Subdomains must have an expiration policy of either 'subdomain:independent' or 'subdomain:follow-domain'");if(S&&!l)throw new Error(`Policy is set to ${t.policy} but no subdomain was provided`);if(t.policy==="domain"){let h=t.years??1;if(h!==1)throw new Error("For now, names can only be registered for 1 year at a time");let D=h*31536e3;return await m({aptosConfig:n,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_domain`,functionArguments:[N,D,s,i]},options:a})}if(!l)throw new Error(`${t.policy} requires a subdomain to be provided.`);let _=await I({aptosConfig:n,name:N});if(!_)throw new Error("The domain does not exist");let x=t.policy==="subdomain:independent"?t.expirationDate:_;if(x>_)throw new Error("The subdomain expiration time cannot be greater than the domain expiration time");return await m({aptosConfig:n,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_subdomain`,functionArguments:[N,l,Math.round(x/1e3),t.policy==="subdomain:follow-domain"?1:0,!!u,s,i]},options:a})}async function I(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t);try{let i=await g({aptosConfig:n,payload:{function:`${o}::router::get_expiration`,functionArguments:[r,s]}});return Number(i[0])*1e3}catch{return}}async function Y(e){let{aptosConfig:n,address:t}=e,o=d(n),r=await g({aptosConfig:n,payload:{function:`${o}::router::get_primary_name`,functionArguments:[w.from(t).toString()]}}),s=b(r[1]),i=b(r[0]);if(s)return[i,s].filter(Boolean).join(".")}async function K(e){let{aptosConfig:n,sender:t,name:o,options:r}=e,s=d(n);if(!o)return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${s}::router::clear_primary_name`,functionArguments:[]},options:r});let{domainName:i,subdomainName:a}=c(o);return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${s}::router::set_primary_name`,functionArguments:[i,a]},options:r})}async function W(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t),i=await g({aptosConfig:n,payload:{function:`${o}::router::get_target_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function F(e){let{aptosConfig:n,sender:t,name:o,address:r,options:s}=e,i=d(n),{domainName:a,subdomainName:u}=c(o);return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${i}::router::set_target_addr`,functionArguments:[a,u,r]},options:s})}async function H(e){let{aptosConfig:n,name:t}=e,{domainName:o,subdomainName:r=""}=c(t),a=(await A({aptosConfig:n,query:{query:f,variables:{where_condition:{domain:{_eq:o},subdomain:{_eq:r},is_active:{_eq:!0}},limit:1}},originMethod:"getName"})).current_aptos_names[0];return a&&(a=y(a)),a}async function J(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountNames",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r}}}}})).current_aptos_names.map(y)}async function X(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountDomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_eq:""}}}}})).current_aptos_names.map(y)}async function Z(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountSubdomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_neq:""}}}}})).current_aptos_names.map(y)}async function ee(e){let{aptosConfig:n,options:t,domain:o}=e;return(await A({aptosConfig:n,originMethod:"getDomainSubdomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},domain:{_eq:o},subdomain:{_neq:""},is_active:{_eq:!0}}}}})).current_aptos_names.map(y)}async function C(e){let{aptosConfig:n}=e,t=d(n),[o]=await g({aptosConfig:n,payload:{function:`${t}::config::reregistration_grace_sec`,functionArguments:[]}}),r=o/60/60/24,s=()=>new Date;return new Date(s().setDate(s().getDate()-r)).toISOString()}async function ne(e){let{aptosConfig:n,sender:t,name:o,years:r=1,options:s}=e,i=d(n),a=r*31536e3,{domainName:u,subdomainName:p}=c(o);if(p)throw new Error("Subdomains cannot be renewed");if(r!==1)throw new Error("Currently, only 1 year renewals are supported");return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${i}::router::renew_domain`,functionArguments:[u,a]},options:s})}function y(e){return{...e,expiration_timestamp:new Date(e.expiration_timestamp).getTime()}}export{T as a,E as b,c,z as d,G as e,V as f,j as g,I as h,Y as i,K as j,W as k,F as l,H as m,J as n,X as o,Z as p,ee as q,ne as r};
|
|
2
|
+
//# sourceMappingURL=chunk-6OQBDCDK.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-UMLUOYFK.mjs";import{b as i}from"./chunk-AOCNYMMX.mjs";var t=class a extends r{constructor(e){super();this.value=i.fromHexInput(e).toUint8Array()}serialize(e){e.serializeFixedBytes(this.value)}serializeForEntryFunction(e){e.serialize(this)}serializeForScriptFunction(e){e.serialize(this)}static deserialize(e,s){let o=e.deserializeFixedBytes(s);return new a(o)}};export{t as a};
|
|
2
|
+
//# sourceMappingURL=chunk-7BW2N4IE.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as v}from"./chunk-LYOUEPDG.mjs";import{a as x}from"./chunk-572AE4D7.mjs";import{d as b}from"./chunk-QHB5A5YP.mjs";import{a as E}from"./chunk-KGHBTSDR.mjs";import{d as y}from"./chunk-J63BIFB7.mjs";import{a as d,b as f}from"./chunk-O3BRX56F.mjs";import{i as S,j as F,k as A,n as u}from"./chunk-UKKHWC4Y.mjs";import{b as K}from"./chunk-F3ZVWLDH.mjs";import{a as g}from"./chunk-3IFR6T3V.mjs";import{a as P}from"./chunk-UMLUOYFK.mjs";import{b as w}from"./chunk-AOCNYMMX.mjs";import{jwtDecode as H}from"jwt-decode";import Z from"eventemitter3";var ee={"https://accounts.google.com":"https://www.googleapis.com/oauth2/v3/certs"},s=class s extends P{constructor(e){super();let{address:r,ephemeralKeyPair:t,uidKey:i,uidVal:a,aud:n,pepper:h,proofOrFetcher:o,proofFetchCallback:c,jwt:l}=e;if(this.ephemeralKeyPair=t,this.publicKey=S.create(e),this.accountAddress=r?K.from(r):this.publicKey.authKey().derivedAddress(),this.uidKey=i,this.uidVal=a,this.aud=n,this.jwt=l,this.emitter=new Z,this.proofOrPromise=o,o instanceof u)this.proof=o;else{if(c===void 0)throw new Error("Must provide callback for async proof fetch");this.emitter.on("proofFetchFinish",async z=>{await c(z),this.emitter.removeAllListeners()}),this.init(o)}this.signingScheme=2;let p=w.fromHexInput(h).toUint8Array();if(p.length!==s.PEPPER_LENGTH)throw new Error(`Pepper length in bytes should be ${s.PEPPER_LENGTH}`);this.pepper=p,this.isJwtValid=!0}async init(e){try{this.proof=await e,this.emitter.emit("proofFetchFinish",{status:"Success"})}catch(r){r instanceof Error?this.emitter.emit("proofFetchFinish",{status:"Failed",error:r.toString()}):this.emitter.emit("proofFetchFinish",{status:"Failed",error:"Unknown"})}}serialize(e){if(e.serializeStr(this.jwt),e.serializeStr(this.uidKey),e.serializeFixedBytes(this.pepper),this.ephemeralKeyPair.serialize(e),this.proof===void 0)throw new Error("Connot serialize - proof undefined");this.proof.serialize(e)}static deserialize(e){let r=e.deserializeStr(),t=e.deserializeStr(),i=e.deserializeFixedBytes(31),a=x.deserialize(e),n=u.deserialize(e);return s.create({proof:n,pepper:i,uidKey:t,jwt:r,ephemeralKeyPair:a})}isExpired(){return this.ephemeralKeyPair.isExpired()}signWithAuthenticator(e){let r=new f(this.sign(e)),t=new d(this.publicKey);return new y(t,r)}signTransactionWithAuthenticator(e){let r=new f(this.signTransaction(e)),t=new d(this.publicKey);return new y(t,r)}async waitForProofFetch(){this.proofOrPromise instanceof Promise&&await this.proofOrPromise}sign(e){let{expiryDateSecs:r}=this.ephemeralKeyPair;if(this.isExpired())throw new Error("EphemeralKeyPair is expired");if(this.proof===void 0)throw new Error("Proof not defined");let t=this.ephemeralKeyPair.getPublicKey(),i=this.ephemeralKeyPair.sign(e);return new F({jwtHeader:b(this.jwt.split(".")[0]),ephemeralCertificate:new A(this.proof,0),expiryDateSecs:r,ephemeralPublicKey:t,ephemeralSignature:i})}signTransaction(e){if(this.proof===void 0)throw new Error("Proof not found");let r=E(e),i=new m(r,this.proof.proof).hash();return this.sign(i)}verifySignature(e){throw new Error("Not implemented")}static fromBytes(e){return s.deserialize(new g(e))}static create(e){let{proof:r,jwt:t,ephemeralKeyPair:i,pepper:a,uidKey:n="sub",proofFetchCallback:h}=e,o=H(t),c=o.iss;if(typeof o.aud!="string")throw new Error("aud was not found or an array of values");let l=o.aud,p=o[n];return new s({proofOrFetcher:r,ephemeralKeyPair:i,iss:c,uidKey:n,uidVal:p,aud:l,pepper:a,jwt:t,proofFetchCallback:h})}};s.PEPPER_LENGTH=31;var T=s,m=class extends v{constructor(e,r){super();this.transaction=e,this.proof=r,this.domainSeparator="APTOS::TransactionAndProof"}serialize(e){e.serializeFixedBytes(this.transaction.bcsToBytes()),e.serializeOption(this.proof)}};export{ee as a,T as b,m as c};
|
|
2
|
+
//# sourceMappingURL=chunk-7FUZE7F4.mjs.map
|