@aptos-labs/ts-sdk 1.9.0 → 1.9.1-plugin.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/common/index.d.ts +94 -1
- package/dist/common/index.js +24 -24
- package/dist/common/index.js.map +1 -1
- package/dist/esm/api/account.d.mts +1 -1
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.d.mts +1 -1
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +1 -1
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/aptosConfig.d.mts +7 -0
- package/dist/esm/api/aptosConfig.mjs +1 -1
- package/dist/esm/api/coin.d.mts +1 -1
- 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 +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 -1
- package/dist/esm/api/index.mjs +1 -1
- 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 +1 -1
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.d.mts +1 -1
- 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/simulate.d.mts +1 -1
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.d.mts +1 -1
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/assetUploader/assetUploader.d.mts +109 -0
- package/dist/esm/assetUploader/assetUploader.mjs +2 -0
- package/dist/esm/assetUploader/assetUploader.mjs.map +1 -0
- package/dist/esm/assetUploader/index.d.mts +24 -0
- package/dist/esm/assetUploader/index.mjs +2 -0
- package/dist/esm/assetUploader/index.mjs.map +1 -0
- package/dist/esm/assetUploader/irys.d.mts +64 -0
- package/dist/esm/assetUploader/irys.mjs +2 -0
- package/dist/esm/assetUploader/irys.mjs.map +1 -0
- 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.mjs +1 -1
- package/dist/esm/chunk-2BGOMPDV.mjs +2 -0
- package/dist/esm/{chunk-S2F6CSH4.mjs → chunk-2TRSGKMS.mjs} +2 -2
- package/dist/esm/{chunk-NL3XVNS5.mjs → chunk-2ZLKKVWJ.mjs} +2 -2
- package/dist/esm/chunk-4LQNMXX3.mjs +2 -0
- package/dist/esm/{chunk-JEHR6GKW.mjs → chunk-4PCEBFIT.mjs} +2 -2
- package/dist/esm/chunk-52PEPCCF.mjs +2 -0
- package/dist/esm/{chunk-YDAA4RG4.mjs → chunk-5VY5VSRG.mjs} +2 -2
- package/dist/esm/{chunk-QA4XWNIH.mjs → chunk-7FMG66Z4.mjs} +2 -2
- package/dist/esm/{chunk-7U36LMP4.mjs → chunk-7TPQMQK4.mjs} +2 -2
- package/dist/esm/{chunk-R4VJDSIP.mjs → chunk-AK75KOT3.mjs} +2 -2
- package/dist/esm/{chunk-XKD7W5NO.mjs → chunk-ALXMJOCO.mjs} +2 -2
- package/dist/esm/{chunk-NURFZOR4.mjs → chunk-BVAY3B44.mjs} +2 -2
- package/dist/esm/{chunk-GQOOXOTN.mjs → chunk-BYODEYSX.mjs} +2 -2
- package/dist/esm/{chunk-NL72WE3E.mjs → chunk-BZMO6Q6L.mjs} +2 -2
- package/dist/esm/{chunk-YR2R3LW4.mjs → chunk-CNHM36ZH.mjs} +2 -2
- package/dist/esm/{chunk-Q6WOHF4A.mjs → chunk-CSXY6Z3K.mjs} +2 -2
- package/dist/esm/{chunk-2E2JOGE5.mjs → chunk-CXB2C2SJ.mjs} +2 -2
- package/dist/esm/{chunk-TN5BUH4F.mjs → chunk-DHQWLSD6.mjs} +2 -2
- package/dist/esm/chunk-DPHEHCIM.mjs +2 -0
- package/dist/esm/chunk-DQHNZBA5.mjs +2 -0
- package/dist/esm/chunk-DQHNZBA5.mjs.map +1 -0
- package/dist/esm/chunk-EBCIZ4D6.mjs +2 -0
- package/dist/esm/{chunk-EF2F7NWO.mjs → chunk-EGUJAHAO.mjs} +2 -2
- package/dist/esm/{chunk-C3HM7HQP.mjs → chunk-FE5USPGB.mjs} +2 -2
- package/dist/esm/{chunk-FVMVV4V3.mjs → chunk-FOSJSOXX.mjs} +2 -2
- package/dist/esm/{chunk-Y5AJLNUD.mjs → chunk-FYZLJM4W.mjs} +2 -2
- package/dist/esm/{chunk-VEVBHH3M.mjs → chunk-FZIAMWFX.mjs} +2 -2
- package/dist/esm/{chunk-UIUSDBCL.mjs → chunk-GE7VQ5NZ.mjs} +2 -2
- package/dist/esm/{chunk-F7CR75CJ.mjs → chunk-GHMYWL3R.mjs} +2 -2
- package/dist/esm/{chunk-F7CR75CJ.mjs.map → chunk-GHMYWL3R.mjs.map} +1 -1
- package/dist/esm/{chunk-6FBKUTGF.mjs → chunk-GHYE26Q5.mjs} +2 -2
- package/dist/esm/{chunk-EQZ757ES.mjs → chunk-GRCJKGVR.mjs} +2 -2
- package/dist/esm/chunk-HIUJDWMR.mjs +2 -0
- package/dist/esm/{chunk-DE5OOOVY.mjs.map → chunk-HIUJDWMR.mjs.map} +1 -1
- package/dist/esm/chunk-I4RVDRYR.mjs +2 -0
- package/dist/esm/{chunk-7BDYKJXX.mjs.map → chunk-I4RVDRYR.mjs.map} +1 -1
- package/dist/esm/{chunk-CHA5DSSD.mjs → chunk-IF7ODXD7.mjs} +2 -2
- package/dist/esm/chunk-IWPVPIKD.mjs +2 -0
- package/dist/esm/{chunk-QR72RXBS.mjs → chunk-JIC5IJLP.mjs} +2 -2
- package/dist/esm/{chunk-SXIFL5DQ.mjs → chunk-JX3IRXNX.mjs} +2 -2
- package/dist/esm/{chunk-LLL2LFYH.mjs → chunk-KPO5IM5R.mjs} +2 -2
- package/dist/esm/chunk-L7ORFGZ7.mjs +1 -0
- package/dist/esm/chunk-L7ORFGZ7.mjs.map +1 -0
- package/dist/esm/chunk-LG7RJQ57.mjs +2 -0
- package/dist/esm/{chunk-F67Y7YH6.mjs → chunk-MSVYA75Y.mjs} +2 -2
- package/dist/esm/{chunk-CVEJHRAU.mjs → chunk-NCDLIACO.mjs} +1 -1
- package/dist/esm/chunk-NCDLIACO.mjs.map +1 -0
- package/dist/esm/{chunk-WTHNSNAX.mjs → chunk-NIOGYWR4.mjs} +2 -2
- package/dist/esm/chunk-O4MQVPLP.mjs +2 -0
- package/dist/esm/chunk-OH5ADEJO.mjs +2 -0
- package/dist/esm/{chunk-52RTAMN7.mjs → chunk-P434YHBQ.mjs} +2 -2
- package/dist/esm/{chunk-TNVR7SNR.mjs → chunk-P633OFBI.mjs} +2 -2
- package/dist/esm/chunk-PEOCYUOO.mjs +2 -0
- package/dist/esm/chunk-PEOCYUOO.mjs.map +1 -0
- package/dist/esm/{chunk-BBUAAJRA.mjs → chunk-PGZ67PEU.mjs} +2 -2
- package/dist/esm/chunk-PISONN6H.mjs +2 -0
- package/dist/esm/chunk-PISONN6H.mjs.map +1 -0
- package/dist/esm/{chunk-B7M3OWHV.mjs → chunk-Q2V2K5AT.mjs} +2 -2
- package/dist/esm/chunk-QDD2MDJZ.mjs +2 -0
- package/dist/esm/{chunk-VRSUCKJA.mjs.map → chunk-QDD2MDJZ.mjs.map} +1 -1
- package/dist/esm/{chunk-ILJWEPDW.mjs → chunk-QG76NDGM.mjs} +2 -2
- package/dist/esm/{chunk-F7MOQC7Z.mjs → chunk-RP4FMC6O.mjs} +2 -2
- package/dist/esm/{chunk-J6MWD4XN.mjs → chunk-SASVQCT6.mjs} +2 -2
- package/dist/esm/{chunk-VMXBMAYK.mjs → chunk-SKF6E6X7.mjs} +2 -2
- package/dist/esm/{chunk-7D5LHQNS.mjs → chunk-SQW7K56J.mjs} +2 -2
- package/dist/esm/chunk-TTM66JZ4.mjs +2 -0
- package/dist/esm/{chunk-UMLDKLDL.mjs → chunk-TVEFB6OB.mjs} +2 -2
- package/dist/esm/{chunk-DGOT2VR5.mjs → chunk-UFD443TT.mjs} +2 -2
- package/dist/esm/chunk-UZUMQY43.mjs +2 -0
- package/dist/esm/{chunk-TX7UK75Q.mjs → chunk-V5GIZQF6.mjs} +2 -2
- package/dist/esm/{chunk-TX7UK75Q.mjs.map → chunk-V5GIZQF6.mjs.map} +1 -1
- package/dist/esm/{chunk-INORE66K.mjs → chunk-VHUFFKFT.mjs} +2 -2
- package/dist/esm/{chunk-N65SOKJQ.mjs → chunk-VJUCSKNE.mjs} +2 -2
- package/dist/esm/{chunk-N4RBQZ2B.mjs → chunk-VKWPCOZA.mjs} +2 -2
- package/dist/esm/{chunk-GRJJBGHT.mjs → chunk-VN2YZGFJ.mjs} +2 -2
- package/dist/esm/chunk-W5PK4QCX.mjs +2 -0
- package/dist/esm/{chunk-PJNPLRPR.mjs → chunk-WHNLDDPT.mjs} +2 -2
- package/dist/esm/{chunk-KWJTVJ7C.mjs → chunk-WT3OKY3G.mjs} +2 -2
- package/dist/esm/{chunk-LMXP3JUU.mjs → chunk-XDZF5IUF.mjs} +2 -2
- package/dist/esm/{chunk-OG56TYZE.mjs → chunk-XHUPYPN4.mjs} +2 -2
- package/dist/esm/{chunk-G62HQC77.mjs → chunk-XM3BQ5L6.mjs} +2 -2
- package/dist/esm/chunk-Y7G5W2QZ.mjs +2 -0
- 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/client/types.mjs +1 -1
- package/dist/esm/core/account/Account.d.mts +1 -1
- package/dist/esm/core/account/Account.mjs +1 -1
- package/dist/esm/core/account/Ed25519Account.d.mts +1 -1
- package/dist/esm/core/account/Ed25519Account.mjs +1 -1
- package/dist/esm/core/account/SingleKeyAccount.d.mts +1 -1
- package/dist/esm/core/account/SingleKeyAccount.mjs +1 -1
- package/dist/esm/core/account/index.d.mts +1 -1
- package/dist/esm/core/account/index.mjs +1 -1
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.d.mts +1 -1
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/common.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.d.mts +1 -1
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/index.d.mts +1 -1
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/multiEd25519.d.mts +1 -1
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.d.mts +1 -1
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/privateKey.d.mts +1 -1
- package/dist/esm/core/crypto/publicKey.d.mts +1 -1
- package/dist/esm/core/crypto/publicKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.d.mts +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.d.mts +1 -1
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/hex.mjs +1 -1
- package/dist/esm/core/index.d.mts +1 -1
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/index.d.mts +3 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/account.d.mts +2 -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 +1 -1
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.d.mts +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.d.mts +1 -1
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.mjs +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/transactions/authenticator/account.d.mts +1 -1
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.d.mts +1 -1
- package/dist/esm/transactions/authenticator/index.mjs +1 -1
- package/dist/esm/transactions/authenticator/transaction.d.mts +1 -1
- package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
- package/dist/esm/transactions/index.d.mts +1 -1
- 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 -1
- package/dist/esm/transactions/instances/index.mjs +1 -1
- package/dist/esm/transactions/instances/moduleId.mjs +1 -1
- package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.d.mts +1 -1
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.d.mts +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/index.d.mts +1 -1
- 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 +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.d.mts +1 -1
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +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/transactions/types.d.mts +1 -1
- package/dist/esm/types/index.d.mts +1 -0
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +13 -4
- package/src/api/aptosConfig.ts +9 -0
- package/src/assetUploader/assetUploader.ts +87 -0
- package/src/assetUploader/index.ts +1 -0
- package/src/assetUploader/irys.ts +102 -0
- package/src/index.ts +1 -0
- package/src/internal/queries/currentTokenOwnershipFieldsFragment.graphql +0 -1
- package/src/types/index.ts +2 -0
- package/src/version.ts +1 -1
- package/dist/browser/index.d.ts +0 -7139
- package/dist/browser/index.global.js +0 -483
- package/dist/browser/index.global.js.map +0 -1
- package/dist/esm/chunk-3EUOBVCT.mjs +0 -2
- package/dist/esm/chunk-7BDYKJXX.mjs +0 -2
- package/dist/esm/chunk-ARIC32W7.mjs +0 -2
- package/dist/esm/chunk-B2ZKW23W.mjs +0 -2
- package/dist/esm/chunk-CVEJHRAU.mjs.map +0 -1
- package/dist/esm/chunk-DE5OOOVY.mjs +0 -2
- package/dist/esm/chunk-FBPNHF54.mjs +0 -2
- package/dist/esm/chunk-FWDKABRW.mjs +0 -2
- package/dist/esm/chunk-FWDKABRW.mjs.map +0 -1
- package/dist/esm/chunk-I3TCHVQQ.mjs +0 -2
- package/dist/esm/chunk-IHCIKE42.mjs +0 -2
- package/dist/esm/chunk-PPTG6BDV.mjs +0 -2
- package/dist/esm/chunk-QKTV6AZ7.mjs +0 -2
- package/dist/esm/chunk-VRSUCKJA.mjs +0 -2
- package/dist/esm/chunk-WKUXBIYB.mjs +0 -2
- package/dist/esm/chunk-WME5D6YR.mjs +0 -2
- package/dist/esm/chunk-X5C3LYI7.mjs +0 -2
- package/dist/esm/chunk-XTPFQ4MH.mjs +0 -2
- package/dist/esm/chunk-YZZO6VDC.mjs +0 -2
- /package/dist/esm/{chunk-PPTG6BDV.mjs.map → chunk-2BGOMPDV.mjs.map} +0 -0
- /package/dist/esm/{chunk-S2F6CSH4.mjs.map → chunk-2TRSGKMS.mjs.map} +0 -0
- /package/dist/esm/{chunk-NL3XVNS5.mjs.map → chunk-2ZLKKVWJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-QKTV6AZ7.mjs.map → chunk-4LQNMXX3.mjs.map} +0 -0
- /package/dist/esm/{chunk-JEHR6GKW.mjs.map → chunk-4PCEBFIT.mjs.map} +0 -0
- /package/dist/esm/{chunk-I3TCHVQQ.mjs.map → chunk-52PEPCCF.mjs.map} +0 -0
- /package/dist/esm/{chunk-YDAA4RG4.mjs.map → chunk-5VY5VSRG.mjs.map} +0 -0
- /package/dist/esm/{chunk-QA4XWNIH.mjs.map → chunk-7FMG66Z4.mjs.map} +0 -0
- /package/dist/esm/{chunk-7U36LMP4.mjs.map → chunk-7TPQMQK4.mjs.map} +0 -0
- /package/dist/esm/{chunk-R4VJDSIP.mjs.map → chunk-AK75KOT3.mjs.map} +0 -0
- /package/dist/esm/{chunk-XKD7W5NO.mjs.map → chunk-ALXMJOCO.mjs.map} +0 -0
- /package/dist/esm/{chunk-NURFZOR4.mjs.map → chunk-BVAY3B44.mjs.map} +0 -0
- /package/dist/esm/{chunk-GQOOXOTN.mjs.map → chunk-BYODEYSX.mjs.map} +0 -0
- /package/dist/esm/{chunk-NL72WE3E.mjs.map → chunk-BZMO6Q6L.mjs.map} +0 -0
- /package/dist/esm/{chunk-YR2R3LW4.mjs.map → chunk-CNHM36ZH.mjs.map} +0 -0
- /package/dist/esm/{chunk-Q6WOHF4A.mjs.map → chunk-CSXY6Z3K.mjs.map} +0 -0
- /package/dist/esm/{chunk-2E2JOGE5.mjs.map → chunk-CXB2C2SJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-TN5BUH4F.mjs.map → chunk-DHQWLSD6.mjs.map} +0 -0
- /package/dist/esm/{chunk-YZZO6VDC.mjs.map → chunk-DPHEHCIM.mjs.map} +0 -0
- /package/dist/esm/{chunk-IHCIKE42.mjs.map → chunk-EBCIZ4D6.mjs.map} +0 -0
- /package/dist/esm/{chunk-EF2F7NWO.mjs.map → chunk-EGUJAHAO.mjs.map} +0 -0
- /package/dist/esm/{chunk-C3HM7HQP.mjs.map → chunk-FE5USPGB.mjs.map} +0 -0
- /package/dist/esm/{chunk-FVMVV4V3.mjs.map → chunk-FOSJSOXX.mjs.map} +0 -0
- /package/dist/esm/{chunk-Y5AJLNUD.mjs.map → chunk-FYZLJM4W.mjs.map} +0 -0
- /package/dist/esm/{chunk-VEVBHH3M.mjs.map → chunk-FZIAMWFX.mjs.map} +0 -0
- /package/dist/esm/{chunk-UIUSDBCL.mjs.map → chunk-GE7VQ5NZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-6FBKUTGF.mjs.map → chunk-GHYE26Q5.mjs.map} +0 -0
- /package/dist/esm/{chunk-EQZ757ES.mjs.map → chunk-GRCJKGVR.mjs.map} +0 -0
- /package/dist/esm/{chunk-CHA5DSSD.mjs.map → chunk-IF7ODXD7.mjs.map} +0 -0
- /package/dist/esm/{chunk-WKUXBIYB.mjs.map → chunk-IWPVPIKD.mjs.map} +0 -0
- /package/dist/esm/{chunk-QR72RXBS.mjs.map → chunk-JIC5IJLP.mjs.map} +0 -0
- /package/dist/esm/{chunk-SXIFL5DQ.mjs.map → chunk-JX3IRXNX.mjs.map} +0 -0
- /package/dist/esm/{chunk-LLL2LFYH.mjs.map → chunk-KPO5IM5R.mjs.map} +0 -0
- /package/dist/esm/{chunk-FBPNHF54.mjs.map → chunk-LG7RJQ57.mjs.map} +0 -0
- /package/dist/esm/{chunk-F67Y7YH6.mjs.map → chunk-MSVYA75Y.mjs.map} +0 -0
- /package/dist/esm/{chunk-WTHNSNAX.mjs.map → chunk-NIOGYWR4.mjs.map} +0 -0
- /package/dist/esm/{chunk-3EUOBVCT.mjs.map → chunk-O4MQVPLP.mjs.map} +0 -0
- /package/dist/esm/{chunk-WME5D6YR.mjs.map → chunk-OH5ADEJO.mjs.map} +0 -0
- /package/dist/esm/{chunk-52RTAMN7.mjs.map → chunk-P434YHBQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-TNVR7SNR.mjs.map → chunk-P633OFBI.mjs.map} +0 -0
- /package/dist/esm/{chunk-BBUAAJRA.mjs.map → chunk-PGZ67PEU.mjs.map} +0 -0
- /package/dist/esm/{chunk-B7M3OWHV.mjs.map → chunk-Q2V2K5AT.mjs.map} +0 -0
- /package/dist/esm/{chunk-ILJWEPDW.mjs.map → chunk-QG76NDGM.mjs.map} +0 -0
- /package/dist/esm/{chunk-F7MOQC7Z.mjs.map → chunk-RP4FMC6O.mjs.map} +0 -0
- /package/dist/esm/{chunk-J6MWD4XN.mjs.map → chunk-SASVQCT6.mjs.map} +0 -0
- /package/dist/esm/{chunk-VMXBMAYK.mjs.map → chunk-SKF6E6X7.mjs.map} +0 -0
- /package/dist/esm/{chunk-7D5LHQNS.mjs.map → chunk-SQW7K56J.mjs.map} +0 -0
- /package/dist/esm/{chunk-B2ZKW23W.mjs.map → chunk-TTM66JZ4.mjs.map} +0 -0
- /package/dist/esm/{chunk-UMLDKLDL.mjs.map → chunk-TVEFB6OB.mjs.map} +0 -0
- /package/dist/esm/{chunk-DGOT2VR5.mjs.map → chunk-UFD443TT.mjs.map} +0 -0
- /package/dist/esm/{chunk-ARIC32W7.mjs.map → chunk-UZUMQY43.mjs.map} +0 -0
- /package/dist/esm/{chunk-INORE66K.mjs.map → chunk-VHUFFKFT.mjs.map} +0 -0
- /package/dist/esm/{chunk-N65SOKJQ.mjs.map → chunk-VJUCSKNE.mjs.map} +0 -0
- /package/dist/esm/{chunk-N4RBQZ2B.mjs.map → chunk-VKWPCOZA.mjs.map} +0 -0
- /package/dist/esm/{chunk-GRJJBGHT.mjs.map → chunk-VN2YZGFJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-X5C3LYI7.mjs.map → chunk-W5PK4QCX.mjs.map} +0 -0
- /package/dist/esm/{chunk-PJNPLRPR.mjs.map → chunk-WHNLDDPT.mjs.map} +0 -0
- /package/dist/esm/{chunk-KWJTVJ7C.mjs.map → chunk-WT3OKY3G.mjs.map} +0 -0
- /package/dist/esm/{chunk-LMXP3JUU.mjs.map → chunk-XDZF5IUF.mjs.map} +0 -0
- /package/dist/esm/{chunk-OG56TYZE.mjs.map → chunk-XHUPYPN4.mjs.map} +0 -0
- /package/dist/esm/{chunk-G62HQC77.mjs.map → chunk-XM3BQ5L6.mjs.map} +0 -0
- /package/dist/esm/{chunk-XTPFQ4MH.mjs.map → chunk-Y7G5W2QZ.mjs.map} +0 -0
- /package/dist/esm/{publicKey-lq5djCIY.d.mts → publicKey-B3XRNhHO.d.mts} +0 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { FundResponse, UploadResponse } from '@irys/sdk/build/cjs/common/types';
|
|
2
|
+
import { Account } from '../core/account/index.mjs';
|
|
3
|
+
import { AptosConfig } from '../api/aptosConfig.mjs';
|
|
4
|
+
import '../transactions/authenticator/account.mjs';
|
|
5
|
+
import '../bcs/deserializer.mjs';
|
|
6
|
+
import '../types/index.mjs';
|
|
7
|
+
import '../utils/apiEndpoints.mjs';
|
|
8
|
+
import '../types/indexer.mjs';
|
|
9
|
+
import '../types/generated/operations.mjs';
|
|
10
|
+
import '../types/generated/types.mjs';
|
|
11
|
+
import '../bcs/serializer.mjs';
|
|
12
|
+
import '../core/hex.mjs';
|
|
13
|
+
import '../core/common.mjs';
|
|
14
|
+
import '../core/crypto/ed25519.mjs';
|
|
15
|
+
import '../publicKey-B3XRNhHO.mjs';
|
|
16
|
+
import '../core/accountAddress.mjs';
|
|
17
|
+
import '../transactions/instances/transactionArgument.mjs';
|
|
18
|
+
import '../core/crypto/signature.mjs';
|
|
19
|
+
import '../core/crypto/privateKey.mjs';
|
|
20
|
+
import '../core/crypto/multiEd25519.mjs';
|
|
21
|
+
import '../core/crypto/multiKey.mjs';
|
|
22
|
+
import '../core/crypto/singleKey.mjs';
|
|
23
|
+
import '../utils/const.mjs';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Shared interfae for asset uploader providers to implement
|
|
27
|
+
*
|
|
28
|
+
* When extending the SDK to use different providers, we need to have those
|
|
29
|
+
* function arguments inputs and outputs use generics.
|
|
30
|
+
*/
|
|
31
|
+
interface IAssetUploader {
|
|
32
|
+
fundNode(args: {
|
|
33
|
+
account: Account;
|
|
34
|
+
amount: number;
|
|
35
|
+
}): Promise<FundResponse>;
|
|
36
|
+
uploadData(args: {
|
|
37
|
+
account: Account;
|
|
38
|
+
data: string | Buffer;
|
|
39
|
+
options?: any;
|
|
40
|
+
}): Promise<UploadResponse>;
|
|
41
|
+
uploadFile(args: {
|
|
42
|
+
account: Account;
|
|
43
|
+
filePathToUpload: string;
|
|
44
|
+
options?: any;
|
|
45
|
+
}): Promise<UploadResponse>;
|
|
46
|
+
uploadFolder(args: {
|
|
47
|
+
account: Account;
|
|
48
|
+
folderToUpload: string;
|
|
49
|
+
options?: any;
|
|
50
|
+
}): Promise<UploadResponse | undefined>;
|
|
51
|
+
}
|
|
52
|
+
declare class AssetUploader {
|
|
53
|
+
readonly config: AptosConfig;
|
|
54
|
+
readonly assetUploader: IAssetUploader;
|
|
55
|
+
constructor(config: AptosConfig);
|
|
56
|
+
/**
|
|
57
|
+
* Funds the node you connected to with the specified amount of tokens
|
|
58
|
+
*
|
|
59
|
+
* @param args.account The account to sign and pay the fund transaction with
|
|
60
|
+
* @param args.amount The amount to fund the node in
|
|
61
|
+
*
|
|
62
|
+
* @return FundResponse
|
|
63
|
+
*/
|
|
64
|
+
fundNode(args: {
|
|
65
|
+
account: Account;
|
|
66
|
+
amount: number;
|
|
67
|
+
}): Promise<FundResponse>;
|
|
68
|
+
/**
|
|
69
|
+
* Upload a data
|
|
70
|
+
*
|
|
71
|
+
* @param args.account The account to sign and pay the fund transaction with
|
|
72
|
+
* @param args.data The data to upload
|
|
73
|
+
*
|
|
74
|
+
* @return UploadResponse
|
|
75
|
+
*/
|
|
76
|
+
uploadData(args: {
|
|
77
|
+
account: Account;
|
|
78
|
+
data: string | Buffer;
|
|
79
|
+
options?: any;
|
|
80
|
+
}): Promise<UploadResponse>;
|
|
81
|
+
/**
|
|
82
|
+
* Upload a file
|
|
83
|
+
*
|
|
84
|
+
* @param args.account The account to sign and pay the upload file transaction with
|
|
85
|
+
* @param args.filePathToUpload The file to upload as the file path
|
|
86
|
+
*
|
|
87
|
+
* @return UploadResponse
|
|
88
|
+
*/
|
|
89
|
+
uploadFile(args: {
|
|
90
|
+
account: Account;
|
|
91
|
+
filePathToUpload: string;
|
|
92
|
+
options?: any;
|
|
93
|
+
}): Promise<UploadResponse>;
|
|
94
|
+
/**
|
|
95
|
+
* Upload a folder
|
|
96
|
+
*
|
|
97
|
+
* @param args.account The account to sign and pay the upload folder transaction with
|
|
98
|
+
* @param args.folderToUpload The folder to upload as the folder path
|
|
99
|
+
*
|
|
100
|
+
* @return UploadResponse | undefined
|
|
101
|
+
*/
|
|
102
|
+
uploadFolder(args: {
|
|
103
|
+
account: Account;
|
|
104
|
+
folderToUpload: string;
|
|
105
|
+
options?: any;
|
|
106
|
+
}): Promise<UploadResponse | undefined>;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export { AssetUploader, type IAssetUploader };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export { AssetUploader, IAssetUploader } from './assetUploader.mjs';
|
|
2
|
+
import '@irys/sdk/build/cjs/common/types';
|
|
3
|
+
import '../core/account/index.mjs';
|
|
4
|
+
import '../transactions/authenticator/account.mjs';
|
|
5
|
+
import '../bcs/deserializer.mjs';
|
|
6
|
+
import '../types/index.mjs';
|
|
7
|
+
import '../utils/apiEndpoints.mjs';
|
|
8
|
+
import '../types/indexer.mjs';
|
|
9
|
+
import '../types/generated/operations.mjs';
|
|
10
|
+
import '../types/generated/types.mjs';
|
|
11
|
+
import '../bcs/serializer.mjs';
|
|
12
|
+
import '../core/hex.mjs';
|
|
13
|
+
import '../core/common.mjs';
|
|
14
|
+
import '../core/crypto/ed25519.mjs';
|
|
15
|
+
import '../publicKey-B3XRNhHO.mjs';
|
|
16
|
+
import '../core/accountAddress.mjs';
|
|
17
|
+
import '../transactions/instances/transactionArgument.mjs';
|
|
18
|
+
import '../core/crypto/signature.mjs';
|
|
19
|
+
import '../core/crypto/privateKey.mjs';
|
|
20
|
+
import '../core/crypto/multiEd25519.mjs';
|
|
21
|
+
import '../core/crypto/multiKey.mjs';
|
|
22
|
+
import '../core/crypto/singleKey.mjs';
|
|
23
|
+
import '../api/aptosConfig.mjs';
|
|
24
|
+
import '../utils/const.mjs';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"../chunk-L7ORFGZ7.mjs";import{a}from"../chunk-PISONN6H.mjs";import"../chunk-DQHNZBA5.mjs";import"../chunk-CYDWEPFL.mjs";import"../chunk-77SKA4HT.mjs";import"../chunk-HEPV52CH.mjs";import"../chunk-FVA2OPG4.mjs";export{a as AssetUploader};
|
|
2
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import Irys from '@irys/sdk';
|
|
2
|
+
import { FundResponse, CreateAndUploadOptions, UploadResponse } from '@irys/sdk/build/cjs/common/types';
|
|
3
|
+
import { Network } from '../utils/apiEndpoints.mjs';
|
|
4
|
+
import { Account } from '../core/account/index.mjs';
|
|
5
|
+
import { AptosConfig } from '../api/aptosConfig.mjs';
|
|
6
|
+
import { IAssetUploader } from './assetUploader.mjs';
|
|
7
|
+
import '../transactions/authenticator/account.mjs';
|
|
8
|
+
import '../bcs/deserializer.mjs';
|
|
9
|
+
import '../types/index.mjs';
|
|
10
|
+
import '../types/indexer.mjs';
|
|
11
|
+
import '../types/generated/operations.mjs';
|
|
12
|
+
import '../types/generated/types.mjs';
|
|
13
|
+
import '../bcs/serializer.mjs';
|
|
14
|
+
import '../core/hex.mjs';
|
|
15
|
+
import '../core/common.mjs';
|
|
16
|
+
import '../core/crypto/ed25519.mjs';
|
|
17
|
+
import '../publicKey-B3XRNhHO.mjs';
|
|
18
|
+
import '../core/accountAddress.mjs';
|
|
19
|
+
import '../transactions/instances/transactionArgument.mjs';
|
|
20
|
+
import '../core/crypto/signature.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
|
+
import '../utils/const.mjs';
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Irys asset uploader
|
|
29
|
+
*
|
|
30
|
+
* Keeping the class here for now for simplicity, when/if extending the SDK
|
|
31
|
+
* to more providers encourged to get this out to its own file
|
|
32
|
+
*/
|
|
33
|
+
declare class IrysAssetUploader implements IAssetUploader {
|
|
34
|
+
readonly config: AptosConfig;
|
|
35
|
+
constructor(config: AptosConfig);
|
|
36
|
+
resolveProvider(): {
|
|
37
|
+
irysNode: string;
|
|
38
|
+
providerUrl: Network;
|
|
39
|
+
};
|
|
40
|
+
getIrys(args: {
|
|
41
|
+
account: Account;
|
|
42
|
+
}): Promise<Irys>;
|
|
43
|
+
fundNode(args: {
|
|
44
|
+
account: Account;
|
|
45
|
+
amount: number;
|
|
46
|
+
}): Promise<FundResponse>;
|
|
47
|
+
uploadData(args: {
|
|
48
|
+
account: Account;
|
|
49
|
+
data: string | Buffer;
|
|
50
|
+
options?: CreateAndUploadOptions;
|
|
51
|
+
}): Promise<UploadResponse>;
|
|
52
|
+
uploadFile(args: {
|
|
53
|
+
account: Account;
|
|
54
|
+
filePathToUpload: string;
|
|
55
|
+
options?: CreateAndUploadOptions;
|
|
56
|
+
}): Promise<UploadResponse>;
|
|
57
|
+
uploadFolder(args: {
|
|
58
|
+
account: Account;
|
|
59
|
+
folderToUpload: string;
|
|
60
|
+
options?: any;
|
|
61
|
+
}): Promise<UploadResponse | undefined>;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export { IrysAssetUploader };
|
|
@@ -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 h}from"../chunk-
|
|
1
|
+
import"../chunk-FZY4PMEE.mjs";import{a as h}from"../chunk-2BGOMPDV.mjs";import{a as g}from"../chunk-TTM66JZ4.mjs";import{a as p,b as q,c as r}from"../chunk-RP4FMC6O.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-QDD2MDJZ.mjs";import{a as f}from"../chunk-6IFMQ5AS.mjs";import{a,b,c,d,e}from"../chunk-VKWPCOZA.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-BZMO6Q6L.mjs";import"../chunk-LG7RJQ57.mjs";import"../chunk-NCDLIACO.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-FVA2OPG4.mjs";export{i as Bool,f as Deserializer,h as EntryFunctionBytes,g as FixedBytes,r as MoveOption,q as MoveString,p as MoveVector,a as Serializable,b as Serializer,n as U128,k as U16,o as U256,l as U32,m as U64,j as U8,c as ensureBoolean,d as outOfRangeErrorMessage,e as validateNumberInRange};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-2BGOMPDV.mjs";import"../../chunk-TTM66JZ4.mjs";import"../../chunk-VKWPCOZA.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-BZMO6Q6L.mjs";import"../../chunk-LG7RJQ57.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-TTM66JZ4.mjs";import"../../chunk-VKWPCOZA.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-BZMO6Q6L.mjs";import"../../chunk-LG7RJQ57.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-QDD2MDJZ.mjs";import"../../chunk-VKWPCOZA.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-BZMO6Q6L.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-NCDLIACO.mjs";import"../../chunk-4WPQQPUF.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-RP4FMC6O.mjs";import"../../chunk-QDD2MDJZ.mjs";import"../../chunk-VKWPCOZA.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-BZMO6Q6L.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-NCDLIACO.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-FVA2OPG4.mjs";export{c as MoveOption,b as MoveString,a as MoveVector};
|
|
2
2
|
//# sourceMappingURL=moveStructs.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e}from"../chunk-VKWPCOZA.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-BZMO6Q6L.mjs";import"../chunk-LG7RJQ57.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
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as i}from"./chunk-TTM66JZ4.mjs";import{a as r}from"./chunk-VKWPCOZA.mjs";var t=class l extends r{constructor(e){super(),this.value=new i(e)}serialize(e){e.serialize(this.value)}serializeForEntryFunction(e){e.serializeU32AsUleb128(this.value.value.length),e.serialize(this)}static deserialize(e,s){let a=i.deserialize(e,s);return new l(a.value)}};export{t as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2BGOMPDV.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o,b as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o,b as r}from"./chunk-RP4FMC6O.mjs";import{e as u}from"./chunk-QDD2MDJZ.mjs";import{b as t}from"./chunk-GHMYWL3R.mjs";import{a as i}from"./chunk-VKWPCOZA.mjs";var c=class extends i{constructor(e){super();this.accountAddress=t.ONE;this.moduleName=new r("account");this.structName=new r("RotationProofChallenge");this.sequenceNumber=new u(e.sequenceNumber),this.originator=e.originator,this.currentAuthKey=e.currentAuthKey,this.newPublicKey=o.U8(e.newPublicKey.toUint8Array())}serialize(e){e.serialize(this.accountAddress),e.serialize(this.moduleName),e.serialize(this.structName),e.serialize(this.sequenceNumber),e.serialize(this.originator),e.serialize(this.currentAuthKey),e.serialize(this.newPublicKey)}};export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2TRSGKMS.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as s}from"./chunk-GHMYWL3R.mjs";import{g as n}from"./chunk-IF7ODXD7.mjs";import{p as g,u as d}from"./chunk-S4SEFF4K.mjs";async function m(e){let{aptosConfig:t,poolAddress:o}=e,r=s.from(o).toStringLong(),i=await n({aptosConfig:t,query:{query:d,variables:{where_condition:{pool_address:{_eq:r}}}}});return i.num_active_delegator_per_pool[0]?i.num_active_delegator_per_pool[0].num_active_delegator:0}async function f(e){let{aptosConfig:t,options:o}=e,r={query:d,variables:{order_by:o?.orderBy}};return(await n({aptosConfig:t,query:r})).num_active_delegator_per_pool}async function A(e){let{aptosConfig:t,delegatorAddress:o,poolAddress:r}=e,a={query:g,variables:{delegatorAddress:s.from(o).toStringLong(),poolAddress:s.from(r).toStringLong()}};return(await n({aptosConfig:t,query:a})).delegated_staking_activities}export{m as a,f as b,A as c};
|
|
2
|
+
//# sourceMappingURL=chunk-2ZLKKVWJ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as f}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as f}from"./chunk-P633OFBI.mjs";import{a as _}from"./chunk-V5GIZQF6.mjs";import{b as m}from"./chunk-JIC5IJLP.mjs";import{b as y}from"./chunk-I4RVDRYR.mjs";import{a as p}from"./chunk-XDZF5IUF.mjs";import{b as c}from"./chunk-GHMYWL3R.mjs";import{a as S}from"./chunk-AH44UPM4.mjs";import{d as v,g as d}from"./chunk-IF7ODXD7.mjs";import{d as C,e as h,f as w,g as k,h as T,j as b,k as O,l as q}from"./chunk-S4SEFF4K.mjs";import{b as g,c as A}from"./chunk-UFD443TT.mjs";import{a as l}from"./chunk-GHYE26Q5.mjs";async function M(e){let{aptosConfig:n,accountAddress:t}=e,{data:o}=await g({aptosConfig:n,originMethod:"getInfo",path:`accounts/${c.from(t).toString()}`});return o}async function go(e){let{aptosConfig:n,accountAddress:t,options:o}=e;return A({aptosConfig:n,originMethod:"getModules",path:`accounts/${c.from(t).toString()}/modules`,params:{ledger_version:o?.ledgerVersion,start:o?.offset,limit:o?.limit??1e3}})}async function Ao(e){return e.options?.ledgerVersion!==void 0?P(e):S(async()=>P(e),`module-${e.accountAddress}-${e.moduleName}`,1e3*60*5)()}async function P(e){let{aptosConfig:n,accountAddress:t,moduleName:o,options:r}=e,{data:s}=await g({aptosConfig:n,originMethod:"getModule",path:`accounts/${c.from(t).toString()}/module/${o}`,params:{ledger_version:r?.ledgerVersion}});return s}async function po(e){let{aptosConfig:n,accountAddress:t,options:o}=e;return A({aptosConfig:n,originMethod:"getTransactions",path:`accounts/${c.from(t).toString()}/transactions`,params:{start:o?.offset,limit:o?.limit}})}async function fo(e){let{aptosConfig:n,accountAddress:t,options:o}=e;return A({aptosConfig:n,originMethod:"getResources",path:`accounts/${c.from(t).toString()}/resources`,params:{ledger_version:o?.ledgerVersion,start:o?.offset,limit:o?.limit??999}})}async function K(e){let{aptosConfig:n,accountAddress:t,resourceType:o,options:r}=e,{data:s}=await g({aptosConfig:n,originMethod:"getResource",path:`accounts/${c.from(t).toString()}/resource/${o}`,params:{ledger_version:r?.ledgerVersion}});return s.data}async function Q(e){let{aptosConfig:n,authenticationKey:t,options:o}=e,r=await K({aptosConfig:n,accountAddress:"0x1",resourceType:"0x1::account::OriginatingAddress",options:o}),{address_map:{handle:s}}=r,a=c.from(t);try{let i=await v({aptosConfig:n,handle:s,data:{key:a.toString(),key_type:"address",value_type:"address"},options:o});return c.from(i)}catch(i){if(i instanceof l&&i.data.error_code==="table_item_not_found")return a;throw i}}async function lo(e){let{aptosConfig:n,accountAddress:t}=e,r={owner_address:{_eq:c.from(t).toStringLong()},amount:{_gt:0}},a=await d({aptosConfig:n,query:{query:O,variables:{where_condition:r}},originMethod:"getAccountTokensCount"});return a.current_token_ownerships_v2_aggregate.aggregate?a.current_token_ownerships_v2_aggregate.aggregate.count:0}async function yo(e){let{aptosConfig:n,accountAddress:t,options:o}=e,s={owner_address:{_eq:c.from(t).toStringLong()},amount:{_gt:0}};o?.tokenStandard&&(s.token_standard={_eq:o?.tokenStandard});let a={query:T,variables:{where_condition:s,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountOwnedTokens"})).current_token_ownerships_v2}async function mo(e){let{aptosConfig:n,accountAddress:t,collectionAddress:o,options:r}=e,s=c.from(t).toStringLong(),a=c.from(o).toStringLong(),i={owner_address:{_eq:s},current_token_data:{collection_id:{_eq:a}},amount:{_gt:0}};r?.tokenStandard&&(i.token_standard={_eq:r?.tokenStandard});let u={query:b,variables:{where_condition:i,offset:r?.offset,limit:r?.limit,order_by:r?.orderBy}};return(await d({aptosConfig:n,query:u,originMethod:"getAccountOwnedTokensFromCollectionAddress"})).current_token_ownerships_v2}async function _o(e){let{aptosConfig:n,accountAddress:t,options:o}=e,s={owner_address:{_eq:c.from(t).toStringLong()},amount:{_gt:0}};o?.tokenStandard&&(s.current_collection={token_standard:{_eq:o?.tokenStandard}});let a={query:w,variables:{where_condition:s,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountCollectionsWithOwnedTokens"})).current_collection_ownership_v2_view}async function Co(e){let{aptosConfig:n,accountAddress:t}=e,o=c.from(t).toStringLong(),s=await d({aptosConfig:n,query:{query:q,variables:{address:o}},originMethod:"getAccountTransactionsCount"});return s.account_transactions_aggregate.aggregate?s.account_transactions_aggregate.aggregate.count:0}async function ho(e){let{aptosConfig:n,accountAddress:t,coinType:o}=e,r=c.from(t).toStringLong(),s=await I({aptosConfig:n,accountAddress:r,options:{where:{asset_type:{_eq:o}}}});return s[0]?s[0].amount:0}async function I(e){let{aptosConfig:n,accountAddress:t,options:o}=e,r=c.from(t).toStringLong(),s={...o?.where,owner_address:{_eq:r}},a={query:h,variables:{where_condition:s,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountCoinsData"})).current_fungible_asset_balances}async function wo(e){let{aptosConfig:n,accountAddress:t}=e,o=c.from(t).toStringLong(),s=await d({aptosConfig:n,query:{query:C,variables:{address:o}},originMethod:"getAccountCoinsCount"});if(!s.current_fungible_asset_balances_aggregate.aggregate)throw Error("Failed to get the count of account coins");return s.current_fungible_asset_balances_aggregate.aggregate.count}async function ko(e){let{aptosConfig:n,accountAddress:t,options:o}=e,s={owner_address:{_eq:c.from(t).toStringLong()}},a={query:k,variables:{where_condition:s,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountOwnedObjects"})).current_objects}async function To(e){let{aptosConfig:n,privateKey:t}=e,o=new _(t.publicKey());if(t instanceof m){let s=p.fromPublicKeyAndScheme({publicKey:o,scheme:2}).derivedAddress();return f.fromPrivateKeyAndAddress({privateKey:t,address:s})}if(t instanceof y){let r=p.fromPublicKeyAndScheme({publicKey:o,scheme:2});if(await G({authKey:r,aptosConfig:n})){let u=r.derivedAddress();return f.fromPrivateKeyAndAddress({privateKey:t,address:u,legacy:!1})}let a=p.fromPublicKeyAndScheme({publicKey:o.publicKey,scheme:0});if(await G({authKey:a,aptosConfig:n})){let u=a.derivedAddress();return f.fromPrivateKeyAndAddress({privateKey:t,address:u,legacy:!0})}}throw new Error(`Can't derive account from private key ${t}`)}async function G(e){let{aptosConfig:n,authKey:t}=e,o=await Q({aptosConfig:n,authenticationKey:t.derivedAddress()});try{return await M({aptosConfig:n,accountAddress:o}),!0}catch(r){if(r.status===404)return!1;throw new Error(`Error while looking for an account info ${o.toString()}`)}}export{M as a,go as b,Ao as c,po as d,fo as e,K as f,Q as g,lo as h,yo as i,mo as j,_o as k,Co as l,ho as m,I as n,wo as o,ko as p,To as q,G as r};
|
|
2
|
+
//# sourceMappingURL=chunk-4PCEBFIT.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as i}from"./chunk-UZUMQY43.mjs";import{a as e}from"./chunk-W5PK4QCX.mjs";import{a as r}from"./chunk-VKWPCOZA.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=e.deserialize(t),s=i.deserialize(t);return new o(a,s)}};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-52PEPCCF.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as d}from"./chunk-WT3OKY3G.mjs";import{d as M}from"./chunk-XHUPYPN4.mjs";import{c as V}from"./chunk-JX3IRXNX.mjs";import{b as w,f as v,i as G,l as A,m as f,n as s,q as p,s as g}from"./chunk-WHNLDDPT.mjs";import{a as I,b as u}from"./chunk-RP4FMC6O.mjs";import{a as T,e as S}from"./chunk-QDD2MDJZ.mjs";import{b as c}from"./chunk-GHMYWL3R.mjs";import{d as O}from"./chunk-56CNRT2K.mjs";import{g as b}from"./chunk-IF7ODXD7.mjs";import{n as h,w as E,x,y as q}from"./chunk-S4SEFF4K.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 _t(t){let{aptosConfig:o,digitalAssetAddress:n}=t,e={token_data_id:{_eq:c.from(n).toStringLong()}};return(await b({aptosConfig:o,query:{query:q,variables:{where_condition:e}},originMethod:"getDigitalAssetData"})).current_token_datas_v2[0]}async function Pt(t){let{aptosConfig:o,digitalAssetAddress:n}=t,e={token_data_id:{_eq:c.from(n).toStringLong()}};return(await b({aptosConfig:o,query:{query:x,variables:{where_condition:e}},originMethod:"getCurrentDigitalAssetOwnership"})).current_token_ownerships_v2[0]}async function kt(t){let{aptosConfig:o,ownerAddress:n,options:e}=t,r={owner_address:{_eq:c.from(n).toStringLong()},amount:{_gt:0}},i={query:x,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 Dt(t){let{aptosConfig:o,digitalAssetAddress:n,options:e}=t,r={token_data_id:{_eq:c.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 St(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 u(t.description),new S(t.maxSupply??O),new u(t.name),new u(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=c.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:h,variables:{where_condition:a}},originMethod:"getCollectionData"})).current_collections_v2[0]}async function vt(t){let{aptosConfig:o,collectionId:n}=t,r={collection_id:{_eq:c.from(n).toStringLong()}};return(await b({aptosConfig:o,query:{query:h,variables:{where_condition:r}},originMethod:"getCollectionData"})).current_collections_v2[0]}async function ht(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 xt(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 u(r),new u(i),new u(a),new u(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 G]};async function Gt(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:[c.from(e),c.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 G]};async function Bt(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 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::burn",typeArguments:[r??m],functionArguments:[c.from(e)],abi:z},options:i})}var L={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::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 qt(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 Vt(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:[c.from(r),new u(e)],abi:X},options:a})}var H={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p())]};async function Mt(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:[c.from(r),new u(e)],abi:H},options:a})}var J={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p())]};async function Rt(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:[c.from(r),new u(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 Kt(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:[c.from(a),new u(e),new u(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 Qt(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:[c.from(r),new u(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 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::update_property",typeArguments:[l??m],functionArguments:[c.from(a),new u(e),new u(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 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::add_typed_property",typeArguments:[l??m,C[r]],functionArguments:[c.from(a),new u(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 Nt(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:[c.from(a),new u(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{_t as a,Pt as b,kt as c,Dt as d,St as e,U as f,vt as g,ht as h,xt as i,Gt as j,Bt as k,Ot as l,Et as m,qt as n,Vt as o,Mt as p,Rt as q,Kt as r,Qt as s,Ut as t,Ft as u,Nt as v};
|
|
2
|
+
//# sourceMappingURL=chunk-5VY5VSRG.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-5VY5VSRG.mjs";import{a as e}from"./chunk-TVEFB6OB.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-7FMG66Z4.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-TVEFB6OB.mjs";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-4PCEBFIT.mjs";import{e as o}from"./chunk-HEPV52CH.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-7TPQMQK4.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-WT3OKY3G.mjs";import{c}from"./chunk-JX3IRXNX.mjs";import{f as g,i as A}from"./chunk-WHNLDDPT.mjs";import{g as o}from"./chunk-IF7ODXD7.mjs";import{o as a,r,s as u}from"./chunk-S4SEFF4K.mjs";async function h(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:"getFungibleAssetMetadata"})).fungible_asset_metadata}async function M(t){let{aptosConfig:s,options:e}=t,n={query:r,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 x(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:"getCurrentFungibleAssetBalances"})).current_fungible_asset_balances}var b={typeParameters:[],parameters:[c("0x1::object::Object"),new A,new g]};async function v(t){let{aptosConfig:s,sender:e,fungibleAssetMetadataAddress:n,recipient:i,amount:p,options:f}=t;return l({aptosConfig:s,sender:e.accountAddress,data:{function:"0x1::primary_fungible_store::transfer",typeArguments:["0x1::fungible_asset::Metadata"],functionArguments:[n,i,p],abi:b},options:f})}export{h as a,M as b,x as c,v as d};
|
|
2
|
+
//# sourceMappingURL=chunk-AK75KOT3.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as c}from"./chunk-GHMYWL3R.mjs";import{f as e}from"./chunk-O4MQVPLP.mjs";import{d as r}from"./chunk-GE7VQ5NZ.mjs";import{d as s}from"./chunk-HEPV52CH.mjs";async function x(a){let{aptosConfig:t,accountAddress:i,amount:p,options:n}=a,u=n?.timeoutSecs||20,{data:d}=await r({aptosConfig:t,path:"fund",body:{address:c.from(i).toString(),amount:p},originMethod:"fundAccount"}),m=d.txn_hashes[0],o=await e({aptosConfig:t,transactionHash:m,options:{timeoutSecs:u,checkSuccess:n?.checkSuccess}});if(o.type==="user_transaction")return o;throw new Error(`Unexpected transaction received for fund account: ${o.type}`)}export{x as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ALXMJOCO.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-ALXMJOCO.mjs";import{g as t}from"./chunk-O4MQVPLP.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-BVAY3B44.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-FZIAMWFX.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-BYODEYSX.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-LG7RJQ57.mjs";import{bytesToHex as s,hexToBytes as o}from"@noble/hashes/utils";var l=(e=>(e.TOO_SHORT="too_short",e.INVALID_LENGTH="invalid_length",e.INVALID_HEX_CHARS="invalid_hex_chars",e))(l||{}),i=class n{constructor(t){this.data=t}toUint8Array(){return this.data}toStringWithoutPrefix(){return s(this.data)}toString(){return`0x${this.toStringWithoutPrefix()}`}static fromString(t){let r=t;if(r.startsWith("0x")&&(r=r.slice(2)),r.length===0)throw new a("Hex string is too short, must be at least 1 char long, excluding the optional leading 0x.","too_short");if(r.length%2!==0)throw new a("Hex string must be an even number of hex characters.","invalid_length");try{return new n(o(r))}catch(e){throw new a(`Hex string contains invalid hex characters: ${e?.message}`,"invalid_hex_chars")}}static fromHexInput(t){return t instanceof Uint8Array?new n(t):n.fromString(t)}static isValid(t){try{return n.fromString(t),{valid:!0}}catch(r){return{valid:!1,invalidReason:r?.invalidReason,invalidReasonMessage:r?.message}}}equals(t){return this.data.length!==t.data.length?!1:this.data.every((r,e)=>r===t.data[e])}};export{l as a,i as b};
|
|
2
|
+
//# sourceMappingURL=chunk-BZMO6Q6L.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o,b as s,c as t,d as r,e as n,f as i,g as a,i as g,j as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o,b as s,c as t,d as r,e as n,f as i,g as a,i as g,j as c}from"./chunk-IF7ODXD7.mjs";var u=class{constructor(e){this.config=e}async getLedgerInfo(){return o({aptosConfig:this.config})}async getChainId(){return(await this.getLedgerInfo()).chain_id}async getBlockByVersion(e){return s({aptosConfig:this.config,...e})}async getBlockByHeight(e){return t({aptosConfig:this.config,...e})}async getTableItem(e){return r({aptosConfig:this.config,...e})}async view(e){return n({aptosConfig:this.config,...e})}async getChainTopUserTransactions(e){return i({aptosConfig:this.config,...e})}async queryIndexer(e){return a({aptosConfig:this.config,...e})}async getIndexerLastSuccessVersion(){return g({aptosConfig:this.config})}async getProcessorStatus(e){return c({aptosConfig:this.config,processorType:e})}};export{u as a};
|
|
2
|
+
//# sourceMappingURL=chunk-CNHM36ZH.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c,b as h}from"./chunk-V5GIZQF6.mjs";import{a as g}from"./chunk-OH5ADEJO.mjs";import{b as m}from"./chunk-IWPVPIKD.mjs";import{a as b}from"./chunk-XDZF5IUF.mjs";function p(l){let e=l;return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),(e+(e>>4)&252645135)*16843009>>24}var f=class l extends m{constructor(e){super();let{publicKeys:s,signaturesRequired:t}=e;if(t<1)throw new Error("The number of required signatures needs to be greater than 0");if(s.length<t)throw new Error(`Provided ${s.length} public keys is smaller than the ${t} required signatures`);this.publicKeys=s.map(r=>r instanceof c?r:new c(r)),this.signaturesRequired=t}verifySignature(e){throw new Error("not implemented")}authKey(){return b.fromSchemeAndBytes({scheme:3,input:this.toUint8Array()})}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeVector(this.publicKeys),e.serializeU8(this.signaturesRequired)}static deserialize(e){let s=e.deserializeVector(c),t=e.deserializeU8();return new l({publicKeys:s,signaturesRequired:t})}createBitmap(e){let{bits:s}=e,t=128,r=new Uint8Array([0,0,0,0]),n=new Set;return s.forEach((i,o)=>{if(o+1>this.publicKeys.length)throw new Error(`Signature index ${o+1} is out of public keys range, ${this.publicKeys.length}.`);if(n.has(i))throw new Error(`Duplicate bit ${i} detected.`);n.add(i);let u=Math.floor(i/8),y=r[u];y|=t>>i%8,r[u]=y}),r}},a=class a extends g{constructor(e){super();let{signatures:s,bitmap:t}=e;if(s.length>a.MAX_SIGNATURES_SUPPORTED)throw new Error(`The number of signatures cannot be greater than ${a.MAX_SIGNATURES_SUPPORTED}`);if(this.signatures=s.map(n=>n instanceof h?n:new h(n)),!(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}let r=this.bitmap.reduce((n,i)=>n+p(i),0);if(r!==this.signatures.length)throw new Error(`Expecting ${r} signatures from the bitmap, but got ${this.signatures.length}`)}static createBitmap(e){let{bits:s}=e,t=128,r=new Uint8Array([0,0,0,0]),n=new Set;return s.forEach(i=>{if(i>=a.MAX_SIGNATURES_SUPPORTED)throw new Error(`Cannot have a signature larger than ${a.MAX_SIGNATURES_SUPPORTED-1}.`);if(n.has(i))throw new Error("Duplicate bits detected.");n.add(i);let o=Math.floor(i/8),u=r[o];u|=t>>i%8,r[o]=u}),r}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeVector(this.signatures),e.serializeBytes(this.bitmap)}static deserialize(e){let s=e.deserializeBytes(),t=s.reduce((n,i)=>n+p(i),0),r=[];for(let n=0;n<t;n+=1){let i=h.deserialize(e);r.push(i)}return new a({signatures:r,bitmap:s})}};a.BITMAP_LEN=4,a.MAX_SIGNATURES_SUPPORTED=a.BITMAP_LEN*8;var A=a;export{f as a,A as b};
|
|
2
|
+
//# sourceMappingURL=chunk-CSXY6Z3K.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o,b as r,c as t,d as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o,b as r,c as t,d as s}from"./chunk-VHUFFKFT.mjs";import{a as n}from"./chunk-TVEFB6OB.mjs";var i=class{constructor(e){this.config=e}async getModuleEventsByEventType(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),o({aptosConfig:this.config,...e})}async getAccountEventsByCreationNumber(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),r({aptosConfig:this.config,...e})}async getAccountEventsByEventType(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),t({aptosConfig:this.config,...e})}async getEvents(e){return await n({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"events_processor"}),s({aptosConfig:this.config,...e})}};export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-CXB2C2SJ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-FYZLJM4W.mjs";import{a as o,b as c}from"./chunk-U6Z4FNB7.mjs";import{a as h,h as d}from"./chunk-WT3OKY3G.mjs";import{f as u}from"./chunk-O4MQVPLP.mjs";import g from"eventemitter3";var p="fulfilled",T=(n=>(n.TransactionSent="transactionSent",n.TransactionSendFailed="transactionSendFailed",n.TransactionExecuted="transactionExecuted",n.TransactionExecutionFailed="transactionExecutionFailed",n.ExecutionFinish="executionFinish",n))(T||{}),m=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===p?(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===p?(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{p as a,T as b,m as c};
|
|
2
|
+
//# sourceMappingURL=chunk-DHQWLSD6.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as b,b as p}from"./chunk-FE5USPGB.mjs";import{a as h}from"./chunk-CSXY6Z3K.mjs";import{a as g,b as c}from"./chunk-V5GIZQF6.mjs";import{a as y,c as d}from"./chunk-I4RVDRYR.mjs";import{a as o}from"./chunk-VKWPCOZA.mjs";var r=class extends o{static deserialize(i){let e=i.deserializeUleb128AsU32();switch(e){case 0:return n.load(i);case 1:return a.load(i);case 2:return u.load(i);case 3:return l.load(i);default:throw new Error(`Unknown variant index for AccountAuthenticator: ${e}`)}}isEd25519(){return this instanceof n}isMultiEd25519(){return this instanceof a}isSingleKey(){return this instanceof u}isMultiKey(){return this instanceof l}},n=class s extends r{constructor(i,e){super(),this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(0),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=y.deserialize(i),t=d.deserialize(i);return new s(e,t)}},a=class s extends r{constructor(i,e){super(),this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(1),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=b.deserialize(i),t=p.deserialize(i);return new s(e,t)}},u=class s extends r{constructor(i,e){super(),this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(2),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=g.deserialize(i),t=c.deserialize(i);return new s(e,t)}},l=class s extends r{constructor(i,e,t){super(),this.public_keys=i,this.signatures=e,this.signatures_bitmap=t}serialize(i){i.serializeU32AsUleb128(3),this.public_keys.serialize(i),i.serializeVector(this.signatures),i.serializeBytes(this.signatures_bitmap)}static load(i){let e=h.deserialize(i),t=i.deserializeVector(c),A=i.deserializeBytes();return new s(e,t,A)}};export{r as a,n as b,a as c,u as d,l as e};
|
|
2
|
+
//# sourceMappingURL=chunk-DPHEHCIM.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import a from"@irys/sdk";var i=class{constructor(o){this.config=o}resolveProvider(){switch(this.config.network){case"devnet":throw new Error("Irys does not support Aptos' devnet");case"testnet":return{irysNode:"devnet",providerUrl:"testnet"};case"mainnet":return{irysNode:"node1",providerUrl:"mainnet"};default:throw new Error("Unsopported network")}}async getIrys(o){let{irysNode:r,providerUrl:t}=this.resolveProvider();return a.init({url:r,token:"aptos",publicKey:o.account.publicKey.toString(),providerUrl:t,signingFunction:async n=>o.account.sign(n).toUint8Array()})}async fundNode(o){let{account:r,amount:t}=o,e=await this.getIrys({account:r});try{return await e.fund(t)}catch(n){throw new Error(`Error funding irys node ${n}`)}}async uploadData(o){let{account:r,data:t,options:e}=o,n=await this.getIrys({account:r});try{return await n.upload(t,e)}catch(s){throw new Error(`Error funding data to irys ${s}`)}}async uploadFile(o){let{account:r,filePathToUpload:t,options:e}=o,n=await this.getIrys({account:r});try{return await n.uploadFile(t,e)}catch(s){throw new Error(`Error uploading file to irys ${s}`)}}async uploadFolder(o){let{account:r,folderToUpload:t,options:e}=o,n=await this.getIrys({account:r});try{return await n.uploadFolder(t,e)}catch(s){throw new Error(`Error uploading folder to irys ${s}`)}}};export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DQHNZBA5.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/assetUploader/irys.ts"],"sourcesContent":["import Irys from \"@irys/sdk\";\nimport type { FundResponse, CreateAndUploadOptions, UploadResponse } from \"@irys/sdk/build/cjs/common/types\";\nimport { AptosConfig } from \"../api\";\nimport { Account } from \"../core\";\nimport { Network } from \"../utils\";\nimport { IAssetUploader } from \"./assetUploader\";\n\n/**\n * Irys asset uploader\n *\n * Keeping the class here for now for simplicity, when/if extending the SDK\n * to more providers encourged to get this out to its own file\n */\nexport class IrysAssetUploader implements IAssetUploader {\n readonly config: AptosConfig;\n\n constructor(config: AptosConfig) {\n this.config = config;\n }\n\n resolveProvider(): { irysNode: string; providerUrl: Network } {\n switch (this.config.network) {\n case Network.DEVNET:\n // Irys does not support Aptos' devnet\n throw new Error(\"Irys does not support Aptos' devnet\");\n case Network.TESTNET:\n return { irysNode: \"devnet\", providerUrl: Network.TESTNET };\n case Network.MAINNET:\n // Irys supports node1 and node2, there is no major difference between\n // those and it is recommended to simply use node1\n return { irysNode: \"node1\", providerUrl: Network.MAINNET };\n default:\n throw new Error(\"Unsopported network\");\n }\n }\n\n async getIrys(args: { account: Account }) {\n const { irysNode, providerUrl } = this.resolveProvider();\n const irys = Irys.init({\n url: irysNode, // Irys node\n token: \"aptos\", // Token used for payment and signing\n publicKey: args.account.publicKey.toString(), // Aptos wallet publicKey\n providerUrl: providerUrl, // Aptos Network\n signingFunction: async (msg: Uint8Array) => args.account.sign(msg).toUint8Array(), // Signing function Irys will use\n });\n return irys;\n }\n\n async fundNode(args: { account: Account; amount: number }): Promise<FundResponse> {\n const { account, amount } = args;\n const irys = await this.getIrys({ account });\n try {\n return await irys.fund(amount);\n } catch (e) {\n throw new Error(`Error funding irys node ${e}`);\n }\n }\n\n async uploadData(args: {\n account: Account;\n data: string | Buffer;\n options?: CreateAndUploadOptions;\n }): Promise<UploadResponse> {\n const { account, data, options } = args;\n const irys = await this.getIrys({ account });\n try {\n return await irys.upload(data, options);\n } catch (e) {\n throw new Error(`Error funding data to irys ${e}`);\n }\n }\n\n async uploadFile(args: {\n account: Account;\n filePathToUpload: string;\n options?: CreateAndUploadOptions;\n }): Promise<UploadResponse> {\n const { account, filePathToUpload, options } = args;\n const irys = await this.getIrys({ account });\n\n try {\n return await irys.uploadFile(filePathToUpload, options);\n } catch (e) {\n throw new Error(`Error uploading file to irys ${e}`);\n }\n }\n\n async uploadFolder(args: {\n account: Account;\n folderToUpload: string;\n options?: any;\n }): Promise<UploadResponse | undefined> {\n const { account, folderToUpload, options } = args;\n const irys = await this.getIrys({ account });\n\n try {\n return await irys.uploadFolder(folderToUpload, options);\n } catch (e) {\n throw new Error(`Error uploading folder to irys ${e}`);\n }\n }\n}\n"],"mappings":"AAAA,OAAOA,MAAU,YAaV,IAAMC,EAAN,KAAkD,CAGvD,YAAYC,EAAqB,CAC/B,KAAK,OAASA,CAChB,CAEA,iBAA8D,CAC5D,OAAQ,KAAK,OAAO,QAAS,CAC3B,aAEE,MAAM,IAAI,MAAM,qCAAqC,EACvD,cACE,MAAO,CAAE,SAAU,SAAU,qBAA6B,EAC5D,cAGE,MAAO,CAAE,SAAU,QAAS,qBAA6B,EAC3D,QACE,MAAM,IAAI,MAAM,qBAAqB,CACzC,CACF,CAEA,MAAM,QAAQC,EAA4B,CACxC,GAAM,CAAE,SAAAC,EAAU,YAAAC,CAAY,EAAI,KAAK,gBAAgB,EAQvD,OAPaC,EAAK,KAAK,CACrB,IAAKF,EACL,MAAO,QACP,UAAWD,EAAK,QAAQ,UAAU,SAAS,EAC3C,YAAaE,EACb,gBAAiB,MAAOE,GAAoBJ,EAAK,QAAQ,KAAKI,CAAG,EAAE,aAAa,CAClF,CAAC,CAEH,CAEA,MAAM,SAASJ,EAAmE,CAChF,GAAM,CAAE,QAAAK,EAAS,OAAAC,CAAO,EAAIN,EACtBO,EAAO,MAAM,KAAK,QAAQ,CAAE,QAAAF,CAAQ,CAAC,EAC3C,GAAI,CACF,OAAO,MAAME,EAAK,KAAKD,CAAM,CAC/B,OAASE,EAAG,CACV,MAAM,IAAI,MAAM,2BAA2BA,CAAC,EAAE,CAChD,CACF,CAEA,MAAM,WAAWR,EAIW,CAC1B,GAAM,CAAE,QAAAK,EAAS,KAAAI,EAAM,QAAAC,CAAQ,EAAIV,EAC7BO,EAAO,MAAM,KAAK,QAAQ,CAAE,QAAAF,CAAQ,CAAC,EAC3C,GAAI,CACF,OAAO,MAAME,EAAK,OAAOE,EAAMC,CAAO,CACxC,OAASF,EAAG,CACV,MAAM,IAAI,MAAM,8BAA8BA,CAAC,EAAE,CACnD,CACF,CAEA,MAAM,WAAWR,EAIW,CAC1B,GAAM,CAAE,QAAAK,EAAS,iBAAAM,EAAkB,QAAAD,CAAQ,EAAIV,EACzCO,EAAO,MAAM,KAAK,QAAQ,CAAE,QAAAF,CAAQ,CAAC,EAE3C,GAAI,CACF,OAAO,MAAME,EAAK,WAAWI,EAAkBD,CAAO,CACxD,OAASF,EAAG,CACV,MAAM,IAAI,MAAM,gCAAgCA,CAAC,EAAE,CACrD,CACF,CAEA,MAAM,aAAaR,EAIqB,CACtC,GAAM,CAAE,QAAAK,EAAS,eAAAO,EAAgB,QAAAF,CAAQ,EAAIV,EACvCO,EAAO,MAAM,KAAK,QAAQ,CAAE,QAAAF,CAAQ,CAAC,EAE3C,GAAI,CACF,OAAO,MAAME,EAAK,aAAaK,EAAgBF,CAAO,CACxD,OAASF,EAAG,CACV,MAAM,IAAI,MAAM,kCAAkCA,CAAC,EAAE,CACvD,CACF,CACF","names":["Irys","IrysAssetUploader","config","args","irysNode","providerUrl","Irys","msg","account","amount","irys","e","data","options","filePathToUpload","folderToUpload"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-6EMN3BOV.mjs";import{g as a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-6EMN3BOV.mjs";import{g as a}from"./chunk-WT3OKY3G.mjs";import{a as o}from"./chunk-FVA2OPG4.mjs";var n=class{constructor(t){this.config=t}async simple(t){return a({aptosConfig:this.config,...t})}async multiAgent(t){return a({aptosConfig:this.config,...t})}};o([i],n.prototype,"simple",1),o([i],n.prototype,"multiAgent",1);export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EGUJAHAO.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-I4RVDRYR.mjs";import{a as p}from"./chunk-OH5ADEJO.mjs";import{b as E}from"./chunk-IWPVPIKD.mjs";import{a as g}from"./chunk-XDZF5IUF.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-FE5USPGB.mjs.map
|