@aptos-labs/ts-sdk 0.0.5 → 0.0.7
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 +12 -7
- package/dist/browser/index.d.ts +874 -596
- package/dist/browser/index.global.js +75 -30
- package/dist/browser/index.global.js.map +1 -1
- package/dist/common/index.d.ts +874 -596
- package/dist/common/index.js +45 -24
- package/dist/common/index.js.map +1 -1
- package/dist/esm/api/{account.d.ts → account.d.mts} +17 -17
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.d.mts +273 -0
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +80 -0
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/{aptosConfig.d.ts → aptosConfig.d.mts} +6 -6
- package/dist/esm/api/aptosConfig.mjs +1 -1
- package/dist/esm/api/coin.d.mts +59 -0
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/{digitalAsset.d.ts → digitalAsset.d.mts} +35 -35
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/{event.d.ts → event.d.mts} +14 -14
- package/dist/esm/api/event.mjs +1 -1
- package/dist/esm/api/{faucet.d.ts → faucet.d.mts} +13 -13
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/{fungibleAsset.d.ts → fungibleAsset.d.mts} +7 -7
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/{general.d.ts → general.d.mts} +11 -11
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +50 -0
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/{staking.d.ts → staking.d.mts} +13 -13
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/{transaction.d.ts → transaction.d.mts} +7 -7
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.d.mts +53 -0
- package/dist/esm/api/transactionSubmission/build.mjs +2 -0
- package/dist/esm/api/transactionSubmission/sign.d.mts +50 -0
- package/dist/esm/api/transactionSubmission/sign.mjs +2 -0
- package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -0
- package/dist/esm/api/transactionSubmission/simulate.d.mts +53 -0
- package/dist/esm/api/transactionSubmission/simulate.mjs +2 -0
- package/dist/esm/api/transactionSubmission/simulate.mjs.map +1 -0
- package/dist/esm/api/transactionSubmission/submit.d.mts +51 -0
- package/dist/esm/api/transactionSubmission/submit.mjs +2 -0
- package/dist/esm/api/transactionSubmission/submit.mjs.map +1 -0
- package/dist/esm/api/transactionSubmission.d.mts +91 -0
- package/dist/esm/api/transactionSubmission.mjs +1 -1
- package/dist/esm/bcs/{consts.d.ts → consts.d.mts} +5 -5
- package/dist/esm/bcs/consts.mjs +1 -1
- package/dist/esm/bcs/{deserializer.d.ts → deserializer.d.mts} +5 -5
- package/dist/esm/bcs/deserializer.mjs +1 -1
- package/dist/esm/bcs/index.d.mts +14 -0
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/bcs/serializable/{entryFunctionBytes.d.ts → entryFunctionBytes.d.mts} +11 -11
- package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/{fixedBytes.d.ts → fixedBytes.d.mts} +10 -10
- package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/{movePrimitives.d.ts → movePrimitives.d.mts} +10 -10
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/{moveStructs.d.ts → moveStructs.d.mts} +11 -11
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/bcs/{serializer.d.ts → serializer.d.mts} +7 -7
- package/dist/esm/bcs/serializer.mjs +1 -1
- package/dist/esm/{chunk-2B5QXKPU.mjs → chunk-2OZRBXLM.mjs} +2 -2
- package/dist/esm/chunk-2OZRBXLM.mjs.map +1 -0
- package/dist/esm/{chunk-O243HOP3.mjs → chunk-33T7WTB6.mjs} +2 -2
- package/dist/esm/chunk-33T7WTB6.mjs.map +1 -0
- package/dist/esm/chunk-3732I6BR.mjs +2 -0
- package/dist/esm/chunk-3732I6BR.mjs.map +1 -0
- package/dist/esm/chunk-3VZ3OZKC.mjs +2 -0
- package/dist/esm/chunk-3VZ3OZKC.mjs.map +1 -0
- package/dist/esm/chunk-44MGBJ73.mjs +2 -0
- package/dist/esm/{chunk-CZZJAR3B.mjs.map → chunk-44MGBJ73.mjs.map} +1 -1
- package/dist/esm/chunk-4ADA5BE7.mjs +2 -0
- package/dist/esm/{chunk-7AQXAH6Q.mjs.map → chunk-4ADA5BE7.mjs.map} +1 -1
- package/dist/esm/chunk-4KTQIWUP.mjs +2 -0
- package/dist/esm/chunk-4KTQIWUP.mjs.map +1 -0
- package/dist/esm/chunk-5LO7FR2P.mjs +2 -0
- package/dist/esm/chunk-5LO7FR2P.mjs.map +1 -0
- package/dist/esm/chunk-62SCW5NH.mjs +2 -0
- package/dist/esm/{chunk-YS2OX7AB.mjs.map → chunk-62SCW5NH.mjs.map} +1 -1
- package/dist/esm/{chunk-DNYVUM3K.mjs → chunk-67OGU66P.mjs} +2 -2
- package/dist/esm/{chunk-DNYVUM3K.mjs.map → chunk-67OGU66P.mjs.map} +1 -1
- package/dist/esm/{chunk-XFSL7O6Q.mjs → chunk-72F5YXGC.mjs} +2 -2
- package/dist/esm/chunk-72F5YXGC.mjs.map +1 -0
- package/dist/esm/{chunk-N6XWY4UT.mjs → chunk-ARVSIDVB.mjs} +1 -1
- package/dist/esm/{chunk-N6XWY4UT.mjs.map → chunk-ARVSIDVB.mjs.map} +1 -1
- package/dist/esm/{chunk-WVMDCC4V.mjs → chunk-BFQRMCY2.mjs} +2 -2
- package/dist/esm/{chunk-WVMDCC4V.mjs.map → chunk-BFQRMCY2.mjs.map} +1 -1
- package/dist/esm/{chunk-XFS5O5GJ.mjs → chunk-BM4HBROC.mjs} +2 -2
- package/dist/esm/{chunk-XFS5O5GJ.mjs.map → chunk-BM4HBROC.mjs.map} +1 -1
- package/dist/esm/chunk-BPYLPPEQ.mjs +2 -0
- package/dist/esm/{chunk-V6AAQLLJ.mjs.map → chunk-BPYLPPEQ.mjs.map} +1 -1
- package/dist/esm/{chunk-3OJN4I42.mjs → chunk-BV4OOU5Y.mjs} +2 -2
- package/dist/esm/{chunk-3OJN4I42.mjs.map → chunk-BV4OOU5Y.mjs.map} +1 -1
- package/dist/esm/chunk-CYDWEPFL.mjs +1 -0
- package/dist/esm/chunk-CYDWEPFL.mjs.map +1 -0
- package/dist/esm/chunk-DRPMIJH7.mjs +2 -0
- package/dist/esm/chunk-DRPMIJH7.mjs.map +1 -0
- package/dist/esm/chunk-EFIYW4WK.mjs +2 -0
- package/dist/esm/chunk-EWTHPMEE.mjs +2 -0
- package/dist/esm/{chunk-LAXIJRYU.mjs.map → chunk-EWTHPMEE.mjs.map} +1 -1
- package/dist/esm/chunk-GAI75GOG.mjs +2 -0
- package/dist/esm/{chunk-J3QOSJFP.mjs.map → chunk-GAI75GOG.mjs.map} +1 -1
- package/dist/esm/{chunk-BC2NOUYT.mjs → chunk-GTC7WHMV.mjs} +2 -2
- package/dist/esm/{chunk-BC2NOUYT.mjs.map → chunk-GTC7WHMV.mjs.map} +1 -1
- package/dist/esm/{chunk-MIBLZSNS.mjs → chunk-GU4OUKAF.mjs} +2 -2
- package/dist/esm/chunk-GU4OUKAF.mjs.map +1 -0
- package/dist/esm/{chunk-27P7PELS.mjs → chunk-HA6JD5R6.mjs} +2 -2
- package/dist/esm/{chunk-27P7PELS.mjs.map → chunk-HA6JD5R6.mjs.map} +1 -1
- package/dist/esm/chunk-HO7K2UAK.mjs +2 -0
- package/dist/esm/{chunk-ADR4XQPR.mjs.map → chunk-HO7K2UAK.mjs.map} +1 -1
- package/dist/esm/chunk-HVADSXTB.mjs +2 -0
- package/dist/esm/{chunk-LU6VS7PJ.mjs.map → chunk-HVADSXTB.mjs.map} +1 -1
- package/dist/esm/chunk-IBH7IOIM.mjs +2 -0
- package/dist/esm/{chunk-ZXJ5ZBTL.mjs.map → chunk-IBH7IOIM.mjs.map} +1 -1
- package/dist/esm/chunk-J5BH7V37.mjs +2 -0
- package/dist/esm/chunk-J5BH7V37.mjs.map +1 -0
- package/dist/esm/chunk-JZNLZMUC.mjs +2 -0
- package/dist/esm/{chunk-WGXAIQ7K.mjs.map → chunk-JZNLZMUC.mjs.map} +1 -1
- package/dist/esm/chunk-KQXRH5FK.mjs +2 -0
- package/dist/esm/{chunk-UQIOMAXE.mjs.map → chunk-KQXRH5FK.mjs.map} +1 -1
- package/dist/esm/chunk-L7AA75WZ.mjs +2 -0
- package/dist/esm/chunk-L7AA75WZ.mjs.map +1 -0
- package/dist/esm/chunk-LACQ537H.mjs +2 -0
- package/dist/esm/{chunk-KFP7MDSD.mjs.map → chunk-LACQ537H.mjs.map} +1 -1
- package/dist/esm/{chunk-2MQZUGO6.mjs → chunk-LDAD54H5.mjs} +1 -1
- package/dist/esm/chunk-LDAD54H5.mjs.map +1 -0
- package/dist/esm/chunk-LXW3A3MJ.mjs +2 -0
- package/dist/esm/chunk-LXW3A3MJ.mjs.map +1 -0
- package/dist/esm/{chunk-KYWYIK5P.mjs → chunk-M2V2POWK.mjs} +2 -2
- package/dist/esm/chunk-M2V2POWK.mjs.map +1 -0
- package/dist/esm/chunk-ND3ZQKTT.mjs +2 -0
- package/dist/esm/chunk-ND3ZQKTT.mjs.map +1 -0
- package/dist/esm/chunk-NZIJV4O2.mjs +2 -0
- package/dist/esm/{chunk-HH5RSP2H.mjs.map → chunk-NZIJV4O2.mjs.map} +1 -1
- package/dist/esm/chunk-O2B54NZT.mjs +2 -0
- package/dist/esm/chunk-O2B54NZT.mjs.map +1 -0
- package/dist/esm/chunk-OCW2L33Q.mjs +2 -0
- package/dist/esm/chunk-OCW2L33Q.mjs.map +1 -0
- package/dist/esm/{chunk-PJDVHU7X.mjs → chunk-OCYS4V2V.mjs} +2 -2
- package/dist/esm/{chunk-PJDVHU7X.mjs.map → chunk-OCYS4V2V.mjs.map} +1 -1
- package/dist/esm/{chunk-VAGYTPSI.mjs → chunk-OSTH5JRX.mjs} +2 -2
- package/dist/esm/chunk-OSTH5JRX.mjs.map +1 -0
- package/dist/esm/chunk-OVHY6ZUJ.mjs +2 -0
- package/dist/esm/{chunk-JTGGMXB7.mjs.map → chunk-OVHY6ZUJ.mjs.map} +1 -1
- package/dist/esm/chunk-PZCMSHY6.mjs +2 -0
- package/dist/esm/chunk-QWVR4RCV.mjs +2 -0
- package/dist/esm/{chunk-IPJKGHQY.mjs.map → chunk-QWVR4RCV.mjs.map} +1 -1
- package/dist/esm/chunk-R3KWVOFG.mjs +2 -0
- package/dist/esm/{chunk-KWJ6XKNF.mjs.map → chunk-R3KWVOFG.mjs.map} +1 -1
- package/dist/esm/{chunk-TXUMB5ZO.mjs → chunk-RHS5ROLP.mjs} +2 -2
- package/dist/esm/chunk-RHS5ROLP.mjs.map +1 -0
- package/dist/esm/{chunk-IXMH6AXJ.mjs → chunk-RKKU2SY5.mjs} +2 -2
- package/dist/esm/chunk-RYETO74W.mjs +2 -0
- package/dist/esm/{chunk-BIUGRAMO.mjs.map → chunk-RYETO74W.mjs.map} +1 -1
- package/dist/esm/chunk-S36IYY6K.mjs +2 -0
- package/dist/esm/{chunk-DXUIJ6KA.mjs.map → chunk-S36IYY6K.mjs.map} +1 -1
- package/dist/esm/chunk-TGKB6ALT.mjs +2 -0
- package/dist/esm/chunk-TGKB6ALT.mjs.map +1 -0
- package/dist/esm/chunk-TIH6ARYP.mjs +2 -0
- package/dist/esm/{chunk-IZHPCZE3.mjs.map → chunk-TIH6ARYP.mjs.map} +1 -1
- package/dist/esm/chunk-TPWSHFFI.mjs +2 -0
- package/dist/esm/chunk-TPWSHFFI.mjs.map +1 -0
- package/dist/esm/chunk-U25N2VWA.mjs +2 -0
- package/dist/esm/{chunk-FNB6CFQR.mjs.map → chunk-U25N2VWA.mjs.map} +1 -1
- package/dist/esm/chunk-U6SZNNVL.mjs +2 -0
- package/dist/esm/chunk-U6SZNNVL.mjs.map +1 -0
- package/dist/esm/{chunk-EKAOAGNQ.mjs → chunk-UAAI3NCA.mjs} +2 -2
- package/dist/esm/{chunk-BTK34A5U.mjs → chunk-UDBH4CER.mjs} +42 -21
- package/dist/esm/chunk-UDBH4CER.mjs.map +1 -0
- package/dist/esm/chunk-VWVEDCBM.mjs +2 -0
- package/dist/esm/{chunk-BREUBEPM.mjs.map → chunk-VWVEDCBM.mjs.map} +1 -1
- package/dist/esm/{chunk-ZT2A5ABR.mjs → chunk-WEJAI26R.mjs} +2 -2
- package/dist/esm/{chunk-ZT2A5ABR.mjs.map → chunk-WEJAI26R.mjs.map} +1 -1
- package/dist/esm/chunk-WL4OXZLN.mjs +2 -0
- package/dist/esm/{chunk-KNLMUSIO.mjs.map → chunk-WL4OXZLN.mjs.map} +1 -1
- package/dist/esm/chunk-X32O46IB.mjs +2 -0
- package/dist/esm/{chunk-PDLUCVJB.mjs.map → chunk-X32O46IB.mjs.map} +1 -1
- package/dist/esm/{chunk-KPESAXVI.mjs → chunk-Y2HRRUZ6.mjs} +2 -2
- package/dist/esm/{chunk-GUT3G5CG.mjs → chunk-Y7VR7X5W.mjs} +2 -2
- package/dist/esm/chunk-Y7VR7X5W.mjs.map +1 -0
- package/dist/esm/chunk-YYRDFZE6.mjs +2 -0
- package/dist/esm/{chunk-UVGCVCNG.mjs.map → chunk-YYRDFZE6.mjs.map} +1 -1
- package/dist/esm/{chunk-TYHBYRUA.mjs → chunk-ZLW65YCO.mjs} +2 -2
- package/dist/esm/chunk-ZLW65YCO.mjs.map +1 -0
- package/dist/esm/chunk-ZUHN56GM.mjs +2 -0
- package/dist/esm/chunk-ZUHN56GM.mjs.map +1 -0
- package/dist/esm/{chunk-XNFEUXDS.mjs → chunk-ZWH2ESXT.mjs} +1 -1
- package/dist/esm/chunk-ZWH2ESXT.mjs.map +1 -0
- package/dist/esm/client/{core.d.ts → core.d.mts} +9 -9
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/{get.d.ts → get.d.mts} +12 -12
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.d.mts +11 -0
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/{post.d.ts → post.d.mts} +14 -14
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/client/{types.d.ts → types.d.mts} +5 -5
- package/dist/esm/client/types.mjs +1 -1
- package/dist/esm/core/{account.d.ts → account.d.mts} +13 -13
- package/dist/esm/core/account.mjs +1 -1
- package/dist/esm/core/{accountAddress.d.ts → accountAddress.d.mts} +11 -11
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/{authenticationKey.d.ts → authenticationKey.d.mts} +12 -12
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/{common.d.ts → common.d.mts} +1 -1
- package/dist/esm/core/common.mjs +1 -1
- package/dist/esm/core/crypto/{anyPublicKey.d.ts → anyPublicKey.d.mts} +11 -11
- package/dist/esm/core/crypto/anyPublicKey.mjs +1 -1
- package/dist/esm/core/crypto/{anySignature.d.ts → anySignature.d.mts} +10 -10
- package/dist/esm/core/crypto/anySignature.mjs +1 -1
- package/dist/esm/core/crypto/{asymmetricCrypto.d.ts → asymmetricCrypto.d.mts} +8 -8
- package/dist/esm/core/crypto/asymmetricCrypto.mjs +1 -1
- package/dist/esm/core/crypto/{ed25519.d.ts → ed25519.d.mts} +10 -10
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/{hdKey.d.ts → hdKey.d.mts} +1 -1
- package/dist/esm/core/crypto/hdKey.mjs +1 -1
- package/dist/esm/core/crypto/index.d.mts +17 -0
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/{multiEd25519.d.ts → multiEd25519.d.mts} +11 -11
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/{multiKey.d.ts → multiKey.d.mts} +12 -12
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/{secp256k1.d.ts → secp256k1.d.mts} +10 -10
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/{hex.d.ts → hex.d.mts} +6 -6
- package/dist/esm/core/hex.mjs +1 -1
- package/dist/esm/core/index.d.mts +21 -0
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/index.d.mts +64 -0
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/{account.d.ts → account.d.mts} +17 -17
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.d.mts +150 -0
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.d.mts +43 -0
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/{digitalAsset.d.ts → digitalAsset.d.mts} +34 -34
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/{event.d.ts → event.d.mts} +14 -14
- package/dist/esm/internal/event.mjs +1 -1
- package/dist/esm/internal/faucet.d.mts +29 -0
- package/dist/esm/internal/faucet.mjs +1 -1
- package/dist/esm/internal/{fungibleAsset.d.ts → fungibleAsset.d.mts} +7 -7
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/{general.d.ts → general.d.mts} +11 -11
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/{staking.d.ts → staking.d.mts} +13 -13
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/{transaction.d.ts → transaction.d.mts} +7 -7
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/{transactionSubmission.d.ts → transactionSubmission.d.mts} +41 -72
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/transactions/authenticator/{account.d.ts → account.d.mts} +15 -15
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.d.mts +19 -0
- package/dist/esm/transactions/authenticator/index.mjs +1 -1
- package/dist/esm/transactions/authenticator/{transaction.d.ts → transaction.d.mts} +18 -18
- package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
- package/dist/esm/transactions/index.d.mts +39 -0
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/instances/chainId.d.mts +21 -0
- package/dist/esm/transactions/instances/chainId.mjs +1 -1
- package/dist/esm/transactions/instances/{identifier.d.ts → identifier.d.mts} +9 -9
- package/dist/esm/transactions/instances/identifier.mjs +1 -1
- package/dist/esm/transactions/instances/index.d.mts +29 -0
- package/dist/esm/transactions/instances/index.mjs +1 -1
- package/dist/esm/transactions/instances/{moduleId.d.ts → moduleId.d.mts} +12 -12
- package/dist/esm/transactions/instances/moduleId.mjs +1 -1
- package/dist/esm/transactions/instances/{rawTransaction.d.ts → rawTransaction.d.mts} +16 -16
- package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/{rotationProofChallenge.d.ts → rotationProofChallenge.d.mts} +14 -14
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/{signedTransaction.d.ts → signedTransaction.d.mts} +25 -25
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/{transactionArgument.d.ts → transactionArgument.d.mts} +8 -8
- package/dist/esm/transactions/instances/{transactionPayload.d.ts → transactionPayload.d.mts} +14 -14
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/{helpers.d.ts → helpers.d.mts} +31 -31
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.d.mts +35 -0
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +54 -0
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/{transactionBuilder.d.ts → transactionBuilder.d.mts} +35 -40
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
- package/dist/esm/transactions/typeTag/{index.d.ts → index.d.mts} +12 -12
- package/dist/esm/transactions/typeTag/index.mjs +1 -1
- package/dist/esm/transactions/typeTag/{parser.d.ts → parser.d.mts} +14 -13
- package/dist/esm/transactions/typeTag/parser.mjs +1 -1
- package/dist/esm/transactions/{types.d.ts → types.d.mts} +60 -97
- package/dist/esm/types/generated/{operations.d.ts → operations.d.mts} +105 -79
- package/dist/esm/types/generated/{queries.d.ts → queries.d.mts} +35 -32
- package/dist/esm/types/generated/queries.mjs +1 -1
- package/dist/esm/types/generated/{types.d.ts → types.d.mts} +3184 -3146
- package/dist/esm/types/generated/types.mjs +1 -1
- package/dist/esm/types/generated/types.mjs.map +1 -1
- package/dist/esm/types/{index.d.ts → index.d.mts} +94 -92
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/types/indexer.d.mts +63 -0
- package/dist/esm/utils/apiEndpoints.mjs +1 -1
- package/dist/esm/utils/const.mjs +1 -1
- package/dist/esm/utils/helpers.mjs +1 -1
- package/dist/esm/utils/index.d.mts +2 -0
- package/dist/esm/utils/index.mjs +2 -0
- package/dist/esm/utils/index.mjs.map +1 -0
- package/dist/esm/utils/memoize.mjs +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +30 -30
- package/src/api/account.ts +2 -2
- package/src/api/ans.ts +250 -11
- package/src/api/aptos.ts +20 -0
- package/src/api/coin.ts +4 -4
- package/src/api/digitalAsset.ts +3 -3
- package/src/api/event.ts +2 -2
- package/src/api/general.ts +4 -4
- package/src/api/transactionSubmission/build.ts +42 -0
- package/src/api/transactionSubmission/sign.ts +44 -0
- package/src/api/transactionSubmission/simulate.ts +56 -0
- package/src/api/transactionSubmission/submit.ts +53 -0
- package/src/api/transactionSubmission.ts +4 -138
- package/src/client/core.ts +1 -1
- package/src/client/get.ts +6 -2
- package/src/client/post.ts +12 -4
- package/src/index.ts +1 -1
- package/src/internal/account.ts +2 -2
- package/src/internal/ans.ts +408 -22
- package/src/internal/coin.ts +5 -5
- package/src/internal/digitalAsset.ts +5 -5
- package/src/internal/event.ts +2 -2
- package/src/internal/general.ts +7 -6
- package/src/internal/queries/ansTokenFragment.graphql +9 -0
- package/src/internal/queries/getNames.graphql +11 -0
- package/src/internal/transactionSubmission.ts +52 -12
- package/src/transactions/transactionBuilder/helpers.ts +2 -2
- package/src/transactions/transactionBuilder/transactionBuilder.ts +22 -46
- package/src/transactions/typeTag/parser.ts +10 -2
- package/src/transactions/types.ts +16 -56
- package/src/types/generated/operations.ts +62 -33
- package/src/types/generated/queries.ts +56 -22
- package/src/types/generated/types.ts +2253 -2251
- package/src/types/index.ts +16 -10
- package/src/types/indexer.ts +3 -0
- package/src/utils/index.ts +2 -0
- package/dist/esm/api/ans.d.ts +0 -79
- package/dist/esm/api/aptos.d.ts +0 -72
- package/dist/esm/api/coin.d.ts +0 -59
- package/dist/esm/api/index.d.ts +0 -46
- package/dist/esm/api/transactionSubmission.d.ts +0 -142
- package/dist/esm/bcs/index.d.ts +0 -14
- package/dist/esm/chunk-2444YR3Y.mjs +0 -2
- package/dist/esm/chunk-2444YR3Y.mjs.map +0 -1
- package/dist/esm/chunk-2B5QXKPU.mjs.map +0 -1
- package/dist/esm/chunk-2MQZUGO6.mjs.map +0 -1
- package/dist/esm/chunk-3YOV42H5.mjs +0 -2
- package/dist/esm/chunk-3YOV42H5.mjs.map +0 -1
- package/dist/esm/chunk-7AIV5FEN.mjs +0 -2
- package/dist/esm/chunk-7AIV5FEN.mjs.map +0 -1
- package/dist/esm/chunk-7AQXAH6Q.mjs +0 -2
- package/dist/esm/chunk-7TL2MY2B.mjs +0 -2
- package/dist/esm/chunk-7TL2MY2B.mjs.map +0 -1
- package/dist/esm/chunk-ADR4XQPR.mjs +0 -2
- package/dist/esm/chunk-AY2HWVDO.mjs +0 -2
- package/dist/esm/chunk-AY2HWVDO.mjs.map +0 -1
- package/dist/esm/chunk-BIUGRAMO.mjs +0 -2
- package/dist/esm/chunk-BREUBEPM.mjs +0 -2
- package/dist/esm/chunk-BTK34A5U.mjs.map +0 -1
- package/dist/esm/chunk-CZZJAR3B.mjs +0 -2
- package/dist/esm/chunk-DXUIJ6KA.mjs +0 -2
- package/dist/esm/chunk-E72CFUU4.mjs +0 -2
- package/dist/esm/chunk-FHJ7F7Z6.mjs +0 -2
- package/dist/esm/chunk-FHJ7F7Z6.mjs.map +0 -1
- package/dist/esm/chunk-FNB6CFQR.mjs +0 -2
- package/dist/esm/chunk-GUT3G5CG.mjs.map +0 -1
- package/dist/esm/chunk-HH5RSP2H.mjs +0 -2
- package/dist/esm/chunk-IPJKGHQY.mjs +0 -2
- package/dist/esm/chunk-IZHPCZE3.mjs +0 -2
- package/dist/esm/chunk-J3QOSJFP.mjs +0 -2
- package/dist/esm/chunk-J5OKXARS.mjs +0 -2
- package/dist/esm/chunk-J5OKXARS.mjs.map +0 -1
- package/dist/esm/chunk-JTGGMXB7.mjs +0 -2
- package/dist/esm/chunk-KFP7MDSD.mjs +0 -2
- package/dist/esm/chunk-KJDY66XF.mjs +0 -2
- package/dist/esm/chunk-KJDY66XF.mjs.map +0 -1
- package/dist/esm/chunk-KNLMUSIO.mjs +0 -2
- package/dist/esm/chunk-KWJ6XKNF.mjs +0 -2
- package/dist/esm/chunk-KYWYIK5P.mjs.map +0 -1
- package/dist/esm/chunk-LAXIJRYU.mjs +0 -2
- package/dist/esm/chunk-LU6VS7PJ.mjs +0 -2
- package/dist/esm/chunk-MIBLZSNS.mjs.map +0 -1
- package/dist/esm/chunk-NKTKHC3Z.mjs +0 -2
- package/dist/esm/chunk-NKTKHC3Z.mjs.map +0 -1
- package/dist/esm/chunk-O243HOP3.mjs.map +0 -1
- package/dist/esm/chunk-PDLUCVJB.mjs +0 -2
- package/dist/esm/chunk-SJLO3JIH.mjs +0 -2
- package/dist/esm/chunk-TXUMB5ZO.mjs.map +0 -1
- package/dist/esm/chunk-TYHBYRUA.mjs.map +0 -1
- package/dist/esm/chunk-UQIOMAXE.mjs +0 -2
- package/dist/esm/chunk-UVGCVCNG.mjs +0 -2
- package/dist/esm/chunk-V6AAQLLJ.mjs +0 -2
- package/dist/esm/chunk-VAGYTPSI.mjs.map +0 -1
- package/dist/esm/chunk-WGXAIQ7K.mjs +0 -2
- package/dist/esm/chunk-WNEZCERQ.mjs +0 -2
- package/dist/esm/chunk-WNEZCERQ.mjs.map +0 -1
- package/dist/esm/chunk-XFSL7O6Q.mjs.map +0 -1
- package/dist/esm/chunk-YS2OX7AB.mjs +0 -2
- package/dist/esm/chunk-Z56AKXJ7.mjs +0 -2
- package/dist/esm/chunk-Z56AKXJ7.mjs.map +0 -1
- package/dist/esm/chunk-ZXJ5ZBTL.mjs +0 -2
- package/dist/esm/client/index.d.ts +0 -11
- package/dist/esm/core/crypto/index.d.ts +0 -17
- package/dist/esm/core/index.d.ts +0 -21
- package/dist/esm/index.d.ts +0 -60
- package/dist/esm/internal/ans.d.ts +0 -83
- package/dist/esm/internal/coin.d.ts +0 -43
- package/dist/esm/internal/faucet.d.ts +0 -29
- package/dist/esm/transactions/authenticator/index.d.ts +0 -19
- package/dist/esm/transactions/index.d.ts +0 -39
- package/dist/esm/transactions/instances/chainId.d.ts +0 -21
- package/dist/esm/transactions/instances/index.d.ts +0 -29
- package/dist/esm/transactions/transactionBuilder/index.d.ts +0 -35
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.ts +0 -54
- package/dist/esm/types/indexer.d.ts +0 -62
- /package/dist/esm/{chunk-XNFEUXDS.mjs.map → api/transactionSubmission/build.mjs.map} +0 -0
- /package/dist/esm/{chunk-E72CFUU4.mjs.map → chunk-EFIYW4WK.mjs.map} +0 -0
- /package/dist/esm/{chunk-SJLO3JIH.mjs.map → chunk-PZCMSHY6.mjs.map} +0 -0
- /package/dist/esm/{chunk-IXMH6AXJ.mjs.map → chunk-RKKU2SY5.mjs.map} +0 -0
- /package/dist/esm/{chunk-EKAOAGNQ.mjs.map → chunk-UAAI3NCA.mjs.map} +0 -0
- /package/dist/esm/{chunk-KPESAXVI.mjs.map → chunk-Y2HRRUZ6.mjs.map} +0 -0
- /package/dist/esm/utils/{apiEndpoints.d.ts → apiEndpoints.d.mts} +0 -0
- /package/dist/esm/utils/{const.d.ts → const.d.mts} +0 -0
- /package/dist/esm/utils/{helpers.d.ts → helpers.d.mts} +0 -0
- /package/dist/esm/utils/{memoize.d.ts → memoize.d.mts} +0 -0
- /package/dist/esm/{version.d.ts → version.d.mts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Network } from \"../utils/apiEndpoints\";\n\nexport * from \"./indexer\";\n\nexport enum MimeType {\n /**\n * JSON representation, used for transaction submission and accept type JSON output\n */\n JSON = \"application/json\",\n /**\n * BCS representation, used for accept type BCS output\n */\n BCS = \"application/x-bcs\",\n /**\n * BCS representation, used for transaction submission in BCS input\n */\n BCS_SIGNED_TRANSACTION = \"application/x.aptos.signed_transaction+bcs\",\n}\n\n/**\n * Hex data as input to a function\n */\nexport type HexInput = string | Uint8Array;\n\n/**\n * TypeTag enum as they are represented in Rust\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/third_party/move/move-core/types/src/language_storage.rs#L27}\n */\nexport enum TypeTagVariants {\n Bool = 0,\n U8 = 1,\n U64 = 2,\n U128 = 3,\n Address = 4,\n Signer = 5,\n Vector = 6,\n Struct = 7,\n U16 = 8,\n U32 = 9,\n U256 = 10,\n Reference = 254, // This is specifically a placeholder and does not represent a real type\n Generic = 255, // This is specifically a placeholder and does not represent a real type\n}\n\n/**\n * Script transaction arguments enum as they are represented in Rust\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/third_party/move/move-core/types/src/transaction_argument.rs#L11}\n */\nexport enum ScriptTransactionArgumentVariants {\n U8 = 0,\n U64 = 1,\n U128 = 2,\n Address = 3,\n U8Vector = 4,\n Bool = 5,\n U16 = 6,\n U32 = 7,\n U256 = 8,\n}\n\n/**\n * Transaction payload enum as they are represented in Rust\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/mod.rs#L478}\n */\nexport enum TransactionPayloadVariants {\n Script = 0,\n EntryFunction = 2,\n Multisig = 3,\n}\n\n/**\n * Transaction variants enum as they are represented in Rust\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/mod.rs#L440}\n */\nexport enum TransactionVariants {\n MultiAgentTransaction = 0,\n FeePayerTransaction = 1,\n}\n\n/**\n * Transaction Authenticator enum as they are represented in Rust\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs#L44}\n */\nexport enum TransactionAuthenticatorVariant {\n Ed25519 = 0,\n MultiEd25519 = 1,\n MultiAgent = 2,\n FeePayer = 3,\n SingleSender = 4,\n}\n\n/**\n * Transaction Authenticator enum as they are represented in Rust\n * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs#L414}\n */\nexport enum AccountAuthenticatorVariant {\n Ed25519 = 0,\n MultiEd25519 = 1,\n SingleKey = 2,\n MultiKey = 3,\n}\n\nexport enum AnyPublicKeyVariant {\n Ed25519 = 0,\n Secp256k1 = 1,\n}\n\nexport enum AnySignatureVariant {\n Ed25519 = 0,\n Secp256k1 = 1,\n}\n\n/**\n * BCS types\n */\nexport type Uint8 = number;\nexport type Uint16 = number;\nexport type Uint32 = number;\nexport type Uint64 = bigint;\nexport type Uint128 = bigint;\nexport type Uint256 = bigint;\nexport type AnyNumber = number | bigint;\n\n/**\n * Set of configuration options that can be provided when initializing the SDK.\n * The purpose of these options is to configure various aspects of the SDK's\n * behavior and interaction with the Aptos network\n */\nexport type AptosSettings = {\n readonly network?: Network;\n\n readonly fullnode?: string;\n\n readonly faucet?: string;\n\n readonly indexer?: string;\n\n readonly clientConfig?: ClientConfig;\n\n readonly client?: Client;\n};\n\n/**\n *\n * Controls the number of results that are returned and the starting position of those results.\n * @param offset parameter specifies the starting position of the query result within the set of data. Default is 0.\n * @param limit specifies the maximum number of items or records to return in a query result. Default is 25.\n */\nexport interface PaginationArgs {\n offset?: AnyNumber;\n limit?: number;\n}\n\n/**\n * QUERY TYPES\n */\n\n/**\n * A configuration object we can pass with the request to the server.\n *\n * @param AUTH_TOKEN - an auth token to send with a faucet request\n * @param API_KEY - api key generated from developer portal {@link https://developers.aptoslabs.com/manage/api-keys}}\n * @param HEADERS - extra headers we want to send with the request\n * @param WITH_CREDENTIALS - whether to carry cookies. By default, it is set to true and cookies will be sent\n */\nexport type ClientConfig = {\n AUTH_TOKEN?: string;\n API_KEY?: string;\n HEADERS?: Record<string, string | number | boolean>;\n WITH_CREDENTIALS?: boolean;\n};\n\nexport interface ClientRequest<Req> {\n url: string;\n method: \"GET\" | \"POST\";\n body?: Req;\n contentType?: string;\n params?: any;\n overrides?: ClientConfig;\n headers?: Record<string, any>;\n}\n\nexport interface ClientResponse<Res> {\n status: number;\n statusText: string;\n data: Res;\n config?: any;\n request?: any;\n response?: any;\n headers?: any;\n}\n\nexport interface Client {\n provider<Req, Res>(requestOptions: ClientRequest<Req>): Promise<ClientResponse<Res>>;\n}\n\n/**\n * The API request type\n *\n * @param url - the url to make the request to, i.e https://fullnode.aptoslabs.devnet.com/v1\n * @param method - the request method \"GET\" | \"POST\"\n * @param endpoint (optional) - the endpoint to make the request to, i.e transactions\n * @param body (optional) - the body of the request\n * @param contentType (optional) - the content type to set the `content-type` header to,\n * by default is set to `application/json`\n * @param params (optional) - query params to add to the request\n * @param originMethod (optional) - the local method the request came from\n * @param overrides (optional) - a `ClientConfig` object type to override request data\n */\nexport type AptosRequest = {\n url: string;\n method: \"GET\" | \"POST\";\n path?: string;\n body?: any;\n contentType?: string;\n acceptType?: string;\n params?: Record<string, string | AnyNumber | boolean | undefined>;\n originMethod?: string;\n overrides?: ClientConfig;\n};\n\n/**\n * Specifies ledger version of transactions. By default latest version will be used\n */\nexport type LedgerVersion = {\n ledgerVersion?: AnyNumber;\n};\n\n/**\n * RESPONSE TYPES\n */\n\n/**\n * Type holding the outputs of the estimate gas API\n */\nexport type GasEstimation = {\n /**\n * The deprioritized estimate for the gas unit price\n */\n deprioritized_gas_estimate?: number;\n /**\n * The current estimate for the gas unit price\n */\n gas_estimate: number;\n /**\n * The prioritized estimate for the gas unit price\n */\n prioritized_gas_estimate?: number;\n};\n\nexport type MoveResource = {\n type: MoveStructId;\n data: {};\n};\n\nexport type AccountData = {\n sequence_number: string;\n authentication_key: string;\n};\n\nexport type MoveModuleBytecode = {\n bytecode: string;\n abi?: MoveModule;\n};\n\n/**\n * TRANSACTION TYPES\n */\n\nexport enum TransactionResponseType {\n Pending = \"pending_transaction\",\n User = \"user_transaction\",\n Genesis = \"genesis_transaction\",\n BlockMetadata = \"block_metadata_transaction\",\n StateCheckpoint = \"state_checkpoint_transaction\",\n}\n\nexport type TransactionResponse =\n | PendingTransactionResponse\n | UserTransactionResponse\n | GenesisTransactionResponse\n | BlockMetadataTransactionResponse\n | StateCheckpointTransactionResponse;\n\nexport type PendingTransactionResponse = {\n type: TransactionResponseType.Pending;\n hash: string;\n sender: string;\n sequence_number: string;\n max_gas_amount: string;\n gas_unit_price: string;\n expiration_timestamp_secs: string;\n payload: TransactionPayloadResponse;\n signature?: TransactionSignature;\n};\n\nexport type UserTransactionResponse = {\n type: TransactionResponseType.User;\n version: string;\n hash: string;\n state_change_hash: string;\n event_root_hash: string;\n state_checkpoint_hash?: string;\n gas_used: string;\n /**\n * Whether the transaction was successful\n */\n success: boolean;\n /**\n * The VM status of the transaction, can tell useful information in a failure\n */\n vm_status: string;\n accumulator_root_hash: string;\n /**\n * Final state of resources changed by the transaction\n */\n changes: Array<WriteSetChange>;\n sender: string;\n sequence_number: string;\n max_gas_amount: string;\n gas_unit_price: string;\n expiration_timestamp_secs: string;\n payload: TransactionPayloadResponse;\n signature?: TransactionSignature;\n /**\n * Events generated by the transaction\n */\n events: Array<Event>;\n timestamp: string;\n};\n\nexport type GenesisTransactionResponse = {\n type: TransactionResponseType.Genesis;\n version: string;\n hash: string;\n state_change_hash: string;\n event_root_hash: string;\n state_checkpoint_hash?: string;\n gas_used: string;\n /**\n * Whether the transaction was successful\n */\n success: boolean;\n /**\n * The VM status of the transaction, can tell useful information in a failure\n */\n vm_status: string;\n accumulator_root_hash: string;\n /**\n * Final state of resources changed by the transaction\n */\n changes: Array<WriteSetChange>;\n payload: GenesisPayload;\n /**\n * Events emitted during genesis\n */\n events: Array<Event>;\n};\n\nexport type BlockMetadataTransactionResponse = {\n type: TransactionResponseType.BlockMetadata;\n version: string;\n hash: string;\n state_change_hash: string;\n event_root_hash: string;\n state_checkpoint_hash?: string;\n gas_used: string;\n /**\n * Whether the transaction was successful\n */\n success: boolean;\n /**\n * The VM status of the transaction, can tell useful information in a failure\n */\n vm_status: string;\n accumulator_root_hash: string;\n /**\n * Final state of resources changed by the transaction\n */\n changes: Array<WriteSetChange>;\n id: string;\n epoch: string;\n round: string;\n /**\n * The events emitted at the block creation\n */\n events: Array<Event>;\n /**\n * Previous block votes\n */\n previous_block_votes_bitvec: Array<number>;\n proposer: string;\n /**\n * The indices of the proposers who failed to propose\n */\n failed_proposer_indices: Array<number>;\n timestamp: string;\n};\n\nexport type StateCheckpointTransactionResponse = {\n type: TransactionResponseType.StateCheckpoint;\n version: string;\n hash: string;\n state_change_hash: string;\n event_root_hash: string;\n state_checkpoint_hash?: string;\n gas_used: string;\n /**\n * Whether the transaction was successful\n */\n success: boolean;\n /**\n * The VM status of the transaction, can tell useful information in a failure\n */\n vm_status: string;\n accumulator_root_hash: string;\n /**\n * Final state of resources changed by the transaction\n */\n changes: Array<WriteSetChange>;\n timestamp: string;\n};\n\n/**\n * WRITESET CHANGE TYPES\n */\n\nexport type WriteSetChange =\n | WriteSetChangeDeleteModule\n | WriteSetChangeDeleteResource\n | WriteSetChangeDeleteTableItem\n | WriteSetChangeWriteModule\n | WriteSetChangeWriteResource\n | WriteSetChangeWriteTableItem;\n\nexport type WriteSetChangeDeleteModule = {\n type: string;\n address: string;\n /**\n * State key hash\n */\n state_key_hash: string;\n module: MoveModuleId;\n};\n\nexport type WriteSetChangeDeleteResource = {\n type: string;\n address: string;\n state_key_hash: string;\n resource: string;\n};\n\nexport type WriteSetChangeDeleteTableItem = {\n type: string;\n state_key_hash: string;\n handle: string;\n key: string;\n data?: DeletedTableData;\n};\n\nexport type WriteSetChangeWriteModule = {\n type: string;\n address: string;\n state_key_hash: string;\n data: MoveModuleBytecode;\n};\n\nexport type WriteSetChangeWriteResource = {\n type: string;\n address: string;\n state_key_hash: string;\n data: MoveResource;\n};\n\nexport type WriteSetChangeWriteTableItem = {\n type: string;\n state_key_hash: string;\n handle: string;\n key: string;\n value: string;\n data?: DecodedTableData;\n};\n\nexport type DecodedTableData = {\n /**\n * Key of table in JSON\n */\n key: any;\n /**\n * Type of key\n */\n key_type: string;\n /**\n * Value of table in JSON\n */\n value: any;\n /**\n * Type of value\n */\n value_type: string;\n};\n\n/**\n * Deleted table data\n */\nexport type DeletedTableData = {\n /**\n * Deleted key\n */\n key: any;\n /**\n * Deleted key type\n */\n key_type: string;\n};\n\nexport type TransactionPayloadResponse = EntryFunctionPayloadResponse | ScriptPayloadResponse | MultisigPayloadResponse;\n\nexport type EntryFunctionPayloadResponse = {\n type: string;\n function: MoveFunctionId;\n /**\n * Type arguments of the function\n */\n type_arguments: Array<string>;\n /**\n * Arguments of the function\n */\n arguments: Array<any>;\n};\n\nexport type ScriptPayloadResponse = {\n type: string;\n code: MoveScriptBytecode;\n /**\n * Type arguments of the function\n */\n type_arguments: Array<string>;\n /**\n * Arguments of the function\n */\n arguments: Array<any>;\n};\n\nexport type MultisigPayloadResponse = {\n type: string;\n multisig_address: string;\n transaction_payload?: EntryFunctionPayloadResponse;\n};\n\nexport type GenesisPayload = {\n type: string;\n write_set: WriteSet;\n};\n\n/**\n * Move script bytecode\n */\nexport type MoveScriptBytecode = {\n bytecode: string;\n abi?: MoveFunction;\n};\n\n/**\n * These are the JSON representations of transaction signatures returned from the node API.\n */\nexport type TransactionSignature =\n | TransactionEd25519Signature\n | TransactionSecp256k1Signature\n | TransactionMultiEd25519Signature\n | TransactionMultiAgentSignature\n | TransactionFeePayerSignature;\n\nexport type TransactionEd25519Signature = {\n type: string;\n public_key: string;\n signature: \"ed25519_signature\";\n};\n\nexport type TransactionSecp256k1Signature = {\n type: string;\n public_key: string;\n signature: \"secp256k1_ecdsa_signature\";\n};\n\nexport type TransactionMultiEd25519Signature = {\n type: \"multi_ed25519_signature\";\n /**\n * The public keys for the Ed25519 signature\n */\n public_keys: Array<string>;\n /**\n * Signature associated with the public keys in the same order\n */\n signatures: Array<string>;\n /**\n * The number of signatures required for a successful transaction\n */\n threshold: number;\n bitmap: string;\n};\n\nexport type TransactionMultiAgentSignature = {\n type: \"multi_agent_signature\";\n sender: AccountSignature;\n /**\n * The other involved parties' addresses\n */\n secondary_signer_addresses: Array<string>;\n /**\n * The associated signatures, in the same order as the secondary addresses\n */\n secondary_signers: Array<AccountSignature>;\n};\n\nexport type TransactionFeePayerSignature = {\n type: \"fee_payer_signature\";\n sender: AccountSignature;\n /**\n * The other involved parties' addresses\n */\n secondary_signer_addresses: Array<string>;\n /**\n * The associated signatures, in the same order as the secondary addresses\n */\n secondary_signers: Array<AccountSignature>;\n fee_payer_address: string;\n fee_payer_signer: AccountSignature;\n};\n\n/**\n * The union of all single account signatures.\n */\nexport type AccountSignature = AccountEd25519Signature | AccountSecp256k1Signature | AccountMultiEd25519Signature;\n\nexport type AccountEd25519Signature = TransactionEd25519Signature;\n\nexport type AccountSecp256k1Signature = TransactionSecp256k1Signature;\n\nexport type AccountMultiEd25519Signature = TransactionMultiEd25519Signature;\n\nexport type WriteSet = ScriptWriteSet | DirectWriteSet;\n\nexport type ScriptWriteSet = {\n type: string;\n execute_as: string;\n script: ScriptPayloadResponse;\n};\n\nexport type DirectWriteSet = {\n type: string;\n changes: Array<WriteSetChange>;\n events: Array<Event>;\n};\n\nexport type EventGuid = {\n creation_number: string;\n account_address: string;\n};\n\nexport type Event = {\n guid: EventGuid;\n sequence_number: string;\n type: string;\n /**\n * The JSON representation of the event\n */\n data: any;\n};\n\n/**\n * Map of Move types to local TypeScript types\n */\nexport type MoveUint8Type = number;\nexport type MoveUint16Type = number;\nexport type MoveUint32Type = number;\nexport type MoveUint64Type = string;\nexport type MoveUint128Type = string;\nexport type MoveUint256Type = string;\nexport type MoveAddressType = string;\nexport type MoveObjectType = string;\nexport type MoveOptionType = MoveType | null | undefined;\n/**\n * This is the format for a fully qualified struct, resource, or entry function in Move.\n */\nexport type MoveStructId = `${string}::${string}::${string}`;\n// These are the same, unfortunately, it reads really strangely to take a StructId for a Function and there wasn't a\n// good middle ground name.\nexport type MoveFunctionId = MoveStructId;\n\n// TODO: Add support for looking up ABI to add proper typing\nexport type MoveStructType = {};\n\nexport type MoveType =\n | boolean\n | string\n | MoveUint8Type\n | MoveUint16Type\n | MoveUint32Type\n | MoveUint64Type\n | MoveUint128Type\n | MoveUint256Type\n | MoveAddressType\n | MoveObjectType\n | MoveStructType\n | Array<MoveType>;\n\n/**\n * Possible Move values acceptable by move functions (entry, view)\n *\n * Map of a Move value to the corresponding TypeScript value\n *\n * `Bool -> boolean`\n *\n * `u8, u16, u32 -> number`\n *\n * `u64, u128, u256 -> string`\n *\n * `String -> string`\n *\n * `Address -> 0x${string}`\n *\n * `Struct - 0x${string}::${string}::${string}`\n *\n * `Object -> 0x${string}`\n *\n * `Vector -> Array<MoveValue>`\n *\n * `Option -> MoveValue | null | undefined`\n */\nexport type MoveValue =\n | boolean\n | string\n | MoveUint8Type\n | MoveUint16Type\n | MoveUint32Type\n | MoveUint64Type\n | MoveUint128Type\n | MoveUint256Type\n | MoveAddressType\n | MoveObjectType\n | MoveStructId\n | MoveOptionType\n | Array<MoveValue>;\n\n/**\n * Move module id is a string representation of Move module.\n * Module name is case-sensitive.\n */\nexport type MoveModuleId = `${string}::${string}`;\n\n/**\n * Move function visibility\n */\nexport enum MoveFunctionVisibility {\n PRIVATE = \"private\",\n PUBLIC = \"public\",\n FRIEND = \"friend\",\n}\n\n/**\n * Move function ability\n */\nexport enum MoveAbility {\n STORE = \"store\",\n DROP = \"drop\",\n KEY = \"key\",\n COPY = \"copy\",\n}\n\n/**\n * Move abilities tied to the generic type param and associated with the function that uses it\n */\nexport type MoveFunctionGenericTypeParam = {\n constraints: Array<MoveAbility>;\n};\n\n/**\n * Move struct field\n */\nexport type MoveStructField = {\n name: string;\n type: string;\n};\n\n/**\n * A Move module\n */\nexport type MoveModule = {\n address: string;\n name: string;\n /**\n * Friends of the module\n */\n friends: Array<MoveModuleId>;\n /**\n * Public functions of the module\n */\n exposed_functions: Array<MoveFunction>;\n /**\n * Structs of the module\n */\n structs: Array<MoveStruct>;\n};\n\n/**\n * A move struct\n */\nexport type MoveStruct = {\n name: string;\n /**\n * Whether the struct is a native struct of Move\n */\n is_native: boolean;\n /**\n * Abilities associated with the struct\n */\n abilities: Array<MoveAbility>;\n /**\n * Generic types associated with the struct\n */\n generic_type_params: Array<MoveFunctionGenericTypeParam>;\n /**\n * Fields associated with the struct\n */\n fields: Array<MoveStructField>;\n};\n\n/**\n * Move function\n */\nexport type MoveFunction = {\n name: string;\n visibility: MoveFunctionVisibility;\n /**\n * Whether the function can be called as an entry function directly in a transaction\n */\n is_entry: boolean;\n /**\n * Whether the function is a view function or not\n */\n is_view: boolean;\n /**\n * Generic type params associated with the Move function\n */\n generic_type_params: Array<MoveFunctionGenericTypeParam>;\n /**\n * Parameters associated with the move function\n */\n params: Array<string>;\n /**\n * Return type of the function\n */\n return: Array<string>;\n};\n\nexport enum RoleType {\n VALIDATOR = \"validator\",\n FULL_NODE = \"full_node\",\n}\n\nexport type LedgerInfo = {\n /**\n * Chain ID of the current chain\n */\n chain_id: number;\n epoch: string;\n ledger_version: string;\n oldest_ledger_version: string;\n ledger_timestamp: string;\n node_role: RoleType;\n oldest_block_height: string;\n block_height: string;\n /**\n * Git hash of the build of the API endpoint. Can be used to determine the exact\n * software version used by the API endpoint.\n */\n git_hash?: string;\n};\n\n/**\n * A Block type\n */\nexport type Block = {\n block_height: string;\n block_hash: string;\n block_timestamp: string;\n first_version: string;\n last_version: string;\n /**\n * The transactions in the block in sequential order\n */\n transactions?: Array<TransactionResponse>;\n};\n\n/**\n * The data needed to generate a View Request payload\n */\nexport type InputViewRequestData = {\n function: MoveFunctionId;\n typeArguments?: Array<MoveStructId>;\n functionArguments?: Array<MoveValue>;\n};\n\n// REQUEST TYPES\n\n/**\n * View request for the Move view function API\n *\n * `type MoveFunctionId = ${string}::${string}::${string}`;\n */\nexport type ViewRequest = {\n function: MoveFunctionId;\n /**\n * Type arguments of the function\n */\n typeArguments: Array<MoveStructId>;\n /**\n * Arguments of the function\n */\n functionArguments: Array<MoveValue>;\n};\n\n/**\n * Table Item request for the GetTableItem API\n */\nexport type TableItemRequest = {\n key_type: MoveValue;\n value_type: MoveValue;\n /**\n * The value of the table item's key\n */\n key: any;\n};\n\n/**\n * A list of Authentication Key schemes that are supported by Aptos.\n *\n * They are combinations of signing schemes and derive schemes.\n */\nexport type AuthenticationKeyScheme = SigningScheme | DeriveScheme;\n\nexport enum SigningScheme {\n /**\n * For Ed25519PublicKey\n */\n Ed25519 = 0,\n /**\n * For MultiEd25519PublicKey\n */\n MultiEd25519 = 1,\n /**\n * For SingleKey ecdsa\n */\n SingleKey = 2,\n\n MultiKey = 3,\n}\n\nexport enum SigningSchemeInput {\n /**\n * For Ed25519PublicKey\n */\n Ed25519 = 0,\n /**\n * For Secp256k1Ecdsa\n */\n Secp256k1Ecdsa = 2,\n}\n\n/**\n * Scheme used for deriving account addresses from other data\n */\nexport enum DeriveScheme {\n /**\n * Derives an address using an AUID, used for objects\n */\n DeriveAuid = 251,\n /**\n * Derives an address from another object address\n */\n DeriveObjectAddressFromObject = 252,\n /**\n * Derives an address from a GUID, used for objects\n */\n DeriveObjectAddressFromGuid = 253,\n /**\n * Derives an address from seed bytes, used for named objects\n */\n DeriveObjectAddressFromSeed = 254,\n /**\n * Derives an address from seed bytes, used for resource accounts\n */\n DeriveResourceAccountAddress = 255,\n}\n\n/**\n * Option properties to pass for waitForTransaction() function\n */\nexport type WaitForTransactionOptions = {\n timeoutSecs?: number;\n checkSuccess?: boolean;\n indexerVersionCheck?: boolean;\n};\n\n/**\n * Input type to generate an account using Single Signer\n * Ed25519 or Legacy Ed25519\n */\nexport type GenerateAccountWithEd25519 = {\n scheme: SigningSchemeInput.Ed25519;\n legacy: boolean;\n};\n\n/**\n * Input type to generate an account using Single Signer\n * Secp256k1\n */\nexport type GenerateAccountWithSingleSignerSecp256k1Key = {\n scheme: SigningSchemeInput.Secp256k1Ecdsa;\n legacy?: false;\n};\n\nexport type GenerateAccount = GenerateAccountWithEd25519 | GenerateAccountWithSingleSignerSecp256k1Key;\n"],"mappings":"AAOO,IAAKA,OAIVA,EAAA,KAAO,mBAIPA,EAAA,IAAM,oBAINA,EAAA,uBAAyB,6CAZfA,OAAA,IAwBAC,OACVA,IAAA,KAAO,GAAP,OACAA,IAAA,GAAK,GAAL,KACAA,IAAA,IAAM,GAAN,MACAA,IAAA,KAAO,GAAP,OACAA,IAAA,QAAU,GAAV,UACAA,IAAA,OAAS,GAAT,SACAA,IAAA,OAAS,GAAT,SACAA,IAAA,OAAS,GAAT,SACAA,IAAA,IAAM,GAAN,MACAA,IAAA,IAAM,GAAN,MACAA,IAAA,KAAO,IAAP,OACAA,IAAA,UAAY,KAAZ,YACAA,IAAA,QAAU,KAAV,UAbUA,OAAA,IAoBAC,OACVA,IAAA,GAAK,GAAL,KACAA,IAAA,IAAM,GAAN,MACAA,IAAA,KAAO,GAAP,OACAA,IAAA,QAAU,GAAV,UACAA,IAAA,SAAW,GAAX,WACAA,IAAA,KAAO,GAAP,OACAA,IAAA,IAAM,GAAN,MACAA,IAAA,IAAM,GAAN,MACAA,IAAA,KAAO,GAAP,OATUA,OAAA,IAgBAC,OACVA,IAAA,OAAS,GAAT,SACAA,IAAA,cAAgB,GAAhB,gBACAA,IAAA,SAAW,GAAX,WAHUA,OAAA,IAUAC,OACVA,IAAA,sBAAwB,GAAxB,wBACAA,IAAA,oBAAsB,GAAtB,sBAFUA,OAAA,IASAC,OACVA,IAAA,QAAU,GAAV,UACAA,IAAA,aAAe,GAAf,eACAA,IAAA,WAAa,GAAb,aACAA,IAAA,SAAW,GAAX,WACAA,IAAA,aAAe,GAAf,eALUA,OAAA,IAYAC,OACVA,IAAA,QAAU,GAAV,UACAA,IAAA,aAAe,GAAf,eACAA,IAAA,UAAY,GAAZ,YACAA,IAAA,SAAW,GAAX,WAJUA,OAAA,IAOAC,OACVA,IAAA,QAAU,GAAV,UACAA,IAAA,UAAY,GAAZ,YAFUA,OAAA,IAKAC,OACVA,IAAA,QAAU,GAAV,UACAA,IAAA,UAAY,GAAZ,YAFUA,OAAA,IAkKAC,OACVA,EAAA,QAAU,sBACVA,EAAA,KAAO,mBACPA,EAAA,QAAU,sBACVA,EAAA,cAAgB,6BAChBA,EAAA,gBAAkB,+BALRA,OAAA,IAqeAC,OACVA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,OAAS,SAHCA,OAAA,IASAC,OACVA,EAAA,MAAQ,QACRA,EAAA,KAAO,OACPA,EAAA,IAAM,MACNA,EAAA,KAAO,OAJGA,OAAA,IA6FAC,OACVA,EAAA,UAAY,YACZA,EAAA,UAAY,YAFFA,OAAA,IAsFAC,OAIVA,IAAA,QAAU,GAAV,UAIAA,IAAA,aAAe,GAAf,eAIAA,IAAA,UAAY,GAAZ,YAEAA,IAAA,SAAW,GAAX,WAdUA,OAAA,IAiBAC,OAIVA,IAAA,QAAU,GAAV,UAIAA,IAAA,eAAiB,GAAjB,iBARUA,OAAA,IAcAC,OAIVA,IAAA,WAAa,KAAb,aAIAA,IAAA,8BAAgC,KAAhC,gCAIAA,IAAA,4BAA8B,KAA9B,8BAIAA,IAAA,4BAA8B,KAA9B,8BAIAA,IAAA,6BAA+B,KAA/B,+BApBUA,OAAA","names":["MimeType","TypeTagVariants","ScriptTransactionArgumentVariants","TransactionPayloadVariants","TransactionVariants","TransactionAuthenticatorVariant","AccountAuthenticatorVariant","AnyPublicKeyVariant","AnySignatureVariant","TransactionResponseType","MoveFunctionVisibility","MoveAbility","RoleType","SigningScheme","SigningSchemeInput","DeriveScheme"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as t}from"./chunk-62SCW5NH.mjs";import{a as r}from"./chunk-RYETO74W.mjs";import{a as s}from"./chunk-EFIYW4WK.mjs";var o=class n extends s{constructor(e){super();this.publicKey=e}toUint8Array(){return this.publicKey.toUint8Array()}toString(){return this.publicKey.toString()}verifySignature(e){let{message:i,signature:l}=e;return this.publicKey.verifySignature({message:i,signature:l})}serialize(e){if(this.publicKey instanceof r)e.serializeU32AsUleb128(0),this.publicKey.serialize(e);else if(this.publicKey instanceof t)e.serializeU32AsUleb128(1),this.publicKey.serialize(e);else throw new Error("Unknown public key type")}static deserialize(e){let i=e.deserializeUleb128AsU32();switch(i){case 0:return new n(r.load(e));case 1:return new n(t.load(e));default:throw new Error(`Unknown variant index for AnyPublicKey: ${i}`)}}};export{o as a};
|
|
2
|
+
//# sourceMappingURL=chunk-YYRDFZE6.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/core/crypto/anyPublicKey.ts"],"sourcesContent":["import { Serializer, Deserializer } from \"../../bcs\";\nimport { AnyPublicKeyVariant, HexInput } from \"../../types\";\nimport { AnySignature } from \"./anySignature\";\nimport { PublicKey } from \"./asymmetricCrypto\";\nimport { Ed25519PublicKey } from \"./ed25519\";\nimport { Secp256k1PublicKey } from \"./secp256k1\";\n\n/**\n * Represents any public key supported by Aptos.\n *\n * Since [AIP-55](https://github.com/aptos-foundation/AIPs/pull/263) Aptos supports\n * `Legacy` and `Unified` authentication keys.\n *\n * Any unified authentication key is represented in the SDK as `AnyPublicKey`.\n */\nexport class AnyPublicKey extends PublicKey {\n /**\n * Reference to the inner public key\n */\n public readonly publicKey: PublicKey;\n\n constructor(publicKey: PublicKey) {\n super();\n this.publicKey = publicKey;\n }\n\n /**\n * Get the public key in bytes (Uint8Array).\n *\n * @returns Uint8Array representation of the public key\n */\n toUint8Array(): Uint8Array {\n return this.publicKey.toUint8Array();\n }\n\n /**\n * Get the public key as a hex string with the 0x prefix.\n *\n * @returns string representation of the public key\n */\n toString(): string {\n return this.publicKey.toString();\n }\n\n /**\n * Verifies a signed data with a public key\n *\n * @param args.message message\n * @param args.signature The signature\n * @returns true if the signature is valid\n */\n verifySignature(args: { message: HexInput; signature: AnySignature }): boolean {\n const { message, signature } = args;\n return this.publicKey.verifySignature({ message, signature });\n }\n\n serialize(serializer: Serializer): void {\n if (this.publicKey instanceof Ed25519PublicKey) {\n serializer.serializeU32AsUleb128(AnyPublicKeyVariant.Ed25519);\n this.publicKey.serialize(serializer);\n } else if (this.publicKey instanceof Secp256k1PublicKey) {\n serializer.serializeU32AsUleb128(AnyPublicKeyVariant.Secp256k1);\n this.publicKey.serialize(serializer);\n } else {\n throw new Error(\"Unknown public key type\");\n }\n }\n\n static deserialize(deserializer: Deserializer): AnyPublicKey {\n const index = deserializer.deserializeUleb128AsU32();\n switch (index) {\n case AnyPublicKeyVariant.Ed25519:\n return new AnyPublicKey(Ed25519PublicKey.load(deserializer));\n case AnyPublicKeyVariant.Secp256k1:\n return new AnyPublicKey(Secp256k1PublicKey.load(deserializer));\n default:\n throw new Error(`Unknown variant index for AnyPublicKey: ${index}`);\n }\n }\n}\n"],"mappings":"2HAeO,IAAMA,EAAN,
|
|
1
|
+
{"version":3,"sources":["../../src/core/crypto/anyPublicKey.ts"],"sourcesContent":["import { Serializer, Deserializer } from \"../../bcs\";\nimport { AnyPublicKeyVariant, HexInput } from \"../../types\";\nimport { AnySignature } from \"./anySignature\";\nimport { PublicKey } from \"./asymmetricCrypto\";\nimport { Ed25519PublicKey } from \"./ed25519\";\nimport { Secp256k1PublicKey } from \"./secp256k1\";\n\n/**\n * Represents any public key supported by Aptos.\n *\n * Since [AIP-55](https://github.com/aptos-foundation/AIPs/pull/263) Aptos supports\n * `Legacy` and `Unified` authentication keys.\n *\n * Any unified authentication key is represented in the SDK as `AnyPublicKey`.\n */\nexport class AnyPublicKey extends PublicKey {\n /**\n * Reference to the inner public key\n */\n public readonly publicKey: PublicKey;\n\n constructor(publicKey: PublicKey) {\n super();\n this.publicKey = publicKey;\n }\n\n /**\n * Get the public key in bytes (Uint8Array).\n *\n * @returns Uint8Array representation of the public key\n */\n toUint8Array(): Uint8Array {\n return this.publicKey.toUint8Array();\n }\n\n /**\n * Get the public key as a hex string with the 0x prefix.\n *\n * @returns string representation of the public key\n */\n toString(): string {\n return this.publicKey.toString();\n }\n\n /**\n * Verifies a signed data with a public key\n *\n * @param args.message message\n * @param args.signature The signature\n * @returns true if the signature is valid\n */\n verifySignature(args: { message: HexInput; signature: AnySignature }): boolean {\n const { message, signature } = args;\n return this.publicKey.verifySignature({ message, signature });\n }\n\n serialize(serializer: Serializer): void {\n if (this.publicKey instanceof Ed25519PublicKey) {\n serializer.serializeU32AsUleb128(AnyPublicKeyVariant.Ed25519);\n this.publicKey.serialize(serializer);\n } else if (this.publicKey instanceof Secp256k1PublicKey) {\n serializer.serializeU32AsUleb128(AnyPublicKeyVariant.Secp256k1);\n this.publicKey.serialize(serializer);\n } else {\n throw new Error(\"Unknown public key type\");\n }\n }\n\n static deserialize(deserializer: Deserializer): AnyPublicKey {\n const index = deserializer.deserializeUleb128AsU32();\n switch (index) {\n case AnyPublicKeyVariant.Ed25519:\n return new AnyPublicKey(Ed25519PublicKey.load(deserializer));\n case AnyPublicKeyVariant.Secp256k1:\n return new AnyPublicKey(Secp256k1PublicKey.load(deserializer));\n default:\n throw new Error(`Unknown variant index for AnyPublicKey: ${index}`);\n }\n }\n}\n"],"mappings":"2HAeO,IAAMA,EAAN,MAAMC,UAAqBC,CAAU,CAM1C,YAAYC,EAAsB,CAChC,MAAM,EACN,KAAK,UAAYA,CACnB,CAOA,cAA2B,CACzB,OAAO,KAAK,UAAU,aAAa,CACrC,CAOA,UAAmB,CACjB,OAAO,KAAK,UAAU,SAAS,CACjC,CASA,gBAAgBC,EAA+D,CAC7E,GAAM,CAAE,QAAAC,EAAS,UAAAC,CAAU,EAAIF,EAC/B,OAAO,KAAK,UAAU,gBAAgB,CAAE,QAAAC,EAAS,UAAAC,CAAU,CAAC,CAC9D,CAEA,UAAUC,EAA8B,CACtC,GAAI,KAAK,qBAAqBC,EAC5BD,EAAW,uBAAiD,EAC5D,KAAK,UAAU,UAAUA,CAAU,UAC1B,KAAK,qBAAqBE,EACnCF,EAAW,uBAAmD,EAC9D,KAAK,UAAU,UAAUA,CAAU,MAEnC,OAAM,IAAI,MAAM,yBAAyB,CAE7C,CAEA,OAAO,YAAYG,EAA0C,CAC3D,IAAMC,EAAQD,EAAa,wBAAwB,EACnD,OAAQC,EAAO,CACb,OACE,OAAO,IAAIV,EAAaO,EAAiB,KAAKE,CAAY,CAAC,EAC7D,OACE,OAAO,IAAIT,EAAaQ,EAAmB,KAAKC,CAAY,CAAC,EAC/D,QACE,MAAM,IAAI,MAAM,2CAA2CC,CAAK,EAAE,CACtE,CACF,CACF","names":["AnyPublicKey","_AnyPublicKey","PublicKey","publicKey","args","message","signature","serializer","Ed25519PublicKey","Secp256k1PublicKey","deserializer","index"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n,b as e,c as t,d as s,e as c,f as r,g as i,h as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n,b as e,c as t,d as s,e as c,f as r,g as i,h as d,i as u,j as a,k as A,l as g,m as p,n as f,o as y,p as C}from"./chunk-33T7WTB6.mjs";var l=class{constructor(o){this.config=o}async getAccountInfo(o){return n({aptosConfig:this.config,...o})}async getAccountModules(o){return e({aptosConfig:this.config,...o})}async getAccountModule(o){return t({aptosConfig:this.config,...o})}async getAccountTransactions(o){return s({aptosConfig:this.config,...o})}async getAccountResources(o){return c({aptosConfig:this.config,...o})}async getAccountResource(o){return r({aptosConfig:this.config,...o})}async lookupOriginalAccountAddress(o){return i({aptosConfig:this.config,...o})}async getAccountTokensCount(o){return d({aptosConfig:this.config,...o})}async getAccountOwnedTokens(o){return u({aptosConfig:this.config,...o})}async getAccountOwnedTokensFromCollectionAddress(o){return a({aptosConfig:this.config,...o})}async getAccountCollectionsWithOwnedTokens(o){return A({aptosConfig:this.config,...o})}async getAccountTransactionsCount(o){return g({aptosConfig:this.config,...o})}async getAccountCoinsData(o){return p({aptosConfig:this.config,...o})}async getAccountCoinsCount(o){return f({aptosConfig:this.config,...o})}async getAccountOwnedObjects(o){return y({aptosConfig:this.config,...o})}async deriveAccountFromPrivateKey(o){return C({aptosConfig:this.config,...o})}};export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ZLW65YCO.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/api/account.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { AptosConfig } from \"./aptosConfig\";\nimport { AccountAddress, PrivateKey, Account as AccountModule, AccountAddressInput } from \"../core\";\nimport {\n AccountData,\n GetAccountCoinsDataResponse,\n GetAccountCollectionsWithOwnedTokenResponse,\n GetAccountOwnedObjectsResponse,\n GetAccountOwnedTokensFromCollectionResponse,\n GetAccountOwnedTokensQueryResponse,\n LedgerVersion,\n MoveModuleBytecode,\n MoveResource,\n MoveStructId,\n OrderBy,\n PaginationArgs,\n TokenStandard,\n TransactionResponse,\n} from \"../types\";\nimport {\n deriveAccountFromPrivateKey,\n getAccountCoinsCount,\n getAccountCoinsData,\n getAccountCollectionsWithOwnedTokens,\n getAccountOwnedObjects,\n getAccountOwnedTokens,\n getAccountOwnedTokensFromCollectionAddress,\n getAccountTokensCount,\n getAccountTransactionsCount,\n getInfo,\n getModule,\n getModules,\n getResource,\n getResources,\n getTransactions,\n lookupOriginalAccountAddress,\n} from \"../internal/account\";\n\n/**\n * A class to query all `Account` related queries on Aptos.\n */\nexport class Account {\n readonly config: AptosConfig;\n\n constructor(config: AptosConfig) {\n this.config = config;\n }\n\n /**\n * Queries the current state for an Aptos account given its account address\n *\n * @param args.accountAddress Aptos account address\n *\n * @returns The account data\n *\n * @example An example of the returned account\n * ```\n * {\n * sequence_number: \"1\",\n * authentication_key: \"0x5307b5f4bc67829097a8ba9b43dba3b88261eeccd1f709d9bde240fc100fbb69\"\n * }\n * ```\n */\n async getAccountInfo(args: { accountAddress: AccountAddressInput }): Promise<AccountData> {\n return getInfo({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries for all modules in an account given an account address\n *\n * Note: In order to get all account modules, this function may call the API\n * multiple times as it auto paginates.\n *\n * @param args.accountAddress Aptos account address\n * @param args.options.offset The number module to start returning results from\n * @param args.options.limit The number of results to return\n * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version\n *\n * @returns Account modules\n */\n\n async getAccountModules(args: {\n accountAddress: AccountAddressInput;\n options?: PaginationArgs & LedgerVersion;\n }): Promise<MoveModuleBytecode[]> {\n return getModules({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries for a specific account module given account address and module name\n *\n * @param args.accountAddress Aptos account address\n * @param args.moduleName The name of the module\n * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version\n *\n * @returns Account module\n *\n * @example An example of an account module\n * ```\n * {\n * bytecode: \"0xa11ceb0b0600000006010002030206050807070f0d081c200\",\n * abi: { address: \"0x1\" }\n * }\n * ```\n */\n async getAccountModule(args: {\n accountAddress: AccountAddressInput;\n moduleName: string;\n options?: LedgerVersion;\n }): Promise<MoveModuleBytecode> {\n return getModule({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries account transactions given an account address\n *\n * Note: In order to get all account transactions, this function may call the API\n * multiple times as it auto paginates.\n *\n * @param args.accountAddress Aptos account address\n * @param args.options.offset The number transaction to start returning results from\n * @param args.options.limit The number of results to return\n *\n * @returns The account transactions\n */\n async getAccountTransactions(args: {\n accountAddress: AccountAddressInput;\n options?: PaginationArgs;\n }): Promise<TransactionResponse[]> {\n return getTransactions({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries all account resources given an account address\n *\n * Note: In order to get all account resources, this function may call the API\n * multiple times as it auto paginates.\n *\n * @param args.accountAddress Aptos account address\n * @param args.options.offset The number resource to start returning results from\n * @param args.options.limit The number of results to return\n * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version\n * @returns Account resources\n */\n async getAccountResources(args: {\n accountAddress: AccountAddressInput;\n options?: PaginationArgs & LedgerVersion;\n }): Promise<MoveResource[]> {\n return getResources({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries a specific account resource given account address and resource type. Note that the default is `any` in order\n * to allow for ease of accessing properties of the object.\n *\n * @type The typed output of the resource\n * @param args.accountAddress Aptos account address\n * @param args.resourceType String representation of an on-chain Move struct type, i.e \"0x1::aptos_coin::AptosCoin\"\n * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version\n *\n * @returns Account resource\n *\n * @example An example of an account resource\n * ```\n * {\n * data: { value: 6 }\n * }\n * ```\n */\n async getAccountResource<T extends {} = any>(args: {\n accountAddress: AccountAddressInput;\n resourceType: MoveStructId;\n options?: LedgerVersion;\n }): Promise<T> {\n return getResource<T>({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Looks up the account address for a given authentication key\n *\n * This handles both if the account's authentication key has been rotated or not.\n *\n * @param args.authenticationKey The authentication key\n * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version\n * @returns Promise<AccountAddress> The accountAddress associated with the authentication key\n */\n async lookupOriginalAccountAddress(args: {\n authenticationKey: AccountAddressInput;\n options?: LedgerVersion;\n }): Promise<AccountAddress> {\n return lookupOriginalAccountAddress({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries the current count of tokens owned by an account\n *\n * @param args.accountAddress The account address\n * @returns Current count of tokens owned by the account\n */\n async getAccountTokensCount(args: { accountAddress: AccountAddressInput }): Promise<number> {\n return getAccountTokensCount({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries the account's current owned tokens.\n *\n * This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.\n * If you want to get only the token from a specific standard, you can pass an optional tokenStandard param\n *\n * @param args.accountAddress The account address we want to get the tokens for\n * @param args.options.tokenStandard The NFT standard to query for\n * @param args.options.pagination.offset The number token to start returning results from\n * @param args.options.pagination.limit The number of results to return\n * @param args.options.orderBy The order to sort the tokens by\n * @returns Tokens array with the token data\n */\n async getAccountOwnedTokens(args: {\n accountAddress: AccountAddressInput;\n options?: {\n tokenStandard?: TokenStandard;\n pagination?: PaginationArgs;\n orderBy?: OrderBy<GetAccountOwnedTokensQueryResponse[0]>;\n };\n }): Promise<GetAccountOwnedTokensQueryResponse> {\n return getAccountOwnedTokens({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries all current tokens of a specific collection that an account owns by the collection address\n *\n * This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.\n * If you want to get only the token from a specific standard, you can pass an optional tokenStandard param\n *\n * @param args.accountAddress The account address we want to get the tokens for\n * @param args.collectionAddress The address of the collection being queried\n * @param args.options.tokenStandard The NFT standard to query for\n * @param args.options.pagination.offset The number token to start returning results from\n * @param args.options.pagination.limit The number of results to return\n * @param args.options.orderBy The order to sort the tokens by\n * @returns Tokens array with the token data\n */\n async getAccountOwnedTokensFromCollectionAddress(args: {\n accountAddress: AccountAddressInput;\n collectionAddress: AccountAddressInput;\n options?: {\n tokenStandard?: TokenStandard;\n pagination?: PaginationArgs;\n orderBy?: OrderBy<GetAccountOwnedTokensFromCollectionResponse[0]>;\n };\n }): Promise<GetAccountOwnedTokensFromCollectionResponse> {\n return getAccountOwnedTokensFromCollectionAddress({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries for all collections that an account currently has tokens for.\n *\n * This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.\n * If you want to get only the token from a specific standard, you can pass an optional tokenStandard param\n *\n * @param args.accountAddress The account address we want to get the collections for\n * @param args.options.tokenStandard The NFT standard to query for\n * @param args.options.pagination.offset The number collection to start returning results from\n * @param args.options.pagination.limit The number of results to return\n * @param args.options.orderBy The order to sort the tokens by\n * @returns Collections array with the collections data\n */\n async getAccountCollectionsWithOwnedTokens(args: {\n accountAddress: AccountAddressInput;\n options?: {\n tokenStandard?: TokenStandard;\n pagination?: PaginationArgs;\n orderBy?: OrderBy<GetAccountCollectionsWithOwnedTokenResponse[0]>;\n };\n }): Promise<GetAccountCollectionsWithOwnedTokenResponse> {\n return getAccountCollectionsWithOwnedTokens({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries the current count of transactions submitted by an account\n *\n * @param args.accountAddress The account address we want to get the total count for\n * @returns Current count of transactions made by an account\n */\n async getAccountTransactionsCount(args: { accountAddress: AccountAddressInput }): Promise<number> {\n return getAccountTransactionsCount({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries an account's coins data\n *\n * @param args.accountAddress The account address we want to get the coins data for\n * @param args.options.pagination.offset The number coin to start returning results from\n * @param args.options.pagination.limit The number of results to return\n * @param args.options.orderBy The order to sort the coins by\n * @returns Array with the coins data\n */\n async getAccountCoinsData(args: {\n accountAddress: AccountAddressInput;\n options?: {\n pagination?: PaginationArgs;\n orderBy?: OrderBy<GetAccountCoinsDataResponse[0]>;\n };\n }): Promise<GetAccountCoinsDataResponse> {\n return getAccountCoinsData({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries the current count of an account's coins aggregated\n *\n * @param args.accountAddress The account address we want to get the total count for\n * @returns Current count of the aggregated count of all account's coins\n */\n async getAccountCoinsCount(args: { accountAddress: AccountAddressInput }): Promise<number> {\n return getAccountCoinsCount({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries an account's owned objects\n *\n * @param args.accountAddress The account address we want to get the objects for\n * @param args.options.pagination.offset The number coin to start returning results from\n * @param args.options.pagination.limit The number of results to return\n * @param args.options.orderBy The order to sort the coins by\n * @returns Objects array with the object data\n */\n async getAccountOwnedObjects(args: {\n accountAddress: AccountAddressInput;\n options?: {\n pagination?: PaginationArgs;\n orderBy?: OrderBy<GetAccountOwnedObjectsResponse[0]>;\n };\n }): Promise<GetAccountOwnedObjectsResponse> {\n return getAccountOwnedObjects({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Derives an account by providing a private key.\n * This functions resolves the provided private key type and derives the public key from it.\n *\n * If the privateKey is a Secp256k1 type, it derives the account using the derived public key and\n * auth key using the SingleKey scheme locally.\n *\n * If the privateKey is a ED25519 type, it looks up the authentication key on chain, and uses it to resolve\n * whether it is a Legacy ED25519 key or a Unified ED25519 key. It then derives the account based\n * on that.\n *\n * @param args.privateKey An account private key\n * @returns Account type\n */\n async deriveAccountFromPrivateKey(args: { privateKey: PrivateKey }): Promise<AccountModule> {\n return deriveAccountFromPrivateKey({ aptosConfig: this.config, ...args });\n }\n}\n"],"mappings":"kJA2CO,IAAMA,EAAN,KAAc,CAGnB,YAAYC,EAAqB,CAC/B,KAAK,OAASA,CAChB,CAiBA,MAAM,eAAeC,EAAqE,CACxF,OAAOC,EAAQ,CAAE,YAAa,KAAK,OAAQ,GAAGD,CAAK,CAAC,CACtD,CAgBA,MAAM,kBAAkBA,EAGU,CAChC,OAAOE,EAAW,CAAE,YAAa,KAAK,OAAQ,GAAGF,CAAK,CAAC,CACzD,CAmBA,MAAM,iBAAiBA,EAIS,CAC9B,OAAOG,EAAU,CAAE,YAAa,KAAK,OAAQ,GAAGH,CAAK,CAAC,CACxD,CAcA,MAAM,uBAAuBA,EAGM,CACjC,OAAOI,EAAgB,CACrB,YAAa,KAAK,OAClB,GAAGJ,CACL,CAAC,CACH,CAcA,MAAM,oBAAoBA,EAGE,CAC1B,OAAOK,EAAa,CAAE,YAAa,KAAK,OAAQ,GAAGL,CAAK,CAAC,CAC3D,CAoBA,MAAM,mBAAuCA,EAI9B,CACb,OAAOM,EAAe,CAAE,YAAa,KAAK,OAAQ,GAAGN,CAAK,CAAC,CAC7D,CAWA,MAAM,6BAA6BA,EAGP,CAC1B,OAAOO,EAA6B,CAAE,YAAa,KAAK,OAAQ,GAAGP,CAAK,CAAC,CAC3E,CAQA,MAAM,sBAAsBA,EAAgE,CAC1F,OAAOQ,EAAsB,CAC3B,YAAa,KAAK,OAClB,GAAGR,CACL,CAAC,CACH,CAeA,MAAM,sBAAsBA,EAOoB,CAC9C,OAAOS,EAAsB,CAC3B,YAAa,KAAK,OAClB,GAAGT,CACL,CAAC,CACH,CAgBA,MAAM,2CAA2CA,EAQQ,CACvD,OAAOU,EAA2C,CAChD,YAAa,KAAK,OAClB,GAAGV,CACL,CAAC,CACH,CAeA,MAAM,qCAAqCA,EAOc,CACvD,OAAOW,EAAqC,CAC1C,YAAa,KAAK,OAClB,GAAGX,CACL,CAAC,CACH,CAQA,MAAM,4BAA4BA,EAAgE,CAChG,OAAOY,EAA4B,CACjC,YAAa,KAAK,OAClB,GAAGZ,CACL,CAAC,CACH,CAWA,MAAM,oBAAoBA,EAMe,CACvC,OAAOa,EAAoB,CACzB,YAAa,KAAK,OAClB,GAAGb,CACL,CAAC,CACH,CAQA,MAAM,qBAAqBA,EAAgE,CACzF,OAAOc,EAAqB,CAAE,YAAa,KAAK,OAAQ,GAAGd,CAAK,CAAC,CACnE,CAWA,MAAM,uBAAuBA,EAMe,CAC1C,OAAOe,EAAuB,CAC5B,YAAa,KAAK,OAClB,GAAGf,CACL,CAAC,CACH,CAgBA,MAAM,4BAA4BA,EAA0D,CAC1F,OAAOgB,EAA4B,CAAE,YAAa,KAAK,OAAQ,GAAGhB,CAAK,CAAC,CAC1E,CACF","names":["Account","config","args","getInfo","getModules","getModule","getTransactions","getResources","getResource","lookupOriginalAccountAddress","getAccountTokensCount","getAccountOwnedTokens","getAccountOwnedTokensFromCollectionAddress","getAccountCollectionsWithOwnedTokens","getAccountTransactionsCount","getAccountCoinsData","getAccountCoinsCount","getAccountOwnedObjects","deriveAccountFromPrivateKey"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{f as n,g as s,h as t,i as o,j as i,k as r,l as a,m as g,n as c,o as m,p as u,q as d,r as p}from"./chunk-TGKB6ALT.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 r({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 i({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-ZUHN56GM.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 readonly config: AptosConfig;\n\n constructor(config: AptosConfig) {\n this.config = config;\n }\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 seconds.\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.toString})\n * const address = await aptos.getTargetAddress({name: \"test.aptos\"})\n * // address = bob.accountAddress.toString()\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.toString()})\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.toString()})\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 | null;\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: new Date(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 - A javascript date of when the subdomain will expire. Only applicable when\n * the policy is 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.pagination.offset - Optional, the offset to start from when fetching names\n * @param args.options.pagination.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.pagination.offset - Optional, the offset to start from when fetching names\n * @param args.options.pagination.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.pagination.offset - Optional, the offset to start from when fetching names\n * @param args.options.pagination.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.pagination.offset - Optional, the offset to start from when fetching names\n * @param args.options.pagination.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,CAGf,YAAYC,EAAqB,CAC/B,KAAK,OAASA,CAChB,CAeA,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,CAoCA,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"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
var h=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var j=(g,b,d,c)=>{for(var a=c>1?void 0:c?i(b,d):b,e=g.length-1,f;e>=0;e--)(f=g[e])&&(a=(c?f(b,d,a):f(a))||a);return c&&a&&h(b,d,a),a};export{j as a};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
//# sourceMappingURL=chunk-ZWH2ESXT.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { AptosConfig } from '../api/aptosConfig.
|
|
2
|
-
import { AptosResponse } from './types.
|
|
3
|
-
import { ClientRequest, Client, ClientResponse, AptosRequest } from '../types/index.
|
|
4
|
-
import '../utils/apiEndpoints.
|
|
5
|
-
import '../utils/const.
|
|
6
|
-
import '../types/indexer.
|
|
7
|
-
import '../types/generated/operations.
|
|
8
|
-
import '../types/generated/types.
|
|
1
|
+
import { AptosConfig } from '../api/aptosConfig.mjs';
|
|
2
|
+
import { AptosResponse } from './types.mjs';
|
|
3
|
+
import { ClientRequest, Client, ClientResponse, AptosRequest } from '../types/index.mjs';
|
|
4
|
+
import '../utils/apiEndpoints.mjs';
|
|
5
|
+
import '../utils/const.mjs';
|
|
6
|
+
import '../types/indexer.mjs';
|
|
7
|
+
import '../types/generated/operations.mjs';
|
|
8
|
+
import '../types/generated/types.mjs';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Given a url and method, sends the request with axios and
|
|
@@ -19,6 +19,6 @@ declare function request<Req, Res>(options: ClientRequest<Req>, client: Client):
|
|
|
19
19
|
* @param aptosConfig The config information for the SDK client instance
|
|
20
20
|
* @returns the response or AptosApiError
|
|
21
21
|
*/
|
|
22
|
-
declare function aptosRequest<Req, Res>(options: AptosRequest, aptosConfig: AptosConfig): Promise<AptosResponse<Req, Res>>;
|
|
22
|
+
declare function aptosRequest<Req extends {}, Res extends {}>(options: AptosRequest, aptosConfig: AptosConfig): Promise<AptosResponse<Req, Res>>;
|
|
23
23
|
|
|
24
24
|
export { aptosRequest, request };
|
package/dist/esm/client/core.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../chunk-
|
|
1
|
+
import{a,b}from"../chunk-LDAD54H5.mjs";import"../chunk-Y7VR7X5W.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-FYIFBLHU.mjs";import"../chunk-ZWH2ESXT.mjs";export{b as aptosRequest,a as request};
|
|
2
2
|
//# sourceMappingURL=core.mjs.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { AptosConfig } from '../api/aptosConfig.
|
|
2
|
-
import { AptosResponse } from './types.
|
|
3
|
-
import { MimeType, AnyNumber, ClientConfig } from '../types/index.
|
|
4
|
-
import { AptosApiType } from '../utils/const.
|
|
5
|
-
import '../utils/apiEndpoints.
|
|
6
|
-
import '../types/indexer.
|
|
7
|
-
import '../types/generated/operations.
|
|
8
|
-
import '../types/generated/types.
|
|
1
|
+
import { AptosConfig } from '../api/aptosConfig.mjs';
|
|
2
|
+
import { AptosResponse } from './types.mjs';
|
|
3
|
+
import { MimeType, AnyNumber, ClientConfig } from '../types/index.mjs';
|
|
4
|
+
import { AptosApiType } from '../utils/const.mjs';
|
|
5
|
+
import '../utils/apiEndpoints.mjs';
|
|
6
|
+
import '../types/indexer.mjs';
|
|
7
|
+
import '../types/generated/operations.mjs';
|
|
8
|
+
import '../types/generated/types.mjs';
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
type GetRequestOptions = {
|
|
11
11
|
/**
|
|
12
12
|
* The config for the API client
|
|
13
13
|
*/
|
|
@@ -41,15 +41,15 @@ declare type GetRequestOptions = {
|
|
|
41
41
|
*/
|
|
42
42
|
overrides?: ClientConfig;
|
|
43
43
|
};
|
|
44
|
-
|
|
44
|
+
type GetAptosRequestOptions = Omit<GetRequestOptions, "type">;
|
|
45
45
|
/**
|
|
46
46
|
* Main function to do a Get request
|
|
47
47
|
*
|
|
48
48
|
* @param options GetRequestOptions
|
|
49
49
|
* @returns
|
|
50
50
|
*/
|
|
51
|
-
declare function get<Req, Res>(options: GetRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
52
|
-
declare function getAptosFullNode<Req, Res>(options: GetAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
51
|
+
declare function get<Req extends {}, Res extends {}>(options: GetRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
52
|
+
declare function getAptosFullNode<Req extends {}, Res extends {}>(options: GetAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
53
53
|
declare function paginateWithCursor<Req extends Record<string, any>, Res extends any[]>(options: GetAptosRequestOptions): Promise<Res>;
|
|
54
54
|
|
|
55
55
|
export { GetAptosRequestOptions, GetRequestOptions, get, getAptosFullNode, paginateWithCursor };
|
package/dist/esm/client/get.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c}from"../chunk-
|
|
1
|
+
import{a,b,c}from"../chunk-ND3ZQKTT.mjs";import"../chunk-LDAD54H5.mjs";import"../chunk-Y7VR7X5W.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-FYIFBLHU.mjs";import"../chunk-KC64ESLO.mjs";import"../chunk-LV33NV4J.mjs";import"../chunk-ZWH2ESXT.mjs";export{a as get,b as getAptosFullNode,c as paginateWithCursor};
|
|
2
2
|
//# sourceMappingURL=get.mjs.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { aptosRequest, request } from './core.mjs';
|
|
2
|
+
export { GetAptosRequestOptions, GetRequestOptions, get, getAptosFullNode, paginateWithCursor } from './get.mjs';
|
|
3
|
+
export { PostAptosRequestOptions, PostRequestOptions, post, postAptosFaucet, postAptosFullNode, postAptosIndexer } from './post.mjs';
|
|
4
|
+
export { AptosApiError, AptosResponse } from './types.mjs';
|
|
5
|
+
import '../api/aptosConfig.mjs';
|
|
6
|
+
import '../types/index.mjs';
|
|
7
|
+
import '../utils/apiEndpoints.mjs';
|
|
8
|
+
import '../types/indexer.mjs';
|
|
9
|
+
import '../types/generated/operations.mjs';
|
|
10
|
+
import '../types/generated/types.mjs';
|
|
11
|
+
import '../utils/const.mjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunk-N2FKVZ4D.mjs";import{a as
|
|
1
|
+
import"../chunk-N2FKVZ4D.mjs";import{a as d,b as e,c as f}from"../chunk-ND3ZQKTT.mjs";import{a as g,b as h,c as i,d as j}from"../chunk-TPWSHFFI.mjs";import{a as b,b as c}from"../chunk-LDAD54H5.mjs";import"../chunk-Y7VR7X5W.mjs";import"../chunk-4WPQQPUF.mjs";import{a}from"../chunk-6FBKUTGF.mjs";import"../chunk-FYIFBLHU.mjs";import"../chunk-KC64ESLO.mjs";import"../chunk-LV33NV4J.mjs";import"../chunk-ZWH2ESXT.mjs";export{a as AptosApiError,c as aptosRequest,d as get,e as getAptosFullNode,f as paginateWithCursor,g as post,j as postAptosFaucet,h as postAptosFullNode,i as postAptosIndexer,b as request};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { AptosConfig } from '../api/aptosConfig.
|
|
2
|
-
import { AptosResponse } from './types.
|
|
3
|
-
import { MimeType, AnyNumber, ClientConfig } from '../types/index.
|
|
4
|
-
import { AptosApiType } from '../utils/const.
|
|
5
|
-
import '../utils/apiEndpoints.
|
|
6
|
-
import '../types/indexer.
|
|
7
|
-
import '../types/generated/operations.
|
|
8
|
-
import '../types/generated/types.
|
|
1
|
+
import { AptosConfig } from '../api/aptosConfig.mjs';
|
|
2
|
+
import { AptosResponse } from './types.mjs';
|
|
3
|
+
import { MimeType, AnyNumber, ClientConfig } from '../types/index.mjs';
|
|
4
|
+
import { AptosApiType } from '../utils/const.mjs';
|
|
5
|
+
import '../utils/apiEndpoints.mjs';
|
|
6
|
+
import '../types/indexer.mjs';
|
|
7
|
+
import '../types/generated/operations.mjs';
|
|
8
|
+
import '../types/generated/types.mjs';
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
type PostRequestOptions = {
|
|
11
11
|
/**
|
|
12
12
|
* The config for the API client
|
|
13
13
|
*/
|
|
@@ -45,16 +45,16 @@ declare type PostRequestOptions = {
|
|
|
45
45
|
*/
|
|
46
46
|
overrides?: ClientConfig;
|
|
47
47
|
};
|
|
48
|
-
|
|
48
|
+
type PostAptosRequestOptions = Omit<PostRequestOptions, "type">;
|
|
49
49
|
/**
|
|
50
50
|
* Main function to do a Post request
|
|
51
51
|
*
|
|
52
52
|
* @param options PostRequestOptions
|
|
53
53
|
* @returns
|
|
54
54
|
*/
|
|
55
|
-
declare function post<Req, Res>(options: PostRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
56
|
-
declare function postAptosFullNode<Req, Res>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
57
|
-
declare function postAptosIndexer<Req, Res>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
58
|
-
declare function postAptosFaucet<Req, Res>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
55
|
+
declare function post<Req extends {}, Res extends {}>(options: PostRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
56
|
+
declare function postAptosFullNode<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
57
|
+
declare function postAptosIndexer<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
58
|
+
declare function postAptosFaucet<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
59
59
|
|
|
60
60
|
export { PostAptosRequestOptions, PostRequestOptions, post, postAptosFaucet, postAptosFullNode, postAptosIndexer };
|
package/dist/esm/client/post.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d}from"../chunk-
|
|
1
|
+
import{a,b,c,d}from"../chunk-TPWSHFFI.mjs";import"../chunk-LDAD54H5.mjs";import"../chunk-Y7VR7X5W.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-FYIFBLHU.mjs";import"../chunk-KC64ESLO.mjs";import"../chunk-LV33NV4J.mjs";import"../chunk-ZWH2ESXT.mjs";export{a as post,d as postAptosFaucet,b as postAptosFullNode,c as postAptosIndexer};
|
|
2
2
|
//# sourceMappingURL=post.mjs.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AptosRequest } from '../types/index.
|
|
2
|
-
import '../utils/apiEndpoints.
|
|
3
|
-
import '../types/indexer.
|
|
4
|
-
import '../types/generated/operations.
|
|
5
|
-
import '../types/generated/types.
|
|
1
|
+
import { AptosRequest } from '../types/index.mjs';
|
|
2
|
+
import '../utils/apiEndpoints.mjs';
|
|
3
|
+
import '../types/indexer.mjs';
|
|
4
|
+
import '../types/generated/operations.mjs';
|
|
5
|
+
import '../types/generated/types.mjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* The API response type
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-6FBKUTGF.mjs";import"../chunk-
|
|
1
|
+
import{a}from"../chunk-6FBKUTGF.mjs";import"../chunk-ZWH2ESXT.mjs";export{a as AptosApiError};
|
|
2
2
|
//# sourceMappingURL=types.mjs.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { AccountAddress } from './accountAddress.
|
|
2
|
-
import { AuthenticationKey } from './authenticationKey.
|
|
3
|
-
import { PublicKey, PrivateKey, Signature } from './crypto/asymmetricCrypto.
|
|
4
|
-
import { SigningScheme, GenerateAccount, SigningSchemeInput, HexInput } from '../types/index.
|
|
5
|
-
import '../bcs/serializer.
|
|
6
|
-
import './hex.
|
|
7
|
-
import './common.
|
|
8
|
-
import '../utils/apiEndpoints.
|
|
9
|
-
import '../types/indexer.
|
|
10
|
-
import '../types/generated/operations.
|
|
11
|
-
import '../types/generated/types.
|
|
12
|
-
import '../bcs/deserializer.
|
|
13
|
-
import '../transactions/instances/transactionArgument.
|
|
1
|
+
import { AccountAddress } from './accountAddress.mjs';
|
|
2
|
+
import { AuthenticationKey } from './authenticationKey.mjs';
|
|
3
|
+
import { PublicKey, PrivateKey, Signature } from './crypto/asymmetricCrypto.mjs';
|
|
4
|
+
import { SigningScheme, GenerateAccount, SigningSchemeInput, HexInput } from '../types/index.mjs';
|
|
5
|
+
import '../bcs/serializer.mjs';
|
|
6
|
+
import './hex.mjs';
|
|
7
|
+
import './common.mjs';
|
|
8
|
+
import '../utils/apiEndpoints.mjs';
|
|
9
|
+
import '../types/indexer.mjs';
|
|
10
|
+
import '../types/generated/operations.mjs';
|
|
11
|
+
import '../types/generated/types.mjs';
|
|
12
|
+
import '../bcs/deserializer.mjs';
|
|
13
|
+
import '../transactions/instances/transactionArgument.mjs';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Class for creating and managing account on Aptos network
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-GAI75GOG.mjs";import"../chunk-IBH7IOIM.mjs";import"../chunk-44MGBJ73.mjs";import"../chunk-YYRDFZE6.mjs";import"../chunk-62SCW5NH.mjs";import"../chunk-U25N2VWA.mjs";import"../chunk-RYETO74W.mjs";import"../chunk-EFIYW4WK.mjs";import"../chunk-LR65XHSF.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-HVADSXTB.mjs";import"../chunk-BPYLPPEQ.mjs";import"../chunk-4ADA5BE7.mjs";import"../chunk-X32O46IB.mjs";import"../chunk-GTC7WHMV.mjs";import"../chunk-NZIJV4O2.mjs";import"../chunk-HA6JD5R6.mjs";import"../chunk-DNDWTM7A.mjs";import"../chunk-TIH6ARYP.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-Y7VR7X5W.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-ZWH2ESXT.mjs";export{a as Account};
|
|
2
2
|
//# sourceMappingURL=account.mjs.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Serializable, Serializer } from '../bcs/serializer.
|
|
2
|
-
import { Deserializer } from '../bcs/deserializer.
|
|
3
|
-
import { ParsingResult } from './common.
|
|
4
|
-
import { TransactionArgument } from '../transactions/instances/transactionArgument.
|
|
5
|
-
import { HexInput } from '../types/index.
|
|
6
|
-
import './hex.
|
|
7
|
-
import '../utils/apiEndpoints.
|
|
8
|
-
import '../types/indexer.
|
|
9
|
-
import '../types/generated/operations.
|
|
10
|
-
import '../types/generated/types.
|
|
1
|
+
import { Serializable, Serializer } from '../bcs/serializer.mjs';
|
|
2
|
+
import { Deserializer } from '../bcs/deserializer.mjs';
|
|
3
|
+
import { ParsingResult } from './common.mjs';
|
|
4
|
+
import { TransactionArgument } from '../transactions/instances/transactionArgument.mjs';
|
|
5
|
+
import { HexInput } from '../types/index.mjs';
|
|
6
|
+
import './hex.mjs';
|
|
7
|
+
import '../utils/apiEndpoints.mjs';
|
|
8
|
+
import '../types/indexer.mjs';
|
|
9
|
+
import '../types/generated/operations.mjs';
|
|
10
|
+
import '../types/generated/types.mjs';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* This enum is used to explain why an address was invalid.
|
|
@@ -21,7 +21,7 @@ declare enum AddressInvalidReason {
|
|
|
21
21
|
LONG_FORM_REQUIRED_UNLESS_SPECIAL = "long_form_required_unless_special",
|
|
22
22
|
INVALID_PADDING_ZEROES = "INVALID_PADDING_ZEROES"
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
type AccountAddressInput = HexInput | AccountAddress;
|
|
25
25
|
/**
|
|
26
26
|
* NOTE: Only use this class for account addresses. For other hex data, e.g. transaction
|
|
27
27
|
* hashes, use the Hex class.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../chunk-
|
|
1
|
+
import{a,b}from"../chunk-NZIJV4O2.mjs";import"../chunk-HA6JD5R6.mjs";import"../chunk-DNDWTM7A.mjs";import"../chunk-TIH6ARYP.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-Y7VR7X5W.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-ZWH2ESXT.mjs";export{b as AccountAddress,a as AddressInvalidReason};
|
|
2
2
|
//# sourceMappingURL=accountAddress.mjs.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { AccountAddress } from './accountAddress.
|
|
2
|
-
import { PublicKey } from './crypto/asymmetricCrypto.
|
|
3
|
-
import { Hex } from './hex.
|
|
4
|
-
import { HexInput, AuthenticationKeyScheme } from '../types/index.
|
|
5
|
-
import { Serializable, Serializer } from '../bcs/serializer.
|
|
6
|
-
import { Deserializer } from '../bcs/deserializer.
|
|
7
|
-
import './common.
|
|
8
|
-
import '../transactions/instances/transactionArgument.
|
|
9
|
-
import '../utils/apiEndpoints.
|
|
10
|
-
import '../types/indexer.
|
|
11
|
-
import '../types/generated/operations.
|
|
12
|
-
import '../types/generated/types.
|
|
1
|
+
import { AccountAddress } from './accountAddress.mjs';
|
|
2
|
+
import { PublicKey } from './crypto/asymmetricCrypto.mjs';
|
|
3
|
+
import { Hex } from './hex.mjs';
|
|
4
|
+
import { HexInput, AuthenticationKeyScheme } from '../types/index.mjs';
|
|
5
|
+
import { Serializable, Serializer } from '../bcs/serializer.mjs';
|
|
6
|
+
import { Deserializer } from '../bcs/deserializer.mjs';
|
|
7
|
+
import './common.mjs';
|
|
8
|
+
import '../transactions/instances/transactionArgument.mjs';
|
|
9
|
+
import '../utils/apiEndpoints.mjs';
|
|
10
|
+
import '../types/indexer.mjs';
|
|
11
|
+
import '../types/generated/operations.mjs';
|
|
12
|
+
import '../types/generated/types.mjs';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Each account stores an authentication key. Authentication key enables account owners to rotate
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-IBH7IOIM.mjs";import"../chunk-44MGBJ73.mjs";import"../chunk-YYRDFZE6.mjs";import"../chunk-62SCW5NH.mjs";import"../chunk-U25N2VWA.mjs";import"../chunk-RYETO74W.mjs";import"../chunk-EFIYW4WK.mjs";import"../chunk-LR65XHSF.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-HVADSXTB.mjs";import"../chunk-BPYLPPEQ.mjs";import"../chunk-4ADA5BE7.mjs";import"../chunk-X32O46IB.mjs";import"../chunk-GTC7WHMV.mjs";import"../chunk-NZIJV4O2.mjs";import"../chunk-HA6JD5R6.mjs";import"../chunk-DNDWTM7A.mjs";import"../chunk-TIH6ARYP.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-Y7VR7X5W.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-ZWH2ESXT.mjs";export{a as AuthenticationKey};
|
|
2
2
|
//# sourceMappingURL=authenticationKey.mjs.map
|
|
@@ -14,7 +14,7 @@ declare class ParsingError<T> extends Error {
|
|
|
14
14
|
* Whereas ParsingError is thrown when parsing fails, e.g. in a fromString function,
|
|
15
15
|
* this type is returned from "defensive" functions like isValid.
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
type ParsingResult<T> = {
|
|
18
18
|
/**
|
|
19
19
|
* True if valid, false otherwise.
|
|
20
20
|
*/
|
package/dist/esm/core/common.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-FBPNHF54.mjs";import"../chunk-
|
|
1
|
+
import{a}from"../chunk-FBPNHF54.mjs";import"../chunk-ZWH2ESXT.mjs";export{a as ParsingError};
|
|
2
2
|
//# sourceMappingURL=common.mjs.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Deserializer } from '../../bcs/deserializer.
|
|
2
|
-
import { Serializer } from '../../bcs/serializer.
|
|
3
|
-
import { HexInput } from '../../types/index.
|
|
4
|
-
import { AnySignature } from './anySignature.
|
|
5
|
-
import { PublicKey } from './asymmetricCrypto.
|
|
6
|
-
import '../../utils/apiEndpoints.
|
|
7
|
-
import '../../types/indexer.
|
|
8
|
-
import '../../types/generated/operations.
|
|
9
|
-
import '../../types/generated/types.
|
|
10
|
-
import '../hex.
|
|
11
|
-
import '../common.
|
|
1
|
+
import { Deserializer } from '../../bcs/deserializer.mjs';
|
|
2
|
+
import { Serializer } from '../../bcs/serializer.mjs';
|
|
3
|
+
import { HexInput } from '../../types/index.mjs';
|
|
4
|
+
import { AnySignature } from './anySignature.mjs';
|
|
5
|
+
import { PublicKey } from './asymmetricCrypto.mjs';
|
|
6
|
+
import '../../utils/apiEndpoints.mjs';
|
|
7
|
+
import '../../types/indexer.mjs';
|
|
8
|
+
import '../../types/generated/operations.mjs';
|
|
9
|
+
import '../../types/generated/types.mjs';
|
|
10
|
+
import '../hex.mjs';
|
|
11
|
+
import '../common.mjs';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Represents any public key supported by Aptos.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-YYRDFZE6.mjs";import"../../chunk-62SCW5NH.mjs";import"../../chunk-RYETO74W.mjs";import"../../chunk-EFIYW4WK.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-HVADSXTB.mjs";import"../../chunk-BPYLPPEQ.mjs";import"../../chunk-4ADA5BE7.mjs";import"../../chunk-X32O46IB.mjs";import"../../chunk-GTC7WHMV.mjs";import"../../chunk-HA6JD5R6.mjs";import"../../chunk-DNDWTM7A.mjs";import"../../chunk-TIH6ARYP.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-Y7VR7X5W.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-ZWH2ESXT.mjs";export{a as AnyPublicKey};
|
|
2
2
|
//# sourceMappingURL=anyPublicKey.mjs.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Deserializer } from '../../bcs/deserializer.
|
|
2
|
-
import { Serializer } from '../../bcs/serializer.
|
|
3
|
-
import { Signature } from './asymmetricCrypto.
|
|
4
|
-
import '../../types/index.
|
|
5
|
-
import '../../utils/apiEndpoints.
|
|
6
|
-
import '../../types/indexer.
|
|
7
|
-
import '../../types/generated/operations.
|
|
8
|
-
import '../../types/generated/types.
|
|
9
|
-
import '../hex.
|
|
10
|
-
import '../common.
|
|
1
|
+
import { Deserializer } from '../../bcs/deserializer.mjs';
|
|
2
|
+
import { Serializer } from '../../bcs/serializer.mjs';
|
|
3
|
+
import { Signature } from './asymmetricCrypto.mjs';
|
|
4
|
+
import '../../types/index.mjs';
|
|
5
|
+
import '../../utils/apiEndpoints.mjs';
|
|
6
|
+
import '../../types/indexer.mjs';
|
|
7
|
+
import '../../types/generated/operations.mjs';
|
|
8
|
+
import '../../types/generated/types.mjs';
|
|
9
|
+
import '../hex.mjs';
|
|
10
|
+
import '../common.mjs';
|
|
11
11
|
|
|
12
12
|
declare class AnySignature extends Signature {
|
|
13
13
|
readonly signature: Signature;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-QWVR4RCV.mjs";import"../../chunk-62SCW5NH.mjs";import"../../chunk-RYETO74W.mjs";import"../../chunk-EFIYW4WK.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-HVADSXTB.mjs";import"../../chunk-BPYLPPEQ.mjs";import"../../chunk-4ADA5BE7.mjs";import"../../chunk-X32O46IB.mjs";import"../../chunk-GTC7WHMV.mjs";import"../../chunk-HA6JD5R6.mjs";import"../../chunk-DNDWTM7A.mjs";import"../../chunk-TIH6ARYP.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-Y7VR7X5W.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-ZWH2ESXT.mjs";export{a as AnySignature};
|
|
2
2
|
//# sourceMappingURL=anySignature.mjs.map
|