@aptos-labs/ts-sdk 1.13.2 → 1.13.3-zeta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/index.d.ts +1781 -1347
- package/dist/common/index.js +26 -26
- package/dist/common/index.js.map +1 -1
- package/dist/esm/{Ed25519Account--qjfup2u.d.mts → Ed25519Account-8gJF5t3F.d.mts} +10 -12
- package/dist/esm/account/Account.d.mts +34 -0
- package/dist/esm/account/Account.mjs +2 -0
- package/dist/esm/account/Ed25519Account.d.mts +34 -0
- package/dist/esm/account/Ed25519Account.mjs +2 -0
- package/dist/esm/account/EphemeralKeyPair.d.mts +46 -0
- package/dist/esm/account/EphemeralKeyPair.mjs +2 -0
- package/dist/esm/account/KeylessAccount.d.mts +87 -0
- package/dist/esm/account/KeylessAccount.mjs +2 -0
- package/dist/esm/account/MultiKeyAccount.d.mts +99 -0
- package/dist/esm/account/MultiKeyAccount.mjs +2 -0
- package/dist/esm/account/SingleKeyAccount.d.mts +34 -0
- package/dist/esm/account/SingleKeyAccount.mjs +2 -0
- package/dist/esm/account/index.d.mts +39 -0
- package/dist/esm/account/index.mjs +2 -0
- package/dist/esm/api/account.d.mts +13 -1
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.d.mts +2 -2
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +14 -8
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/aptosConfig.d.mts +20 -0
- package/dist/esm/api/aptosConfig.mjs +1 -1
- package/dist/esm/api/coin.d.mts +7 -7
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.d.mts +1 -1
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/event.mjs +1 -1
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.d.mts +5 -5
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.d.mts +7 -7
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +13 -8
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/keyless.d.mts +65 -0
- package/dist/esm/api/keyless.mjs +2 -0
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/transaction.d.mts +1 -1
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.d.mts +3 -3
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.d.mts +8 -8
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.d.mts +1 -1
- package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
- package/dist/esm/api/transactionSubmission/simulate.d.mts +6 -6
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/bcs/serializer.d.mts +2 -0
- package/dist/esm/bcs/serializer.mjs +1 -1
- package/dist/esm/{chunk-KDCHX7BI.mjs → chunk-274CXZ6R.mjs} +2 -2
- package/dist/esm/chunk-2M7KHFEG.mjs +2 -0
- package/dist/esm/chunk-2M7KHFEG.mjs.map +1 -0
- package/dist/esm/{chunk-TORRTLWV.mjs → chunk-2SD6JLIU.mjs} +2 -2
- package/dist/esm/chunk-2SD6JLIU.mjs.map +1 -0
- package/dist/esm/chunk-2YDIOWRJ.mjs +2 -0
- package/dist/esm/chunk-2YDIOWRJ.mjs.map +1 -0
- package/dist/esm/{chunk-4DNVCOW7.mjs → chunk-3CIA6J5L.mjs} +2 -2
- package/dist/esm/chunk-3CIA6J5L.mjs.map +1 -0
- package/dist/esm/{chunk-TBMAJ6AW.mjs → chunk-3FVRXELT.mjs} +2 -2
- package/dist/esm/{chunk-RQEWIZ67.mjs → chunk-3LQPAGL6.mjs} +2 -2
- package/dist/esm/{chunk-6IGEUEER.mjs → chunk-3PGVEOWR.mjs} +2 -2
- package/dist/esm/{chunk-DMKUAQB7.mjs → chunk-3VGX3TXH.mjs} +2 -2
- package/dist/esm/chunk-4NMDYPUD.mjs +1 -0
- package/dist/esm/chunk-4NMDYPUD.mjs.map +1 -0
- package/dist/esm/chunk-5VSMDXZ6.mjs +2 -0
- package/dist/esm/chunk-5VSMDXZ6.mjs.map +1 -0
- package/dist/esm/chunk-6GQAHQGW.mjs +2 -0
- package/dist/esm/chunk-6GQAHQGW.mjs.map +1 -0
- package/dist/esm/chunk-6NMHAFIO.mjs +2 -0
- package/dist/esm/chunk-6NMHAFIO.mjs.map +1 -0
- package/dist/esm/{chunk-YKVKSNH4.mjs → chunk-6NZNCDDW.mjs} +2 -2
- package/dist/esm/{chunk-QIAHBEEW.mjs → chunk-6RBUXB5I.mjs} +2 -2
- package/dist/esm/{chunk-3HV2C4SS.mjs → chunk-7FNHL6LU.mjs} +2 -2
- package/dist/esm/{chunk-FXNFWLQC.mjs → chunk-7H3HRFVM.mjs} +2 -2
- package/dist/esm/chunk-7MPJPZ73.mjs +2 -0
- package/dist/esm/chunk-7MPJPZ73.mjs.map +1 -0
- package/dist/esm/{chunk-NPFNYP75.mjs → chunk-7STYQ5ZE.mjs} +2 -2
- package/dist/esm/chunk-7XHVF3ZX.mjs +2 -0
- package/dist/esm/{chunk-MNBYKY5P.mjs.map → chunk-7XHVF3ZX.mjs.map} +1 -1
- package/dist/esm/chunk-7Z6DYLCA.mjs +1 -0
- package/dist/esm/chunk-7Z6DYLCA.mjs.map +1 -0
- package/dist/esm/{chunk-UMFJDDYI.mjs → chunk-AKGASNN4.mjs} +2 -2
- package/dist/esm/chunk-AKGASNN4.mjs.map +1 -0
- package/dist/esm/{chunk-QWRH22H4.mjs → chunk-APEBWN6Q.mjs} +2 -2
- package/dist/esm/chunk-AQ4I7VVB.mjs +1 -0
- package/dist/esm/chunk-AQ4I7VVB.mjs.map +1 -0
- package/dist/esm/{chunk-ZYYK3UXP.mjs → chunk-C3L4ETUF.mjs} +2 -2
- package/dist/esm/{chunk-3RUY5FQK.mjs → chunk-CN37OHFT.mjs} +2 -2
- package/dist/esm/chunk-CN37OHFT.mjs.map +1 -0
- package/dist/esm/{chunk-WFZDFFBM.mjs → chunk-COW5IGYC.mjs} +2 -2
- package/dist/esm/chunk-CQJ4WN7M.mjs +2 -0
- package/dist/esm/chunk-CQJ4WN7M.mjs.map +1 -0
- package/dist/esm/{chunk-PIOHC246.mjs → chunk-DKLA4F3P.mjs} +2 -2
- package/dist/esm/chunk-DKLA4F3P.mjs.map +1 -0
- package/dist/esm/{chunk-TC3VVMPY.mjs → chunk-E36GTDEB.mjs} +2 -2
- package/dist/esm/chunk-E4Z5IEZP.mjs +2 -0
- package/dist/esm/chunk-E4Z5IEZP.mjs.map +1 -0
- package/dist/esm/{chunk-FS3NSGBF.mjs → chunk-EB7AI4B4.mjs} +2 -2
- package/dist/esm/chunk-EQKI6NJR.mjs +2 -0
- package/dist/esm/chunk-EQKI6NJR.mjs.map +1 -0
- package/dist/esm/chunk-F6QCHPVS.mjs +2 -0
- package/dist/esm/chunk-F6QCHPVS.mjs.map +1 -0
- package/dist/esm/chunk-FLYEALDB.mjs +2 -0
- package/dist/esm/chunk-FLYEALDB.mjs.map +1 -0
- package/dist/esm/{chunk-GRT5PHL6.mjs → chunk-H3LMPXEM.mjs} +2 -2
- package/dist/esm/{chunk-YBEF3UR3.mjs → chunk-H6BRBIMG.mjs} +2 -2
- package/dist/esm/{chunk-2PFN7LYP.mjs → chunk-HFLWASAB.mjs} +2 -2
- package/dist/esm/{chunk-UML2VQZT.mjs → chunk-HGZGTBA4.mjs} +2 -2
- package/dist/esm/chunk-HQWIGPYQ.mjs +2 -0
- package/dist/esm/chunk-HQWIGPYQ.mjs.map +1 -0
- package/dist/esm/chunk-HURQZGUZ.mjs +2 -0
- package/dist/esm/chunk-HURQZGUZ.mjs.map +1 -0
- package/dist/esm/{chunk-TGXZVNR5.mjs → chunk-IEZO4PIG.mjs} +2 -2
- package/dist/esm/{chunk-PJLCPRYJ.mjs → chunk-J2IIPYZG.mjs} +2 -2
- package/dist/esm/chunk-JEUAQVXW.mjs +2 -0
- package/dist/esm/chunk-JEUAQVXW.mjs.map +1 -0
- package/dist/esm/chunk-JOYJUVSE.mjs +2 -0
- package/dist/esm/chunk-JOYJUVSE.mjs.map +1 -0
- package/dist/esm/chunk-JXCZTOYC.mjs +1 -0
- package/dist/esm/chunk-JXCZTOYC.mjs.map +1 -0
- package/dist/esm/{chunk-TGG7SWBO.mjs → chunk-KCVBUZ6L.mjs} +2 -2
- package/dist/esm/chunk-KCVBUZ6L.mjs.map +1 -0
- package/dist/esm/{chunk-EJCKCYYI.mjs → chunk-KNHI66FK.mjs} +2 -2
- package/dist/esm/{chunk-4LMAVPA4.mjs → chunk-LDMEIVL6.mjs} +2 -2
- package/dist/esm/chunk-LX7N4NUS.mjs +2 -0
- package/dist/esm/chunk-LX7N4NUS.mjs.map +1 -0
- package/dist/esm/{chunk-DSTKXJMA.mjs → chunk-MGOHPDX4.mjs} +2 -2
- package/dist/esm/{chunk-UPIN5AIO.mjs → chunk-MKUAW7KW.mjs} +2 -2
- package/dist/esm/{chunk-BWFJHFBQ.mjs → chunk-MWUJCP27.mjs} +2 -2
- package/dist/esm/{chunk-LV2V23Z6.mjs → chunk-N4B6S6FK.mjs} +2 -2
- package/dist/esm/chunk-N4B6S6FK.mjs.map +1 -0
- package/dist/esm/{chunk-QTRYMRYK.mjs → chunk-NC5HHEEM.mjs} +2 -2
- package/dist/esm/chunk-NMVZP3Q2.mjs +2 -0
- package/dist/esm/chunk-NMVZP3Q2.mjs.map +1 -0
- package/dist/esm/chunk-NNA5VEB2.mjs +2 -0
- package/dist/esm/chunk-NNA5VEB2.mjs.map +1 -0
- package/dist/esm/chunk-OKRUEVF3.mjs +2 -0
- package/dist/esm/chunk-OKRUEVF3.mjs.map +1 -0
- package/dist/esm/{chunk-U43IJHQN.mjs → chunk-PFFAQZHT.mjs} +2 -2
- package/dist/esm/chunk-PLPCOELE.mjs +2 -0
- package/dist/esm/chunk-PLPCOELE.mjs.map +1 -0
- package/dist/esm/{chunk-BRQYARQ3.mjs → chunk-Q7TGZJT4.mjs} +2 -2
- package/dist/esm/chunk-QHIQLTBS.mjs +2 -0
- package/dist/esm/chunk-QHIQLTBS.mjs.map +1 -0
- package/dist/esm/{chunk-6MG4JAYB.mjs → chunk-QMIEBNTP.mjs} +2 -2
- package/dist/esm/{chunk-3QBZU5ZD.mjs → chunk-QXVGXZJX.mjs} +2 -2
- package/dist/esm/chunk-QXVGXZJX.mjs.map +1 -0
- package/dist/esm/{chunk-GS5J57UA.mjs → chunk-R6PFLI3Z.mjs} +2 -2
- package/dist/esm/chunk-R6PFLI3Z.mjs.map +1 -0
- package/dist/esm/chunk-RFSO3JRG.mjs +1 -0
- package/dist/esm/chunk-RFSO3JRG.mjs.map +1 -0
- package/dist/esm/chunk-RPXN7HGR.mjs +2 -0
- package/dist/esm/chunk-RPXN7HGR.mjs.map +1 -0
- package/dist/esm/chunk-S5HG2QUD.mjs +2 -0
- package/dist/esm/chunk-S5HG2QUD.mjs.map +1 -0
- package/dist/esm/{chunk-BBU2EE6D.mjs → chunk-SNQJV7MF.mjs} +2 -2
- package/dist/esm/chunk-SRLCFTZR.mjs +2 -0
- package/dist/esm/chunk-SRLCFTZR.mjs.map +1 -0
- package/dist/esm/{chunk-R5QUBEH6.mjs → chunk-STYDBDYL.mjs} +2 -2
- package/dist/esm/{chunk-IOSQVDZI.mjs → chunk-T23OVRNF.mjs} +2 -2
- package/dist/esm/{chunk-GXYS45Y5.mjs → chunk-T3W5USZC.mjs} +2 -2
- package/dist/esm/chunk-TBG3MIIE.mjs +2 -0
- package/dist/esm/chunk-TBG3MIIE.mjs.map +1 -0
- package/dist/esm/{chunk-XLPVG4XR.mjs → chunk-TE7AJKSU.mjs} +2 -2
- package/dist/esm/chunk-TJPWYYNO.mjs +2 -0
- package/dist/esm/chunk-TJPWYYNO.mjs.map +1 -0
- package/dist/esm/{chunk-52C73T26.mjs → chunk-TVRJ3M7B.mjs} +2 -2
- package/dist/esm/{chunk-52C73T26.mjs.map → chunk-TVRJ3M7B.mjs.map} +1 -1
- package/dist/esm/{chunk-A556OVZY.mjs → chunk-U72H6EST.mjs} +2 -2
- package/dist/esm/{chunk-BAV4XY7C.mjs → chunk-W637YAND.mjs} +2 -2
- package/dist/esm/chunk-W76IQV5K.mjs +2 -0
- package/dist/esm/chunk-W76IQV5K.mjs.map +1 -0
- package/dist/esm/chunk-WO2KROQ6.mjs +2 -0
- package/dist/esm/{chunk-B252RJCU.mjs.map → chunk-WO2KROQ6.mjs.map} +1 -1
- package/dist/esm/chunk-X56CTMYB.mjs +2 -0
- package/dist/esm/chunk-XEXWFQNP.mjs +2 -0
- package/dist/esm/chunk-YE5B2S5L.mjs +2 -0
- package/dist/esm/chunk-YE5B2S5L.mjs.map +1 -0
- package/dist/esm/chunk-YGHLXEB4.mjs +2 -0
- package/dist/esm/{chunk-IZT6OX3R.mjs.map → chunk-YGHLXEB4.mjs.map} +1 -1
- package/dist/esm/{chunk-OGHE4AQA.mjs → chunk-Z2ZR4PTF.mjs} +2 -2
- package/dist/esm/{chunk-RHBCVCOS.mjs → chunk-ZNEBMSNC.mjs} +2 -2
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.d.mts +2 -1
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.d.mts +2 -2
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.d.mts +3 -1
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/core/account/index.d.mts +5 -14
- 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/ed25519.d.mts +0 -10
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/ephemeral.d.mts +77 -0
- package/dist/esm/core/crypto/ephemeral.mjs +2 -0
- package/dist/esm/core/crypto/ephemeral.mjs.map +1 -0
- package/dist/esm/core/crypto/hdKey.d.mts +15 -1
- package/dist/esm/core/crypto/hdKey.mjs +1 -1
- package/dist/esm/core/crypto/index.d.mts +7 -5
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/keyless.d.mts +217 -0
- package/dist/esm/core/crypto/keyless.mjs +2 -0
- package/dist/esm/core/crypto/keyless.mjs.map +1 -0
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.d.mts +4 -3
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/poseidon.d.mts +7 -0
- package/dist/esm/core/crypto/poseidon.mjs +2 -0
- package/dist/esm/core/crypto/poseidon.mjs.map +1 -0
- package/dist/esm/core/crypto/publicKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/index.d.mts +6 -7
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/index.d.mts +16 -10
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/account.d.mts +14 -2
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.d.mts +1 -1
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.d.mts +7 -7
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.d.mts +2 -2
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/event.d.mts +1 -1
- package/dist/esm/internal/event.mjs +1 -1
- package/dist/esm/internal/faucet.d.mts +1 -1
- package/dist/esm/internal/faucet.mjs +1 -1
- package/dist/esm/internal/fungibleAsset.d.mts +5 -5
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/keyless.d.mts +65 -0
- package/dist/esm/internal/keyless.mjs +2 -0
- package/dist/esm/internal/keyless.mjs.map +1 -0
- package/dist/esm/internal/staking.d.mts +1 -1
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.d.mts +1 -1
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/internal/view.d.mts +7 -7
- package/dist/esm/internal/view.mjs +1 -1
- package/dist/esm/transactions/authenticator/account.d.mts +3 -4
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.mjs +1 -1
- package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
- package/dist/esm/transactions/index.d.mts +3 -3
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/instances/chainId.mjs +1 -1
- package/dist/esm/transactions/instances/identifier.mjs +1 -1
- package/dist/esm/transactions/instances/index.d.mts +1 -0
- package/dist/esm/transactions/instances/index.mjs +1 -1
- package/dist/esm/transactions/instances/moduleId.d.mts +1 -1
- package/dist/esm/transactions/instances/moduleId.mjs +1 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/transactionPayload.d.mts +1 -1
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.d.mts +13 -1
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/index.d.mts +2 -2
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.d.mts +1 -1
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.d.mts +9 -9
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.d.mts +9 -9
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +6 -6
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +47 -0
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +2 -0
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs.map +1 -0
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +13 -25
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
- package/dist/esm/transactions/typeTag/index.mjs +1 -1
- package/dist/esm/transactions/typeTag/parser.mjs +1 -1
- package/dist/esm/transactions/types.d.mts +7 -7
- package/dist/esm/types/index.d.mts +17 -3
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/types/keyless.d.mts +14 -0
- package/dist/esm/types/keyless.mjs +1 -0
- package/dist/esm/types/keyless.mjs.map +1 -0
- package/dist/esm/utils/apiEndpoints.d.mts +3 -1
- package/dist/esm/utils/apiEndpoints.mjs +1 -1
- package/dist/esm/utils/const.d.mts +3 -1
- package/dist/esm/utils/const.mjs +1 -1
- package/dist/esm/utils/index.d.mts +1 -1
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/utils/normalizeBundle.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +7 -2
- package/src/{core/account → account}/Account.ts +12 -16
- package/src/{core/account → account}/Ed25519Account.ts +13 -7
- package/src/account/EphemeralKeyPair.ts +115 -0
- package/src/account/KeylessAccount.ts +240 -0
- package/src/account/MultiKeyAccount.ts +119 -0
- package/src/{core/account → account}/SingleKeyAccount.ts +13 -8
- package/src/account/index.ts +6 -0
- package/src/api/account.ts +2 -1
- package/src/api/ans.ts +2 -1
- package/src/api/aptos.ts +6 -0
- package/src/api/aptosConfig.ts +46 -1
- package/src/api/digitalAsset.ts +2 -1
- package/src/api/fungibleAsset.ts +2 -1
- package/src/api/keyless.ts +34 -0
- package/src/api/transaction.ts +2 -1
- package/src/api/transactionSubmission/management.ts +1 -1
- package/src/api/transactionSubmission/sign.ts +1 -1
- package/src/bcs/serializer.ts +18 -0
- package/src/client/core.ts +8 -0
- package/src/client/get.ts +6 -0
- package/src/client/post.ts +12 -0
- package/src/core/account/index.ts +1 -3
- package/src/core/crypto/ed25519.ts +4 -24
- package/src/core/crypto/ephemeral.ts +149 -0
- package/src/core/crypto/hdKey.ts +31 -0
- package/src/core/crypto/index.ts +2 -0
- package/src/core/crypto/keyless.ts +508 -0
- package/src/core/crypto/multiKey.ts +21 -11
- package/src/core/crypto/poseidon.ts +134 -0
- package/src/core/crypto/singleKey.ts +11 -0
- package/src/core/index.ts +0 -1
- package/src/index.ts +1 -0
- package/src/internal/account.ts +1 -1
- package/src/internal/ans.ts +2 -1
- package/src/internal/digitalAsset.ts +2 -1
- package/src/internal/fungibleAsset.ts +2 -1
- package/src/internal/keyless.ts +185 -0
- package/src/internal/transactionSubmission.ts +8 -7
- package/src/transactions/authenticator/account.ts +6 -11
- package/src/transactions/instances/index.ts +1 -0
- package/src/transactions/management/accountSequenceNumber.ts +1 -1
- package/src/transactions/management/transactionWorker.ts +8 -2
- package/src/transactions/transactionBuilder/index.ts +1 -0
- package/src/transactions/transactionBuilder/signingMessage.ts +70 -0
- package/src/transactions/transactionBuilder/transactionBuilder.ts +41 -70
- package/src/types/index.ts +19 -0
- package/src/types/keyless.ts +6 -0
- package/src/utils/apiEndpoints.ts +14 -0
- package/src/utils/const.ts +2 -0
- package/src/version.ts +1 -1
- package/dist/esm/chunk-3426VLAZ.mjs +0 -2
- package/dist/esm/chunk-3426VLAZ.mjs.map +0 -1
- package/dist/esm/chunk-3OCTOB2E.mjs +0 -2
- package/dist/esm/chunk-3OCTOB2E.mjs.map +0 -1
- package/dist/esm/chunk-3QBZU5ZD.mjs.map +0 -1
- package/dist/esm/chunk-3RUY5FQK.mjs.map +0 -1
- package/dist/esm/chunk-4DNVCOW7.mjs.map +0 -1
- package/dist/esm/chunk-5HALZ6JC.mjs +0 -2
- package/dist/esm/chunk-5HALZ6JC.mjs.map +0 -1
- package/dist/esm/chunk-5OM4V4DR.mjs +0 -2
- package/dist/esm/chunk-5TMLAKSH.mjs +0 -2
- package/dist/esm/chunk-5TMLAKSH.mjs.map +0 -1
- package/dist/esm/chunk-B252RJCU.mjs +0 -2
- package/dist/esm/chunk-CYNQRMO5.mjs +0 -2
- package/dist/esm/chunk-CYNQRMO5.mjs.map +0 -1
- package/dist/esm/chunk-E7FWVXGX.mjs +0 -1
- package/dist/esm/chunk-FO6ZKE7A.mjs +0 -2
- package/dist/esm/chunk-FO6ZKE7A.mjs.map +0 -1
- package/dist/esm/chunk-GMQQSSEO.mjs +0 -2
- package/dist/esm/chunk-GMQQSSEO.mjs.map +0 -1
- package/dist/esm/chunk-GNQXMS53.mjs +0 -2
- package/dist/esm/chunk-GNQXMS53.mjs.map +0 -1
- package/dist/esm/chunk-GS5J57UA.mjs.map +0 -1
- package/dist/esm/chunk-HLVMEUWD.mjs +0 -2
- package/dist/esm/chunk-HLVMEUWD.mjs.map +0 -1
- package/dist/esm/chunk-HQSLBTW5.mjs +0 -2
- package/dist/esm/chunk-HQSLBTW5.mjs.map +0 -1
- package/dist/esm/chunk-ICXA3DZH.mjs +0 -1
- package/dist/esm/chunk-IZT6OX3R.mjs +0 -2
- package/dist/esm/chunk-KHOHRD2B.mjs +0 -2
- package/dist/esm/chunk-KHOHRD2B.mjs.map +0 -1
- package/dist/esm/chunk-L6PGWGFF.mjs +0 -2
- package/dist/esm/chunk-LR65XHSF.mjs +0 -2
- package/dist/esm/chunk-LR65XHSF.mjs.map +0 -1
- package/dist/esm/chunk-LV2V23Z6.mjs.map +0 -1
- package/dist/esm/chunk-MLWIHWNH.mjs +0 -1
- package/dist/esm/chunk-MNBYKY5P.mjs +0 -2
- package/dist/esm/chunk-OVJQWQ2N.mjs +0 -2
- package/dist/esm/chunk-OVJQWQ2N.mjs.map +0 -1
- package/dist/esm/chunk-OWW6SIDP.mjs +0 -2
- package/dist/esm/chunk-OWW6SIDP.mjs.map +0 -1
- package/dist/esm/chunk-PIOHC246.mjs.map +0 -1
- package/dist/esm/chunk-R7G3CLRI.mjs +0 -1
- package/dist/esm/chunk-TGG7SWBO.mjs.map +0 -1
- package/dist/esm/chunk-TORRTLWV.mjs.map +0 -1
- package/dist/esm/chunk-TQR7M73S.mjs +0 -2
- package/dist/esm/chunk-TQR7M73S.mjs.map +0 -1
- package/dist/esm/chunk-UMFJDDYI.mjs.map +0 -1
- package/dist/esm/chunk-UVSRX4SV.mjs +0 -1
- package/dist/esm/chunk-VNO4VHJN.mjs +0 -2
- package/dist/esm/chunk-VNO4VHJN.mjs.map +0 -1
- package/dist/esm/chunk-WBOLHLPX.mjs +0 -2
- package/dist/esm/chunk-WBOLHLPX.mjs.map +0 -1
- package/dist/esm/chunk-XDGQTMDV.mjs +0 -2
- package/dist/esm/chunk-XDGQTMDV.mjs.map +0 -1
- package/dist/esm/chunk-YVSU6GOA.mjs +0 -2
- package/dist/esm/chunk-YVSU6GOA.mjs.map +0 -1
- package/dist/esm/core/account/Account.d.mts +0 -20
- package/dist/esm/core/account/Account.mjs +0 -2
- package/dist/esm/core/account/Ed25519Account.d.mts +0 -20
- package/dist/esm/core/account/Ed25519Account.mjs +0 -2
- package/dist/esm/core/account/SingleKeyAccount.d.mts +0 -20
- package/dist/esm/core/account/SingleKeyAccount.mjs +0 -2
- /package/dist/esm/{core/account → account}/Account.mjs.map +0 -0
- /package/dist/esm/{core/account → account}/Ed25519Account.mjs.map +0 -0
- /package/dist/esm/{chunk-E7FWVXGX.mjs.map → account/EphemeralKeyPair.mjs.map} +0 -0
- /package/dist/esm/{chunk-ICXA3DZH.mjs.map → account/KeylessAccount.mjs.map} +0 -0
- /package/dist/esm/{chunk-MLWIHWNH.mjs.map → account/MultiKeyAccount.mjs.map} +0 -0
- /package/dist/esm/{core/account → account}/SingleKeyAccount.mjs.map +0 -0
- /package/dist/esm/{chunk-R7G3CLRI.mjs.map → account/index.mjs.map} +0 -0
- /package/dist/esm/{chunk-UVSRX4SV.mjs.map → api/keyless.mjs.map} +0 -0
- /package/dist/esm/{chunk-KDCHX7BI.mjs.map → chunk-274CXZ6R.mjs.map} +0 -0
- /package/dist/esm/{chunk-TBMAJ6AW.mjs.map → chunk-3FVRXELT.mjs.map} +0 -0
- /package/dist/esm/{chunk-RQEWIZ67.mjs.map → chunk-3LQPAGL6.mjs.map} +0 -0
- /package/dist/esm/{chunk-6IGEUEER.mjs.map → chunk-3PGVEOWR.mjs.map} +0 -0
- /package/dist/esm/{chunk-DMKUAQB7.mjs.map → chunk-3VGX3TXH.mjs.map} +0 -0
- /package/dist/esm/{chunk-YKVKSNH4.mjs.map → chunk-6NZNCDDW.mjs.map} +0 -0
- /package/dist/esm/{chunk-QIAHBEEW.mjs.map → chunk-6RBUXB5I.mjs.map} +0 -0
- /package/dist/esm/{chunk-3HV2C4SS.mjs.map → chunk-7FNHL6LU.mjs.map} +0 -0
- /package/dist/esm/{chunk-FXNFWLQC.mjs.map → chunk-7H3HRFVM.mjs.map} +0 -0
- /package/dist/esm/{chunk-NPFNYP75.mjs.map → chunk-7STYQ5ZE.mjs.map} +0 -0
- /package/dist/esm/{chunk-QWRH22H4.mjs.map → chunk-APEBWN6Q.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZYYK3UXP.mjs.map → chunk-C3L4ETUF.mjs.map} +0 -0
- /package/dist/esm/{chunk-WFZDFFBM.mjs.map → chunk-COW5IGYC.mjs.map} +0 -0
- /package/dist/esm/{chunk-TC3VVMPY.mjs.map → chunk-E36GTDEB.mjs.map} +0 -0
- /package/dist/esm/{chunk-FS3NSGBF.mjs.map → chunk-EB7AI4B4.mjs.map} +0 -0
- /package/dist/esm/{chunk-GRT5PHL6.mjs.map → chunk-H3LMPXEM.mjs.map} +0 -0
- /package/dist/esm/{chunk-YBEF3UR3.mjs.map → chunk-H6BRBIMG.mjs.map} +0 -0
- /package/dist/esm/{chunk-2PFN7LYP.mjs.map → chunk-HFLWASAB.mjs.map} +0 -0
- /package/dist/esm/{chunk-UML2VQZT.mjs.map → chunk-HGZGTBA4.mjs.map} +0 -0
- /package/dist/esm/{chunk-TGXZVNR5.mjs.map → chunk-IEZO4PIG.mjs.map} +0 -0
- /package/dist/esm/{chunk-PJLCPRYJ.mjs.map → chunk-J2IIPYZG.mjs.map} +0 -0
- /package/dist/esm/{chunk-EJCKCYYI.mjs.map → chunk-KNHI66FK.mjs.map} +0 -0
- /package/dist/esm/{chunk-4LMAVPA4.mjs.map → chunk-LDMEIVL6.mjs.map} +0 -0
- /package/dist/esm/{chunk-DSTKXJMA.mjs.map → chunk-MGOHPDX4.mjs.map} +0 -0
- /package/dist/esm/{chunk-UPIN5AIO.mjs.map → chunk-MKUAW7KW.mjs.map} +0 -0
- /package/dist/esm/{chunk-BWFJHFBQ.mjs.map → chunk-MWUJCP27.mjs.map} +0 -0
- /package/dist/esm/{chunk-QTRYMRYK.mjs.map → chunk-NC5HHEEM.mjs.map} +0 -0
- /package/dist/esm/{chunk-U43IJHQN.mjs.map → chunk-PFFAQZHT.mjs.map} +0 -0
- /package/dist/esm/{chunk-BRQYARQ3.mjs.map → chunk-Q7TGZJT4.mjs.map} +0 -0
- /package/dist/esm/{chunk-6MG4JAYB.mjs.map → chunk-QMIEBNTP.mjs.map} +0 -0
- /package/dist/esm/{chunk-BBU2EE6D.mjs.map → chunk-SNQJV7MF.mjs.map} +0 -0
- /package/dist/esm/{chunk-R5QUBEH6.mjs.map → chunk-STYDBDYL.mjs.map} +0 -0
- /package/dist/esm/{chunk-IOSQVDZI.mjs.map → chunk-T23OVRNF.mjs.map} +0 -0
- /package/dist/esm/{chunk-GXYS45Y5.mjs.map → chunk-T3W5USZC.mjs.map} +0 -0
- /package/dist/esm/{chunk-XLPVG4XR.mjs.map → chunk-TE7AJKSU.mjs.map} +0 -0
- /package/dist/esm/{chunk-A556OVZY.mjs.map → chunk-U72H6EST.mjs.map} +0 -0
- /package/dist/esm/{chunk-BAV4XY7C.mjs.map → chunk-W637YAND.mjs.map} +0 -0
- /package/dist/esm/{chunk-5OM4V4DR.mjs.map → chunk-X56CTMYB.mjs.map} +0 -0
- /package/dist/esm/{chunk-L6PGWGFF.mjs.map → chunk-XEXWFQNP.mjs.map} +0 -0
- /package/dist/esm/{chunk-OGHE4AQA.mjs.map → chunk-Z2ZR4PTF.mjs.map} +0 -0
- /package/dist/esm/{chunk-RHBCVCOS.mjs.map → chunk-ZNEBMSNC.mjs.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-T3W5USZC.mjs";import"../../chunk-RPXN7HGR.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-QHIQLTBS.mjs";import"../../chunk-J2IIPYZG.mjs";import"../../chunk-PFFAQZHT.mjs";import"../../chunk-7H3HRFVM.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-QXVGXZJX.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-6NZNCDDW.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-APEBWN6Q.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-NMVZP3Q2.mjs";import"../../chunk-7XHVF3ZX.mjs";import"../../chunk-WO2KROQ6.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-ROXFCLDT.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-5VSMDXZ6.mjs";import"../../chunk-YGHLXEB4.mjs";import"../../chunk-DKLA4F3P.mjs";import"../../chunk-LX7N4NUS.mjs";import"../../chunk-HQWIGPYQ.mjs";import"../../chunk-2M7KHFEG.mjs";import"../../chunk-W76IQV5K.mjs";import"../../chunk-TJPWYYNO.mjs";import"../../chunk-2YDIOWRJ.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-W637YAND.mjs";import"../../chunk-NC5HHEEM.mjs";import"../../chunk-X56CTMYB.mjs";import"../../chunk-E36GTDEB.mjs";import"../../chunk-E4Z5IEZP.mjs";import"../../chunk-MKUAW7KW.mjs";import"../../chunk-Z2ZR4PTF.mjs";import"../../chunk-IEZO4PIG.mjs";import"../../chunk-3VGX3TXH.mjs";import"../../chunk-ZNEBMSNC.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-MWUJCP27.mjs";import"../../chunk-MGOHPDX4.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-YE5B2S5L.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-TE7AJKSU.mjs";import"../../chunk-F6QCHPVS.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-HURQZGUZ.mjs";import"../../chunk-7FNHL6LU.mjs";import"../../chunk-6NMHAFIO.mjs";import"../../chunk-FLYEALDB.mjs";import"../../chunk-7MPJPZ73.mjs";import"../../chunk-CQJ4WN7M.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-COW5IGYC.mjs";import"../../chunk-STYDBDYL.mjs";import"../../chunk-S5HG2QUD.mjs";import"../../chunk-7STYQ5ZE.mjs";import"../../chunk-T23OVRNF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-C3L4ETUF.mjs";import"../../chunk-3FVRXELT.mjs";import"../../chunk-EB7AI4B4.mjs";import"../../chunk-6RBUXB5I.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-OKRUEVF3.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-TVRJ3M7B.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Build};
|
|
2
2
|
//# sourceMappingURL=build.mjs.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import EventEmitter from 'eventemitter3';
|
|
2
2
|
import { AptosConfig } from '../aptosConfig.mjs';
|
|
3
|
-
import { A as Account } from '../../Ed25519Account
|
|
4
|
-
import { TransactionWorkerEvents, TransactionWorker } from '../../transactions/management/transactionWorker.mjs';
|
|
3
|
+
import { A as Account } from '../../Ed25519Account-8gJF5t3F.mjs';
|
|
5
4
|
import { InputGenerateTransactionPayloadData, InputGenerateTransactionOptions } from '../../transactions/types.mjs';
|
|
5
|
+
import { TransactionWorkerEvents, TransactionWorker } from '../../transactions/management/transactionWorker.mjs';
|
|
6
6
|
import '../../types/index.mjs';
|
|
7
7
|
import '../../utils/apiEndpoints.mjs';
|
|
8
8
|
import '../../types/indexer.mjs';
|
|
@@ -23,19 +23,19 @@ import '../../core/crypto/privateKey.mjs';
|
|
|
23
23
|
import '../../core/crypto/multiEd25519.mjs';
|
|
24
24
|
import '../../core/crypto/multiKey.mjs';
|
|
25
25
|
import '../../core/crypto/singleKey.mjs';
|
|
26
|
-
import '../../
|
|
27
|
-
import '../../
|
|
28
|
-
import '../../
|
|
26
|
+
import '../../bcs/serializable/moveStructs.mjs';
|
|
27
|
+
import '../../bcs/serializable/movePrimitives.mjs';
|
|
28
|
+
import '../../bcs/serializable/fixedBytes.mjs';
|
|
29
29
|
import '../../transactions/instances/rawTransaction.mjs';
|
|
30
30
|
import '../../transactions/instances/chainId.mjs';
|
|
31
31
|
import '../../transactions/instances/transactionPayload.mjs';
|
|
32
32
|
import '../../transactions/instances/identifier.mjs';
|
|
33
33
|
import '../../transactions/instances/moduleId.mjs';
|
|
34
34
|
import '../../transactions/typeTag/index.mjs';
|
|
35
|
-
import '../../
|
|
36
|
-
import '../../bcs/serializable/movePrimitives.mjs';
|
|
37
|
-
import '../../bcs/serializable/fixedBytes.mjs';
|
|
35
|
+
import '../../transactions/instances/simpleTransaction.mjs';
|
|
38
36
|
import '../../transactions/instances/multiAgentTransaction.mjs';
|
|
37
|
+
import '../../transactions/management/accountSequenceNumber.mjs';
|
|
38
|
+
import '../../transactions/management/asyncQueue.mjs';
|
|
39
39
|
|
|
40
40
|
declare class TransactionManagement extends EventEmitter<TransactionWorkerEvents> {
|
|
41
41
|
account: Account;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-AKGASNN4.mjs";import"../../chunk-IHYTP2EW.mjs";import"../../chunk-N4B6S6FK.mjs";import"../../chunk-2SD6JLIU.mjs";import"../../chunk-U6Z4FNB7.mjs";import"../../chunk-RPXN7HGR.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-QHIQLTBS.mjs";import"../../chunk-J2IIPYZG.mjs";import"../../chunk-PFFAQZHT.mjs";import"../../chunk-7H3HRFVM.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-QXVGXZJX.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-6NZNCDDW.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-APEBWN6Q.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-NMVZP3Q2.mjs";import"../../chunk-7XHVF3ZX.mjs";import"../../chunk-WO2KROQ6.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-ROXFCLDT.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-5VSMDXZ6.mjs";import"../../chunk-YGHLXEB4.mjs";import"../../chunk-DKLA4F3P.mjs";import"../../chunk-LX7N4NUS.mjs";import"../../chunk-HQWIGPYQ.mjs";import"../../chunk-2M7KHFEG.mjs";import"../../chunk-W76IQV5K.mjs";import"../../chunk-TJPWYYNO.mjs";import"../../chunk-2YDIOWRJ.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-W637YAND.mjs";import"../../chunk-NC5HHEEM.mjs";import"../../chunk-X56CTMYB.mjs";import"../../chunk-E36GTDEB.mjs";import"../../chunk-E4Z5IEZP.mjs";import"../../chunk-MKUAW7KW.mjs";import"../../chunk-Z2ZR4PTF.mjs";import"../../chunk-IEZO4PIG.mjs";import"../../chunk-3VGX3TXH.mjs";import"../../chunk-ZNEBMSNC.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-MWUJCP27.mjs";import"../../chunk-MGOHPDX4.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-YE5B2S5L.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-TE7AJKSU.mjs";import"../../chunk-F6QCHPVS.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-HURQZGUZ.mjs";import"../../chunk-7FNHL6LU.mjs";import"../../chunk-6NMHAFIO.mjs";import"../../chunk-FLYEALDB.mjs";import"../../chunk-7MPJPZ73.mjs";import"../../chunk-CQJ4WN7M.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-COW5IGYC.mjs";import"../../chunk-STYDBDYL.mjs";import"../../chunk-S5HG2QUD.mjs";import"../../chunk-7STYQ5ZE.mjs";import"../../chunk-T23OVRNF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-C3L4ETUF.mjs";import"../../chunk-3FVRXELT.mjs";import"../../chunk-EB7AI4B4.mjs";import"../../chunk-6RBUXB5I.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-OKRUEVF3.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-TVRJ3M7B.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as TransactionManagement};
|
|
2
2
|
//# sourceMappingURL=management.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AccountAuthenticator } from '../../transactions/authenticator/account.mjs';
|
|
2
|
-
import { A as Account } from '../../Ed25519Account
|
|
2
|
+
import { A as Account } from '../../Ed25519Account-8gJF5t3F.mjs';
|
|
3
3
|
import { AnyRawTransaction } from '../../transactions/types.mjs';
|
|
4
4
|
import { AptosConfig } from '../aptosConfig.mjs';
|
|
5
5
|
import '../../bcs/deserializer.mjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e as o}from"../../chunk-
|
|
1
|
+
import{e as o}from"../../chunk-RPXN7HGR.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-QHIQLTBS.mjs";import"../../chunk-J2IIPYZG.mjs";import"../../chunk-PFFAQZHT.mjs";import"../../chunk-7H3HRFVM.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-QXVGXZJX.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-6NZNCDDW.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-APEBWN6Q.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-NMVZP3Q2.mjs";import"../../chunk-7XHVF3ZX.mjs";import"../../chunk-WO2KROQ6.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-ROXFCLDT.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-5VSMDXZ6.mjs";import"../../chunk-YGHLXEB4.mjs";import"../../chunk-DKLA4F3P.mjs";import"../../chunk-LX7N4NUS.mjs";import"../../chunk-HQWIGPYQ.mjs";import"../../chunk-2M7KHFEG.mjs";import"../../chunk-W76IQV5K.mjs";import"../../chunk-TJPWYYNO.mjs";import"../../chunk-2YDIOWRJ.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-W637YAND.mjs";import"../../chunk-NC5HHEEM.mjs";import"../../chunk-X56CTMYB.mjs";import"../../chunk-E36GTDEB.mjs";import"../../chunk-E4Z5IEZP.mjs";import"../../chunk-MKUAW7KW.mjs";import"../../chunk-Z2ZR4PTF.mjs";import"../../chunk-IEZO4PIG.mjs";import"../../chunk-3VGX3TXH.mjs";import"../../chunk-ZNEBMSNC.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-MWUJCP27.mjs";import"../../chunk-MGOHPDX4.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-YE5B2S5L.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-TE7AJKSU.mjs";import"../../chunk-F6QCHPVS.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-HURQZGUZ.mjs";import"../../chunk-7FNHL6LU.mjs";import"../../chunk-6NMHAFIO.mjs";import"../../chunk-FLYEALDB.mjs";import"../../chunk-7MPJPZ73.mjs";import"../../chunk-CQJ4WN7M.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-COW5IGYC.mjs";import"../../chunk-STYDBDYL.mjs";import"../../chunk-S5HG2QUD.mjs";import"../../chunk-7STYQ5ZE.mjs";import"../../chunk-T23OVRNF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-C3L4ETUF.mjs";import"../../chunk-3FVRXELT.mjs";import"../../chunk-EB7AI4B4.mjs";import"../../chunk-6RBUXB5I.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-OKRUEVF3.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-TVRJ3M7B.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";var a=class{constructor(n){this.config=n}transaction(n){return o({...n})}transactionAsFeePayer(n){let{signer:r,transaction:t}=n;if(!t.feePayerAddress)throw new Error(`Transaction ${t} is not a Fee Payer transaction`);return t.feePayerAddress=r.accountAddress,o({signer:r,transaction:t})}};export{a as Sign};
|
|
2
2
|
//# sourceMappingURL=sign.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/api/transactionSubmission/sign.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Account } from \"../../
|
|
1
|
+
{"version":3,"sources":["../../../../src/api/transactionSubmission/sign.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Account } from \"../../account\";\nimport { signTransaction } from \"../../internal/transactionSubmission\";\nimport { AccountAuthenticator, AnyRawTransaction } from \"../../transactions\";\nimport { AptosConfig } from \"../aptosConfig\";\n\n/**\n * A class to handle all `Sign` transaction operations\n */\nexport class Sign {\n readonly config: AptosConfig;\n\n constructor(config: AptosConfig) {\n this.config = config;\n }\n\n // eslint-disable-next-line class-methods-use-this\n transaction(args: { signer: Account; transaction: AnyRawTransaction }): AccountAuthenticator {\n return signTransaction({\n ...args,\n });\n }\n\n // eslint-disable-next-line class-methods-use-this\n transactionAsFeePayer(args: { signer: Account; transaction: AnyRawTransaction }): AccountAuthenticator {\n const { signer, transaction } = args;\n\n // if transaction doesnt hold a \"feePayerAddress\" prop it means\n // this is not a fee payer transaction\n if (!transaction.feePayerAddress) {\n throw new Error(`Transaction ${transaction} is not a Fee Payer transaction`);\n }\n\n // Set the feePayerAddress to the signer account address\n transaction.feePayerAddress = signer.accountAddress;\n\n return signTransaction({\n signer,\n transaction,\n });\n }\n}\n"],"mappings":"y/EAWO,IAAMA,EAAN,KAAW,CAGhB,YAAYC,EAAqB,CAC/B,KAAK,OAASA,CAChB,CAGA,YAAYC,EAAiF,CAC3F,OAAOC,EAAgB,CACrB,GAAGD,CACL,CAAC,CACH,CAGA,sBAAsBA,EAAiF,CACrG,GAAM,CAAE,OAAAE,EAAQ,YAAAC,CAAY,EAAIH,EAIhC,GAAI,CAACG,EAAY,gBACf,MAAM,IAAI,MAAM,eAAeA,CAAW,iCAAiC,EAI7E,OAAAA,EAAY,gBAAkBD,EAAO,eAE9BD,EAAgB,CACrB,OAAAC,EACA,YAAAC,CACF,CAAC,CACH,CACF","names":["Sign","config","args","signTransaction","signer","transaction"]}
|
|
@@ -16,18 +16,18 @@ import '../../core/crypto/signature.mjs';
|
|
|
16
16
|
import '../../bcs/serializable/moveStructs.mjs';
|
|
17
17
|
import '../../bcs/serializable/movePrimitives.mjs';
|
|
18
18
|
import '../../bcs/serializable/fixedBytes.mjs';
|
|
19
|
-
import '../../transactions/authenticator/account.mjs';
|
|
20
|
-
import '../../core/crypto/ed25519.mjs';
|
|
21
|
-
import '../../core/crypto/privateKey.mjs';
|
|
22
|
-
import '../../core/crypto/multiEd25519.mjs';
|
|
23
|
-
import '../../core/crypto/multiKey.mjs';
|
|
24
|
-
import '../../core/crypto/singleKey.mjs';
|
|
25
19
|
import '../../transactions/instances/rawTransaction.mjs';
|
|
26
20
|
import '../../transactions/instances/chainId.mjs';
|
|
27
21
|
import '../../transactions/instances/transactionPayload.mjs';
|
|
28
22
|
import '../../transactions/instances/identifier.mjs';
|
|
29
23
|
import '../../transactions/instances/moduleId.mjs';
|
|
30
24
|
import '../../transactions/typeTag/index.mjs';
|
|
25
|
+
import '../../transactions/authenticator/account.mjs';
|
|
26
|
+
import '../../core/crypto/ed25519.mjs';
|
|
27
|
+
import '../../core/crypto/privateKey.mjs';
|
|
28
|
+
import '../../core/crypto/multiEd25519.mjs';
|
|
29
|
+
import '../../core/crypto/multiKey.mjs';
|
|
30
|
+
import '../../core/crypto/singleKey.mjs';
|
|
31
31
|
import '../../transactions/instances/simpleTransaction.mjs';
|
|
32
32
|
import '../../transactions/instances/multiAgentTransaction.mjs';
|
|
33
33
|
import '../../utils/const.mjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-274CXZ6R.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-RPXN7HGR.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-QHIQLTBS.mjs";import"../../chunk-J2IIPYZG.mjs";import"../../chunk-PFFAQZHT.mjs";import"../../chunk-7H3HRFVM.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-QXVGXZJX.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-6NZNCDDW.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-APEBWN6Q.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-NMVZP3Q2.mjs";import"../../chunk-7XHVF3ZX.mjs";import"../../chunk-WO2KROQ6.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-ROXFCLDT.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-5VSMDXZ6.mjs";import"../../chunk-YGHLXEB4.mjs";import"../../chunk-DKLA4F3P.mjs";import"../../chunk-LX7N4NUS.mjs";import"../../chunk-HQWIGPYQ.mjs";import"../../chunk-2M7KHFEG.mjs";import"../../chunk-W76IQV5K.mjs";import"../../chunk-TJPWYYNO.mjs";import"../../chunk-2YDIOWRJ.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-W637YAND.mjs";import"../../chunk-NC5HHEEM.mjs";import"../../chunk-X56CTMYB.mjs";import"../../chunk-E36GTDEB.mjs";import"../../chunk-E4Z5IEZP.mjs";import"../../chunk-MKUAW7KW.mjs";import"../../chunk-Z2ZR4PTF.mjs";import"../../chunk-IEZO4PIG.mjs";import"../../chunk-3VGX3TXH.mjs";import"../../chunk-ZNEBMSNC.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-MWUJCP27.mjs";import"../../chunk-MGOHPDX4.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-YE5B2S5L.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-TE7AJKSU.mjs";import"../../chunk-F6QCHPVS.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-HURQZGUZ.mjs";import"../../chunk-7FNHL6LU.mjs";import"../../chunk-6NMHAFIO.mjs";import"../../chunk-FLYEALDB.mjs";import"../../chunk-7MPJPZ73.mjs";import"../../chunk-CQJ4WN7M.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-COW5IGYC.mjs";import"../../chunk-STYDBDYL.mjs";import"../../chunk-S5HG2QUD.mjs";import"../../chunk-7STYQ5ZE.mjs";import"../../chunk-T23OVRNF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-C3L4ETUF.mjs";import"../../chunk-3FVRXELT.mjs";import"../../chunk-EB7AI4B4.mjs";import"../../chunk-6RBUXB5I.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-OKRUEVF3.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-TVRJ3M7B.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Simulate};
|
|
2
2
|
//# sourceMappingURL=simulate.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-H6BRBIMG.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-RPXN7HGR.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-QHIQLTBS.mjs";import"../../chunk-J2IIPYZG.mjs";import"../../chunk-PFFAQZHT.mjs";import"../../chunk-7H3HRFVM.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-QXVGXZJX.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-6NZNCDDW.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-APEBWN6Q.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-NMVZP3Q2.mjs";import"../../chunk-7XHVF3ZX.mjs";import"../../chunk-WO2KROQ6.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-ROXFCLDT.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-5VSMDXZ6.mjs";import"../../chunk-YGHLXEB4.mjs";import"../../chunk-DKLA4F3P.mjs";import"../../chunk-LX7N4NUS.mjs";import"../../chunk-HQWIGPYQ.mjs";import"../../chunk-2M7KHFEG.mjs";import"../../chunk-W76IQV5K.mjs";import"../../chunk-TJPWYYNO.mjs";import"../../chunk-2YDIOWRJ.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-W637YAND.mjs";import"../../chunk-NC5HHEEM.mjs";import"../../chunk-X56CTMYB.mjs";import"../../chunk-E36GTDEB.mjs";import"../../chunk-E4Z5IEZP.mjs";import"../../chunk-MKUAW7KW.mjs";import"../../chunk-Z2ZR4PTF.mjs";import"../../chunk-IEZO4PIG.mjs";import"../../chunk-3VGX3TXH.mjs";import"../../chunk-ZNEBMSNC.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-MWUJCP27.mjs";import"../../chunk-MGOHPDX4.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-YE5B2S5L.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-TE7AJKSU.mjs";import"../../chunk-F6QCHPVS.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-HURQZGUZ.mjs";import"../../chunk-7FNHL6LU.mjs";import"../../chunk-6NMHAFIO.mjs";import"../../chunk-FLYEALDB.mjs";import"../../chunk-7MPJPZ73.mjs";import"../../chunk-CQJ4WN7M.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-COW5IGYC.mjs";import"../../chunk-STYDBDYL.mjs";import"../../chunk-S5HG2QUD.mjs";import"../../chunk-7STYQ5ZE.mjs";import"../../chunk-T23OVRNF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-C3L4ETUF.mjs";import"../../chunk-3FVRXELT.mjs";import"../../chunk-EB7AI4B4.mjs";import"../../chunk-6RBUXB5I.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-OKRUEVF3.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-TVRJ3M7B.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Submit};
|
|
2
2
|
//# sourceMappingURL=submit.mjs.map
|
package/dist/esm/api/utils.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-HFLWASAB.mjs";import"../chunk-6NZNCDDW.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-APEBWN6Q.mjs";import"../chunk-S4SEFF4K.mjs";import"../chunk-3JPVQHOR.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-NMVZP3Q2.mjs";import"../chunk-7XHVF3ZX.mjs";import"../chunk-WO2KROQ6.mjs";import"../chunk-GED6IT3S.mjs";import"../chunk-ROXFCLDT.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-5VSMDXZ6.mjs";import"../chunk-YGHLXEB4.mjs";import"../chunk-YE5B2S5L.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-C3L4ETUF.mjs";import"../chunk-3FVRXELT.mjs";import"../chunk-EB7AI4B4.mjs";import"../chunk-6RBUXB5I.mjs";import"../chunk-6IFMQ5AS.mjs";import"../chunk-OKRUEVF3.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-TVRJ3M7B.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{a as waitForIndexerOnVersion};
|
|
2
2
|
//# sourceMappingURL=utils.mjs.map
|
package/dist/esm/bcs/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunk-FZY4PMEE.mjs";import{a as p,b as q,c as r}from"../chunk-
|
|
1
|
+
import"../chunk-FZY4PMEE.mjs";import{a as h}from"../chunk-C3L4ETUF.mjs";import{a as g}from"../chunk-3FVRXELT.mjs";import{a as p,b as q,c as r}from"../chunk-EB7AI4B4.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n,g as o}from"../chunk-6RBUXB5I.mjs";import{a}from"../chunk-6IFMQ5AS.mjs";import"../chunk-OKRUEVF3.mjs";import"../chunk-4WPQQPUF.mjs";import{a as b,b as c,c as d,d as e,e as f}from"../chunk-TVRJ3M7B.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{i as Bool,a as Deserializer,h as EntryFunctionBytes,g as FixedBytes,r as MoveOption,q as MoveString,p as MoveVector,b as Serializable,c as Serializer,n as U128,k as U16,o as U256,l as U32,m as U64,j as U8,d as ensureBoolean,e as outOfRangeErrorMessage,f as validateNumberInRange};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-C3L4ETUF.mjs";import"../../chunk-3FVRXELT.mjs";import"../../chunk-TVRJ3M7B.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as EntryFunctionBytes};
|
|
2
2
|
//# sourceMappingURL=entryFunctionBytes.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-3FVRXELT.mjs";import"../../chunk-TVRJ3M7B.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as FixedBytes};
|
|
2
2
|
//# sourceMappingURL=fixedBytes.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g}from"../../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g}from"../../chunk-6RBUXB5I.mjs";import"../../chunk-OKRUEVF3.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-TVRJ3M7B.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Bool,f as U128,c as U16,g as U256,d as U32,e as U64,b as U8};
|
|
2
2
|
//# sourceMappingURL=movePrimitives.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c}from"../../chunk-
|
|
1
|
+
import{a,b,c}from"../../chunk-EB7AI4B4.mjs";import"../../chunk-6RBUXB5I.mjs";import"../../chunk-OKRUEVF3.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-TVRJ3M7B.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{c as MoveOption,b as MoveString,a as MoveVector};
|
|
2
2
|
//# sourceMappingURL=moveStructs.mjs.map
|
|
@@ -184,6 +184,8 @@ declare class Serializer {
|
|
|
184
184
|
* // `bcs::to_bytes(&vector<address> [@0x1, @0x2, @0xa, @0xb])`;
|
|
185
185
|
*/
|
|
186
186
|
serializeVector<T extends Serializable>(values: Array<T>): void;
|
|
187
|
+
serializeOption<T extends Serializable>(value?: T): void;
|
|
188
|
+
serializeOptionStr(value?: string): void;
|
|
187
189
|
}
|
|
188
190
|
declare function ensureBoolean(value: unknown): asserts value is boolean;
|
|
189
191
|
declare const outOfRangeErrorMessage: (value: AnyNumber, min: AnyNumber, max: AnyNumber) => string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e}from"../chunk-TVRJ3M7B.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{a as Serializable,b as Serializer,c as ensureBoolean,d as outOfRangeErrorMessage,e as validateNumberInRange};
|
|
2
2
|
//# sourceMappingURL=serializer.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as s}from"./chunk-6EMN3BOV.mjs";import{f as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as s}from"./chunk-6EMN3BOV.mjs";import{f as r}from"./chunk-RPXN7HGR.mjs";import{a as o}from"./chunk-FVA2OPG4.mjs";var i=class{constructor(n){this.config=n}async simple(n){return r({aptosConfig:this.config,...n})}async multiAgent(n){return r({aptosConfig:this.config,...n})}};o([s],i.prototype,"simple",1),o([s],i.prototype,"multiAgent",1);export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-274CXZ6R.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as j}from"./chunk-W76IQV5K.mjs";import{a as g,b as I}from"./chunk-2YDIOWRJ.mjs";import{d as x}from"./chunk-E4Z5IEZP.mjs";import{a as E,b as T}from"./chunk-HURQZGUZ.mjs";import{i as w,j as K,k as h,m as A,n as b,o as l}from"./chunk-6NMHAFIO.mjs";import{k as S}from"./chunk-S5HG2QUD.mjs";import{b as P}from"./chunk-T23OVRNF.mjs";import{a as f}from"./chunk-6IFMQ5AS.mjs";import{b as y}from"./chunk-TVRJ3M7B.mjs";import{b as c}from"./chunk-AOCNYMMX.mjs";import{jwtDecode as D}from"jwt-decode";import{decode as U}from"base-64";function v(z){let e=z.replace(/-/g,"+").replace(/_/g,"/"),r=e+"==".substring(0,(3-e.length%3)%3);return U(r)}var o=class o{constructor(e){let{address:r,ephemeralKeyPair:t,iss:n,uidKey:a,uidVal:i,aud:s,pepper:p,proof:u,jwt:d}=e;this.ephemeralKeyPair=t;let B=K(e);this.publicKey=new w(n,B),this.accountAddress=r?P.from(r):this.publicKey.authKey().derivedAddress(),this.uidKey=a,this.uidVal=i,this.aud=s,this.jwt=d,this.proof=u,this.signingScheme=2;let m=c.fromHexInput(p).toUint8Array();if(m.length!==o.PEPPER_LENGTH)throw new Error(`Pepper length in bytes should be ${o.PEPPER_LENGTH}`);this.pepper=m}serialize(e){e.serializeStr(this.jwt),e.serializeStr(this.uidKey),e.serializeFixedBytes(this.pepper),this.ephemeralKeyPair.serialize(e),this.proof.serialize(e)}static deserialize(e){let r=e.deserializeStr(),t=e.deserializeStr(),n=e.deserializeFixedBytes(31),a=j.deserialize(e),i=A.deserialize(e);return o.fromJWTAndProof({proof:i,pepper:n,uidKey:t,jwt:r,ephemeralKeyPair:a})}bcsToBytes(){let e=new y;return this.serialize(e),e.toUint8Array()}bcsToHex(){let e=this.bcsToBytes();return c.fromHexInput(e)}signWithAuthenticator(e){let r=g(e),t=new T(this.sign(r.bcsToBytes())),n=new E(this.publicKey);return new x(n,t)}async waitForProofFetch(){this.proof instanceof Promise&&await this.proof}sign(e){let{expiryDateSecs:r}=this.ephemeralKeyPair,t=Math.floor(new Date().getTime()/1e3);if(r<t)throw new Error("Ephemeral key pair is expired.");if(this.proof instanceof Promise)throw new Error("Failed to fetch proof.");let n=this.jwt.split(".")[0],a=this.ephemeralKeyPair.getPublicKey(),i=new y;i.serializeFixedBytes(c.fromHexInput(e).toUint8Array()),i.serializeOption(this.proof.proof);let s=I(i.toUint8Array(),"APTOS::TransactionAndProof"),p=this.ephemeralKeyPair.sign(s);return new l({jwtHeader:v(n),openIdSignatureOrZkProof:new h(this.proof),expiryDateSecs:r,ephemeralPublicKey:a,ephemeralSignature:p})}signTransaction(e){let r=g(e);return this.sign(r.bcsToBytes())}signWithOpenIdSignature(e){let[r,t,n]=this.jwt.split("."),a=new b({jwtSignature:n,jwtPayloadJson:t,uidKey:this.uidKey,epkBlinder:this.ephemeralKeyPair.blinder,pepper:this.pepper}),{expiryDateSecs:i}=this.ephemeralKeyPair,s=this.ephemeralKeyPair.getPublicKey(),p=this.ephemeralKeyPair.sign(e);return new l({jwtHeader:r,openIdSignatureOrZkProof:new h(a),expiryDateSecs:i,ephemeralPublicKey:s,ephemeralSignature:p})}verifySignature(e){return!0}static fromBytes(e){return o.deserialize(new f(e))}static fromJWTAndProof(e){let{proof:r,jwt:t,ephemeralKeyPair:n,pepper:a}=e,i=e.uidKey??"sub",s=D(t),p=s.iss;if(typeof s.aud!="string")throw new Error("aud was not found or an array of values");let u=s.aud,d=s[i];return new o({proof:r,ephemeralKeyPair:n,iss:p,uidKey:i,uidVal:d,aud:u,pepper:a,jwt:t})}static fromDerivationPath(e,r){return S(e,o.SLIP_0010_SEED,r)}};o.PEPPER_LENGTH=31,o.SLIP_0010_SEED="32 bytes";var H=o;export{H as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2M7KHFEG.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/account/KeylessAccount.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { JwtPayload, jwtDecode } from \"jwt-decode\";\nimport { decode } from \"base-64\";\nimport { HexInput, SigningScheme } from \"../types\";\nimport { AccountAddress } from \"../core/accountAddress\";\nimport {\n AnyPublicKey,\n AnySignature,\n KeylessPublicKey,\n KeylessSignature,\n OpenIdSignature,\n OpenIdSignatureOrZkProof,\n Signature,\n SignedGroth16Signature,\n computeAddressSeed,\n fromDerivationPath as fromDerivationPathInner,\n} from \"../core/crypto\";\n\nimport { Account } from \"./Account\";\nimport { EphemeralKeyPair } from \"./EphemeralKeyPair\";\nimport { Hex } from \"../core/hex\";\nimport { AccountAuthenticatorSingleKey } from \"../transactions/authenticator/account\";\nimport { Deserializer, Serializer } from \"../bcs\";\nimport { deriveTransactionType, generateSigningMessage } from \"../transactions/transactionBuilder/signingMessage\";\nimport { AnyRawTransaction } from \"../transactions/types\";\n\nfunction base64UrlDecode(base64Url: string): string {\n // Replace base64url-specific characters\n const base64 = base64Url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n\n // Pad the string with '=' characters if needed\n const paddedBase64 = base64 + \"==\".substring(0, (3 - (base64.length % 3)) % 3);\n\n // Decode the base64 string using the base-64 library\n const decodedString = decode(paddedBase64);\n\n return decodedString;\n}\n\nexport class KeylessAccount implements Account {\n static readonly PEPPER_LENGTH: number = 31;\n\n static readonly SLIP_0010_SEED: string = \"32 bytes\";\n\n publicKey: KeylessPublicKey;\n\n ephemeralKeyPair: EphemeralKeyPair;\n\n uidKey: string;\n\n uidVal: string;\n\n aud: string;\n\n pepper: Uint8Array;\n\n accountAddress: AccountAddress;\n\n proof: SignedGroth16Signature;\n\n signingScheme: SigningScheme;\n\n jwt: string;\n\n constructor(args: {\n address?: AccountAddress;\n ephemeralKeyPair: EphemeralKeyPair;\n iss: string;\n uidKey: string;\n uidVal: string;\n aud: string;\n pepper: HexInput;\n proof: SignedGroth16Signature;\n jwt: string;\n }) {\n const { address, ephemeralKeyPair, iss, uidKey, uidVal, aud, pepper, proof, jwt } = args;\n this.ephemeralKeyPair = ephemeralKeyPair;\n const addressSeed = computeAddressSeed(args);\n this.publicKey = new KeylessPublicKey(iss, addressSeed);\n this.accountAddress = address ? AccountAddress.from(address) : this.publicKey.authKey().derivedAddress();\n this.uidKey = uidKey;\n this.uidVal = uidVal;\n this.aud = aud;\n this.jwt = jwt;\n this.proof = proof;\n\n this.signingScheme = SigningScheme.SingleKey;\n const pepperBytes = Hex.fromHexInput(pepper).toUint8Array();\n if (pepperBytes.length !== KeylessAccount.PEPPER_LENGTH) {\n throw new Error(`Pepper length in bytes should be ${KeylessAccount.PEPPER_LENGTH}`);\n }\n this.pepper = pepperBytes;\n }\n\n serialize(serializer: Serializer): void {\n serializer.serializeStr(this.jwt);\n serializer.serializeStr(this.uidKey);\n serializer.serializeFixedBytes(this.pepper);\n this.ephemeralKeyPair.serialize(serializer);\n this.proof.serialize(serializer);\n }\n\n static deserialize(deserializer: Deserializer): KeylessAccount {\n const jwt = deserializer.deserializeStr();\n const uidKey = deserializer.deserializeStr();\n const pepper = deserializer.deserializeFixedBytes(31);\n const ephemeralKeyPair = EphemeralKeyPair.deserialize(deserializer);\n const proof = SignedGroth16Signature.deserialize(deserializer);\n return KeylessAccount.fromJWTAndProof({\n proof,\n pepper,\n uidKey,\n jwt,\n ephemeralKeyPair,\n });\n }\n\n bcsToBytes(): Uint8Array {\n const serializer = new Serializer();\n this.serialize(serializer);\n return serializer.toUint8Array();\n }\n\n bcsToHex(): Hex {\n const bcsBytes = this.bcsToBytes();\n return Hex.fromHexInput(bcsBytes);\n }\n\n signWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorSingleKey {\n const raw = deriveTransactionType(transaction);\n const signature = new AnySignature(this.sign(raw.bcsToBytes()));\n const publicKey = new AnyPublicKey(this.publicKey);\n return new AccountAuthenticatorSingleKey(publicKey, signature);\n }\n\n async waitForProofFetch() {\n if (this.proof instanceof Promise) {\n await this.proof;\n }\n }\n\n sign(data: HexInput): Signature {\n const { expiryDateSecs } = this.ephemeralKeyPair;\n const currentTimeInSeconds = Math.floor(new Date().getTime() / 1000);\n if (expiryDateSecs < currentTimeInSeconds) {\n throw new Error(\"Ephemeral key pair is expired.\");\n }\n if (this.proof instanceof Promise) {\n throw new Error(\"Failed to fetch proof.\");\n }\n const jwtHeader = this.jwt.split(\".\")[0];\n const ephemeralPublicKey = this.ephemeralKeyPair.getPublicKey();\n\n const serializer = new Serializer();\n serializer.serializeFixedBytes(Hex.fromHexInput(data).toUint8Array());\n serializer.serializeOption(this.proof.proof);\n const signMess = generateSigningMessage(serializer.toUint8Array(), \"APTOS::TransactionAndProof\");\n\n const ephemeralSignature = this.ephemeralKeyPair.sign(signMess);\n\n return new KeylessSignature({\n jwtHeader: base64UrlDecode(jwtHeader),\n openIdSignatureOrZkProof: new OpenIdSignatureOrZkProof(this.proof),\n expiryDateSecs,\n ephemeralPublicKey,\n ephemeralSignature,\n });\n }\n\n signTransaction(transaction: AnyRawTransaction): Signature {\n const raw = deriveTransactionType(transaction);\n return this.sign(raw.bcsToBytes());\n }\n\n signWithOpenIdSignature(data: HexInput): Signature {\n const [jwtHeader, jwtPayload, jwtSignature] = this.jwt.split(\".\");\n const openIdSig = new OpenIdSignature({\n jwtSignature,\n jwtPayloadJson: jwtPayload,\n uidKey: this.uidKey,\n epkBlinder: this.ephemeralKeyPair.blinder,\n pepper: this.pepper,\n });\n\n const { expiryDateSecs } = this.ephemeralKeyPair;\n const ephemeralPublicKey = this.ephemeralKeyPair.getPublicKey();\n const ephemeralSignature = this.ephemeralKeyPair.sign(data);\n return new KeylessSignature({\n jwtHeader,\n openIdSignatureOrZkProof: new OpenIdSignatureOrZkProof(openIdSig),\n expiryDateSecs,\n ephemeralPublicKey,\n ephemeralSignature,\n });\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, class-methods-use-this\n verifySignature(args: { message: HexInput; signature: Signature }): boolean {\n return true;\n }\n\n static fromBytes(bytes: Uint8Array): KeylessAccount {\n return KeylessAccount.deserialize(new Deserializer(bytes));\n }\n\n static fromJWTAndProof(args: {\n proof: SignedGroth16Signature;\n jwt: string;\n ephemeralKeyPair: EphemeralKeyPair;\n pepper: HexInput;\n uidKey?: string;\n }): KeylessAccount {\n const { proof, jwt, ephemeralKeyPair, pepper } = args;\n const uidKey = args.uidKey ?? \"sub\";\n\n const jwtPayload = jwtDecode<JwtPayload & { [key: string]: string }>(jwt);\n const iss = jwtPayload.iss!;\n if (typeof jwtPayload.aud !== \"string\") {\n throw new Error(\"aud was not found or an array of values\");\n }\n const aud = jwtPayload.aud!;\n const uidVal = jwtPayload[uidKey];\n return new KeylessAccount({\n proof,\n ephemeralKeyPair,\n iss,\n uidKey,\n uidVal,\n aud,\n pepper,\n jwt,\n });\n }\n\n static fromDerivationPath(path: string, seed: Uint8Array): Uint8Array {\n return fromDerivationPathInner(path, KeylessAccount.SLIP_0010_SEED, seed);\n }\n}\n"],"mappings":"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","names":["jwtDecode","decode","base64UrlDecode","base64Url","base64","paddedBase64","decode","_KeylessAccount","args","address","ephemeralKeyPair","iss","uidKey","uidVal","aud","pepper","proof","jwt","addressSeed","computeAddressSeed","KeylessPublicKey","AccountAddress","pepperBytes","Hex","serializer","deserializer","EphemeralKeyPair","SignedGroth16Signature","Serializer","bcsBytes","transaction","raw","deriveTransactionType","signature","AnySignature","publicKey","AnyPublicKey","AccountAuthenticatorSingleKey","data","expiryDateSecs","currentTimeInSeconds","jwtHeader","ephemeralPublicKey","signMess","generateSigningMessage","ephemeralSignature","KeylessSignature","OpenIdSignatureOrZkProof","jwtPayload","jwtSignature","openIdSig","OpenIdSignature","bytes","Deserializer","jwtDecode","path","seed","fromDerivationPath","KeylessAccount"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-QXVGXZJX.mjs";import{a as e}from"./chunk-3JPVQHOR.mjs";var n=()=>Math.floor(Date.now()/1e3),r=class{constructor(t,i,o,a,c){this.lastUncommintedNumber=null;this.currentNumber=null;this.lock=!1;this.aptosConfig=t,this.account=i,this.maxWaitTime=o,this.maximumInFlight=a,this.sleepTime=c}async nextSequenceNumber(){for(;this.lock;)await e(this.sleepTime);this.lock=!0;let t=BigInt(0);try{if((this.lastUncommintedNumber===null||this.currentNumber===null)&&await this.initialize(),this.currentNumber-this.lastUncommintedNumber>=this.maximumInFlight){await this.update();let i=n();for(;this.currentNumber-this.lastUncommintedNumber>=this.maximumInFlight;)await e(this.sleepTime),n()-i>this.maxWaitTime?(console.warn(`Waited over 30 seconds for a transaction to commit, resyncing ${this.account.accountAddress.toString()}`),await this.initialize()):await this.update()}t=this.currentNumber,this.currentNumber+=BigInt(1)}catch(i){console.error("error in getting next sequence number for this account",i)}finally{this.lock=!1}return t}async initialize(){let{sequence_number:t}=await s({aptosConfig:this.aptosConfig,accountAddress:this.account.accountAddress});this.currentNumber=BigInt(t),this.lastUncommintedNumber=BigInt(t)}async update(){let{sequence_number:t}=await s({aptosConfig:this.aptosConfig,accountAddress:this.account.accountAddress});return this.lastUncommintedNumber=BigInt(t),this.lastUncommintedNumber}async synchronize(){if(this.lastUncommintedNumber!==this.currentNumber){for(;this.lock;)await e(this.sleepTime);this.lock=!0;try{await this.update();let t=n();for(;this.lastUncommintedNumber!==this.currentNumber;)n()-t>this.maxWaitTime?(console.warn(`Waited over 30 seconds for a transaction to commit, resyncing ${this.account.accountAddress.toString()}`),await this.initialize()):(await e(this.sleepTime),await this.update())}catch(t){console.error("error in synchronizing this account sequence number with the one on chain",t)}finally{this.lock=!1}}}};export{r as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2SD6JLIU.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/transactions/management/accountSequenceNumber.ts"],"sourcesContent":["/**\n * A wrapper that handles and manages an account sequence number.\n *\n * Submit up to `maximumInFlight` transactions per account in parallel with a timeout of `sleepTime`\n * If local assumes `maximumInFlight` are in flight, determine the actual committed state from the network\n * If there are less than `maximumInFlight` due to some being committed, adjust the window\n * If `maximumInFlight` are in flight, wait `sleepTime` seconds before re-evaluating\n * If ever waiting more than `maxWaitTime` restart the sequence number to the current on-chain state\n *\n * Assumptions:\n * Accounts are expected to be managed by a single AccountSequenceNumber and not used otherwise.\n * They are initialized to the current on-chain state, so if there are already transactions in\n * flight, they may take some time to reset.\n * Accounts are automatically initialized if not explicitly\n *\n * Notes:\n * This is co-routine safe, that is many async tasks can be reading from this concurrently.\n * The state of an account cannot be used across multiple AccountSequenceNumber services.\n * The synchronize method will create a barrier that prevents additional nextSequenceNumber\n * calls until it is complete.\n * This only manages the distribution of sequence numbers it does not help handle transaction\n * failures.\n * If a transaction fails, you should call synchronize and wait for timeouts.\n */\n\nimport { AptosConfig } from \"../../api/aptosConfig\";\nimport { Account } from \"../../account\";\nimport { getInfo } from \"../../internal/account\";\nimport { sleep } from \"../../utils/helpers\";\n\n// returns `now` time in seconds\nconst now = () => Math.floor(Date.now() / 1000);\n\nexport class AccountSequenceNumber {\n readonly aptosConfig: AptosConfig;\n\n readonly account: Account;\n\n // sequence number on chain\n lastUncommintedNumber: bigint | null = null;\n\n // local sequence number\n currentNumber: bigint | null = null;\n\n /**\n * We want to guarantee that we preserve ordering of workers to requests.\n *\n * `lock` is used to try to prevent multiple coroutines from accessing a shared resource at the same time,\n * which can result in race conditions and data inconsistency.\n * This code actually doesn't do it though, since we aren't giving out a slot, it is still somewhat a race condition.\n *\n * The ideal solution is likely that each thread grabs the next number from a incremental integer.\n * When they complete, they increment that number and that entity is able to enter the `lock`.\n * That would guarantee ordering.\n */\n lock = false;\n\n maxWaitTime: number;\n\n maximumInFlight: number;\n\n sleepTime: number;\n\n constructor(\n aptosConfig: AptosConfig,\n account: Account,\n maxWaitTime: number,\n maximumInFlight: number,\n sleepTime: number,\n ) {\n this.aptosConfig = aptosConfig;\n this.account = account;\n this.maxWaitTime = maxWaitTime;\n this.maximumInFlight = maximumInFlight;\n this.sleepTime = sleepTime;\n }\n\n /**\n * Returns the next available sequence number for this account\n *\n * @returns next available sequence number\n */\n async nextSequenceNumber(): Promise<bigint | null> {\n /* eslint-disable no-await-in-loop */\n while (this.lock) {\n await sleep(this.sleepTime);\n }\n\n this.lock = true;\n let nextNumber = BigInt(0);\n try {\n if (this.lastUncommintedNumber === null || this.currentNumber === null) {\n await this.initialize();\n }\n\n if (this.currentNumber! - this.lastUncommintedNumber! >= this.maximumInFlight) {\n await this.update();\n\n const startTime = now();\n while (this.currentNumber! - this.lastUncommintedNumber! >= this.maximumInFlight) {\n await sleep(this.sleepTime);\n if (now() - startTime > this.maxWaitTime) {\n /* eslint-disable no-console */\n console.warn(\n `Waited over 30 seconds for a transaction to commit, resyncing ${this.account.accountAddress.toString()}`,\n );\n await this.initialize();\n } else {\n await this.update();\n }\n }\n }\n nextNumber = this.currentNumber!;\n this.currentNumber! += BigInt(1);\n } catch (e) {\n console.error(\"error in getting next sequence number for this account\", e);\n } finally {\n this.lock = false;\n }\n return nextNumber;\n }\n\n /**\n * Initializes this account with the sequence number on chain\n */\n async initialize(): Promise<void> {\n const { sequence_number: sequenceNumber } = await getInfo({\n aptosConfig: this.aptosConfig,\n accountAddress: this.account.accountAddress,\n });\n this.currentNumber = BigInt(sequenceNumber);\n this.lastUncommintedNumber = BigInt(sequenceNumber);\n }\n\n /**\n * Updates this account sequence number with the one on-chain\n *\n * @returns on-chain sequence number for this account\n */\n async update(): Promise<bigint> {\n const { sequence_number: sequenceNumber } = await getInfo({\n aptosConfig: this.aptosConfig,\n accountAddress: this.account.accountAddress,\n });\n this.lastUncommintedNumber = BigInt(sequenceNumber);\n return this.lastUncommintedNumber;\n }\n\n /**\n * Synchronizes local sequence number with the seqeunce number on chain for this account.\n *\n * Poll the network until all submitted transactions have either been committed or until\n * the maximum wait time has elapsed\n */\n async synchronize(): Promise<void> {\n if (this.lastUncommintedNumber === this.currentNumber) return;\n\n /* eslint-disable no-await-in-loop */\n while (this.lock) {\n await sleep(this.sleepTime);\n }\n\n this.lock = true;\n\n try {\n await this.update();\n const startTime = now();\n while (this.lastUncommintedNumber !== this.currentNumber) {\n if (now() - startTime > this.maxWaitTime) {\n /* eslint-disable no-console */\n console.warn(\n `Waited over 30 seconds for a transaction to commit, resyncing ${this.account.accountAddress.toString()}`,\n );\n await this.initialize();\n } else {\n await sleep(this.sleepTime);\n await this.update();\n }\n }\n } catch (e) {\n console.error(\"error in synchronizing this account sequence number with the one on chain\", e);\n } finally {\n this.lock = false;\n }\n }\n}\n"],"mappings":"kFA+BA,IAAMA,EAAM,IAAM,KAAK,MAAM,KAAK,IAAI,EAAI,GAAI,EAEjCC,EAAN,KAA4B,CA8BjC,YACEC,EACAC,EACAC,EACAC,EACAC,EACA,CA9BF,2BAAuC,KAGvC,mBAA+B,KAa/B,UAAO,GAeL,KAAK,YAAcJ,EACnB,KAAK,QAAUC,EACf,KAAK,YAAcC,EACnB,KAAK,gBAAkBC,EACvB,KAAK,UAAYC,CACnB,CAOA,MAAM,oBAA6C,CAEjD,KAAO,KAAK,MACV,MAAMC,EAAM,KAAK,SAAS,EAG5B,KAAK,KAAO,GACZ,IAAIC,EAAa,OAAO,CAAC,EACzB,GAAI,CAKF,IAJI,KAAK,wBAA0B,MAAQ,KAAK,gBAAkB,OAChE,MAAM,KAAK,WAAW,EAGpB,KAAK,cAAiB,KAAK,uBAA0B,KAAK,gBAAiB,CAC7E,MAAM,KAAK,OAAO,EAElB,IAAMC,EAAYT,EAAI,EACtB,KAAO,KAAK,cAAiB,KAAK,uBAA0B,KAAK,iBAC/D,MAAMO,EAAM,KAAK,SAAS,EACtBP,EAAI,EAAIS,EAAY,KAAK,aAE3B,QAAQ,KACN,iEAAiE,KAAK,QAAQ,eAAe,SAAS,CAAC,EACzG,EACA,MAAM,KAAK,WAAW,GAEtB,MAAM,KAAK,OAAO,CAGxB,CACAD,EAAa,KAAK,cAClB,KAAK,eAAkB,OAAO,CAAC,CACjC,OAASE,EAAG,CACV,QAAQ,MAAM,yDAA0DA,CAAC,CAC3E,QAAE,CACA,KAAK,KAAO,EACd,CACA,OAAOF,CACT,CAKA,MAAM,YAA4B,CAChC,GAAM,CAAE,gBAAiBG,CAAe,EAAI,MAAMC,EAAQ,CACxD,YAAa,KAAK,YAClB,eAAgB,KAAK,QAAQ,cAC/B,CAAC,EACD,KAAK,cAAgB,OAAOD,CAAc,EAC1C,KAAK,sBAAwB,OAAOA,CAAc,CACpD,CAOA,MAAM,QAA0B,CAC9B,GAAM,CAAE,gBAAiBA,CAAe,EAAI,MAAMC,EAAQ,CACxD,YAAa,KAAK,YAClB,eAAgB,KAAK,QAAQ,cAC/B,CAAC,EACD,YAAK,sBAAwB,OAAOD,CAAc,EAC3C,KAAK,qBACd,CAQA,MAAM,aAA6B,CACjC,GAAI,KAAK,wBAA0B,KAAK,cAGxC,MAAO,KAAK,MACV,MAAMJ,EAAM,KAAK,SAAS,EAG5B,KAAK,KAAO,GAEZ,GAAI,CACF,MAAM,KAAK,OAAO,EAClB,IAAME,EAAYT,EAAI,EACtB,KAAO,KAAK,wBAA0B,KAAK,eACrCA,EAAI,EAAIS,EAAY,KAAK,aAE3B,QAAQ,KACN,iEAAiE,KAAK,QAAQ,eAAe,SAAS,CAAC,EACzG,EACA,MAAM,KAAK,WAAW,IAEtB,MAAMF,EAAM,KAAK,SAAS,EAC1B,MAAM,KAAK,OAAO,EAGxB,OAASG,EAAG,CACV,QAAQ,MAAM,4EAA6EA,CAAC,CAC9F,QAAE,CACA,KAAK,KAAO,EACd,EACF,CACF","names":["now","AccountSequenceNumber","aptosConfig","account","maxWaitTime","maximumInFlight","sleepTime","sleep","nextNumber","startTime","e","sequenceNumber","getInfo"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as g,c as a,d as s}from"./chunk-Z2ZR4PTF.mjs";import{f as A,g as T}from"./chunk-YE5B2S5L.mjs";import{sha3_256 as y}from"@noble/hashes/sha3";function w(r){return r.feePayerAddress?new s(r.rawTransaction,r.secondarySignerAddresses??[],r.feePayerAddress):r.secondarySignerAddresses?new a(r.rawTransaction,r.secondarySignerAddresses):r.rawTransaction}function i(r,e){let o=y.create();if(!e.startsWith("APTOS::"))throw new Error(`Domain separator needs to start with 'APTOS::'. Provided - ${e}`);o.update(e);let n=o.digest(),c=r,t=new Uint8Array(n.length+c.length);return t.set(n),t.set(c,n.length),t}function S(r){return i(r.bcsToBytes(),r.constructor.name)}function h(r){let e=w(r);if(e instanceof g)return i(e.bcsToBytes(),A);if(e instanceof a||e instanceof s)return i(e.bcsToBytes(),T);throw new Error(`Unknown transaction type to sign on: ${e}`)}export{w as a,i as b,S as c,h as d};
|
|
2
|
+
//# sourceMappingURL=chunk-2YDIOWRJ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/transactions/transactionBuilder/signingMessage.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * This file handles the transaction creation lifecycle.\n * It holds different operations to generate a transaction payload, a raw transaction,\n * and a signed transaction that can be simulated, signed and submitted to chain.\n */\nimport { sha3_256 as sha3Hash } from \"@noble/hashes/sha3\";\nimport { RAW_TRANSACTION_SALT, RAW_TRANSACTION_WITH_DATA_SALT } from \"../../utils/const\";\nimport { FeePayerRawTransaction, MultiAgentRawTransaction, RawTransaction } from \"../instances\";\nimport { AnyRawTransaction, AnyRawTransactionInstance } from \"../types\";\nimport { Serializable } from \"../../bcs\";\n\n/**\n * Derive the raw transaction type - FeePayerRawTransaction or MultiAgentRawTransaction or RawTransaction\n *\n * @param transaction A aptos transaction type\n *\n * @returns FeePayerRawTransaction | MultiAgentRawTransaction | RawTransaction\n */\nexport function deriveTransactionType(transaction: AnyRawTransaction): AnyRawTransactionInstance {\n if (transaction.feePayerAddress) {\n return new FeePayerRawTransaction(\n transaction.rawTransaction,\n transaction.secondarySignerAddresses ?? [],\n transaction.feePayerAddress,\n );\n }\n if (transaction.secondarySignerAddresses) {\n return new MultiAgentRawTransaction(transaction.rawTransaction, transaction.secondarySignerAddresses);\n }\n\n return transaction.rawTransaction;\n}\n\nexport function generateSigningMessage(bytes: Uint8Array, domainSeparator: string): Uint8Array {\n const hash = sha3Hash.create();\n\n if (!domainSeparator.startsWith(\"APTOS::\")) {\n throw new Error(`Domain separator needs to start with 'APTOS::'. Provided - ${domainSeparator}`);\n }\n\n hash.update(domainSeparator);\n\n const prefix = hash.digest();\n\n const body = bytes;\n\n const mergedArray = new Uint8Array(prefix.length + body.length);\n mergedArray.set(prefix);\n mergedArray.set(body, prefix.length);\n\n return mergedArray;\n}\n\nexport function generateSigningMessageForSerializable(obj: Serializable): Uint8Array {\n return generateSigningMessage(obj.bcsToBytes(), obj.constructor.name);\n}\n\nexport function generateSigningMessageForTransaction(transaction: AnyRawTransaction): Uint8Array {\n const rawTxn = deriveTransactionType(transaction);\n if (rawTxn instanceof RawTransaction) {\n return generateSigningMessage(rawTxn.bcsToBytes(), RAW_TRANSACTION_SALT);\n }\n if (rawTxn instanceof MultiAgentRawTransaction || rawTxn instanceof FeePayerRawTransaction) {\n return generateSigningMessage(rawTxn.bcsToBytes(), RAW_TRANSACTION_WITH_DATA_SALT);\n }\n throw new Error(`Unknown transaction type to sign on: ${rawTxn}`);\n}\n"],"mappings":"uGAQA,OAAS,YAAYA,MAAgB,qBAa9B,SAASC,EAAsBC,EAA2D,CAC/F,OAAIA,EAAY,gBACP,IAAIC,EACTD,EAAY,eACZA,EAAY,0BAA4B,CAAC,EACzCA,EAAY,eACd,EAEEA,EAAY,yBACP,IAAIE,EAAyBF,EAAY,eAAgBA,EAAY,wBAAwB,EAG/FA,EAAY,cACrB,CAEO,SAASG,EAAuBC,EAAmBC,EAAqC,CAC7F,IAAMC,EAAOC,EAAS,OAAO,EAE7B,GAAI,CAACF,EAAgB,WAAW,SAAS,EACvC,MAAM,IAAI,MAAM,+DAA+DA,CAAe,EAAE,EAGlGC,EAAK,OAAOD,CAAe,EAE3B,IAAMG,EAASF,EAAK,OAAO,EAErBG,EAAOL,EAEPM,EAAc,IAAI,WAAWF,EAAO,OAASC,EAAK,MAAM,EAC9D,OAAAC,EAAY,IAAIF,CAAM,EACtBE,EAAY,IAAID,EAAMD,EAAO,MAAM,EAE5BE,CACT,CAEO,SAASC,EAAsCC,EAA+B,CACnF,OAAOT,EAAuBS,EAAI,WAAW,EAAGA,EAAI,YAAY,IAAI,CACtE,CAEO,SAASC,EAAqCb,EAA4C,CAC/F,IAAMc,EAASf,EAAsBC,CAAW,EAChD,GAAIc,aAAkBC,EACpB,OAAOZ,EAAuBW,EAAO,WAAW,EAAGE,CAAoB,EAEzE,GAAIF,aAAkBZ,GAA4BY,aAAkBb,EAClE,OAAOE,EAAuBW,EAAO,WAAW,EAAGG,CAA8B,EAEnF,MAAM,IAAI,MAAM,wCAAwCH,CAAM,EAAE,CAClE","names":["sha3Hash","deriveTransactionType","transaction","FeePayerRawTransaction","MultiAgentRawTransaction","generateSigningMessage","bytes","domainSeparator","hash","sha3Hash","prefix","body","mergedArray","generateSigningMessageForSerializable","obj","generateSigningMessageForTransaction","rawTxn","RawTransaction","RAW_TRANSACTION_SALT","RAW_TRANSACTION_WITH_DATA_SALT"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s,b as t,c as r,d as i,e as c,f as u,g as d,h as A,i as g,j as m,k as a,l as p,m as f,n as y,o as C,p as O,q as T}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s,b as t,c as r,d as i,e as c,f as u,g as d,h as A,i as g,j as m,k as a,l as p,m as f,n as y,o as C,p as O,q as T}from"./chunk-QXVGXZJX.mjs";import{a as n}from"./chunk-HFLWASAB.mjs";import{e as o}from"./chunk-YE5B2S5L.mjs";var l=class{constructor(e){this.config=e}async getAccountInfo(e){return s({aptosConfig:this.config,...e})}async getAccountModules(e){return t({aptosConfig:this.config,...e})}async getAccountModule(e){return r({aptosConfig:this.config,...e})}async getAccountTransactions(e){return i({aptosConfig:this.config,...e})}async getAccountResources(e){return c({aptosConfig:this.config,...e})}async getAccountResource(e){return u({aptosConfig:this.config,...e})}async lookupOriginalAccountAddress(e){return d({aptosConfig:this.config,...e})}async getAccountTokensCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),A({aptosConfig:this.config,...e})}async getAccountOwnedTokens(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),g({aptosConfig:this.config,...e})}async getAccountOwnedTokensFromCollectionAddress(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),m({aptosConfig:this.config,...e})}async getAccountCollectionsWithOwnedTokens(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),a({aptosConfig:this.config,...e})}async getAccountTransactionsCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),p({aptosConfig:this.config,...e})}async getAccountCoinsData(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),y({aptosConfig:this.config,...e})}async getAccountCoinsCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),C({aptosConfig:this.config,...e})}async getAccountAPTAmount(e){return this.getAccountCoinAmount({coinType:o,...e})}async getAccountCoinAmount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),f({aptosConfig:this.config,...e})}async getAccountOwnedObjects(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"default_processor"}),O({aptosConfig:this.config,...e})}async deriveAccountFromPrivateKey(e){return T({aptosConfig:this.config,...e})}};export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3CIA6J5L.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 { Account as AccountModule } from \"../account\";\nimport { AccountAddress, PrivateKey, AccountAddressInput } from \"../core\";\nimport {\n AccountData,\n AnyNumber,\n GetAccountCoinsDataResponse,\n GetAccountCollectionsWithOwnedTokenResponse,\n GetAccountOwnedObjectsResponse,\n GetAccountOwnedTokensFromCollectionResponse,\n GetAccountOwnedTokensQueryResponse,\n LedgerVersionArg,\n MoveModuleBytecode,\n MoveResource,\n MoveStructId,\n OrderByArg,\n PaginationArgs,\n TokenStandardArg,\n TransactionResponse,\n WhereArg,\n} from \"../types\";\nimport {\n deriveAccountFromPrivateKey,\n getAccountCoinAmount,\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\";\nimport { APTOS_COIN, ProcessorType } from \"../utils/const\";\nimport { AptosConfig } from \"./aptosConfig\";\nimport { waitForIndexerOnVersion } from \"./utils\";\nimport { CurrentFungibleAssetBalancesBoolExp } from \"../types/generated/types\";\n\n/**\n * A class to query all `Account` related queries on Aptos.\n */\nexport class Account {\n constructor(readonly config: AptosConfig) {}\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 & LedgerVersionArg;\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\n * const module = await aptos.getAccountModule({accountAddress:\"0x456\"})\n * // An example of an account module response\n * ```\n * {\n * bytecode: \"0xa11ceb0b0600000006010002030206050807070f0d081c200\",\n * abi: { address: \"0x1\" }\n * }\n * ```\n */\n async getAccountModule(args: {\n accountAddress: AccountAddressInput;\n moduleName: string;\n options?: LedgerVersionArg;\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 * @example\n * const transactions = await aptos.getAccountTransactions({accountAddress:\"0x456\"})\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 * @example\n * const resources = await aptos.getAccountResources({accountAddress:\"0x456\"})\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 & LedgerVersionArg;\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\n * const resource = await aptos.getAccountResource({accountAddress:\"0x456\"})\n *\n */\n async getAccountResource<T extends {} = any>(args: {\n accountAddress: AccountAddressInput;\n resourceType: MoveStructId;\n options?: LedgerVersionArg;\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 * @example\n * const accountAddress = await aptos.lookupOriginalAccountAddress({authenticationKey:account.accountAddress})\n *\n * @param args.authenticationKey The authentication key\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\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 minimumLedgerVersion?: AnyNumber;\n options?: LedgerVersionArg;\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 * @example\n * const tokensCount = await aptos.getAccountTokensCount({accountAddress:\"0x456\"})\n *\n * @param args.accountAddress The account address\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\n * @returns Current count of tokens owned by the account\n */\n async getAccountTokensCount(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<number> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.ACCOUNT_TRANSACTION_PROCESSOR,\n });\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 * @example\n * const accountOwnedTokens = await aptos.getAccountOwnedTokens({accountAddress:\"0x456\"})\n *\n * @param args.accountAddress The account address we want to get the tokens for\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\n * @param args.options.tokenStandard The NFT standard to query for\n * @param args.options.offset The number token to start returning results from\n * @param args.options.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 minimumLedgerVersion?: AnyNumber;\n options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensQueryResponse[0]>;\n }): Promise<GetAccountOwnedTokensQueryResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\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 * @example\n * const accountOwnedTokens = await aptos.getAccountOwnedTokensFromCollectionAddress({accountAddress:\"0x123\", collectionAddress:\"0x456\"})\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.minimumLedgerVersion Optional ledger version to sync up to, before querying\n * @param args.options.tokenStandard The NFT standard to query for\n * @param args.options.offset The number token to start returning results from\n * @param args.options.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 minimumLedgerVersion?: AnyNumber;\n options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensFromCollectionResponse[0]>;\n }): Promise<GetAccountOwnedTokensFromCollectionResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\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 * @example\n * const accountCollectionsWithOwnedTokens = await aptos.getAccountCollectionsWithOwnedTokens({accountAddress:\"0x123\"})\n *\n * @param args.accountAddress The account address we want to get the collections for\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\n * @param args.options.tokenStandard The NFT standard to query for\n * @param args.options.offset The number collection to start returning results from\n * @param args.options.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 minimumLedgerVersion?: AnyNumber;\n options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountCollectionsWithOwnedTokenResponse[0]>;\n }): Promise<GetAccountCollectionsWithOwnedTokenResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\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 * @example\n * const accountTransactionsCount = await aptos.getAccountTransactionsCount({accountAddress:\"0x123\"})\n *\n * @param args.accountAddress The account address we want to get the total count for\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\n * @returns Current count of transactions made by an account\n */\n async getAccountTransactionsCount(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<number> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.ACCOUNT_TRANSACTION_PROCESSOR,\n });\n return getAccountTransactionsCount({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries an account's coins data\n *\n * @example\n * const accountCoinsData = await aptos.getAccountCoinsData({accountAddress:\"0x123\"})\n *\n * @param args.accountAddress The account address we want to get the coins data for\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\n * @param args.options.offset optional. The number coin to start returning results from\n * @param args.options.limit optional. The number of results to return\n * @param args.options.orderBy optional. The order to sort the coins by\n * @param args.options.where optional. Filter the results by\n * @returns Array with the coins data\n */\n async getAccountCoinsData(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs &\n OrderByArg<GetAccountCoinsDataResponse[0]> &\n WhereArg<CurrentFungibleAssetBalancesBoolExp>;\n }): Promise<GetAccountCoinsDataResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,\n });\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 * @example\n * const accountCoinsCount = await aptos.getAccountCoinsCount({accountAddress:\"0x123\"})\n *\n * @param args.accountAddress The account address we want to get the total count for\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\n * @returns Current count of the aggregated count of all account's coins\n */\n async getAccountCoinsCount(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<number> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,\n });\n return getAccountCoinsCount({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries the account's APT amount\n *\n * @example\n * const accountAPTAmount = await aptos.getAccountAPTAmount({accountAddress:\"0x123\"})\n *\n * @param args.accountAddress The account address we want to get the total count for\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\n * @returns Current amount of account's APT\n */\n async getAccountAPTAmount(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<number> {\n return this.getAccountCoinAmount({ coinType: APTOS_COIN, ...args });\n }\n\n /**\n * Queries the account's coin amount by the coin type\n *\n * @example\n * const accountCoinAmount = await aptos.getAccountCoinAmount({accountAddress:\"0x123\", coinType:\"0x1::aptos_coin::AptosCoin\"})\n *\n * @param args.accountAddress The account address we want to get the total count for\n * @param args.coinType The coin type to query\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\n * @returns Current amount of account's coin\n */\n async getAccountCoinAmount(args: {\n accountAddress: AccountAddressInput;\n coinType: MoveStructId;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<number> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,\n });\n return getAccountCoinAmount({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries an account's owned objects\n *\n * @example\n * const accountOwnedObjects = await aptos.getAccountOwnedObjects({accountAddress:\"0x123\"})\n *\n * @param args.accountAddress The account address we want to get the objects for\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\n * @param args.options.offset The starting position to start returning results from\n * @param args.options.limit The number of results to return\n * @param args.options.orderBy The order to sort the objects by\n * @returns Objects array with the object data\n */\n async getAccountOwnedObjects(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & OrderByArg<GetAccountOwnedObjectsResponse[0]>;\n }): Promise<GetAccountOwnedObjectsResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.DEFAULT,\n });\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 * @example\n * const account = await aptos.deriveAccountFromPrivateKey({privateKey:new Ed25519PrivateKey(\"0x123\")})\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":"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","names":["Account","config","args","getInfo","getModules","getModule","getTransactions","getResources","getResource","lookupOriginalAccountAddress","waitForIndexerOnVersion","getAccountTokensCount","getAccountOwnedTokens","getAccountOwnedTokensFromCollectionAddress","getAccountCollectionsWithOwnedTokens","getAccountTransactionsCount","getAccountCoinsData","getAccountCoinsCount","APTOS_COIN","getAccountCoinAmount","getAccountOwnedObjects","deriveAccountFromPrivateKey"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-TVRJ3M7B.mjs";import{b as i}from"./chunk-AOCNYMMX.mjs";var t=class a extends r{constructor(e){super();this.value=i.fromHexInput(e).toUint8Array()}serialize(e){e.serializeFixedBytes(this.value)}serializeForEntryFunction(e){e.serialize(this)}serializeForScriptFunction(e){e.serialize(this)}static deserialize(e,s){let o=e.deserializeFixedBytes(s);return new a(o)}};export{t as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3FVRXELT.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-XEXWFQNP.mjs";import{h as t}from"./chunk-6NZNCDDW.mjs";var r=class{constructor(o){this.config=o}async fundAccount(o){let n=await i({aptosConfig:this.config,...o});return o.options?.waitForIndexer!==!1&&await t({aptosConfig:this.config,minimumLedgerVersion:BigInt(n.version)}),n}};export{r as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3LQPAGL6.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-SNQJV7MF.mjs";import{a as o,b as s,c as t,d as r,e as n,f as i,h as a,i as g}from"./chunk-APEBWN6Q.mjs";var p=class{constructor(e){this.config=e}async getLedgerInfo(){return o({aptosConfig:this.config})}async getChainId(){return(await this.getLedgerInfo()).chain_id}async getBlockByVersion(e){return s({aptosConfig:this.config,...e})}async getBlockByHeight(e){return t({aptosConfig:this.config,...e})}async getTableItem(e){return r({aptosConfig:this.config,...e})}async view(e){return c({aptosConfig:this.config,...e})}async getChainTopUserTransactions(e){return n({aptosConfig:this.config,...e})}async queryIndexer(e){return i({aptosConfig:this.config,...e})}async getIndexerLastSuccessVersion(){return a({aptosConfig:this.config})}async getProcessorStatus(e){return g({aptosConfig:this.config,processorType:e})}};export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3PGVEOWR.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-MGOHPDX4.mjs";import{b as a}from"./chunk-T23OVRNF.mjs";import{a as x}from"./chunk-TVRJ3M7B.mjs";var t=class extends x{static deserialize(e){let r=e.deserializeUleb128AsU32();switch(r){case 0:return c.load(e);case 1:return u.load(e);case 2:return p.load(e);case 3:return z.load(e);case 4:return S.load(e);case 5:return U.load(e);case 6:return y.load(e);case 7:return b.load(e);case 8:return d.load(e);case 9:return g.load(e);case 10:return T.load(e);case 255:return h.load(e);default:throw new Error(`Unknown variant index for TypeTag: ${r}`)}}isBool(){return this instanceof c}isAddress(){return this instanceof S}isGeneric(){return this instanceof h}isSigner(){return this instanceof U}isVector(){return this instanceof y}isStruct(){return this instanceof b}isU8(){return this instanceof u}isU16(){return this instanceof d}isU32(){return this instanceof g}isU64(){return this instanceof p}isU128(){return this instanceof z}isU256(){return this instanceof T}},c=class i extends t{toString(){return"bool"}serialize(e){e.serializeU32AsUleb128(0)}static load(e){return new i}},u=class i extends t{toString(){return"u8"}serialize(e){e.serializeU32AsUleb128(1)}static load(e){return new i}},d=class i extends t{toString(){return"u16"}serialize(e){e.serializeU32AsUleb128(8)}static load(e){return new i}},g=class i extends t{toString(){return"u32"}serialize(e){e.serializeU32AsUleb128(9)}static load(e){return new i}},p=class i extends t{toString(){return"u64"}serialize(e){e.serializeU32AsUleb128(2)}static load(e){return new i}},z=class i extends t{toString(){return"u128"}serialize(e){e.serializeU32AsUleb128(3)}static load(e){return new i}},T=class i extends t{toString(){return"u256"}serialize(e){e.serializeU32AsUleb128(10)}static load(e){return new i}},S=class i extends t{toString(){return"address"}serialize(e){e.serializeU32AsUleb128(4)}static load(e){return new i}},U=class i extends t{toString(){return"signer"}serialize(e){e.serializeU32AsUleb128(5)}static load(e){return new i}},f=class i extends t{constructor(r){super();this.value=r}toString(){return`&${this.value.toString()}`}serialize(r){r.serializeU32AsUleb128(254)}static load(r){let s=t.deserialize(r);return new i(s)}},h=class i extends t{constructor(r){super();this.value=r;if(r<0)throw new Error("Generic type parameter index cannot be negative")}toString(){return`T${this.value}`}serialize(r){r.serializeU32AsUleb128(255),r.serializeU32(this.value)}static load(r){let s=r.deserializeU32();return new i(s)}},y=class i extends t{constructor(r){super();this.value=r}toString(){return`vector<${this.value.toString()}>`}static u8(){return new i(new u)}serialize(r){r.serializeU32AsUleb128(6),this.value.serialize(r)}static load(r){let s=t.deserialize(r);return new i(s)}},b=class i extends t{constructor(r){super();this.value=r}toString(){let r="";return this.value.typeArgs.length>0&&(r=`<${this.value.typeArgs.map(s=>s.toString()).join(", ")}>`),`${this.value.address.toString()}::${this.value.moduleName.identifier}::${this.value.name.identifier}${r}`}serialize(r){r.serializeU32AsUleb128(7),this.value.serialize(r)}static load(r){let s=o.deserialize(r);return new i(s)}isTypeTag(r,s,l){return this.value.moduleName.identifier===s&&this.value.name.identifier===l&&this.value.address.equals(r)}isString(){return this.isTypeTag(a.ONE,"string","String")}isOption(){return this.isTypeTag(a.ONE,"option","Option")}isObject(){return this.isTypeTag(a.ONE,"object","Object")}},o=class i extends x{constructor(r,s,l,v){super();this.address=r,this.moduleName=s,this.name=l,this.typeArgs=v}serialize(r){r.serialize(this.address),r.serialize(this.moduleName),r.serialize(this.name),r.serializeVector(this.typeArgs)}static deserialize(r){let s=a.deserialize(r),l=n.deserialize(r),v=n.deserialize(r),A=r.deserializeVector(t);return new i(s,l,v,A)}};function E(){return new o(a.ONE,new n("aptos_coin"),new n("AptosCoin"),[])}function V(){return new o(a.ONE,new n("string"),new n("String"),[])}function j(i){return new o(a.ONE,new n("option"),new n("Option"),[i])}function G(i){return new o(a.ONE,new n("object"),new n("Object"),[i])}export{t as a,c as b,u as c,d,g as e,p as f,z as g,T as h,S as i,U as j,f as k,h as l,y as m,b as n,o,E as p,V as q,j as r,G as s};
|
|
2
|
+
//# sourceMappingURL=chunk-3VGX3TXH.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-4NMDYPUD.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var s={mainnet:"https://api.mainnet.aptoslabs.com/v1/graphql",testnet:"https://api.testnet.aptoslabs.com/v1/graphql",devnet:"https://api.devnet.aptoslabs.com/v1/graphql",randomnet:"https://indexer-randomnet.hasura.app/v1/graphql",local:"http://127.0.0.1:8090/v1/graphql"},o={mainnet:"https://api.mainnet.aptoslabs.com/v1",testnet:"https://api.testnet.aptoslabs.com/v1",devnet:"https://api.devnet.aptoslabs.com/v1",randomnet:"https://fullnode.random.aptoslabs.com/v1",local:"http://127.0.0.1:8080/v1"},n={mainnet:"https://faucet.mainnet.aptoslabs.com",testnet:"https://faucet.testnet.aptoslabs.com",devnet:"https://faucet.devnet.aptoslabs.com",randomnet:"https://faucet.random.aptoslabs.com",local:"http://127.0.0.1:8081"},a={mainnet:"mainnet not yet ready, requires sdk upgrade",testnet:"https://api.testnet.aptoslabs.com/keyless/pepper/v0",devnet:"https://api.devnet.aptoslabs.com/keyless/pepper/v0",local:"https://api.devnet.aptoslabs.com/keyless/pepper/v0"},p={mainnet:"mainnet not yet ready, requires sdk upgrade",testnet:"https://api.testnet.aptoslabs.com/keyless/prover/v0",devnet:"https://api.devnet.aptoslabs.com/keyless/prover/v0",local:"https://api.devnet.aptoslabs.com/keyless/prover/v0"},e=(t=>(t.MAINNET="mainnet",t.TESTNET="testnet",t.DEVNET="devnet",t.RANDOMNET="randomnet",t.LOCAL="local",t.CUSTOM="custom",t))(e||{}),r={mainnet:1,testnet:2,randomnet:70,local:4},c={mainnet:"mainnet",testnet:"testnet",devnet:"devnet",randomnet:"randomnet",local:"local",custom:"custom"};export{s as a,o as b,n as c,a as d,p as e,e as f,r as g,c as h};
|
|
2
|
+
//# sourceMappingURL=chunk-5VSMDXZ6.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/apiEndpoints.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nexport const NetworkToIndexerAPI: Record<string, string> = {\n mainnet: \"https://api.mainnet.aptoslabs.com/v1/graphql\",\n testnet: \"https://api.testnet.aptoslabs.com/v1/graphql\",\n devnet: \"https://api.devnet.aptoslabs.com/v1/graphql\",\n randomnet: \"https://indexer-randomnet.hasura.app/v1/graphql\",\n local: \"http://127.0.0.1:8090/v1/graphql\",\n};\n\nexport const NetworkToNodeAPI: Record<string, string> = {\n mainnet: \"https://api.mainnet.aptoslabs.com/v1\",\n testnet: \"https://api.testnet.aptoslabs.com/v1\",\n devnet: \"https://api.devnet.aptoslabs.com/v1\",\n randomnet: \"https://fullnode.random.aptoslabs.com/v1\",\n local: \"http://127.0.0.1:8080/v1\",\n};\n\nexport const NetworkToFaucetAPI: Record<string, string> = {\n mainnet: \"https://faucet.mainnet.aptoslabs.com\",\n testnet: \"https://faucet.testnet.aptoslabs.com\",\n devnet: \"https://faucet.devnet.aptoslabs.com\",\n randomnet: \"https://faucet.random.aptoslabs.com\",\n local: \"http://127.0.0.1:8081\",\n};\n\nexport const NetworkToPepperAPI: Record<string, string> = {\n mainnet: \"mainnet not yet ready, requires sdk upgrade\",\n testnet: \"https://api.testnet.aptoslabs.com/keyless/pepper/v0\",\n devnet: \"https://api.devnet.aptoslabs.com/keyless/pepper/v0\",\n local: \"https://api.devnet.aptoslabs.com/keyless/pepper/v0\",\n};\n\nexport const NetworkToProverAPI: Record<string, string> = {\n mainnet: \"mainnet not yet ready, requires sdk upgrade\",\n testnet: \"https://api.testnet.aptoslabs.com/keyless/prover/v0\",\n devnet: \"https://api.devnet.aptoslabs.com/keyless/prover/v0\",\n local: \"https://api.devnet.aptoslabs.com/keyless/prover/v0\",\n};\n\nexport enum Network {\n MAINNET = \"mainnet\",\n TESTNET = \"testnet\",\n DEVNET = \"devnet\",\n RANDOMNET = \"randomnet\",\n LOCAL = \"local\",\n CUSTOM = \"custom\",\n}\n\nexport const NetworkToChainId: Record<string, number> = {\n mainnet: 1,\n testnet: 2,\n randomnet: 70,\n local: 4,\n};\n\nexport const NetworkToNetworkName: Record<string, Network> = {\n mainnet: Network.MAINNET,\n testnet: Network.TESTNET,\n devnet: Network.DEVNET,\n randomnet: Network.RANDOMNET,\n local: Network.LOCAL,\n custom: Network.CUSTOM,\n};\n"],"mappings":"AAGO,IAAMA,EAA8C,CACzD,QAAS,+CACT,QAAS,+CACT,OAAQ,8CACR,UAAW,kDACX,MAAO,kCACT,EAEaC,EAA2C,CACtD,QAAS,uCACT,QAAS,uCACT,OAAQ,sCACR,UAAW,2CACX,MAAO,0BACT,EAEaC,EAA6C,CACxD,QAAS,uCACT,QAAS,uCACT,OAAQ,sCACR,UAAW,sCACX,MAAO,uBACT,EAEaC,EAA6C,CACxD,QAAS,8CACT,QAAS,sDACT,OAAQ,qDACR,MAAO,oDACT,EAEaC,EAA6C,CACxD,QAAS,8CACT,QAAS,sDACT,OAAQ,qDACR,MAAO,oDACT,EAEYC,OACVA,EAAA,QAAU,UACVA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,UAAY,YACZA,EAAA,MAAQ,QACRA,EAAA,OAAS,SANCA,OAAA,IASCC,EAA2C,CACtD,QAAS,EACT,QAAS,EACT,UAAW,GACX,MAAO,CACT,EAEaC,EAAgD,CAC3D,QAAS,UACT,QAAS,UACT,OAAQ,SACR,UAAW,YACX,MAAO,QACP,OAAQ,QACV","names":["NetworkToIndexerAPI","NetworkToNodeAPI","NetworkToFaucetAPI","NetworkToPepperAPI","NetworkToProverAPI","Network","NetworkToChainId","NetworkToNetworkName"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as t,b as n,c as i,d as r,e as o}from"./chunk-5VSMDXZ6.mjs";import f from"@aptos-labs/aptos-client";var l=class{constructor(e){this.network=e?.network??"devnet",this.fullnode=e?.fullnode,this.faucet=e?.faucet,this.pepper=e?.pepper,this.prover=e?.prover,this.indexer=e?.indexer,this.client=e?.client??{provider:f},this.clientConfig=e?.clientConfig??{},this.fullnodeConfig=e?.fullnodeConfig??{},this.indexerConfig=e?.indexerConfig??{},this.faucetConfig=e?.faucetConfig??{}}getRequestUrl(e){switch(e){case"Fullnode":if(this.fullnode!==void 0)return this.fullnode;if(this.network==="custom")throw new Error("Please provide a custom full node url");return n[this.network];case"Faucet":if(this.faucet!==void 0)return this.faucet;if(this.network==="custom")throw new Error("Please provide a custom faucet url");return i[this.network];case"Indexer":if(this.indexer!==void 0)return this.indexer;if(this.network==="custom")throw new Error("Please provide a custom indexer url");return t[this.network];case"Pepper":if(this.pepper!==void 0)return this.pepper;if(this.network==="custom")throw new Error("Please provide a custom pepper service url");return r[this.network];case"Prover":if(this.prover!==void 0)return this.prover;if(this.network==="custom")throw new Error("Please provide a custom prover service url");return o[this.network];default:throw Error(`apiType ${e} is not supported`)}}isPepperServiceRequest(e){return r[this.network]===e}isProverServiceRequest(e){return o[this.network]===e}};export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6GQAHQGW.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/api/aptosConfig.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport aptosClient from \"@aptos-labs/aptos-client\";\nimport { AptosSettings, ClientConfig, Client, FullNodeConfig, IndexerConfig, FaucetConfig } from \"../types\";\nimport {\n NetworkToNodeAPI,\n NetworkToFaucetAPI,\n NetworkToIndexerAPI,\n Network,\n NetworkToPepperAPI,\n NetworkToProverAPI,\n} from \"../utils/apiEndpoints\";\nimport { AptosApiType } from \"../utils/const\";\n\n/**\n * This class holds the config information for the SDK client instance.\n *\n * @example\n *\n * const aptosConfig = new AptosConfig({network:Network.TESTNET})\n */\nexport class AptosConfig {\n /**\n * The Network that this SDK is associated with. Defaults to DEVNET\n */\n readonly network: Network;\n\n /**\n * The client instance the SDK uses. Defaults to `@aptos-labs/aptos-client\n */\n readonly client: Client;\n\n /**\n * The optional hardcoded fullnode URL to send requests to instead of using the network\n */\n readonly fullnode?: string;\n\n /**\n * The optional hardcoded faucet URL to send requests to instead of using the network\n */\n readonly faucet?: string;\n\n /**\n * The optional hardcoded pepper service URL to send requests to instead of using the network\n */\n readonly pepper?: string;\n\n /**\n * The optional hardcoded prover service URL to send requests to instead of using the network\n */\n readonly prover?: string;\n\n /**\n * The optional hardcoded indexer URL to send requests to instead of using the network\n */\n readonly indexer?: string;\n\n /**\n * Optional client configurations\n */\n readonly clientConfig?: ClientConfig;\n\n /**\n * Optional specific Fullnode configurations\n */\n readonly fullnodeConfig?: FullNodeConfig;\n\n /**\n * Optional specific Indexer configurations\n */\n readonly indexerConfig?: IndexerConfig;\n\n /**\n * Optional specific Faucet configurations\n */\n readonly faucetConfig?: FaucetConfig;\n\n constructor(settings?: AptosSettings) {\n this.network = settings?.network ?? Network.DEVNET;\n this.fullnode = settings?.fullnode;\n this.faucet = settings?.faucet;\n this.pepper = settings?.pepper;\n this.prover = settings?.prover;\n this.indexer = settings?.indexer;\n this.client = settings?.client ?? { provider: aptosClient };\n this.clientConfig = settings?.clientConfig ?? {};\n this.fullnodeConfig = settings?.fullnodeConfig ?? {};\n this.indexerConfig = settings?.indexerConfig ?? {};\n this.faucetConfig = settings?.faucetConfig ?? {};\n }\n\n /**\n * Returns the URL endpoint to send the request to.\n * If a custom URL was provided in the config, that URL is returned.\n * If a custom URL was provided but not URL endpoints, an error is thrown.\n * Otherwise, the URL endpoint is derived from the network.\n *\n * @param apiType - The type of Aptos API to get the URL for.\n *\n * @internal\n */\n getRequestUrl(apiType: AptosApiType): string {\n switch (apiType) {\n case AptosApiType.FULLNODE:\n if (this.fullnode !== undefined) return this.fullnode;\n if (this.network === Network.CUSTOM) throw new Error(\"Please provide a custom full node url\");\n return NetworkToNodeAPI[this.network];\n case AptosApiType.FAUCET:\n if (this.faucet !== undefined) return this.faucet;\n if (this.network === Network.CUSTOM) throw new Error(\"Please provide a custom faucet url\");\n return NetworkToFaucetAPI[this.network];\n case AptosApiType.INDEXER:\n if (this.indexer !== undefined) return this.indexer;\n if (this.network === Network.CUSTOM) throw new Error(\"Please provide a custom indexer url\");\n return NetworkToIndexerAPI[this.network];\n case AptosApiType.PEPPER:\n if (this.pepper !== undefined) return this.pepper;\n if (this.network === Network.CUSTOM) throw new Error(\"Please provide a custom pepper service url\");\n return NetworkToPepperAPI[this.network];\n case AptosApiType.PROVER:\n if (this.prover !== undefined) return this.prover;\n if (this.network === Network.CUSTOM) throw new Error(\"Please provide a custom prover service url\");\n return NetworkToProverAPI[this.network];\n default:\n throw Error(`apiType ${apiType} is not supported`);\n }\n }\n\n /**\n * Checks if the URL is a known pepper service endpoint\n *\n * @internal\n * */\n isPepperServiceRequest(url: string): boolean {\n return NetworkToPepperAPI[this.network] === url;\n }\n\n /**\n * Checks if the URL is a known prover service endpoint\n *\n * @internal\n * */\n isProverServiceRequest(url: string): boolean {\n return NetworkToProverAPI[this.network] === url;\n }\n}\n"],"mappings":"qEAGA,OAAOA,MAAiB,2BAmBjB,IAAMC,EAAN,KAAkB,CAwDvB,YAAYC,EAA0B,CACpC,KAAK,QAAUA,GAAU,kBACzB,KAAK,SAAWA,GAAU,SAC1B,KAAK,OAASA,GAAU,OACxB,KAAK,OAASA,GAAU,OACxB,KAAK,OAASA,GAAU,OACxB,KAAK,QAAUA,GAAU,QACzB,KAAK,OAASA,GAAU,QAAU,CAAE,SAAUC,CAAY,EAC1D,KAAK,aAAeD,GAAU,cAAgB,CAAC,EAC/C,KAAK,eAAiBA,GAAU,gBAAkB,CAAC,EACnD,KAAK,cAAgBA,GAAU,eAAiB,CAAC,EACjD,KAAK,aAAeA,GAAU,cAAgB,CAAC,CACjD,CAYA,cAAcE,EAA+B,CAC3C,OAAQA,EAAS,CACf,eACE,GAAI,KAAK,WAAa,OAAW,OAAO,KAAK,SAC7C,GAAI,KAAK,mBAA4B,MAAM,IAAI,MAAM,uCAAuC,EAC5F,OAAOC,EAAiB,KAAK,OAAO,EACtC,aACE,GAAI,KAAK,SAAW,OAAW,OAAO,KAAK,OAC3C,GAAI,KAAK,mBAA4B,MAAM,IAAI,MAAM,oCAAoC,EACzF,OAAOC,EAAmB,KAAK,OAAO,EACxC,cACE,GAAI,KAAK,UAAY,OAAW,OAAO,KAAK,QAC5C,GAAI,KAAK,mBAA4B,MAAM,IAAI,MAAM,qCAAqC,EAC1F,OAAOC,EAAoB,KAAK,OAAO,EACzC,aACE,GAAI,KAAK,SAAW,OAAW,OAAO,KAAK,OAC3C,GAAI,KAAK,mBAA4B,MAAM,IAAI,MAAM,4CAA4C,EACjG,OAAOC,EAAmB,KAAK,OAAO,EACxC,aACE,GAAI,KAAK,SAAW,OAAW,OAAO,KAAK,OAC3C,GAAI,KAAK,mBAA4B,MAAM,IAAI,MAAM,4CAA4C,EACjG,OAAOC,EAAmB,KAAK,OAAO,EACxC,QACE,MAAM,MAAM,WAAWL,CAAO,mBAAmB,CACrD,CACF,CAOA,uBAAuBM,EAAsB,CAC3C,OAAOF,EAAmB,KAAK,OAAO,IAAME,CAC9C,CAOA,uBAAuBA,EAAsB,CAC3C,OAAOD,EAAmB,KAAK,OAAO,IAAMC,CAC9C,CACF","names":["aptosClient","AptosConfig","settings","aptosClient","apiType","NetworkToNodeAPI","NetworkToFaucetAPI","NetworkToIndexerAPI","NetworkToPepperAPI","NetworkToProverAPI","url"]}
|