@aptos-labs/ts-sdk 0.0.7 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -10
- package/dist/browser/index.d.ts +818 -446
- package/dist/browser/index.global.js +30 -30
- package/dist/browser/index.global.js.map +1 -1
- package/dist/common/index.d.ts +818 -446
- package/dist/common/index.js +29 -29
- package/dist/common/index.js.map +1 -1
- package/dist/esm/api/account.d.mts +72 -47
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.d.mts +19 -17
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +1 -0
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/aptosConfig.d.mts +2 -2
- package/dist/esm/api/aptosConfig.mjs +1 -1
- package/dist/esm/api/coin.d.mts +4 -3
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.d.mts +42 -19
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/event.d.mts +12 -14
- package/dist/esm/api/event.mjs +1 -1
- package/dist/esm/api/faucet.d.mts +4 -4
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.d.mts +71 -30
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.d.mts +12 -5
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +1 -0
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/staking.d.mts +13 -9
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/transaction.d.mts +36 -2
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.d.mts +1 -0
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.d.mts +1 -0
- package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
- package/dist/esm/api/transactionSubmission/simulate.d.mts +1 -0
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.d.mts +1 -0
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/transactionSubmission.d.mts +23 -1
- package/dist/esm/api/transactionSubmission.mjs +1 -1
- package/dist/esm/api/utils.d.mts +21 -0
- package/dist/esm/api/utils.mjs +2 -0
- package/dist/esm/bcs/deserializer.d.mts +4 -4
- package/dist/esm/bcs/deserializer.mjs +1 -1
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/bcs/serializer.d.mts +4 -4
- package/dist/esm/bcs/serializer.mjs +1 -1
- package/dist/esm/chunk-26GRNGPL.mjs +2 -0
- package/dist/esm/chunk-26GRNGPL.mjs.map +1 -0
- package/dist/esm/{chunk-72F5YXGC.mjs → chunk-2AMFCGJ3.mjs} +2 -2
- package/dist/esm/chunk-2AMFCGJ3.mjs.map +1 -0
- package/dist/esm/{chunk-ZUHN56GM.mjs → chunk-2X3FRUKX.mjs} +2 -2
- package/dist/esm/chunk-2X3FRUKX.mjs.map +1 -0
- package/dist/esm/chunk-32A35CPU.mjs +2 -0
- package/dist/esm/chunk-32A35CPU.mjs.map +1 -0
- package/dist/esm/{chunk-JZNLZMUC.mjs → chunk-3QS3MFWJ.mjs} +2 -2
- package/dist/esm/{chunk-ARVSIDVB.mjs → chunk-3RMXGSHK.mjs} +2 -2
- package/dist/esm/chunk-3RMXGSHK.mjs.map +1 -0
- package/dist/esm/chunk-4FDIPWVB.mjs +2 -0
- package/dist/esm/chunk-4FDIPWVB.mjs.map +1 -0
- package/dist/esm/{chunk-U25N2VWA.mjs → chunk-4K252UDE.mjs} +2 -2
- package/dist/esm/{chunk-3VZ3OZKC.mjs → chunk-4XQ5IV6C.mjs} +2 -2
- package/dist/esm/chunk-5HZKDT5C.mjs +2 -0
- package/dist/esm/chunk-5HZKDT5C.mjs.map +1 -0
- package/dist/esm/chunk-5IVRKK5V.mjs +2 -0
- package/dist/esm/chunk-5IVRKK5V.mjs.map +1 -0
- package/dist/esm/chunk-5SRMD5C6.mjs +2 -0
- package/dist/esm/chunk-5SRMD5C6.mjs.map +1 -0
- package/dist/esm/chunk-5X46HDCI.mjs +2 -0
- package/dist/esm/chunk-5X46HDCI.mjs.map +1 -0
- package/dist/esm/{chunk-HVADSXTB.mjs → chunk-6DYNAFAP.mjs} +2 -2
- package/dist/esm/chunk-6F4ACCCZ.mjs +2 -0
- package/dist/esm/chunk-6F4ACCCZ.mjs.map +1 -0
- package/dist/esm/{chunk-4ADA5BE7.mjs → chunk-7B3VSBCX.mjs} +2 -2
- package/dist/esm/chunk-7IY2Y73Q.mjs +2 -0
- package/dist/esm/chunk-7IY2Y73Q.mjs.map +1 -0
- package/dist/esm/chunk-7QJYTQSU.mjs +2 -0
- package/dist/esm/chunk-7QJYTQSU.mjs.map +1 -0
- package/dist/esm/chunk-ALFESCPU.mjs +2 -0
- package/dist/esm/chunk-ALFESCPU.mjs.map +1 -0
- package/dist/esm/chunk-BA4TDBYB.mjs +2 -0
- package/dist/esm/chunk-BA4TDBYB.mjs.map +1 -0
- package/dist/esm/chunk-BDTDWLGO.mjs +2 -0
- package/dist/esm/chunk-BDTDWLGO.mjs.map +1 -0
- package/dist/esm/{chunk-UDBH4CER.mjs → chunk-BQSE5HHW.mjs} +7 -7
- package/dist/esm/chunk-BQSE5HHW.mjs.map +1 -0
- package/dist/esm/chunk-C3Y52GHM.mjs +2 -0
- package/dist/esm/chunk-C3Y52GHM.mjs.map +1 -0
- package/dist/esm/chunk-CBAVJ5EN.mjs +2 -0
- package/dist/esm/chunk-CBAVJ5EN.mjs.map +1 -0
- package/dist/esm/chunk-DBJTMCAG.mjs +2 -0
- package/dist/esm/chunk-DBJTMCAG.mjs.map +1 -0
- package/dist/esm/chunk-DYJVDOBH.mjs +2 -0
- package/dist/esm/chunk-DYJVDOBH.mjs.map +1 -0
- package/dist/esm/chunk-EHJEK7FU.mjs +2 -0
- package/dist/esm/chunk-ELWWME6B.mjs +2 -0
- package/dist/esm/chunk-ELWWME6B.mjs.map +1 -0
- package/dist/esm/chunk-EOC4UI5B.mjs +2 -0
- package/dist/esm/{chunk-KC64ESLO.mjs.map → chunk-EOC4UI5B.mjs.map} +1 -1
- package/dist/esm/{chunk-BPYLPPEQ.mjs → chunk-F2GFSFPW.mjs} +2 -2
- package/dist/esm/{chunk-U6SZNNVL.mjs → chunk-F52GIFKT.mjs} +2 -2
- package/dist/esm/{chunk-U6SZNNVL.mjs.map → chunk-F52GIFKT.mjs.map} +1 -1
- package/dist/esm/{chunk-KQXRH5FK.mjs → chunk-FGTQT7Q5.mjs} +2 -2
- package/dist/esm/chunk-GMOHGD73.mjs +2 -0
- package/dist/esm/chunk-GMOHGD73.mjs.map +1 -0
- package/dist/esm/{chunk-HO7K2UAK.mjs → chunk-GQI3HWOB.mjs} +2 -2
- package/dist/esm/{chunk-UAAI3NCA.mjs → chunk-HQ4DGB7L.mjs} +2 -2
- package/dist/esm/chunk-IHYTP2EW.mjs +1 -0
- package/dist/esm/chunk-IHYTP2EW.mjs.map +1 -0
- package/dist/esm/{chunk-HA6JD5R6.mjs → chunk-IU5JZNH4.mjs} +2 -2
- package/dist/esm/{chunk-HA6JD5R6.mjs.map → chunk-IU5JZNH4.mjs.map} +1 -1
- package/dist/esm/{chunk-TPWSHFFI.mjs → chunk-KR5JAN32.mjs} +2 -2
- package/dist/esm/{chunk-QWVR4RCV.mjs → chunk-KVJ2KGMW.mjs} +2 -2
- package/dist/esm/chunk-LBNMY7EM.mjs +2 -0
- package/dist/esm/chunk-LBNMY7EM.mjs.map +1 -0
- package/dist/esm/chunk-MNFGMNYS.mjs +2 -0
- package/dist/esm/chunk-MNFGMNYS.mjs.map +1 -0
- package/dist/esm/{chunk-IBH7IOIM.mjs → chunk-N25GOEVL.mjs} +2 -2
- package/dist/esm/chunk-NBSXZKMQ.mjs +2 -0
- package/dist/esm/chunk-NBSXZKMQ.mjs.map +1 -0
- package/dist/esm/chunk-NFGAZSSK.mjs +2 -0
- package/dist/esm/{chunk-ND3ZQKTT.mjs.map → chunk-NFGAZSSK.mjs.map} +1 -1
- package/dist/esm/chunk-NL72WE3E.mjs +2 -0
- package/dist/esm/{chunk-TIH6ARYP.mjs.map → chunk-NL72WE3E.mjs.map} +1 -1
- package/dist/esm/{chunk-EWTHPMEE.mjs → chunk-NLONZHYT.mjs} +2 -2
- package/dist/esm/{chunk-44MGBJ73.mjs → chunk-NMFS5KAE.mjs} +2 -2
- package/dist/esm/{chunk-4KTQIWUP.mjs → chunk-NZ36UN4C.mjs} +2 -2
- package/dist/esm/{chunk-YYRDFZE6.mjs → chunk-OWP2MKTX.mjs} +2 -2
- package/dist/esm/{chunk-YYRDFZE6.mjs.map → chunk-OWP2MKTX.mjs.map} +1 -1
- package/dist/esm/{chunk-WL4OXZLN.mjs → chunk-OXO3Z2MF.mjs} +2 -2
- package/dist/esm/{chunk-S36IYY6K.mjs → chunk-PANYJULW.mjs} +2 -2
- package/dist/esm/{chunk-DRPMIJH7.mjs → chunk-PEBXSNMJ.mjs} +2 -2
- package/dist/esm/chunk-PLY7MQKE.mjs +2 -0
- package/dist/esm/chunk-PLY7MQKE.mjs.map +1 -0
- package/dist/esm/chunk-PRKZ2KJ4.mjs +2 -0
- package/dist/esm/{chunk-R3KWVOFG.mjs.map → chunk-PRKZ2KJ4.mjs.map} +1 -1
- package/dist/esm/{chunk-GAI75GOG.mjs → chunk-PZ5JKQSP.mjs} +2 -2
- package/dist/esm/chunk-Q3R3KKKP.mjs +2 -0
- package/dist/esm/chunk-Q3R3KKKP.mjs.map +1 -0
- package/dist/esm/chunk-RCYWJZR4.mjs +2 -0
- package/dist/esm/chunk-RCYWJZR4.mjs.map +1 -0
- package/dist/esm/chunk-TNUGIBLO.mjs +2 -0
- package/dist/esm/chunk-TNUGIBLO.mjs.map +1 -0
- package/dist/esm/{chunk-3732I6BR.mjs → chunk-TTICPGX6.mjs} +2 -2
- package/dist/esm/chunk-U6Z4FNB7.mjs +2 -0
- package/dist/esm/chunk-U6Z4FNB7.mjs.map +1 -0
- package/dist/esm/{chunk-GTC7WHMV.mjs → chunk-UDMADMVO.mjs} +1 -1
- package/dist/esm/{chunk-GTC7WHMV.mjs.map → chunk-UDMADMVO.mjs.map} +1 -1
- package/dist/esm/chunk-UES76WF2.mjs +2 -0
- package/dist/esm/chunk-UES76WF2.mjs.map +1 -0
- package/dist/esm/chunk-UIVJXLRM.mjs +1 -0
- package/dist/esm/chunk-UIVJXLRM.mjs.map +1 -0
- package/dist/esm/chunk-UR5E2UDO.mjs +2 -0
- package/dist/esm/chunk-UR5E2UDO.mjs.map +1 -0
- package/dist/esm/{chunk-X32O46IB.mjs → chunk-VMCFN5CT.mjs} +2 -2
- package/dist/esm/{chunk-5LO7FR2P.mjs → chunk-W44E6YAW.mjs} +2 -2
- package/dist/esm/chunk-W4JEP5GW.mjs +2 -0
- package/dist/esm/{chunk-FYIFBLHU.mjs.map → chunk-W4JEP5GW.mjs.map} +1 -1
- package/dist/esm/chunk-WXISFVRU.mjs +2 -0
- package/dist/esm/chunk-WXISFVRU.mjs.map +1 -0
- package/dist/esm/chunk-X7QBDRQR.mjs +2 -0
- package/dist/esm/chunk-X7QBDRQR.mjs.map +1 -0
- package/dist/esm/chunk-XKINEFAA.mjs +2 -0
- package/dist/esm/chunk-XKINEFAA.mjs.map +1 -0
- package/dist/esm/chunk-Y5RQOXZH.mjs +2 -0
- package/dist/esm/chunk-Y5RQOXZH.mjs.map +1 -0
- package/dist/esm/chunk-ZKFDLJ2F.mjs +2 -0
- package/dist/esm/chunk-ZKFDLJ2F.mjs.map +1 -0
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.d.mts +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/core/account.mjs +1 -1
- package/dist/esm/core/accountAddress.d.mts +9 -9
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/crypto/anyPublicKey.d.mts +5 -0
- package/dist/esm/core/crypto/anyPublicKey.mjs +1 -1
- package/dist/esm/core/crypto/anySignature.mjs +1 -1
- package/dist/esm/core/crypto/asymmetricCrypto.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.d.mts +3 -0
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/index.d.mts +2 -2
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.d.mts +2 -0
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.d.mts +3 -0
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/hex.mjs +1 -1
- package/dist/esm/core/index.d.mts +2 -2
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/index.d.mts +11 -8
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/account.d.mts +20 -33
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.d.mts +7 -10
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.d.mts +4 -3
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.d.mts +19 -20
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/event.d.mts +5 -12
- package/dist/esm/internal/event.mjs +1 -1
- package/dist/esm/internal/faucet.d.mts +5 -5
- package/dist/esm/internal/faucet.mjs +1 -1
- package/dist/esm/internal/fungibleAsset.d.mts +39 -14
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.d.mts +9 -5
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/staking.d.mts +5 -7
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/transaction.d.mts +12 -4
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.d.mts +24 -5
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/transactions/authenticator/account.d.mts +5 -0
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.d.mts +1 -0
- package/dist/esm/transactions/authenticator/index.mjs +1 -1
- package/dist/esm/transactions/authenticator/transaction.d.mts +1 -0
- package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
- package/dist/esm/transactions/index.d.mts +4 -3
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/instances/chainId.mjs +1 -1
- package/dist/esm/transactions/instances/identifier.mjs +1 -1
- package/dist/esm/transactions/instances/index.d.mts +1 -0
- package/dist/esm/transactions/instances/index.mjs +1 -1
- package/dist/esm/transactions/instances/moduleId.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.d.mts +1 -0
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.d.mts +89 -0
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +2 -0
- package/dist/esm/transactions/management/accountSequenceNumber.mjs.map +1 -0
- package/dist/esm/transactions/management/asyncQueue.d.mts +58 -0
- package/dist/esm/transactions/management/asyncQueue.mjs +2 -0
- package/dist/esm/transactions/management/asyncQueue.mjs.map +1 -0
- package/dist/esm/transactions/management/index.d.mts +36 -0
- package/dist/esm/transactions/management/index.mjs +2 -0
- package/dist/esm/transactions/management/index.mjs.map +1 -0
- package/dist/esm/transactions/management/transactionWorker.d.mts +135 -0
- package/dist/esm/transactions/management/transactionWorker.mjs +2 -0
- package/dist/esm/transactions/management/transactionWorker.mjs.map +1 -0
- package/dist/esm/transactions/transactionBuilder/helpers.d.mts +3 -1
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.d.mts +4 -3
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +3 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +3 -2
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
- package/dist/esm/transactions/typeTag/index.mjs +1 -1
- package/dist/esm/transactions/typeTag/parser.mjs +1 -1
- package/dist/esm/transactions/types.d.mts +3 -2
- package/dist/esm/types/generated/operations.d.mts +3 -3
- package/dist/esm/types/generated/queries.d.mts +3 -3
- package/dist/esm/types/generated/queries.mjs +1 -1
- package/dist/esm/types/index.d.mts +27 -9
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/utils/const.d.mts +18 -1
- package/dist/esm/utils/const.mjs +1 -1
- package/dist/esm/utils/index.d.mts +1 -1
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/src/api/account.ts +150 -53
- package/src/api/ans.ts +19 -22
- package/src/api/aptosConfig.ts +2 -2
- package/src/api/coin.ts +2 -6
- package/src/api/digitalAsset.ts +98 -23
- package/src/api/event.ts +28 -17
- package/src/api/faucet.ts +12 -9
- package/src/api/fungibleAsset.ts +76 -35
- package/src/api/general.ts +19 -3
- package/src/api/staking.ts +30 -11
- package/src/api/transaction.ts +16 -1
- package/src/api/transactionSubmission.ts +43 -1
- package/src/api/utils.ts +37 -0
- package/src/bcs/deserializer.ts +4 -4
- package/src/bcs/serializer.ts +4 -4
- package/src/client/core.ts +6 -4
- package/src/client/get.ts +7 -6
- package/src/core/accountAddress.ts +20 -22
- package/src/core/crypto/anyPublicKey.ts +12 -0
- package/src/core/crypto/ed25519.ts +13 -0
- package/src/core/crypto/index.ts +2 -0
- package/src/core/crypto/secp256k1.ts +12 -0
- package/src/core/hex.ts +5 -7
- package/src/index.ts +1 -0
- package/src/internal/account.ts +56 -50
- package/src/internal/ans.ts +52 -39
- package/src/internal/coin.ts +4 -6
- package/src/internal/digitalAsset.ts +36 -22
- package/src/internal/event.ts +7 -14
- package/src/internal/faucet.ts +10 -6
- package/src/internal/fungibleAsset.ts +36 -18
- package/src/internal/general.ts +30 -3
- package/src/internal/queries/getNumberOfDelegatorsQuery.graphql +5 -5
- package/src/internal/queries/getProcessorStatus.graphql +2 -2
- package/src/internal/staking.ts +12 -14
- package/src/internal/transaction.ts +23 -26
- package/src/internal/transactionSubmission.ts +35 -5
- package/src/transactions/authenticator/account.ts +16 -0
- package/src/transactions/instances/moduleId.ts +1 -1
- package/src/transactions/management/accountSequenceNumber.ts +186 -0
- package/src/transactions/management/asyncQueue.ts +107 -0
- package/src/transactions/management/index.ts +2 -0
- package/src/transactions/management/transactionWorker.ts +275 -0
- package/src/transactions/transactionBuilder/helpers.ts +28 -1
- package/src/transactions/transactionBuilder/remoteAbi.ts +47 -32
- package/src/transactions/transactionBuilder/transactionBuilder.ts +28 -26
- package/src/transactions/typeTag/index.ts +1 -0
- package/src/transactions/typeTag/parser.ts +1 -1
- package/src/transactions/types.ts +2 -2
- package/src/types/generated/operations.ts +4 -2
- package/src/types/generated/queries.ts +4 -4
- package/src/types/index.ts +67 -11
- package/src/utils/const.ts +18 -0
- package/src/version.ts +1 -1
- package/dist/esm/chunk-2OZRBXLM.mjs +0 -2
- package/dist/esm/chunk-2OZRBXLM.mjs.map +0 -1
- package/dist/esm/chunk-33T7WTB6.mjs +0 -2
- package/dist/esm/chunk-33T7WTB6.mjs.map +0 -1
- package/dist/esm/chunk-62SCW5NH.mjs +0 -2
- package/dist/esm/chunk-62SCW5NH.mjs.map +0 -1
- package/dist/esm/chunk-67OGU66P.mjs +0 -2
- package/dist/esm/chunk-67OGU66P.mjs.map +0 -1
- package/dist/esm/chunk-72F5YXGC.mjs.map +0 -1
- package/dist/esm/chunk-ARVSIDVB.mjs.map +0 -1
- package/dist/esm/chunk-BFQRMCY2.mjs +0 -2
- package/dist/esm/chunk-BFQRMCY2.mjs.map +0 -1
- package/dist/esm/chunk-BM4HBROC.mjs +0 -2
- package/dist/esm/chunk-BM4HBROC.mjs.map +0 -1
- package/dist/esm/chunk-BV4OOU5Y.mjs +0 -2
- package/dist/esm/chunk-BV4OOU5Y.mjs.map +0 -1
- package/dist/esm/chunk-EFIYW4WK.mjs +0 -2
- package/dist/esm/chunk-FYIFBLHU.mjs +0 -2
- package/dist/esm/chunk-GU4OUKAF.mjs +0 -2
- package/dist/esm/chunk-GU4OUKAF.mjs.map +0 -1
- package/dist/esm/chunk-J5BH7V37.mjs +0 -2
- package/dist/esm/chunk-J5BH7V37.mjs.map +0 -1
- package/dist/esm/chunk-KC64ESLO.mjs +0 -2
- package/dist/esm/chunk-L7AA75WZ.mjs +0 -2
- package/dist/esm/chunk-L7AA75WZ.mjs.map +0 -1
- package/dist/esm/chunk-LACQ537H.mjs +0 -2
- package/dist/esm/chunk-LACQ537H.mjs.map +0 -1
- package/dist/esm/chunk-LDAD54H5.mjs +0 -2
- package/dist/esm/chunk-LDAD54H5.mjs.map +0 -1
- package/dist/esm/chunk-LXW3A3MJ.mjs +0 -2
- package/dist/esm/chunk-LXW3A3MJ.mjs.map +0 -1
- package/dist/esm/chunk-M2V2POWK.mjs +0 -2
- package/dist/esm/chunk-M2V2POWK.mjs.map +0 -1
- package/dist/esm/chunk-ND3ZQKTT.mjs +0 -2
- package/dist/esm/chunk-NZIJV4O2.mjs +0 -2
- package/dist/esm/chunk-NZIJV4O2.mjs.map +0 -1
- package/dist/esm/chunk-O2B54NZT.mjs +0 -2
- package/dist/esm/chunk-O2B54NZT.mjs.map +0 -1
- package/dist/esm/chunk-OCW2L33Q.mjs +0 -2
- package/dist/esm/chunk-OCW2L33Q.mjs.map +0 -1
- package/dist/esm/chunk-OCYS4V2V.mjs +0 -2
- package/dist/esm/chunk-OCYS4V2V.mjs.map +0 -1
- package/dist/esm/chunk-OSTH5JRX.mjs +0 -2
- package/dist/esm/chunk-OSTH5JRX.mjs.map +0 -1
- package/dist/esm/chunk-OVHY6ZUJ.mjs +0 -2
- package/dist/esm/chunk-OVHY6ZUJ.mjs.map +0 -1
- package/dist/esm/chunk-PZCMSHY6.mjs +0 -2
- package/dist/esm/chunk-PZCMSHY6.mjs.map +0 -1
- package/dist/esm/chunk-R3KWVOFG.mjs +0 -2
- package/dist/esm/chunk-RHS5ROLP.mjs +0 -2
- package/dist/esm/chunk-RHS5ROLP.mjs.map +0 -1
- package/dist/esm/chunk-RKKU2SY5.mjs +0 -2
- package/dist/esm/chunk-RKKU2SY5.mjs.map +0 -1
- package/dist/esm/chunk-RYETO74W.mjs +0 -2
- package/dist/esm/chunk-RYETO74W.mjs.map +0 -1
- package/dist/esm/chunk-TCTZCPQ6.mjs +0 -1
- package/dist/esm/chunk-TGKB6ALT.mjs +0 -2
- package/dist/esm/chunk-TGKB6ALT.mjs.map +0 -1
- package/dist/esm/chunk-TIH6ARYP.mjs +0 -2
- package/dist/esm/chunk-UDBH4CER.mjs.map +0 -1
- package/dist/esm/chunk-VWVEDCBM.mjs +0 -2
- package/dist/esm/chunk-VWVEDCBM.mjs.map +0 -1
- package/dist/esm/chunk-WEJAI26R.mjs +0 -2
- package/dist/esm/chunk-WEJAI26R.mjs.map +0 -1
- package/dist/esm/chunk-Y2HRRUZ6.mjs +0 -2
- package/dist/esm/chunk-Y2HRRUZ6.mjs.map +0 -1
- package/dist/esm/chunk-Y7VR7X5W.mjs +0 -2
- package/dist/esm/chunk-Y7VR7X5W.mjs.map +0 -1
- package/dist/esm/chunk-ZLW65YCO.mjs +0 -2
- package/dist/esm/chunk-ZLW65YCO.mjs.map +0 -1
- package/dist/esm/chunk-ZUHN56GM.mjs.map +0 -1
- /package/dist/esm/{chunk-TCTZCPQ6.mjs.map → api/utils.mjs.map} +0 -0
- /package/dist/esm/{chunk-JZNLZMUC.mjs.map → chunk-3QS3MFWJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-U25N2VWA.mjs.map → chunk-4K252UDE.mjs.map} +0 -0
- /package/dist/esm/{chunk-3VZ3OZKC.mjs.map → chunk-4XQ5IV6C.mjs.map} +0 -0
- /package/dist/esm/{chunk-HVADSXTB.mjs.map → chunk-6DYNAFAP.mjs.map} +0 -0
- /package/dist/esm/{chunk-4ADA5BE7.mjs.map → chunk-7B3VSBCX.mjs.map} +0 -0
- /package/dist/esm/{chunk-EFIYW4WK.mjs.map → chunk-EHJEK7FU.mjs.map} +0 -0
- /package/dist/esm/{chunk-BPYLPPEQ.mjs.map → chunk-F2GFSFPW.mjs.map} +0 -0
- /package/dist/esm/{chunk-KQXRH5FK.mjs.map → chunk-FGTQT7Q5.mjs.map} +0 -0
- /package/dist/esm/{chunk-HO7K2UAK.mjs.map → chunk-GQI3HWOB.mjs.map} +0 -0
- /package/dist/esm/{chunk-UAAI3NCA.mjs.map → chunk-HQ4DGB7L.mjs.map} +0 -0
- /package/dist/esm/{chunk-TPWSHFFI.mjs.map → chunk-KR5JAN32.mjs.map} +0 -0
- /package/dist/esm/{chunk-QWVR4RCV.mjs.map → chunk-KVJ2KGMW.mjs.map} +0 -0
- /package/dist/esm/{chunk-IBH7IOIM.mjs.map → chunk-N25GOEVL.mjs.map} +0 -0
- /package/dist/esm/{chunk-EWTHPMEE.mjs.map → chunk-NLONZHYT.mjs.map} +0 -0
- /package/dist/esm/{chunk-44MGBJ73.mjs.map → chunk-NMFS5KAE.mjs.map} +0 -0
- /package/dist/esm/{chunk-4KTQIWUP.mjs.map → chunk-NZ36UN4C.mjs.map} +0 -0
- /package/dist/esm/{chunk-WL4OXZLN.mjs.map → chunk-OXO3Z2MF.mjs.map} +0 -0
- /package/dist/esm/{chunk-S36IYY6K.mjs.map → chunk-PANYJULW.mjs.map} +0 -0
- /package/dist/esm/{chunk-DRPMIJH7.mjs.map → chunk-PEBXSNMJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-GAI75GOG.mjs.map → chunk-PZ5JKQSP.mjs.map} +0 -0
- /package/dist/esm/{chunk-3732I6BR.mjs.map → chunk-TTICPGX6.mjs.map} +0 -0
- /package/dist/esm/{chunk-X32O46IB.mjs.map → chunk-VMCFN5CT.mjs.map} +0 -0
- /package/dist/esm/{chunk-5LO7FR2P.mjs.map → chunk-W44E6YAW.mjs.map} +0 -0
|
@@ -1,10 +1,34 @@
|
|
|
1
1
|
import { AptosConfig } from './aptosConfig.mjs';
|
|
2
|
-
import { PaginationArgs, TransactionResponse, AnyNumber, HexInput, WaitForTransactionOptions, GasEstimation } from '../types/index.mjs';
|
|
2
|
+
import { PaginationArgs, TransactionResponse, AnyNumber, HexInput, WaitForTransactionOptions, CommittedTransactionResponse, GasEstimation } from '../types/index.mjs';
|
|
3
|
+
import { AnyRawTransaction } from '../transactions/types.mjs';
|
|
3
4
|
import '../utils/apiEndpoints.mjs';
|
|
4
5
|
import '../utils/const.mjs';
|
|
5
6
|
import '../types/indexer.mjs';
|
|
6
7
|
import '../types/generated/operations.mjs';
|
|
7
8
|
import '../types/generated/types.mjs';
|
|
9
|
+
import '../bcs/serializable/moveStructs.mjs';
|
|
10
|
+
import '../bcs/serializable/movePrimitives.mjs';
|
|
11
|
+
import '../bcs/deserializer.mjs';
|
|
12
|
+
import '../bcs/serializer.mjs';
|
|
13
|
+
import '../core/hex.mjs';
|
|
14
|
+
import '../core/common.mjs';
|
|
15
|
+
import '../transactions/instances/transactionArgument.mjs';
|
|
16
|
+
import '../bcs/serializable/fixedBytes.mjs';
|
|
17
|
+
import '../core/accountAddress.mjs';
|
|
18
|
+
import '../core/crypto/asymmetricCrypto.mjs';
|
|
19
|
+
import '../transactions/instances/rawTransaction.mjs';
|
|
20
|
+
import '../transactions/instances/chainId.mjs';
|
|
21
|
+
import '../transactions/instances/transactionPayload.mjs';
|
|
22
|
+
import '../transactions/instances/identifier.mjs';
|
|
23
|
+
import '../transactions/instances/moduleId.mjs';
|
|
24
|
+
import '../transactions/typeTag/index.mjs';
|
|
25
|
+
import '../transactions/authenticator/account.mjs';
|
|
26
|
+
import '../core/crypto/anyPublicKey.mjs';
|
|
27
|
+
import '../core/crypto/anySignature.mjs';
|
|
28
|
+
import '../core/crypto/ed25519.mjs';
|
|
29
|
+
import '../core/crypto/secp256k1.mjs';
|
|
30
|
+
import '../core/crypto/multiEd25519.mjs';
|
|
31
|
+
import '../core/crypto/multiKey.mjs';
|
|
8
32
|
|
|
9
33
|
declare class Transaction {
|
|
10
34
|
readonly config: AptosConfig;
|
|
@@ -79,7 +103,7 @@ declare class Transaction {
|
|
|
79
103
|
waitForTransaction(args: {
|
|
80
104
|
transactionHash: HexInput;
|
|
81
105
|
options?: WaitForTransactionOptions;
|
|
82
|
-
}): Promise<
|
|
106
|
+
}): Promise<CommittedTransactionResponse>;
|
|
83
107
|
/**
|
|
84
108
|
* Gives an estimate of the gas unit price required to get a
|
|
85
109
|
* transaction on chain in a reasonable amount of time.
|
|
@@ -96,6 +120,16 @@ declare class Transaction {
|
|
|
96
120
|
* ```
|
|
97
121
|
*/
|
|
98
122
|
getGasPriceEstimation(): Promise<GasEstimation>;
|
|
123
|
+
/**
|
|
124
|
+
* Returns a signing message for a transaction.
|
|
125
|
+
*
|
|
126
|
+
* This allows a user to sign a transaction using their own preferred signing method, and
|
|
127
|
+
* then submit it to the network.
|
|
128
|
+
* @param args.transaction A raw transaction for signing elsewhere
|
|
129
|
+
*/
|
|
130
|
+
getSigningMessage(args: {
|
|
131
|
+
transaction: AnyRawTransaction;
|
|
132
|
+
}): Uint8Array;
|
|
99
133
|
}
|
|
100
134
|
|
|
101
135
|
export { Transaction };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-WXISFVRU.mjs";import"../chunk-7IY2Y73Q.mjs";import"../chunk-MNFGMNYS.mjs";import"../chunk-4FDIPWVB.mjs";import"../chunk-F52GIFKT.mjs";import"../chunk-7QJYTQSU.mjs";import"../chunk-HTZTTZQJ.mjs";import"../chunk-HQ4DGB7L.mjs";import"../chunk-OXO3Z2MF.mjs";import"../chunk-3QS3MFWJ.mjs";import"../chunk-PANYJULW.mjs";import"../chunk-C3Y52GHM.mjs";import"../chunk-FGTQT7Q5.mjs";import"../chunk-PRKZ2KJ4.mjs";import"../chunk-NLONZHYT.mjs";import"../chunk-UYVPNUH3.mjs";import"../chunk-GQI3HWOB.mjs";import"../chunk-6F4ACCCZ.mjs";import"../chunk-Y5RQOXZH.mjs";import"../chunk-X7QBDRQR.mjs";import"../chunk-3JPVQHOR.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-E7FWVXGX.mjs";import"../chunk-UIVJXLRM.mjs";import"../chunk-KVJ2KGMW.mjs";import"../chunk-PZ5JKQSP.mjs";import"../chunk-N25GOEVL.mjs";import"../chunk-4K252UDE.mjs";import"../chunk-NMFS5KAE.mjs";import"../chunk-OWP2MKTX.mjs";import"../chunk-RCYWJZR4.mjs";import"../chunk-5HZKDT5C.mjs";import"../chunk-LR65XHSF.mjs";import"../chunk-EHJEK7FU.mjs";import"../chunk-UR5E2UDO.mjs";import"../chunk-5IVRKK5V.mjs";import"../chunk-BQSE5HHW.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-6DYNAFAP.mjs";import"../chunk-F2GFSFPW.mjs";import"../chunk-7B3VSBCX.mjs";import"../chunk-VMCFN5CT.mjs";import"../chunk-UDMADMVO.mjs";import"../chunk-IU5JZNH4.mjs";import"../chunk-NL72WE3E.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-NFGAZSSK.mjs";import"../chunk-KR5JAN32.mjs";import"../chunk-EOC4UI5B.mjs";import"../chunk-LV33NV4J.mjs";import"../chunk-5X46HDCI.mjs";import"../chunk-ALFESCPU.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-W4JEP5GW.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-DNDWTM7A.mjs";import"../chunk-ZWH2ESXT.mjs";export{a as Transaction};
|
|
2
2
|
//# sourceMappingURL=transaction.mjs.map
|
|
@@ -25,6 +25,7 @@ import '../../transactions/authenticator/account.mjs';
|
|
|
25
25
|
import '../../core/crypto/anyPublicKey.mjs';
|
|
26
26
|
import '../../core/crypto/anySignature.mjs';
|
|
27
27
|
import '../../core/crypto/ed25519.mjs';
|
|
28
|
+
import '../../core/crypto/secp256k1.mjs';
|
|
28
29
|
import '../../core/crypto/multiEd25519.mjs';
|
|
29
30
|
import '../../core/crypto/multiKey.mjs';
|
|
30
31
|
import '../../utils/const.mjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-W44E6YAW.mjs";import"../../chunk-7IY2Y73Q.mjs";import"../../chunk-MNFGMNYS.mjs";import"../../chunk-4FDIPWVB.mjs";import"../../chunk-F52GIFKT.mjs";import"../../chunk-7QJYTQSU.mjs";import"../../chunk-HTZTTZQJ.mjs";import"../../chunk-HQ4DGB7L.mjs";import"../../chunk-OXO3Z2MF.mjs";import"../../chunk-3QS3MFWJ.mjs";import"../../chunk-PANYJULW.mjs";import"../../chunk-C3Y52GHM.mjs";import"../../chunk-FGTQT7Q5.mjs";import"../../chunk-PRKZ2KJ4.mjs";import"../../chunk-NLONZHYT.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-GQI3HWOB.mjs";import"../../chunk-6F4ACCCZ.mjs";import"../../chunk-Y5RQOXZH.mjs";import"../../chunk-X7QBDRQR.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-UIVJXLRM.mjs";import"../../chunk-KVJ2KGMW.mjs";import"../../chunk-PZ5JKQSP.mjs";import"../../chunk-N25GOEVL.mjs";import"../../chunk-4K252UDE.mjs";import"../../chunk-NMFS5KAE.mjs";import"../../chunk-OWP2MKTX.mjs";import"../../chunk-RCYWJZR4.mjs";import"../../chunk-5HZKDT5C.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-EHJEK7FU.mjs";import"../../chunk-UR5E2UDO.mjs";import"../../chunk-5IVRKK5V.mjs";import"../../chunk-BQSE5HHW.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-6DYNAFAP.mjs";import"../../chunk-F2GFSFPW.mjs";import"../../chunk-7B3VSBCX.mjs";import"../../chunk-VMCFN5CT.mjs";import"../../chunk-UDMADMVO.mjs";import"../../chunk-IU5JZNH4.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-NFGAZSSK.mjs";import"../../chunk-KR5JAN32.mjs";import"../../chunk-EOC4UI5B.mjs";import"../../chunk-LV33NV4J.mjs";import"../../chunk-5X46HDCI.mjs";import"../../chunk-ALFESCPU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-W4JEP5GW.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-DNDWTM7A.mjs";import"../../chunk-ZWH2ESXT.mjs";export{a as Build};
|
|
2
2
|
//# sourceMappingURL=build.mjs.map
|
|
@@ -18,6 +18,7 @@ import '../../core/crypto/asymmetricCrypto.mjs';
|
|
|
18
18
|
import '../../core/crypto/anyPublicKey.mjs';
|
|
19
19
|
import '../../core/crypto/anySignature.mjs';
|
|
20
20
|
import '../../core/crypto/ed25519.mjs';
|
|
21
|
+
import '../../core/crypto/secp256k1.mjs';
|
|
21
22
|
import '../../core/crypto/multiEd25519.mjs';
|
|
22
23
|
import '../../core/crypto/multiKey.mjs';
|
|
23
24
|
import '../../bcs/serializable/moveStructs.mjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-4XQ5IV6C.mjs";import"../../chunk-7IY2Y73Q.mjs";import"../../chunk-MNFGMNYS.mjs";import"../../chunk-4FDIPWVB.mjs";import"../../chunk-F52GIFKT.mjs";import"../../chunk-7QJYTQSU.mjs";import"../../chunk-HTZTTZQJ.mjs";import"../../chunk-HQ4DGB7L.mjs";import"../../chunk-OXO3Z2MF.mjs";import"../../chunk-3QS3MFWJ.mjs";import"../../chunk-PANYJULW.mjs";import"../../chunk-C3Y52GHM.mjs";import"../../chunk-FGTQT7Q5.mjs";import"../../chunk-PRKZ2KJ4.mjs";import"../../chunk-NLONZHYT.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-GQI3HWOB.mjs";import"../../chunk-6F4ACCCZ.mjs";import"../../chunk-Y5RQOXZH.mjs";import"../../chunk-X7QBDRQR.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-UIVJXLRM.mjs";import"../../chunk-KVJ2KGMW.mjs";import"../../chunk-PZ5JKQSP.mjs";import"../../chunk-N25GOEVL.mjs";import"../../chunk-4K252UDE.mjs";import"../../chunk-NMFS5KAE.mjs";import"../../chunk-OWP2MKTX.mjs";import"../../chunk-RCYWJZR4.mjs";import"../../chunk-5HZKDT5C.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-EHJEK7FU.mjs";import"../../chunk-UR5E2UDO.mjs";import"../../chunk-5IVRKK5V.mjs";import"../../chunk-BQSE5HHW.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-6DYNAFAP.mjs";import"../../chunk-F2GFSFPW.mjs";import"../../chunk-7B3VSBCX.mjs";import"../../chunk-VMCFN5CT.mjs";import"../../chunk-UDMADMVO.mjs";import"../../chunk-IU5JZNH4.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-NFGAZSSK.mjs";import"../../chunk-KR5JAN32.mjs";import"../../chunk-EOC4UI5B.mjs";import"../../chunk-LV33NV4J.mjs";import"../../chunk-5X46HDCI.mjs";import"../../chunk-ALFESCPU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-W4JEP5GW.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-DNDWTM7A.mjs";import"../../chunk-ZWH2ESXT.mjs";export{a as Sign};
|
|
2
2
|
//# sourceMappingURL=sign.mjs.map
|
|
@@ -25,6 +25,7 @@ import '../../transactions/authenticator/account.mjs';
|
|
|
25
25
|
import '../../core/crypto/anyPublicKey.mjs';
|
|
26
26
|
import '../../core/crypto/anySignature.mjs';
|
|
27
27
|
import '../../core/crypto/ed25519.mjs';
|
|
28
|
+
import '../../core/crypto/secp256k1.mjs';
|
|
28
29
|
import '../../core/crypto/multiEd25519.mjs';
|
|
29
30
|
import '../../core/crypto/multiKey.mjs';
|
|
30
31
|
import '../../utils/const.mjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-PEBXSNMJ.mjs";import"../../chunk-7IY2Y73Q.mjs";import"../../chunk-MNFGMNYS.mjs";import"../../chunk-4FDIPWVB.mjs";import"../../chunk-F52GIFKT.mjs";import"../../chunk-7QJYTQSU.mjs";import"../../chunk-HTZTTZQJ.mjs";import"../../chunk-HQ4DGB7L.mjs";import"../../chunk-OXO3Z2MF.mjs";import"../../chunk-3QS3MFWJ.mjs";import"../../chunk-PANYJULW.mjs";import"../../chunk-C3Y52GHM.mjs";import"../../chunk-FGTQT7Q5.mjs";import"../../chunk-PRKZ2KJ4.mjs";import"../../chunk-NLONZHYT.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-GQI3HWOB.mjs";import"../../chunk-6F4ACCCZ.mjs";import"../../chunk-Y5RQOXZH.mjs";import"../../chunk-X7QBDRQR.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-UIVJXLRM.mjs";import"../../chunk-KVJ2KGMW.mjs";import"../../chunk-PZ5JKQSP.mjs";import"../../chunk-N25GOEVL.mjs";import"../../chunk-4K252UDE.mjs";import"../../chunk-NMFS5KAE.mjs";import"../../chunk-OWP2MKTX.mjs";import"../../chunk-RCYWJZR4.mjs";import"../../chunk-5HZKDT5C.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-EHJEK7FU.mjs";import"../../chunk-UR5E2UDO.mjs";import"../../chunk-5IVRKK5V.mjs";import"../../chunk-BQSE5HHW.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-6DYNAFAP.mjs";import"../../chunk-F2GFSFPW.mjs";import"../../chunk-7B3VSBCX.mjs";import"../../chunk-VMCFN5CT.mjs";import"../../chunk-UDMADMVO.mjs";import"../../chunk-IU5JZNH4.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-NFGAZSSK.mjs";import"../../chunk-KR5JAN32.mjs";import"../../chunk-EOC4UI5B.mjs";import"../../chunk-LV33NV4J.mjs";import"../../chunk-5X46HDCI.mjs";import"../../chunk-ALFESCPU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-W4JEP5GW.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-DNDWTM7A.mjs";import"../../chunk-ZWH2ESXT.mjs";export{a as Simulate};
|
|
2
2
|
//# sourceMappingURL=simulate.mjs.map
|
|
@@ -14,6 +14,7 @@ import '../../core/crypto/anyPublicKey.mjs';
|
|
|
14
14
|
import '../../core/crypto/anySignature.mjs';
|
|
15
15
|
import '../../core/crypto/asymmetricCrypto.mjs';
|
|
16
16
|
import '../../core/crypto/ed25519.mjs';
|
|
17
|
+
import '../../core/crypto/secp256k1.mjs';
|
|
17
18
|
import '../../core/crypto/multiEd25519.mjs';
|
|
18
19
|
import '../../core/crypto/multiKey.mjs';
|
|
19
20
|
import '../../bcs/serializable/moveStructs.mjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-NZ36UN4C.mjs";import"../../chunk-7IY2Y73Q.mjs";import"../../chunk-MNFGMNYS.mjs";import"../../chunk-4FDIPWVB.mjs";import"../../chunk-F52GIFKT.mjs";import"../../chunk-7QJYTQSU.mjs";import"../../chunk-HTZTTZQJ.mjs";import"../../chunk-HQ4DGB7L.mjs";import"../../chunk-OXO3Z2MF.mjs";import"../../chunk-3QS3MFWJ.mjs";import"../../chunk-PANYJULW.mjs";import"../../chunk-C3Y52GHM.mjs";import"../../chunk-FGTQT7Q5.mjs";import"../../chunk-PRKZ2KJ4.mjs";import"../../chunk-NLONZHYT.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-GQI3HWOB.mjs";import"../../chunk-6F4ACCCZ.mjs";import"../../chunk-Y5RQOXZH.mjs";import"../../chunk-X7QBDRQR.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-UIVJXLRM.mjs";import"../../chunk-KVJ2KGMW.mjs";import"../../chunk-PZ5JKQSP.mjs";import"../../chunk-N25GOEVL.mjs";import"../../chunk-4K252UDE.mjs";import"../../chunk-NMFS5KAE.mjs";import"../../chunk-OWP2MKTX.mjs";import"../../chunk-RCYWJZR4.mjs";import"../../chunk-5HZKDT5C.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-EHJEK7FU.mjs";import"../../chunk-UR5E2UDO.mjs";import"../../chunk-5IVRKK5V.mjs";import"../../chunk-BQSE5HHW.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-6DYNAFAP.mjs";import"../../chunk-F2GFSFPW.mjs";import"../../chunk-7B3VSBCX.mjs";import"../../chunk-VMCFN5CT.mjs";import"../../chunk-UDMADMVO.mjs";import"../../chunk-IU5JZNH4.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-NFGAZSSK.mjs";import"../../chunk-KR5JAN32.mjs";import"../../chunk-EOC4UI5B.mjs";import"../../chunk-LV33NV4J.mjs";import"../../chunk-5X46HDCI.mjs";import"../../chunk-ALFESCPU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-W4JEP5GW.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-DNDWTM7A.mjs";import"../../chunk-ZWH2ESXT.mjs";export{a as Submit};
|
|
2
2
|
//# sourceMappingURL=submit.mjs.map
|
|
@@ -3,7 +3,7 @@ import { Account } from '../core/account.mjs';
|
|
|
3
3
|
import { AccountAddressInput } from '../core/accountAddress.mjs';
|
|
4
4
|
import { PrivateKey } from '../core/crypto/asymmetricCrypto.mjs';
|
|
5
5
|
import { PendingTransactionResponse, HexInput, TransactionResponse } from '../types/index.mjs';
|
|
6
|
-
import {
|
|
6
|
+
import { InputGenerateTransactionPayloadData, InputGenerateTransactionOptions, AnyRawTransaction, SingleSignerTransaction } from '../transactions/types.mjs';
|
|
7
7
|
import '../utils/apiEndpoints.mjs';
|
|
8
8
|
import '../utils/const.mjs';
|
|
9
9
|
import '../core/authenticationKey.mjs';
|
|
@@ -28,12 +28,34 @@ import '../transactions/authenticator/account.mjs';
|
|
|
28
28
|
import '../core/crypto/anyPublicKey.mjs';
|
|
29
29
|
import '../core/crypto/anySignature.mjs';
|
|
30
30
|
import '../core/crypto/ed25519.mjs';
|
|
31
|
+
import '../core/crypto/secp256k1.mjs';
|
|
31
32
|
import '../core/crypto/multiEd25519.mjs';
|
|
32
33
|
import '../core/crypto/multiKey.mjs';
|
|
33
34
|
|
|
34
35
|
declare class TransactionSubmission {
|
|
35
36
|
readonly config: AptosConfig;
|
|
36
37
|
constructor(config: AptosConfig);
|
|
38
|
+
/**
|
|
39
|
+
* Batch transactions for a single account.
|
|
40
|
+
*
|
|
41
|
+
* This function uses a transaction worker that receives payloads to be processed
|
|
42
|
+
* and submitted to chain.
|
|
43
|
+
* Note that this process is best for submitting multiple transactions that
|
|
44
|
+
* dont rely on each other, i.e batch funds, batch token mints, etc.
|
|
45
|
+
*
|
|
46
|
+
* If any worker failure, the functions throws an error.
|
|
47
|
+
*
|
|
48
|
+
* @param args.sender The sender account to sign and submit the transaction
|
|
49
|
+
* @param args.data An array of transaction payloads
|
|
50
|
+
* @param args.options optional. Transaction generation configurations (excluding accountSequenceNumber)
|
|
51
|
+
*
|
|
52
|
+
* @return void. Throws if any error
|
|
53
|
+
*/
|
|
54
|
+
batchTransactionsForSingleAccount(args: {
|
|
55
|
+
sender: Account;
|
|
56
|
+
data: InputGenerateTransactionPayloadData[];
|
|
57
|
+
options?: Omit<InputGenerateTransactionOptions, "accountSequenceNumber">;
|
|
58
|
+
}): Promise<void>;
|
|
37
59
|
/**
|
|
38
60
|
* Sign and submit a single signer transaction to chain
|
|
39
61
|
*
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-NBSXZKMQ.mjs";import"../chunk-IHYTP2EW.mjs";import"../chunk-DYJVDOBH.mjs";import"../chunk-BDTDWLGO.mjs";import"../chunk-U6Z4FNB7.mjs";import"../chunk-7IY2Y73Q.mjs";import"../chunk-MNFGMNYS.mjs";import"../chunk-4FDIPWVB.mjs";import"../chunk-F52GIFKT.mjs";import"../chunk-7QJYTQSU.mjs";import"../chunk-HTZTTZQJ.mjs";import"../chunk-HQ4DGB7L.mjs";import"../chunk-OXO3Z2MF.mjs";import"../chunk-3QS3MFWJ.mjs";import"../chunk-PANYJULW.mjs";import"../chunk-C3Y52GHM.mjs";import"../chunk-FGTQT7Q5.mjs";import"../chunk-PRKZ2KJ4.mjs";import"../chunk-NLONZHYT.mjs";import"../chunk-UYVPNUH3.mjs";import"../chunk-GQI3HWOB.mjs";import"../chunk-6F4ACCCZ.mjs";import"../chunk-Y5RQOXZH.mjs";import"../chunk-X7QBDRQR.mjs";import"../chunk-3JPVQHOR.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-E7FWVXGX.mjs";import"../chunk-UIVJXLRM.mjs";import"../chunk-KVJ2KGMW.mjs";import"../chunk-PZ5JKQSP.mjs";import"../chunk-N25GOEVL.mjs";import"../chunk-4K252UDE.mjs";import"../chunk-NMFS5KAE.mjs";import"../chunk-OWP2MKTX.mjs";import"../chunk-RCYWJZR4.mjs";import"../chunk-5HZKDT5C.mjs";import"../chunk-LR65XHSF.mjs";import"../chunk-EHJEK7FU.mjs";import"../chunk-UR5E2UDO.mjs";import"../chunk-5IVRKK5V.mjs";import"../chunk-BQSE5HHW.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-6DYNAFAP.mjs";import"../chunk-F2GFSFPW.mjs";import"../chunk-7B3VSBCX.mjs";import"../chunk-VMCFN5CT.mjs";import"../chunk-UDMADMVO.mjs";import"../chunk-IU5JZNH4.mjs";import"../chunk-NL72WE3E.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-NFGAZSSK.mjs";import"../chunk-KR5JAN32.mjs";import"../chunk-EOC4UI5B.mjs";import"../chunk-LV33NV4J.mjs";import"../chunk-5X46HDCI.mjs";import"../chunk-ALFESCPU.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-W4JEP5GW.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-DNDWTM7A.mjs";import"../chunk-ZWH2ESXT.mjs";export{a as TransactionSubmission};
|
|
2
2
|
//# sourceMappingURL=transactionSubmission.mjs.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ProcessorType } from '../utils/const.mjs';
|
|
2
|
+
import { AptosConfig } from './aptosConfig.mjs';
|
|
3
|
+
import { AnyNumber } from '../types/index.mjs';
|
|
4
|
+
import '../utils/apiEndpoints.mjs';
|
|
5
|
+
import '../types/indexer.mjs';
|
|
6
|
+
import '../types/generated/operations.mjs';
|
|
7
|
+
import '../types/generated/types.mjs';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Utility function to handle optional waiting on indexer for APIs
|
|
11
|
+
*
|
|
12
|
+
* This is purposely placed here to not expose this internal function.
|
|
13
|
+
* @param args
|
|
14
|
+
*/
|
|
15
|
+
declare function waitForIndexerOnVersion(args: {
|
|
16
|
+
config: AptosConfig;
|
|
17
|
+
minimumLedgerVersion?: AnyNumber;
|
|
18
|
+
processorTypes: Array<ProcessorType>;
|
|
19
|
+
}): Promise<void>;
|
|
20
|
+
|
|
21
|
+
export { waitForIndexerOnVersion };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"../chunk-LBNMY7EM.mjs";import"../chunk-X7QBDRQR.mjs";import"../chunk-3JPVQHOR.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-5IVRKK5V.mjs";import"../chunk-BQSE5HHW.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-NFGAZSSK.mjs";import"../chunk-KR5JAN32.mjs";import"../chunk-EOC4UI5B.mjs";import"../chunk-LV33NV4J.mjs";import"../chunk-5X46HDCI.mjs";import"../chunk-ALFESCPU.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-W4JEP5GW.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-ZWH2ESXT.mjs";export{a as waitForIndexerOnVersion};
|
|
2
|
+
//# sourceMappingURL=utils.mjs.map
|
|
@@ -129,10 +129,10 @@ declare class Deserializer {
|
|
|
129
129
|
* @example
|
|
130
130
|
* // serialize a vector of addresses
|
|
131
131
|
* const addresses = new Array<AccountAddress>(
|
|
132
|
-
* AccountAddress.
|
|
133
|
-
* AccountAddress.
|
|
134
|
-
* AccountAddress.
|
|
135
|
-
* AccountAddress.
|
|
132
|
+
* AccountAddress.from("0x1"),
|
|
133
|
+
* AccountAddress.from("0x2"),
|
|
134
|
+
* AccountAddress.from("0xa"),
|
|
135
|
+
* AccountAddress.from("0xb"),
|
|
136
136
|
* );
|
|
137
137
|
* const serializer = new Serializer();
|
|
138
138
|
* serializer.serializeVector(addresses);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-UDMADMVO.mjs";import"../chunk-DNDWTM7A.mjs";import"../chunk-ZWH2ESXT.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-6DYNAFAP.mjs";import{a as g}from"../chunk-F2GFSFPW.mjs";import{a as p,b as q,c as r}from"../chunk-7B3VSBCX.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-VMCFN5CT.mjs";import{a as f}from"../chunk-UDMADMVO.mjs";import{a,b,c,d,e}from"../chunk-IU5JZNH4.mjs";import"../chunk-NL72WE3E.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-ALFESCPU.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-DNDWTM7A.mjs";import"../chunk-ZWH2ESXT.mjs";export{i as Bool,f as Deserializer,h as EntryFunctionBytes,g as FixedBytes,r as MoveOption,q as MoveString,p as MoveVector,a as Serializable,b as Serializer,n as U128,k as U16,o as U256,l as U32,m as U64,j as U8,c as ensureBoolean,d as outOfRangeErrorMessage,e as validateNumberInRange};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-6DYNAFAP.mjs";import"../../chunk-F2GFSFPW.mjs";import"../../chunk-IU5JZNH4.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-DNDWTM7A.mjs";import"../../chunk-ZWH2ESXT.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-F2GFSFPW.mjs";import"../../chunk-IU5JZNH4.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-DNDWTM7A.mjs";import"../../chunk-ZWH2ESXT.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-VMCFN5CT.mjs";import"../../chunk-IU5JZNH4.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-ALFESCPU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-DNDWTM7A.mjs";import"../../chunk-ZWH2ESXT.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-7B3VSBCX.mjs";import"../../chunk-VMCFN5CT.mjs";import"../../chunk-IU5JZNH4.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-ALFESCPU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-DNDWTM7A.mjs";import"../../chunk-ZWH2ESXT.mjs";export{c as MoveOption,b as MoveString,a as MoveVector};
|
|
2
2
|
//# sourceMappingURL=moveStructs.mjs.map
|
|
@@ -171,10 +171,10 @@ declare class Serializer {
|
|
|
171
171
|
* @param values The array of BCS Serializable values
|
|
172
172
|
* @example
|
|
173
173
|
* const addresses = new Array<AccountAddress>(
|
|
174
|
-
* AccountAddress.
|
|
175
|
-
* AccountAddress.
|
|
176
|
-
* AccountAddress.
|
|
177
|
-
* AccountAddress.
|
|
174
|
+
* AccountAddress.from("0x1"),
|
|
175
|
+
* AccountAddress.from("0x2"),
|
|
176
|
+
* AccountAddress.from("0xa"),
|
|
177
|
+
* AccountAddress.from("0xb"),
|
|
178
178
|
* );
|
|
179
179
|
* const serializer = new Serializer();
|
|
180
180
|
* serializer.serializeVector(addresses);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e}from"../chunk-IU5JZNH4.mjs";import"../chunk-NL72WE3E.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-DNDWTM7A.mjs";import"../chunk-ZWH2ESXT.mjs";export{a as Serializable,b as Serializer,c as ensureBoolean,d as outOfRangeErrorMessage,e as validateNumberInRange};
|
|
2
2
|
//# sourceMappingURL=serializer.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as g}from"./chunk-7IY2Y73Q.mjs";import{b as p}from"./chunk-UR5E2UDO.mjs";import{g as u}from"./chunk-5IVRKK5V.mjs";import{n as m,w as f,x as y,y as k}from"./chunk-BQSE5HHW.mjs";import{a as l,b as a}from"./chunk-7B3VSBCX.mjs";import{a as i,e as d}from"./chunk-VMCFN5CT.mjs";import{d as A}from"./chunk-DNDWTM7A.mjs";async function I(e){let{aptosConfig:n,options:o,creator:t}=e;return await g({aptosConfig:n,sender:t.accountAddress,data:{function:"0x4::aptos_token::mint",functionArguments:[new a(e.collection),new a(e.description),new a(e.name),new a(e.uri),l.MoveString([]),l.MoveString([]),new l([])]},options:o})}async function D(e){let{aptosConfig:n,tokenAddress:o}=e,t={token_data_id:{_eq:p.from(o).toStringLong()}};return(await u({aptosConfig:n,query:{query:k,variables:{where_condition:t}},originMethod:"getTokenData"})).current_token_datas_v2[0]}async function B(e){let{aptosConfig:n,tokenAddress:o}=e,t={token_data_id:{_eq:p.from(o).toStringLong()}};return(await u({aptosConfig:n,query:{query:y,variables:{where_condition:t}},originMethod:"getCurrentTokenOwnership"})).current_token_ownerships_v2[0]}async function R(e){let{aptosConfig:n,ownerAddress:o,options:t}=e,r={owner_address:{_eq:p.from(o).toStringLong()},amount:{_gt:0}},s={query:y,variables:{where_condition:r,offset:t?.offset,limit:t?.limit,order_by:t?.orderBy}};return(await u({aptosConfig:n,query:s,originMethod:"getOwnedTokens"})).current_token_ownerships_v2}async function Q(e){let{aptosConfig:n,tokenAddress:o,options:t}=e,r={token_data_id:{_eq:p.from(o).toStringLong()}},s={query:f,variables:{where_condition:r,offset:t?.offset,limit:t?.limit,order_by:t?.orderBy}};return(await u({aptosConfig:n,query:s,originMethod:"getTokenActivity"})).token_activities_v2}async function M(e){let{aptosConfig:n,options:o,creator:t}=e;return await g({aptosConfig:n,sender:t.accountAddress,data:{function:"0x4::aptos_token::create_collection",functionArguments:[new a(e.description),new d(e.maxSupply??A),new a(e.name),new a(e.uri),new i(e.mutableDescription??!0),new i(e.mutableRoyalty??!0),new i(e.mutableURI??!0),new i(e.mutableTokenDescription??!0),new i(e.mutableTokenName??!0),new i(e.mutableTokenProperties??!0),new i(e.mutableTokenURI??!0),new i(e.tokensBurnableByCreator??!0),new i(e.tokensFreezableByCreator??!0),new d(e.royaltyNumerator??0),new d(e.royaltyDenominator??1)]},options:o})}async function C(e){let{aptosConfig:n,creatorAddress:o,collectionName:t,options:r}=e,s=p.from(o),c={collection_name:{_eq:t},creator_address:{_eq:s.toStringLong()}};return r?.tokenStandard&&(c.token_standard={_eq:r?.tokenStandard??"v2"}),(await u({aptosConfig:n,query:{query:m,variables:{where_condition:c}},originMethod:"getCollectionData"})).current_collections_v2[0]}async function P(e){return(await C(e)).collection_id}async function N(e){let{aptosConfig:n,sender:o,digitalAssetAddress:t,recipient:r,digitalAssetType:s,options:c}=e;return await g({aptosConfig:n,sender:o.accountAddress,data:{function:"0x1::object::transfer",typeArguments:[s??"0x4::token::Token"],functionArguments:[t,r]},options:c})}export{I as a,D as b,B as c,R as d,Q as e,M as f,C as g,P as h,N as i};
|
|
2
|
+
//# sourceMappingURL=chunk-26GRNGPL.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/internal/digitalAsset.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * This file contains the underlying implementations for exposed API surface in\n * the {@link api/digitalAsset}. By moving the methods out into a separate file,\n * other namespaces and processes can access these methods without depending on the entire\n * digitalAsset namespace and without having a dependency cycle error.\n */\n\nimport { AptosConfig } from \"../api/aptosConfig\";\nimport { MoveString, MoveVector, Bool, U64, U8 } from \"../bcs\";\nimport { Account, AccountAddress, AccountAddressInput } from \"../core\";\nimport { InputGenerateTransactionOptions, SingleSignerTransaction } from \"../transactions/types\";\nimport {\n AnyNumber,\n GetCollectionDataResponse,\n GetCurrentTokenOwnershipResponse,\n GetOwnedTokensResponse,\n GetTokenActivityResponse,\n GetTokenDataResponse,\n MoveStructId,\n OrderByArg,\n PaginationArgs,\n TokenStandardArg,\n} from \"../types\";\nimport {\n GetCollectionDataQuery,\n GetCurrentTokenOwnershipQuery,\n GetTokenActivityQuery,\n GetTokenDataQuery,\n} from \"../types/generated/operations\";\nimport {\n GetCollectionData,\n GetCurrentTokenOwnership,\n GetTokenActivity,\n GetTokenData,\n} from \"../types/generated/queries\";\nimport { queryIndexer } from \"./general\";\nimport { generateTransaction } from \"./transactionSubmission\";\nimport { MAX_U64_BIG_INT } from \"../bcs/consts\";\nimport { CurrentTokenOwnershipsV2BoolExp, TokenActivitiesV2BoolExp } from \"../types/generated/types\";\n\n// TODO: Support properties when minting.\nexport interface MintTokenOptions {\n propertyKeys?: Array<string>;\n propertyTypes?: Array<string>;\n propertyValues?: Array<string>;\n}\n\nexport async function mintTokenTransaction(args: {\n aptosConfig: AptosConfig;\n creator: Account;\n collection: string;\n description: string;\n name: string;\n uri: string;\n options?: InputGenerateTransactionOptions;\n}): Promise<SingleSignerTransaction> {\n const { aptosConfig, options, creator } = args;\n const transaction = await generateTransaction({\n aptosConfig,\n sender: creator.accountAddress,\n data: {\n function: \"0x4::aptos_token::mint\",\n functionArguments: [\n new MoveString(args.collection),\n new MoveString(args.description),\n new MoveString(args.name),\n new MoveString(args.uri),\n MoveVector.MoveString([]),\n MoveVector.MoveString([]),\n new MoveVector<MoveVector<U8>>([]),\n ],\n },\n options,\n });\n return transaction;\n}\n\nexport async function getTokenData(args: {\n aptosConfig: AptosConfig;\n tokenAddress: AccountAddressInput;\n}): Promise<GetTokenDataResponse> {\n const { aptosConfig, tokenAddress } = args;\n\n const whereCondition: { token_data_id: { _eq: string } } = {\n token_data_id: { _eq: AccountAddress.from(tokenAddress).toStringLong() },\n };\n\n const graphqlQuery = {\n query: GetTokenData,\n variables: {\n where_condition: whereCondition,\n },\n };\n\n const data = await queryIndexer<GetTokenDataQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getTokenData\",\n });\n\n return data.current_token_datas_v2[0];\n}\n\nexport async function getCurrentTokenOwnership(args: {\n aptosConfig: AptosConfig;\n tokenAddress: AccountAddressInput;\n}): Promise<GetCurrentTokenOwnershipResponse> {\n const { aptosConfig, tokenAddress } = args;\n\n const whereCondition: CurrentTokenOwnershipsV2BoolExp = {\n token_data_id: { _eq: AccountAddress.from(tokenAddress).toStringLong() },\n };\n\n const graphqlQuery = {\n query: GetCurrentTokenOwnership,\n variables: {\n where_condition: whereCondition,\n },\n };\n\n const data = await queryIndexer<GetCurrentTokenOwnershipQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getCurrentTokenOwnership\",\n });\n\n return data.current_token_ownerships_v2[0];\n}\n\nexport async function getOwnedTokens(args: {\n aptosConfig: AptosConfig;\n ownerAddress: AccountAddressInput;\n options?: PaginationArgs & OrderByArg<GetTokenActivityResponse[0]>;\n}): Promise<GetOwnedTokensResponse> {\n const { aptosConfig, ownerAddress, options } = args;\n\n const whereCondition: CurrentTokenOwnershipsV2BoolExp = {\n owner_address: { _eq: AccountAddress.from(ownerAddress).toStringLong() },\n amount: { _gt: 0 },\n };\n\n const graphqlQuery = {\n query: GetCurrentTokenOwnership,\n variables: {\n where_condition: whereCondition,\n offset: options?.offset,\n limit: options?.limit,\n order_by: options?.orderBy,\n },\n };\n\n const data = await queryIndexer<GetCurrentTokenOwnershipQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getOwnedTokens\",\n });\n\n return data.current_token_ownerships_v2;\n}\n\nexport async function getTokenActivity(args: {\n aptosConfig: AptosConfig;\n tokenAddress: AccountAddressInput;\n options?: PaginationArgs & OrderByArg<GetTokenActivityResponse[0]>;\n}): Promise<GetTokenActivityResponse> {\n const { aptosConfig, tokenAddress, options } = args;\n\n const whereCondition: TokenActivitiesV2BoolExp = {\n token_data_id: { _eq: AccountAddress.from(tokenAddress).toStringLong() },\n };\n\n const graphqlQuery = {\n query: GetTokenActivity,\n variables: {\n where_condition: whereCondition,\n offset: options?.offset,\n limit: options?.limit,\n order_by: options?.orderBy,\n },\n };\n\n const data = await queryIndexer<GetTokenActivityQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getTokenActivity\",\n });\n\n return data.token_activities_v2;\n}\n\nexport interface CreateCollectionOptions {\n maxSupply?: AnyNumber;\n mutableDescription?: boolean;\n mutableRoyalty?: boolean;\n mutableURI?: boolean;\n mutableTokenDescription?: boolean;\n mutableTokenName?: boolean;\n mutableTokenProperties?: boolean;\n mutableTokenURI?: boolean;\n tokensBurnableByCreator?: boolean;\n tokensFreezableByCreator?: boolean;\n royaltyNumerator?: number;\n royaltyDenominator?: number;\n}\n\nexport async function createCollectionTransaction(\n args: {\n aptosConfig: AptosConfig;\n creator: Account;\n description: string;\n name: string;\n uri: string;\n options?: InputGenerateTransactionOptions;\n } & CreateCollectionOptions,\n): Promise<SingleSignerTransaction> {\n const { aptosConfig, options, creator } = args;\n const transaction = await generateTransaction({\n aptosConfig,\n sender: creator.accountAddress,\n data: {\n function: \"0x4::aptos_token::create_collection\",\n functionArguments: [\n // Do not change the order\n new MoveString(args.description),\n new U64(args.maxSupply ?? MAX_U64_BIG_INT),\n new MoveString(args.name),\n new MoveString(args.uri),\n new Bool(args.mutableDescription ?? true),\n new Bool(args.mutableRoyalty ?? true),\n new Bool(args.mutableURI ?? true),\n new Bool(args.mutableTokenDescription ?? true),\n new Bool(args.mutableTokenName ?? true),\n new Bool(args.mutableTokenProperties ?? true),\n new Bool(args.mutableTokenURI ?? true),\n new Bool(args.tokensBurnableByCreator ?? true),\n new Bool(args.tokensFreezableByCreator ?? true),\n new U64(args.royaltyNumerator ?? 0),\n new U64(args.royaltyDenominator ?? 1),\n ],\n },\n options,\n });\n return transaction;\n}\n\nexport async function getCollectionData(args: {\n aptosConfig: AptosConfig;\n creatorAddress: AccountAddressInput;\n collectionName: string;\n options?: TokenStandardArg;\n}): Promise<GetCollectionDataResponse> {\n const { aptosConfig, creatorAddress, collectionName, options } = args;\n const address = AccountAddress.from(creatorAddress);\n\n const whereCondition: any = {\n collection_name: { _eq: collectionName },\n creator_address: { _eq: address.toStringLong() },\n };\n\n if (options?.tokenStandard) {\n whereCondition.token_standard = { _eq: options?.tokenStandard ?? \"v2\" };\n }\n\n const graphqlQuery = {\n query: GetCollectionData,\n variables: {\n where_condition: whereCondition,\n },\n };\n const data = await queryIndexer<GetCollectionDataQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getCollectionData\",\n });\n\n return data.current_collections_v2[0];\n}\n\nexport async function getCollectionId(args: {\n aptosConfig: AptosConfig;\n creatorAddress: AccountAddressInput;\n collectionName: string;\n options?: TokenStandardArg;\n}): Promise<string> {\n return (await getCollectionData(args)).collection_id;\n}\n\nexport async function transferDigitalAsset(args: {\n aptosConfig: AptosConfig;\n sender: Account;\n digitalAssetAddress: AccountAddressInput;\n recipient: AccountAddress;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n}): Promise<SingleSignerTransaction> {\n const { aptosConfig, sender, digitalAssetAddress, recipient, digitalAssetType, options } = args;\n const transaction = await generateTransaction({\n aptosConfig,\n sender: sender.accountAddress,\n data: {\n function: \"0x1::object::transfer\",\n typeArguments: [digitalAssetType ?? \"0x4::token::Token\"],\n functionArguments: [digitalAssetAddress, recipient],\n },\n options,\n });\n return transaction;\n}\n"],"mappings":"kUAkDA,eAAsBA,EAAqBC,EAQN,CACnC,GAAM,CAAE,YAAAC,EAAa,QAAAC,EAAS,QAAAC,CAAQ,EAAIH,EAkB1C,OAjBoB,MAAMI,EAAoB,CAC5C,YAAAH,EACA,OAAQE,EAAQ,eAChB,KAAM,CACJ,SAAU,yBACV,kBAAmB,CACjB,IAAIE,EAAWL,EAAK,UAAU,EAC9B,IAAIK,EAAWL,EAAK,WAAW,EAC/B,IAAIK,EAAWL,EAAK,IAAI,EACxB,IAAIK,EAAWL,EAAK,GAAG,EACvBM,EAAW,WAAW,CAAC,CAAC,EACxBA,EAAW,WAAW,CAAC,CAAC,EACxB,IAAIA,EAA2B,CAAC,CAAC,CACnC,CACF,EACA,QAAAJ,CACF,CAAC,CAEH,CAEA,eAAsBK,EAAaP,EAGD,CAChC,GAAM,CAAE,YAAAC,EAAa,aAAAO,CAAa,EAAIR,EAEhCS,EAAqD,CACzD,cAAe,CAAE,IAAKC,EAAe,KAAKF,CAAY,EAAE,aAAa,CAAE,CACzE,EAeA,OANa,MAAMG,EAAgC,CACjD,YAAAV,EACA,MATmB,CACnB,MAAOW,EACP,UAAW,CACT,gBAAiBH,CACnB,CACF,EAKE,aAAc,cAChB,CAAC,GAEW,uBAAuB,CAAC,CACtC,CAEA,eAAsBI,EAAyBb,EAGD,CAC5C,GAAM,CAAE,YAAAC,EAAa,aAAAO,CAAa,EAAIR,EAEhCS,EAAkD,CACtD,cAAe,CAAE,IAAKC,EAAe,KAAKF,CAAY,EAAE,aAAa,CAAE,CACzE,EAeA,OANa,MAAMG,EAA4C,CAC7D,YAAAV,EACA,MATmB,CACnB,MAAOa,EACP,UAAW,CACT,gBAAiBL,CACnB,CACF,EAKE,aAAc,0BAChB,CAAC,GAEW,4BAA4B,CAAC,CAC3C,CAEA,eAAsBM,EAAef,EAID,CAClC,GAAM,CAAE,YAAAC,EAAa,aAAAe,EAAc,QAAAd,CAAQ,EAAIF,EAEzCS,EAAkD,CACtD,cAAe,CAAE,IAAKC,EAAe,KAAKM,CAAY,EAAE,aAAa,CAAE,EACvE,OAAQ,CAAE,IAAK,CAAE,CACnB,EAEMC,EAAe,CACnB,MAAOH,EACP,UAAW,CACT,gBAAiBL,EACjB,OAAQP,GAAS,OACjB,MAAOA,GAAS,MAChB,SAAUA,GAAS,OACrB,CACF,EAQA,OANa,MAAMS,EAA4C,CAC7D,YAAAV,EACA,MAAOgB,EACP,aAAc,gBAChB,CAAC,GAEW,2BACd,CAEA,eAAsBC,EAAiBlB,EAID,CACpC,GAAM,CAAE,YAAAC,EAAa,aAAAO,EAAc,QAAAN,CAAQ,EAAIF,EAEzCS,EAA2C,CAC/C,cAAe,CAAE,IAAKC,EAAe,KAAKF,CAAY,EAAE,aAAa,CAAE,CACzE,EAEMS,EAAe,CACnB,MAAOE,EACP,UAAW,CACT,gBAAiBV,EACjB,OAAQP,GAAS,OACjB,MAAOA,GAAS,MAChB,SAAUA,GAAS,OACrB,CACF,EAQA,OANa,MAAMS,EAAoC,CACrD,YAAAV,EACA,MAAOgB,EACP,aAAc,kBAChB,CAAC,GAEW,mBACd,CAiBA,eAAsBG,EACpBpB,EAQkC,CAClC,GAAM,CAAE,YAAAC,EAAa,QAAAC,EAAS,QAAAC,CAAQ,EAAIH,EA2B1C,OA1BoB,MAAMI,EAAoB,CAC5C,YAAAH,EACA,OAAQE,EAAQ,eAChB,KAAM,CACJ,SAAU,sCACV,kBAAmB,CAEjB,IAAIE,EAAWL,EAAK,WAAW,EAC/B,IAAIqB,EAAIrB,EAAK,WAAasB,CAAe,EACzC,IAAIjB,EAAWL,EAAK,IAAI,EACxB,IAAIK,EAAWL,EAAK,GAAG,EACvB,IAAIuB,EAAKvB,EAAK,oBAAsB,EAAI,EACxC,IAAIuB,EAAKvB,EAAK,gBAAkB,EAAI,EACpC,IAAIuB,EAAKvB,EAAK,YAAc,EAAI,EAChC,IAAIuB,EAAKvB,EAAK,yBAA2B,EAAI,EAC7C,IAAIuB,EAAKvB,EAAK,kBAAoB,EAAI,EACtC,IAAIuB,EAAKvB,EAAK,wBAA0B,EAAI,EAC5C,IAAIuB,EAAKvB,EAAK,iBAAmB,EAAI,EACrC,IAAIuB,EAAKvB,EAAK,yBAA2B,EAAI,EAC7C,IAAIuB,EAAKvB,EAAK,0BAA4B,EAAI,EAC9C,IAAIqB,EAAIrB,EAAK,kBAAoB,CAAC,EAClC,IAAIqB,EAAIrB,EAAK,oBAAsB,CAAC,CACtC,CACF,EACA,QAAAE,CACF,CAAC,CAEH,CAEA,eAAsBsB,EAAkBxB,EAKD,CACrC,GAAM,CAAE,YAAAC,EAAa,eAAAwB,EAAgB,eAAAC,EAAgB,QAAAxB,CAAQ,EAAIF,EAC3D2B,EAAUjB,EAAe,KAAKe,CAAc,EAE5ChB,EAAsB,CAC1B,gBAAiB,CAAE,IAAKiB,CAAe,EACvC,gBAAiB,CAAE,IAAKC,EAAQ,aAAa,CAAE,CACjD,EAEA,OAAIzB,GAAS,gBACXO,EAAe,eAAiB,CAAE,IAAKP,GAAS,eAAiB,IAAK,IAS3D,MAAMS,EAAqC,CACtD,YAAAV,EACA,MARmB,CACnB,MAAO2B,EACP,UAAW,CACT,gBAAiBnB,CACnB,CACF,EAIE,aAAc,mBAChB,CAAC,GAEW,uBAAuB,CAAC,CACtC,CAEA,eAAsBoB,EAAgB7B,EAKlB,CAClB,OAAQ,MAAMwB,EAAkBxB,CAAI,GAAG,aACzC,CAEA,eAAsB8B,EAAqB9B,EAON,CACnC,GAAM,CAAE,YAAAC,EAAa,OAAA8B,EAAQ,oBAAAC,EAAqB,UAAAC,EAAW,iBAAAC,EAAkB,QAAAhC,CAAQ,EAAIF,EAW3F,OAVoB,MAAMI,EAAoB,CAC5C,YAAAH,EACA,OAAQ8B,EAAO,eACf,KAAM,CACJ,SAAU,wBACV,cAAe,CAACG,GAAoB,mBAAmB,EACvD,kBAAmB,CAACF,EAAqBC,CAAS,CACpD,EACA,QAAA/B,CACF,CAAC,CAEH","names":["mintTokenTransaction","args","aptosConfig","options","creator","generateTransaction","MoveString","MoveVector","getTokenData","tokenAddress","whereCondition","AccountAddress","queryIndexer","GetTokenData","getCurrentTokenOwnership","GetCurrentTokenOwnership","getOwnedTokens","ownerAddress","graphqlQuery","getTokenActivity","GetTokenActivity","createCollectionTransaction","U64","MAX_U64_BIG_INT","Bool","getCollectionData","creatorAddress","collectionName","address","GetCollectionData","getCollectionId","transferDigitalAsset","sender","digitalAssetAddress","recipient","digitalAssetType"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-ELWWME6B.mjs";var t=class{constructor(n){this.config=n}async transferCoinTransaction(n){return o({aptosConfig:this.config,...n})}};export{t as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2AMFCGJ3.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/api/coin.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Account, AccountAddressInput } from \"../core\";\nimport { transferCoinTransaction } from \"../internal/coin\";\nimport { SingleSignerTransaction, InputGenerateTransactionOptions } from \"../transactions/types\";\nimport { AnyNumber, MoveStructId } from \"../types\";\nimport { AptosConfig } from \"./aptosConfig\";\n\n/**\n * A class to handle all `Coin` operations\n */\nexport class Coin {\n constructor(readonly config: AptosConfig) {}\n\n /**\n * Generate a transfer coin transaction that can be simulated and/or signed and submitted\n *\n * @param args.sender The sender account\n * @param args.recipient The recipient address\n * @param args.amount The amount to transfer\n * @param args.coinType optional. The coin struct type to transfer. Defaults to 0x1::aptos_coin::AptosCoin\n *\n * @returns SingleSignerTransaction\n */\n async transferCoinTransaction(args: {\n sender: Account;\n recipient: AccountAddressInput;\n amount: AnyNumber;\n coinType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n }): Promise<SingleSignerTransaction> {\n return transferCoinTransaction({ aptosConfig: this.config, ...args });\n }\n}\n"],"mappings":"yCAYO,IAAMA,EAAN,KAAW,CAChB,YAAqBC,EAAqB,CAArB,YAAAA,CAAsB,CAY3C,MAAM,wBAAwBC,EAMO,CACnC,OAAOC,EAAwB,CAAE,YAAa,KAAK,OAAQ,GAAGD,CAAK,CAAC,CACtE,CACF","names":["Coin","config","args","transferCoinTransaction"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{f as n,g as s,h as t,i as o,j as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{f as n,g as s,h as t,i as o,j as r,k as i,l as a,m as g,n as c,o as m,p as u,q as d,r as p}from"./chunk-UES76WF2.mjs";var A=class{constructor(e){this.config=e}async getOwnerAddress(e){return n({aptosConfig:this.config,...e})}async getExpiration(e){return t({aptosConfig:this.config,...e})}async getTargetAddress(e){return i({aptosConfig:this.config,...e})}async setTargetAddress(e){return a({aptosConfig:this.config,...e})}async getPrimaryName(e){return o({aptosConfig:this.config,...e})}async setPrimaryName(e){return r({aptosConfig:this.config,...e})}async registerName(e){return s({aptosConfig:this.config,...e})}async renewDomain(e){return p({aptosConfig:this.config,...e})}async getName(e){return g({aptosConfig:this.config,...e})}async getAccountNames(e){return c({aptosConfig:this.config,...e})}async getAccountDomains(e){return m({aptosConfig:this.config,...e})}async getAccountSubdomains(e){return u({aptosConfig:this.config,...e})}async getDomainSubdomains(e){return d({aptosConfig:this.config,...e})}};export{A as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2X3FRUKX.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/api/ans.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Account, AccountAddressInput } from \"../core\";\nimport {\n RegisterNameParameters,\n getExpiration,\n getOwnerAddress,\n registerName,\n getPrimaryName,\n setPrimaryName,\n getTargetAddress,\n setTargetAddress,\n renewDomain,\n getName,\n getAccountDomains,\n GetAccountDomainsArgs,\n GetAccountSubdomainsArgs,\n getAccountSubdomains,\n getAccountNames,\n GetAccountNamesArgs,\n getDomainSubdomains,\n GetDomainSubdomainsArgs,\n} from \"../internal/ans\";\nimport { GetANSNameResponse, MoveAddressType } from \"../types\";\nimport { InputGenerateTransactionOptions, SingleSignerTransaction } from \"../transactions/types\";\nimport { AptosConfig } from \"./aptosConfig\";\n\n/**\n * A class to handle all `ANS` operations\n */\nexport class ANS {\n constructor(readonly config: AptosConfig) {}\n\n /**\n * Retrieve the owner address of a domain name or subdomain name from the contract.\n *\n * ```ts\n * // Will return the owner address of \"test.aptos.apt\" or undefined\n * const owner = await aptos.getOwnerAddress({name: \"test.aptos\"})\n * // owner = 0x123...\n * ```\n *\n * @param args.name - A string of the name to retrieve\n *\n * @returns MoveAddressType if the name is owned, undefined otherwise\n */\n async getOwnerAddress(args: { name: string }): Promise<MoveAddressType | undefined> {\n return getOwnerAddress({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Retrieve the expiration time of a domain name or subdomain name from the contract.\n *\n * ```ts\n * // Will return the expiration of \"test.aptos.apt\" or undefined\n * const exp = await aptos.getExpiration({name: \"test.aptos\"})\n * // new Date(exp) would give you the date in question: 2021-01-01T00:00:00.000Z\n * ```\n *\n * @param args.name - A string of the name to retrieve\n *\n * @returns number as a unix timestamp in milliseconds.\n */\n async getExpiration(args: { name: string }): Promise<number | undefined> {\n return getExpiration({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Retrieve the target address of a domain or subdomain name. This is the\n * address the name points to for use on chain. Note, the target address can\n * point to addresses that are not the owner of the name\n *\n * ```ts\n * const targetAddr = await aptos.getTargetAddress({name: \"test.aptos\"})\n * // targetAddr = 0x123...\n * ```\n *\n * @param args.name - A string of the name: primary, primary.apt, secondary.primary, secondary.primary.apt, etc.\n *\n * @returns MoveAddressType if the name has a target, undefined otherwise\n */\n async getTargetAddress(args: { name: string }): Promise<MoveAddressType | undefined> {\n return getTargetAddress({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Sets the target address of a domain or subdomain name. This is the\n * address the name points to for use on chain. Note, the target address can\n * point to addresses that are not the owner of the name\n *\n * ```ts\n * await aptos.setTargetAddress({sender: alice, name: \"test.aptos\", address: bob.accountAddress})\n * const address = await aptos.getTargetAddress({name: \"test.aptos\"})\n * // address = bob.accountAddress\n * ```\n *\n * @param args.name - A string of the name: test.aptos.apt, test.apt, test, test.aptos, etc.\n * @param args.address - A AccountAddressInput of the address to set the domain or subdomain to\n *\n * @returns SingleSignerTransaction\n */\n async setTargetAddress(args: {\n sender: Account;\n name: string;\n address: AccountAddressInput;\n options?: InputGenerateTransactionOptions;\n }): Promise<SingleSignerTransaction> {\n return setTargetAddress({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Retrieve the primary name for an account. An account can have\n * multiple names that target it, but only a single name that is primary. An\n * account also may not have a primary name.\n *\n * ```ts\n * const name = await aptos.getPrimaryName({address: alice.accountAddress})\n * // name = test.aptos\n * ```\n *\n * @param args.address - A AccountAddressInput (address) of the account\n *\n * @returns a string if the account has a primary name, undefined otherwise\n */\n async getPrimaryName(args: { address: AccountAddressInput }): Promise<string | undefined> {\n return getPrimaryName({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Sets the primary name for the sender. An account can have\n * multiple names that target it, but only a single name that is primary. An\n * account also may not have a primary name.\n *\n * ```ts\n * await aptos.setPrimaryName({sender: alice, name: \"test.aptos\"})\n * const primaryName = await aptos.getPrimaryName({address: alice.accountAddress})\n * // primaryName = test.aptos\n * ```\n *\n * @param args.sender - The sender account\n * @param args.name - A string of the name: test, test.apt, test.aptos, test.aptos.apt, etc.\n *\n * @returns SingleSignerTransaction\n */\n async setPrimaryName(args: {\n sender: Account;\n name?: string;\n options?: InputGenerateTransactionOptions;\n }): Promise<SingleSignerTransaction> {\n return setPrimaryName({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Registers a new name\n *\n * ```ts\n * // An example of registering a subdomain name assuming def.apt is already registered\n * // and belongs to the sender alice.\n * const txn = aptos.registerName({\n * sender: alice,\n * name: \"test.aptos.apt\",\n * expiration: {\n * policy: \"subdomain:independent\",\n * expirationDate: Date.now() + 30 * 24 * 60 * 60 * 1000,\n * },\n * });\n * ```\n *\n * @param args.sender - The sender account\n * @param args.name - A string of the name to register. This can be inclusive or exclusive of the .apt suffix.\n * Examples include: \"test\", \"test.apt\", \"test.aptos.apt\", etc.\n * @param args.expiration - An object with the expiration policy of the name.\n * @param args.expiration.policy - 'domain' | 'subdomain:follow-domain' | 'subdomain:independent'\n * - domain: Years is required and the name will expire after the given number of years.\n * - subdomain:follow-domain: The name will expire at the same time as the domain name.\n * - subdomain:independent: The name will expire at the given date.\n * @param args.expiration.expirationDate - An epoch number in milliseconds of\n * the date when the subdomain will expire. Only applicable when the policy is\n * set to 'subdomain:independent'.\n * @param args.transferable - Determines if the subdomain being minted is soul-bound. Applicable only to subdomains.\n * @param args.targetAddress optional - The address the domain name will resolve to. If not provided,\n * the sender's address will be used.\n * @param args.toAddress optional - The address to send the domain name to. If not provided,\n * the transaction will be sent to the router.\n *\n * @returns SingleSignerTransaction\n */\n async registerName(args: Omit<RegisterNameParameters, \"aptosConfig\">): Promise<SingleSignerTransaction> {\n return registerName({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Renews a domain name\n *\n * Note: If a domain name was minted with V1 of the contract, it will automatically be upgraded to V2 via this transaction.\n *\n * ```ts\n * await aptos.renewDomain({sender: alice, name: \"test\"})\n * // test.apt will be renewed for one year\n * ```\n *\n * @param args.sender - The sender account\n * @param args.name - A string of the domain the subdomain will be under. The signer must be the domain owner.\n * Subdomains cannot be renewed.\n * @param args.years - The number of years to renew the name. Currently only one year is permitted.\n *\n * @returns SingleSignerTransaction\n */\n async renewDomain(args: {\n sender: Account;\n name: string;\n years?: 1;\n options?: InputGenerateTransactionOptions;\n }): Promise<SingleSignerTransaction> {\n return renewDomain({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Fetches a single name from the indexer\n * @param args.name - A string of the name to retrieve, e.g. \"test.aptos.apt\"\n * or \"test.apt\" or \"test\". Can be inclusive or exclusive of the .apt suffix.\n * Can be a subdomain.\n *\n * @returns A promise of an ANSName or undefined\n */\n async getName(args: { name: string }): Promise<GetANSNameResponse[0] | undefined> {\n return getName({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Fetches all names for an account (both top level domains and subdomains)\n *\n * @param args\n * @param args.accountAddress - A AccountAddressInput of the address to retrieve names for.\n * @param args.options.offset - Optional, the offset to start from when fetching names\n * @param args.options.limit - Optional, A number of the names to fetch per request\n * @param args.options.orderBy - The order to sort the names by\n * @param args.options.where - Additional filters to apply to the query\n *\n * @returns a promise of an array of ANSName\n */\n async getAccountNames(args: GetAccountNamesArgs): Promise<GetANSNameResponse> {\n return getAccountNames({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Fetches all top level domain names for an account\n *\n * @param args\n * @param args.accountAddress - A AccountAddressInput of the address to retrieve domain names for.\n * @param args.options.offset - Optional, the offset to start from when fetching names\n * @param args.options.limit - Optional, A number of the names to fetch per request\n * @param args.options.orderBy - The order to sort the names by\n * @param args.options.where - Additional filters to apply to the query\n *\n * @returns a promise of an array of ANSName\n */\n async getAccountDomains(args: GetAccountDomainsArgs): Promise<GetANSNameResponse> {\n return getAccountDomains({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Fetches all subdomains names for an account\n *\n * @param args\n * @param args.accountAddress - A AccountAddressInput of the address to retrieve subdomains names for.\n * @param args.options.offset - Optional, the offset to start from when fetching names\n * @param args.options.limit - Optional, A number of the names to fetch per request\n * @param args.options.orderBy - The order to sort the names by\n * @param args.options.where - Additional filters to apply to the query\n *\n * @returns a promise of an array of ANSName\n */\n async getAccountSubdomains(args: GetAccountSubdomainsArgs): Promise<GetANSNameResponse> {\n return getAccountSubdomains({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Fetches all subdomains names for a given domain. Note, this will not return the domain itself.\n *\n * @param args\n * @param args.domain - A string of the domain name: eg. \"test.apt\" or \"test\" (without the suffix of .apt)\n * @param args.options.offset - Optional, the offset to start from when fetching names\n * @param args.options.limit - Optional, A number of the names to fetch per request\n * @param args.options.orderBy - The order to sort the names by\n * @param args.options.where - Additional filters to apply to the query\n *\n * @returns a promise of an array of ANSName\n */\n async getDomainSubdomains(args: GetDomainSubdomainsArgs): Promise<GetANSNameResponse> {\n return getDomainSubdomains({ aptosConfig: this.config, ...args });\n }\n}\n"],"mappings":"6HA+BO,IAAMA,EAAN,KAAU,CACf,YAAqBC,EAAqB,CAArB,YAAAA,CAAsB,CAe3C,MAAM,gBAAgBC,EAA8D,CAClF,OAAOC,EAAgB,CAAE,YAAa,KAAK,OAAQ,GAAGD,CAAK,CAAC,CAC9D,CAeA,MAAM,cAAcA,EAAqD,CACvE,OAAOE,EAAc,CAAE,YAAa,KAAK,OAAQ,GAAGF,CAAK,CAAC,CAC5D,CAgBA,MAAM,iBAAiBA,EAA8D,CACnF,OAAOG,EAAiB,CAAE,YAAa,KAAK,OAAQ,GAAGH,CAAK,CAAC,CAC/D,CAkBA,MAAM,iBAAiBA,EAKc,CACnC,OAAOI,EAAiB,CAAE,YAAa,KAAK,OAAQ,GAAGJ,CAAK,CAAC,CAC/D,CAgBA,MAAM,eAAeA,EAAqE,CACxF,OAAOK,EAAe,CAAE,YAAa,KAAK,OAAQ,GAAGL,CAAK,CAAC,CAC7D,CAkBA,MAAM,eAAeA,EAIgB,CACnC,OAAOM,EAAe,CAAE,YAAa,KAAK,OAAQ,GAAGN,CAAK,CAAC,CAC7D,CAqCA,MAAM,aAAaA,EAAqF,CACtG,OAAOO,EAAa,CAAE,YAAa,KAAK,OAAQ,GAAGP,CAAK,CAAC,CAC3D,CAmBA,MAAM,YAAYA,EAKmB,CACnC,OAAOQ,EAAY,CAAE,YAAa,KAAK,OAAQ,GAAGR,CAAK,CAAC,CAC1D,CAUA,MAAM,QAAQA,EAAoE,CAChF,OAAOS,EAAQ,CAAE,YAAa,KAAK,OAAQ,GAAGT,CAAK,CAAC,CACtD,CAcA,MAAM,gBAAgBA,EAAwD,CAC5E,OAAOU,EAAgB,CAAE,YAAa,KAAK,OAAQ,GAAGV,CAAK,CAAC,CAC9D,CAcA,MAAM,kBAAkBA,EAA0D,CAChF,OAAOW,EAAkB,CAAE,YAAa,KAAK,OAAQ,GAAGX,CAAK,CAAC,CAChE,CAcA,MAAM,qBAAqBA,EAA6D,CACtF,OAAOY,EAAqB,CAAE,YAAa,KAAK,OAAQ,GAAGZ,CAAK,CAAC,CACnE,CAcA,MAAM,oBAAoBA,EAA4D,CACpF,OAAOa,EAAoB,CAAE,YAAa,KAAK,OAAQ,GAAGb,CAAK,CAAC,CAClE,CACF","names":["ANS","config","args","getOwnerAddress","getExpiration","getTargetAddress","setTargetAddress","getPrimaryName","setPrimaryName","registerName","renewDomain","getName","getAccountNames","getAccountDomains","getAccountSubdomains","getDomainSubdomains"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as o,b as s,c as t,d as r,e as n,f as i,g as a,i as g,j as c}from"./chunk-5IVRKK5V.mjs";var u=class{constructor(e){this.config=e}async getLedgerInfo(){return o({aptosConfig:this.config})}async getChainId(){return(await this.getLedgerInfo()).chain_id}async getBlockByVersion(e){return s({aptosConfig:this.config,...e})}async getBlockByHeight(e){return t({aptosConfig:this.config,...e})}async getTableItem(e){return r({aptosConfig:this.config,...e})}async view(e){return n({aptosConfig:this.config,...e})}async getChainTopUserTransactions(e){return i({aptosConfig:this.config,...e})}async queryIndexer(e){return a({aptosConfig:this.config,...e})}async getIndexerLastSuccessVersion(){return g({aptosConfig:this.config})}async getProcessorStatus(e){return c({aptosConfig:this.config,processorType:e})}};export{u as a};
|
|
2
|
+
//# sourceMappingURL=chunk-32A35CPU.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/api/general.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { AptosConfig } from \"./aptosConfig\";\nimport {\n getBlockByHeight,\n getBlockByVersion,\n getChainTopUserTransactions,\n getIndexerLastSuccessVersion,\n getLedgerInfo,\n getProcessorStatus,\n getTableItem,\n queryIndexer,\n view,\n} from \"../internal/general\";\nimport {\n AnyNumber,\n Block,\n GetChainTopUserTransactionsResponse,\n GetProcessorStatusResponse,\n GraphqlQuery,\n LedgerInfo,\n LedgerVersionArg,\n MoveValue,\n TableItemRequest,\n InputViewRequestData,\n} from \"../types\";\nimport { ProcessorType } from \"../utils/const\";\n\n/**\n * A class to query all `General` Aptos related queries\n */\nexport class General {\n readonly config: AptosConfig;\n\n constructor(config: AptosConfig) {\n this.config = config;\n }\n\n /**\n * Queries for the Aptos ledger info\n *\n * @returns Aptos Ledger Info\n *\n * @example An example of the returned data\n * ```\n * {\n * \"chain_id\": 4,\n * \"epoch\": \"8\",\n * \"ledger_version\": \"714\",\n * \"oldest_ledger_version\": \"0\",\n * \"ledger_timestamp\": \"1694695496521775\",\n * \"node_role\": \"validator\",\n * \"oldest_block_height\": \"0\",\n * \"block_height\": \"359\",\n * \"git_hash\": \"c82193f36f4e185fed9f68c4ad21f6c6dd390c6e\"\n * }\n * ```\n */\n async getLedgerInfo(): Promise<LedgerInfo> {\n return getLedgerInfo({ aptosConfig: this.config });\n }\n\n /**\n * Queries for the chain id\n *\n * @returns The chain id\n */\n async getChainId(): Promise<number> {\n const result = await this.getLedgerInfo();\n return result.chain_id;\n }\n\n /**\n * Queries for block by transaction version\n *\n * @param args.ledgerVersion Ledger version to lookup block information for\n * @param args.options.withTransactions If set to true, include all transactions in the block\n *\n * @returns Block information with optional transactions\n */\n async getBlockByVersion(args: {\n ledgerVersion: AnyNumber;\n options?: { withTransactions?: boolean };\n }): Promise<Block> {\n return getBlockByVersion({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Get block by block height\n *\n * @param args.blockHeight Block height to lookup. Starts at 0\n * @param args.options.withTransactions If set to true, include all transactions in the block\n *\n * @returns Block with optional transactions\n */\n async getBlockByHeight(args: { blockHeight: AnyNumber; options?: { withTransactions?: boolean } }): Promise<Block> {\n return getBlockByHeight({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries for a table item for a table identified by the handle and the key for the item.\n * Key and value types need to be passed in to help with key serialization and value deserialization.\n * @param args.handle A pointer to where that table is stored\n * @param args.data Object that describes table item\n * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version\n *\n * @example https://fullnode.devnet.aptoslabs.com/v1/accounts/0x1/resource/0x1::coin::CoinInfo%3C0x1::aptos_coin::AptosCoin%3E\n * {\n * data.key_type = \"address\" // Move type of table key\n * data.value_type = \"u128\" // Move type of table value\n * data.key = \"0x619dc29a0aac8fa146714058e8dd6d2d0f3bdf5f6331907bf91f3acd81e6935\" // Value of table key\n * }\n *\n * @returns Table item value rendered in JSON\n */\n async getTableItem<T>(args: { handle: string; data: TableItemRequest; options?: LedgerVersionArg }): Promise<T> {\n return getTableItem<T>({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries for a Move view function\n * @param args.payload Payload for the view function\n * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version\n * @example\n * `\n * const payload: ViewRequest = {\n * function: \"0x1::coin::balance\",\n * typeArguments: [\"0x1::aptos_coin::AptosCoin\"],\n * functionArguments: [accountAddress],\n * };\n * `\n *\n * @returns an array of Move values\n */\n async view<T extends Array<MoveValue>>(args: {\n payload: InputViewRequestData;\n options?: LedgerVersionArg;\n }): Promise<T> {\n return view<T>({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries top user transactions\n *\n * @param args.limit The number of transactions to return\n * @returns GetChainTopUserTransactionsResponse\n */\n async getChainTopUserTransactions(args: { limit: number }): Promise<GetChainTopUserTransactionsResponse> {\n return getChainTopUserTransactions({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * A generic function for retrieving data from Aptos Indexer.\n * For more detailed queries specification see\n * {@link https://cloud.hasura.io/public/graphiql?endpoint=https://indexer.mainnet.aptoslabs.com/v1/graphql}\n *\n * @param args.query.query A GraphQL query\n * @param args.query.variables The variables for the query\n * @example\n * ```\n * {\n * query: `query MyQuery {\n ledger_infos {\n chain_id\n }\n }`;\n * }\n * ```\n *\n * @return The provided T type\n */\n async queryIndexer<T extends {}>(args: { query: GraphqlQuery }): Promise<T> {\n return queryIndexer<T>({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries for the last successful indexer version\n *\n * This is useful to tell what ledger version the indexer is updated to, as it can be behind the full nodes.\n */\n async getIndexerLastSuccessVersion(): Promise<number> {\n return getIndexerLastSuccessVersion({ aptosConfig: this.config });\n }\n\n /**\n * Query the processor status for a specific processor type.\n *\n * @param processorType The processor type to query\n * @returns\n */\n async getProcessorStatus(processorType: ProcessorType): Promise<GetProcessorStatusResponse[0]> {\n return getProcessorStatus({ aptosConfig: this.config, processorType });\n }\n}\n"],"mappings":"iGAgCO,IAAMA,EAAN,KAAc,CAGnB,YAAYC,EAAqB,CAC/B,KAAK,OAASA,CAChB,CAsBA,MAAM,eAAqC,CACzC,OAAOC,EAAc,CAAE,YAAa,KAAK,MAAO,CAAC,CACnD,CAOA,MAAM,YAA8B,CAElC,OADe,MAAM,KAAK,cAAc,GAC1B,QAChB,CAUA,MAAM,kBAAkBC,EAGL,CACjB,OAAOC,EAAkB,CACvB,YAAa,KAAK,OAClB,GAAGD,CACL,CAAC,CACH,CAUA,MAAM,iBAAiBA,EAA4F,CACjH,OAAOE,EAAiB,CAAE,YAAa,KAAK,OAAQ,GAAGF,CAAK,CAAC,CAC/D,CAkBA,MAAM,aAAgBA,EAA0F,CAC9G,OAAOG,EAAgB,CAAE,YAAa,KAAK,OAAQ,GAAGH,CAAK,CAAC,CAC9D,CAiBA,MAAM,KAAiCA,EAGxB,CACb,OAAOI,EAAQ,CAAE,YAAa,KAAK,OAAQ,GAAGJ,CAAK,CAAC,CACtD,CAQA,MAAM,4BAA4BA,EAAuE,CACvG,OAAOK,EAA4B,CACjC,YAAa,KAAK,OAClB,GAAGL,CACL,CAAC,CACH,CAsBA,MAAM,aAA2BA,EAA2C,CAC1E,OAAOM,EAAgB,CACrB,YAAa,KAAK,OAClB,GAAGN,CACL,CAAC,CACH,CAOA,MAAM,8BAAgD,CACpD,OAAOO,EAA6B,CAAE,YAAa,KAAK,MAAO,CAAC,CAClE,CAQA,MAAM,mBAAmBC,EAAsE,CAC7F,OAAOC,EAAmB,CAAE,YAAa,KAAK,OAAQ,cAAAD,CAAc,CAAC,CACvE,CACF","names":["General","config","getLedgerInfo","args","getBlockByVersion","getBlockByHeight","getTableItem","view","getChainTopUserTransactions","queryIndexer","getIndexerLastSuccessVersion","processorType","getProcessorStatus"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as m}from"./chunk-PANYJULW.mjs";import{a as h}from"./chunk-FGTQT7Q5.mjs";import{b as t}from"./chunk-UR5E2UDO.mjs";import{a as u}from"./chunk-IU5JZNH4.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-3QS3MFWJ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as n}from"./chunk-EOC4UI5B.mjs";import{a as r,b as t,c as o}from"./chunk-LV33NV4J.mjs";import l from"@aptos-labs/aptos-client";var i=class{constructor(e){this.network=e?.network??n,this.fullnode=e?.fullnode,this.faucet=e?.faucet,this.indexer=e?.indexer,this.client=e?.client??{provider:l},this.clientConfig=e?.clientConfig??{}}getRequestUrl(e){switch(e){case 0:if(this.fullnode!==void 0)return this.fullnode;if(this.network==="custom")throw new Error("Please provide a custom full node url");return t[this.network];case 2:if(this.faucet!==void 0)return this.faucet;if(this.network==="custom")throw new Error("Please provide a custom faucet url");return o[this.network];case 1:if(this.indexer!==void 0)return this.indexer;if(this.network==="custom")throw new Error("Please provide a custom indexer url");return r[this.network];default:throw Error(`apiType ${e} is not supported`)}}isIndexerRequest(e){return r[this.network]===e}};export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3RMXGSHK.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/api/aptosConfig.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport aptosClient from \"@aptos-labs/aptos-client\";\nimport { AptosSettings, ClientConfig, Client } from \"../types\";\nimport { NetworkToNodeAPI, NetworkToFaucetAPI, NetworkToIndexerAPI, Network } from \"../utils/apiEndpoints\";\nimport { AptosApiType, DEFAULT_NETWORK } from \"../utils/const\";\n\n/**\n * This class holds the config information for the SDK client instance.\n */\nexport class AptosConfig {\n /** The Network that this SDK is associated with. Defaults to DEVNET */\n readonly network: Network;\n\n /**\n * The client instance the SDK uses. Defaults to `@aptos-labs/aptos-client\n */\n readonly client: Client;\n\n /**\n * The optional hardcoded fullnode URL to send requests to instead of using the network\n */\n readonly fullnode?: string;\n\n /**\n * The optional hardcoded faucet URL to send requests to instead of using the network\n */\n readonly faucet?: string;\n\n /**\n * The optional hardcoded indexer URL to send requests to instead of using the network\n */\n readonly indexer?: string;\n\n readonly clientConfig?: ClientConfig;\n\n constructor(settings?: AptosSettings) {\n this.network = settings?.network ?? DEFAULT_NETWORK;\n this.fullnode = settings?.fullnode;\n this.faucet = settings?.faucet;\n this.indexer = settings?.indexer;\n this.client = settings?.client ?? { provider: aptosClient };\n this.clientConfig = settings?.clientConfig ?? {};\n }\n\n /**\n * Returns the URL endpoint to send the request to.\n * If a custom URL was provided in the config, that URL is returned.\n * If a custom URL was provided but not URL endpoints, an error is thrown.\n * Otherwise, the URL endpoint is derived from the network.\n *\n * @param apiType - The type of Aptos API to get the URL for.\n *\n * @internal\n */\n getRequestUrl(apiType: AptosApiType): string {\n switch (apiType) {\n case AptosApiType.FULLNODE:\n if (this.fullnode !== undefined) return this.fullnode;\n if (this.network === Network.CUSTOM) throw new Error(\"Please provide a custom full node url\");\n return NetworkToNodeAPI[this.network];\n case AptosApiType.FAUCET:\n if (this.faucet !== undefined) return this.faucet;\n if (this.network === Network.CUSTOM) throw new Error(\"Please provide a custom faucet url\");\n return NetworkToFaucetAPI[this.network];\n case AptosApiType.INDEXER:\n if (this.indexer !== undefined) return this.indexer;\n if (this.network === Network.CUSTOM) throw new Error(\"Please provide a custom indexer url\");\n return NetworkToIndexerAPI[this.network];\n default:\n throw Error(`apiType ${apiType} is not supported`);\n }\n }\n\n /**\n * Checks if the URL is a known indexer endpoint\n *\n * @internal\n * */\n isIndexerRequest(url: string): boolean {\n return NetworkToIndexerAPI[this.network] === url;\n }\n}\n"],"mappings":"gGAGA,OAAOA,MAAiB,2BAQjB,IAAMC,EAAN,KAAkB,CA0BvB,YAAYC,EAA0B,CACpC,KAAK,QAAUA,GAAU,SAAWC,EACpC,KAAK,SAAWD,GAAU,SAC1B,KAAK,OAASA,GAAU,OACxB,KAAK,QAAUA,GAAU,QACzB,KAAK,OAASA,GAAU,QAAU,CAAE,SAAUE,CAAY,EAC1D,KAAK,aAAeF,GAAU,cAAgB,CAAC,CACjD,CAYA,cAAcG,EAA+B,CAC3C,OAAQA,EAAS,CACf,OACE,GAAI,KAAK,WAAa,OAAW,OAAO,KAAK,SAC7C,GAAI,KAAK,mBAA4B,MAAM,IAAI,MAAM,uCAAuC,EAC5F,OAAOC,EAAiB,KAAK,OAAO,EACtC,OACE,GAAI,KAAK,SAAW,OAAW,OAAO,KAAK,OAC3C,GAAI,KAAK,mBAA4B,MAAM,IAAI,MAAM,oCAAoC,EACzF,OAAOC,EAAmB,KAAK,OAAO,EACxC,OACE,GAAI,KAAK,UAAY,OAAW,OAAO,KAAK,QAC5C,GAAI,KAAK,mBAA4B,MAAM,IAAI,MAAM,qCAAqC,EAC1F,OAAOC,EAAoB,KAAK,OAAO,EACzC,QACE,MAAM,MAAM,WAAWH,CAAO,mBAAmB,CACrD,CACF,CAOA,iBAAiBI,EAAsB,CACrC,OAAOD,EAAoB,KAAK,OAAO,IAAMC,CAC/C,CACF","names":["aptosClient","AptosConfig","settings","DEFAULT_NETWORK","aptosClient","apiType","NetworkToNodeAPI","NetworkToFaucetAPI","NetworkToIndexerAPI","url"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c as w}from"./chunk-F52GIFKT.mjs";import{a as O,b as f,c as A,d as T,e as p,f as C,g as V,h as g,i as _,k as G,l as j,m as k,n as H,o as z,p as L,r,s as q}from"./chunk-7QJYTQSU.mjs";import{n as M}from"./chunk-C3Y52GHM.mjs";import{c as I}from"./chunk-Y5RQOXZH.mjs";import{b as l}from"./chunk-UR5E2UDO.mjs";import{a as o,b as x,c as y}from"./chunk-7B3VSBCX.mjs";import{a as E,b as B,c as S,d as b,e as v,f as $,g as F}from"./chunk-VMCFN5CT.mjs";import{b as h}from"./chunk-NL72WE3E.mjs";function Z(e){return e?.map(n=>f(n)?w(n):n)??[]}async function P(e,n,t,i){let s=(await I({aptosConfig:i,accountAddress:e,moduleName:n})).abi?.exposed_functions.find(c=>c.name===t);if(!s)throw new Error(`Could not find entry function ABI for '${e}::${n}::${t}'`);if(!s.is_entry)throw new Error(`'${e}::${n}::${t}' is not an entry function`);let D=q(s),m=[];for(let c=D;c<s.params.length;c+=1)m.push(w(s.params[c],{allowGenerics:!0}));return{typeParameters:s.generic_type_params,parameters:m}}function a(e,n,t,i,u){if(i>=n.parameters.length)throw new Error(`Too many arguments for '${e}', expected ${n.parameters.length}`);let s=n.parameters[i];return U(t,s,i,u)}function U(e,n,t,i){return C(e)?(d(n,e,t),e):J(e,n,t,i)}function J(e,n,t,i){if(n.isBool()){if(O(e))return new E(e);r("boolean",t)}if(n.isAddress()){if(f(e))return l.fromString(e);r("string | AccountAddress",t)}if(n.isU8()){if(A(e))return new B(e);r("number",t)}if(n.isU16()){if(A(e))return new S(e);r("number",t)}if(n.isU32()){if(A(e))return new b(e);r("number",t)}if(n.isU64()){if(T(e))return new v(BigInt(e));r("bigint | number | string",t)}if(n.isU128()){if(T(e))return new $(BigInt(e));r("bigint | number | string",t)}if(n.isU256()){if(T(e))return new F(BigInt(e));r("bigint | number | string",t)}if(n.isGeneric()){let u=n.value;if(u<0||u>=i.length)throw new Error(`Generic argument ${n.toString()} is invalid for argument ${t}`);return U(e,i[u],t,i)}if(n.isVector()){if(n.value.isU8()){if(f(e))try{return o.U8(h.fromHexInput(e).toUint8Array())}catch{throw new Error(`vector<u8> must be passed in as a hex string or a Uint8array, type '${n.toString()}'`)}if(e instanceof Uint8Array)return o.U8(e)}if(Array.isArray(e))return new o(e.map(u=>U(u,n.value,t,i)));throw new Error(`Type mismatch for argument ${t}, type '${n.toString()}'`)}if(n.isStruct()){if(n.isString()){if(f(e))return new x(e);r("string",t)}if(n.isObject()){if(f(e))return l.fromString(e);r("string | AccountAddress",t)}if(n.isOption())return p(e)?new y(null):new y(U(e,n.value.typeArgs[0],t,i));throw new Error(`Unsupported struct input type for argument ${t}, type '${n.toString()}'`)}throw new Error(`Type mismatch for argument ${t}, type '${n.toString()}'`)}function d(e,n,t){if(e.isBool()){if(V(n))return;r("Bool",t)}if(e.isAddress()){if(g(n))return;r("AccountAddress",t)}if(e.isU8()){if(G(n))return;r("U8",t)}if(e.isU16()){if(j(n))return;r("U16",t)}if(e.isU32()){if(k(n))return;r("U32",t)}if(e.isU64()){if(H(n))return;r("U64",t)}if(e.isU128()){if(z(n))return;r("U128",t)}if(e.isU256()){if(L(n))return;r("U256",t)}if(e.isVector()){if(n instanceof o){n.values.length>0&&d(e.value,n.values[0],t);return}r("MoveVector",t)}if(e instanceof M){if(e.isString()){if(_(n))return;r("MoveString",t)}if(e.isObject()){if(g(n))return;r("AccountAddress",t)}if(e.isOption()){if(n instanceof y){n.value!==void 0&&d(e.value.typeArgs[0],n.value,t);return}r("MoveOption",t)}}throw new Error(`Type mismatch for argument ${t}, expected '${e.toString()}'`)}export{Z as a,P as b,a as c,U as d};
|
|
2
|
+
//# sourceMappingURL=chunk-4FDIPWVB.mjs.map
|