@aptos-labs/ts-sdk 1.35.0-zeta.1 → 1.35.0-zeta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/index.d.ts +31 -17
- package/dist/common/index.js +1044 -1026
- package/dist/common/index.js.map +1 -1
- package/dist/esm/account/AbstractKeylessAccount.mjs +19 -19
- package/dist/esm/account/AbstractedAccount.mjs +21 -21
- package/dist/esm/account/Account.mjs +20 -20
- package/dist/esm/account/AccountUtils.mjs +25 -25
- package/dist/esm/account/Ed25519Account.mjs +18 -18
- package/dist/esm/account/EphemeralKeyPair.mjs +12 -12
- package/dist/esm/account/FederatedKeylessAccount.mjs +20 -20
- package/dist/esm/account/KeylessAccount.mjs +20 -20
- package/dist/esm/account/MultiEd25519Account.mjs +18 -18
- package/dist/esm/account/MultiKeyAccount.d.mts +1 -0
- package/dist/esm/account/MultiKeyAccount.mjs +22 -22
- package/dist/esm/account/SingleKeyAccount.mjs +18 -18
- package/dist/esm/account/index.mjs +28 -28
- package/dist/esm/account/utils.mjs +11 -11
- package/dist/esm/api/account/abstraction.mjs +39 -39
- package/dist/esm/api/account.mjs +43 -41
- package/dist/esm/api/ans.mjs +39 -39
- package/dist/esm/api/aptos.d.mts +0 -1
- package/dist/esm/api/aptos.mjs +73 -70
- package/dist/esm/api/coin.mjs +38 -37
- package/dist/esm/api/digitalAsset.mjs +39 -39
- package/dist/esm/api/event.mjs +16 -16
- package/dist/esm/api/experimental.mjs +26 -40
- package/dist/esm/api/faucet.mjs +15 -15
- package/dist/esm/api/fungibleAsset.mjs +39 -39
- package/dist/esm/api/general.d.mts +2 -2
- package/dist/esm/api/general.mjs +26 -40
- package/dist/esm/api/index.d.mts +0 -1
- package/dist/esm/api/index.mjs +73 -70
- package/dist/esm/api/keyless.mjs +40 -38
- package/dist/esm/api/object.mjs +16 -16
- package/dist/esm/api/staking.mjs +16 -16
- package/dist/esm/api/table.mjs +7 -7
- package/dist/esm/api/transaction.d.mts +30 -18
- package/dist/esm/api/transaction.mjs +45 -43
- package/dist/esm/api/transactionSubmission/build.mjs +37 -37
- package/dist/esm/api/transactionSubmission/management.mjs +41 -39
- package/dist/esm/api/transactionSubmission/sign.mjs +36 -36
- package/dist/esm/api/transactionSubmission/simulate.mjs +37 -37
- package/dist/esm/api/transactionSubmission/submit.mjs +37 -37
- package/dist/esm/api/utils.mjs +5 -5
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/{chunk-JJ6MU2DV.mjs → chunk-2FTF6J7F.mjs} +3 -3
- package/dist/esm/{chunk-54XJAHWK.mjs → chunk-2HL7JEFC.mjs} +9 -9
- package/dist/esm/{chunk-TZZZNGQI.mjs → chunk-2WBJAKBO.mjs} +2 -2
- package/dist/esm/{chunk-3E2SXJXZ.mjs → chunk-3DAVHDK4.mjs} +2 -2
- package/dist/esm/{chunk-F65QGYVD.mjs → chunk-3TUV6YMI.mjs} +3 -3
- package/dist/esm/{chunk-KZFQOE4N.mjs → chunk-5ORUQZAR.mjs} +3 -3
- package/dist/esm/{chunk-RTNVJKNX.mjs → chunk-62LC4PPC.mjs} +3 -3
- package/dist/esm/{chunk-OOQS6BEP.mjs → chunk-6OFCIXWS.mjs} +2 -2
- package/dist/esm/chunk-6OFCIXWS.mjs.map +1 -0
- package/dist/esm/{chunk-YD3KHXBD.mjs → chunk-6SNGKTWE.mjs} +2 -2
- package/dist/esm/{chunk-2SIDNRJH.mjs → chunk-7F32C225.mjs} +4 -4
- package/dist/esm/{chunk-TFDBSPIQ.mjs → chunk-7WW735TU.mjs} +3 -3
- package/dist/esm/{chunk-SFF4FJUD.mjs → chunk-A33OBGVN.mjs} +3 -3
- package/dist/esm/{chunk-J32AERDF.mjs → chunk-A7LYGPFL.mjs} +3 -3
- package/dist/esm/{chunk-BADWWRLN.mjs → chunk-AGKEC2IM.mjs} +5 -5
- package/dist/esm/{chunk-GUEJH55K.mjs → chunk-BU43ZFDJ.mjs} +2 -2
- package/dist/esm/{chunk-PP2U5UMC.mjs → chunk-C7EEG6SW.mjs} +4 -4
- package/dist/esm/{chunk-HTC3Q5JN.mjs → chunk-D4MW64RH.mjs} +4 -4
- package/dist/esm/{chunk-YMHFUSKX.mjs → chunk-D6RXVCE3.mjs} +3 -3
- package/dist/esm/{chunk-7J37IHNP.mjs → chunk-DGDZNHUJ.mjs} +5 -3
- package/dist/esm/{chunk-7J37IHNP.mjs.map → chunk-DGDZNHUJ.mjs.map} +1 -1
- package/dist/esm/{chunk-NFBLI3BS.mjs → chunk-DMFRIING.mjs} +2 -2
- package/dist/esm/{chunk-CPZPXG7O.mjs → chunk-ECTX2FGD.mjs} +4 -4
- package/dist/esm/{chunk-CDJNQ7CS.mjs → chunk-FDMI4BUL.mjs} +29 -22
- package/dist/esm/chunk-FDMI4BUL.mjs.map +1 -0
- package/dist/esm/chunk-FRLS4GRM.mjs +62 -0
- package/dist/esm/chunk-FRLS4GRM.mjs.map +1 -0
- package/dist/esm/chunk-G3MHXDYA.mjs +1 -0
- package/dist/esm/chunk-G3MHXDYA.mjs.map +1 -0
- package/dist/esm/{chunk-OVZOE4GS.mjs → chunk-G6R77JKO.mjs} +16 -16
- package/dist/esm/{chunk-XHQMSKZP.mjs → chunk-G7BB6K4B.mjs} +5 -5
- package/dist/esm/{chunk-XB4SVKZP.mjs → chunk-GCQK2S5Q.mjs} +2 -2
- package/dist/esm/{chunk-2WTIMHGC.mjs → chunk-HBXBODME.mjs} +3 -3
- package/dist/esm/{chunk-D3IWXA33.mjs → chunk-HKQY5GXT.mjs} +7 -191
- package/dist/esm/chunk-HKQY5GXT.mjs.map +1 -0
- package/dist/esm/{chunk-WSI6NVQD.mjs → chunk-HL337SEM.mjs} +3 -3
- package/dist/esm/{chunk-V66UC6YI.mjs → chunk-HQDHSKVS.mjs} +2 -2
- package/dist/esm/{chunk-ZATMRCFV.mjs → chunk-I5G7XFGT.mjs} +3 -3
- package/dist/esm/{chunk-MC4OOX6X.mjs → chunk-IJ7XCPP3.mjs} +36 -31
- package/dist/esm/chunk-IJ7XCPP3.mjs.map +1 -0
- package/dist/esm/{chunk-SW4ASQPY.mjs → chunk-ILTEOGFF.mjs} +6 -6
- package/dist/esm/{chunk-KK7SBRDQ.mjs → chunk-IP7GATDH.mjs} +6 -6
- package/dist/esm/{chunk-KK7SBRDQ.mjs.map → chunk-IP7GATDH.mjs.map} +1 -1
- package/dist/esm/{chunk-RGHKUKOX.mjs → chunk-IPUAVRGL.mjs} +5 -5
- package/dist/esm/{chunk-MLGROHE6.mjs → chunk-IQVHXOD3.mjs} +10 -10
- package/dist/esm/{chunk-IEM26R5Q.mjs → chunk-JAZJE3OR.mjs} +2 -2
- package/dist/esm/{chunk-VJ2Z7GO3.mjs → chunk-JEVGHYEP.mjs} +2 -2
- package/dist/esm/{chunk-WPJUSJJQ.mjs → chunk-JFMFZ2IL.mjs} +3 -3
- package/dist/esm/{chunk-IORAMQ2Y.mjs → chunk-K5OCDM3W.mjs} +8 -8
- package/dist/esm/{chunk-IORAMQ2Y.mjs.map → chunk-K5OCDM3W.mjs.map} +1 -1
- package/dist/esm/{chunk-ESGBNVCA.mjs → chunk-ORCQEMJL.mjs} +2 -2
- package/dist/esm/{chunk-PYLTV3KI.mjs → chunk-QYNYDQE3.mjs} +4 -4
- package/dist/esm/{chunk-F2EFNUWD.mjs → chunk-R45SPK6Q.mjs} +4 -4
- package/dist/esm/{chunk-UKYATVYK.mjs → chunk-RCXGTN36.mjs} +2 -2
- package/dist/esm/{chunk-6DJZITWL.mjs → chunk-SPI2HO3E.mjs} +2 -2
- package/dist/esm/{chunk-YGFWUFZY.mjs → chunk-SPVJXZL5.mjs} +186 -62
- package/dist/esm/chunk-SPVJXZL5.mjs.map +1 -0
- package/dist/esm/{chunk-BVBIBMAE.mjs → chunk-SRXIHVZE.mjs} +2 -2
- package/dist/esm/{chunk-ZAPXD4FC.mjs → chunk-T4BFWV46.mjs} +2 -2
- package/dist/esm/{chunk-ZZWD23YW.mjs → chunk-T573PCIR.mjs} +3 -3
- package/dist/esm/{chunk-AEMQUDMU.mjs → chunk-TDLL7QX5.mjs} +11 -11
- package/dist/esm/{chunk-HRUI6AWF.mjs → chunk-TFW6N66T.mjs} +4 -4
- package/dist/esm/{chunk-LK4HGGAJ.mjs → chunk-TJDF4CXI.mjs} +2 -2
- package/dist/esm/{chunk-U7K7AJMC.mjs → chunk-TL4Z4KHK.mjs} +2 -2
- package/dist/esm/{chunk-IARAGRKO.mjs → chunk-UGFIWCJQ.mjs} +4 -4
- package/dist/esm/{chunk-Y25NJOOO.mjs → chunk-UK7SPHIE.mjs} +4 -4
- package/dist/esm/{chunk-MX2R6BBJ.mjs → chunk-UOHCJOXI.mjs} +2 -2
- package/dist/esm/{chunk-S5JIXUS6.mjs → chunk-WHSS6I7T.mjs} +4 -4
- package/dist/esm/{chunk-2ZX5PHCY.mjs → chunk-WLTQHGIJ.mjs} +5 -5
- package/dist/esm/{chunk-MD4TZ4HA.mjs → chunk-WUM247HF.mjs} +3 -3
- package/dist/esm/{chunk-IY2ASLSP.mjs → chunk-WXQUBQK4.mjs} +2 -2
- package/dist/esm/{chunk-3T7G4OUL.mjs → chunk-X4N5BN3S.mjs} +2 -2
- package/dist/esm/{chunk-TQLOZKH4.mjs → chunk-XIBOO3WF.mjs} +3 -3
- package/dist/esm/{chunk-2JLHWA2G.mjs → chunk-Y3M32DIB.mjs} +2 -2
- package/dist/esm/{chunk-IKEPH7D2.mjs → chunk-YK66QBML.mjs} +4 -4
- package/dist/esm/{chunk-PITSYZA7.mjs → chunk-YT7V6AVJ.mjs} +2 -2
- package/dist/esm/chunk-ZRBUAZZD.mjs +36 -0
- package/dist/esm/chunk-ZRBUAZZD.mjs.map +1 -0
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/cli/localNode.mjs +1 -1
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.mjs +10 -10
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/core/account/index.mjs +1 -1
- package/dist/esm/core/account/utils/address.mjs +1 -1
- package/dist/esm/core/account/utils/index.mjs +1 -1
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/crypto/abstraction.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.mjs +3 -3
- package/dist/esm/core/crypto/ephemeral.mjs +4 -4
- package/dist/esm/core/crypto/federatedKeyless.mjs +7 -7
- package/dist/esm/core/crypto/index.mjs +13 -13
- package/dist/esm/core/crypto/keyless.mjs +6 -6
- package/dist/esm/core/crypto/multiEd25519.mjs +11 -11
- package/dist/esm/core/crypto/multiKey.mjs +10 -10
- package/dist/esm/core/crypto/privateKey.mjs +1 -1
- package/dist/esm/core/crypto/proof.mjs +1 -1
- package/dist/esm/core/crypto/publicKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.mjs +3 -3
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.mjs +9 -9
- package/dist/esm/core/index.mjs +13 -13
- package/dist/esm/errors/index.mjs +1 -1
- package/dist/esm/index.mjs +102 -99
- package/dist/esm/internal/abstraction.mjs +37 -37
- package/dist/esm/internal/account.d.mts +45 -5
- package/dist/esm/internal/account.mjs +48 -34
- package/dist/esm/internal/ans.mjs +38 -38
- package/dist/esm/internal/coin.mjs +37 -36
- package/dist/esm/internal/digitalAsset.mjs +37 -37
- package/dist/esm/internal/event.mjs +13 -13
- package/dist/esm/internal/experimental.mjs +25 -39
- package/dist/esm/internal/faucet.mjs +14 -14
- package/dist/esm/internal/fungibleAsset.mjs +37 -37
- package/dist/esm/internal/general.mjs +3 -3
- package/dist/esm/internal/keyless.mjs +39 -37
- package/dist/esm/internal/object.mjs +13 -13
- package/dist/esm/internal/staking.mjs +13 -13
- package/dist/esm/internal/table.mjs +4 -4
- package/dist/esm/internal/transaction.mjs +4 -4
- package/dist/esm/internal/transactionSubmission.d.mts +6 -36
- package/dist/esm/internal/transactionSubmission.mjs +36 -42
- package/dist/esm/internal/utils/index.d.mts +15 -0
- package/dist/esm/internal/utils/index.mjs +39 -0
- package/dist/esm/internal/utils/index.mjs.map +1 -0
- package/dist/esm/internal/utils/utils.d.mts +65 -0
- package/dist/esm/internal/utils/utils.mjs +38 -0
- package/dist/esm/internal/utils/utils.mjs.map +1 -0
- package/dist/esm/internal/view.mjs +25 -39
- package/dist/esm/transactions/authenticator/account.mjs +12 -12
- package/dist/esm/transactions/authenticator/index.mjs +13 -13
- package/dist/esm/transactions/authenticator/transaction.mjs +13 -13
- package/dist/esm/transactions/index.mjs +43 -57
- package/dist/esm/transactions/instances/index.mjs +21 -21
- package/dist/esm/transactions/instances/moduleId.mjs +11 -11
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +12 -12
- package/dist/esm/transactions/instances/rawTransaction.mjs +12 -12
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.mjs +15 -15
- package/dist/esm/transactions/instances/simpleTransaction.mjs +12 -12
- package/dist/esm/transactions/instances/transactionPayload.mjs +11 -11
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +45 -33
- package/dist/esm/transactions/management/index.mjs +40 -38
- package/dist/esm/transactions/management/transactionWorker.mjs +40 -38
- package/dist/esm/transactions/scriptComposer/index.mjs +24 -38
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +11 -11
- package/dist/esm/transactions/transactionBuilder/index.mjs +23 -37
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +14 -45
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +17 -17
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +23 -38
- package/dist/esm/transactions/typeTag/index.mjs +11 -11
- package/dist/esm/transactions/typeTag/parser.mjs +11 -11
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/utils/helpers.mjs +1 -1
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/utils/normalizeBundle.mjs +1 -1
- package/package.json +25 -24
- package/src/account/MultiKeyAccount.ts +3 -2
- package/src/api/general.ts +2 -2
- package/src/api/transaction.ts +30 -29
- package/src/internal/account.ts +202 -61
- package/src/internal/transactionSubmission.ts +4 -202
- package/src/internal/utils/index.ts +4 -0
- package/src/internal/utils/utils.ts +116 -0
- package/src/transactions/scriptComposer/index.ts +3 -1
- package/src/transactions/transactionBuilder/remoteAbi.ts +1 -1
- package/src/transactions/transactionBuilder/transactionBuilder.ts +7 -2
- package/dist/esm/chunk-CDJNQ7CS.mjs.map +0 -1
- package/dist/esm/chunk-D3IWXA33.mjs.map +0 -1
- package/dist/esm/chunk-MC4OOX6X.mjs.map +0 -1
- package/dist/esm/chunk-OOQS6BEP.mjs.map +0 -1
- package/dist/esm/chunk-YGFWUFZY.mjs.map +0 -1
- /package/dist/esm/{chunk-JJ6MU2DV.mjs.map → chunk-2FTF6J7F.mjs.map} +0 -0
- /package/dist/esm/{chunk-54XJAHWK.mjs.map → chunk-2HL7JEFC.mjs.map} +0 -0
- /package/dist/esm/{chunk-TZZZNGQI.mjs.map → chunk-2WBJAKBO.mjs.map} +0 -0
- /package/dist/esm/{chunk-3E2SXJXZ.mjs.map → chunk-3DAVHDK4.mjs.map} +0 -0
- /package/dist/esm/{chunk-F65QGYVD.mjs.map → chunk-3TUV6YMI.mjs.map} +0 -0
- /package/dist/esm/{chunk-KZFQOE4N.mjs.map → chunk-5ORUQZAR.mjs.map} +0 -0
- /package/dist/esm/{chunk-RTNVJKNX.mjs.map → chunk-62LC4PPC.mjs.map} +0 -0
- /package/dist/esm/{chunk-YD3KHXBD.mjs.map → chunk-6SNGKTWE.mjs.map} +0 -0
- /package/dist/esm/{chunk-2SIDNRJH.mjs.map → chunk-7F32C225.mjs.map} +0 -0
- /package/dist/esm/{chunk-TFDBSPIQ.mjs.map → chunk-7WW735TU.mjs.map} +0 -0
- /package/dist/esm/{chunk-SFF4FJUD.mjs.map → chunk-A33OBGVN.mjs.map} +0 -0
- /package/dist/esm/{chunk-J32AERDF.mjs.map → chunk-A7LYGPFL.mjs.map} +0 -0
- /package/dist/esm/{chunk-BADWWRLN.mjs.map → chunk-AGKEC2IM.mjs.map} +0 -0
- /package/dist/esm/{chunk-GUEJH55K.mjs.map → chunk-BU43ZFDJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-PP2U5UMC.mjs.map → chunk-C7EEG6SW.mjs.map} +0 -0
- /package/dist/esm/{chunk-HTC3Q5JN.mjs.map → chunk-D4MW64RH.mjs.map} +0 -0
- /package/dist/esm/{chunk-YMHFUSKX.mjs.map → chunk-D6RXVCE3.mjs.map} +0 -0
- /package/dist/esm/{chunk-NFBLI3BS.mjs.map → chunk-DMFRIING.mjs.map} +0 -0
- /package/dist/esm/{chunk-CPZPXG7O.mjs.map → chunk-ECTX2FGD.mjs.map} +0 -0
- /package/dist/esm/{chunk-OVZOE4GS.mjs.map → chunk-G6R77JKO.mjs.map} +0 -0
- /package/dist/esm/{chunk-XHQMSKZP.mjs.map → chunk-G7BB6K4B.mjs.map} +0 -0
- /package/dist/esm/{chunk-XB4SVKZP.mjs.map → chunk-GCQK2S5Q.mjs.map} +0 -0
- /package/dist/esm/{chunk-2WTIMHGC.mjs.map → chunk-HBXBODME.mjs.map} +0 -0
- /package/dist/esm/{chunk-WSI6NVQD.mjs.map → chunk-HL337SEM.mjs.map} +0 -0
- /package/dist/esm/{chunk-V66UC6YI.mjs.map → chunk-HQDHSKVS.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZATMRCFV.mjs.map → chunk-I5G7XFGT.mjs.map} +0 -0
- /package/dist/esm/{chunk-SW4ASQPY.mjs.map → chunk-ILTEOGFF.mjs.map} +0 -0
- /package/dist/esm/{chunk-RGHKUKOX.mjs.map → chunk-IPUAVRGL.mjs.map} +0 -0
- /package/dist/esm/{chunk-MLGROHE6.mjs.map → chunk-IQVHXOD3.mjs.map} +0 -0
- /package/dist/esm/{chunk-IEM26R5Q.mjs.map → chunk-JAZJE3OR.mjs.map} +0 -0
- /package/dist/esm/{chunk-VJ2Z7GO3.mjs.map → chunk-JEVGHYEP.mjs.map} +0 -0
- /package/dist/esm/{chunk-WPJUSJJQ.mjs.map → chunk-JFMFZ2IL.mjs.map} +0 -0
- /package/dist/esm/{chunk-ESGBNVCA.mjs.map → chunk-ORCQEMJL.mjs.map} +0 -0
- /package/dist/esm/{chunk-PYLTV3KI.mjs.map → chunk-QYNYDQE3.mjs.map} +0 -0
- /package/dist/esm/{chunk-F2EFNUWD.mjs.map → chunk-R45SPK6Q.mjs.map} +0 -0
- /package/dist/esm/{chunk-UKYATVYK.mjs.map → chunk-RCXGTN36.mjs.map} +0 -0
- /package/dist/esm/{chunk-6DJZITWL.mjs.map → chunk-SPI2HO3E.mjs.map} +0 -0
- /package/dist/esm/{chunk-BVBIBMAE.mjs.map → chunk-SRXIHVZE.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZAPXD4FC.mjs.map → chunk-T4BFWV46.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZZWD23YW.mjs.map → chunk-T573PCIR.mjs.map} +0 -0
- /package/dist/esm/{chunk-AEMQUDMU.mjs.map → chunk-TDLL7QX5.mjs.map} +0 -0
- /package/dist/esm/{chunk-HRUI6AWF.mjs.map → chunk-TFW6N66T.mjs.map} +0 -0
- /package/dist/esm/{chunk-LK4HGGAJ.mjs.map → chunk-TJDF4CXI.mjs.map} +0 -0
- /package/dist/esm/{chunk-U7K7AJMC.mjs.map → chunk-TL4Z4KHK.mjs.map} +0 -0
- /package/dist/esm/{chunk-IARAGRKO.mjs.map → chunk-UGFIWCJQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-Y25NJOOO.mjs.map → chunk-UK7SPHIE.mjs.map} +0 -0
- /package/dist/esm/{chunk-MX2R6BBJ.mjs.map → chunk-UOHCJOXI.mjs.map} +0 -0
- /package/dist/esm/{chunk-S5JIXUS6.mjs.map → chunk-WHSS6I7T.mjs.map} +0 -0
- /package/dist/esm/{chunk-2ZX5PHCY.mjs.map → chunk-WLTQHGIJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-MD4TZ4HA.mjs.map → chunk-WUM247HF.mjs.map} +0 -0
- /package/dist/esm/{chunk-IY2ASLSP.mjs.map → chunk-WXQUBQK4.mjs.map} +0 -0
- /package/dist/esm/{chunk-3T7G4OUL.mjs.map → chunk-X4N5BN3S.mjs.map} +0 -0
- /package/dist/esm/{chunk-TQLOZKH4.mjs.map → chunk-XIBOO3WF.mjs.map} +0 -0
- /package/dist/esm/{chunk-2JLHWA2G.mjs.map → chunk-Y3M32DIB.mjs.map} +0 -0
- /package/dist/esm/{chunk-IKEPH7D2.mjs.map → chunk-YK66QBML.mjs.map} +0 -0
- /package/dist/esm/{chunk-PITSYZA7.mjs.map → chunk-YT7V6AVJ.mjs.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/transactions/scriptComposer/index.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { ScriptComposerWasm } from \"@aptos-labs/script-composer-pack\";\nimport { AptosApiType, getFunctionParts } from \"../../utils\";\nimport { AptosConfig } from \"../../api/aptosConfig\";\nimport { InputBatchedFunctionData } from \"../types\";\nimport { fetchMoveFunctionAbi, standardizeTypeTags } from \"../transactionBuilder\";\nimport { CallArgument } from \"../../types\";\nimport { convertCallArgument } from \"../transactionBuilder/remoteAbi\";\n\n/**\n * A wrapper class around TransactionComposer, which is a WASM library compiled\n * from aptos-core/aptos-move/script-composer.\n * This class allows the SDK caller to build a transaction that invokes multiple Move functions\n * and allow for arguments to be passed around.\n * */\nexport class AptosScriptComposer {\n private config: AptosConfig;\n\n private builder?: any;\n\n private static transactionComposer?: any;\n\n constructor(aptosConfig: AptosConfig) {\n this.config = aptosConfig;\n this.builder = undefined;\n }\n\n // Initializing the wasm needed for the script composer, must be called\n // before using the composer.\n async init() {\n if (!AptosScriptComposer.transactionComposer) {\n const module = await import(\"@aptos-labs/script-composer-pack\");\n const { TransactionComposer, initSync } = module;\n if (!ScriptComposerWasm.isInitialized) {\n ScriptComposerWasm.init();\n }\n initSync({ module: ScriptComposerWasm.wasm });\n AptosScriptComposer.transactionComposer = TransactionComposer;\n }\n this.builder = AptosScriptComposer.transactionComposer.single_signer();\n }\n\n // Add a move function invocation to the TransactionComposer.\n //\n // Similar to how to create an entry function, the difference is that input arguments could\n // either be a `CallArgument` which represents an abstract value returned from a previous Move call\n // or the regular entry function arguments.\n //\n // The function would also return a list of `CallArgument` that can be passed on to future calls.\n async addBatchedCalls(input: InputBatchedFunctionData): Promise<CallArgument[]> {\n const { moduleAddress, moduleName, functionName } = getFunctionParts(input.function);\n const nodeUrl = this.config.getRequestUrl(AptosApiType.FULLNODE);\n\n // Load the calling module into the builder.\n await this.builder.load_module(nodeUrl, `${moduleAddress}::${moduleName}`);\n\n // Load the calling type arguments into the loader.\n if (input.typeArguments !== undefined) {\n
|
|
1
|
+
{"version":3,"sources":["../../src/transactions/scriptComposer/index.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { ScriptComposerWasm } from \"@aptos-labs/script-composer-pack\";\nimport { AptosApiType, getFunctionParts } from \"../../utils\";\nimport { AptosConfig } from \"../../api/aptosConfig\";\nimport { InputBatchedFunctionData } from \"../types\";\nimport { fetchMoveFunctionAbi, standardizeTypeTags } from \"../transactionBuilder\";\nimport { CallArgument } from \"../../types\";\nimport { convertCallArgument } from \"../transactionBuilder/remoteAbi\";\n\n/**\n * A wrapper class around TransactionComposer, which is a WASM library compiled\n * from aptos-core/aptos-move/script-composer.\n * This class allows the SDK caller to build a transaction that invokes multiple Move functions\n * and allow for arguments to be passed around.\n * */\nexport class AptosScriptComposer {\n private config: AptosConfig;\n\n private builder?: any;\n\n private static transactionComposer?: any;\n\n constructor(aptosConfig: AptosConfig) {\n this.config = aptosConfig;\n this.builder = undefined;\n }\n\n // Initializing the wasm needed for the script composer, must be called\n // before using the composer.\n async init() {\n if (!AptosScriptComposer.transactionComposer) {\n const module = await import(\"@aptos-labs/script-composer-pack\");\n const { TransactionComposer, initSync } = module;\n if (!ScriptComposerWasm.isInitialized) {\n ScriptComposerWasm.init();\n }\n initSync({ module: ScriptComposerWasm.wasm });\n AptosScriptComposer.transactionComposer = TransactionComposer;\n }\n this.builder = AptosScriptComposer.transactionComposer.single_signer();\n }\n\n // Add a move function invocation to the TransactionComposer.\n //\n // Similar to how to create an entry function, the difference is that input arguments could\n // either be a `CallArgument` which represents an abstract value returned from a previous Move call\n // or the regular entry function arguments.\n //\n // The function would also return a list of `CallArgument` that can be passed on to future calls.\n async addBatchedCalls(input: InputBatchedFunctionData): Promise<CallArgument[]> {\n const { moduleAddress, moduleName, functionName } = getFunctionParts(input.function);\n const nodeUrl = this.config.getRequestUrl(AptosApiType.FULLNODE);\n\n // Load the calling module into the builder.\n await this.builder.load_module(nodeUrl, `${moduleAddress}::${moduleName}`);\n\n // Load the calling type arguments into the loader.\n if (input.typeArguments !== undefined) {\n for (const typeArgument of input.typeArguments) {\n await this.builder.load_type_tag(nodeUrl, typeArgument.toString());\n }\n }\n const typeArguments = standardizeTypeTags(input.typeArguments);\n const functionAbi = await fetchMoveFunctionAbi(moduleAddress, moduleName, functionName, this.config);\n // Check the type argument count against the ABI\n if (typeArguments.length !== functionAbi.typeParameters.length) {\n throw new Error(\n `Type argument count mismatch, expected ${functionAbi.typeParameters.length}, received ${typeArguments.length}`,\n );\n }\n\n const functionArguments: CallArgument[] = input.functionArguments.map((arg, i) =>\n convertCallArgument(arg, functionName, functionAbi, i, typeArguments),\n );\n\n return this.builder.add_batched_call(\n `${moduleAddress}::${moduleName}`,\n functionName,\n typeArguments.map((arg) => arg.toString()),\n functionArguments,\n );\n }\n\n build(): Uint8Array {\n return this.builder.generate_batched_calls(true);\n }\n}\n"],"mappings":";;;;;;;;;;AAG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AAEA,WAAO,KAAK,QAAQ;AAAA,MAClB,GAAG,aAAa,KAAK,UAAU;AAAA,MAC/B;AAAA,MACA,cAAc,IAAI,CAAC,QAAQ,IAAI,SAAS,CAAC;AAAA,MACzC;AAAA,IACF;AAAA,EACF;AAAA,EAEA,QAAoB;AAClB,WAAO,KAAK,QAAQ,uBAAuB,IAAI;AAAA,EACjD;AACF;","names":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AnyPublicKey,
|
|
3
3
|
AnySignature
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IPUAVRGL.mjs";
|
|
5
5
|
import {
|
|
6
6
|
AccountPublicKey
|
|
7
7
|
} from "./chunk-R4JTQQBX.mjs";
|
|
@@ -283,4 +283,4 @@ export {
|
|
|
283
283
|
MultiKey,
|
|
284
284
|
MultiKeySignature
|
|
285
285
|
};
|
|
286
|
-
//# sourceMappingURL=chunk-
|
|
286
|
+
//# sourceMappingURL=chunk-DMFRIING.mjs.map
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
PrivateKey
|
|
3
|
-
} from "./chunk-YU65LNIC.mjs";
|
|
4
1
|
import {
|
|
5
2
|
convertSigningMessage
|
|
6
3
|
} from "./chunk-THWEBWUC.mjs";
|
|
@@ -8,6 +5,9 @@ import {
|
|
|
8
5
|
isValidBIP44Path,
|
|
9
6
|
mnemonicToSeed
|
|
10
7
|
} from "./chunk-F7W7KS5C.mjs";
|
|
8
|
+
import {
|
|
9
|
+
PrivateKey
|
|
10
|
+
} from "./chunk-YU65LNIC.mjs";
|
|
11
11
|
import {
|
|
12
12
|
PublicKey
|
|
13
13
|
} from "./chunk-R4JTQQBX.mjs";
|
|
@@ -352,4 +352,4 @@ export {
|
|
|
352
352
|
Secp256k1PrivateKey,
|
|
353
353
|
Secp256k1Signature
|
|
354
354
|
};
|
|
355
|
-
//# sourceMappingURL=chunk-
|
|
355
|
+
//# sourceMappingURL=chunk-ECTX2FGD.mjs.map
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Build
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7F32C225.mjs";
|
|
4
4
|
import {
|
|
5
5
|
TransactionManagement
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3DAVHDK4.mjs";
|
|
7
7
|
import {
|
|
8
8
|
Simulate
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RCXGTN36.mjs";
|
|
10
10
|
import {
|
|
11
11
|
Submit
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-T4BFWV46.mjs";
|
|
13
|
+
import {
|
|
14
|
+
rotateAuthKey
|
|
15
|
+
} from "./chunk-SPVJXZL5.mjs";
|
|
13
16
|
import {
|
|
14
17
|
getSigningMessage,
|
|
15
18
|
publicPackageTransaction,
|
|
16
|
-
rotateAuthKey,
|
|
17
|
-
rotateAuthKeyToMultiEd25519,
|
|
18
|
-
rotateAuthKeyWithVerificationTransaction,
|
|
19
19
|
signAndSubmitAsFeePayer,
|
|
20
20
|
signAndSubmitTransaction,
|
|
21
21
|
signAsFeePayer,
|
|
22
22
|
signTransaction
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-HKQY5GXT.mjs";
|
|
24
24
|
import {
|
|
25
25
|
getGasPriceEstimation,
|
|
26
26
|
getTransactionByHash,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
getTransactions,
|
|
29
29
|
isTransactionPending,
|
|
30
30
|
waitForTransaction
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-BU43ZFDJ.mjs";
|
|
32
32
|
|
|
33
33
|
// src/api/transaction.ts
|
|
34
34
|
var Transaction = class {
|
|
@@ -350,13 +350,26 @@ var Transaction = class {
|
|
|
350
350
|
return publicPackageTransaction({ aptosConfig: this.config, ...args });
|
|
351
351
|
}
|
|
352
352
|
/**
|
|
353
|
-
*
|
|
354
|
-
*
|
|
355
|
-
*
|
|
353
|
+
* Rotates the authentication key for a given account. Once an account is rotated, only the new private key
|
|
354
|
+
* or keyless signing scheme can be used to sign transactions for the account.
|
|
355
|
+
*
|
|
356
|
+
* @param args - The arguments for rotating the authentication key.
|
|
357
|
+
* @param args.fromAccount - The account from which the authentication key will be rotated.
|
|
358
|
+
* @param args.toAccount - (Optional) The target account to rotate to. Required if not using toNewPrivateKey or toAuthKey.
|
|
359
|
+
* @param args.toNewPrivateKey - (Optional) The new private key to rotate to. Required if not using toAccount or toAuthKey.
|
|
360
|
+
* @param args.toAuthKey - (Optional) The new authentication key to rotate to. Can only be used with dangerouslySkipVerification=true.
|
|
361
|
+
* @param args.dangerouslySkipVerification - (Optional) If true, skips verification steps after rotation. Required when using toAuthKey.
|
|
362
|
+
*
|
|
363
|
+
* @remarks
|
|
364
|
+
* This function supports three modes of rotation:
|
|
365
|
+
* 1. Using a target Account object (toAccount)
|
|
366
|
+
* 2. Using a new private key (toNewPrivateKey)
|
|
367
|
+
* 3. Using a raw authentication key (toAuthKey) - requires dangerouslySkipVerification=true
|
|
356
368
|
*
|
|
357
|
-
*
|
|
358
|
-
*
|
|
359
|
-
*
|
|
369
|
+
* When not using dangerouslySkipVerification, the function performs additional safety checks and account setup.
|
|
370
|
+
*
|
|
371
|
+
* If the new key is a multi key, skipping verification is dangerous because verification will publish the public key onchain and
|
|
372
|
+
* prevent users from being locked out of the account from loss of knowledge of one of the public keys.
|
|
360
373
|
*
|
|
361
374
|
* @returns PendingTransactionResponse
|
|
362
375
|
*
|
|
@@ -385,12 +398,6 @@ var Transaction = class {
|
|
|
385
398
|
async rotateAuthKey(args) {
|
|
386
399
|
return rotateAuthKey({ aptosConfig: this.config, ...args });
|
|
387
400
|
}
|
|
388
|
-
async rotateAuthKeyToMultiEd25519(args) {
|
|
389
|
-
return rotateAuthKeyToMultiEd25519({ aptosConfig: this.config, ...args });
|
|
390
|
-
}
|
|
391
|
-
async rotateAuthKeyWithVerificationTransaction(args) {
|
|
392
|
-
return rotateAuthKeyWithVerificationTransaction({ aptosConfig: this.config, ...args });
|
|
393
|
-
}
|
|
394
401
|
/**
|
|
395
402
|
* Sign a transaction that can later be submitted to the chain.
|
|
396
403
|
* This function is essential for ensuring the authenticity of the transaction by using the provided account's signing capabilities.
|
|
@@ -601,4 +608,4 @@ var Transaction = class {
|
|
|
601
608
|
export {
|
|
602
609
|
Transaction
|
|
603
610
|
};
|
|
604
|
-
//# sourceMappingURL=chunk-
|
|
611
|
+
//# sourceMappingURL=chunk-FDMI4BUL.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/api/transaction.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { AptosConfig } from \"./aptosConfig\";\nimport {\n getGasPriceEstimation,\n getTransactionByHash,\n getTransactionByVersion,\n getTransactions,\n isTransactionPending,\n waitForTransaction,\n} from \"../internal/transaction\";\nimport {\n AnyNumber,\n CommittedTransactionResponse,\n GasEstimation,\n HexInput,\n PaginationArgs,\n PendingTransactionResponse,\n TransactionResponse,\n WaitForTransactionOptions,\n} from \"../types\";\nimport {\n FeePayerOrFeePayerAuthenticatorOrNeither,\n getSigningMessage,\n publicPackageTransaction,\n signAndSubmitAsFeePayer,\n signAndSubmitTransaction,\n signAsFeePayer,\n signTransaction,\n} from \"../internal/transactionSubmission\";\nimport {\n AccountAuthenticator,\n AnyRawTransaction,\n InputGenerateTransactionOptions,\n InputGenerateTransactionPayloadData,\n} from \"../transactions\";\nimport { AccountAddressInput, AuthenticationKey, Ed25519PrivateKey } from \"../core\";\nimport { Account } from \"../account\";\nimport { Build } from \"./transactionSubmission/build\";\nimport { Simulate } from \"./transactionSubmission/simulate\";\nimport { Submit } from \"./transactionSubmission/submit\";\nimport { TransactionManagement } from \"./transactionSubmission/management\";\nimport { SimpleTransaction } from \"../transactions/instances/simpleTransaction\";\nimport { rotateAuthKey } from \"../internal/account\";\n\n/**\n * Represents a transaction in the Aptos blockchain,\n * providing methods to build, simulate, submit, and manage transactions.\n * This class encapsulates functionalities for querying transaction details,\n * estimating gas prices, signing transactions, and handling transaction states.\n *\n * This class is used as part of the Aptos object, so should be called like so:\n * @example\n * ```typescript\n * import { Account, Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const APTOS_COIN = \"0x1::aptos_coin::AptosCoin\";\n * const COIN_STORE = `0x1::coin::CoinStore<${APTOS_COIN}>`;\n * const ALICE_INITIAL_BALANCE = 100_000_000;\n * const TRANSFER_AMOUNT = 100;\n *\n * async function example() {\n * console.log(\n * \"This example will create two accounts (Alice and Bob), fund them, and transfer between them.\",\n * );\n *\n * // Set up the client\n * const config = new AptosConfig({ network: Network.DEVNET });\n * const aptos = new Aptos(config);\n *\n * // Generate two account credentials\n * // Each account has a private key, a public key, and an address\n * const alice = Account.generate();\n * const bob = Account.generate();\n *\n * console.log(\"=== Addresses ===\\n\");\n * console.log(`Alice's address is: ${alice.accountAddress}`);\n * console.log(`Bob's address is: ${bob.accountAddress}`);\n *\n * // Fund the accounts using a faucet\n * console.log(\"\\n=== Funding accounts ===\\n\");\n *\n * await aptos.fundAccount({\n * accountAddress: alice.accountAddress,\n * amount: ALICE_INITIAL_BALANCE,\n * });\n *\n * // Send a transaction from Alice's account to Bob's account\n * const txn = await aptos.transaction.build.simple({\n * sender: alice.accountAddress,\n * data: {\n * // All transactions on Aptos are implemented via smart contracts.\n * function: \"0x1::aptos_account::transfer\",\n * functionArguments: [bob.accountAddress, 100],\n * },\n * });\n *\n * console.log(\"\\n=== Transfer transaction ===\\n\");\n * // Both signs and submits\n * const committedTxn = await aptos.signAndSubmitTransaction({\n * signer: alice,\n * transaction: txn,\n * });\n * // Waits for Aptos to verify and execute the transaction\n * const executedTransaction = await aptos.waitForTransaction({\n * transactionHash: committedTxn.hash,\n * });\n * console.log(\"Transaction hash:\", executedTransaction.hash);\n *\n * console.log(\"\\n=== Balances after transfer ===\\n\");\n * const newAliceAccountBalance = await aptos.getAccountResource({\n * accountAddress: alice.accountAddress,\n * resourceType: COIN_STORE,\n * });\n * const newAliceBalance = Number(newAliceAccountBalance.coin.value);\n * console.log(`Alice's balance is: ${newAliceBalance}`);\n *\n * const newBobAccountBalance = await aptos.getAccountResource({\n * accountAddress: bob.accountAddress,\n * resourceType: COIN_STORE,\n * });\n * const newBobBalance = Number(newBobAccountBalance.coin.value);\n * console.log(`Bob's balance is: ${newBobBalance}`);\n * }\n *\n * example();\n * ```\n * @group Transaction\n */\nexport class Transaction {\n readonly config: AptosConfig;\n\n readonly build: Build;\n\n readonly simulate: Simulate;\n\n readonly submit: Submit;\n\n readonly batch: TransactionManagement;\n\n /**\n * Creates an instance of the Aptos client with the specified configuration.\n * This allows you to interact with the Aptos blockchain using the provided settings.\n *\n * @param config - The configuration settings for the Aptos client.\n * @param config.network - The network to connect to (e.g., Testnet, Mainnet).\n * @param config.nodeUrl - The URL of the Aptos node to connect to.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Create a new Aptos client instance\n * const config = new AptosConfig({ network: Network.TESTNET }); // Specify the network\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client created successfully:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Transaction\n */\n constructor(config: AptosConfig) {\n this.config = config;\n this.build = new Build(this.config);\n this.simulate = new Simulate(this.config);\n this.submit = new Submit(this.config);\n this.batch = new TransactionManagement(this.config);\n }\n\n /**\n * Queries on-chain transactions, excluding pending transactions.\n * Use this function to retrieve historical transactions from the blockchain.\n *\n * @param args Optional parameters for pagination.\n * @param args.options Optional pagination options.\n * @param args.options.offset The number of the transaction to start with.\n * @param args.options.limit The number of results to return.\n *\n * @returns An array of on-chain transactions.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetch transactions with pagination\n * const transactions = await aptos.getTransactions({\n * options: {\n * offset: 0, // Start from the first transaction\n * limit: 10, // Limit to 10 results\n * },\n * });\n *\n * console.log(transactions);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Transaction\n */\n async getTransactions(args?: { options?: PaginationArgs }): Promise<TransactionResponse[]> {\n return getTransactions({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries on-chain transaction by version. This function will not return pending transactions.\n *\n * @param args - The arguments for querying the transaction.\n * @param args.ledgerVersion - Transaction version is an unsigned 64-bit number.\n * @returns On-chain transaction. Only on-chain transactions have versions, so this\n * function cannot be used to query pending transactions.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching a transaction by its version\n * const transaction = await aptos.getTransactionByVersion({ ledgerVersion: 1 }); // replace 1 with a real version\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Transaction\n */\n async getTransactionByVersion(args: { ledgerVersion: AnyNumber }): Promise<TransactionResponse> {\n return getTransactionByVersion({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries on-chain transactions by their transaction hash, returning both pending and committed transactions.\n *\n * @param args - The arguments for querying the transaction.\n * @param args.transactionHash - The transaction hash should be a hex-encoded bytes string with a 0x prefix.\n * @returns The transaction from the mempool (pending) or the on-chain (committed) transaction.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetch a transaction by its hash\n * const transaction = await aptos.getTransactionByHash({ transactionHash: \"0x123\" }); // replace with a real transaction hash\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Transaction\n */\n async getTransactionByHash(args: { transactionHash: HexInput }): Promise<TransactionResponse> {\n return getTransactionByHash({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Defines if the specified transaction is currently in a pending state.\n * This function helps you determine the status of a transaction using its hash.\n *\n * @param args - The arguments for the function.\n * @param args.transactionHash - A hash of the transaction in hexadecimal format.\n * @returns `true` if the transaction is in a pending state and `false` otherwise.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Check if the transaction is pending using its hash\n * const isPendingTransaction = await aptos.isPendingTransaction({ transactionHash: \"0x123\" }); // replace with a real transaction hash\n * console.log(\"Is the transaction pending?\", isPendingTransaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Transaction\n */\n async isPendingTransaction(args: { transactionHash: HexInput }): Promise<boolean> {\n return isTransactionPending({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Waits for a transaction to move past the pending state and provides the transaction response.\n * There are 4 cases.\n * 1. Transaction is successfully processed and committed to the chain.\n * - The function will resolve with the transaction response from the API.\n * 2. Transaction is rejected for some reason, and is therefore not committed to the blockchain.\n * - The function will throw an AptosApiError with an HTTP status code indicating some problem with the request.\n * 3. Transaction is committed but execution failed, meaning no changes were\n * written to the blockchain state.\n * - If `checkSuccess` is true, the function will throw a FailedTransactionError\n * If `checkSuccess` is false, the function will resolve with the transaction response where the `success` field is false.\n * 4. Transaction does not move past the pending state within `args.options.timeoutSecs` seconds.\n * - The function will throw a WaitForTransactionError\n *\n * @param args.transactionHash - The hash of a transaction previously submitted to the blockchain.\n * @param args.options - Optional parameters for waiting behavior.\n * @param args.options.timeoutSecs - Timeout in seconds. Defaults to 20 seconds.\n * @param args.options.checkSuccess - A boolean which controls whether the function will error if the transaction failed.\n * Defaults to true.\n * @returns The transaction on-chain response.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Wait for a transaction to complete using its hash\n * const transactionHash = \"0x123\"; // replace with a real transaction hash\n * const transactionResponse = await aptos.waitForTransaction({\n * transactionHash,\n * options: {\n * timeoutSecs: 30, // specify your own timeout if needed\n * checkSuccess: true,\n * },\n * });\n *\n * console.log(transactionResponse);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Transaction\n */\n async waitForTransaction(args: {\n transactionHash: HexInput;\n options?: WaitForTransactionOptions;\n }): Promise<CommittedTransactionResponse> {\n return waitForTransaction({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Estimates the gas unit price required to process a transaction on the Aptos blockchain in a timely manner.\n * This helps users to understand the cost associated with their transactions.\n * {@link https://api.mainnet.aptoslabs.com/v1/spec#/operations/estimate_gas_price}\n *\n * @returns An object containing the estimated gas price.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET }); // Specify your network\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Getting the gas price estimation\n * const gasPriceEstimation = await aptos.getGasPriceEstimation();\n *\n * console.log(\"Estimated Gas Price:\", gasPriceEstimation);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Transaction\n */\n async getGasPriceEstimation(): Promise<GasEstimation> {\n return getGasPriceEstimation({\n aptosConfig: this.config,\n });\n }\n\n /**\n * Returns a signing message for a transaction, allowing a user to sign it using their preferred method before submission to the network.\n *\n * @param args - The arguments for obtaining the signing message.\n * @param args.transaction - A raw transaction for signing elsewhere.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * const transaction = await aptos.transaction.build.simple({\n * sender: \"0x1\", // replace with a real sender address\n * data: {\n * function: \"0x1::aptos_account::transfer\",\n * functionArguments: [\"0x2\", 100], // replace with a real destination address\n * },\n * });\n *\n * const message = await aptos.getSigningMessage({ transaction });\n * console.log(message);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Transaction\n */\n // eslint-disable-next-line class-methods-use-this\n getSigningMessage(args: { transaction: AnyRawTransaction }): Uint8Array {\n return getSigningMessage(args);\n }\n\n /**\n * Generates a transaction to publish a Move package to the blockchain.\n * This function helps you create a transaction that can be simulated or submitted to the chain for publishing a package.\n *\n * To get the `metadataBytes` and `byteCode`, can compile using Aptos CLI with command\n * `aptos move compile --save-metadata ...`,\n *\n * {@link https://aptos.dev/tutorials/your-first-dapp/#step-4-publish-a-move-module}\n *\n * @param args The arguments for publishing the package.\n * @param args.account The publisher account.\n * @param args.metadataBytes The package metadata bytes.\n * @param args.moduleBytecode An array of the bytecode of each module in the package in compiler output order.\n * @param args.options Optional settings for generating the transaction.\n *\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Replace with a real account address\n * const account = \"0x1\";\n * const metadataBytes = \"0x...\"; // replace with real metadata bytes\n * const byteCode = \"0x...\"; // replace with real module bytecode\n *\n * const transaction = await aptos.publishPackageTransaction({\n * account,\n * metadataBytes,\n * moduleBytecode: [byteCode],\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Transaction\n */\n async publishPackageTransaction(args: {\n account: AccountAddressInput;\n metadataBytes: HexInput;\n moduleBytecode: Array<HexInput>;\n options?: InputGenerateTransactionOptions;\n }): Promise<SimpleTransaction> {\n return publicPackageTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Rotates the authentication key for a given account. Once an account is rotated, only the new private key\n * or keyless signing scheme can be used to sign transactions for the account.\n *\n * @param args - The arguments for rotating the authentication key.\n * @param args.fromAccount - The account from which the authentication key will be rotated.\n * @param args.toAccount - (Optional) The target account to rotate to. Required if not using toNewPrivateKey or toAuthKey.\n * @param args.toNewPrivateKey - (Optional) The new private key to rotate to. Required if not using toAccount or toAuthKey.\n * @param args.toAuthKey - (Optional) The new authentication key to rotate to. Can only be used with dangerouslySkipVerification=true.\n * @param args.dangerouslySkipVerification - (Optional) If true, skips verification steps after rotation. Required when using toAuthKey.\n *\n * @remarks\n * This function supports three modes of rotation:\n * 1. Using a target Account object (toAccount)\n * 2. Using a new private key (toNewPrivateKey)\n * 3. Using a raw authentication key (toAuthKey) - requires dangerouslySkipVerification=true\n *\n * When not using dangerouslySkipVerification, the function performs additional safety checks and account setup.\n *\n * If the new key is a multi key, skipping verification is dangerous because verification will publish the public key onchain and\n * prevent users from being locked out of the account from loss of knowledge of one of the public keys.\n *\n * @returns PendingTransactionResponse\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network, Account, PrivateKey } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Rotate the authentication key for an account\n * const response = await aptos.rotateAuthKey({\n * // replace with a real account\n * fromAccount: Account.generate(),\n * // replace with a real private key\n * toNewPrivateKey: new PrivateKey(\"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\"),\n * });\n *\n * console.log(response);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Transaction\n */\n async rotateAuthKey(\n args: {\n fromAccount: Account;\n } & (\n | { toAccount: Account; dangerouslySkipVerification?: never }\n | { toNewPrivateKey: Ed25519PrivateKey; dangerouslySkipVerification?: never }\n | { toAuthKey: AuthenticationKey; dangerouslySkipVerification: true }\n ),\n ): Promise<PendingTransactionResponse> {\n return rotateAuthKey({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Sign a transaction that can later be submitted to the chain.\n * This function is essential for ensuring the authenticity of the transaction by using the provided account's signing capabilities.\n *\n * @param args - The arguments for signing the transaction.\n * @param args.signer - The account that will sign the transaction.\n * @param args.transaction - A raw transaction to sign.\n *\n * @returns AccountAuthenticator - The authenticator for the signed transaction.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * const sender = Account.generate(); // Generate a new account for signing\n * const transaction = await aptos.transaction.build.simple({\n * sender: sender.accountAddress,\n * data: {\n * function: \"0x1::aptos_account::transfer\",\n * functionArguments: [ \"0x1\", 100 ], // replace with a real account address and amount\n * },\n * });\n *\n * const signedTransaction = await aptos.transaction.sign({\n * signer: sender,\n * transaction,\n * }); // Sign the transaction\n *\n * console.log(\"Signed Transaction:\", signedTransaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Transaction\n */\n // eslint-disable-next-line class-methods-use-this\n sign(args: { signer: Account; transaction: AnyRawTransaction }): AccountAuthenticator {\n return signTransaction({\n ...args,\n });\n }\n\n /**\n * Sign a transaction as a fee payer that can later be submitted to the chain.\n * This function ensures that the transaction is marked with the fee payer's address, allowing it to be processed correctly.\n *\n * @param args - The arguments for signing the transaction.\n * @param args.signer - The fee payer signer account.\n * @param args.transaction - A raw transaction to sign on. This transaction must include a `feePayerAddress` property.\n *\n * @returns AccountAuthenticator - The authenticator for the signed transaction.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * const sender = Account.generate(); // Generate a new account for the fee payer\n * const transaction = await aptos.transaction.build.simple({\n * // All transactions on Aptos are implemented via smart contracts.\n * function: \"0x1::aptos_account::transfer\",\n * functionArguments: [sender.accountAddress, 100],\n * feePayerAddress: sender.accountAddress, // Set the fee payer address\n * });\n *\n * const signedTransaction = await aptos.transaction.signAsFeePayer({\n * signer: sender,\n * transaction,\n * });\n *\n * console.log(\"Signed transaction as fee payer:\", signedTransaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Transaction\n */\n // eslint-disable-next-line class-methods-use-this\n signAsFeePayer(args: { signer: Account; transaction: AnyRawTransaction }): AccountAuthenticator {\n return signAsFeePayer({\n ...args,\n });\n }\n\n // TRANSACTION SUBMISSION //\n\n /**\n * @deprecated Prefer to use `aptos.transaction.batch.forSingleAccount()`\n *\n * Batch transactions for a single account by submitting multiple transaction payloads.\n * This function is useful for efficiently processing and submitting transactions that do not depend on each other, such as\n * batch funding or batch token minting.\n *\n * @param args - The arguments for batching transactions.\n * @param args.sender - The sender account to sign and submit the transactions.\n * @param args.data - An array of transaction payloads to be processed.\n * @param args.options - Optional. Transaction generation configurations (excluding accountSequenceNumber).\n *\n * @throws Error if any worker failure occurs during submission.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network, Account } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n * const sender = Account.generate(); // Generate a new account for sending transactions\n *\n * async function runExample() {\n * const transactions = [\n * { }, // Build your first transaction payload\n * { }, // Build your second transaction payload\n * ];\n *\n * // Batch transactions for the single account\n * await aptos.batchTransactionsForSingleAccount({\n * sender,\n * data: transactions,\n * });\n *\n * console.log(\"Batch transactions submitted successfully.\");\n * }\n * runExample().catch(console.error);\n * ```\n * @group Transaction\n */\n async batchTransactionsForSingleAccount(args: {\n sender: Account;\n data: InputGenerateTransactionPayloadData[];\n options?: Omit<InputGenerateTransactionOptions, \"accountSequenceNumber\">;\n }): Promise<void> {\n try {\n const { sender, data, options } = args;\n this.batch.forSingleAccount({ sender, data, options });\n } catch (error: any) {\n throw new Error(`failed to submit transactions with error: ${error}`);\n }\n }\n\n /**\n * Sign and submit a single signer transaction to the blockchain.\n * This function allows you to execute a transaction after signing it with the specified account.\n *\n * @param args The arguments for signing and submitting the transaction.\n * @param args.signer The signer account to sign the transaction.\n * @param args.transaction An instance of a RawTransaction, plus optional secondary/fee payer addresses.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * const sender = Account.generate(); // Generate a new account for sending the transaction\n * const transaction = await aptos.transaction.build.simple({\n * sender: sender.accountAddress,\n * data: {\n * function: \"0x1::aptos_account::transfer\",\n * functionArguments: [ \"0x1\", 100 ], // replace with a real account address\n * },\n * });\n *\n * // Sign and submit the transaction\n * const pendingTransaction = await aptos.signAndSubmitTransaction({\n * signer: sender,\n * transaction,\n * });\n *\n * console.log(pendingTransaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @return PendingTransactionResponse\n * @group Transaction\n */\n async signAndSubmitTransaction(\n args: FeePayerOrFeePayerAuthenticatorOrNeither & {\n signer: Account;\n transaction: AnyRawTransaction;\n },\n ): Promise<PendingTransactionResponse> {\n return signAndSubmitTransaction({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Sign and submit a single signer transaction as the fee payer to chain given an authenticator by the sender of the transaction.\n *\n * @param args.feePayer The fee payer account to sign the transaction\n * @param args.senderAuthenticator The AccountAuthenticator signed by the sender of the transaction\n * @param args.transaction An instance of a RawTransaction, plus optional secondary/fee payer addresses\n *\n * @example\n * const transaction = await aptos.transaction.build.simple({sender: alice.accountAddress, feePayer: true ...})\n * const senderAuthenticator = alice.signTransactionWithAuthenticator(transaction)\n * const pendingTransaction = await aptos.signAndSubmitAsFeePayer({\n * senderAuthenticator,\n * feePayer: bob,\n * transaction,\n * })\n *\n * @return PendingTransactionResponse\n * @group Transaction\n */\n async signAndSubmitAsFeePayer(args: {\n feePayer: Account;\n senderAuthenticator: AccountAuthenticator;\n transaction: AnyRawTransaction;\n }): Promise<PendingTransactionRespon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,wBAAwB;AAAA,MAC7B,aAAa,KAAK;AAAA,MAClB,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AACF;","names":[]}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import {
|
|
2
|
+
memoizeAsync
|
|
3
|
+
} from "./chunk-BEYIOC2H.mjs";
|
|
4
|
+
import {
|
|
5
|
+
getAptosFullNode,
|
|
6
|
+
paginateWithObfuscatedCursor
|
|
7
|
+
} from "./chunk-XQFUKBY7.mjs";
|
|
8
|
+
import {
|
|
9
|
+
AccountAddress
|
|
10
|
+
} from "./chunk-CXLXUSCG.mjs";
|
|
11
|
+
|
|
12
|
+
// src/internal/utils/utils.ts
|
|
13
|
+
async function getModules(args) {
|
|
14
|
+
const { aptosConfig, accountAddress, options } = args;
|
|
15
|
+
return paginateWithObfuscatedCursor({
|
|
16
|
+
aptosConfig,
|
|
17
|
+
originMethod: "getModules",
|
|
18
|
+
path: `accounts/${AccountAddress.from(accountAddress).toString()}/modules`,
|
|
19
|
+
params: {
|
|
20
|
+
ledger_version: options?.ledgerVersion,
|
|
21
|
+
offset: options?.offset,
|
|
22
|
+
limit: options?.limit ?? 1e3
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
async function getInfo(args) {
|
|
27
|
+
const { aptosConfig, accountAddress } = args;
|
|
28
|
+
const { data } = await getAptosFullNode({
|
|
29
|
+
aptosConfig,
|
|
30
|
+
originMethod: "getInfo",
|
|
31
|
+
path: `accounts/${AccountAddress.from(accountAddress).toString()}`
|
|
32
|
+
});
|
|
33
|
+
return data;
|
|
34
|
+
}
|
|
35
|
+
async function getModule(args) {
|
|
36
|
+
if (args.options?.ledgerVersion !== void 0) {
|
|
37
|
+
return getModuleInner(args);
|
|
38
|
+
}
|
|
39
|
+
return memoizeAsync(
|
|
40
|
+
async () => getModuleInner(args),
|
|
41
|
+
`module-${args.accountAddress}-${args.moduleName}`,
|
|
42
|
+
1e3 * 60 * 5
|
|
43
|
+
// 5 minutes
|
|
44
|
+
)();
|
|
45
|
+
}
|
|
46
|
+
async function getModuleInner(args) {
|
|
47
|
+
const { aptosConfig, accountAddress, moduleName, options } = args;
|
|
48
|
+
const { data } = await getAptosFullNode({
|
|
49
|
+
aptosConfig,
|
|
50
|
+
originMethod: "getModule",
|
|
51
|
+
path: `accounts/${AccountAddress.from(accountAddress).toString()}/module/${moduleName}`,
|
|
52
|
+
params: { ledger_version: options?.ledgerVersion }
|
|
53
|
+
});
|
|
54
|
+
return data;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export {
|
|
58
|
+
getModules,
|
|
59
|
+
getInfo,
|
|
60
|
+
getModule
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=chunk-FRLS4GRM.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/internal/utils/utils.ts"],"sourcesContent":["import { AccountAddress, AccountAddressInput } from \"../../core/accountAddress\";\nimport { MoveModuleBytecode, LedgerVersionArg, PaginationArgs, AccountData } from \"../../types/types\";\nimport { AptosConfig } from \"../../api/aptosConfig\";\nimport { getAptosFullNode, paginateWithObfuscatedCursor } from \"../../client\";\nimport { memoizeAsync } from \"../../utils/memoize\";\n\n/**\n * Retrieves the modules associated with a specified account address.\n *\n * @param args - The arguments for retrieving modules.\n * @param args.aptosConfig - The configuration for connecting to the Aptos blockchain.\n * @param args.accountAddress - The address of the account whose modules are to be retrieved.\n * @param args.options - Optional parameters for pagination and ledger version.\n * @param args.options.limit - The maximum number of modules to retrieve (default is 1000).\n * @param args.options.offset - The starting point for pagination. Note, this is obfuscated and is not an index.\n * @param args.options.ledgerVersion - The specific ledger version to query.\n * @group Implementation\n */\nexport async function getModules(args: {\n aptosConfig: AptosConfig;\n accountAddress: AccountAddressInput;\n options?: PaginationArgs & LedgerVersionArg;\n}): Promise<MoveModuleBytecode[]> {\n const { aptosConfig, accountAddress, options } = args;\n return paginateWithObfuscatedCursor<{}, MoveModuleBytecode[]>({\n aptosConfig,\n originMethod: \"getModules\",\n path: `accounts/${AccountAddress.from(accountAddress).toString()}/modules`,\n params: {\n ledger_version: options?.ledgerVersion,\n offset: options?.offset,\n limit: options?.limit ?? 1000,\n },\n });\n}\n\n/**\n * Retrieves account information for a specified account address.\n *\n * @param args - The arguments for retrieving account information.\n * @param args.aptosConfig - The configuration object for Aptos.\n * @param args.accountAddress - The address of the account to retrieve information for.\n * @group Implementation\n */\nexport async function getInfo(args: {\n aptosConfig: AptosConfig;\n accountAddress: AccountAddressInput;\n}): Promise<AccountData> {\n const { aptosConfig, accountAddress } = args;\n const { data } = await getAptosFullNode<{}, AccountData>({\n aptosConfig,\n originMethod: \"getInfo\",\n path: `accounts/${AccountAddress.from(accountAddress).toString()}`,\n });\n return data;\n}\n\n/**\n * Queries for a move module given an account address and module name.\n * This function can help you retrieve the module's ABI and other relevant information.\n *\n * @param args - The arguments for retrieving the module.\n * @param args.aptosConfig - The configuration for the Aptos client.\n * @param args.accountAddress - The account address in hex-encoded 32 byte format.\n * @param args.moduleName - The name of the module to retrieve.\n * @param args.options - Optional parameters for the request.\n * @param args.options.ledgerVersion - Specifies the ledger version of transactions. By default, the latest version will be used.\n * @returns The move module.\n * @group Implementation\n */\nexport async function getModule(args: {\n aptosConfig: AptosConfig;\n accountAddress: AccountAddressInput;\n moduleName: string;\n options?: LedgerVersionArg;\n}): Promise<MoveModuleBytecode> {\n // We don't memoize the account module by ledger version, as it's not a common use case, this would be handled\n // by the developer directly\n if (args.options?.ledgerVersion !== undefined) {\n return getModuleInner(args);\n }\n\n return memoizeAsync(\n async () => getModuleInner(args),\n `module-${args.accountAddress}-${args.moduleName}`,\n 1000 * 60 * 5, // 5 minutes\n )();\n}\n\n/**\n * Retrieves the bytecode of a specified module from a given account address.\n *\n * @param args - The parameters for retrieving the module bytecode.\n * @param args.aptosConfig - The configuration for connecting to the Aptos network.\n * @param args.accountAddress - The address of the account from which to retrieve the module.\n * @param args.moduleName - The name of the module to retrieve.\n * @param args.options - Optional parameters for specifying the ledger version.\n * @param args.options.ledgerVersion - The specific ledger version to query.\n * @group Implementation\n */\nasync function getModuleInner(args: {\n aptosConfig: AptosConfig;\n accountAddress: AccountAddressInput;\n moduleName: string;\n options?: LedgerVersionArg;\n}): Promise<MoveModuleBytecode> {\n const { aptosConfig, accountAddress, moduleName, options } = args;\n\n const { data } = await getAptosFullNode<{}, MoveModuleBytecode>({\n aptosConfig,\n originMethod: \"getModule\",\n path: `accounts/${AccountAddress.from(accountAddress).toString()}/module/${moduleName}`,\n params: { ledger_version: options?.ledgerVersion },\n });\n return data;\n}\n"],"mappings":";;;;;;;;;;;;AAkBA,eAAsB,WAAW,MAIC;AAChC,QAAM,EAAE,aAAa,gBAAgB,QAAQ,IAAI;AACjD,SAAO,6BAAuD;AAAA,IAC5D;AAAA,IACA,cAAc;AAAA,IACd,MAAM,YAAY,eAAe,KAAK,cAAc,EAAE,SAAS,CAAC;AAAA,IAChE,QAAQ;AAAA,MACN,gBAAgB,SAAS;AAAA,MACzB,QAAQ,SAAS;AAAA,MACjB,OAAO,SAAS,SAAS;AAAA,IAC3B;AAAA,EACF,CAAC;AACH;AAUA,eAAsB,QAAQ,MAGL;AACvB,QAAM,EAAE,aAAa,eAAe,IAAI;AACxC,QAAM,EAAE,KAAK,IAAI,MAAM,iBAAkC;AAAA,IACvD;AAAA,IACA,cAAc;AAAA,IACd,MAAM,YAAY,eAAe,KAAK,cAAc,EAAE,SAAS,CAAC;AAAA,EAClE,CAAC;AACD,SAAO;AACT;AAeA,eAAsB,UAAU,MAKA;AAG9B,MAAI,KAAK,SAAS,kBAAkB,QAAW;AAC7C,WAAO,eAAe,IAAI;AAAA,EAC5B;AAEA,SAAO;AAAA,IACL,YAAY,eAAe,IAAI;AAAA,IAC/B,UAAU,KAAK,cAAc,IAAI,KAAK,UAAU;AAAA,IAChD,MAAO,KAAK;AAAA;AAAA,EACd,EAAE;AACJ;AAaA,eAAe,eAAe,MAKE;AAC9B,QAAM,EAAE,aAAa,gBAAgB,YAAY,QAAQ,IAAI;AAE7D,QAAM,EAAE,KAAK,IAAI,MAAM,iBAAyC;AAAA,IAC9D;AAAA,IACA,cAAc;AAAA,IACd,MAAM,YAAY,eAAe,KAAK,cAAc,EAAE,SAAS,CAAC,WAAW,UAAU;AAAA,IACrF,QAAQ,EAAE,gBAAgB,SAAS,cAAc;AAAA,EACnD,CAAC;AACD,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-G3MHXDYA.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FungibleAsset
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7WW735TU.mjs";
|
|
4
4
|
import {
|
|
5
5
|
General
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IP7GATDH.mjs";
|
|
7
7
|
import {
|
|
8
8
|
Keyless
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SPI2HO3E.mjs";
|
|
10
10
|
import {
|
|
11
11
|
AptosObject
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-D6RXVCE3.mjs";
|
|
13
13
|
import {
|
|
14
14
|
Staking
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-JFMFZ2IL.mjs";
|
|
16
16
|
import {
|
|
17
17
|
Table
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-WLTQHGIJ.mjs";
|
|
19
19
|
import {
|
|
20
20
|
Transaction
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-FDMI4BUL.mjs";
|
|
22
22
|
import {
|
|
23
23
|
ANS
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-TJDF4CXI.mjs";
|
|
25
25
|
import {
|
|
26
26
|
AptosConfig
|
|
27
27
|
} from "./chunk-OFUNBTK4.mjs";
|
|
28
28
|
import {
|
|
29
29
|
Coin
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-HQDHSKVS.mjs";
|
|
31
31
|
import {
|
|
32
32
|
DigitalAsset
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-A33OBGVN.mjs";
|
|
34
34
|
import {
|
|
35
35
|
Event
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-A7LYGPFL.mjs";
|
|
37
37
|
import {
|
|
38
38
|
Experimental
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-SRXIHVZE.mjs";
|
|
40
40
|
import {
|
|
41
41
|
Faucet
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-I5G7XFGT.mjs";
|
|
43
43
|
import {
|
|
44
44
|
Account
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-2HL7JEFC.mjs";
|
|
46
46
|
import {
|
|
47
47
|
AccountAbstraction
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-HL337SEM.mjs";
|
|
49
49
|
|
|
50
50
|
// src/api/aptos.ts
|
|
51
51
|
var Aptos = class {
|
|
@@ -118,4 +118,4 @@ applyMixin(Aptos, AptosObject, "object");
|
|
|
118
118
|
export {
|
|
119
119
|
Aptos
|
|
120
120
|
};
|
|
121
|
-
//# sourceMappingURL=chunk-
|
|
121
|
+
//# sourceMappingURL=chunk-G6R77JKO.mjs.map
|
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
} from "./chunk-F4VI7BNX.mjs";
|
|
4
4
|
import {
|
|
5
5
|
AccountAuthenticatorSingleKey
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AGKEC2IM.mjs";
|
|
7
7
|
import {
|
|
8
8
|
AnyPublicKey,
|
|
9
9
|
AnySignature
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-IPUAVRGL.mjs";
|
|
11
11
|
import {
|
|
12
12
|
Secp256k1PrivateKey
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ECTX2FGD.mjs";
|
|
14
14
|
import {
|
|
15
15
|
Ed25519PrivateKey
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-TFW6N66T.mjs";
|
|
17
17
|
import {
|
|
18
18
|
AccountAddress
|
|
19
19
|
} from "./chunk-CXLXUSCG.mjs";
|
|
@@ -164,4 +164,4 @@ export {
|
|
|
164
164
|
isSingleKeySigner,
|
|
165
165
|
SingleKeyAccount
|
|
166
166
|
};
|
|
167
|
-
//# sourceMappingURL=chunk-
|
|
167
|
+
//# sourceMappingURL=chunk-G7BB6K4B.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
queryIndexer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YK66QBML.mjs";
|
|
4
4
|
import {
|
|
5
5
|
GetObjectData
|
|
6
6
|
} from "./chunk-EPTUAWRA.mjs";
|
|
@@ -40,4 +40,4 @@ export {
|
|
|
40
40
|
getObjectData,
|
|
41
41
|
getObjectDataByObjectAddress
|
|
42
42
|
};
|
|
43
|
-
//# sourceMappingURL=chunk-
|
|
43
|
+
//# sourceMappingURL=chunk-GCQK2S5Q.mjs.map
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
} from "./chunk-AKXCFBYF.mjs";
|
|
5
5
|
import {
|
|
6
6
|
Account
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WHSS6I7T.mjs";
|
|
8
8
|
import {
|
|
9
9
|
generateSigningMessageForTransaction
|
|
10
10
|
} from "./chunk-F4VI7BNX.mjs";
|
|
11
11
|
import {
|
|
12
12
|
AccountAuthenticatorAbstraction
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-AGKEC2IM.mjs";
|
|
14
14
|
import {
|
|
15
15
|
isValidFunctionInfo
|
|
16
16
|
} from "./chunk-RQS33JAS.mjs";
|
|
@@ -81,4 +81,4 @@ var AbstractedAccount = class _AbstractedAccount extends Account {
|
|
|
81
81
|
export {
|
|
82
82
|
AbstractedAccount
|
|
83
83
|
};
|
|
84
|
-
//# sourceMappingURL=chunk-
|
|
84
|
+
//# sourceMappingURL=chunk-HBXBODME.mjs.map
|