@aptos-labs/ts-sdk 1.14.0-zeta.6 → 1.14.0-zeta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/index.d.ts +15 -3
- package/dist/common/index.js +25 -25
- package/dist/common/index.js.map +1 -1
- package/dist/esm/account/Account.mjs +1 -1
- package/dist/esm/account/Ed25519Account.mjs +1 -1
- package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
- package/dist/esm/account/KeylessAccount.d.mts +11 -3
- package/dist/esm/account/KeylessAccount.mjs +1 -1
- package/dist/esm/account/MultiKeyAccount.mjs +1 -1
- package/dist/esm/account/SingleKeyAccount.mjs +1 -1
- package/dist/esm/account/index.d.mts +2 -1
- package/dist/esm/account/index.mjs +1 -1
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +1 -0
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/aptosConfig.mjs +1 -1
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/event.mjs +1 -1
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +1 -0
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/keyless.d.mts +1 -0
- package/dist/esm/api/keyless.mjs +1 -1
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/cryptoHasher.d.mts +15 -0
- package/dist/esm/bcs/cryptoHasher.mjs +2 -0
- package/dist/esm/bcs/cryptoHasher.mjs.map +1 -0
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/{chunk-KL3HNMT5.mjs → chunk-2UGYQCPV.mjs} +2 -2
- package/dist/esm/{chunk-3S3GIUQY.mjs → chunk-2VJKN67Y.mjs} +2 -2
- package/dist/esm/{chunk-3CUVYW32.mjs → chunk-37BUI3TW.mjs} +2 -2
- package/dist/esm/{chunk-HXQADNOJ.mjs → chunk-47TJ5KHD.mjs} +2 -2
- package/dist/esm/{chunk-2OMAM2OW.mjs → chunk-4GMDXDLT.mjs} +2 -2
- package/dist/esm/{chunk-HHVAU5HU.mjs → chunk-54U22YPJ.mjs} +2 -2
- package/dist/esm/{chunk-XXBIY3E4.mjs → chunk-5EIBVKRN.mjs} +2 -2
- package/dist/esm/chunk-5YI2GEG5.mjs +2 -0
- package/dist/esm/chunk-5YI2GEG5.mjs.map +1 -0
- package/dist/esm/{chunk-VDTM2LUI.mjs → chunk-6AB7OAN2.mjs} +2 -2
- package/dist/esm/{chunk-TGXWKN2U.mjs → chunk-6AL2JZW5.mjs} +2 -2
- package/dist/esm/{chunk-MTL6MT2Z.mjs → chunk-72FVDESD.mjs} +2 -2
- package/dist/esm/{chunk-2DIO35OD.mjs → chunk-7FGQTVUK.mjs} +2 -2
- package/dist/esm/{chunk-TICM455H.mjs → chunk-7H3HRFVM.mjs} +2 -2
- package/dist/esm/{chunk-KDXECPCS.mjs → chunk-7JJJAYSG.mjs} +2 -2
- package/dist/esm/{chunk-PGCBIU33.mjs → chunk-ABLLZAVR.mjs} +2 -2
- package/dist/esm/{chunk-65QG6O26.mjs → chunk-AYD7KIVE.mjs} +2 -2
- package/dist/esm/{chunk-ARV2BH5D.mjs → chunk-BI5CFPF4.mjs} +2 -2
- package/dist/esm/{chunk-YV7OBLK2.mjs → chunk-BUBB2DYK.mjs} +2 -2
- package/dist/esm/{chunk-QEZJZOEX.mjs → chunk-CC4BOUIE.mjs} +2 -2
- package/dist/esm/{chunk-HLN6GUIY.mjs → chunk-CNRBJYBM.mjs} +2 -2
- package/dist/esm/{chunk-4OSXWFTW.mjs → chunk-DHURWEN4.mjs} +2 -2
- package/dist/esm/{chunk-H7NNUC3D.mjs → chunk-ECTOKZKG.mjs} +2 -2
- package/dist/esm/{chunk-TZ2MX7WB.mjs → chunk-EITBGYIX.mjs} +2 -2
- package/dist/esm/{chunk-XTO3FQND.mjs → chunk-GL4NI3HS.mjs} +2 -2
- package/dist/esm/{chunk-XX3J6NRH.mjs → chunk-GXYWMAXZ.mjs} +2 -2
- package/dist/esm/{chunk-RJ4PSGZ4.mjs → chunk-IEZO4PIG.mjs} +2 -2
- package/dist/esm/{chunk-JLWKIYHV.mjs → chunk-IUOPNE62.mjs} +2 -2
- package/dist/esm/{chunk-DYUF5UID.mjs → chunk-JZRM73CF.mjs} +2 -2
- package/dist/esm/{chunk-YUONW2LQ.mjs → chunk-K5ZOVBFV.mjs} +2 -2
- package/dist/esm/{chunk-TNJDICBE.mjs → chunk-KHQHZYQY.mjs} +2 -2
- package/dist/esm/{chunk-EM2TYSMT.mjs → chunk-KP6TYSUT.mjs} +2 -2
- package/dist/esm/chunk-KPZDC5ZE.mjs +2 -0
- package/dist/esm/chunk-KPZDC5ZE.mjs.map +1 -0
- package/dist/esm/{chunk-T5CGXM6S.mjs → chunk-LTXQUNQU.mjs} +2 -2
- package/dist/esm/{chunk-SI7MPP6G.mjs → chunk-M72JTOIP.mjs} +2 -2
- package/dist/esm/{chunk-NNIHTVLA.mjs → chunk-MKUAW7KW.mjs} +2 -2
- package/dist/esm/chunk-NGSZ4XZO.mjs +2 -0
- package/dist/esm/chunk-NGSZ4XZO.mjs.map +1 -0
- package/dist/esm/{chunk-ROAJCETX.mjs → chunk-OHJLP5GD.mjs} +2 -2
- package/dist/esm/{chunk-HYDDIAJ6.mjs → chunk-PKRPABA4.mjs} +2 -2
- package/dist/esm/{chunk-OWIDLQOG.mjs → chunk-QETTUZ2U.mjs} +2 -2
- package/dist/esm/{chunk-VY2DCR3F.mjs → chunk-SDMFOG4O.mjs} +2 -2
- package/dist/esm/{chunk-57VQMRBX.mjs → chunk-SS7WKVGS.mjs} +2 -2
- package/dist/esm/{chunk-FUWIJEE6.mjs → chunk-W23D4Z3O.mjs} +2 -2
- package/dist/esm/{chunk-52ECIIIH.mjs → chunk-W637YAND.mjs} +2 -2
- package/dist/esm/{chunk-LEMNHXB6.mjs → chunk-WDN2MTVR.mjs} +2 -2
- package/dist/esm/{chunk-BVBPBQK5.mjs → chunk-XOZZBQBR.mjs} +2 -2
- package/dist/esm/{chunk-4SSWQOHR.mjs → chunk-XXURUIE6.mjs} +2 -2
- package/dist/esm/{chunk-7WJTKYRG.mjs → chunk-Z2ZR4PTF.mjs} +2 -2
- package/dist/esm/{chunk-25H3DXTL.mjs → chunk-ZYU2WJ6J.mjs} +2 -2
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/ephemeral.mjs +1 -1
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/keyless.mjs +1 -1
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/proof.mjs +1 -1
- package/dist/esm/core/crypto/publicKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/index.d.mts +3 -2
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/event.mjs +1 -1
- package/dist/esm/internal/faucet.mjs +1 -1
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/keyless.d.mts +1 -0
- package/dist/esm/internal/keyless.mjs +1 -1
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/internal/view.mjs +1 -1
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.mjs +1 -1
- package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
- package/dist/esm/transactions/index.d.mts +2 -1
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/instances/index.mjs +1 -1
- package/dist/esm/transactions/instances/moduleId.mjs +1 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.d.mts +2 -1
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +6 -5
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
- package/dist/esm/transactions/typeTag/index.mjs +1 -1
- package/dist/esm/transactions/typeTag/parser.mjs +1 -1
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/utils/normalizeBundle.mjs +1 -1
- package/package.json +1 -1
- package/src/account/KeylessAccount.ts +7 -3
- package/src/bcs/cryptoHasher.ts +6 -0
- package/src/transactions/transactionBuilder/signingMessage.ts +4 -4
- package/dist/esm/chunk-2LCP7PAJ.mjs +0 -2
- package/dist/esm/chunk-2LCP7PAJ.mjs.map +0 -1
- package/dist/esm/chunk-56NB52W6.mjs +0 -2
- package/dist/esm/chunk-56NB52W6.mjs.map +0 -1
- /package/dist/esm/{chunk-KL3HNMT5.mjs.map → chunk-2UGYQCPV.mjs.map} +0 -0
- /package/dist/esm/{chunk-3S3GIUQY.mjs.map → chunk-2VJKN67Y.mjs.map} +0 -0
- /package/dist/esm/{chunk-3CUVYW32.mjs.map → chunk-37BUI3TW.mjs.map} +0 -0
- /package/dist/esm/{chunk-HXQADNOJ.mjs.map → chunk-47TJ5KHD.mjs.map} +0 -0
- /package/dist/esm/{chunk-2OMAM2OW.mjs.map → chunk-4GMDXDLT.mjs.map} +0 -0
- /package/dist/esm/{chunk-HHVAU5HU.mjs.map → chunk-54U22YPJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-XXBIY3E4.mjs.map → chunk-5EIBVKRN.mjs.map} +0 -0
- /package/dist/esm/{chunk-VDTM2LUI.mjs.map → chunk-6AB7OAN2.mjs.map} +0 -0
- /package/dist/esm/{chunk-TGXWKN2U.mjs.map → chunk-6AL2JZW5.mjs.map} +0 -0
- /package/dist/esm/{chunk-MTL6MT2Z.mjs.map → chunk-72FVDESD.mjs.map} +0 -0
- /package/dist/esm/{chunk-2DIO35OD.mjs.map → chunk-7FGQTVUK.mjs.map} +0 -0
- /package/dist/esm/{chunk-TICM455H.mjs.map → chunk-7H3HRFVM.mjs.map} +0 -0
- /package/dist/esm/{chunk-KDXECPCS.mjs.map → chunk-7JJJAYSG.mjs.map} +0 -0
- /package/dist/esm/{chunk-PGCBIU33.mjs.map → chunk-ABLLZAVR.mjs.map} +0 -0
- /package/dist/esm/{chunk-65QG6O26.mjs.map → chunk-AYD7KIVE.mjs.map} +0 -0
- /package/dist/esm/{chunk-ARV2BH5D.mjs.map → chunk-BI5CFPF4.mjs.map} +0 -0
- /package/dist/esm/{chunk-YV7OBLK2.mjs.map → chunk-BUBB2DYK.mjs.map} +0 -0
- /package/dist/esm/{chunk-QEZJZOEX.mjs.map → chunk-CC4BOUIE.mjs.map} +0 -0
- /package/dist/esm/{chunk-HLN6GUIY.mjs.map → chunk-CNRBJYBM.mjs.map} +0 -0
- /package/dist/esm/{chunk-4OSXWFTW.mjs.map → chunk-DHURWEN4.mjs.map} +0 -0
- /package/dist/esm/{chunk-H7NNUC3D.mjs.map → chunk-ECTOKZKG.mjs.map} +0 -0
- /package/dist/esm/{chunk-TZ2MX7WB.mjs.map → chunk-EITBGYIX.mjs.map} +0 -0
- /package/dist/esm/{chunk-XTO3FQND.mjs.map → chunk-GL4NI3HS.mjs.map} +0 -0
- /package/dist/esm/{chunk-XX3J6NRH.mjs.map → chunk-GXYWMAXZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-RJ4PSGZ4.mjs.map → chunk-IEZO4PIG.mjs.map} +0 -0
- /package/dist/esm/{chunk-JLWKIYHV.mjs.map → chunk-IUOPNE62.mjs.map} +0 -0
- /package/dist/esm/{chunk-DYUF5UID.mjs.map → chunk-JZRM73CF.mjs.map} +0 -0
- /package/dist/esm/{chunk-YUONW2LQ.mjs.map → chunk-K5ZOVBFV.mjs.map} +0 -0
- /package/dist/esm/{chunk-TNJDICBE.mjs.map → chunk-KHQHZYQY.mjs.map} +0 -0
- /package/dist/esm/{chunk-EM2TYSMT.mjs.map → chunk-KP6TYSUT.mjs.map} +0 -0
- /package/dist/esm/{chunk-T5CGXM6S.mjs.map → chunk-LTXQUNQU.mjs.map} +0 -0
- /package/dist/esm/{chunk-SI7MPP6G.mjs.map → chunk-M72JTOIP.mjs.map} +0 -0
- /package/dist/esm/{chunk-NNIHTVLA.mjs.map → chunk-MKUAW7KW.mjs.map} +0 -0
- /package/dist/esm/{chunk-ROAJCETX.mjs.map → chunk-OHJLP5GD.mjs.map} +0 -0
- /package/dist/esm/{chunk-HYDDIAJ6.mjs.map → chunk-PKRPABA4.mjs.map} +0 -0
- /package/dist/esm/{chunk-OWIDLQOG.mjs.map → chunk-QETTUZ2U.mjs.map} +0 -0
- /package/dist/esm/{chunk-VY2DCR3F.mjs.map → chunk-SDMFOG4O.mjs.map} +0 -0
- /package/dist/esm/{chunk-57VQMRBX.mjs.map → chunk-SS7WKVGS.mjs.map} +0 -0
- /package/dist/esm/{chunk-FUWIJEE6.mjs.map → chunk-W23D4Z3O.mjs.map} +0 -0
- /package/dist/esm/{chunk-52ECIIIH.mjs.map → chunk-W637YAND.mjs.map} +0 -0
- /package/dist/esm/{chunk-LEMNHXB6.mjs.map → chunk-WDN2MTVR.mjs.map} +0 -0
- /package/dist/esm/{chunk-BVBPBQK5.mjs.map → chunk-XOZZBQBR.mjs.map} +0 -0
- /package/dist/esm/{chunk-4SSWQOHR.mjs.map → chunk-XXURUIE6.mjs.map} +0 -0
- /package/dist/esm/{chunk-7WJTKYRG.mjs.map → chunk-Z2ZR4PTF.mjs.map} +0 -0
- /package/dist/esm/{chunk-25H3DXTL.mjs.map → chunk-ZYU2WJ6J.mjs.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-ECTOKZKG.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-WDN2MTVR.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-JZRM73CF.mjs";import"../../chunk-SS7WKVGS.mjs";import"../../chunk-PFFAQZHT.mjs";import"../../chunk-7H3HRFVM.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-K5ZOVBFV.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-KHQHZYQY.mjs";import"../../chunk-7FGQTVUK.mjs";import"../../chunk-DHURWEN4.mjs";import"../../chunk-BI5CFPF4.mjs";import"../../chunk-NGSZ4XZO.mjs";import"../../chunk-5YI2GEG5.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-W637YAND.mjs";import"../../chunk-NC5HHEEM.mjs";import"../../chunk-7JJJAYSG.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-2VJKN67Y.mjs";import"../../chunk-PKRPABA4.mjs";import"../../chunk-MWUJCP27.mjs";import"../../chunk-MGOHPDX4.mjs";import"../../chunk-AYD7KIVE.mjs";import"../../chunk-KPZDC5ZE.mjs";import"../../chunk-CK272GUS.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-YQF2NZNF.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-54U22YPJ.mjs";import"../../chunk-IUOPNE62.mjs";import"../../chunk-BUBB2DYK.mjs";import"../../chunk-37BUI3TW.mjs";import"../../chunk-ABLLZAVR.mjs";import"../../chunk-FLYEALDB.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-N466X3S6.mjs";import"../../chunk-ZYU2WJ6J.mjs";import"../../chunk-M72JTOIP.mjs";import"../../chunk-STYDBDYL.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-COW5IGYC.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-7STYQ5ZE.mjs";import"../../chunk-T23OVRNF.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-KYZCH7IK.mjs";import"../../chunk-5JGWZSNG.mjs";import"../../chunk-WOPMZAWX.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-UTXJOB3O.mjs";import"../../chunk-RKHPXZM6.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-C3L4ETUF.mjs";import"../../chunk-3FVRXELT.mjs";import"../../chunk-EB7AI4B4.mjs";import"../../chunk-6RBUXB5I.mjs";import"../../chunk-JM2B5E2I.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-VT6XJSRO.mjs";import"../../chunk-TVRJ3M7B.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-CPBGL37X.mjs";import"../../chunk-YE5B2S5L.mjs";import"../../chunk-JM544NRW.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-XOZZBQBR.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-WDN2MTVR.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-JZRM73CF.mjs";import"../../chunk-SS7WKVGS.mjs";import"../../chunk-PFFAQZHT.mjs";import"../../chunk-7H3HRFVM.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-K5ZOVBFV.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-KHQHZYQY.mjs";import"../../chunk-7FGQTVUK.mjs";import"../../chunk-DHURWEN4.mjs";import"../../chunk-BI5CFPF4.mjs";import"../../chunk-NGSZ4XZO.mjs";import"../../chunk-5YI2GEG5.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-W637YAND.mjs";import"../../chunk-NC5HHEEM.mjs";import"../../chunk-7JJJAYSG.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-2VJKN67Y.mjs";import"../../chunk-PKRPABA4.mjs";import"../../chunk-MWUJCP27.mjs";import"../../chunk-MGOHPDX4.mjs";import"../../chunk-AYD7KIVE.mjs";import"../../chunk-KPZDC5ZE.mjs";import"../../chunk-CK272GUS.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-YQF2NZNF.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-54U22YPJ.mjs";import"../../chunk-IUOPNE62.mjs";import"../../chunk-BUBB2DYK.mjs";import"../../chunk-37BUI3TW.mjs";import"../../chunk-ABLLZAVR.mjs";import"../../chunk-FLYEALDB.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-N466X3S6.mjs";import"../../chunk-ZYU2WJ6J.mjs";import"../../chunk-M72JTOIP.mjs";import"../../chunk-STYDBDYL.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-COW5IGYC.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-7STYQ5ZE.mjs";import"../../chunk-T23OVRNF.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-KYZCH7IK.mjs";import"../../chunk-5JGWZSNG.mjs";import"../../chunk-WOPMZAWX.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-UTXJOB3O.mjs";import"../../chunk-RKHPXZM6.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-C3L4ETUF.mjs";import"../../chunk-3FVRXELT.mjs";import"../../chunk-EB7AI4B4.mjs";import"../../chunk-6RBUXB5I.mjs";import"../../chunk-JM2B5E2I.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-VT6XJSRO.mjs";import"../../chunk-TVRJ3M7B.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-CPBGL37X.mjs";import"../../chunk-YE5B2S5L.mjs";import"../../chunk-JM544NRW.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-NX6YYFXD.mjs";import"../chunk-CK272GUS.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-YQF2NZNF.mjs";import"../chunk-S4SEFF4K.mjs";import"../chunk-3JPVQHOR.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-KYZCH7IK.mjs";import"../chunk-5JGWZSNG.mjs";import"../chunk-WOPMZAWX.mjs";import"../chunk-GED6IT3S.mjs";import"../chunk-UTXJOB3O.mjs";import"../chunk-RKHPXZM6.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-
|
|
1
|
+
import{a}from"../chunk-NX6YYFXD.mjs";import"../chunk-CK272GUS.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-YQF2NZNF.mjs";import"../chunk-S4SEFF4K.mjs";import"../chunk-3JPVQHOR.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-KYZCH7IK.mjs";import"../chunk-5JGWZSNG.mjs";import"../chunk-WOPMZAWX.mjs";import"../chunk-GED6IT3S.mjs";import"../chunk-UTXJOB3O.mjs";import"../chunk-RKHPXZM6.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-C3L4ETUF.mjs";import"../chunk-3FVRXELT.mjs";import"../chunk-EB7AI4B4.mjs";import"../chunk-6RBUXB5I.mjs";import"../chunk-JM2B5E2I.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-VT6XJSRO.mjs";import"../chunk-TVRJ3M7B.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-CPBGL37X.mjs";import"../chunk-YE5B2S5L.mjs";import"../chunk-JM544NRW.mjs";import"../chunk-FVA2OPG4.mjs";export{a as waitForIndexerOnVersion};
|
|
2
2
|
//# sourceMappingURL=utils.mjs.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Serializable } from './serializer.mjs';
|
|
2
|
+
import '../core/hex.mjs';
|
|
3
|
+
import '../core/common.mjs';
|
|
4
|
+
import '../types/index.mjs';
|
|
5
|
+
import '../utils/apiEndpoints.mjs';
|
|
6
|
+
import '../types/indexer.mjs';
|
|
7
|
+
import '../types/generated/operations.mjs';
|
|
8
|
+
import '../types/generated/types.mjs';
|
|
9
|
+
|
|
10
|
+
type AptsoDomainSeparator = `APTOS::${string}`;
|
|
11
|
+
declare abstract class CryptoHashable extends Serializable {
|
|
12
|
+
abstract readonly domainSeparator: AptsoDomainSeparator;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { type AptsoDomainSeparator, CryptoHashable };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
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-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
|
|
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"../chunk-JM2B5E2I.mjs";import"../chunk-4WPQQPUF.mjs";import{a}from"../chunk-VT6XJSRO.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{c as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{c as r}from"./chunk-JZRM73CF.mjs";import{b as i}from"./chunk-KYZCH7IK.mjs";import{b as t}from"./chunk-TVRJ3M7B.mjs";async function v(a){let{aptosConfig:o,payload:n,options:s}=a,p=await r({...n,aptosConfig:o}),e=new t;p.serialize(e);let l=e.toUint8Array(),{data:d}=await i({aptosConfig:o,path:"view",originMethod:"view",contentType:"application/x.aptos.view_function+bcs",params:{ledger_version:s?.ledgerVersion},body:l});return d}export{v as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2UGYQCPV.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-PKRPABA4.mjs";import{a as g,b as _}from"./chunk-54U22YPJ.mjs";import{a as p,c as b}from"./chunk-M72JTOIP.mjs";import{b as o}from"./chunk-T23OVRNF.mjs";import{a as h}from"./chunk-TVRJ3M7B.mjs";var c=class extends h{static deserialize(t){let e=t.deserializeUleb128AsU32();switch(e){case 0:return d.load(t);case 1:return u.load(t);case 2:return l.load(t);case 3:return A.load(t);case 4:return y.load(t);default:throw new Error(`Unknown variant index for TransactionAuthenticator: ${e}`)}}},d=class i extends c{constructor(e,r){super();this.public_key=e,this.signature=r}serialize(e){e.serializeU32AsUleb128(0),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let r=p.deserialize(e),s=b.deserialize(e);return new i(r,s)}},u=class i extends c{constructor(e,r){super();this.public_key=e,this.signature=r}serialize(e){e.serializeU32AsUleb128(1),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let r=g.deserialize(e),s=_.deserialize(e);return new i(r,s)}},l=class i extends c{constructor(e,r,s){super();this.sender=e,this.secondary_signer_addresses=r,this.secondary_signers=s}serialize(e){e.serializeU32AsUleb128(2),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers)}static load(e){let r=n.deserialize(e),s=e.deserializeVector(o),a=e.deserializeVector(n);return new i(r,s,a)}},A=class i extends c{constructor(e,r,s,a){super();this.sender=e,this.secondary_signer_addresses=r,this.secondary_signers=s,this.fee_payer=a}serialize(e){e.serializeU32AsUleb128(3),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers),this.fee_payer.address.serialize(e),this.fee_payer.authenticator.serialize(e)}static load(e){let r=n.deserialize(e),s=e.deserializeVector(o),a=e.deserializeVector(n),z=o.deserialize(e),S=n.deserialize(e),E={address:z,authenticator:S};return new i(r,s,a,E)}},y=class i extends c{constructor(e){super();this.sender=e}serialize(e){e.serializeU32AsUleb128(4),this.sender.serialize(e)}static load(e){let r=n.deserialize(e);return new i(r)}};export{c as a,d as b,u as c,l as d,A as e,y as f};
|
|
2
|
+
//# sourceMappingURL=chunk-2VJKN67Y.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as v}from"./chunk-STYDBDYL.mjs";import{a as u}from"./chunk-TJDC5PWD.mjs";import{a as d}from"./chunk-COW5IGYC.mjs";import{e as h,j as f}from"./chunk-LR65XHSF.mjs";import{a as g}from"./chunk-TVRJ3M7B.mjs";import{b as s}from"./chunk-AOCNYMMX.mjs";import{sha3_256 as A}from"@noble/hashes/sha3";import{secp256k1 as o}from"@noble/curves/secp256k1";import{HDKey as U}from"@scure/bip32";var n=class n extends d{constructor(e){super();let r=s.fromHexInput(e);if(r.toUint8Array().length!==n.LENGTH)throw new Error(`PublicKey length should be ${n.LENGTH}`);this.key=r}verifySignature(e){let{message:r,signature:i}=e;if(!(i instanceof y))return!1;let l=u(r),c=s.fromHexInput(l).toUint8Array(),x=A(c),S=i.toUint8Array();return o.verify(S,x,this.key.toUint8Array(),{lowS:!0})}toUint8Array(){return this.key.toUint8Array()}serialize(e){e.serializeBytes(this.key.toUint8Array())}static deserialize(e){let r=e.deserializeBytes();return new n(r)}static isPublicKey(e){return e instanceof n}};n.LENGTH=65;var m=n,t=class t extends g{constructor(e){super();let r=s.fromHexInput(e);if(r.toUint8Array().length!==t.LENGTH)throw new Error(`PrivateKey length should be ${t.LENGTH}`);this.key=r}static generate(){let e=o.utils.randomPrivateKey();return new t(e)}static fromDerivationPath(e,r){if(!h(e))throw new Error(`Invalid derivation path ${e}`);return t.fromDerivationPathInner(e,f(r))}static fromDerivationPathInner(e,r){let{privateKey:i}=U.fromMasterSeed(r).derive(e);if(i===null)throw new Error("Invalid key");return new t(i)}sign(e){let r=u(e),i=s.fromHexInput(r),l=A(i.toUint8Array()),c=o.sign(l,this.key.toUint8Array(),{lowS:!0});return new y(c.toCompactRawBytes())}publicKey(){let e=o.getPublicKey(this.key.toUint8Array(),!1);return new m(e)}toUint8Array(){return this.key.toUint8Array()}toString(){return this.key.toString()}serialize(e){e.serializeBytes(this.toUint8Array())}static deserialize(e){let r=e.deserializeBytes();return new t(r)}static isPrivateKey(e){return e instanceof t}};t.LENGTH=32;var H=t,a=class a extends v{constructor(e){super();let r=s.fromHexInput(e);if(r.toUint8Array().length!==a.LENGTH)throw new Error(`Signature length should be ${a.LENGTH}, received ${r.toUint8Array().length}`);this.data=r}toUint8Array(){return this.data.toUint8Array()}serialize(e){e.serializeBytes(this.data.toUint8Array())}static deserialize(e){let r=e.deserializeBytes();return new a(r)}};a.LENGTH=64;var y=a;export{m as a,H as b,y as c};
|
|
2
|
+
//# sourceMappingURL=chunk-37BUI3TW.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{c as a}from"./chunk-GL4NI3HS.mjs";import e from"eventemitter3";var i=class extends e{constructor(t){super();this.config=t}start(t){let{sender:n}=t;this.account=n,this.transactionWorker=new a(this.config,n),this.transactionWorker.start(),this.registerToEvents()}push(t){let{data:n,options:o}=t;for(let r of n)this.transactionWorker.push(r,o)}registerToEvents(){this.transactionWorker.on("transactionSent",async t=>{this.emit("transactionSent",t)}),this.transactionWorker.on("transactionSendFailed",async t=>{this.emit("transactionSendFailed",t)}),this.transactionWorker.on("transactionExecuted",async t=>{this.emit("transactionExecuted",t)}),this.transactionWorker.on("transactionExecutionFailed",async t=>{this.emit("transactionExecutionFailed",t)}),this.transactionWorker.on("executionFinish",async t=>{this.emit("executionFinish",t)})}forSingleAccount(t){try{let{sender:n,data:o,options:r}=t;this.start({sender:n}),this.push({data:o,options:r})}catch(n){throw new Error(`failed to submit transactions with error: ${n}`)}}};export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-47TJ5KHD.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r,c as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r,c as o}from"./chunk-LTXQUNQU.mjs";var t=class{constructor(e){this.config=e}async getPepper(e){return r({aptosConfig:this.config,...e})}async deriveKeylessAccount(e){return o({aptosConfig:this.config,...e})}};export{t as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4GMDXDLT.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as h,c as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as h,c as l}from"./chunk-M72JTOIP.mjs";import{a as p}from"./chunk-STYDBDYL.mjs";import{b as E}from"./chunk-COW5IGYC.mjs";import{a as g}from"./chunk-7STYQ5ZE.mjs";var o=class o extends E{constructor(r){super();let{publicKeys:e,threshold:t}=r;if(e.length>o.MAX_KEYS||e.length<o.MIN_KEYS)throw new Error(`Must have between ${o.MIN_KEYS} and ${o.MAX_KEYS} public keys, inclusive`);if(t<o.MIN_THRESHOLD||t>e.length)throw new Error(`Threshold must be between ${o.MIN_THRESHOLD} and ${e.length}, inclusive`);this.publicKeys=e,this.threshold=t}verifySignature(r){let{message:e,signature:t}=r;if(!(t instanceof y))return!1;let s=[];for(let i=0;i<4;i+=1)for(let n=0;n<8;n+=1)if((t.bitmap[i]&1<<7-n)!==0){let u=i*8+n;s.push(u)}if(s.length!==t.signatures.length)throw new Error("Bitmap and signatures length mismatch");if(s.length<this.threshold)throw new Error("Not enough signatures");for(let i=0;i<s.length;i+=1)if(!this.publicKeys[s[i]].verifySignature({message:e,signature:t.signatures[i]}))return!1;return!0}authKey(){return g.fromSchemeAndBytes({scheme:1,input:this.toUint8Array()})}toUint8Array(){let r=new Uint8Array(this.publicKeys.length*h.LENGTH+1);return this.publicKeys.forEach((e,t)=>{r.set(e.toUint8Array(),t*h.LENGTH)}),r[this.publicKeys.length*h.LENGTH]=this.threshold,r}serialize(r){r.serializeBytes(this.toUint8Array())}static deserialize(r){let e=r.deserializeBytes(),t=e[e.length-1],s=[];for(let i=0;i<e.length-1;i+=h.LENGTH){let n=i;s.push(new h(e.subarray(n,n+h.LENGTH)))}return new o({publicKeys:s,threshold:t})}};o.MAX_KEYS=32,o.MIN_KEYS=2,o.MIN_THRESHOLD=1;var d=o,a=class a extends p{constructor(r){super();let{signatures:e,bitmap:t}=r;if(e.length>a.MAX_SIGNATURES_SUPPORTED)throw new Error(`The number of signatures cannot be greater than ${a.MAX_SIGNATURES_SUPPORTED}`);if(this.signatures=e,!(t instanceof Uint8Array))this.bitmap=a.createBitmap({bits:t});else{if(t.length!==a.BITMAP_LEN)throw new Error(`"bitmap" length should be ${a.BITMAP_LEN}`);this.bitmap=t}}toUint8Array(){let r=new Uint8Array(this.signatures.length*l.LENGTH+a.BITMAP_LEN);return this.signatures.forEach((e,t)=>{r.set(e.toUint8Array(),t*l.LENGTH)}),r.set(this.bitmap,this.signatures.length*l.LENGTH),r}serialize(r){r.serializeBytes(this.toUint8Array())}static deserialize(r){let e=r.deserializeBytes(),t=e.subarray(e.length-4),s=[];for(let i=0;i<e.length-t.length;i+=l.LENGTH){let n=i;s.push(new l(e.subarray(n,n+l.LENGTH)))}return new a({signatures:s,bitmap:t})}static createBitmap(r){let{bits:e}=r,t=128,s=new Uint8Array([0,0,0,0]),i=new Set;return e.forEach((n,c)=>{if(n>=a.MAX_SIGNATURES_SUPPORTED)throw new Error(`Cannot have a signature larger than ${a.MAX_SIGNATURES_SUPPORTED-1}.`);if(i.has(n))throw new Error("Duplicate bits detected.");if(c>0&&n<=e[c-1])throw new Error("The bits need to be sorted in ascending order.");i.add(n);let u=Math.floor(n/8),b=s[u];b|=t>>n%8,s[u]=b}),s}};a.MAX_SIGNATURES_SUPPORTED=32,a.BITMAP_LEN=4;var y=a;export{d as a,y as b};
|
|
2
|
+
//# sourceMappingURL=chunk-54U22YPJ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n,b as s,c as r,d as i,e as o,f as a,g as c,h as p,i as d,j as g,k as u,l as A,m as y,n as l,o as m,p as T,q as f,r as I,s as C,t as O,u as P,v as D}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n,b as s,c as r,d as i,e as o,f as a,g as c,h as p,i as d,j as g,k as u,l as A,m as y,n as l,o as m,p as T,q as f,r as I,s as C,t as O,u as P,v as D}from"./chunk-EITBGYIX.mjs";import{a as e}from"./chunk-NX6YYFXD.mjs";var V=class{constructor(t){this.config=t}async getCollectionData(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),a({aptosConfig:this.config,...t})}async getCollectionDataByCollectionId(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),c({aptosConfig:this.config,...t})}async getCollectionId(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),p({aptosConfig:this.config,...t})}async getDigitalAssetData(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),n({aptosConfig:this.config,...t})}async getCurrentDigitalAssetOwnership(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),s({aptosConfig:this.config,...t})}async getOwnedDigitalAssets(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),r({aptosConfig:this.config,...t})}async getDigitalAssetActivity(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),i({aptosConfig:this.config,...t})}async createCollectionTransaction(t){return o({aptosConfig:this.config,...t})}async mintDigitalAssetTransaction(t){return d({aptosConfig:this.config,...t})}async transferDigitalAssetTransaction(t){return g({aptosConfig:this.config,...t})}async mintSoulBoundTransaction(t){return u({aptosConfig:this.config,...t})}async burnDigitalAssetTransaction(t){return A({aptosConfig:this.config,...t})}async freezeDigitalAssetTransaferTransaction(t){return y({aptosConfig:this.config,...t})}async unfreezeDigitalAssetTransaferTransaction(t){return l({aptosConfig:this.config,...t})}async setDigitalAssetDescriptionTransaction(t){return m({aptosConfig:this.config,...t})}async setDigitalAssetNameTransaction(t){return T({aptosConfig:this.config,...t})}async setDigitalAssetURITransaction(t){return f({aptosConfig:this.config,...t})}async addDigitalAssetPropertyTransaction(t){return I({aptosConfig:this.config,...t})}async removeDigitalAssetPropertyTransaction(t){return C({aptosConfig:this.config,...t})}async updateDigitalAssetPropertyTransaction(t){return O({aptosConfig:this.config,...t})}async addDigitalAssetTypedPropertyTransaction(t){return P({aptosConfig:this.config,...t})}async updateDigitalAssetTypedPropertyTransaction(t){return D({aptosConfig:this.config,...t})}};export{V as a};
|
|
2
|
+
//# sourceMappingURL=chunk-5EIBVKRN.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c as y,d as T}from"./chunk-Z2ZR4PTF.mjs";import{f as A,g as a}from"./chunk-YE5B2S5L.mjs";import{sha3_256 as d}from"@noble/hashes/sha3";function c(e){return e.feePayerAddress?new T(e.rawTransaction,e.secondarySignerAddresses??[],e.feePayerAddress):e.secondarySignerAddresses?new y(e.rawTransaction,e.secondarySignerAddresses):e.rawTransaction}function n(e,r){let o=d.create();if(!r.startsWith("APTOS::"))throw new Error(`Domain separator needs to start with 'APTOS::'. Provided - ${r}`);o.update(r);let s=o.digest(),i=e,t=new Uint8Array(s.length+i.length);return t.set(s),t.set(i,s.length),t}function p(e){return n(e.bcsToBytes(),e.domainSeparator)}function u(e){let r=c(e);return e.feePayerAddress?n(r.bcsToBytes(),a):e.secondarySignerAddresses?n(r.bcsToBytes(),a):n(r.bcsToBytes(),A)}export{c as a,n as b,p as c,u as d};
|
|
2
|
+
//# sourceMappingURL=chunk-5YI2GEG5.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 generation of the signing message.\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 } from \"../instances\";\nimport { AnyRawTransaction, AnyRawTransactionInstance } from \"../types\";\nimport { CryptoHashable } from \"../../bcs/cryptoHasher\";\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\n/**\n * Generates the 'signing message' form of a message to be signed.\n *\n * @param bytes The byte representation of the message to be signed and sent to the chain\n * @param domainSeparator A domain separator that starts with 'APTOS::'\n *\n * @returns The Uint8Array of the signing message\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\n/**\n * Generates the 'signing message' form of a serilizable value. It bcs serializes the value and uses the name of\n * its constructor as the domain separator.\n *\n * @param hashable An object that has a bcs serialized form\n *\n * @returns The Uint8Array of the signing message\n */\nexport function generateSigningMessageForBcsCryptoHashable(hashable: CryptoHashable): Uint8Array {\n return generateSigningMessage(hashable.bcsToBytes(), hashable.domainSeparator);\n}\n\n/**\n * Generates the 'signing message' form of a transaction. It derives the type of transaction and\n * applies the appropriate domain separator based on if there is extra data such as a fee payer or\n * secondary signers.\n *\n * @param transaction A transaction that is to be signed\n *\n * @returns The Uint8Array of the signing message\n */\nexport function generateSigningMessageForTransaction(transaction: AnyRawTransaction): Uint8Array {\n const rawTxn = deriveTransactionType(transaction);\n if (transaction.feePayerAddress) {\n return generateSigningMessage(rawTxn.bcsToBytes(), RAW_TRANSACTION_WITH_DATA_SALT);\n }\n if (transaction.secondarySignerAddresses) {\n return generateSigningMessage(rawTxn.bcsToBytes(), RAW_TRANSACTION_WITH_DATA_SALT);\n }\n return generateSigningMessage(rawTxn.bcsToBytes(), RAW_TRANSACTION_SALT);\n}\n"],"mappings":"gGAMA,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,CAUO,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,CAUO,SAASC,EAA2CC,EAAsC,CAC/F,OAAOT,EAAuBS,EAAS,WAAW,EAAGA,EAAS,eAAe,CAC/E,CAWO,SAASC,EAAqCb,EAA4C,CAC/F,IAAMc,EAASf,EAAsBC,CAAW,EAChD,OAAIA,EAAY,gBACPG,EAAuBW,EAAO,WAAW,EAAGC,CAA8B,EAE/Ef,EAAY,yBACPG,EAAuBW,EAAO,WAAW,EAAGC,CAA8B,EAE5EZ,EAAuBW,EAAO,WAAW,EAAGE,CAAoB,CACzE","names":["sha3Hash","deriveTransactionType","transaction","FeePayerRawTransaction","MultiAgentRawTransaction","generateSigningMessage","bytes","domainSeparator","hash","sha3Hash","prefix","body","mergedArray","generateSigningMessageForBcsCryptoHashable","hashable","generateSigningMessageForTransaction","rawTxn","RAW_TRANSACTION_WITH_DATA_SALT","RAW_TRANSACTION_SALT"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-2UGYQCPV.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-YQF2NZNF.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-6AB7OAN2.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-KP6TYSUT.mjs";var t=class{constructor(n){this.config=n}async transferCoinTransaction(n){return o({aptosConfig:this.config,...n})}};export{t as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6AL2JZW5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-K5ZOVBFV.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-72FVDESD.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-DHURWEN4.mjs";import{a as n}from"./chunk-BI5CFPF4.mjs";import{b as i}from"./chunk-M72JTOIP.mjs";var o=class{static generate(e={}){let{scheme:t=0,legacy:r=!0}=e;return t===0&&r?n.generate():c.generate({scheme:t})}static fromPrivateKey(e){let{privateKey:t,address:r,legacy:a=!0}=e;return t instanceof i&&a?new n({privateKey:t,address:r}):new c({privateKey:t,address:r})}static fromPrivateKeyAndAddress(e){return this.fromPrivateKey(e)}static fromDerivationPath(e){let{scheme:t=0,mnemonic:r,path:a,legacy:s=!0}=e;return t===0&&s?n.fromDerivationPath({mnemonic:r,path:a}):c.fromDerivationPath({scheme:t,mnemonic:r,path:a})}static authKey(e){let{publicKey:t}=e;return t.authKey()}verifySignature(e){return this.publicKey.verifySignature(e)}};export{o as a};
|
|
2
|
+
//# sourceMappingURL=chunk-7FGQTVUK.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as f}from"./chunk-T23OVRNF.mjs";import{a as m,b as a,c as g}from"./chunk-EB7AI4B4.mjs";import{a as i,b as o,c as u,d as s,e as c,f as p,g as y}from"./chunk-6RBUXB5I.mjs";
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as f}from"./chunk-T23OVRNF.mjs";import{a as r}from"./chunk-3FVRXELT.mjs";import{a as m,b as a,c as g}from"./chunk-EB7AI4B4.mjs";import{a as i,b as o,c as u,d as s,e as c,f as p,g as y}from"./chunk-6RBUXB5I.mjs";function M(n){return typeof n=="boolean"}function D(n){return typeof n=="string"}function N(n){return typeof n=="number"}function P(n){return typeof n=="number"||typeof n=="bigint"||typeof n=="string"}function w(n){return n==null}function G(n){return A(n)||x(n)||S(n)||B(n)||U(n)||I(n)||b(n)||T(n)||E(n)||d(n)||n instanceof m||n instanceof g}function A(n){return n instanceof i}function T(n){return n instanceof f}function E(n){return n instanceof a}function d(n){return n instanceof r}function x(n){return n instanceof o}function S(n){return n instanceof u}function B(n){return n instanceof s}function U(n){return n instanceof c}function I(n){return n instanceof p}function b(n){return n instanceof y}function $(n){return"bytecode"in n}function R(n,t){throw new Error(`Type mismatch for argument ${t}, expected '${n}'`)}function W(n){let t=n.params.findIndex(e=>e!=="signer"&&e!=="&signer");return t<0?n.params.length:t}function L(n){let t=n.split("::");if(t.length!==3)throw new Error(`Invalid function ${n}`);let e=t[0],F=t[1],l=t[2];return{moduleAddress:e,moduleName:F,functionName:l}}export{M as a,D as b,N as c,P as d,w as e,G as f,A as g,T as h,E as i,d as j,x as k,S as l,B as m,U as n,I as o,b as p,$ as q,R as r,W as s,L as t};
|
|
2
|
+
//# sourceMappingURL=chunk-7H3HRFVM.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-Z2ZR4PTF.mjs";import{a as e}from"./chunk-2VJKN67Y.mjs";import{a as r}from"./chunk-TVRJ3M7B.mjs";var n=class o extends r{constructor(t,a){super();this.raw_txn=t,this.authenticator=a}serialize(t){this.raw_txn.serialize(t),this.authenticator.serialize(t)}static deserialize(t){let a=i.deserialize(t),s=e.deserialize(t);return new o(a,s)}};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-7JJJAYSG.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as d,c as U,d as H,e as K}from"./chunk-FLYEALDB.mjs";import{a as I}from"./chunk-N466X3S6.mjs";import{a as S,b as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as d,c as U,d as H,e as K}from"./chunk-FLYEALDB.mjs";import{a as I}from"./chunk-N466X3S6.mjs";import{a as S,b as p}from"./chunk-ZYU2WJ6J.mjs";import{a as u}from"./chunk-STYDBDYL.mjs";import{b as E}from"./chunk-COW5IGYC.mjs";import{a as b}from"./chunk-7STYQ5ZE.mjs";import{a as f}from"./chunk-VT6XJSRO.mjs";import{a as z,b as A}from"./chunk-TVRJ3M7B.mjs";import{b as c}from"./chunk-AOCNYMMX.mjs";var B=1e7,D=120,v=30,P=330,R=120,$=350,J=300,q=93,o=class o extends E{constructor(e,t){super();let i=c.fromHexInput(t).toUint8Array();if(i.length!==o.ID_COMMITMENT_LENGTH)throw new Error(`Address seed length in bytes should be ${o.ID_COMMITMENT_LENGTH}`);this.iss=e,this.idCommitment=i}authKey(){let e=new A;return e.serializeU32AsUleb128(3),e.serializeFixedBytes(this.bcsToBytes()),b.fromSchemeAndBytes({scheme:2,input:e.toUint8Array()})}toUint8Array(){return this.bcsToBytes()}toString(){return c.fromHexInput(this.toUint8Array()).toString()}verifySignature(e){throw new Error("Not yet implemented")}serialize(e){e.serializeStr(this.iss),e.serializeBytes(this.idCommitment)}static deserialize(e){let t=e.deserializeStr(),i=e.deserializeBytes();return new o(t,i)}static load(e){let t=e.deserializeStr(),i=e.deserializeBytes();return new o(t,i)}static isPublicKey(e){return e instanceof o}static create(e){return w(e),new o(e.iss,w(e))}};o.ID_COMMITMENT_LENGTH=32;var m=o;function w(s){let{uidKey:l,uidVal:e,aud:t,pepper:i}=s,r=[U(c.fromHexInput(i).toUint8Array()),d(t,D),d(e,P),d(l,v)];return H(K(r),m.ID_COMMITMENT_LENGTH)}var T=class s extends u{constructor(e){super();let{jwtHeader:t,ephemeralCertificate:i,expiryDateSecs:r,ephemeralPublicKey:a,ephemeralSignature:n}=e;this.jwtHeader=t,this.ephemeralCertificate=i,this.expiryDateSecs=r,this.ephemeralPublicKey=a,this.ephemeralSignature=n}toUint8Array(){return this.bcsToBytes()}serialize(e){this.ephemeralCertificate.serialize(e),e.serializeStr(this.jwtHeader),e.serializeU64(this.expiryDateSecs),this.ephemeralPublicKey.serialize(e),this.ephemeralSignature.serialize(e)}static deserialize(e){let t=h.deserialize(e),i=e.deserializeStr(),r=e.deserializeU64(),a=S.deserialize(e),n=p.deserialize(e);return new s({jwtHeader:i,expiryDateSecs:r,ephemeralCertificate:t,ephemeralPublicKey:a,ephemeralSignature:n})}static load(e){let t=h.deserialize(e),i=e.deserializeStr(),r=e.deserializeU64(),a=S.deserialize(e),n=p.deserialize(e);return new s({jwtHeader:i,expiryDateSecs:r,ephemeralCertificate:t,ephemeralPublicKey:a,ephemeralSignature:n})}static isSignature(e){return e instanceof s}},h=class s extends u{constructor(e,t){super();this.signature=e,this.variant=t}toUint8Array(){return this.signature.toUint8Array()}serialize(e){e.serializeU32AsUleb128(this.variant),this.signature.serialize(e)}static deserialize(e){let t=e.deserializeUleb128AsU32();switch(t){case 0:return new s(x.deserialize(e),t);default:throw new Error(`Unknown variant index for EphemeralCertificate: ${t}`)}}},g=class s extends I{constructor(e){super();let{a:t,b:i,c:r}=e;this.a=c.fromHexInput(t).toUint8Array(),this.b=c.fromHexInput(i).toUint8Array(),this.c=c.fromHexInput(r).toUint8Array()}serialize(e){e.serializeFixedBytes(this.a),e.serializeFixedBytes(this.b),e.serializeFixedBytes(this.c)}static deserialize(e){let t=e.deserializeFixedBytes(32),i=e.deserializeFixedBytes(64),r=e.deserializeFixedBytes(32);return new s({a:t,b:i,c:r})}},y=class s extends z{constructor(e,t){super();this.proof=e,this.variant=t}serialize(e){e.serializeU32AsUleb128(this.variant),this.proof.serialize(e)}static deserialize(e){let t=e.deserializeUleb128AsU32();switch(t){case 0:return new s(g.deserialize(e),t);default:throw new Error(`Unknown variant index for ZkProof: ${t}`)}}},x=class s extends u{constructor(e){super();let{proof:t,expHorizonSecs:i=BigInt(B),trainingWheelsSignature:r,extraField:a,overrideAudVal:n}=e;this.proof=t,this.expHorizonSecs=i,this.trainingWheelsSignature=r,this.extraField=a,this.overrideAudVal=n}toUint8Array(){return this.bcsToBytes()}static fromBytes(e){return s.deserialize(new f(e))}serialize(e){this.proof.serialize(e),e.serializeU64(this.expHorizonSecs),e.serializeOptionStr(this.extraField),e.serializeOptionStr(this.overrideAudVal),e.serializeOption(this.trainingWheelsSignature)}static deserialize(e){let t=y.deserialize(e),i=e.deserializeU64(),r=e.deserializeOptionStr(),a=e.deserializeOptionStr(),n=e.deserializeOption(p);return new s({proof:t,expHorizonSecs:i,trainingWheelsSignature:n,extraField:r,overrideAudVal:a})}static load(e){let t=y.deserialize(e),i=e.deserializeU64(),r=e.deserializeOptionStr(),a=e.deserializeOptionStr(),n=e.deserializeOption(p);return new s({proof:t,expHorizonSecs:i,trainingWheelsSignature:n,extraField:r,overrideAudVal:a})}};export{B as a,D as b,v as c,P as d,R as e,$ as f,J as g,q as h,m as i,T as j,h as k,g as l,y as m,x as n};
|
|
2
|
+
//# sourceMappingURL=chunk-ABLLZAVR.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as b}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as b}from"./chunk-ABLLZAVR.mjs";import{b as h,c as d,e as m}from"./chunk-FLYEALDB.mjs";import{a as y,b as u}from"./chunk-ZYU2WJ6J.mjs";import{b as s}from"./chunk-M72JTOIP.mjs";import{a as c}from"./chunk-VT6XJSRO.mjs";import{a as p}from"./chunk-TVRJ3M7B.mjs";import{b as l}from"./chunk-AOCNYMMX.mjs";import{randomBytes as E}from"@noble/hashes/utils";var i=class i extends p{constructor(e){super();let{privateKey:r,expiryDateSecs:n,blinder:a}=e;this.privateKey=r,this.publicKey=new y(r.publicKey()),this.expiryDateSecs=n||BigInt(v(f()+b)),this.blinder=a!==void 0?l.fromHexInput(a).toUint8Array():S(),this.nonce=this.generateNonce()}getPublicKey(){return this.publicKey}isExpired(){return Math.floor(Date.now()/1e3)>this.expiryDateSecs}serialize(e){e.serializeU32AsUleb128(this.publicKey.variant),e.serializeBytes(this.privateKey.toUint8Array()),e.serializeU64(this.expiryDateSecs),e.serializeFixedBytes(this.blinder)}static deserialize(e){let r=e.deserializeUleb128AsU32(),n;switch(r){case 0:n=s.deserialize(e);break;default:throw new Error(`Unknown variant index for EphemeralPublicKey: ${r}`)}let a=e.deserializeU64(),x=e.deserializeFixedBytes(31);return new i({privateKey:n,expiryDateSecs:a,blinder:x})}static fromBytes(e){return i.deserialize(new c(e))}static generate(e){let r;switch(e?.scheme){case 0:default:r=s.generate()}return new i({privateKey:r,expiryDateSecs:e?.expiryDateSecs})}generateNonce(){let e=h(this.publicKey.bcsToBytes(),93);return e.push(BigInt(this.expiryDateSecs)),e.push(d(this.blinder)),m(e).toString()}sign(e){if(this.isExpired())throw new Error("EphemeralKeyPair has expired");return new u(this.privateKey.sign(e))}};i.BLINDER_LENGTH=31;var o=i;function S(){return E(o.BLINDER_LENGTH)}function f(){return Math.floor(new Date().getTime()/1e3)}function v(K){let t=new Date(K*1e3);return t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),Math.floor(t.getTime()/1e3)}export{o as a};
|
|
2
|
+
//# sourceMappingURL=chunk-AYD7KIVE.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as o}from"./chunk-5YI2GEG5.mjs";import{b as i}from"./chunk-PKRPABA4.mjs";import{b as n}from"./chunk-M72JTOIP.mjs";import{b as s}from"./chunk-T23OVRNF.mjs";var c=class a{constructor(t){this.signingScheme=0;let{privateKey:e,address:r}=t;this.privateKey=e,this.publicKey=e.publicKey(),this.accountAddress=r?s.from(r):this.publicKey.authKey().derivedAddress()}static generate(){let t=n.generate();return new a({privateKey:t})}static fromDerivationPath(t){let{path:e,mnemonic:r}=t,u=n.fromDerivationPath(e,r);return new a({privateKey:u})}verifySignature(t){return this.publicKey.verifySignature(t)}signWithAuthenticator(t){return new i(this.publicKey,this.privateKey.sign(t))}signTransactionWithAuthenticator(t){return new i(this.publicKey,this.signTransaction(t))}sign(t){return this.privateKey.sign(t)}signTransaction(t){return this.sign(o(t))}};export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BI5CFPF4.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a,c}from"./chunk-37BUI3TW.mjs";import{i as o,j as l}from"./chunk-ABLLZAVR.mjs";import{a as n,c as s}from"./chunk-M72JTOIP.mjs";import{a as p}from"./chunk-STYDBDYL.mjs";import{b}from"./chunk-COW5IGYC.mjs";import{a as y}from"./chunk-7STYQ5ZE.mjs";var f=class t extends b{constructor(e){super();if(this.publicKey=e,e instanceof n)this.variant=0;else if(e instanceof a)this.variant=1;else if(e instanceof o)this.variant=3;else throw new Error("Unsupported public key type")}verifySignature(e){let{message:r,signature:i}=e;return i instanceof u?this.publicKey.verifySignature({message:r,signature:i.signature}):!1}authKey(){return y.fromSchemeAndBytes({scheme:2,input:this.toUint8Array()})}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeU32AsUleb128(this.variant),this.publicKey.serialize(e)}static deserialize(e){let r=e.deserializeUleb128AsU32(),i;switch(r){case 0:i=n.deserialize(e);break;case 1:i=a.deserialize(e);break;case 3:i=o.deserialize(e);break;default:throw new Error(`Unknown variant index for AnyPublicKey: ${r}`)}return new t(i)}static isPublicKey(e){return e instanceof t}isEd25519(){return this.publicKey instanceof n}isSecp256k1PublicKey(){return this.publicKey instanceof a}},u=class t extends p{constructor(e){super();if(this.signature=e,e instanceof s)this.variant=0;else if(e instanceof c)this.variant=1;else if(e instanceof l)this.variant=3;else throw new Error("Unsupported signature type")}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeU32AsUleb128(this.variant),this.signature.serialize(e)}static deserialize(e){let r=e.deserializeUleb128AsU32(),i;switch(r){case 0:i=s.deserialize(e);break;case 1:i=c.deserialize(e);break;case 3:i=l.deserialize(e);break;default:throw new Error(`Unknown variant index for AnySignature: ${r}`)}return new t(i)}};export{f as a,u as b};
|
|
2
|
+
//# sourceMappingURL=chunk-BUBB2DYK.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i,b as t,c as n,d as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i,b as t,c as n,d as o}from"./chunk-GXYWMAXZ.mjs";import{a as s}from"./chunk-NX6YYFXD.mjs";var r=class{constructor(e){this.config=e}async getFungibleAssetMetadata(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),i({aptosConfig:this.config,...e})}async getFungibleAssetMetadataByAssetType(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),(await i({aptosConfig:this.config,options:{where:{asset_type:{_eq:e.assetType}}}}))[0]}async getFungibleAssetActivities(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),t({aptosConfig:this.config,...e})}async getCurrentFungibleAssetBalances(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),n({aptosConfig:this.config,...e})}async transferFungibleAsset(e){return o({aptosConfig:this.config,...e})}};export{r as a};
|
|
2
|
+
//# sourceMappingURL=chunk-CC4BOUIE.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{f as e,g as s,h as t,i as o,j as r,k as i,l as a,m,n as c,o as g,p as u,q as p,r as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{f as e,g as s,h as t,i as o,j as r,k as i,l as a,m,n as c,o as g,p as u,q as p,r as d}from"./chunk-QETTUZ2U.mjs";var A=class{constructor(n){this.config=n}async getOwnerAddress(n){return e({aptosConfig:this.config,...n})}async getExpiration(n){return t({aptosConfig:this.config,...n})}async getTargetAddress(n){return i({aptosConfig:this.config,...n})}async setTargetAddress(n){return a({aptosConfig:this.config,...n})}async getPrimaryName(n){return o({aptosConfig:this.config,...n})}async setPrimaryName(n){return r({aptosConfig:this.config,...n})}async registerName(n){return s({aptosConfig:this.config,...n})}async renewDomain(n){return d({aptosConfig:this.config,...n})}async getName(n){return m({aptosConfig:this.config,...n})}async getAccountNames(n){return c({aptosConfig:this.config,...n})}async getAccountDomains(n){return g({aptosConfig:this.config,...n})}async getAccountSubdomains(n){return u({aptosConfig:this.config,...n})}async getDomainSubdomains(n){return p({aptosConfig:this.config,...n})}};export{A as a};
|
|
2
|
+
//# sourceMappingURL=chunk-CNRBJYBM.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as p}from"./chunk-5YI2GEG5.mjs";import{d as s}from"./chunk-PKRPABA4.mjs";import{a as u,b as y}from"./chunk-BUBB2DYK.mjs";import{b as a}from"./chunk-37BUI3TW.mjs";import{b as i}from"./chunk-M72JTOIP.mjs";import{b as g}from"./chunk-T23OVRNF.mjs";var h=class c{constructor(e){this.signingScheme=2;let{privateKey:r,address:t}=e;this.privateKey=r,this.publicKey=new u(r.publicKey()),this.accountAddress=t?g.from(t):this.publicKey.authKey().derivedAddress()}static generate(e={}){let{scheme:r=0}=e,t;switch(r){case 0:t=i.generate();break;case 2:t=a.generate();break;default:throw new Error(`Unsupported signature scheme ${r}`)}return new c({privateKey:t})}static fromDerivationPath(e){let{scheme:r=0,path:t,mnemonic:o}=e,n;switch(r){case 0:n=i.fromDerivationPath(t,o);break;case 2:n=a.fromDerivationPath(t,o);break;default:throw new Error(`Unsupported signature scheme ${r}`)}return new c({privateKey:n})}verifySignature(e){return this.publicKey.verifySignature(e)}signWithAuthenticator(e){return new s(this.publicKey,this.sign(e))}signTransactionWithAuthenticator(e){return new s(this.publicKey,this.signTransaction(e))}sign(e){return new y(this.privateKey.sign(e))}signTransaction(e){return this.sign(p(e))}};export{h as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DHURWEN4.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-WDN2MTVR.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-ECTOKZKG.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as d}from"./chunk-WDN2MTVR.mjs";import{f as M}from"./chunk-SS7WKVGS.mjs";import{c as V}from"./chunk-PFFAQZHT.mjs";import{b as w,f as v,i as h,l as A,m as f,n as s,q as p,s as g}from"./chunk-3VGX3TXH.mjs";import{f as b}from"./chunk-YQF2NZNF.mjs";import{n as x,w as E,x as G,y as q}from"./chunk-S4SEFF4K.mjs";import{b as u}from"./chunk-T23OVRNF.mjs";import{a as I,b as c}from"./chunk-EB7AI4B4.mjs";import{a as T,e as S}from"./chunk-6RBUXB5I.mjs";import{d as O}from"./chunk-56CNRT2K.mjs";var C={BOOLEAN:"bool",U8:"u8",U16:"u16",U32:"u32",U64:"u64",U128:"u128",U256:"u256",ADDRESS:"address",STRING:"0x1::string::String",ARRAY:"vector<u8>"},m="0x4::token::Token";async function It(t){let{aptosConfig:o,digitalAssetAddress:n}=t,e={token_data_id:{_eq:u.from(n).toStringLong()}};return(await b({aptosConfig:o,query:{query:q,variables:{where_condition:e}},originMethod:"getDigitalAssetData"})).current_token_datas_v2[0]}async function _t(t){let{aptosConfig:o,digitalAssetAddress:n}=t,e={token_data_id:{_eq:u.from(n).toStringLong()},amount:{_gt:0}};return(await b({aptosConfig:o,query:{query:G,variables:{where_condition:e}},originMethod:"getCurrentDigitalAssetOwnership"})).current_token_ownerships_v2[0]}async function Pt(t){let{aptosConfig:o,ownerAddress:n,options:e}=t,r={owner_address:{_eq:u.from(n).toStringLong()},amount:{_gt:0}},i={query:G,variables:{where_condition:r,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await b({aptosConfig:o,query:i,originMethod:"getOwnedDigitalAssets"})).current_token_ownerships_v2}async function kt(t){let{aptosConfig:o,digitalAssetAddress:n,options:e}=t,r={token_data_id:{_eq:u.from(n).toStringLong()}},i={query:E,variables:{where_condition:r,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await b({aptosConfig:o,query:i,originMethod:"getDigitalAssetActivity"})).token_activities_v2}var Q={typeParameters:[],parameters:[new s(p()),new v,new s(p()),new s(p()),new w,new w,new w,new w,new w,new w,new w,new w,new w,new v,new v]};async function Dt(t){let{aptosConfig:o,options:n,creator:e}=t;return d({aptosConfig:o,sender:e.accountAddress,data:{function:"0x4::aptos_token::create_collection",functionArguments:[new c(t.description),new S(t.maxSupply??O),new c(t.name),new c(t.uri),new T(t.mutableDescription??!0),new T(t.mutableRoyalty??!0),new T(t.mutableURI??!0),new T(t.mutableTokenDescription??!0),new T(t.mutableTokenName??!0),new T(t.mutableTokenProperties??!0),new T(t.mutableTokenURI??!0),new T(t.tokensBurnableByCreator??!0),new T(t.tokensFreezableByCreator??!0),new S(t.royaltyNumerator??0),new S(t.royaltyDenominator??1)],abi:Q},options:n})}async function U(t){let{aptosConfig:o,creatorAddress:n,collectionName:e,options:r}=t,i=u.from(n),a={collection_name:{_eq:e},creator_address:{_eq:i.toStringLong()}};return r?.tokenStandard&&(a.token_standard={_eq:r?.tokenStandard??"v2"}),(await b({aptosConfig:o,query:{query:x,variables:{where_condition:a}},originMethod:"getCollectionData"})).current_collections_v2[0]}async function St(t){let{aptosConfig:o,collectionId:n}=t,r={collection_id:{_eq:u.from(n).toStringLong()}};return(await b({aptosConfig:o,query:{query:x,variables:{where_condition:r}},originMethod:"getCollectionData"})).current_collections_v2[0]}async function vt(t){return(await U(t)).collection_id}var F={typeParameters:[],parameters:[new s(p()),new s(p()),new s(p()),new s(p()),new f(new s(p())),new f(new s(p())),new f(f.u8())]};async function ht(t){let{aptosConfig:o,options:n,creator:e,collection:r,description:i,name:a,uri:l,propertyKeys:y,propertyTypes:P,propertyValues:_}=t,k=P?.map(D=>C[D]);return d({aptosConfig:o,sender:e.accountAddress,data:{function:"0x4::aptos_token::mint",functionArguments:[new c(r),new c(i),new c(a),new c(l),I.MoveString(y??[]),I.MoveString(k??[]),R(_??[],k??[])],abi:F},options:n})}var N={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new h]};async function xt(t){let{aptosConfig:o,sender:n,digitalAssetAddress:e,recipient:r,digitalAssetType:i,options:a}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x1::object::transfer",typeArguments:[i??m],functionArguments:[u.from(e),u.from(r)],abi:N},options:a})}var Y={typeParameters:[],parameters:[new s(p()),new s(p()),new s(p()),new s(p()),new f(new s(p())),new f(new s(p())),new f(f.u8()),new h]};async function Gt(t){let{aptosConfig:o,account:n,collection:e,description:r,name:i,uri:a,recipient:l,propertyKeys:y,propertyTypes:P,propertyValues:_,options:k}=t;if(y?.length!==_?.length)throw new Error("Property keys and property values counts do not match");if(P?.length!==_?.length)throw new Error("Property types and property values counts do not match");let D=P?.map(K=>C[K]);return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::mint_soul_bound",functionArguments:[e,r,i,a,I.MoveString(y??[]),I.MoveString(D??[]),R(_??[],D??[]),l],abi:Y},options:k})}var z={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0)))]};async function Bt(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:i}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::burn",typeArguments:[r??m],functionArguments:[u.from(e)],abi:z},options:i})}var L={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0)))]};async function Ot(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:i}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::freeze_transfer",typeArguments:[r??m],functionArguments:[e],abi:L},options:i})}var j={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0)))]};async function Et(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:i}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::unfreeze_transfer",typeArguments:[r??m],functionArguments:[e],abi:j},options:i})}var X={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p())]};async function qt(t){let{aptosConfig:o,creator:n,description:e,digitalAssetAddress:r,digitalAssetType:i,options:a}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_description",typeArguments:[i??m],functionArguments:[u.from(r),new c(e)],abi:X},options:a})}var H={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p())]};async function Vt(t){let{aptosConfig:o,creator:n,name:e,digitalAssetAddress:r,digitalAssetType:i,options:a}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_name",typeArguments:[i??m],functionArguments:[u.from(r),new c(e)],abi:H},options:a})}var J={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p())]};async function Mt(t){let{aptosConfig:o,creator:n,uri:e,digitalAssetAddress:r,digitalAssetType:i,options:a}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_uri",typeArguments:[i??m],functionArguments:[u.from(r),new c(e)],abi:J},options:a})}var W={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p()),new s(p()),f.u8()]};async function Rt(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:i,digitalAssetAddress:a,digitalAssetType:l,options:y}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::add_property",typeArguments:[l??m],functionArguments:[u.from(a),new c(e),new c(C[r]),I.U8(B(i,C[r]))],abi:W},options:y})}var Z={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p())]};async function Kt(t){let{aptosConfig:o,creator:n,propertyKey:e,digitalAssetAddress:r,digitalAssetType:i,options:a}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::remove_property",typeArguments:[i??m],functionArguments:[u.from(r),new c(e)],abi:Z},options:a})}var $={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p()),new s(p()),f.u8()]};async function Qt(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:i,digitalAssetAddress:a,digitalAssetType:l,options:y}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::update_property",typeArguments:[l??m],functionArguments:[u.from(a),new c(e),new c(C[r]),B(i,C[r])],abi:$},options:y})}var tt={typeParameters:[{constraints:["key"]},{constraints:[]}],parameters:[new s(g(new A(0))),new s(p()),new A(1)]};async function Ut(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:i,digitalAssetAddress:a,digitalAssetType:l,options:y}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::add_typed_property",typeArguments:[l??m,C[r]],functionArguments:[u.from(a),new c(e),i],abi:tt},options:y})}var et={typeParameters:[{constraints:["key"]},{constraints:[]}],parameters:[new s(g(new A(0))),new s(p()),new A(1)]};async function Ft(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:i,digitalAssetAddress:a,digitalAssetType:l,options:y}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::update_typed_property",typeArguments:[l??m,C[r]],functionArguments:[u.from(a),new c(e),i],abi:et},options:y})}function R(t,o){let n=new Array;return o.forEach((e,r)=>{n.push(B(t[r],e))}),n}function B(t,o){let n=V(o);return M(t,n,0,[]).bcsToBytes()}export{It as a,_t as b,Pt as c,kt as d,Dt as e,U as f,St as g,vt as h,ht as i,xt as j,Gt as k,Bt as l,Ot as m,Et as n,qt as o,Vt as p,Mt as q,Rt as r,Kt as s,Qt as t,Ut as u,Ft as v};
|
|
2
|
+
//# sourceMappingURL=chunk-EITBGYIX.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-72FVDESD.mjs";import{a as o,b as c}from"./chunk-U6Z4FNB7.mjs";import{a as h,h as d}from"./chunk-WDN2MTVR.mjs";import{g as u}from"./chunk-CK272GUS.mjs";import g from"eventemitter3";var m="fulfilled",f=(n=>(n.TransactionSent="transactionSent",n.TransactionSendFailed="transactionSendFailed",n.TransactionExecuted="transactionExecuted",n.TransactionExecutionFailed="transactionExecutionFailed",n.ExecutionFinish="executionFinish",n))(f||{}),p=class extends g{constructor(t,e,a=30,n=100,i=10){super();this.taskQueue=new o;this.transactionsQueue=new o;this.outstandingTransactions=new o;this.sentTransactions=[];this.executedTransactions=[];this.aptosConfig=t,this.account=e,this.started=!1,this.accountSequnceNumber=new l(t,e,a,n,i)}async submitNextTransaction(){try{for(;;){let t=await this.accountSequnceNumber.nextSequenceNumber();if(t===null)return;let e=await this.generateNextTransaction(this.account,t);if(!e)return;let a=d({aptosConfig:this.aptosConfig,transaction:e,signer:this.account});await this.outstandingTransactions.enqueue([a,t])}}catch(t){if(t instanceof c)return;throw new Error(`Submit transaction failed for ${this.account.accountAddress.toString()} with error ${t}`)}}async processTransactions(){try{for(;;){let t=[],e=[],[a,n]=await this.outstandingTransactions.dequeue();for(t.push(a),e.push(n);!this.outstandingTransactions.isEmpty();)[a,n]=await this.outstandingTransactions.dequeue(),t.push(a),e.push(n);let i=await Promise.allSettled(t);for(let s=0;s<i.length&&s<e.length;s+=1){let r=i[s];n=e[s],r.status===m?(this.sentTransactions.push([r.value.hash,n,null]),this.emit("transactionSent",{message:`transaction hash ${r.value.hash} has been committed to chain`,transactionHash:r.value.hash}),await this.checkTransaction(r,n)):(this.sentTransactions.push([r.status,n,r.reason]),this.emit("transactionSendFailed",{message:`failed to commit transaction ${this.sentTransactions.length} with error ${r.reason}`,error:r.reason}))}this.emit("executionFinish",{message:`execute ${i.length} transactions finished`})}}catch(t){if(t instanceof c)return;throw new Error(`Process execution failed for ${this.account.accountAddress.toString()} with error ${t}`)}}async checkTransaction(t,e){try{let a=[];a.push(u({aptosConfig:this.aptosConfig,transactionHash:t.value.hash}));let n=await Promise.allSettled(a);for(let i=0;i<n.length;i+=1){let s=n[i];s.status===m?(this.executedTransactions.push([s.value.hash,e,null]),this.emit("transactionExecuted",{message:`transaction hash ${s.value.hash} has been executed on chain`,transactionHash:t.value.hash})):(this.executedTransactions.push([s.status,e,s.reason]),this.emit("transactionExecutionFailed",{message:`failed to execute transaction ${this.executedTransactions.length} with error ${s.reason}`,error:s.reason}))}}catch(a){throw new Error(`Check transaction failed for ${this.account.accountAddress.toString()} with error ${a}`)}}async push(t,e){this.transactionsQueue.enqueue([t,e])}async generateNextTransaction(t,e){if(this.transactionsQueue.isEmpty())return;let[a,n]=await this.transactionsQueue.dequeue();return h({aptosConfig:this.aptosConfig,sender:t.accountAddress,data:a,options:{...n,accountSequenceNumber:e}})}async run(){try{for(;!this.taskQueue.isCancelled();)await(await this.taskQueue.dequeue())()}catch(t){throw new Error(`Unable to start transaction batching: ${t}`)}}start(){if(this.started)throw new Error("worker has already started");this.started=!0,this.taskQueue.enqueue(()=>this.submitNextTransaction()),this.taskQueue.enqueue(()=>this.processTransactions()),this.run()}stop(){if(this.taskQueue.isCancelled())throw new Error("worker has already stopped");this.started=!1,this.taskQueue.cancel()}};export{m as a,f as b,p as c};
|
|
2
|
+
//# sourceMappingURL=chunk-GL4NI3HS.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-WDN2MTVR.mjs";import{c as p}from"./chunk-PFFAQZHT.mjs";import{f as a,i as r}from"./chunk-3VGX3TXH.mjs";import{f as o}from"./chunk-YQF2NZNF.mjs";import{o as u,r as g,s as A}from"./chunk-S4SEFF4K.mjs";async function G(t){let{aptosConfig:s,options:e}=t,n={query:A,variables:{where_condition:e?.where,limit:e?.limit,offset:e?.offset}};return(await o({aptosConfig:s,query:n,originMethod:"getFungibleAssetMetadata"})).fungible_asset_metadata}async function h(t){let{aptosConfig:s,options:e}=t,n={query:g,variables:{where_condition:e?.where,limit:e?.limit,offset:e?.offset}};return(await o({aptosConfig:s,query:n,originMethod:"getFungibleAssetActivities"})).fungible_asset_activities}async function M(t){let{aptosConfig:s,options:e}=t,n={query:u,variables:{where_condition:e?.where,limit:e?.limit,offset:e?.offset}};return(await o({aptosConfig:s,query:n,originMethod:"getCurrentFungibleAssetBalances"})).current_fungible_asset_balances}var b={typeParameters:[{constraints:[]}],parameters:[p("0x1::object::Object"),new r,new a]};async function x(t){let{aptosConfig:s,sender:e,fungibleAssetMetadataAddress:n,recipient:i,amount:l,options:f}=t;return c({aptosConfig:s,sender:e.accountAddress,data:{function:"0x1::primary_fungible_store::transfer",typeArguments:["0x1::fungible_asset::Metadata"],functionArguments:[n,i,l],abi:b},options:f})}export{G as a,h as b,M as c,x as d};
|
|
2
|
+
//# sourceMappingURL=chunk-GXYWMAXZ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as m}from"./chunk-3VGX3TXH.mjs";import{a as g}from"./chunk-ZNEBMSNC.mjs";import{a as p}from"./chunk-MGOHPDX4.mjs";import{b as y}from"./chunk-T23OVRNF.mjs";import{a as v}from"./chunk-EB7AI4B4.mjs";import{a as F,b as d,c as T,d as x,e as E,f as _,g as w}from"./chunk-6RBUXB5I.mjs";import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as m}from"./chunk-3VGX3TXH.mjs";import{a as g}from"./chunk-ZNEBMSNC.mjs";import{a as p}from"./chunk-MGOHPDX4.mjs";import{b as y}from"./chunk-T23OVRNF.mjs";import{a as S}from"./chunk-C3L4ETUF.mjs";import{a as v}from"./chunk-EB7AI4B4.mjs";import{a as F,b as d,c as T,d as x,e as E,f as _,g as w}from"./chunk-6RBUXB5I.mjs";import{a as u}from"./chunk-TVRJ3M7B.mjs";function D(r){let e=r.deserializeUleb128AsU32();switch(e){case 0:return d.deserialize(r);case 1:return E.deserialize(r);case 2:return _.deserialize(r);case 3:return y.deserialize(r);case 4:return v.deserialize(r,d);case 5:return F.deserialize(r);case 6:return T.deserialize(r);case 7:return x.deserialize(r);case 8:return w.deserialize(r);default:throw new Error(`Unknown variant index for ScriptTransactionArgument: ${e}`)}}var a=class extends u{static deserialize(e){let t=e.deserializeUleb128AsU32();switch(t){case 0:return A.load(e);case 2:return z.load(e);case 3:return h.load(e);default:throw new Error(`Unknown variant index for TransactionPayload: ${t}`)}}},A=class r extends a{constructor(t){super();this.script=t}serialize(t){t.serializeU32AsUleb128(0),this.script.serialize(t)}static load(t){let i=U.deserialize(t);return new r(i)}},z=class r extends a{constructor(t){super();this.entryFunction=t}serialize(t){t.serializeU32AsUleb128(2),this.entryFunction.serialize(t)}static load(t){let i=l.deserialize(t);return new r(i)}},h=class r extends a{constructor(t){super();this.multiSig=t}serialize(t){t.serializeU32AsUleb128(3),this.multiSig.serialize(t)}static load(t){let i=f.deserialize(t);return new r(i)}},l=class r{constructor(e,t,i,n){this.module_name=e,this.function_name=t,this.type_args=i,this.args=n}static build(e,t,i,n){return new r(g.fromStr(e),new p(t),i,n)}serialize(e){this.module_name.serialize(e),this.function_name.serialize(e),e.serializeVector(this.type_args),e.serializeU32AsUleb128(this.args.length),this.args.forEach(t=>{t.serializeForEntryFunction(e)})}static deserialize(e){let t=g.deserialize(e),i=p.deserialize(e),n=e.deserializeVector(m),o=e.deserializeUleb128AsU32(),s=new Array;for(let c=0;c<o;c+=1){let M=e.deserializeUleb128AsU32(),B=S.deserialize(e,M);s.push(B)}return new r(t,i,n,s)}},U=class r{constructor(e,t,i){this.bytecode=e,this.type_args=t,this.args=i}serialize(e){e.serializeBytes(this.bytecode),e.serializeVector(this.type_args),e.serializeU32AsUleb128(this.args.length),this.args.forEach(t=>{t.serializeForScriptFunction(e)})}static deserialize(e){let t=e.deserializeBytes(),i=e.deserializeVector(m),n=e.deserializeUleb128AsU32(),o=new Array;for(let s=0;s<n;s+=1){let c=D(e);o.push(c)}return new r(t,i,o)}},f=class r{constructor(e,t){this.multisig_address=e,this.transaction_payload=t}serialize(e){this.multisig_address.serialize(e),this.transaction_payload===void 0?e.serializeBool(!1):(e.serializeBool(!0),this.transaction_payload.serialize(e))}static deserialize(e){let t=y.deserialize(e),i=e.deserializeBool(),n;return i&&(n=b.deserialize(e)),new r(t,n)}},b=class r extends u{constructor(t){super();this.transaction_payload=t}serialize(t){t.serializeU32AsUleb128(0),this.transaction_payload.serialize(t)}static deserialize(t){return t.deserializeUleb128AsU32(),new r(l.deserialize(t))}};export{D as a,a as b,A as c,z as d,h as e,l as f,U as g,f as h,b as i};
|
|
2
|
+
//# sourceMappingURL=chunk-IEZO4PIG.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u,b as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u,b as l}from"./chunk-BUBB2DYK.mjs";import{a as f}from"./chunk-STYDBDYL.mjs";import{b as g}from"./chunk-COW5IGYC.mjs";import{a as m}from"./chunk-7STYQ5ZE.mjs";function A(y){let o=y;return o-=o>>1&1431655765,o=(o&858993459)+(o>>2&858993459),(o+(o>>4)&252645135)*16843009>>24}var p=class y extends g{constructor(e){super();let{publicKeys:r,signaturesRequired:t}=e;if(t<1)throw new Error("The number of required signatures needs to be greater than 0");if(r.length<t)throw new Error(`Provided ${r.length} public keys is smaller than the ${t} required signatures`);this.publicKeys=r.map(i=>i instanceof u?i:new u(i)),this.signaturesRequired=t}verifySignature(e){throw new Error("not implemented")}authKey(){return m.fromSchemeAndBytes({scheme:3,input:this.toUint8Array()})}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeVector(this.publicKeys),e.serializeU8(this.signaturesRequired)}static deserialize(e){let r=e.deserializeVector(u),t=e.deserializeU8();return new y({publicKeys:r,signaturesRequired:t})}createBitmap(e){let{bits:r}=e,t=128,i=new Uint8Array([0,0,0,0]),a=new Set;return r.forEach((n,c)=>{if(c+1>this.publicKeys.length)throw new Error(`Signature index ${c+1} is out of public keys range, ${this.publicKeys.length}.`);if(a.has(n))throw new Error(`Duplicate bit ${n} detected.`);a.add(n);let h=Math.floor(n/8),b=i[h];b|=t>>n%8,i[h]=b}),i}getIndex(e){let r=e instanceof u?e:new u(e),t=this.publicKeys.findIndex(i=>i.toString()===r.toString());if(t!==-1)return t;throw new Error("Public key not found in MultiKey")}},s=class s extends f{constructor(e){super();let{signatures:r,bitmap:t}=e;if(r.length>s.MAX_SIGNATURES_SUPPORTED)throw new Error(`The number of signatures cannot be greater than ${s.MAX_SIGNATURES_SUPPORTED}`);if(this.signatures=r.map(a=>a instanceof l?a:new l(a)),!(t instanceof Uint8Array))this.bitmap=s.createBitmap({bits:t});else{if(t.length!==s.BITMAP_LEN)throw new Error(`"bitmap" length should be ${s.BITMAP_LEN}`);this.bitmap=t}let i=this.bitmap.reduce((a,n)=>a+A(n),0);if(i!==this.signatures.length)throw new Error(`Expecting ${i} signatures from the bitmap, but got ${this.signatures.length}`)}static createBitmap(e){let{bits:r}=e,t=128,i=new Uint8Array([0,0,0,0]),a=new Set;return r.forEach(n=>{if(n>=s.MAX_SIGNATURES_SUPPORTED)throw new Error(`Cannot have a signature larger than ${s.MAX_SIGNATURES_SUPPORTED-1}.`);if(a.has(n))throw new Error("Duplicate bits detected.");a.add(n);let c=Math.floor(n/8),h=i[c];h|=t>>n%8,i[c]=h}),i}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeVector(this.signatures),e.serializeBytes(this.bitmap)}static deserialize(e){let r=e.deserializeVector(l),t=e.deserializeBytes();return new s({signatures:r,bitmap:t})}};s.BITMAP_LEN=4,s.MAX_SIGNATURES_SUPPORTED=s.BITMAP_LEN*8;var d=s;export{p as a,d as b};
|
|
2
|
+
//# sourceMappingURL=chunk-IUOPNE62.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as M,c as en,d as an,e as N}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as M,c as en,d as an,e as N}from"./chunk-SS7WKVGS.mjs";import{q as tn,t as f}from"./chunk-7H3HRFVM.mjs";import{a as Y}from"./chunk-K5ZOVBFV.mjs";import{a as Z}from"./chunk-W637YAND.mjs";import{a as y}from"./chunk-7JJJAYSG.mjs";import{a as L}from"./chunk-MKUAW7KW.mjs";import{a as H,c as X,d as z}from"./chunk-Z2ZR4PTF.mjs";import{c as K,d as k,e as O,f as B,g as V,h as q,i as v}from"./chunk-IEZO4PIG.mjs";import{b as E,d as F,e as D,f as R}from"./chunk-2VJKN67Y.mjs";import{a as W,b as w,d as m}from"./chunk-PKRPABA4.mjs";import{a as _}from"./chunk-MWUJCP27.mjs";import{b as nn}from"./chunk-CK272GUS.mjs";import{a as Q}from"./chunk-AH44UPM4.mjs";import{a as J}from"./chunk-YQF2NZNF.mjs";import{a as x,b as l}from"./chunk-BUBB2DYK.mjs";import{a as S,c as U}from"./chunk-37BUI3TW.mjs";import{i as b}from"./chunk-ABLLZAVR.mjs";import{a as P,c as g}from"./chunk-M72JTOIP.mjs";import{b as u}from"./chunk-T23OVRNF.mjs";import{a as j}from"./chunk-UTXJOB3O.mjs";import{b as I}from"./chunk-AOCNYMMX.mjs";import{b as G,c as C}from"./chunk-YE5B2S5L.mjs";import{g as $}from"./chunk-JM544NRW.mjs";import{sha3_256 as dn}from"@noble/hashes/sha3";async function kn(t){if(tn(t))return yn(t);let{moduleAddress:n,moduleName:e,functionName:i}=f(t.function),a=await on({key:"entry-function",moduleAddress:n,moduleName:e,functionName:i,aptosConfig:t.aptosConfig,abi:t.abi,fetch:en});return An({...t,abi:a})}function An(t){let n=t.abi,{moduleAddress:e,moduleName:i,functionName:a}=f(t.function),r=M(t.typeArguments);if(r.length!==n.typeParameters.length)throw new Error(`Type argument count mismatch, expected ${n.typeParameters.length}, received ${r.length}`);let o=t.functionArguments.map((s,d)=>N(t.function,n,s,d,r));if(o.length!==n.parameters.length)throw new Error(`Too few arguments for '${e}::${i}::${a}', expected ${n.parameters.length} but got ${o.length}`);let c=B.build(`${e}::${i}`,a,r,o);if("multisigAddress"in t){let s=u.from(t.multisigAddress);return new O(new q(s,new v(c)))}return new k(c)}async function On(t){let{moduleAddress:n,moduleName:e,functionName:i}=f(t.function),a=await on({key:"view-function",moduleAddress:n,moduleName:e,functionName:i,aptosConfig:t.aptosConfig,abi:t.abi,fetch:an});return mn({abi:a,...t})}function mn(t){let n=t.abi,{moduleAddress:e,moduleName:i,functionName:a}=f(t.function),r=M(t.typeArguments);if(r.length!==n.typeParameters.length)throw new Error(`Type argument count mismatch, expected ${n.typeParameters.length}, received ${r.length}`);let o=t?.functionArguments?.map((c,s)=>N(t.function,n,c,s,r))??[];if(o.length!==n.parameters.length)throw new Error(`Too few arguments for '${e}::${i}::${a}', expected ${n.parameters.length} but got ${o.length}`);return B.build(`${e}::${i}`,a,r,o)}function yn(t){return new K(new V(I.fromHexInput(t.bytecode).toUint8Array(),t.typeArguments??[],t.functionArguments))}async function fn(t){let{aptosConfig:n,sender:e,payload:i,options:a,feePayerAddress:r}=t,o=async()=>$[n.network]?{chainId:$[n.network]}:{chainId:(await J({aptosConfig:n})).chain_id},c=async()=>a?.gasUnitPrice?{gasEstimate:a.gasUnitPrice}:{gasEstimate:(await nn({aptosConfig:n})).gas_estimate},s=async()=>{let p=async()=>a?.accountSequenceNumber!==void 0?a.accountSequenceNumber:(await Y({aptosConfig:n,accountAddress:e})).sequence_number;if(r&&u.from(r).equals(u.ZERO))try{return await p()}catch{return 0}else return p()},[{chainId:d},{gasEstimate:A},h]=await Promise.all([o(),c(),s()]),{maxGasAmount:sn,gasUnitPrice:cn,expireTimestamp:un}={maxGasAmount:a?.maxGasAmount?BigInt(a.maxGasAmount):BigInt(2e5),gasUnitPrice:a?.gasUnitPrice??BigInt(A),expireTimestamp:a?.expireTimestamp??BigInt(Math.floor(Date.now()/1e3)+20)};return new H(u.from(e),BigInt(h),i,BigInt(sn),BigInt(cn),BigInt(un),new _(d))}async function Vn(t){let{aptosConfig:n,sender:e,payload:i,options:a,feePayerAddress:r}=t,o=await fn({aptosConfig:n,sender:e,payload:i,options:a,feePayerAddress:r});if("secondarySignerAddresses"in t){let c=t.secondarySignerAddresses?.map(s=>u.from(s))??[];return new Z(o,c,t.feePayerAddress?u.from(t.feePayerAddress):void 0)}return new L(o,t.feePayerAddress?u.from(t.feePayerAddress):void 0)}function qn(t){let{signerPublicKey:n,transaction:e,secondarySignersPublicKeys:i,feePayerPublicKey:a}=t,r=T(n);if(e.feePayerAddress){let c=new z(e.rawTransaction,e.secondarySignerAddresses??[],e.feePayerAddress),s=[];i&&(s=i.map(h=>T(h)));let d=T(a),A=new D(r,e.secondarySignerAddresses??[],s,{address:e.feePayerAddress,authenticator:d});return new y(c.raw_txn,A).bcsToBytes()}if(e.secondarySignerAddresses){let c=new X(e.rawTransaction,e.secondarySignerAddresses),s=[];s=i.map(A=>T(A));let d=new F(r,e.secondarySignerAddresses,s);return new y(c.raw_txn,d).bcsToBytes()}let o;if(r instanceof w)o=new E(r.public_key,r.signature);else if(r instanceof m)o=new R(r);else throw new Error("Invalid public key");return new y(e.rawTransaction,o).bcsToBytes()}function T(t){let n=t;if((n instanceof b||n instanceof S)&&(n=new x(n)),n instanceof x){if(n.publicKey instanceof P)return new m(n,new l(new g(new Uint8Array(64))));if(n.publicKey instanceof S)return new m(n,new l(new U(new Uint8Array(64))));if(n.publicKey instanceof b)return new m(n,new l(new g(new Uint8Array(64))))}return new w(new P(n.toUint8Array()),new g(new Uint8Array(64)))}function pn(t){let{transaction:n,feePayerAuthenticator:e,additionalSignersAuthenticators:i}=t,a=j(W,t.senderAuthenticator),r;if(n.feePayerAddress){if(!e)throw new Error("Must provide a feePayerAuthenticator argument to generate a signed fee payer transaction");r=new D(a,n.secondarySignerAddresses??[],i??[],{address:n.feePayerAddress,authenticator:e})}else if(n.secondarySignerAddresses){if(!i)throw new Error("Must provide a additionalSignersAuthenticators argument to generate a signed multi agent transaction");r=new F(a,n.secondarySignerAddresses,i)}else a instanceof w?r=new E(a.public_key,a.signature):r=new R(a);return new y(n.rawTransaction,r).bcsToBytes()}function rn(t){let n=dn.create();for(let e of t)n.update(e);return n.digest()}var gn=rn(["APTOS::Transaction"]);function vn(t){let n=pn(t);return new I(rn([gn,new Uint8Array([0]),n])).toString()}async function on({key:t,moduleAddress:n,moduleName:e,functionName:i,aptosConfig:a,abi:r,fetch:o}){return r!==void 0?r:Q(async()=>o(n,e,i,a),`${t}-${a.network}-${n}-${e}-${i}`,1e3*60*5)()}export{kn as a,An as b,On as c,mn as d,fn as e,Vn as f,qn as g,T as h,pn as i,rn as j,vn as k};
|
|
2
|
+
//# sourceMappingURL=chunk-JZRM73CF.mjs.map
|