@aptos-labs/ts-sdk 1.9.1-plugin.7 → 1.9.1-plugin.8
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 +6 -5
- package/dist/common/index.js +1 -1
- package/dist/common/index.js.map +1 -1
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.mjs +1 -1
- 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.d.mts +1 -1
- package/dist/esm/api/general.mjs +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.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/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/{chunk-7WNQNTZ5.mjs → chunk-27644ALO.mjs} +2 -2
- package/dist/esm/{chunk-5NUX2OGU.mjs → chunk-2MWFPMJU.mjs} +2 -2
- package/dist/esm/{chunk-GTWCLFSO.mjs → chunk-53UNV6UP.mjs} +2 -2
- package/dist/esm/{chunk-P4JLMPCP.mjs → chunk-5BPCJWJ3.mjs} +2 -2
- package/dist/esm/{chunk-RI5FYQIT.mjs → chunk-5JCZRKJG.mjs} +2 -2
- package/dist/esm/{chunk-2RRFFRBV.mjs → chunk-77CVU2W7.mjs} +2 -2
- package/dist/esm/{chunk-TC4AF4TT.mjs → chunk-7N6YF6JO.mjs} +2 -2
- package/dist/esm/{chunk-KVWSL76Z.mjs → chunk-BTO7WDIW.mjs} +2 -2
- package/dist/esm/{chunk-ITKRS54D.mjs → chunk-BUU7JCLF.mjs} +2 -2
- package/dist/esm/{chunk-5FWN3ASG.mjs → chunk-DLGGNSKF.mjs} +2 -2
- package/dist/esm/{chunk-P3CMSOX6.mjs → chunk-E36XGHUE.mjs} +2 -2
- package/dist/esm/{chunk-OP4VV2UO.mjs → chunk-ETGZG4G7.mjs} +2 -2
- package/dist/esm/{chunk-T3434WYA.mjs → chunk-FYVPCKSW.mjs} +2 -2
- package/dist/esm/{chunk-JJS3Y3WT.mjs → chunk-GSCUF6XW.mjs} +2 -2
- package/dist/esm/{chunk-SPKBGDFY.mjs → chunk-ICK2XO6A.mjs} +2 -2
- package/dist/esm/{chunk-JVDLBAAL.mjs → chunk-IQJJRNHK.mjs} +2 -2
- package/dist/esm/{chunk-PATJMQAG.mjs → chunk-IUZCNQ7D.mjs} +2 -2
- package/dist/esm/{chunk-2FQW5ZSM.mjs → chunk-J22AZHQT.mjs} +2 -2
- package/dist/esm/{chunk-4OELG2AL.mjs → chunk-JOIUR5QW.mjs} +2 -2
- package/dist/esm/{chunk-LKKOIIBF.mjs → chunk-JPNK6EKM.mjs} +2 -2
- package/dist/esm/{chunk-O5WB3GB6.mjs → chunk-L354LBX4.mjs} +2 -2
- package/dist/esm/{chunk-VU2CNQVS.mjs → chunk-LIU6DQQJ.mjs} +2 -2
- package/dist/esm/{chunk-54SDZFVL.mjs → chunk-LWQHVABO.mjs} +2 -2
- package/dist/esm/{chunk-JB7ZOUYL.mjs → chunk-MUKBXGU3.mjs} +2 -2
- package/dist/esm/{chunk-O25IJ3Q3.mjs → chunk-NF35PRGD.mjs} +2 -2
- package/dist/esm/{chunk-CVEJHRAU.mjs → chunk-NMNR3QST.mjs} +1 -1
- package/dist/esm/{chunk-CVEJHRAU.mjs.map → chunk-NMNR3QST.mjs.map} +1 -1
- package/dist/esm/{chunk-AJRBTHDS.mjs → chunk-NUBFOYQZ.mjs} +2 -2
- package/dist/esm/{chunk-QGPI74JX.mjs → chunk-OBSG3724.mjs} +2 -2
- package/dist/esm/{chunk-ABMVXTVA.mjs → chunk-Q6YMSZLY.mjs} +2 -2
- package/dist/esm/{chunk-O4EVRHDH.mjs → chunk-QJ2OLGAW.mjs} +2 -2
- package/dist/esm/{chunk-ZAMLI7FP.mjs → chunk-RNFDAXUZ.mjs} +2 -2
- package/dist/esm/{chunk-6KKEGX5H.mjs → chunk-SCYVRDJI.mjs} +2 -2
- package/dist/esm/{chunk-OYQRQC4Z.mjs → chunk-SEAOSYSZ.mjs} +2 -2
- package/dist/esm/{chunk-GNMX2QXW.mjs → chunk-TB5WN5G6.mjs} +2 -2
- package/dist/esm/chunk-TB5WN5G6.mjs.map +1 -0
- package/dist/esm/{chunk-PEDUQZ3V.mjs → chunk-THHBTHEO.mjs} +2 -2
- package/dist/esm/{chunk-JXST37IU.mjs → chunk-U4JXJ3UN.mjs} +2 -2
- package/dist/esm/chunk-U6SLSQ5W.mjs +2 -0
- package/dist/esm/chunk-U6SLSQ5W.mjs.map +1 -0
- package/dist/esm/{chunk-CTBCXJAY.mjs → chunk-UVTSJ2KP.mjs} +2 -2
- package/dist/esm/chunk-VDQYAGHU.mjs +2 -0
- package/dist/esm/chunk-VDQYAGHU.mjs.map +1 -0
- package/dist/esm/{chunk-6TUHLGW3.mjs → chunk-WXMHBL7Z.mjs} +1 -1
- package/dist/esm/chunk-WXMHBL7Z.mjs.map +1 -0
- package/dist/esm/{chunk-SPFXAD7J.mjs → chunk-X2EXY2EO.mjs} +2 -2
- package/dist/esm/{chunk-BR2N3DBO.mjs → chunk-XPE3Z7L5.mjs} +2 -2
- package/dist/esm/{chunk-XDRD7XEX.mjs → chunk-XSCYT6TT.mjs} +2 -2
- package/dist/esm/{chunk-PQPNGECP.mjs → chunk-XWCVGQKA.mjs} +2 -2
- package/dist/esm/chunk-YA3YHVPD.mjs +2 -0
- package/dist/esm/chunk-YA3YHVPD.mjs.map +1 -0
- package/dist/esm/{chunk-RB6P7ZHR.mjs → chunk-YTHL7EKV.mjs} +2 -2
- package/dist/esm/{chunk-UL3S5HV2.mjs → chunk-ZI4IMZR6.mjs} +2 -2
- package/dist/esm/{chunk-ML7VTAHR.mjs → chunk-ZOQ3ZG7U.mjs} +2 -2
- 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/account/Account.mjs +1 -1
- package/dist/esm/core/account/Ed25519Account.mjs +1 -1
- package/dist/esm/core/account/SingleKeyAccount.mjs +1 -1
- package/dist/esm/core/account/index.mjs +1 -1
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/index.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/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 +2 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/account.d.mts +1 -1
- 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.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/staking.mjs +1 -1
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/plugins/assetUploader/index.d.mts +67 -7
- package/dist/esm/plugins/assetUploader/index.mjs +1 -1
- package/dist/esm/plugins/assetUploader/irys.d.mts +2 -2
- package/dist/esm/plugins/assetUploader/irys.mjs +1 -1
- package/dist/esm/plugins/assetUploader/types.d.mts +52 -0
- package/dist/esm/plugins/assetUploader/types.mjs +2 -0
- package/dist/esm/plugins/assetUploader/types.mjs.map +1 -0
- package/dist/esm/plugins/index.d.mts +8 -7
- package/dist/esm/plugins/index.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.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/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/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.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.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/types/index.d.mts +1 -1
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/utils/apiEndpoints.mjs +1 -1
- package/dist/esm/utils/index.mjs +1 -1
- package/package.json +1 -1
- package/src/api/general.ts +1 -1
- package/src/api/transaction.ts +1 -1
- package/src/plugins/assetUploader/index.ts +78 -1
- package/src/plugins/assetUploader/irys.ts +10 -8
- package/src/plugins/assetUploader/types.ts +17 -0
- package/src/types/index.ts +1 -1
- package/src/utils/apiEndpoints.ts +3 -3
- package/dist/esm/chunk-6TUHLGW3.mjs.map +0 -1
- package/dist/esm/chunk-77SKA4HT.mjs +0 -2
- package/dist/esm/chunk-77SKA4HT.mjs.map +0 -1
- package/dist/esm/chunk-GNMX2QXW.mjs.map +0 -1
- package/dist/esm/chunk-TAYSRAKQ.mjs +0 -2
- package/dist/esm/chunk-TAYSRAKQ.mjs.map +0 -1
- package/dist/esm/chunk-TKM3W4UG.mjs +0 -1
- package/dist/esm/chunk-TKM3W4UG.mjs.map +0 -1
- package/dist/esm/chunk-WOHJGIDT.mjs +0 -2
- package/dist/esm/chunk-WOHJGIDT.mjs.map +0 -1
- package/dist/esm/plugins/assetUploader/assetUploader.d.mts +0 -110
- package/dist/esm/plugins/assetUploader/assetUploader.mjs +0 -2
- package/dist/esm/plugins/assetUploader/assetUploader.mjs.map +0 -1
- package/src/plugins/assetUploader/assetUploader.ts +0 -90
- /package/dist/esm/{chunk-7WNQNTZ5.mjs.map → chunk-27644ALO.mjs.map} +0 -0
- /package/dist/esm/{chunk-5NUX2OGU.mjs.map → chunk-2MWFPMJU.mjs.map} +0 -0
- /package/dist/esm/{chunk-GTWCLFSO.mjs.map → chunk-53UNV6UP.mjs.map} +0 -0
- /package/dist/esm/{chunk-P4JLMPCP.mjs.map → chunk-5BPCJWJ3.mjs.map} +0 -0
- /package/dist/esm/{chunk-RI5FYQIT.mjs.map → chunk-5JCZRKJG.mjs.map} +0 -0
- /package/dist/esm/{chunk-2RRFFRBV.mjs.map → chunk-77CVU2W7.mjs.map} +0 -0
- /package/dist/esm/{chunk-TC4AF4TT.mjs.map → chunk-7N6YF6JO.mjs.map} +0 -0
- /package/dist/esm/{chunk-KVWSL76Z.mjs.map → chunk-BTO7WDIW.mjs.map} +0 -0
- /package/dist/esm/{chunk-ITKRS54D.mjs.map → chunk-BUU7JCLF.mjs.map} +0 -0
- /package/dist/esm/{chunk-5FWN3ASG.mjs.map → chunk-DLGGNSKF.mjs.map} +0 -0
- /package/dist/esm/{chunk-P3CMSOX6.mjs.map → chunk-E36XGHUE.mjs.map} +0 -0
- /package/dist/esm/{chunk-OP4VV2UO.mjs.map → chunk-ETGZG4G7.mjs.map} +0 -0
- /package/dist/esm/{chunk-T3434WYA.mjs.map → chunk-FYVPCKSW.mjs.map} +0 -0
- /package/dist/esm/{chunk-JJS3Y3WT.mjs.map → chunk-GSCUF6XW.mjs.map} +0 -0
- /package/dist/esm/{chunk-SPKBGDFY.mjs.map → chunk-ICK2XO6A.mjs.map} +0 -0
- /package/dist/esm/{chunk-JVDLBAAL.mjs.map → chunk-IQJJRNHK.mjs.map} +0 -0
- /package/dist/esm/{chunk-PATJMQAG.mjs.map → chunk-IUZCNQ7D.mjs.map} +0 -0
- /package/dist/esm/{chunk-2FQW5ZSM.mjs.map → chunk-J22AZHQT.mjs.map} +0 -0
- /package/dist/esm/{chunk-4OELG2AL.mjs.map → chunk-JOIUR5QW.mjs.map} +0 -0
- /package/dist/esm/{chunk-LKKOIIBF.mjs.map → chunk-JPNK6EKM.mjs.map} +0 -0
- /package/dist/esm/{chunk-O5WB3GB6.mjs.map → chunk-L354LBX4.mjs.map} +0 -0
- /package/dist/esm/{chunk-VU2CNQVS.mjs.map → chunk-LIU6DQQJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-54SDZFVL.mjs.map → chunk-LWQHVABO.mjs.map} +0 -0
- /package/dist/esm/{chunk-JB7ZOUYL.mjs.map → chunk-MUKBXGU3.mjs.map} +0 -0
- /package/dist/esm/{chunk-O25IJ3Q3.mjs.map → chunk-NF35PRGD.mjs.map} +0 -0
- /package/dist/esm/{chunk-AJRBTHDS.mjs.map → chunk-NUBFOYQZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-QGPI74JX.mjs.map → chunk-OBSG3724.mjs.map} +0 -0
- /package/dist/esm/{chunk-ABMVXTVA.mjs.map → chunk-Q6YMSZLY.mjs.map} +0 -0
- /package/dist/esm/{chunk-O4EVRHDH.mjs.map → chunk-QJ2OLGAW.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZAMLI7FP.mjs.map → chunk-RNFDAXUZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-6KKEGX5H.mjs.map → chunk-SCYVRDJI.mjs.map} +0 -0
- /package/dist/esm/{chunk-OYQRQC4Z.mjs.map → chunk-SEAOSYSZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-PEDUQZ3V.mjs.map → chunk-THHBTHEO.mjs.map} +0 -0
- /package/dist/esm/{chunk-JXST37IU.mjs.map → chunk-U4JXJ3UN.mjs.map} +0 -0
- /package/dist/esm/{chunk-CTBCXJAY.mjs.map → chunk-UVTSJ2KP.mjs.map} +0 -0
- /package/dist/esm/{chunk-SPFXAD7J.mjs.map → chunk-X2EXY2EO.mjs.map} +0 -0
- /package/dist/esm/{chunk-BR2N3DBO.mjs.map → chunk-XPE3Z7L5.mjs.map} +0 -0
- /package/dist/esm/{chunk-XDRD7XEX.mjs.map → chunk-XSCYT6TT.mjs.map} +0 -0
- /package/dist/esm/{chunk-PQPNGECP.mjs.map → chunk-XWCVGQKA.mjs.map} +0 -0
- /package/dist/esm/{chunk-RB6P7ZHR.mjs.map → chunk-YTHL7EKV.mjs.map} +0 -0
- /package/dist/esm/{chunk-UL3S5HV2.mjs.map → chunk-ZI4IMZR6.mjs.map} +0 -0
- /package/dist/esm/{chunk-ML7VTAHR.mjs.map → chunk-ZOQ3ZG7U.mjs.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-IUZCNQ7D.mjs";import"../../chunk-ICK2XO6A.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-QE4ASJ5K.mjs";import"../../chunk-E36XGHUE.mjs";import"../../chunk-77CVU2W7.mjs";import"../../chunk-ZOQ3ZG7U.mjs";import"../../chunk-JPNK6EKM.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-QJ2OLGAW.mjs";import"../../chunk-SEAOSYSZ.mjs";import"../../chunk-ETGZG4G7.mjs";import"../../chunk-RNFDAXUZ.mjs";import"../../chunk-NUBFOYQZ.mjs";import"../../chunk-GTCDSGOA.mjs";import"../../chunk-CUWAGKEP.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-RZNFFGTD.mjs";import"../../chunk-JPG25VX2.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-ITALFUWD.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-UFD443TT.mjs";import"../../chunk-GE7VQ5NZ.mjs";import"../../chunk-SKF6E6X7.mjs";import"../../chunk-GHYE26Q5.mjs";import"../../chunk-HEPV52CH.mjs";import"../../chunk-HIUJDWMR.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-VZJ62XF7.mjs";import"../../chunk-4LUWUDBX.mjs";import"../../chunk-IFVMIUMO.mjs";import"../../chunk-BKWJ4G7T.mjs";import"../../chunk-NMNR3QST.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-W2XLZW4Y.mjs";import"../../chunk-BZMO6Q6L.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as AccountSequenceNumber};
|
|
2
2
|
//# sourceMappingURL=accountSequenceNumber.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../chunk-IHYTP2EW.mjs";import{a as b,b as c,c as d}from"../../chunk-
|
|
1
|
+
import"../../chunk-IHYTP2EW.mjs";import{a as b,b as c,c as d}from"../../chunk-DLGGNSKF.mjs";import{a}from"../../chunk-IUZCNQ7D.mjs";import"../../chunk-U6Z4FNB7.mjs";import"../../chunk-7N6YF6JO.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-R7G3CLRI.mjs";import"../../chunk-ZI4IMZR6.mjs";import"../../chunk-L354LBX4.mjs";import"../../chunk-RC5K63LK.mjs";import"../../chunk-LIU6DQQJ.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-HTZTTZQJ.mjs";import"../../chunk-53UNV6UP.mjs";import"../../chunk-5BPCJWJ3.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-MUKBXGU3.mjs";import"../../chunk-THHBTHEO.mjs";import"../../chunk-GSCUF6XW.mjs";import"../../chunk-HWTX3HVX.mjs";import"../../chunk-TWHTXYMB.mjs";import"../../chunk-5PIO6MFF.mjs";import"../../chunk-M6TKSJ4I.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-VDQYAGHU.mjs";import"../../chunk-ICK2XO6A.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-QE4ASJ5K.mjs";import"../../chunk-E36XGHUE.mjs";import"../../chunk-77CVU2W7.mjs";import"../../chunk-ZOQ3ZG7U.mjs";import"../../chunk-JPNK6EKM.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-QJ2OLGAW.mjs";import"../../chunk-SEAOSYSZ.mjs";import"../../chunk-ETGZG4G7.mjs";import"../../chunk-RNFDAXUZ.mjs";import"../../chunk-NUBFOYQZ.mjs";import"../../chunk-GTCDSGOA.mjs";import"../../chunk-CUWAGKEP.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-RZNFFGTD.mjs";import"../../chunk-JPG25VX2.mjs";import"../../chunk-Q6YMSZLY.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-ITALFUWD.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-UFD443TT.mjs";import"../../chunk-GE7VQ5NZ.mjs";import"../../chunk-SKF6E6X7.mjs";import"../../chunk-GHYE26Q5.mjs";import"../../chunk-HEPV52CH.mjs";import"../../chunk-HIUJDWMR.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-VZJ62XF7.mjs";import"../../chunk-4LUWUDBX.mjs";import"../../chunk-IFVMIUMO.mjs";import"../../chunk-BKWJ4G7T.mjs";import"../../chunk-NMNR3QST.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-W2XLZW4Y.mjs";import"../../chunk-BZMO6Q6L.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as AccountSequenceNumber,d as TransactionWorker,c as TransactionWorkerEventsEnum,b as promiseFulfilledStatus};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c}from"../../chunk-
|
|
1
|
+
import{a,b,c}from"../../chunk-DLGGNSKF.mjs";import"../../chunk-IUZCNQ7D.mjs";import"../../chunk-U6Z4FNB7.mjs";import"../../chunk-7N6YF6JO.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-R7G3CLRI.mjs";import"../../chunk-ZI4IMZR6.mjs";import"../../chunk-L354LBX4.mjs";import"../../chunk-RC5K63LK.mjs";import"../../chunk-LIU6DQQJ.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-HTZTTZQJ.mjs";import"../../chunk-53UNV6UP.mjs";import"../../chunk-5BPCJWJ3.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-MUKBXGU3.mjs";import"../../chunk-THHBTHEO.mjs";import"../../chunk-GSCUF6XW.mjs";import"../../chunk-HWTX3HVX.mjs";import"../../chunk-TWHTXYMB.mjs";import"../../chunk-5PIO6MFF.mjs";import"../../chunk-M6TKSJ4I.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-VDQYAGHU.mjs";import"../../chunk-ICK2XO6A.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-QE4ASJ5K.mjs";import"../../chunk-E36XGHUE.mjs";import"../../chunk-77CVU2W7.mjs";import"../../chunk-ZOQ3ZG7U.mjs";import"../../chunk-JPNK6EKM.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-QJ2OLGAW.mjs";import"../../chunk-SEAOSYSZ.mjs";import"../../chunk-ETGZG4G7.mjs";import"../../chunk-RNFDAXUZ.mjs";import"../../chunk-NUBFOYQZ.mjs";import"../../chunk-GTCDSGOA.mjs";import"../../chunk-CUWAGKEP.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-RZNFFGTD.mjs";import"../../chunk-JPG25VX2.mjs";import"../../chunk-Q6YMSZLY.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-ITALFUWD.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-UFD443TT.mjs";import"../../chunk-GE7VQ5NZ.mjs";import"../../chunk-SKF6E6X7.mjs";import"../../chunk-GHYE26Q5.mjs";import"../../chunk-HEPV52CH.mjs";import"../../chunk-HIUJDWMR.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-VZJ62XF7.mjs";import"../../chunk-4LUWUDBX.mjs";import"../../chunk-IFVMIUMO.mjs";import"../../chunk-BKWJ4G7T.mjs";import"../../chunk-NMNR3QST.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-W2XLZW4Y.mjs";import"../../chunk-BZMO6Q6L.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{c as TransactionWorker,b as TransactionWorkerEventsEnum,a as promiseFulfilledStatus};
|
|
2
2
|
//# sourceMappingURL=transactionWorker.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t}from"../../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t}from"../../chunk-LIU6DQQJ.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-QE4ASJ5K.mjs";import"../../chunk-E36XGHUE.mjs";import"../../chunk-77CVU2W7.mjs";import"../../chunk-ZOQ3ZG7U.mjs";import"../../chunk-JPNK6EKM.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-QJ2OLGAW.mjs";import"../../chunk-SEAOSYSZ.mjs";import"../../chunk-ETGZG4G7.mjs";import"../../chunk-RNFDAXUZ.mjs";import"../../chunk-NUBFOYQZ.mjs";import"../../chunk-GTCDSGOA.mjs";import"../../chunk-CUWAGKEP.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-RZNFFGTD.mjs";import"../../chunk-JPG25VX2.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-VZJ62XF7.mjs";import"../../chunk-4LUWUDBX.mjs";import"../../chunk-IFVMIUMO.mjs";import"../../chunk-BKWJ4G7T.mjs";import"../../chunk-NMNR3QST.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-W2XLZW4Y.mjs";import"../../chunk-BZMO6Q6L.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{s as findFirstNonSignerArg,t as getFunctionParts,h as isBcsAddress,g as isBcsBool,j as isBcsFixedBytes,i as isBcsString,o as isBcsU128,l as isBcsU16,p as isBcsU256,m as isBcsU32,n as isBcsU64,k as isBcsU8,a as isBool,f as isEncodedEntryFunctionArgument,d as isLargeNumber,e as isNull,c as isNumber,q as isScriptDataInput,b as isString,r as throwTypeMismatch};
|
|
2
2
|
//# sourceMappingURL=helpers.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../chunk-R7G3CLRI.mjs";import{a as y,b as z,c as A,d as B,e as C,f as D,g as E,h as F,i as G,j as H,k as I}from"../../chunk-
|
|
1
|
+
import"../../chunk-R7G3CLRI.mjs";import{a as y,b as z,c as A,d as B,e as C,f as D,g as E,h as F,i as G,j as H,k as I}from"../../chunk-ZI4IMZR6.mjs";import{a as u,b as v,c as w,d as x}from"../../chunk-L354LBX4.mjs";import"../../chunk-RC5K63LK.mjs";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t}from"../../chunk-LIU6DQQJ.mjs";import"../../chunk-HTZTTZQJ.mjs";import"../../chunk-53UNV6UP.mjs";import"../../chunk-5BPCJWJ3.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-MUKBXGU3.mjs";import"../../chunk-THHBTHEO.mjs";import"../../chunk-GSCUF6XW.mjs";import"../../chunk-HWTX3HVX.mjs";import"../../chunk-TWHTXYMB.mjs";import"../../chunk-5PIO6MFF.mjs";import"../../chunk-M6TKSJ4I.mjs";import"../../chunk-VDQYAGHU.mjs";import"../../chunk-ICK2XO6A.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-QE4ASJ5K.mjs";import"../../chunk-E36XGHUE.mjs";import"../../chunk-77CVU2W7.mjs";import"../../chunk-ZOQ3ZG7U.mjs";import"../../chunk-JPNK6EKM.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-QJ2OLGAW.mjs";import"../../chunk-SEAOSYSZ.mjs";import"../../chunk-ETGZG4G7.mjs";import"../../chunk-RNFDAXUZ.mjs";import"../../chunk-NUBFOYQZ.mjs";import"../../chunk-GTCDSGOA.mjs";import"../../chunk-CUWAGKEP.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-RZNFFGTD.mjs";import"../../chunk-JPG25VX2.mjs";import"../../chunk-Q6YMSZLY.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-ITALFUWD.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-UFD443TT.mjs";import"../../chunk-GE7VQ5NZ.mjs";import"../../chunk-SKF6E6X7.mjs";import"../../chunk-GHYE26Q5.mjs";import"../../chunk-HEPV52CH.mjs";import"../../chunk-HIUJDWMR.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-VZJ62XF7.mjs";import"../../chunk-4LUWUDBX.mjs";import"../../chunk-IFVMIUMO.mjs";import"../../chunk-BKWJ4G7T.mjs";import"../../chunk-NMNR3QST.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-W2XLZW4Y.mjs";import"../../chunk-BZMO6Q6L.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{B as buildTransaction,x as checkOrConvertArgument,w as convertArgument,G as deriveTransactionType,v as fetchEntryFunctionAbi,s as findFirstNonSignerArg,H as generateMultiSignersSignedTransaction,A as generateRawTransaction,F as generateSignedTransaction,C as generateSignedTransactionForSimulation,I as generateSigningMessage,y as generateTransactionPayload,z as generateTransactionPayloadWithABI,D as getAuthenticatorForSimulation,t as getFunctionParts,h as isBcsAddress,g as isBcsBool,j as isBcsFixedBytes,i as isBcsString,o as isBcsU128,l as isBcsU16,p as isBcsU256,m as isBcsU32,n as isBcsU64,k as isBcsU8,a as isBool,f as isEncodedEntryFunctionArgument,d as isLargeNumber,e as isNull,c as isNumber,q as isScriptDataInput,b as isString,E as sign,u as standardizeTypeTags,r as throwTypeMismatch};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d}from"../../chunk-
|
|
1
|
+
import{a,b,c,d}from"../../chunk-L354LBX4.mjs";import"../../chunk-RC5K63LK.mjs";import"../../chunk-LIU6DQQJ.mjs";import"../../chunk-HWTX3HVX.mjs";import"../../chunk-M6TKSJ4I.mjs";import"../../chunk-ICK2XO6A.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-QE4ASJ5K.mjs";import"../../chunk-E36XGHUE.mjs";import"../../chunk-77CVU2W7.mjs";import"../../chunk-ZOQ3ZG7U.mjs";import"../../chunk-JPNK6EKM.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-QJ2OLGAW.mjs";import"../../chunk-SEAOSYSZ.mjs";import"../../chunk-ETGZG4G7.mjs";import"../../chunk-RNFDAXUZ.mjs";import"../../chunk-NUBFOYQZ.mjs";import"../../chunk-GTCDSGOA.mjs";import"../../chunk-CUWAGKEP.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-RZNFFGTD.mjs";import"../../chunk-JPG25VX2.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-ITALFUWD.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-UFD443TT.mjs";import"../../chunk-GE7VQ5NZ.mjs";import"../../chunk-SKF6E6X7.mjs";import"../../chunk-GHYE26Q5.mjs";import"../../chunk-HEPV52CH.mjs";import"../../chunk-HIUJDWMR.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-VZJ62XF7.mjs";import"../../chunk-4LUWUDBX.mjs";import"../../chunk-IFVMIUMO.mjs";import"../../chunk-BKWJ4G7T.mjs";import"../../chunk-NMNR3QST.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-W2XLZW4Y.mjs";import"../../chunk-BZMO6Q6L.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{d as checkOrConvertArgument,c as convertArgument,b as fetchEntryFunctionAbi,a as standardizeTypeTags};
|
|
2
2
|
//# sourceMappingURL=remoteAbi.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k}from"../../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k}from"../../chunk-ZI4IMZR6.mjs";import"../../chunk-L354LBX4.mjs";import"../../chunk-RC5K63LK.mjs";import"../../chunk-LIU6DQQJ.mjs";import"../../chunk-HTZTTZQJ.mjs";import"../../chunk-53UNV6UP.mjs";import"../../chunk-5BPCJWJ3.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-MUKBXGU3.mjs";import"../../chunk-THHBTHEO.mjs";import"../../chunk-GSCUF6XW.mjs";import"../../chunk-HWTX3HVX.mjs";import"../../chunk-TWHTXYMB.mjs";import"../../chunk-5PIO6MFF.mjs";import"../../chunk-M6TKSJ4I.mjs";import"../../chunk-VDQYAGHU.mjs";import"../../chunk-ICK2XO6A.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-QE4ASJ5K.mjs";import"../../chunk-E36XGHUE.mjs";import"../../chunk-77CVU2W7.mjs";import"../../chunk-ZOQ3ZG7U.mjs";import"../../chunk-JPNK6EKM.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-QJ2OLGAW.mjs";import"../../chunk-SEAOSYSZ.mjs";import"../../chunk-ETGZG4G7.mjs";import"../../chunk-RNFDAXUZ.mjs";import"../../chunk-NUBFOYQZ.mjs";import"../../chunk-GTCDSGOA.mjs";import"../../chunk-CUWAGKEP.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-RZNFFGTD.mjs";import"../../chunk-JPG25VX2.mjs";import"../../chunk-Q6YMSZLY.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-ITALFUWD.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-UFD443TT.mjs";import"../../chunk-GE7VQ5NZ.mjs";import"../../chunk-SKF6E6X7.mjs";import"../../chunk-GHYE26Q5.mjs";import"../../chunk-HEPV52CH.mjs";import"../../chunk-HIUJDWMR.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-VZJ62XF7.mjs";import"../../chunk-4LUWUDBX.mjs";import"../../chunk-IFVMIUMO.mjs";import"../../chunk-BKWJ4G7T.mjs";import"../../chunk-NMNR3QST.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-W2XLZW4Y.mjs";import"../../chunk-BZMO6Q6L.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{d as buildTransaction,i as deriveTransactionType,j as generateMultiSignersSignedTransaction,c as generateRawTransaction,h as generateSignedTransaction,e as generateSignedTransactionForSimulation,k as generateSigningMessage,a as generateTransactionPayload,b as generateTransactionPayloadWithABI,f as getAuthenticatorForSimulation,g as sign};
|
|
2
2
|
//# sourceMappingURL=transactionBuilder.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s}from"../../chunk-HWTX3HVX.mjs";import"../../chunk-M6TKSJ4I.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-QE4ASJ5K.mjs";import"../../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s}from"../../chunk-HWTX3HVX.mjs";import"../../chunk-M6TKSJ4I.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-QE4ASJ5K.mjs";import"../../chunk-E36XGHUE.mjs";import"../../chunk-77CVU2W7.mjs";import"../../chunk-ZOQ3ZG7U.mjs";import"../../chunk-JPNK6EKM.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-QJ2OLGAW.mjs";import"../../chunk-SEAOSYSZ.mjs";import"../../chunk-ETGZG4G7.mjs";import"../../chunk-RNFDAXUZ.mjs";import"../../chunk-NUBFOYQZ.mjs";import"../../chunk-GTCDSGOA.mjs";import"../../chunk-CUWAGKEP.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-RZNFFGTD.mjs";import"../../chunk-JPG25VX2.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-VZJ62XF7.mjs";import"../../chunk-4LUWUDBX.mjs";import"../../chunk-IFVMIUMO.mjs";import"../../chunk-BKWJ4G7T.mjs";import"../../chunk-NMNR3QST.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-W2XLZW4Y.mjs";import"../../chunk-BZMO6Q6L.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{o as StructTag,a as TypeTag,i as TypeTagAddress,b as TypeTagBool,l as TypeTagGeneric,k as TypeTagReference,j as TypeTagSigner,n as TypeTagStruct,g as TypeTagU128,d as TypeTagU16,h as TypeTagU256,e as TypeTagU32,f as TypeTagU64,c as TypeTagU8,m as TypeTagVector,p as aptosCoinStructTag,s as objectStructTag,r as optionStructTag,q as stringStructTag};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c}from"../../chunk-RC5K63LK.mjs";import"../../chunk-HWTX3HVX.mjs";import"../../chunk-M6TKSJ4I.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-QE4ASJ5K.mjs";import"../../chunk-
|
|
1
|
+
import{a,b,c}from"../../chunk-RC5K63LK.mjs";import"../../chunk-HWTX3HVX.mjs";import"../../chunk-M6TKSJ4I.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-QE4ASJ5K.mjs";import"../../chunk-E36XGHUE.mjs";import"../../chunk-77CVU2W7.mjs";import"../../chunk-ZOQ3ZG7U.mjs";import"../../chunk-JPNK6EKM.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-QJ2OLGAW.mjs";import"../../chunk-SEAOSYSZ.mjs";import"../../chunk-ETGZG4G7.mjs";import"../../chunk-RNFDAXUZ.mjs";import"../../chunk-NUBFOYQZ.mjs";import"../../chunk-GTCDSGOA.mjs";import"../../chunk-CUWAGKEP.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-RZNFFGTD.mjs";import"../../chunk-JPG25VX2.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-VZJ62XF7.mjs";import"../../chunk-4LUWUDBX.mjs";import"../../chunk-IFVMIUMO.mjs";import"../../chunk-BKWJ4G7T.mjs";import"../../chunk-NMNR3QST.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-W2XLZW4Y.mjs";import"../../chunk-BZMO6Q6L.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{b as TypeTagParserError,a as TypeTagParserErrorType,c as parseTypeTag};
|
|
2
2
|
//# sourceMappingURL=parser.mjs.map
|
|
@@ -185,7 +185,7 @@ interface Client {
|
|
|
185
185
|
/**
|
|
186
186
|
* The API request type
|
|
187
187
|
*
|
|
188
|
-
* @param url - the url to make the request to, i.e https://fullnode.aptoslabs.
|
|
188
|
+
* @param url - the url to make the request to, i.e https://fullnode.devnet.aptoslabs.com/v1
|
|
189
189
|
* @param method - the request method "GET" | "POST"
|
|
190
190
|
* @param endpoint (optional) - the endpoint to make the request to, i.e transactions
|
|
191
191
|
* @param body (optional) - the body of the request
|
package/dist/esm/types/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{A,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-
|
|
1
|
+
import{A,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-NMNR3QST.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-FVA2OPG4.mjs";export{g as AccountAuthenticatorVariant,h as AnyPublicKeyVariant,i as AnySignatureVariant,A as DeriveScheme,a as MimeType,w as MoveAbility,v as MoveFunctionVisibility,x as RoleType,c as ScriptTransactionArgumentVariants,y as SigningScheme,z as SigningSchemeInput,f as TransactionAuthenticatorVariant,d as TransactionPayloadVariants,j as TransactionResponseType,e as TransactionVariants,b as TypeTagVariants,n as isBlockMetadataTransactionResponse,q as isEd25519Signature,t as isFeePayerSignature,m as isGenesisTransactionResponse,s as isMultiAgentSignature,u as isMultiEd25519Signature,k as isPendingTransactionResponse,r as isSecp256k1Signature,o as isStateCheckpointTransactionResponse,l as isUserTransactionResponse,p as isValidatorTransactionResponse};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f}from"../chunk-VDQYAGHU.mjs";import"../chunk-FVA2OPG4.mjs";export{d as Network,e as NetworkToChainId,c as NetworkToFaucetAPI,a as NetworkToIndexerAPI,f as NetworkToNetworkName,b as NetworkToNodeAPI};
|
|
2
2
|
//# sourceMappingURL=apiEndpoints.mjs.map
|
package/dist/esm/utils/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunk-CYDWEPFL.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n}from"../chunk-
|
|
1
|
+
import"../chunk-CYDWEPFL.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n}from"../chunk-VDQYAGHU.mjs";import{a,b,c,d,e,f,g,h}from"../chunk-HEPV52CH.mjs";import"../chunk-FVA2OPG4.mjs";export{e as APTOS_COIN,a as AptosApiType,b as DEFAULT_MAX_GAS_AMOUNT,c as DEFAULT_TXN_EXP_SEC_FROM_NOW,d as DEFAULT_TXN_TIMEOUT_SEC,l as Network,m as NetworkToChainId,k as NetworkToFaucetAPI,i as NetworkToIndexerAPI,n as NetworkToNetworkName,j as NetworkToNodeAPI,h as ProcessorType,f as RAW_TRANSACTION_SALT,g as RAW_TRANSACTION_WITH_DATA_SALT};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/package.json
CHANGED
package/src/api/general.ts
CHANGED
|
@@ -108,7 +108,7 @@ export class General {
|
|
|
108
108
|
* @param args.data Object that describes table item
|
|
109
109
|
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
110
110
|
*
|
|
111
|
-
* @example https://
|
|
111
|
+
* @example https://api.devnet.aptoslabs.com/v1/accounts/0x1/resource/0x1::coin::CoinInfo%3C0x1::aptos_coin::AptosCoin%3E
|
|
112
112
|
* {
|
|
113
113
|
* data.key_type = "address" // Move type of table key
|
|
114
114
|
* data.value_type = "u128" // Move type of table value
|
package/src/api/transaction.ts
CHANGED
|
@@ -155,7 +155,7 @@ export class Transaction {
|
|
|
155
155
|
/**
|
|
156
156
|
* Gives an estimate of the gas unit price required to get a
|
|
157
157
|
* transaction on chain in a reasonable amount of time.
|
|
158
|
-
* For more information {@link https://
|
|
158
|
+
* For more information {@link https://api.mainnet.aptoslabs.com/v1/spec#/operations/estimate_gas_price}
|
|
159
159
|
*
|
|
160
160
|
* @returns Object holding the outputs of the estimate gas API
|
|
161
161
|
* @example
|
|
@@ -1 +1,78 @@
|
|
|
1
|
-
|
|
1
|
+
import { AptosConfig } from "../../api/aptosConfig";
|
|
2
|
+
import { Account } from "../../core";
|
|
3
|
+
import { IrysAssetUploader } from "./irys";
|
|
4
|
+
import { FundResponse, IAssetUploader, UploadResponse } from "./types";
|
|
5
|
+
|
|
6
|
+
export class AssetUploader {
|
|
7
|
+
readonly config: AptosConfig;
|
|
8
|
+
|
|
9
|
+
readonly assetUploader: IAssetUploader;
|
|
10
|
+
|
|
11
|
+
private constructor(config: AptosConfig, assetUploader: IAssetUploader) {
|
|
12
|
+
this.config = config;
|
|
13
|
+
this.assetUploader = assetUploader;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
static async init(config: AptosConfig) {
|
|
17
|
+
switch (config.assetUploaderProvider) {
|
|
18
|
+
case "irys": {
|
|
19
|
+
const assetUploader = await IrysAssetUploader.init(config);
|
|
20
|
+
return new AssetUploader(config, assetUploader);
|
|
21
|
+
}
|
|
22
|
+
default:
|
|
23
|
+
throw new Error("Invalid asset uploader provided");
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Funds the node you connected to with the specified amount of tokens
|
|
29
|
+
*
|
|
30
|
+
* @param args.account The account to sign and pay the fund transaction with
|
|
31
|
+
* @param args.amount The amount to fund the node in
|
|
32
|
+
*
|
|
33
|
+
* @return FundResponse
|
|
34
|
+
*/
|
|
35
|
+
async fundNode(args: { account: Account; amount: number }): Promise<FundResponse> {
|
|
36
|
+
return this.assetUploader.fundNode({ ...args });
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Upload a data
|
|
41
|
+
*
|
|
42
|
+
* @param args.account The account to sign and pay the fund transaction with
|
|
43
|
+
* @param args.data The data to upload
|
|
44
|
+
*
|
|
45
|
+
* @return UploadResponse
|
|
46
|
+
*/
|
|
47
|
+
async uploadData(args: { account: Account; data: string | Buffer; options?: any }): Promise<UploadResponse> {
|
|
48
|
+
return this.assetUploader.uploadData({ ...args });
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Upload a file
|
|
53
|
+
*
|
|
54
|
+
* @param args.account The account to sign and pay the upload file transaction with
|
|
55
|
+
* @param args.filePathToUpload The file to upload as the file path
|
|
56
|
+
*
|
|
57
|
+
* @return UploadResponse
|
|
58
|
+
*/
|
|
59
|
+
async uploadFile(args: { account: Account; filePathToUpload: string; options?: any }): Promise<UploadResponse> {
|
|
60
|
+
return this.assetUploader.uploadFile({ ...args });
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Upload a folder
|
|
65
|
+
*
|
|
66
|
+
* @param args.account The account to sign and pay the upload folder transaction with
|
|
67
|
+
* @param args.folderToUpload The folder to upload as the folder path
|
|
68
|
+
*
|
|
69
|
+
* @return UploadResponse | undefined
|
|
70
|
+
*/
|
|
71
|
+
async uploadFolder(args: {
|
|
72
|
+
account: Account;
|
|
73
|
+
folderToUpload: string;
|
|
74
|
+
options?: any;
|
|
75
|
+
}): Promise<UploadResponse | undefined> {
|
|
76
|
+
return this.assetUploader.uploadFolder({ ...args });
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { NodeIrys } from "@irys/sdk/build/cjs/node/irys";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
2
|
+
import { CreateAndUploadOptions } from "@irys/sdk/build/cjs/common/types";
|
|
3
|
+
import { FundResponse, IAssetUploader, UploadResponse } from "./types";
|
|
4
|
+
import { AptosConfig } from "../../api/aptosConfig";
|
|
4
5
|
import { Account } from "../../core";
|
|
5
6
|
import { Network } from "../../utils";
|
|
6
|
-
import { IAssetUploader } from "./assetUploader";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Irys asset uploader
|
|
@@ -23,10 +23,11 @@ export class IrysAssetUploader implements IAssetUploader {
|
|
|
23
23
|
|
|
24
24
|
static async init(config: AptosConfig) {
|
|
25
25
|
try {
|
|
26
|
-
const irys = await import("@irys/sdk");
|
|
26
|
+
const irys = await import("@irys/sdk/build/cjs/cjsIndex");
|
|
27
|
+
console.log("irys", irys);
|
|
27
28
|
return new IrysAssetUploader(config, irys.default);
|
|
28
29
|
} catch (e: any) {
|
|
29
|
-
throw new Error("To use the Irys service, please install
|
|
30
|
+
throw new Error("To use the Irys service, please install the `@irys/sdk` package");
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
|
|
@@ -42,7 +43,7 @@ export class IrysAssetUploader implements IAssetUploader {
|
|
|
42
43
|
// those and it is recommended to simply use node1
|
|
43
44
|
return { irysNode: "node1", providerUrl: Network.MAINNET };
|
|
44
45
|
default:
|
|
45
|
-
throw new Error("
|
|
46
|
+
throw new Error("Unsupported network");
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
|
|
@@ -51,11 +52,12 @@ export class IrysAssetUploader implements IAssetUploader {
|
|
|
51
52
|
throw new Error("Irys has not been initialized");
|
|
52
53
|
}
|
|
53
54
|
const { irysNode, providerUrl } = this.resolveProvider();
|
|
55
|
+
console.log("this.irysApp", this.irysApp);
|
|
54
56
|
const irys = this.irysApp.init({
|
|
55
57
|
url: irysNode, // Irys node
|
|
56
58
|
token: "aptos", // Token used for payment and signing
|
|
57
59
|
publicKey: args.account.publicKey.toString(), // Aptos wallet publicKey
|
|
58
|
-
providerUrl
|
|
60
|
+
providerUrl, // Aptos Network
|
|
59
61
|
signingFunction: async (msg: Uint8Array) => args.account.sign(msg).toUint8Array(), // Signing function Irys will use
|
|
60
62
|
});
|
|
61
63
|
return irys;
|
|
@@ -81,7 +83,7 @@ export class IrysAssetUploader implements IAssetUploader {
|
|
|
81
83
|
try {
|
|
82
84
|
return await irys.upload(data, options);
|
|
83
85
|
} catch (e) {
|
|
84
|
-
throw new Error(`Error
|
|
86
|
+
throw new Error(`Error uploading data to irys ${e}`);
|
|
85
87
|
}
|
|
86
88
|
}
|
|
87
89
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FundResponse, UploadResponse } from "@irys/sdk/build/cjs/common/types";
|
|
2
|
+
import { Account } from "../../core";
|
|
3
|
+
|
|
4
|
+
export { FundResponse, UploadResponse };
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Shared interface for asset uploader providers to implement
|
|
8
|
+
*
|
|
9
|
+
* When extending the SDK to use different providers, we might need to use generic
|
|
10
|
+
* inputs and outputs.
|
|
11
|
+
*/
|
|
12
|
+
export interface IAssetUploader {
|
|
13
|
+
fundNode(args: { account: Account; amount: number }): Promise<FundResponse>;
|
|
14
|
+
uploadData(args: { account: Account; data: string | Buffer; options?: any }): Promise<UploadResponse>;
|
|
15
|
+
uploadFile(args: { account: Account; filePathToUpload: string; options?: any }): Promise<UploadResponse>;
|
|
16
|
+
uploadFolder(args: { account: Account; folderToUpload: string; options?: any }): Promise<UploadResponse | undefined>;
|
|
17
|
+
}
|
package/src/types/index.ts
CHANGED
|
@@ -213,7 +213,7 @@ export interface Client {
|
|
|
213
213
|
/**
|
|
214
214
|
* The API request type
|
|
215
215
|
*
|
|
216
|
-
* @param url - the url to make the request to, i.e https://fullnode.aptoslabs.
|
|
216
|
+
* @param url - the url to make the request to, i.e https://fullnode.devnet.aptoslabs.com/v1
|
|
217
217
|
* @param method - the request method "GET" | "POST"
|
|
218
218
|
* @param endpoint (optional) - the endpoint to make the request to, i.e transactions
|
|
219
219
|
* @param body (optional) - the body of the request
|
|
@@ -10,9 +10,9 @@ export const NetworkToIndexerAPI: Record<string, string> = {
|
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
export const NetworkToNodeAPI: Record<string, string> = {
|
|
13
|
-
mainnet: "https://
|
|
14
|
-
testnet: "https://
|
|
15
|
-
devnet: "https://
|
|
13
|
+
mainnet: "https://api.mainnet.aptoslabs.com/v1",
|
|
14
|
+
testnet: "https://api.testnet.aptoslabs.com/v1",
|
|
15
|
+
devnet: "https://api.devnet.aptoslabs.com/v1",
|
|
16
16
|
randomnet: "https://fullnode.random.aptoslabs.com/v1",
|
|
17
17
|
local: "http://127.0.0.1:8080/v1",
|
|
18
18
|
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/api/general.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { AptosConfig } from \"./aptosConfig\";\nimport {\n getBlockByHeight,\n getBlockByVersion,\n getChainTopUserTransactions,\n getIndexerLastSuccessVersion,\n getLedgerInfo,\n getProcessorStatus,\n getTableItem,\n queryIndexer,\n view,\n} from \"../internal/general\";\nimport {\n AnyNumber,\n Block,\n GetChainTopUserTransactionsResponse,\n GetProcessorStatusResponse,\n GraphqlQuery,\n LedgerInfo,\n LedgerVersionArg,\n MoveValue,\n TableItemRequest,\n InputViewRequestData,\n} from \"../types\";\nimport { ProcessorType } from \"../utils/const\";\n\n/**\n * A class to query all `General` Aptos related queries\n */\nexport class General {\n readonly config: AptosConfig;\n\n constructor(config: AptosConfig) {\n this.config = config;\n }\n\n /**\n * Queries for the Aptos ledger info\n *\n * @returns Aptos Ledger Info\n *\n * @example An example of the returned data\n * ```\n * {\n * \"chain_id\": 4,\n * \"epoch\": \"8\",\n * \"ledger_version\": \"714\",\n * \"oldest_ledger_version\": \"0\",\n * \"ledger_timestamp\": \"1694695496521775\",\n * \"node_role\": \"validator\",\n * \"oldest_block_height\": \"0\",\n * \"block_height\": \"359\",\n * \"git_hash\": \"c82193f36f4e185fed9f68c4ad21f6c6dd390c6e\"\n * }\n * ```\n */\n async getLedgerInfo(): Promise<LedgerInfo> {\n return getLedgerInfo({ aptosConfig: this.config });\n }\n\n /**\n * Queries for the chain id\n *\n * @returns The chain id\n */\n async getChainId(): Promise<number> {\n const result = await this.getLedgerInfo();\n return result.chain_id;\n }\n\n /**\n * Queries for block by transaction version\n *\n * @param args.ledgerVersion Ledger version to lookup block information for\n * @param args.options.withTransactions If set to true, include all transactions in the block\n *\n * @returns Block information with optional transactions\n */\n async getBlockByVersion(args: {\n ledgerVersion: AnyNumber;\n options?: { withTransactions?: boolean };\n }): Promise<Block> {\n return getBlockByVersion({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Get block by block height\n *\n * @param args.blockHeight Block height to lookup. Starts at 0\n * @param args.options.withTransactions If set to true, include all transactions in the block\n *\n * @returns Block with optional transactions\n */\n async getBlockByHeight(args: { blockHeight: AnyNumber; options?: { withTransactions?: boolean } }): Promise<Block> {\n return getBlockByHeight({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries for a table item for a table identified by the handle and the key for the item.\n * Key and value types need to be passed in to help with key serialization and value deserialization.\n * @param args.handle A pointer to where that table is stored\n * @param args.data Object that describes table item\n * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version\n *\n * @example https://fullnode.devnet.aptoslabs.com/v1/accounts/0x1/resource/0x1::coin::CoinInfo%3C0x1::aptos_coin::AptosCoin%3E\n * {\n * data.key_type = \"address\" // Move type of table key\n * data.value_type = \"u128\" // Move type of table value\n * data.key = \"0x619dc29a0aac8fa146714058e8dd6d2d0f3bdf5f6331907bf91f3acd81e6935\" // Value of table key\n * }\n *\n * @returns Table item value rendered in JSON\n */\n async getTableItem<T>(args: { handle: string; data: TableItemRequest; options?: LedgerVersionArg }): Promise<T> {\n return getTableItem<T>({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries for a Move view function\n * @param args.payload Payload for the view function\n * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version\n * @example\n * `\n * const payload: ViewRequest = {\n * function: \"0x1::coin::balance\",\n * typeArguments: [\"0x1::aptos_coin::AptosCoin\"],\n * functionArguments: [accountAddress],\n * };\n * `\n *\n * @returns an array of Move values\n */\n async view<T extends Array<MoveValue>>(args: {\n payload: InputViewRequestData;\n options?: LedgerVersionArg;\n }): Promise<T> {\n return view<T>({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries top user transactions\n *\n * @param args.limit The number of transactions to return\n * @returns GetChainTopUserTransactionsResponse\n */\n async getChainTopUserTransactions(args: { limit: number }): Promise<GetChainTopUserTransactionsResponse> {\n return getChainTopUserTransactions({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * A generic function for retrieving data from Aptos Indexer.\n * For more detailed queries specification see\n * {@link https://cloud.hasura.io/public/graphiql?endpoint=https://indexer.mainnet.aptoslabs.com/v1/graphql}\n *\n * @param args.query.query A GraphQL query\n * @param args.query.variables The variables for the query\n * @example\n * ```\n * {\n * query: `query MyQuery {\n ledger_infos {\n chain_id\n }\n }`;\n * }\n * ```\n *\n * @return The provided T type\n */\n async queryIndexer<T extends {}>(args: { query: GraphqlQuery }): Promise<T> {\n return queryIndexer<T>({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries for the last successful indexer version\n *\n * This is useful to tell what ledger version the indexer is updated to, as it can be behind the full nodes.\n */\n async getIndexerLastSuccessVersion(): Promise<bigint> {\n return getIndexerLastSuccessVersion({ aptosConfig: this.config });\n }\n\n /**\n * Query the processor status for a specific processor type.\n *\n * @param processorType The processor type to query\n * @returns\n */\n async getProcessorStatus(processorType: ProcessorType): Promise<GetProcessorStatusResponse[0]> {\n return getProcessorStatus({ aptosConfig: this.config, processorType });\n }\n}\n"],"mappings":"iGAgCO,IAAMA,EAAN,KAAc,CAGnB,YAAYC,EAAqB,CAC/B,KAAK,OAASA,CAChB,CAsBA,MAAM,eAAqC,CACzC,OAAOC,EAAc,CAAE,YAAa,KAAK,MAAO,CAAC,CACnD,CAOA,MAAM,YAA8B,CAElC,OADe,MAAM,KAAK,cAAc,GAC1B,QAChB,CAUA,MAAM,kBAAkBC,EAGL,CACjB,OAAOC,EAAkB,CACvB,YAAa,KAAK,OAClB,GAAGD,CACL,CAAC,CACH,CAUA,MAAM,iBAAiBA,EAA4F,CACjH,OAAOE,EAAiB,CAAE,YAAa,KAAK,OAAQ,GAAGF,CAAK,CAAC,CAC/D,CAkBA,MAAM,aAAgBA,EAA0F,CAC9G,OAAOG,EAAgB,CAAE,YAAa,KAAK,OAAQ,GAAGH,CAAK,CAAC,CAC9D,CAiBA,MAAM,KAAiCA,EAGxB,CACb,OAAOI,EAAQ,CAAE,YAAa,KAAK,OAAQ,GAAGJ,CAAK,CAAC,CACtD,CAQA,MAAM,4BAA4BA,EAAuE,CACvG,OAAOK,EAA4B,CACjC,YAAa,KAAK,OAClB,GAAGL,CACL,CAAC,CACH,CAsBA,MAAM,aAA2BA,EAA2C,CAC1E,OAAOM,EAAgB,CACrB,YAAa,KAAK,OAClB,GAAGN,CACL,CAAC,CACH,CAOA,MAAM,8BAAgD,CACpD,OAAOO,EAA6B,CAAE,YAAa,KAAK,MAAO,CAAC,CAClE,CAQA,MAAM,mBAAmBC,EAAsE,CAC7F,OAAOC,EAAmB,CAAE,YAAa,KAAK,OAAQ,cAAAD,CAAc,CAAC,CACvE,CACF","names":["General","config","getLedgerInfo","args","getBlockByVersion","getBlockByHeight","getTableItem","view","getChainTopUserTransactions","queryIndexer","getIndexerLastSuccessVersion","processorType","getProcessorStatus"]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var n={mainnet:"https://indexer.mainnet.aptoslabs.com/v1/graphql",testnet:"https://indexer-testnet.staging.gcp.aptosdev.com/v1/graphql",devnet:"https://indexer-devnet.staging.gcp.aptosdev.com/v1/graphql",randomnet:"https://indexer-randomnet.hasura.app/v1/graphql",local:"http://127.0.0.1:8090/v1/graphql"},o={mainnet:"https://fullnode.mainnet.aptoslabs.com/v1",testnet:"https://fullnode.testnet.aptoslabs.com/v1",devnet:"https://fullnode.devnet.aptoslabs.com/v1",randomnet:"https://fullnode.random.aptoslabs.com/v1",local:"http://127.0.0.1:8080/v1"},a={mainnet:"https://faucet.mainnet.aptoslabs.com",testnet:"https://faucet.testnet.aptoslabs.com",devnet:"https://faucet.devnet.aptoslabs.com",randomnet:"https://faucet.random.aptoslabs.com",local:"http://127.0.0.1:8081"},e=(t=>(t.MAINNET="mainnet",t.TESTNET="testnet",t.DEVNET="devnet",t.RANDOMNET="randomnet",t.LOCAL="local",t.CUSTOM="custom",t))(e||{}),s={mainnet:1,testnet:2,randomnet:70},r={mainnet:"mainnet",testnet:"testnet",devnet:"devnet",randomnet:"randomnet",local:"local",custom:"custom"};export{n as a,o as b,a as c,e as d,s as e,r as f};
|
|
2
|
-
//# sourceMappingURL=chunk-77SKA4HT.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/apiEndpoints.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nexport const NetworkToIndexerAPI: Record<string, string> = {\n mainnet: \"https://indexer.mainnet.aptoslabs.com/v1/graphql\",\n testnet: \"https://indexer-testnet.staging.gcp.aptosdev.com/v1/graphql\",\n devnet: \"https://indexer-devnet.staging.gcp.aptosdev.com/v1/graphql\",\n randomnet: \"https://indexer-randomnet.hasura.app/v1/graphql\",\n local: \"http://127.0.0.1:8090/v1/graphql\",\n};\n\nexport const NetworkToNodeAPI: Record<string, string> = {\n mainnet: \"https://fullnode.mainnet.aptoslabs.com/v1\",\n testnet: \"https://fullnode.testnet.aptoslabs.com/v1\",\n devnet: \"https://fullnode.devnet.aptoslabs.com/v1\",\n randomnet: \"https://fullnode.random.aptoslabs.com/v1\",\n local: \"http://127.0.0.1:8080/v1\",\n};\n\nexport const NetworkToFaucetAPI: Record<string, string> = {\n mainnet: \"https://faucet.mainnet.aptoslabs.com\",\n testnet: \"https://faucet.testnet.aptoslabs.com\",\n devnet: \"https://faucet.devnet.aptoslabs.com\",\n randomnet: \"https://faucet.random.aptoslabs.com\",\n local: \"http://127.0.0.1:8081\",\n};\n\nexport enum Network {\n MAINNET = \"mainnet\",\n TESTNET = \"testnet\",\n DEVNET = \"devnet\",\n RANDOMNET = \"randomnet\",\n LOCAL = \"local\",\n CUSTOM = \"custom\",\n}\n\nexport const NetworkToChainId: Record<string, number> = {\n mainnet: 1,\n testnet: 2,\n randomnet: 70,\n};\n\nexport const NetworkToNetworkName: Record<string, Network> = {\n mainnet: Network.MAINNET,\n testnet: Network.TESTNET,\n devnet: Network.DEVNET,\n randomnet: Network.RANDOMNET,\n local: Network.LOCAL,\n custom: Network.CUSTOM,\n};\n"],"mappings":"AAGO,IAAMA,EAA8C,CACzD,QAAS,mDACT,QAAS,8DACT,OAAQ,6DACR,UAAW,kDACX,MAAO,kCACT,EAEaC,EAA2C,CACtD,QAAS,4CACT,QAAS,4CACT,OAAQ,2CACR,UAAW,2CACX,MAAO,0BACT,EAEaC,EAA6C,CACxD,QAAS,uCACT,QAAS,uCACT,OAAQ,sCACR,UAAW,sCACX,MAAO,uBACT,EAEYC,OACVA,EAAA,QAAU,UACVA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,UAAY,YACZA,EAAA,MAAQ,QACRA,EAAA,OAAS,SANCA,OAAA,IASCC,EAA2C,CACtD,QAAS,EACT,QAAS,EACT,UAAW,EACb,EAEaC,EAAgD,CAC3D,QAAS,UACT,QAAS,UACT,OAAQ,SACR,UAAW,YACX,MAAO,QACP,OAAQ,QACV","names":["NetworkToIndexerAPI","NetworkToNodeAPI","NetworkToFaucetAPI","Network","NetworkToChainId","NetworkToNetworkName"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/api/transaction.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { AptosConfig } from \"./aptosConfig\";\nimport {\n getGasPriceEstimation,\n getTransactionByHash,\n getTransactionByVersion,\n getTransactions,\n isTransactionPending,\n waitForTransaction,\n} from \"../internal/transaction\";\nimport {\n AnyNumber,\n CommittedTransactionResponse,\n GasEstimation,\n HexInput,\n PaginationArgs,\n PendingTransactionResponse,\n TransactionResponse,\n WaitForTransactionOptions,\n} from \"../types\";\nimport {\n getSigningMessage,\n publicPackageTransaction,\n rotateAuthKey,\n signAndSubmitTransaction,\n signTransaction,\n} from \"../internal/transactionSubmission\";\nimport {\n AccountAuthenticator,\n AnyRawTransaction,\n InputGenerateTransactionOptions,\n InputGenerateTransactionPayloadData,\n SimpleTransaction,\n} from \"../transactions\";\nimport { AccountAddressInput, Account, PrivateKey } from \"../core\";\nimport { Build } from \"./transactionSubmission/build\";\nimport { Simulate } from \"./transactionSubmission/simulate\";\nimport { Submit } from \"./transactionSubmission/submit\";\nimport { TransactionManagement } from \"./transactionSubmission/management\";\n\nexport class Transaction {\n readonly config: AptosConfig;\n\n readonly build: Build;\n\n readonly simulate: Simulate;\n\n readonly submit: Submit;\n\n readonly batch: TransactionManagement;\n\n constructor(config: AptosConfig) {\n this.config = config;\n this.build = new Build(this.config);\n this.simulate = new Simulate(this.config);\n this.submit = new Submit(this.config);\n this.batch = new TransactionManagement(this.config);\n }\n\n /**\n * Queries on-chain transactions. This function will not return pending\n * transactions. For that, use `getTransactionsByHash`.\n *\n * @param args.options.offset The number transaction to start with\n * @param args.options.limit Number of results to return\n *\n * @returns Array of on-chain transactions\n */\n async getTransactions(args?: { options?: PaginationArgs }): Promise<TransactionResponse[]> {\n return getTransactions({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries on-chain transaction by version. This function will not return pending transactions.\n *\n * @param args.ledgerVersion - Transaction version is an unsigned 64-bit number.\n * @returns On-chain transaction. Only on-chain transactions have versions, so this\n * function cannot be used to query pending transactions.\n */\n async getTransactionByVersion(args: { ledgerVersion: AnyNumber }): Promise<TransactionResponse> {\n return getTransactionByVersion({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries on-chain transaction by transaction hash. This function will return pending transactions.\n * @param args.transactionHash - Transaction hash should be hex-encoded bytes string with 0x prefix.\n * @returns Transaction from mempool (pending) or on-chain (committed) transaction\n */\n async getTransactionByHash(args: { transactionHash: HexInput }): Promise<TransactionResponse> {\n return getTransactionByHash({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Defines if specified transaction is currently in pending state\n *\n * To create a transaction hash:\n *\n * 1. Create a hash message from the bytes: \"Aptos::Transaction\" bytes + the BCS-serialized Transaction bytes.\n * 2. Apply hash algorithm SHA3-256 to the hash message bytes.\n * 3. Hex-encode the hash bytes with 0x prefix.\n *\n * @param args.transactionHash A hash of transaction\n * @returns `true` if transaction is in pending state and `false` otherwise\n */\n async isPendingTransaction(args: { transactionHash: HexInput }): Promise<boolean> {\n return isTransactionPending({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Waits for a transaction to move past the pending state.\n *\n * There are 4 cases.\n * 1. Transaction is successfully processed and committed to the chain.\n * - The function will resolve with the transaction response from the API.\n * 2. Transaction is rejected for some reason, and is therefore not committed to the blockchain.\n * - The function will throw an AptosApiError with an HTTP status code indicating some problem with the request.\n * 3. Transaction is committed but execution failed, meaning no changes were\n * written to the blockchain state.\n * - If `checkSuccess` is true, the function will throw a FailedTransactionError\n * If `checkSuccess` is false, the function will resolve with the transaction response where the `success` field is false.\n * 4. Transaction does not move past the pending state within `args.options.timeoutSecs` seconds.\n * - The function will throw a WaitForTransactionError\n *\n *\n * @param args.transactionHash The hash of a transaction previously submitted to the blockchain.\n * @param args.options.timeoutSecs Timeout in seconds. Defaults to 20 seconds.\n * @param args.options.checkSuccess A boolean which controls whether the function will error if the transaction failed.\n * Defaults to true. See case 3 above.\n * @returns The transaction on-chain. See above for more details.\n */\n async waitForTransaction(args: {\n transactionHash: HexInput;\n options?: WaitForTransactionOptions;\n }): Promise<CommittedTransactionResponse> {\n return waitForTransaction({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Gives an estimate of the gas unit price required to get a\n * transaction on chain in a reasonable amount of time.\n * For more information {@link https://fullnode.mainnet.aptoslabs.com/v1/spec#/operations/estimate_gas_price}\n *\n * @returns Object holding the outputs of the estimate gas API\n * @example\n * ```\n * {\n * gas_estimate: number;\n * deprioritized_gas_estimate?: number;\n * prioritized_gas_estimate?: number;\n * }\n * ```\n */\n async getGasPriceEstimation(): Promise<GasEstimation> {\n return getGasPriceEstimation({\n aptosConfig: this.config,\n });\n }\n\n /**\n * Returns a signing message for a transaction.\n *\n * This allows a user to sign a transaction using their own preferred signing method, and\n * then submit it to the network.\n * @param args.transaction A raw transaction for signing elsewhere\n */\n // eslint-disable-next-line class-methods-use-this\n getSigningMessage(args: { transaction: AnyRawTransaction }): Uint8Array {\n return getSigningMessage(args);\n }\n\n /**\n * Generates a transaction to publish a move package to chain.\n *\n * To get the `metadataBytes` and `byteCode`, can compile using Aptos CLI with command\n * `aptos move compile --save-metadata ...`,\n * For more info {@link https://aptos.dev/tutorials/your-first-dapp/#step-4-publish-a-move-module}\n *\n * @param args.account The publisher account\n * @param args.metadataBytes The package metadata bytes\n * @param args.moduleBytecode An array of the bytecode of each module in the package in compiler output order\n *\n * @returns A SimpleTransaction that can be simulated or submitted to chain\n */\n async publishPackageTransaction(args: {\n account: AccountAddressInput;\n metadataBytes: HexInput;\n moduleBytecode: Array<HexInput>;\n options?: InputGenerateTransactionOptions;\n }): Promise<SimpleTransaction> {\n return publicPackageTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Rotate an account's auth key. After rotation, only the new private key can be used to sign txns for\n * the account.\n * Note: Only legacy Ed25519 scheme is supported for now.\n * More info: {@link https://aptos.dev/guides/account-management/key-rotation/}\n * @param args.fromAccount The account to rotate the auth key for\n * @param args.toNewPrivateKey The new private key to rotate to\n *\n * @returns PendingTransactionResponse\n */\n async rotateAuthKey(args: { fromAccount: Account; toNewPrivateKey: PrivateKey }): Promise<TransactionResponse> {\n return rotateAuthKey({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Sign a transaction that can later be submitted to chain\n *\n * @param args.signer The signer account\n * @param args.transaction A raw transaction to sign on\n *\n * @returns AccountAuthenticator\n */\n // eslint-disable-next-line class-methods-use-this\n sign(args: { signer: Account; transaction: AnyRawTransaction }): AccountAuthenticator {\n return signTransaction({\n ...args,\n });\n }\n\n /**\n * Sign a transaction as a fee payer that can later be submitted to chain\n *\n * @param args.signer The fee payer signer account\n * @param args.transaction A raw transaction to sign on\n *\n * @returns AccountAuthenticator\n */\n // eslint-disable-next-line class-methods-use-this\n signAsFeePayer(args: { signer: Account; transaction: AnyRawTransaction }): AccountAuthenticator {\n const { signer, transaction } = args;\n\n // if transaction doesnt hold a \"feePayerAddress\" prop it means\n // this is not a fee payer transaction\n if (!transaction.feePayerAddress) {\n throw new Error(`Transaction ${transaction} is not a Fee Payer transaction`);\n }\n\n // Set the feePayerAddress to the signer account address\n transaction.feePayerAddress = signer.accountAddress;\n\n return signTransaction({\n signer,\n transaction,\n });\n }\n\n // TRANSACTION SUBMISSION //\n\n /**\n * @deprecated Prefer to use `aptos.transaction.batch.forSingleAccount()`\n *\n * Batch transactions for a single account.\n *\n * This function uses a transaction worker that receives payloads to be processed\n * and submitted to chain.\n * Note that this process is best for submitting multiple transactions that\n * dont rely on each other, i.e batch funds, batch token mints, etc.\n *\n * If any worker failure, the functions throws an error.\n *\n * @param args.sender The sender account to sign and submit the transaction\n * @param args.data An array of transaction payloads\n * @param args.options optional. Transaction generation configurations (excluding accountSequenceNumber)\n *\n * @return void. Throws if any error\n */\n async batchTransactionsForSingleAccount(args: {\n sender: Account;\n data: InputGenerateTransactionPayloadData[];\n options?: Omit<InputGenerateTransactionOptions, \"accountSequenceNumber\">;\n }): Promise<void> {\n try {\n const { sender, data, options } = args;\n this.batch.forSingleAccount({ sender, data, options });\n } catch (error: any) {\n throw new Error(`failed to submit transactions with error: ${error}`);\n }\n }\n\n /**\n * Sign and submit a single signer transaction to chain\n *\n * @param args.signer The signer account to sign the transaction\n * @param args.transaction An instance of a RawTransaction, plus optional secondary/fee payer addresses\n * ```\n * {\n * rawTransaction: RawTransaction,\n * secondarySignerAddresses? : Array<AccountAddress>,\n * feePayerAddress?: AccountAddress\n * }\n * ```\n *\n * @return PendingTransactionResponse\n */\n async signAndSubmitTransaction(args: {\n signer: Account;\n transaction: AnyRawTransaction;\n }): Promise<PendingTransactionResponse> {\n const { signer, transaction } = args;\n return signAndSubmitTransaction({\n aptosConfig: this.config,\n signer,\n transaction,\n });\n }\n}\n"],"mappings":"qTA0CO,IAAMA,EAAN,KAAkB,CAWvB,YAAYC,EAAqB,CAC/B,KAAK,OAASA,EACd,KAAK,MAAQ,IAAIC,EAAM,KAAK,MAAM,EAClC,KAAK,SAAW,IAAIC,EAAS,KAAK,MAAM,EACxC,KAAK,OAAS,IAAIC,EAAO,KAAK,MAAM,EACpC,KAAK,MAAQ,IAAIC,EAAsB,KAAK,MAAM,CACpD,CAWA,MAAM,gBAAgBC,EAAqE,CACzF,OAAOC,EAAgB,CACrB,YAAa,KAAK,OAClB,GAAGD,CACL,CAAC,CACH,CASA,MAAM,wBAAwBA,EAAkE,CAC9F,OAAOE,EAAwB,CAC7B,YAAa,KAAK,OAClB,GAAGF,CACL,CAAC,CACH,CAOA,MAAM,qBAAqBA,EAAmE,CAC5F,OAAOG,EAAqB,CAC1B,YAAa,KAAK,OAClB,GAAGH,CACL,CAAC,CACH,CAcA,MAAM,qBAAqBA,EAAuD,CAChF,OAAOI,EAAqB,CAC1B,YAAa,KAAK,OAClB,GAAGJ,CACL,CAAC,CACH,CAwBA,MAAM,mBAAmBA,EAGiB,CACxC,OAAOK,EAAmB,CACxB,YAAa,KAAK,OAClB,GAAGL,CACL,CAAC,CACH,CAiBA,MAAM,uBAAgD,CACpD,OAAOM,EAAsB,CAC3B,YAAa,KAAK,MACpB,CAAC,CACH,CAUA,kBAAkBN,EAAsD,CACtE,OAAOO,EAAkBP,CAAI,CAC/B,CAeA,MAAM,0BAA0BA,EAKD,CAC7B,OAAOQ,EAAyB,CAAE,YAAa,KAAK,OAAQ,GAAGR,CAAK,CAAC,CACvE,CAYA,MAAM,cAAcA,EAA2F,CAC7G,OAAOS,EAAc,CAAE,YAAa,KAAK,OAAQ,GAAGT,CAAK,CAAC,CAC5D,CAWA,KAAKA,EAAiF,CACpF,OAAOU,EAAgB,CACrB,GAAGV,CACL,CAAC,CACH,CAWA,eAAeA,EAAiF,CAC9F,GAAM,CAAE,OAAAW,EAAQ,YAAAC,CAAY,EAAIZ,EAIhC,GAAI,CAACY,EAAY,gBACf,MAAM,IAAI,MAAM,eAAeA,CAAW,iCAAiC,EAI7E,OAAAA,EAAY,gBAAkBD,EAAO,eAE9BD,EAAgB,CACrB,OAAAC,EACA,YAAAC,CACF,CAAC,CACH,CAsBA,MAAM,kCAAkCZ,EAItB,CAChB,GAAI,CACF,GAAM,CAAE,OAAAa,EAAQ,KAAAC,EAAM,QAAAC,CAAQ,EAAIf,EAClC,KAAK,MAAM,iBAAiB,CAAE,OAAAa,EAAQ,KAAAC,EAAM,QAAAC,CAAQ,CAAC,CACvD,OAASC,EAAY,CACnB,MAAM,IAAI,MAAM,6CAA6CA,CAAK,EAAE,CACtE,CACF,CAiBA,MAAM,yBAAyBhB,EAGS,CACtC,GAAM,CAAE,OAAAW,EAAQ,YAAAC,CAAY,EAAIZ,EAChC,OAAOiB,EAAyB,CAC9B,YAAa,KAAK,OAClB,OAAAN,EACA,YAAAC,CACF,CAAC,CACH,CACF","names":["Transaction","config","Build","Simulate","Submit","TransactionManagement","args","getTransactions","getTransactionByVersion","getTransactionByHash","isTransactionPending","waitForTransaction","getGasPriceEstimation","getSigningMessage","publicPackageTransaction","rotateAuthKey","signTransaction","signer","transaction","sender","data","options","error","signAndSubmitTransaction"]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-WOHJGIDT.mjs";var a=class t{constructor(o,s){this.config=o,this.assetUploader=s}static async init(o){switch(o.assetUploaderProvider){case"irys":let s=await e.init(o);return new t(o,s);default:throw new Error("Invalid asset uploader provided")}}async fundNode(o){return this.assetUploader.fundNode({...o})}async uploadData(o){return this.assetUploader.uploadData({...o})}async uploadFile(o){return this.assetUploader.uploadFile({...o})}async uploadFolder(o){return this.assetUploader.uploadFolder({...o})}};export{a};
|
|
2
|
-
//# sourceMappingURL=chunk-TAYSRAKQ.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/plugins/assetUploader/assetUploader.ts"],"sourcesContent":["import type { FundResponse, UploadResponse } from \"@irys/sdk/build/cjs/common/types\";\nimport { AptosConfig } from \"../../api\";\nimport { Account } from \"../../core\";\nimport { IrysAssetUploader } from \"./irys\";\n\n/**\n * Shared interface for asset uploader providers to implement\n *\n * When extending the SDK to use different providers, we might need to use generic\n * inputs and outputs function arguments.\n */\nexport interface IAssetUploader {\n fundNode(args: { account: Account; amount: number }): Promise<FundResponse>;\n uploadData(args: { account: Account; data: string | Buffer; options?: any }): Promise<UploadResponse>;\n uploadFile(args: { account: Account; filePathToUpload: string; options?: any }): Promise<UploadResponse>;\n uploadFolder(args: { account: Account; folderToUpload: string; options?: any }): Promise<UploadResponse | undefined>;\n}\n\nexport class AssetUploader {\n readonly config: AptosConfig;\n\n readonly assetUploader: IAssetUploader;\n\n private constructor(config: AptosConfig, assetUploader: IAssetUploader) {\n this.config = config;\n this.assetUploader = assetUploader;\n }\n\n static async init(config: AptosConfig) {\n switch (config.assetUploaderProvider) {\n case \"irys\":\n const assetUploader = await IrysAssetUploader.init(config);\n return new AssetUploader(config, assetUploader);\n default:\n throw new Error(\"Invalid asset uploader provided\");\n }\n }\n\n /**\n * Funds the node you connected to with the specified amount of tokens\n *\n * @param args.account The account to sign and pay the fund transaction with\n * @param args.amount The amount to fund the node in\n *\n * @return FundResponse\n */\n async fundNode(args: { account: Account; amount: number }): Promise<FundResponse> {\n return this.assetUploader.fundNode({ ...args });\n }\n\n /**\n * Upload a data\n *\n * @param args.account The account to sign and pay the fund transaction with\n * @param args.data The data to upload\n *\n * @return UploadResponse\n */\n async uploadData(args: { account: Account; data: string | Buffer; options?: any }): Promise<UploadResponse> {\n return this.assetUploader.uploadData({ ...args });\n }\n\n /**\n * Upload a file\n *\n * @param args.account The account to sign and pay the upload file transaction with\n * @param args.filePathToUpload The file to upload as the file path\n *\n * @return UploadResponse\n */\n async uploadFile(args: { account: Account; filePathToUpload: string; options?: any }): Promise<UploadResponse> {\n return this.assetUploader.uploadFile({ ...args });\n }\n\n /**\n * Upload a folder\n *\n * @param args.account The account to sign and pay the upload folder transaction with\n * @param args.folderToUpload The folder to upload as the folder path\n *\n * @return UploadResponse | undefined\n */\n async uploadFolder(args: {\n account: Account;\n folderToUpload: string;\n options?: any;\n }): Promise<UploadResponse | undefined> {\n return this.assetUploader.uploadFolder({ ...args });\n }\n}\n"],"mappings":"yCAkBO,IAAMA,EAAN,MAAMC,CAAc,CAKjB,YAAYC,EAAqBC,EAA+B,CACtE,KAAK,OAASD,EACd,KAAK,cAAgBC,CACvB,CAEA,aAAa,KAAKD,EAAqB,CACrC,OAAQA,EAAO,sBAAuB,CACpC,IAAK,OACH,IAAMC,EAAgB,MAAMC,EAAkB,KAAKF,CAAM,EACzD,OAAO,IAAID,EAAcC,EAAQC,CAAa,EAChD,QACE,MAAM,IAAI,MAAM,iCAAiC,CACrD,CACF,CAUA,MAAM,SAASE,EAAmE,CAChF,OAAO,KAAK,cAAc,SAAS,CAAE,GAAGA,CAAK,CAAC,CAChD,CAUA,MAAM,WAAWA,EAA2F,CAC1G,OAAO,KAAK,cAAc,WAAW,CAAE,GAAGA,CAAK,CAAC,CAClD,CAUA,MAAM,WAAWA,EAA8F,CAC7G,OAAO,KAAK,cAAc,WAAW,CAAE,GAAGA,CAAK,CAAC,CAClD,CAUA,MAAM,aAAaA,EAIqB,CACtC,OAAO,KAAK,cAAc,aAAa,CAAE,GAAGA,CAAK,CAAC,CACpD,CACF","names":["AssetUploader","_AssetUploader","config","assetUploader","IrysAssetUploader","args"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=chunk-TKM3W4UG.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var i=class a{constructor(o,r){this.config=o,this.irysApp=r}static async init(o){try{let r=await import("@irys/sdk");return new a(o,r.default)}catch{throw new Error("To use the Irys service, please install @irys/sdk")}}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){if(!this.irysApp)throw new Error("Irys has not been initialized");let{irysNode:r,providerUrl:t}=this.resolveProvider();return this.irysApp.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-WOHJGIDT.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/plugins/assetUploader/irys.ts"],"sourcesContent":["import type { NodeIrys } from \"@irys/sdk/build/cjs/node/irys\";\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 private irysApp: typeof NodeIrys | undefined;\n\n private constructor(config: AptosConfig, irysApp: typeof NodeIrys) {\n this.config = config;\n this.irysApp = irysApp;\n }\n\n static async init(config: AptosConfig) {\n try {\n const irys = await import(\"@irys/sdk\");\n return new IrysAssetUploader(config, irys.default);\n } catch (e: any) {\n throw new Error(\"To use the Irys service, please install @irys/sdk\");\n }\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 if (!this.irysApp) {\n throw new Error(\"Irys has not been initialized\");\n }\n const { irysNode, providerUrl } = this.resolveProvider();\n const irys = this.irysApp.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":"AAaO,IAAMA,EAAN,MAAMC,CAA4C,CAK/C,YAAYC,EAAqBC,EAA0B,CACjE,KAAK,OAASD,EACd,KAAK,QAAUC,CACjB,CAEA,aAAa,KAAKD,EAAqB,CACrC,GAAI,CACF,IAAME,EAAO,KAAM,QAAO,WAAW,EACrC,OAAO,IAAIH,EAAkBC,EAAQE,EAAK,OAAO,CACnD,MAAiB,CACf,MAAM,IAAI,MAAM,mDAAmD,CACrE,CACF,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,GAAI,CAAC,KAAK,QACR,MAAM,IAAI,MAAM,+BAA+B,EAEjD,GAAM,CAAE,SAAAC,EAAU,YAAAC,CAAY,EAAI,KAAK,gBAAgB,EAQvD,OAPa,KAAK,QAAQ,KAAK,CAC7B,IAAKD,EACL,MAAO,QACP,UAAWD,EAAK,QAAQ,UAAU,SAAS,EAC3C,YAAaE,EACb,gBAAiB,MAAOC,GAAoBH,EAAK,QAAQ,KAAKG,CAAG,EAAE,aAAa,CAClF,CAAC,CAEH,CAEA,MAAM,SAASH,EAAmE,CAChF,GAAM,CAAE,QAAAI,EAAS,OAAAC,CAAO,EAAIL,EACtBD,EAAO,MAAM,KAAK,QAAQ,CAAE,QAAAK,CAAQ,CAAC,EAC3C,GAAI,CACF,OAAO,MAAML,EAAK,KAAKM,CAAM,CAC/B,OAASC,EAAG,CACV,MAAM,IAAI,MAAM,2BAA2BA,CAAC,EAAE,CAChD,CACF,CAEA,MAAM,WAAWN,EAIW,CAC1B,GAAM,CAAE,QAAAI,EAAS,KAAAG,EAAM,QAAAC,CAAQ,EAAIR,EAC7BD,EAAO,MAAM,KAAK,QAAQ,CAAE,QAAAK,CAAQ,CAAC,EAC3C,GAAI,CACF,OAAO,MAAML,EAAK,OAAOQ,EAAMC,CAAO,CACxC,OAASF,EAAG,CACV,MAAM,IAAI,MAAM,8BAA8BA,CAAC,EAAE,CACnD,CACF,CAEA,MAAM,WAAWN,EAIW,CAC1B,GAAM,CAAE,QAAAI,EAAS,iBAAAK,EAAkB,QAAAD,CAAQ,EAAIR,EACzCD,EAAO,MAAM,KAAK,QAAQ,CAAE,QAAAK,CAAQ,CAAC,EAE3C,GAAI,CACF,OAAO,MAAML,EAAK,WAAWU,EAAkBD,CAAO,CACxD,OAASF,EAAG,CACV,MAAM,IAAI,MAAM,gCAAgCA,CAAC,EAAE,CACrD,CACF,CAEA,MAAM,aAAaN,EAIqB,CACtC,GAAM,CAAE,QAAAI,EAAS,eAAAM,EAAgB,QAAAF,CAAQ,EAAIR,EACvCD,EAAO,MAAM,KAAK,QAAQ,CAAE,QAAAK,CAAQ,CAAC,EAE3C,GAAI,CACF,OAAO,MAAML,EAAK,aAAaW,EAAgBF,CAAO,CACxD,OAASF,EAAG,CACV,MAAM,IAAI,MAAM,kCAAkCA,CAAC,EAAE,CACvD,CACF,CACF","names":["IrysAssetUploader","_IrysAssetUploader","config","irysApp","irys","args","irysNode","providerUrl","msg","account","amount","e","data","options","filePathToUpload","folderToUpload"]}
|