@aptos-labs/ts-sdk 1.35.0-zeta.0 → 1.35.0-zeta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/{accountAddress-D3UA_cOZ.d.ts → accountAddress-Ce4Cv60D.d.ts} +36 -2
- package/dist/common/{chunk-CSUBLTFA.js → chunk-JMOQXLED.js} +10 -2
- package/dist/common/chunk-JMOQXLED.js.map +1 -0
- package/dist/common/cli/index.d.ts +1 -1
- package/dist/common/cli/index.js +2 -2
- package/dist/common/index.d.ts +33 -19
- package/dist/common/index.js +1325 -1289
- package/dist/common/index.js.map +1 -1
- package/dist/esm/account/AbstractKeylessAccount.mjs +14 -14
- package/dist/esm/account/AbstractedAccount.mjs +17 -17
- package/dist/esm/account/Account.mjs +16 -16
- package/dist/esm/account/AccountUtils.mjs +21 -21
- package/dist/esm/account/Ed25519Account.mjs +14 -14
- package/dist/esm/account/EphemeralKeyPair.mjs +5 -5
- package/dist/esm/account/FederatedKeylessAccount.mjs +15 -15
- package/dist/esm/account/KeylessAccount.mjs +15 -15
- package/dist/esm/account/MultiEd25519Account.mjs +14 -14
- package/dist/esm/account/MultiKeyAccount.d.mts +1 -0
- package/dist/esm/account/MultiKeyAccount.mjs +17 -17
- package/dist/esm/account/SingleKeyAccount.mjs +14 -14
- package/dist/esm/account/index.mjs +24 -24
- package/dist/esm/account/utils.mjs +6 -6
- package/dist/esm/api/account/abstraction.mjs +36 -36
- package/dist/esm/api/account.mjs +40 -38
- package/dist/esm/api/ans.mjs +36 -36
- package/dist/esm/api/aptos.d.mts +0 -1
- package/dist/esm/api/aptos.mjs +71 -68
- package/dist/esm/api/coin.mjs +35 -34
- package/dist/esm/api/digitalAsset.mjs +36 -36
- package/dist/esm/api/event.mjs +10 -10
- package/dist/esm/api/experimental.mjs +23 -37
- package/dist/esm/api/faucet.mjs +9 -9
- package/dist/esm/api/fungibleAsset.mjs +36 -36
- package/dist/esm/api/general.d.mts +2 -2
- package/dist/esm/api/general.mjs +23 -37
- package/dist/esm/api/index.d.mts +0 -1
- package/dist/esm/api/index.mjs +71 -68
- package/dist/esm/api/keyless.mjs +37 -35
- package/dist/esm/api/object.mjs +10 -10
- package/dist/esm/api/staking.mjs +10 -10
- package/dist/esm/api/table.mjs +10 -10
- package/dist/esm/api/transaction.d.mts +30 -18
- package/dist/esm/api/transaction.mjs +43 -41
- package/dist/esm/api/transactionSubmission/build.mjs +34 -34
- package/dist/esm/api/transactionSubmission/management.mjs +38 -36
- package/dist/esm/api/transactionSubmission/sign.mjs +33 -33
- package/dist/esm/api/transactionSubmission/simulate.mjs +34 -34
- package/dist/esm/api/transactionSubmission/submit.mjs +34 -34
- package/dist/esm/api/utils.mjs +8 -8
- package/dist/esm/bcs/index.mjs +7 -7
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/{chunk-XGUYC57L.mjs → chunk-2FTF6J7F.mjs} +3 -3
- package/dist/esm/{chunk-LHQJNJUB.mjs → chunk-2HL7JEFC.mjs} +9 -9
- package/dist/esm/{chunk-EFJAJFI3.mjs → chunk-2WBJAKBO.mjs} +2 -2
- package/dist/esm/{chunk-J7WQ42OC.mjs → chunk-3DAVHDK4.mjs} +2 -2
- package/dist/esm/{chunk-QN5BQMWP.mjs → chunk-56UCIGTO.mjs} +2 -2
- package/dist/esm/{chunk-I6QE3PKO.mjs → chunk-5ORUQZAR.mjs} +2 -2
- package/dist/esm/{chunk-P64LPFEC.mjs → chunk-62LC4PPC.mjs} +2 -2
- package/dist/esm/{chunk-ZWD4BJVD.mjs → chunk-6OFCIXWS.mjs} +3 -3
- package/dist/esm/chunk-6OFCIXWS.mjs.map +1 -0
- package/dist/esm/{chunk-LL4RQKIB.mjs → chunk-6T3V5LXK.mjs} +1 -2
- package/dist/esm/{chunk-LL4RQKIB.mjs.map → chunk-6T3V5LXK.mjs.map} +1 -1
- package/dist/esm/{chunk-UXAUOSSB.mjs → chunk-7F32C225.mjs} +6 -6
- package/dist/esm/{chunk-ESZLRZTK.mjs → chunk-7WW735TU.mjs} +3 -3
- package/dist/esm/{chunk-BQ5JTYXK.mjs → chunk-A33OBGVN.mjs} +3 -3
- package/dist/esm/{chunk-LFMXR5C2.mjs → chunk-A7LYGPFL.mjs} +3 -3
- package/dist/esm/{chunk-SDIZSFCQ.mjs → chunk-BU43ZFDJ.mjs} +2 -2
- package/dist/esm/{chunk-YIHVPGHN.mjs → chunk-C7EEG6SW.mjs} +4 -4
- package/dist/esm/{chunk-XGB3QLVI.mjs → chunk-D6RXVCE3.mjs} +3 -3
- package/dist/esm/{chunk-SGKF62FT.mjs → chunk-DGDZNHUJ.mjs} +5 -3
- package/dist/esm/{chunk-SGKF62FT.mjs.map → chunk-DGDZNHUJ.mjs.map} +1 -1
- package/dist/esm/{chunk-WEOK7WVL.mjs → chunk-EBFKT35C.mjs} +2 -2
- package/dist/esm/{chunk-JOVCSFQC.mjs → chunk-F4VI7BNX.mjs} +2 -2
- package/dist/esm/{chunk-VGI2LPO3.mjs → chunk-FDMI4BUL.mjs} +32 -25
- package/dist/esm/chunk-FDMI4BUL.mjs.map +1 -0
- package/dist/esm/chunk-FRLS4GRM.mjs +62 -0
- package/dist/esm/chunk-FRLS4GRM.mjs.map +1 -0
- package/dist/esm/chunk-G3MHXDYA.mjs +1 -0
- package/dist/esm/chunk-G3MHXDYA.mjs.map +1 -0
- package/dist/esm/{chunk-ZNGTK5IZ.mjs → chunk-G6R77JKO.mjs} +29 -29
- package/dist/esm/{chunk-6PMKDSGB.mjs → chunk-G7BB6K4B.mjs} +2 -2
- package/dist/esm/{chunk-ODG7T6OV.mjs → chunk-GCQK2S5Q.mjs} +2 -2
- package/dist/esm/{chunk-4BXAKN6A.mjs → chunk-HBXBODME.mjs} +3 -3
- package/dist/esm/{chunk-UKZP2GAB.mjs → chunk-HKQY5GXT.mjs} +7 -191
- package/dist/esm/chunk-HKQY5GXT.mjs.map +1 -0
- package/dist/esm/{chunk-NMYFY7WN.mjs → chunk-HL337SEM.mjs} +3 -3
- package/dist/esm/{chunk-K3CXNID3.mjs → chunk-HQDHSKVS.mjs} +2 -2
- package/dist/esm/{chunk-S56SMMAK.mjs → chunk-I5G7XFGT.mjs} +3 -3
- package/dist/esm/{chunk-HQ6A6TYS.mjs → chunk-IJ7XCPP3.mjs} +17 -12
- package/dist/esm/chunk-IJ7XCPP3.mjs.map +1 -0
- package/dist/esm/{chunk-46VPRC7E.mjs → chunk-ILTEOGFF.mjs} +2 -2
- package/dist/esm/{chunk-KLZCGNPI.mjs → chunk-IP7GATDH.mjs} +6 -6
- package/dist/esm/{chunk-KLZCGNPI.mjs.map → chunk-IP7GATDH.mjs.map} +1 -1
- package/dist/esm/{chunk-MHZVL3EA.mjs → chunk-IQVHXOD3.mjs} +8 -8
- package/dist/esm/{chunk-4WNIKKIV.mjs → chunk-JAZJE3OR.mjs} +3 -3
- package/dist/esm/{chunk-SN6KXHPA.mjs → chunk-JEVGHYEP.mjs} +2 -2
- package/dist/esm/{chunk-OQ6XT2GF.mjs → chunk-JFMFZ2IL.mjs} +3 -3
- package/dist/esm/{chunk-HQTQEHHZ.mjs → chunk-JQIRRM7G.mjs} +4 -4
- package/dist/esm/{chunk-MG6UFOJW.mjs → chunk-K5OCDM3W.mjs} +6 -6
- package/dist/esm/{chunk-MG6UFOJW.mjs.map → chunk-K5OCDM3W.mjs.map} +1 -1
- package/dist/esm/{chunk-MUSTBCQX.mjs → chunk-KW64NP2F.mjs} +2 -2
- package/dist/esm/{chunk-DUOU3SNQ.mjs → chunk-ORCQEMJL.mjs} +3 -3
- package/dist/esm/{chunk-LSIXUJ5T.mjs → chunk-QYNYDQE3.mjs} +4 -4
- package/dist/esm/{chunk-5E2IDRDF.mjs → chunk-R45SPK6Q.mjs} +2 -2
- package/dist/esm/{chunk-KAKSJSCR.mjs → chunk-RCXGTN36.mjs} +2 -2
- package/dist/esm/{chunk-3QMLVT4L.mjs → chunk-SPI2HO3E.mjs} +2 -2
- package/dist/esm/{chunk-KEZG4OGH.mjs → chunk-SPVJXZL5.mjs} +208 -68
- package/dist/esm/chunk-SPVJXZL5.mjs.map +1 -0
- package/dist/esm/{chunk-QW7RQDZ5.mjs → chunk-SQNS4SFV.mjs} +9 -1
- package/dist/esm/{chunk-QW7RQDZ5.mjs.map → chunk-SQNS4SFV.mjs.map} +1 -1
- package/dist/esm/{chunk-MIVDDJAH.mjs → chunk-SRXIHVZE.mjs} +2 -2
- package/dist/esm/{chunk-2ZOIVB2U.mjs → chunk-T4BFWV46.mjs} +2 -2
- package/dist/esm/{chunk-TQDWZXFD.mjs → chunk-TDLL7QX5.mjs} +7 -7
- package/dist/esm/{chunk-Y4FHNC5I.mjs → chunk-TJDF4CXI.mjs} +2 -2
- package/dist/esm/{chunk-HMHFKEHQ.mjs → chunk-TL4Z4KHK.mjs} +2 -2
- package/dist/esm/{chunk-Y7KAC4I4.mjs → chunk-UGFIWCJQ.mjs} +2 -2
- package/dist/esm/{chunk-EBEO4SA4.mjs → chunk-UGKZQUGE.mjs} +4 -4
- package/dist/esm/{chunk-KCV4HRSJ.mjs → chunk-UK7SPHIE.mjs} +4 -4
- package/dist/esm/{chunk-KEKNIJHE.mjs → chunk-WHSS6I7T.mjs} +3 -3
- package/dist/esm/{chunk-3SCNBHUA.mjs → chunk-WLTQHGIJ.mjs} +5 -5
- package/dist/esm/{chunk-I4OHHVRF.mjs → chunk-WUM247HF.mjs} +2 -2
- package/dist/esm/{chunk-A3TQLIEM.mjs → chunk-WXQUBQK4.mjs} +2 -2
- package/dist/esm/{chunk-WPV52HGD.mjs → chunk-X4N5BN3S.mjs} +3 -3
- package/dist/esm/{chunk-KPAICS4T.mjs → chunk-XX6C2QGI.mjs} +2 -2
- package/dist/esm/{chunk-XXLSA7W7.mjs → chunk-Y3M32DIB.mjs} +2 -2
- package/dist/esm/{chunk-HLTYSM7H.mjs → chunk-YK66QBML.mjs} +2 -2
- package/dist/esm/{chunk-EMKV5DFX.mjs → chunk-YT7V6AVJ.mjs} +3 -3
- package/dist/esm/chunk-ZRBUAZZD.mjs +36 -0
- package/dist/esm/chunk-ZRBUAZZD.mjs.map +1 -0
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/cli/localNode.mjs +1 -1
- package/dist/esm/client/core.mjs +4 -4
- package/dist/esm/client/get.mjs +4 -4
- package/dist/esm/client/index.mjs +5 -5
- package/dist/esm/client/post.mjs +5 -5
- package/dist/esm/core/account/index.mjs +1 -1
- package/dist/esm/core/account/utils/address.mjs +1 -1
- package/dist/esm/core/account/utils/index.mjs +1 -1
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/crypto/abstraction.mjs +3 -3
- package/dist/esm/core/crypto/ed25519.mjs +3 -3
- package/dist/esm/core/crypto/ephemeral.mjs +3 -3
- package/dist/esm/core/crypto/federatedKeyless.mjs +5 -5
- package/dist/esm/core/crypto/index.mjs +5 -5
- package/dist/esm/core/crypto/keyless.mjs +5 -5
- package/dist/esm/core/crypto/multiEd25519.mjs +5 -5
- package/dist/esm/core/crypto/multiKey.mjs +5 -5
- package/dist/esm/core/crypto/privateKey.mjs +1 -1
- package/dist/esm/core/crypto/proof.mjs +3 -3
- package/dist/esm/core/crypto/publicKey.mjs +3 -3
- package/dist/esm/core/crypto/secp256k1.mjs +3 -3
- package/dist/esm/core/crypto/signature.mjs +3 -3
- package/dist/esm/core/crypto/singleKey.mjs +5 -5
- package/dist/esm/core/index.mjs +5 -5
- package/dist/esm/errors/index.mjs +2 -2
- package/dist/esm/index.d.mts +1 -1
- package/dist/esm/index.mjs +81 -74
- package/dist/esm/internal/abstraction.mjs +34 -34
- package/dist/esm/internal/account.d.mts +45 -5
- package/dist/esm/internal/account.mjs +44 -30
- package/dist/esm/internal/ans.mjs +35 -35
- package/dist/esm/internal/coin.mjs +34 -33
- package/dist/esm/internal/digitalAsset.mjs +34 -34
- package/dist/esm/internal/event.mjs +7 -7
- package/dist/esm/internal/experimental.mjs +22 -36
- package/dist/esm/internal/faucet.mjs +8 -8
- package/dist/esm/internal/fungibleAsset.mjs +34 -34
- package/dist/esm/internal/general.mjs +6 -6
- package/dist/esm/internal/keyless.mjs +36 -34
- package/dist/esm/internal/object.mjs +7 -7
- package/dist/esm/internal/staking.mjs +7 -7
- package/dist/esm/internal/table.mjs +7 -7
- package/dist/esm/internal/transaction.mjs +7 -7
- package/dist/esm/internal/transactionSubmission.d.mts +6 -36
- package/dist/esm/internal/transactionSubmission.mjs +33 -39
- package/dist/esm/internal/utils/index.d.mts +15 -0
- package/dist/esm/internal/utils/index.mjs +39 -0
- package/dist/esm/internal/utils/index.mjs.map +1 -0
- package/dist/esm/internal/utils/utils.d.mts +65 -0
- package/dist/esm/internal/utils/utils.mjs +38 -0
- package/dist/esm/internal/utils/utils.mjs.map +1 -0
- package/dist/esm/internal/view.mjs +22 -36
- package/dist/esm/transactions/authenticator/account.mjs +5 -5
- package/dist/esm/transactions/authenticator/index.mjs +5 -5
- package/dist/esm/transactions/authenticator/transaction.mjs +5 -5
- package/dist/esm/transactions/index.mjs +23 -37
- package/dist/esm/transactions/instances/index.mjs +14 -14
- package/dist/esm/transactions/instances/moduleId.mjs +5 -5
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +9 -9
- package/dist/esm/transactions/instances/rawTransaction.mjs +8 -8
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +3 -3
- package/dist/esm/transactions/instances/signedTransaction.mjs +9 -9
- package/dist/esm/transactions/instances/simpleTransaction.mjs +9 -9
- package/dist/esm/transactions/instances/transactionPayload.mjs +6 -6
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +41 -29
- package/dist/esm/transactions/management/index.mjs +37 -35
- package/dist/esm/transactions/management/transactionWorker.mjs +37 -35
- package/dist/esm/transactions/scriptComposer/index.mjs +21 -35
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +6 -6
- package/dist/esm/transactions/transactionBuilder/index.mjs +20 -34
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +9 -40
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +13 -13
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +19 -34
- package/dist/esm/transactions/typeTag/index.mjs +5 -5
- package/dist/esm/transactions/typeTag/parser.mjs +5 -5
- package/dist/esm/types/index.d.mts +1 -1
- package/dist/esm/types/index.mjs +5 -1
- package/dist/esm/types/types.d.mts +36 -2
- package/dist/esm/types/types.mjs +5 -1
- package/dist/esm/utils/helpers.mjs +1 -1
- package/dist/esm/utils/index.mjs +4 -4
- package/dist/esm/utils/normalizeBundle.mjs +3 -3
- package/package.json +25 -24
- package/src/account/MultiKeyAccount.ts +3 -2
- package/src/api/general.ts +2 -2
- package/src/api/transaction.ts +30 -29
- package/src/client/post.ts +0 -1
- package/src/internal/account.ts +230 -71
- package/src/internal/transactionSubmission.ts +4 -202
- package/src/internal/utils/index.ts +4 -0
- package/src/internal/utils/utils.ts +116 -0
- package/src/transactions/scriptComposer/index.ts +3 -1
- package/src/transactions/transactionBuilder/remoteAbi.ts +1 -1
- package/src/transactions/transactionBuilder/transactionBuilder.ts +7 -2
- package/src/types/types.ts +38 -1
- package/dist/common/chunk-CSUBLTFA.js.map +0 -1
- package/dist/esm/chunk-HQ6A6TYS.mjs.map +0 -1
- package/dist/esm/chunk-KEZG4OGH.mjs.map +0 -1
- package/dist/esm/chunk-UKZP2GAB.mjs.map +0 -1
- package/dist/esm/chunk-VGI2LPO3.mjs.map +0 -1
- package/dist/esm/chunk-ZWD4BJVD.mjs.map +0 -1
- /package/dist/esm/{chunk-XGUYC57L.mjs.map → chunk-2FTF6J7F.mjs.map} +0 -0
- /package/dist/esm/{chunk-LHQJNJUB.mjs.map → chunk-2HL7JEFC.mjs.map} +0 -0
- /package/dist/esm/{chunk-EFJAJFI3.mjs.map → chunk-2WBJAKBO.mjs.map} +0 -0
- /package/dist/esm/{chunk-J7WQ42OC.mjs.map → chunk-3DAVHDK4.mjs.map} +0 -0
- /package/dist/esm/{chunk-QN5BQMWP.mjs.map → chunk-56UCIGTO.mjs.map} +0 -0
- /package/dist/esm/{chunk-I6QE3PKO.mjs.map → chunk-5ORUQZAR.mjs.map} +0 -0
- /package/dist/esm/{chunk-P64LPFEC.mjs.map → chunk-62LC4PPC.mjs.map} +0 -0
- /package/dist/esm/{chunk-UXAUOSSB.mjs.map → chunk-7F32C225.mjs.map} +0 -0
- /package/dist/esm/{chunk-ESZLRZTK.mjs.map → chunk-7WW735TU.mjs.map} +0 -0
- /package/dist/esm/{chunk-BQ5JTYXK.mjs.map → chunk-A33OBGVN.mjs.map} +0 -0
- /package/dist/esm/{chunk-LFMXR5C2.mjs.map → chunk-A7LYGPFL.mjs.map} +0 -0
- /package/dist/esm/{chunk-SDIZSFCQ.mjs.map → chunk-BU43ZFDJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-YIHVPGHN.mjs.map → chunk-C7EEG6SW.mjs.map} +0 -0
- /package/dist/esm/{chunk-XGB3QLVI.mjs.map → chunk-D6RXVCE3.mjs.map} +0 -0
- /package/dist/esm/{chunk-WEOK7WVL.mjs.map → chunk-EBFKT35C.mjs.map} +0 -0
- /package/dist/esm/{chunk-JOVCSFQC.mjs.map → chunk-F4VI7BNX.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZNGTK5IZ.mjs.map → chunk-G6R77JKO.mjs.map} +0 -0
- /package/dist/esm/{chunk-6PMKDSGB.mjs.map → chunk-G7BB6K4B.mjs.map} +0 -0
- /package/dist/esm/{chunk-ODG7T6OV.mjs.map → chunk-GCQK2S5Q.mjs.map} +0 -0
- /package/dist/esm/{chunk-4BXAKN6A.mjs.map → chunk-HBXBODME.mjs.map} +0 -0
- /package/dist/esm/{chunk-NMYFY7WN.mjs.map → chunk-HL337SEM.mjs.map} +0 -0
- /package/dist/esm/{chunk-K3CXNID3.mjs.map → chunk-HQDHSKVS.mjs.map} +0 -0
- /package/dist/esm/{chunk-S56SMMAK.mjs.map → chunk-I5G7XFGT.mjs.map} +0 -0
- /package/dist/esm/{chunk-46VPRC7E.mjs.map → chunk-ILTEOGFF.mjs.map} +0 -0
- /package/dist/esm/{chunk-MHZVL3EA.mjs.map → chunk-IQVHXOD3.mjs.map} +0 -0
- /package/dist/esm/{chunk-4WNIKKIV.mjs.map → chunk-JAZJE3OR.mjs.map} +0 -0
- /package/dist/esm/{chunk-SN6KXHPA.mjs.map → chunk-JEVGHYEP.mjs.map} +0 -0
- /package/dist/esm/{chunk-OQ6XT2GF.mjs.map → chunk-JFMFZ2IL.mjs.map} +0 -0
- /package/dist/esm/{chunk-HQTQEHHZ.mjs.map → chunk-JQIRRM7G.mjs.map} +0 -0
- /package/dist/esm/{chunk-MUSTBCQX.mjs.map → chunk-KW64NP2F.mjs.map} +0 -0
- /package/dist/esm/{chunk-DUOU3SNQ.mjs.map → chunk-ORCQEMJL.mjs.map} +0 -0
- /package/dist/esm/{chunk-LSIXUJ5T.mjs.map → chunk-QYNYDQE3.mjs.map} +0 -0
- /package/dist/esm/{chunk-5E2IDRDF.mjs.map → chunk-R45SPK6Q.mjs.map} +0 -0
- /package/dist/esm/{chunk-KAKSJSCR.mjs.map → chunk-RCXGTN36.mjs.map} +0 -0
- /package/dist/esm/{chunk-3QMLVT4L.mjs.map → chunk-SPI2HO3E.mjs.map} +0 -0
- /package/dist/esm/{chunk-MIVDDJAH.mjs.map → chunk-SRXIHVZE.mjs.map} +0 -0
- /package/dist/esm/{chunk-2ZOIVB2U.mjs.map → chunk-T4BFWV46.mjs.map} +0 -0
- /package/dist/esm/{chunk-TQDWZXFD.mjs.map → chunk-TDLL7QX5.mjs.map} +0 -0
- /package/dist/esm/{chunk-Y4FHNC5I.mjs.map → chunk-TJDF4CXI.mjs.map} +0 -0
- /package/dist/esm/{chunk-HMHFKEHQ.mjs.map → chunk-TL4Z4KHK.mjs.map} +0 -0
- /package/dist/esm/{chunk-Y7KAC4I4.mjs.map → chunk-UGFIWCJQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-EBEO4SA4.mjs.map → chunk-UGKZQUGE.mjs.map} +0 -0
- /package/dist/esm/{chunk-KCV4HRSJ.mjs.map → chunk-UK7SPHIE.mjs.map} +0 -0
- /package/dist/esm/{chunk-KEKNIJHE.mjs.map → chunk-WHSS6I7T.mjs.map} +0 -0
- /package/dist/esm/{chunk-3SCNBHUA.mjs.map → chunk-WLTQHGIJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-I4OHHVRF.mjs.map → chunk-WUM247HF.mjs.map} +0 -0
- /package/dist/esm/{chunk-A3TQLIEM.mjs.map → chunk-WXQUBQK4.mjs.map} +0 -0
- /package/dist/esm/{chunk-WPV52HGD.mjs.map → chunk-X4N5BN3S.mjs.map} +0 -0
- /package/dist/esm/{chunk-KPAICS4T.mjs.map → chunk-XX6C2QGI.mjs.map} +0 -0
- /package/dist/esm/{chunk-XXLSA7W7.mjs.map → chunk-Y3M32DIB.mjs.map} +0 -0
- /package/dist/esm/{chunk-HLTYSM7H.mjs.map → chunk-YK66QBML.mjs.map} +0 -0
- /package/dist/esm/{chunk-EMKV5DFX.mjs.map → chunk-YT7V6AVJ.mjs.map} +0 -0
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Simulate
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-RCXGTN36.mjs";
|
|
4
4
|
import "../../chunk-ZWCTF3NQ.mjs";
|
|
5
|
-
import "../../chunk-
|
|
5
|
+
import "../../chunk-HKQY5GXT.mjs";
|
|
6
6
|
import "../../chunk-UIRAXHDH.mjs";
|
|
7
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-DGDZNHUJ.mjs";
|
|
8
8
|
import "../../chunk-JXCZTOYC.mjs";
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-IJ7XCPP3.mjs";
|
|
10
|
+
import "../../chunk-6OFCIXWS.mjs";
|
|
11
11
|
import "../../chunk-BMM72IIP.mjs";
|
|
12
|
-
import "../../chunk-
|
|
12
|
+
import "../../chunk-JQIRRM7G.mjs";
|
|
13
|
+
import "../../chunk-G3MHXDYA.mjs";
|
|
14
|
+
import "../../chunk-FRLS4GRM.mjs";
|
|
13
15
|
import "../../chunk-BSCOVLWS.mjs";
|
|
14
16
|
import "../../chunk-V3MBJJTL.mjs";
|
|
15
|
-
import "../../chunk-
|
|
16
|
-
import "../../chunk-
|
|
17
|
-
import "../../chunk-SDIZSFCQ.mjs";
|
|
18
|
-
import "../../chunk-HLTYSM7H.mjs";
|
|
17
|
+
import "../../chunk-BU43ZFDJ.mjs";
|
|
18
|
+
import "../../chunk-YK66QBML.mjs";
|
|
19
19
|
import "../../chunk-EPTUAWRA.mjs";
|
|
20
20
|
import "../../chunk-GFPEB22G.mjs";
|
|
21
|
-
import "../../chunk-
|
|
22
|
-
import "../../chunk-
|
|
21
|
+
import "../../chunk-5ORUQZAR.mjs";
|
|
22
|
+
import "../../chunk-HBXBODME.mjs";
|
|
23
23
|
import "../../chunk-AKXCFBYF.mjs";
|
|
24
|
-
import "../../chunk-
|
|
25
|
-
import "../../chunk-
|
|
26
|
-
import "../../chunk-
|
|
27
|
-
import "../../chunk-
|
|
28
|
-
import "../../chunk-
|
|
29
|
-
import "../../chunk-
|
|
30
|
-
import "../../chunk-
|
|
31
|
-
import "../../chunk-
|
|
32
|
-
import "../../chunk-
|
|
33
|
-
import "../../chunk-
|
|
24
|
+
import "../../chunk-WHSS6I7T.mjs";
|
|
25
|
+
import "../../chunk-TDLL7QX5.mjs";
|
|
26
|
+
import "../../chunk-UGFIWCJQ.mjs";
|
|
27
|
+
import "../../chunk-WUM247HF.mjs";
|
|
28
|
+
import "../../chunk-K5OCDM3W.mjs";
|
|
29
|
+
import "../../chunk-56UCIGTO.mjs";
|
|
30
|
+
import "../../chunk-ILTEOGFF.mjs";
|
|
31
|
+
import "../../chunk-G7BB6K4B.mjs";
|
|
32
|
+
import "../../chunk-62LC4PPC.mjs";
|
|
33
|
+
import "../../chunk-F4VI7BNX.mjs";
|
|
34
34
|
import "../../chunk-4NMDYPUD.mjs";
|
|
35
|
-
import "../../chunk-
|
|
35
|
+
import "../../chunk-KW64NP2F.mjs";
|
|
36
36
|
import "../../chunk-QJ6CGH7N.mjs";
|
|
37
|
-
import "../../chunk-
|
|
38
|
-
import "../../chunk-
|
|
39
|
-
import "../../chunk-
|
|
40
|
-
import "../../chunk-
|
|
41
|
-
import "../../chunk-EBEO4SA4.mjs";
|
|
37
|
+
import "../../chunk-R45SPK6Q.mjs";
|
|
38
|
+
import "../../chunk-EBFKT35C.mjs";
|
|
39
|
+
import "../../chunk-XX6C2QGI.mjs";
|
|
40
|
+
import "../../chunk-UGKZQUGE.mjs";
|
|
42
41
|
import "../../chunk-DDZGHA66.mjs";
|
|
43
|
-
import "../../chunk-MYEYZ7PF.mjs";
|
|
44
42
|
import "../../chunk-FMNMYKYH.mjs";
|
|
43
|
+
import "../../chunk-UYVPNUH3.mjs";
|
|
44
|
+
import "../../chunk-MYEYZ7PF.mjs";
|
|
45
45
|
import "../../chunk-MFFBZ43D.mjs";
|
|
46
46
|
import "../../chunk-D4MW64RH.mjs";
|
|
47
47
|
import "../../chunk-AGKEC2IM.mjs";
|
|
@@ -70,7 +70,7 @@ import "../../chunk-KLUO6XPE.mjs";
|
|
|
70
70
|
import "../../chunk-PKUXOBIV.mjs";
|
|
71
71
|
import "../../chunk-BEYIOC2H.mjs";
|
|
72
72
|
import "../../chunk-7ECCT6PK.mjs";
|
|
73
|
-
import "../../chunk-
|
|
73
|
+
import "../../chunk-6T3V5LXK.mjs";
|
|
74
74
|
import "../../chunk-XQFUKBY7.mjs";
|
|
75
75
|
import "../../chunk-G34CJDST.mjs";
|
|
76
76
|
import "../../chunk-HGLO5LDS.mjs";
|
|
@@ -79,20 +79,20 @@ import "../../chunk-32UQAST6.mjs";
|
|
|
79
79
|
import "../../chunk-RQS33JAS.mjs";
|
|
80
80
|
import "../../chunk-CXLXUSCG.mjs";
|
|
81
81
|
import "../../chunk-FZY4PMEE.mjs";
|
|
82
|
-
import "../../chunk-6ASWESA2.mjs";
|
|
83
|
-
import "../../chunk-Y3ENAKRC.mjs";
|
|
84
82
|
import "../../chunk-KSK3XIGF.mjs";
|
|
85
83
|
import "../../chunk-QSYWLSSN.mjs";
|
|
84
|
+
import "../../chunk-6ASWESA2.mjs";
|
|
85
|
+
import "../../chunk-Y3ENAKRC.mjs";
|
|
86
86
|
import "../../chunk-G4NBRMZ2.mjs";
|
|
87
|
-
import "../../chunk-
|
|
87
|
+
import "../../chunk-SQNS4SFV.mjs";
|
|
88
88
|
import "../../chunk-4WPQQPUF.mjs";
|
|
89
89
|
import "../../chunk-NUT2VOX2.mjs";
|
|
90
90
|
import "../../chunk-C7T6GW5P.mjs";
|
|
91
91
|
import "../../chunk-BDM6FBUO.mjs";
|
|
92
92
|
import "../../chunk-QPT4BSAB.mjs";
|
|
93
|
+
import "../../chunk-SBB4YEPT.mjs";
|
|
93
94
|
import "../../chunk-SFLQPB72.mjs";
|
|
94
95
|
import "../../chunk-5QHMFYVL.mjs";
|
|
95
|
-
import "../../chunk-SBB4YEPT.mjs";
|
|
96
96
|
import "../../chunk-I25AX6PQ.mjs";
|
|
97
97
|
import "../../chunk-SAWN7RJP.mjs";
|
|
98
98
|
export {
|
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Submit
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-T4BFWV46.mjs";
|
|
4
4
|
import "../../chunk-ZWCTF3NQ.mjs";
|
|
5
|
-
import "../../chunk-
|
|
5
|
+
import "../../chunk-HKQY5GXT.mjs";
|
|
6
6
|
import "../../chunk-UIRAXHDH.mjs";
|
|
7
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-DGDZNHUJ.mjs";
|
|
8
8
|
import "../../chunk-JXCZTOYC.mjs";
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-IJ7XCPP3.mjs";
|
|
10
|
+
import "../../chunk-6OFCIXWS.mjs";
|
|
11
11
|
import "../../chunk-BMM72IIP.mjs";
|
|
12
|
-
import "../../chunk-
|
|
12
|
+
import "../../chunk-JQIRRM7G.mjs";
|
|
13
|
+
import "../../chunk-G3MHXDYA.mjs";
|
|
14
|
+
import "../../chunk-FRLS4GRM.mjs";
|
|
13
15
|
import "../../chunk-BSCOVLWS.mjs";
|
|
14
16
|
import "../../chunk-V3MBJJTL.mjs";
|
|
15
|
-
import "../../chunk-
|
|
16
|
-
import "../../chunk-
|
|
17
|
-
import "../../chunk-SDIZSFCQ.mjs";
|
|
18
|
-
import "../../chunk-HLTYSM7H.mjs";
|
|
17
|
+
import "../../chunk-BU43ZFDJ.mjs";
|
|
18
|
+
import "../../chunk-YK66QBML.mjs";
|
|
19
19
|
import "../../chunk-EPTUAWRA.mjs";
|
|
20
20
|
import "../../chunk-GFPEB22G.mjs";
|
|
21
|
-
import "../../chunk-
|
|
22
|
-
import "../../chunk-
|
|
21
|
+
import "../../chunk-5ORUQZAR.mjs";
|
|
22
|
+
import "../../chunk-HBXBODME.mjs";
|
|
23
23
|
import "../../chunk-AKXCFBYF.mjs";
|
|
24
|
-
import "../../chunk-
|
|
25
|
-
import "../../chunk-
|
|
26
|
-
import "../../chunk-
|
|
27
|
-
import "../../chunk-
|
|
28
|
-
import "../../chunk-
|
|
29
|
-
import "../../chunk-
|
|
30
|
-
import "../../chunk-
|
|
31
|
-
import "../../chunk-
|
|
32
|
-
import "../../chunk-
|
|
33
|
-
import "../../chunk-
|
|
24
|
+
import "../../chunk-WHSS6I7T.mjs";
|
|
25
|
+
import "../../chunk-TDLL7QX5.mjs";
|
|
26
|
+
import "../../chunk-UGFIWCJQ.mjs";
|
|
27
|
+
import "../../chunk-WUM247HF.mjs";
|
|
28
|
+
import "../../chunk-K5OCDM3W.mjs";
|
|
29
|
+
import "../../chunk-56UCIGTO.mjs";
|
|
30
|
+
import "../../chunk-ILTEOGFF.mjs";
|
|
31
|
+
import "../../chunk-G7BB6K4B.mjs";
|
|
32
|
+
import "../../chunk-62LC4PPC.mjs";
|
|
33
|
+
import "../../chunk-F4VI7BNX.mjs";
|
|
34
34
|
import "../../chunk-4NMDYPUD.mjs";
|
|
35
|
-
import "../../chunk-
|
|
35
|
+
import "../../chunk-KW64NP2F.mjs";
|
|
36
36
|
import "../../chunk-QJ6CGH7N.mjs";
|
|
37
|
-
import "../../chunk-
|
|
38
|
-
import "../../chunk-
|
|
39
|
-
import "../../chunk-
|
|
40
|
-
import "../../chunk-
|
|
41
|
-
import "../../chunk-EBEO4SA4.mjs";
|
|
37
|
+
import "../../chunk-R45SPK6Q.mjs";
|
|
38
|
+
import "../../chunk-EBFKT35C.mjs";
|
|
39
|
+
import "../../chunk-XX6C2QGI.mjs";
|
|
40
|
+
import "../../chunk-UGKZQUGE.mjs";
|
|
42
41
|
import "../../chunk-DDZGHA66.mjs";
|
|
43
|
-
import "../../chunk-MYEYZ7PF.mjs";
|
|
44
42
|
import "../../chunk-FMNMYKYH.mjs";
|
|
43
|
+
import "../../chunk-UYVPNUH3.mjs";
|
|
44
|
+
import "../../chunk-MYEYZ7PF.mjs";
|
|
45
45
|
import "../../chunk-MFFBZ43D.mjs";
|
|
46
46
|
import "../../chunk-D4MW64RH.mjs";
|
|
47
47
|
import "../../chunk-AGKEC2IM.mjs";
|
|
@@ -70,7 +70,7 @@ import "../../chunk-KLUO6XPE.mjs";
|
|
|
70
70
|
import "../../chunk-PKUXOBIV.mjs";
|
|
71
71
|
import "../../chunk-BEYIOC2H.mjs";
|
|
72
72
|
import "../../chunk-7ECCT6PK.mjs";
|
|
73
|
-
import "../../chunk-
|
|
73
|
+
import "../../chunk-6T3V5LXK.mjs";
|
|
74
74
|
import "../../chunk-XQFUKBY7.mjs";
|
|
75
75
|
import "../../chunk-G34CJDST.mjs";
|
|
76
76
|
import "../../chunk-HGLO5LDS.mjs";
|
|
@@ -79,20 +79,20 @@ import "../../chunk-32UQAST6.mjs";
|
|
|
79
79
|
import "../../chunk-RQS33JAS.mjs";
|
|
80
80
|
import "../../chunk-CXLXUSCG.mjs";
|
|
81
81
|
import "../../chunk-FZY4PMEE.mjs";
|
|
82
|
-
import "../../chunk-6ASWESA2.mjs";
|
|
83
|
-
import "../../chunk-Y3ENAKRC.mjs";
|
|
84
82
|
import "../../chunk-KSK3XIGF.mjs";
|
|
85
83
|
import "../../chunk-QSYWLSSN.mjs";
|
|
84
|
+
import "../../chunk-6ASWESA2.mjs";
|
|
85
|
+
import "../../chunk-Y3ENAKRC.mjs";
|
|
86
86
|
import "../../chunk-G4NBRMZ2.mjs";
|
|
87
|
-
import "../../chunk-
|
|
87
|
+
import "../../chunk-SQNS4SFV.mjs";
|
|
88
88
|
import "../../chunk-4WPQQPUF.mjs";
|
|
89
89
|
import "../../chunk-NUT2VOX2.mjs";
|
|
90
90
|
import "../../chunk-C7T6GW5P.mjs";
|
|
91
91
|
import "../../chunk-BDM6FBUO.mjs";
|
|
92
92
|
import "../../chunk-QPT4BSAB.mjs";
|
|
93
|
+
import "../../chunk-SBB4YEPT.mjs";
|
|
93
94
|
import "../../chunk-SFLQPB72.mjs";
|
|
94
95
|
import "../../chunk-5QHMFYVL.mjs";
|
|
95
|
-
import "../../chunk-SBB4YEPT.mjs";
|
|
96
96
|
import "../../chunk-I25AX6PQ.mjs";
|
|
97
97
|
import "../../chunk-SAWN7RJP.mjs";
|
|
98
98
|
export {
|
package/dist/esm/api/utils.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
waitForIndexerOnVersion
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-WXQUBQK4.mjs";
|
|
4
|
+
import "../chunk-BU43ZFDJ.mjs";
|
|
5
|
+
import "../chunk-YK66QBML.mjs";
|
|
6
6
|
import "../chunk-EPTUAWRA.mjs";
|
|
7
7
|
import "../chunk-BEYIOC2H.mjs";
|
|
8
8
|
import "../chunk-7ECCT6PK.mjs";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-6T3V5LXK.mjs";
|
|
10
10
|
import "../chunk-XQFUKBY7.mjs";
|
|
11
11
|
import "../chunk-G34CJDST.mjs";
|
|
12
12
|
import "../chunk-HGLO5LDS.mjs";
|
|
@@ -15,20 +15,20 @@ import "../chunk-32UQAST6.mjs";
|
|
|
15
15
|
import "../chunk-RQS33JAS.mjs";
|
|
16
16
|
import "../chunk-CXLXUSCG.mjs";
|
|
17
17
|
import "../chunk-FZY4PMEE.mjs";
|
|
18
|
-
import "../chunk-6ASWESA2.mjs";
|
|
19
|
-
import "../chunk-Y3ENAKRC.mjs";
|
|
20
18
|
import "../chunk-KSK3XIGF.mjs";
|
|
21
19
|
import "../chunk-QSYWLSSN.mjs";
|
|
20
|
+
import "../chunk-6ASWESA2.mjs";
|
|
21
|
+
import "../chunk-Y3ENAKRC.mjs";
|
|
22
22
|
import "../chunk-G4NBRMZ2.mjs";
|
|
23
|
-
import "../chunk-
|
|
23
|
+
import "../chunk-SQNS4SFV.mjs";
|
|
24
24
|
import "../chunk-4WPQQPUF.mjs";
|
|
25
25
|
import "../chunk-NUT2VOX2.mjs";
|
|
26
26
|
import "../chunk-C7T6GW5P.mjs";
|
|
27
27
|
import "../chunk-BDM6FBUO.mjs";
|
|
28
28
|
import "../chunk-QPT4BSAB.mjs";
|
|
29
|
+
import "../chunk-SBB4YEPT.mjs";
|
|
29
30
|
import "../chunk-SFLQPB72.mjs";
|
|
30
31
|
import "../chunk-5QHMFYVL.mjs";
|
|
31
|
-
import "../chunk-SBB4YEPT.mjs";
|
|
32
32
|
import "../chunk-I25AX6PQ.mjs";
|
|
33
33
|
import "../chunk-SAWN7RJP.mjs";
|
|
34
34
|
export {
|
package/dist/esm/bcs/index.mjs
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import "../chunk-FZY4PMEE.mjs";
|
|
2
|
-
import {
|
|
3
|
-
EntryFunctionBytes
|
|
4
|
-
} from "../chunk-6ASWESA2.mjs";
|
|
5
|
-
import {
|
|
6
|
-
FixedBytes
|
|
7
|
-
} from "../chunk-Y3ENAKRC.mjs";
|
|
8
2
|
import {
|
|
9
3
|
MoveOption,
|
|
10
4
|
MoveString,
|
|
@@ -20,8 +14,14 @@ import {
|
|
|
20
14
|
U64,
|
|
21
15
|
U8
|
|
22
16
|
} from "../chunk-QSYWLSSN.mjs";
|
|
17
|
+
import {
|
|
18
|
+
EntryFunctionBytes
|
|
19
|
+
} from "../chunk-6ASWESA2.mjs";
|
|
20
|
+
import {
|
|
21
|
+
FixedBytes
|
|
22
|
+
} from "../chunk-Y3ENAKRC.mjs";
|
|
23
23
|
import "../chunk-G4NBRMZ2.mjs";
|
|
24
|
-
import "../chunk-
|
|
24
|
+
import "../chunk-SQNS4SFV.mjs";
|
|
25
25
|
import "../chunk-4WPQQPUF.mjs";
|
|
26
26
|
import {
|
|
27
27
|
Deserializer
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
U8
|
|
9
9
|
} from "../../chunk-QSYWLSSN.mjs";
|
|
10
10
|
import "../../chunk-G4NBRMZ2.mjs";
|
|
11
|
-
import "../../chunk-
|
|
11
|
+
import "../../chunk-SQNS4SFV.mjs";
|
|
12
12
|
import "../../chunk-4WPQQPUF.mjs";
|
|
13
13
|
import "../../chunk-C7T6GW5P.mjs";
|
|
14
14
|
import "../../chunk-BDM6FBUO.mjs";
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "../../chunk-KSK3XIGF.mjs";
|
|
7
7
|
import "../../chunk-QSYWLSSN.mjs";
|
|
8
8
|
import "../../chunk-G4NBRMZ2.mjs";
|
|
9
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-SQNS4SFV.mjs";
|
|
10
10
|
import "../../chunk-4WPQQPUF.mjs";
|
|
11
11
|
import "../../chunk-NUT2VOX2.mjs";
|
|
12
12
|
import "../../chunk-C7T6GW5P.mjs";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateTransaction
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HKQY5GXT.mjs";
|
|
4
4
|
import {
|
|
5
5
|
parseTypeTag
|
|
6
6
|
} from "./chunk-BMM72IIP.mjs";
|
|
7
7
|
import {
|
|
8
8
|
queryIndexer
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YK66QBML.mjs";
|
|
10
10
|
import {
|
|
11
11
|
GetCurrentFungibleAssetBalances,
|
|
12
12
|
GetFungibleAssetActivities,
|
|
@@ -94,4 +94,4 @@ export {
|
|
|
94
94
|
getCurrentFungibleAssetBalances,
|
|
95
95
|
transferFungibleAsset
|
|
96
96
|
};
|
|
97
|
-
//# sourceMappingURL=chunk-
|
|
97
|
+
//# sourceMappingURL=chunk-2FTF6J7F.mjs.map
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AccountAbstraction
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
waitForIndexerOnVersion
|
|
6
|
-
} from "./chunk-A3TQLIEM.mjs";
|
|
7
|
-
import {
|
|
8
|
-
view
|
|
9
|
-
} from "./chunk-DUOU3SNQ.mjs";
|
|
3
|
+
} from "./chunk-HL337SEM.mjs";
|
|
10
4
|
import {
|
|
11
5
|
deriveAccountFromPrivateKey,
|
|
12
6
|
getAccountCoinsCount,
|
|
@@ -26,7 +20,13 @@ import {
|
|
|
26
20
|
getResources,
|
|
27
21
|
getTransactions,
|
|
28
22
|
lookupOriginalAccountAddress
|
|
29
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-SPVJXZL5.mjs";
|
|
24
|
+
import {
|
|
25
|
+
view
|
|
26
|
+
} from "./chunk-ORCQEMJL.mjs";
|
|
27
|
+
import {
|
|
28
|
+
waitForIndexerOnVersion
|
|
29
|
+
} from "./chunk-WXQUBQK4.mjs";
|
|
30
30
|
import {
|
|
31
31
|
createObjectAddress
|
|
32
32
|
} from "./chunk-6I37A76G.mjs";
|
|
@@ -826,4 +826,4 @@ var Account = class {
|
|
|
826
826
|
export {
|
|
827
827
|
Account
|
|
828
828
|
};
|
|
829
|
-
//# sourceMappingURL=chunk-
|
|
829
|
+
//# sourceMappingURL=chunk-2HL7JEFC.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
queryIndexer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YK66QBML.mjs";
|
|
4
4
|
import {
|
|
5
5
|
GetDelegatedStakingActivities,
|
|
6
6
|
GetNumberOfDelegators
|
|
@@ -50,4 +50,4 @@ export {
|
|
|
50
50
|
getNumberOfDelegatorsForAllPools,
|
|
51
51
|
getDelegatedStakingActivities
|
|
52
52
|
};
|
|
53
|
-
//# sourceMappingURL=chunk-
|
|
53
|
+
//# sourceMappingURL=chunk-2WBJAKBO.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TransactionWorker
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QYNYDQE3.mjs";
|
|
4
4
|
|
|
5
5
|
// src/api/transactionSubmission/management.ts
|
|
6
6
|
import EventEmitter from "eventemitter3";
|
|
@@ -192,4 +192,4 @@ var TransactionManagement = class extends EventEmitter {
|
|
|
192
192
|
export {
|
|
193
193
|
TransactionManagement
|
|
194
194
|
};
|
|
195
|
-
//# sourceMappingURL=chunk-
|
|
195
|
+
//# sourceMappingURL=chunk-3DAVHDK4.mjs.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-CXLXUSCG.mjs";
|
|
4
4
|
import {
|
|
5
5
|
SigningScheme
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SQNS4SFV.mjs";
|
|
7
7
|
|
|
8
8
|
// src/account/utils.ts
|
|
9
9
|
function deserializeSchemeAndAddress(deserializer) {
|
|
@@ -18,4 +18,4 @@ function deserializeSchemeAndAddress(deserializer) {
|
|
|
18
18
|
export {
|
|
19
19
|
deserializeSchemeAndAddress
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=chunk-
|
|
21
|
+
//# sourceMappingURL=chunk-56UCIGTO.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateSigningMessageForTransaction
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-F4VI7BNX.mjs";
|
|
4
4
|
import {
|
|
5
5
|
AccountAuthenticatorMultiEd25519
|
|
6
6
|
} from "./chunk-AGKEC2IM.mjs";
|
|
@@ -97,4 +97,4 @@ var MultiEd25519Account = class {
|
|
|
97
97
|
export {
|
|
98
98
|
MultiEd25519Account
|
|
99
99
|
};
|
|
100
|
-
//# sourceMappingURL=chunk-
|
|
100
|
+
//# sourceMappingURL=chunk-5ORUQZAR.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateSigningMessageForTransaction
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-F4VI7BNX.mjs";
|
|
4
4
|
import {
|
|
5
5
|
AccountAuthenticatorEd25519
|
|
6
6
|
} from "./chunk-AGKEC2IM.mjs";
|
|
@@ -125,4 +125,4 @@ var Ed25519Account = class _Ed25519Account {
|
|
|
125
125
|
export {
|
|
126
126
|
Ed25519Account
|
|
127
127
|
};
|
|
128
|
-
//# sourceMappingURL=chunk-
|
|
128
|
+
//# sourceMappingURL=chunk-62LC4PPC.mjs.map
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
isLargeNumber,
|
|
20
20
|
isString,
|
|
21
21
|
throwTypeMismatch
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-JQIRRM7G.mjs";
|
|
23
23
|
import {
|
|
24
24
|
getModule
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-FRLS4GRM.mjs";
|
|
26
26
|
import {
|
|
27
27
|
TypeTagAddress,
|
|
28
28
|
TypeTagBool,
|
|
@@ -376,4 +376,4 @@ export {
|
|
|
376
376
|
convertArgument,
|
|
377
377
|
checkOrConvertArgument
|
|
378
378
|
};
|
|
379
|
-
//# sourceMappingURL=chunk-
|
|
379
|
+
//# sourceMappingURL=chunk-6OFCIXWS.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/transactions/transactionBuilder/remoteAbi.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { parseTypeTag } from \"../typeTag/parser\";\nimport {\n TypeTag,\n TypeTagAddress,\n TypeTagBool,\n TypeTagStruct,\n TypeTagU128,\n TypeTagU16,\n TypeTagU256,\n TypeTagU32,\n TypeTagU64,\n TypeTagU8,\n} from \"../typeTag\";\nimport { AptosConfig } from \"../../api/aptosConfig\";\nimport {\n EntryFunctionArgumentTypes,\n SimpleEntryFunctionArgumentTypes,\n EntryFunctionABI,\n ViewFunctionABI,\n FunctionABI,\n TypeArgument,\n} from \"../types\";\nimport { Bool, MoveOption, MoveString, MoveVector, U128, U16, U256, U32, U64, U8 } from \"../../bcs\";\nimport { AccountAddress } from \"../../core\";\nimport { getModule } from \"../../internal/utils\";\nimport {\n findFirstNonSignerArg,\n isBcsAddress,\n isBcsBool,\n isBcsString,\n isBcsU128,\n isBcsU16,\n isBcsU256,\n isBcsU32,\n isBcsU64,\n isBcsU8,\n isBool,\n isEncodedEntryFunctionArgument,\n isLargeNumber,\n isEmptyOption,\n isString,\n throwTypeMismatch,\n convertNumber,\n} from \"./helpers\";\nimport { CallArgument, MoveFunction } from \"../../types\";\n\nconst TEXT_ENCODER = new TextEncoder();\n\n/**\n * Convert type arguments to only type tags, allowing for string representations of type tags.\n *\n * @param typeArguments - An optional array of type arguments that may include string representations.\n * @returns An array of TypeTag objects derived from the provided type arguments.\n * @group Implementation\n * @category Transactions\n */\nexport function standardizeTypeTags(typeArguments?: Array<TypeArgument>): Array<TypeTag> {\n return (\n typeArguments?.map((typeArg: TypeArgument): TypeTag => {\n // Convert to TypeTag if it's a string representation\n if (isString(typeArg)) {\n return parseTypeTag(typeArg);\n }\n return typeArg;\n }) ?? []\n );\n}\n\n/**\n * Fetches the ABI of a specified function from the on-chain module ABI. This function allows you to access the details of a\n * specific function within a module.\n *\n * @param moduleAddress - The address of the module from which to fetch the function ABI.\n * @param moduleName - The name of the module containing the function.\n * @param functionName - The name of the function whose ABI is to be fetched.\n * @param aptosConfig - The configuration settings for Aptos.\n * @group Implementation\n * @category Transactions\n */\nexport async function fetchFunctionAbi(\n moduleAddress: string,\n moduleName: string,\n functionName: string,\n aptosConfig: AptosConfig,\n): Promise<MoveFunction | undefined> {\n // This fetch from the API is currently cached\n const module = await getModule({ aptosConfig, accountAddress: moduleAddress, moduleName });\n\n if (module.abi) {\n return module.abi.exposed_functions.find((func) => func.name === functionName);\n }\n\n return undefined;\n}\n\n/**\n * Fetches a function ABI from the on-chain module ABI. It doesn't validate whether it's a view or entry function.\n * @param moduleAddress\n * @param moduleName\n * @param functionName\n * @param aptosConfig\n */\nexport async function fetchMoveFunctionAbi(\n moduleAddress: string,\n moduleName: string,\n functionName: string,\n aptosConfig: AptosConfig,\n): Promise<FunctionABI> {\n const functionAbi = await fetchFunctionAbi(moduleAddress, moduleName, functionName, aptosConfig);\n if (!functionAbi) {\n throw new Error(`Could not find function ABI for '${moduleAddress}::${moduleName}::${functionName}'`);\n }\n const params: TypeTag[] = [];\n for (let i = 0; i < functionAbi.params.length; i += 1) {\n params.push(parseTypeTag(functionAbi.params[i], { allowGenerics: true }));\n }\n\n return {\n typeParameters: functionAbi.generic_type_params,\n parameters: params,\n };\n}\n\n/**\n * Fetches the ABI for an entry function from the specified module address.\n * This function validates if the ABI corresponds to an entry function and retrieves its parameters.\n *\n * @param moduleAddress - The address of the module containing the entry function.\n * @param moduleName - The name of the module containing the entry function.\n * @param functionName - The name of the entry function to fetch the ABI for.\n * @param aptosConfig - The configuration settings for Aptos.\n * @returns An object containing the number of signers, type parameters, and function parameters.\n * @throws Error if the ABI cannot be found or if the function is not an entry function.\n * @group Implementation\n * @category Transactions\n */\nexport async function fetchEntryFunctionAbi(\n moduleAddress: string,\n moduleName: string,\n functionName: string,\n aptosConfig: AptosConfig,\n): Promise<EntryFunctionABI> {\n const functionAbi = await fetchFunctionAbi(moduleAddress, moduleName, functionName, aptosConfig);\n\n // If there's no ABI, then the function is invalid\n if (!functionAbi) {\n throw new Error(`Could not find entry function ABI for '${moduleAddress}::${moduleName}::${functionName}'`);\n }\n\n // Non-entry functions also can't be used\n if (!functionAbi.is_entry) {\n throw new Error(`'${moduleAddress}::${moduleName}::${functionName}' is not an entry function`);\n }\n\n // Remove the signer arguments\n const numSigners = findFirstNonSignerArg(functionAbi);\n const params: TypeTag[] = [];\n for (let i = numSigners; i < functionAbi.params.length; i += 1) {\n params.push(parseTypeTag(functionAbi.params[i], { allowGenerics: true }));\n }\n\n return {\n signers: numSigners,\n typeParameters: functionAbi.generic_type_params,\n parameters: params,\n };\n}\n\n/**\n * Fetches the ABI for a view function from the specified module address.\n * This function ensures that the ABI is valid and retrieves the type parameters, parameters, and return types for the view function.\n *\n * @param moduleAddress - The address of the module containing the view function.\n * @param moduleName - The name of the module containing the view function.\n * @param functionName - The name of the view function for which to fetch the ABI.\n * @param aptosConfig - The configuration settings for Aptos.\n * @returns An object containing the type parameters, parameters, and return types of the view function.\n * @throws Error if the ABI cannot be found or if the function is not a view function.\n * @group Implementation\n * @category Transactions\n */\nexport async function fetchViewFunctionAbi(\n moduleAddress: string,\n moduleName: string,\n functionName: string,\n aptosConfig: AptosConfig,\n): Promise<ViewFunctionABI> {\n const functionAbi = await fetchFunctionAbi(moduleAddress, moduleName, functionName, aptosConfig);\n\n // If there's no ABI, then the function is invalid\n if (!functionAbi) {\n throw new Error(`Could not find view function ABI for '${moduleAddress}::${moduleName}::${functionName}'`);\n }\n\n // Non-view functions can't be used\n if (!functionAbi.is_view) {\n throw new Error(`'${moduleAddress}::${moduleName}::${functionName}' is not an view function`);\n }\n\n // Type tag parameters for the function\n const params: TypeTag[] = [];\n for (let i = 0; i < functionAbi.params.length; i += 1) {\n params.push(parseTypeTag(functionAbi.params[i], { allowGenerics: true }));\n }\n\n // The return types of the view function\n const returnTypes: TypeTag[] = [];\n for (let i = 0; i < functionAbi.return.length; i += 1) {\n returnTypes.push(parseTypeTag(functionAbi.return[i], { allowGenerics: true }));\n }\n\n return {\n typeParameters: functionAbi.generic_type_params,\n parameters: params,\n returnTypes,\n };\n}\n\n/**\n * Converts a entry function argument into CallArgument, if necessary.\n * This function checks the provided argument against the expected parameter type and converts it accordingly.\n *\n * @param functionName - The name of the function for which the argument is being converted.\n * @param functionAbi - The ABI (Application Binary Interface) of the function, which defines its parameters.\n * @param argument - The argument to be converted, which can be of various types. If the argument is already\n * CallArgument returned from TransactionComposer it would be returned immediately.\n * @param position - The index of the argument in the function's parameter list.\n * @param genericTypeParams - An array of type tags for any generic type parameters.\n */\nexport function convertCallArgument(\n argument: CallArgument | EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes,\n functionName: string,\n functionAbi: FunctionABI,\n position: number,\n genericTypeParams: Array<TypeTag>,\n): CallArgument {\n if (argument instanceof CallArgument) {\n return argument;\n }\n return CallArgument.newBytes(\n convertArgument(functionName, functionAbi, argument, position, genericTypeParams).bcsToBytes(),\n );\n}\n\n/**\n * Converts a non-BCS encoded argument into BCS encoded, if necessary.\n * This function checks the provided argument against the expected parameter type and converts it accordingly.\n *\n * @param functionName - The name of the function for which the argument is being converted.\n * @param functionAbi - The ABI (Application Binary Interface) of the function, which defines its parameters.\n * @param arg - The argument to be converted, which can be of various types.\n * @param position - The index of the argument in the function's parameter list.\n * @param genericTypeParams - An array of type tags for any generic type parameters.\n * @group Implementation\n * @category Transactions\n */\nexport function convertArgument(\n functionName: string,\n functionAbi: FunctionABI,\n arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes,\n position: number,\n genericTypeParams: Array<TypeTag>,\n) {\n // Ensure not too many arguments\n if (position >= functionAbi.parameters.length) {\n throw new Error(`Too many arguments for '${functionName}', expected ${functionAbi.parameters.length}`);\n }\n\n const param = functionAbi.parameters[position];\n return checkOrConvertArgument(arg, param, position, genericTypeParams);\n}\n\n/**\n * Checks if the provided argument is BCS encoded and converts it if necessary, ensuring type compatibility with the ABI.\n * This function helps in validating and converting arguments for entry functions based on their expected types.\n *\n * @param arg - The argument to check or convert, which can be either a simple or entry function argument type.\n * @param param - The expected type tag for the argument.\n * @param position - The position of the argument in the function call.\n * @param genericTypeParams - An array of generic type parameters that may be used for conversion.\n * @group Implementation\n * @category Transactions\n */\nexport function checkOrConvertArgument(\n arg: SimpleEntryFunctionArgumentTypes | EntryFunctionArgumentTypes,\n param: TypeTag,\n position: number,\n genericTypeParams: Array<TypeTag>,\n) {\n // If the argument is bcs encoded, we can just use it directly\n if (isEncodedEntryFunctionArgument(arg)) {\n // Ensure the type matches the ABI\n\n /**\n * Checks the type of the provided argument against the expected type.\n * This function helps validate that the argument conforms to the specified type requirements.\n *\n * @param typeArgs - The expected type arguments.\n * @param arg - The argument to be checked.\n * @param position - The position of the argument in the context of the check.\n * @group Implementation\n * @category Transactions\n */\n checkType(param, arg, position);\n return arg;\n }\n\n // If it is not BCS encoded, we will need to convert it with the ABI\n return parseArg(arg, param, position, genericTypeParams);\n}\n\n/**\n * Parses a non-BCS encoded argument into a BCS encoded argument recursively.\n * This function helps convert various types of input arguments into their corresponding BCS encoded formats based on the\n * specified parameter type.\n *\n * @param arg - The argument to be parsed, which can be of various types.\n * @param param - The type tag that defines the expected type of the argument.\n * @param position - The position of the argument in the function call, used for error reporting.\n * @param genericTypeParams - An array of type tags for generic type parameters, used when the parameter type is generic.\n * @group Implementation\n * @category Transactions\n */\nfunction parseArg(\n arg: SimpleEntryFunctionArgumentTypes,\n param: TypeTag,\n position: number,\n genericTypeParams: Array<TypeTag>,\n): EntryFunctionArgumentTypes {\n if (param.isBool()) {\n if (isBool(arg)) {\n return new Bool(arg);\n }\n if (isString(arg)) {\n if (arg === \"true\") return new Bool(true);\n if (arg === \"false\") return new Bool(false);\n }\n\n /**\n * Throws a type mismatch error for the specified move option.\n *\n * @param moveOption - The name of the move option that caused the type mismatch.\n * @param position - The position where the error occurred.\n * @group Implementation\n * @category Transactions\n */\n throwTypeMismatch(\"boolean\", position);\n }\n // TODO: support uint8array?\n if (param.isAddress()) {\n if (isString(arg)) {\n return AccountAddress.fromString(arg);\n }\n throwTypeMismatch(\"string | AccountAddress\", position);\n }\n if (param.isU8()) {\n const num = convertNumber(arg);\n if (num !== undefined) {\n return new U8(num);\n }\n throwTypeMismatch(\"number | string\", position);\n }\n if (param.isU16()) {\n const num = convertNumber(arg);\n if (num !== undefined) {\n return new U16(num);\n }\n throwTypeMismatch(\"number | string\", position);\n }\n if (param.isU32()) {\n const num = convertNumber(arg);\n if (num !== undefined) {\n return new U32(num);\n }\n throwTypeMismatch(\"number | string\", position);\n }\n if (param.isU64()) {\n if (isLargeNumber(arg)) {\n return new U64(BigInt(arg));\n }\n throwTypeMismatch(\"bigint | number | string\", position);\n }\n if (param.isU128()) {\n if (isLargeNumber(arg)) {\n return new U128(BigInt(arg));\n }\n throwTypeMismatch(\"bigint | number | string\", position);\n }\n if (param.isU256()) {\n if (isLargeNumber(arg)) {\n return new U256(BigInt(arg));\n }\n throwTypeMismatch(\"bigint | number | string\", position);\n }\n\n // Generic needs to use the subtype\n if (param.isGeneric()) {\n const genericIndex = param.value;\n if (genericIndex < 0 || genericIndex >= genericTypeParams.length) {\n throw new Error(`Generic argument ${param.toString()} is invalid for argument ${position}`);\n }\n\n return checkOrConvertArgument(arg, genericTypeParams[genericIndex], position, genericTypeParams);\n }\n\n // We have to special case some vectors for Vector<u8>\n if (param.isVector()) {\n // Check special case for Vector<u8>\n if (param.value.isU8()) {\n // We don't allow vector<u8>, but we convert strings to UTF8 Uint8Array\n // This is legacy behavior from the original SDK\n if (isString(arg)) {\n return MoveVector.U8(TEXT_ENCODER.encode(arg));\n }\n if (arg instanceof Uint8Array) {\n return MoveVector.U8(arg);\n }\n if (arg instanceof ArrayBuffer) {\n return MoveVector.U8(new Uint8Array(arg));\n }\n }\n\n if (isString(arg)) {\n // In a web env, arguments are passing as strings\n if (arg.startsWith(\"[\")) {\n return checkOrConvertArgument(JSON.parse(arg), param, position, genericTypeParams);\n }\n }\n\n // TODO: Support Uint16Array, Uint32Array, BigUint64Array?\n\n if (Array.isArray(arg)) {\n return new MoveVector(arg.map((item) => checkOrConvertArgument(item, param.value, position, genericTypeParams)));\n }\n\n throw new Error(`Type mismatch for argument ${position}, type '${param.toString()}'`);\n }\n\n // Handle structs as they're more complex\n if (param.isStruct()) {\n if (param.isString()) {\n if (isString(arg)) {\n return new MoveString(arg);\n }\n throwTypeMismatch(\"string\", position);\n }\n if (param.isObject()) {\n // The inner type of Object doesn't matter, since it's just syntactic sugar\n if (isString(arg)) {\n return AccountAddress.fromString(arg);\n }\n throwTypeMismatch(\"string | AccountAddress\", position);\n }\n\n if (param.isOption()) {\n if (isEmptyOption(arg)) {\n // Here we attempt to reconstruct the underlying type\n // Note, for some reason the `isBool` etc. does not work with the compiler\n const innerParam = param.value.typeArgs[0];\n if (innerParam instanceof TypeTagBool) {\n return new MoveOption<Bool>(null);\n }\n if (innerParam instanceof TypeTagAddress) {\n return new MoveOption<AccountAddress>(null);\n }\n if (innerParam instanceof TypeTagU8) {\n return new MoveOption<U8>(null);\n }\n if (innerParam instanceof TypeTagU16) {\n return new MoveOption<U16>(null);\n }\n if (innerParam instanceof TypeTagU32) {\n return new MoveOption<U32>(null);\n }\n if (innerParam instanceof TypeTagU64) {\n return new MoveOption<U64>(null);\n }\n if (innerParam instanceof TypeTagU128) {\n return new MoveOption<U128>(null);\n }\n if (innerParam instanceof TypeTagU256) {\n return new MoveOption<U256>(null);\n }\n\n // In all other cases, we will use a placeholder, it doesn't actually matter what the type is, but it will be obvious\n // Note: This is a placeholder U8 type, and does not match the actual type, as that can't be dynamically grabbed\n return new MoveOption<MoveString>(null);\n }\n\n return new MoveOption(checkOrConvertArgument(arg, param.value.typeArgs[0], position, genericTypeParams));\n }\n\n throw new Error(`Unsupported struct input type for argument ${position}, type '${param.toString()}'`);\n }\n\n throw new Error(`Type mismatch for argument ${position}, type '${param.toString()}'`);\n}\n\n/**\n * Checks that the type of the BCS encoded argument matches the ABI\n * @param param\n * @param arg\n * @param position\n * @group Implementation\n * @category Transactions\n */\nfunction checkType(param: TypeTag, arg: EntryFunctionArgumentTypes, position: number) {\n if (param.isBool()) {\n if (isBcsBool(arg)) {\n return;\n }\n throwTypeMismatch(\"Bool\", position);\n }\n if (param.isAddress()) {\n if (isBcsAddress(arg)) {\n return;\n }\n throwTypeMismatch(\"AccountAddress\", position);\n }\n if (param.isU8()) {\n if (isBcsU8(arg)) {\n return;\n }\n throwTypeMismatch(\"U8\", position);\n }\n if (param.isU16()) {\n if (isBcsU16(arg)) {\n return;\n }\n throwTypeMismatch(\"U16\", position);\n }\n if (param.isU32()) {\n if (isBcsU32(arg)) {\n return;\n }\n throwTypeMismatch(\"U32\", position);\n }\n if (param.isU64()) {\n if (isBcsU64(arg)) {\n return;\n }\n throwTypeMismatch(\"U64\", position);\n }\n if (param.isU128()) {\n if (isBcsU128(arg)) {\n return;\n }\n throwTypeMismatch(\"U128\", position);\n }\n if (param.isU256()) {\n if (isBcsU256(arg)) {\n return;\n }\n throwTypeMismatch(\"U256\", position);\n }\n if (param.isVector()) {\n if (arg instanceof MoveVector) {\n // If there's anything in it, check that the inner types match\n // Note that since it's typed, the first item should be the same as the rest\n if (arg.values.length > 0) {\n checkType(param.value, arg.values[0], position);\n }\n\n return;\n }\n throwTypeMismatch(\"MoveVector\", position);\n }\n\n // Handle structs as they're more complex\n if (param instanceof TypeTagStruct) {\n if (param.isString()) {\n if (isBcsString(arg)) {\n return;\n }\n throwTypeMismatch(\"MoveString\", position);\n }\n if (param.isObject()) {\n if (isBcsAddress(arg)) {\n return;\n }\n throwTypeMismatch(\"AccountAddress\", position);\n }\n if (param.isOption()) {\n if (arg instanceof MoveOption) {\n // If there's a value, we can check the inner type (otherwise it doesn't really matter)\n if (arg.value !== undefined) {\n checkType(param.value.typeArgs[0], arg.value, position);\n }\n return;\n }\n throwTypeMismatch(\"MoveOption\", position);\n }\n }\n\n throw new Error(`Type mismatch for argument ${position}, expected '${param.toString()}'`);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDA,IAAM,eAAe,IAAI,YAAY;AAU9B,SAAS,oBAAoB,eAAqD;AACvF,SACE,eAAe,IAAI,CAAC,YAAmC;AAErD,QAAI,SAAS,OAAO,GAAG;AACrB,aAAO,aAAa,OAAO;AAAA,IAC7B;AACA,WAAO;AAAA,EACT,CAAC,KAAK,CAAC;AAEX;AAaA,eAAsB,iBACpB,eACA,YACA,cACA,aACmC;AAEnC,QAAM,SAAS,MAAM,UAAU,EAAE,aAAa,gBAAgB,eAAe,WAAW,CAAC;AAEzF,MAAI,OAAO,KAAK;AACd,WAAO,OAAO,IAAI,kBAAkB,KAAK,CAAC,SAAS,KAAK,SAAS,YAAY;AAAA,EAC/E;AAEA,SAAO;AACT;AASA,eAAsB,qBACpB,eACA,YACA,cACA,aACsB;AACtB,QAAM,cAAc,MAAM,iBAAiB,eAAe,YAAY,cAAc,WAAW;AAC/F,MAAI,CAAC,aAAa;AAChB,UAAM,IAAI,MAAM,oCAAoC,aAAa,KAAK,UAAU,KAAK,YAAY,GAAG;AAAA,EACtG;AACA,QAAM,SAAoB,CAAC;AAC3B,WAAS,IAAI,GAAG,IAAI,YAAY,OAAO,QAAQ,KAAK,GAAG;AACrD,WAAO,KAAK,aAAa,YAAY,OAAO,CAAC,GAAG,EAAE,eAAe,KAAK,CAAC,CAAC;AAAA,EAC1E;AAEA,SAAO;AAAA,IACL,gBA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AAA,IAC1C;AAAA,EACF;AAEA,QAAM,IAAI,MAAM,8BAA8B,QAAQ,eAAe,MAAM,SAAS,CAAC,GAAG;AAC1F;","names":[]}
|
|
@@ -70,7 +70,6 @@ async function postBinaryAptosFullNode(options) {
|
|
|
70
70
|
}
|
|
71
71
|
async function postAptosIndexer(options) {
|
|
72
72
|
const { aptosConfig } = options;
|
|
73
|
-
console.log("request", JSON.stringify(options.body, null, 2));
|
|
74
73
|
return post({
|
|
75
74
|
...options,
|
|
76
75
|
type: "Indexer" /* INDEXER */,
|
|
@@ -117,4 +116,4 @@ export {
|
|
|
117
116
|
postAptosPepperService,
|
|
118
117
|
postAptosProvingService
|
|
119
118
|
};
|
|
120
|
-
//# sourceMappingURL=chunk-
|
|
119
|
+
//# sourceMappingURL=chunk-6T3V5LXK.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/client/post.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { AptosConfig } from \"../api/aptosConfig\";\nimport { aptosBinaryRequest, aptosRequest } from \"./core\";\nimport { AptosResponse, AnyNumber, ClientConfig, MimeType } from \"../types\";\nimport { AptosApiType } from \"../utils/const\";\n\n/**\n * Options for making a POST request, including the API client configuration.\n * @group Implementation\n * @category Client\n */\nexport type PostRequestOptions = {\n /**\n * The config for the API client\n * @group Implementation\n * @category Client\n */\n aptosConfig: AptosConfig;\n /**\n * The type of API endpoint to call e.g. fullnode, indexer, etc\n * @group Implementation\n * @category Client\n */\n type: AptosApiType;\n /**\n * The name of the API method\n * @group Implementation\n * @category Client\n */\n originMethod: string;\n /**\n * The URL path to the API method\n * @group Implementation\n * @category Client\n */\n path: string;\n /**\n * The content type of the request body\n * @group Implementation\n * @category Client\n */\n contentType?: MimeType;\n /**\n * The accepted content type of the response of the API\n * @group Implementation\n * @category Client\n */\n acceptType?: MimeType;\n /**\n * The query parameters for the request\n * @group Implementation\n * @category Client\n */\n params?: Record<string, string | AnyNumber | boolean | undefined>;\n /**\n * The body of the request, should match the content type of the request\n * @group Implementation\n * @category Client\n */\n body?: any;\n /**\n * Specific client overrides for this request to override aptosConfig\n * @group Implementation\n * @category Client\n */\n overrides?: ClientConfig;\n};\n\n/**\n * Options for posting a request to Aptos, excluding the type field.\n * @group Implementation\n * @category Client\n */\nexport type PostAptosRequestOptions = Omit<PostRequestOptions, \"type\">;\n\n/**\n * Executes a POST request to the specified URL with the provided options.\n *\n * @param options - The options for the POST request.\n * @param options.type - The type of the request.\n * @param options.originMethod - The original method that initiated the request.\n * @param options.path - The path for the request.\n * @param options.body - The body content to be sent with the request.\n * @param options.acceptType - The type of response expected from the server.\n * @param options.contentType - The content type of the request body.\n * @param options.params - Additional parameters to include in the request.\n * @param options.aptosConfig - Configuration settings for the Aptos request.\n * @param options.overrides - Any overrides for the default request behavior.\n * @returns The response from the POST request.\n * @group Implementation\n * @category Client\n */\nexport async function post<Req extends {}, Res extends {}>(\n options: PostRequestOptions,\n): Promise<AptosResponse<Req, Res>> {\n const { type, originMethod, path, body, acceptType, contentType, params, aptosConfig, overrides } = options;\n const url = aptosConfig.getRequestUrl(type);\n\n return aptosRequest<Req, Res>(\n {\n url,\n method: \"POST\",\n originMethod,\n path,\n body,\n contentType,\n acceptType,\n params,\n overrides,\n },\n aptosConfig,\n options.type,\n );\n}\n\n/**\n * Executes a POST request to the specified URL with the provided options.\n *\n * @param options - The options for the POST request.\n * @param options.type - The type of the request.\n * @param options.originMethod - The original method that initiated the request.\n * @param options.path - The path for the request.\n * @param options.body - The body content to be sent with the request.\n * @param options.acceptType - The type of response expected from the server.\n * @param options.contentType - The content type of the request body.\n * @param options.params - Additional parameters to include in the request.\n * @param options.aptosConfig - Configuration settings for the Aptos request.\n * @param options.overrides - Any overrides for the default request behavior.\n * @returns The response from the POST request.\n * @group Implementation\n * @category Client\n * @experimental\n */\nexport async function postBinary<Req extends {}>(options: PostRequestOptions): Promise<AptosResponse<Req, Buffer>> {\n const { type, originMethod, path, body, acceptType, contentType, params, aptosConfig, overrides } = options;\n const url = aptosConfig.getRequestUrl(type);\n\n return aptosBinaryRequest<Req>(\n {\n url,\n method: \"POST\",\n originMethod,\n path,\n body,\n contentType,\n acceptType,\n params,\n overrides,\n },\n aptosConfig,\n options.type,\n );\n}\n\n/**\n * Sends a request to the Aptos full node using the specified options.\n * This function allows you to interact with the Aptos blockchain by sending requests to the full node.\n *\n * @param options - The options for the request.\n * @param options.aptosConfig - Configuration settings for the Aptos client.\n * @param options.aptosConfig.clientConfig - Client-specific configuration settings.\n * @param options.aptosConfig.fullnodeConfig - Full node-specific configuration settings.\n * @param options.overrides - Additional overrides for the request.\n * @group Implementation\n * @category Client\n */\nexport async function postAptosFullNode<Req extends {}, Res extends {}>(\n options: PostAptosRequestOptions,\n): Promise<AptosResponse<Req, Res>> {\n const { aptosConfig } = options;\n\n return post<Req, Res>({\n ...options,\n type: AptosApiType.FULLNODE,\n overrides: {\n ...aptosConfig.clientConfig,\n ...aptosConfig.fullnodeConfig,\n ...options.overrides,\n HEADERS: { ...aptosConfig.clientConfig?.HEADERS, ...aptosConfig.fullnodeConfig?.HEADERS },\n },\n });\n}\n\n/**\n * Sends a request to the Aptos full node using the specified options.\n * This function allows you to interact with the Aptos blockchain by sending requests to the full node.\n *\n * @param options - The options for the request.\n * @param options.aptosConfig - Configuration settings for the Aptos client.\n * @param options.aptosConfig.clientConfig - Client-specific configuration settings.\n * @param options.aptosConfig.fullnodeConfig - Full node-specific configuration settings.\n * @param options.overrides - Additional overrides for the request.\n * @group Implementation\n * @category Client\n * @experimental\n */\nexport async function postBinaryAptosFullNode<Req extends {}>(\n options: PostAptosRequestOptions,\n): Promise<AptosResponse<Req, Buffer>> {\n const { aptosConfig } = options;\n\n return postBinary<Req>({\n ...options,\n type: AptosApiType.FULLNODE,\n overrides: {\n ...aptosConfig.clientConfig,\n ...aptosConfig.fullnodeConfig,\n ...options.overrides,\n HEADERS: { ...aptosConfig.clientConfig?.HEADERS, ...aptosConfig.fullnodeConfig?.HEADERS },\n },\n });\n}\n\n/**\n * Sends a request to the Aptos indexer with the specified options.\n * This function allows you to interact with the Aptos indexer and customize the request using various configurations.\n *\n * @param options - The options for the request to the Aptos indexer.\n * @param options.aptosConfig - Configuration settings specific to the Aptos client and indexer.\n * @param options.aptosConfig.clientConfig - The client configuration settings.\n * @param options.aptosConfig.indexerConfig - The indexer configuration settings.\n * @param options.overrides - Additional overrides for the request.\n * @param options.overrides.HEADERS - Custom headers to include in the request.\n * @group Implementation\n * @category Client\n */\nexport async function postAptosIndexer<Req extends {}, Res extends {}>(\n options: PostAptosRequestOptions,\n): Promise<AptosResponse<Req, Res>> {\n const { aptosConfig } = options;\n console.log(\"request\", JSON.stringify(options.body, null, 2));\n\n return post<Req, Res>({\n ...options,\n type: AptosApiType.INDEXER,\n overrides: {\n ...aptosConfig.clientConfig,\n ...aptosConfig.indexerConfig,\n ...options.overrides,\n HEADERS: { ...aptosConfig.clientConfig?.HEADERS, ...aptosConfig.indexerConfig?.HEADERS },\n },\n });\n}\n\n/**\n * Sends a request to the Aptos faucet to obtain test tokens.\n * This function modifies the provided configuration to ensure that the API_KEY is not included in the request.\n *\n * Note that only devnet has a publicly accessible faucet. For testnet, you must use\n * the minting page at https://aptos.dev/network/faucet.\n *\n * @param options - The options for the request.\n * @param options.aptosConfig - The configuration settings for the Aptos client.\n * @param options.aptosConfig.clientConfig - The client-specific configuration settings.\n * @param options.aptosConfig.clientConfig.HEADERS - Optional headers to include in the request.\n * @param options.aptosConfig.faucetConfig - The configuration settings specific to the faucet.\n * @param options.overrides - Additional overrides for the request configuration.\n * @group Implementation\n * @category Client\n */\nexport async function postAptosFaucet<Req extends {}, Res extends {}>(\n options: PostAptosRequestOptions,\n): Promise<AptosResponse<Req, Res>> {\n const { aptosConfig } = options;\n // Faucet does not support API_KEY\n // Create a new object with the desired modification\n const modifiedAptosConfig = {\n ...aptosConfig,\n clientConfig: { ...aptosConfig.clientConfig },\n };\n // Delete API_KEY config\n delete modifiedAptosConfig?.clientConfig?.API_KEY;\n\n return post<Req, Res>({\n ...options,\n type: AptosApiType.FAUCET,\n overrides: {\n ...modifiedAptosConfig.clientConfig,\n ...modifiedAptosConfig.faucetConfig,\n ...options.overrides,\n HEADERS: { ...modifiedAptosConfig.clientConfig?.HEADERS, ...modifiedAptosConfig.faucetConfig?.HEADERS },\n },\n });\n}\n\n/**\n * Makes a post request to the pepper service.\n *\n * @param options - The options for the request.\n * @param options.url - The URL to which the request is sent.\n * @param options.headers - The headers to include in the request.\n * @param options.body - The body of the request.\n * @returns A promise that resolves to the response from the pepper service.\n * @group Implementation\n * @category Client\n */\nexport async function postAptosPepperService<Req extends {}, Res extends {}>(\n options: PostAptosRequestOptions,\n): Promise<AptosResponse<Req, Res>> {\n return post<Req, Res>({ ...options, type: AptosApiType.PEPPER });\n}\n\n/**\n * Sends a request to the Aptos proving service with the specified options.\n *\n * @param options - The options for the request to the Aptos proving service.\n * @param options.type - The type of the request, which should be set to AptosApiType.PROVER.\n * @param options.data - The data to be included in the request.\n * @group Implementation\n * @category Client\n */\nexport async function postAptosProvingService<Req extends {}, Res extends {}>(\n options: PostAptosRequestOptions,\n): Promise<AptosResponse<Req, Res>> {\n return post<Req, Res>({ ...options, type: AptosApiType.PROVER });\n}\n"],"mappings":";;;;;;AA8FA,eAAsB,KACpB,SACkC;AAClC,QAAM,EAAE,MAAM,cAAc,MAAM,MAAM,YAAY,aAAa,QAAQ,aAAa,UAAU,IAAI;AACpG,QAAM,MAAM,YAAY,cAAc,IAAI;AAE1C,SAAO;AAAA,IACL;AAAA,MACE;AAAA,MACA,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,EACV;AACF;AAoBA,eAAsB,WAA2B,SAAkE;AACjH,QAAM,EAAE,MAAM,cAAc,MAAM,MAAM,YAAY,aAAa,QAAQ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;AAClC,QAAM,EAAE,YAAY,IAAI;AAGxB,QAAM,sBAAsB;AAAA,IAC1B,GAAG;AAAA,IACH,cAAc,EAAE,GAAG,YAAY,aAAa;AAAA,EAC9C;AAEA,SAAO,qBAAqB,cAAc;AAE1C,SAAO,KAAe;AAAA,IACpB,GAAG;AAAA,IACH;AAAA,IACA,WAAW;AAAA,MACT,GAAG,oBAAoB;AAAA,MACvB,GAAG,oBAAoB;AAAA,MACvB,GAAG,QAAQ;AAAA,MACX,SAAS,EAAE,GAAG,oBAAoB,cAAc,SAAS,GAAG,oBAAoB,cAAc,QAAQ;AAAA,IACxG;AAAA,EACF,CAAC;AACH;AAaA,eAAsB,uBACpB,SACkC;AAClC,SAAO,KAAe,EAAE,GAAG,SAAS,4BAA0B,CAAC;AACjE;AAWA,eAAsB,wBACpB,SACkC;AAClC,SAAO,KAAe,EAAE,GAAG,SAAS,4BAA0B,CAAC;AACjE;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/client/post.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { AptosConfig } from \"../api/aptosConfig\";\nimport { aptosBinaryRequest, aptosRequest } from \"./core\";\nimport { AptosResponse, AnyNumber, ClientConfig, MimeType } from \"../types\";\nimport { AptosApiType } from \"../utils/const\";\n\n/**\n * Options for making a POST request, including the API client configuration.\n * @group Implementation\n * @category Client\n */\nexport type PostRequestOptions = {\n /**\n * The config for the API client\n * @group Implementation\n * @category Client\n */\n aptosConfig: AptosConfig;\n /**\n * The type of API endpoint to call e.g. fullnode, indexer, etc\n * @group Implementation\n * @category Client\n */\n type: AptosApiType;\n /**\n * The name of the API method\n * @group Implementation\n * @category Client\n */\n originMethod: string;\n /**\n * The URL path to the API method\n * @group Implementation\n * @category Client\n */\n path: string;\n /**\n * The content type of the request body\n * @group Implementation\n * @category Client\n */\n contentType?: MimeType;\n /**\n * The accepted content type of the response of the API\n * @group Implementation\n * @category Client\n */\n acceptType?: MimeType;\n /**\n * The query parameters for the request\n * @group Implementation\n * @category Client\n */\n params?: Record<string, string | AnyNumber | boolean | undefined>;\n /**\n * The body of the request, should match the content type of the request\n * @group Implementation\n * @category Client\n */\n body?: any;\n /**\n * Specific client overrides for this request to override aptosConfig\n * @group Implementation\n * @category Client\n */\n overrides?: ClientConfig;\n};\n\n/**\n * Options for posting a request to Aptos, excluding the type field.\n * @group Implementation\n * @category Client\n */\nexport type PostAptosRequestOptions = Omit<PostRequestOptions, \"type\">;\n\n/**\n * Executes a POST request to the specified URL with the provided options.\n *\n * @param options - The options for the POST request.\n * @param options.type - The type of the request.\n * @param options.originMethod - The original method that initiated the request.\n * @param options.path - The path for the request.\n * @param options.body - The body content to be sent with the request.\n * @param options.acceptType - The type of response expected from the server.\n * @param options.contentType - The content type of the request body.\n * @param options.params - Additional parameters to include in the request.\n * @param options.aptosConfig - Configuration settings for the Aptos request.\n * @param options.overrides - Any overrides for the default request behavior.\n * @returns The response from the POST request.\n * @group Implementation\n * @category Client\n */\nexport async function post<Req extends {}, Res extends {}>(\n options: PostRequestOptions,\n): Promise<AptosResponse<Req, Res>> {\n const { type, originMethod, path, body, acceptType, contentType, params, aptosConfig, overrides } = options;\n const url = aptosConfig.getRequestUrl(type);\n\n return aptosRequest<Req, Res>(\n {\n url,\n method: \"POST\",\n originMethod,\n path,\n body,\n contentType,\n acceptType,\n params,\n overrides,\n },\n aptosConfig,\n options.type,\n );\n}\n\n/**\n * Executes a POST request to the specified URL with the provided options.\n *\n * @param options - The options for the POST request.\n * @param options.type - The type of the request.\n * @param options.originMethod - The original method that initiated the request.\n * @param options.path - The path for the request.\n * @param options.body - The body content to be sent with the request.\n * @param options.acceptType - The type of response expected from the server.\n * @param options.contentType - The content type of the request body.\n * @param options.params - Additional parameters to include in the request.\n * @param options.aptosConfig - Configuration settings for the Aptos request.\n * @param options.overrides - Any overrides for the default request behavior.\n * @returns The response from the POST request.\n * @group Implementation\n * @category Client\n * @experimental\n */\nexport async function postBinary<Req extends {}>(options: PostRequestOptions): Promise<AptosResponse<Req, Buffer>> {\n const { type, originMethod, path, body, acceptType, contentType, params, aptosConfig, overrides } = options;\n const url = aptosConfig.getRequestUrl(type);\n\n return aptosBinaryRequest<Req>(\n {\n url,\n method: \"POST\",\n originMethod,\n path,\n body,\n contentType,\n acceptType,\n params,\n overrides,\n },\n aptosConfig,\n options.type,\n );\n}\n\n/**\n * Sends a request to the Aptos full node using the specified options.\n * This function allows you to interact with the Aptos blockchain by sending requests to the full node.\n *\n * @param options - The options for the request.\n * @param options.aptosConfig - Configuration settings for the Aptos client.\n * @param options.aptosConfig.clientConfig - Client-specific configuration settings.\n * @param options.aptosConfig.fullnodeConfig - Full node-specific configuration settings.\n * @param options.overrides - Additional overrides for the request.\n * @group Implementation\n * @category Client\n */\nexport async function postAptosFullNode<Req extends {}, Res extends {}>(\n options: PostAptosRequestOptions,\n): Promise<AptosResponse<Req, Res>> {\n const { aptosConfig } = options;\n\n return post<Req, Res>({\n ...options,\n type: AptosApiType.FULLNODE,\n overrides: {\n ...aptosConfig.clientConfig,\n ...aptosConfig.fullnodeConfig,\n ...options.overrides,\n HEADERS: { ...aptosConfig.clientConfig?.HEADERS, ...aptosConfig.fullnodeConfig?.HEADERS },\n },\n });\n}\n\n/**\n * Sends a request to the Aptos full node using the specified options.\n * This function allows you to interact with the Aptos blockchain by sending requests to the full node.\n *\n * @param options - The options for the request.\n * @param options.aptosConfig - Configuration settings for the Aptos client.\n * @param options.aptosConfig.clientConfig - Client-specific configuration settings.\n * @param options.aptosConfig.fullnodeConfig - Full node-specific configuration settings.\n * @param options.overrides - Additional overrides for the request.\n * @group Implementation\n * @category Client\n * @experimental\n */\nexport async function postBinaryAptosFullNode<Req extends {}>(\n options: PostAptosRequestOptions,\n): Promise<AptosResponse<Req, Buffer>> {\n const { aptosConfig } = options;\n\n return postBinary<Req>({\n ...options,\n type: AptosApiType.FULLNODE,\n overrides: {\n ...aptosConfig.clientConfig,\n ...aptosConfig.fullnodeConfig,\n ...options.overrides,\n HEADERS: { ...aptosConfig.clientConfig?.HEADERS, ...aptosConfig.fullnodeConfig?.HEADERS },\n },\n });\n}\n\n/**\n * Sends a request to the Aptos indexer with the specified options.\n * This function allows you to interact with the Aptos indexer and customize the request using various configurations.\n *\n * @param options - The options for the request to the Aptos indexer.\n * @param options.aptosConfig - Configuration settings specific to the Aptos client and indexer.\n * @param options.aptosConfig.clientConfig - The client configuration settings.\n * @param options.aptosConfig.indexerConfig - The indexer configuration settings.\n * @param options.overrides - Additional overrides for the request.\n * @param options.overrides.HEADERS - Custom headers to include in the request.\n * @group Implementation\n * @category Client\n */\nexport async function postAptosIndexer<Req extends {}, Res extends {}>(\n options: PostAptosRequestOptions,\n): Promise<AptosResponse<Req, Res>> {\n const { aptosConfig } = options;\n\n return post<Req, Res>({\n ...options,\n type: AptosApiType.INDEXER,\n overrides: {\n ...aptosConfig.clientConfig,\n ...aptosConfig.indexerConfig,\n ...options.overrides,\n HEADERS: { ...aptosConfig.clientConfig?.HEADERS, ...aptosConfig.indexerConfig?.HEADERS },\n },\n });\n}\n\n/**\n * Sends a request to the Aptos faucet to obtain test tokens.\n * This function modifies the provided configuration to ensure that the API_KEY is not included in the request.\n *\n * Note that only devnet has a publicly accessible faucet. For testnet, you must use\n * the minting page at https://aptos.dev/network/faucet.\n *\n * @param options - The options for the request.\n * @param options.aptosConfig - The configuration settings for the Aptos client.\n * @param options.aptosConfig.clientConfig - The client-specific configuration settings.\n * @param options.aptosConfig.clientConfig.HEADERS - Optional headers to include in the request.\n * @param options.aptosConfig.faucetConfig - The configuration settings specific to the faucet.\n * @param options.overrides - Additional overrides for the request configuration.\n * @group Implementation\n * @category Client\n */\nexport async function postAptosFaucet<Req extends {}, Res extends {}>(\n options: PostAptosRequestOptions,\n): Promise<AptosResponse<Req, Res>> {\n const { aptosConfig } = options;\n // Faucet does not support API_KEY\n // Create a new object with the desired modification\n const modifiedAptosConfig = {\n ...aptosConfig,\n clientConfig: { ...aptosConfig.clientConfig },\n };\n // Delete API_KEY config\n delete modifiedAptosConfig?.clientConfig?.API_KEY;\n\n return post<Req, Res>({\n ...options,\n type: AptosApiType.FAUCET,\n overrides: {\n ...modifiedAptosConfig.clientConfig,\n ...modifiedAptosConfig.faucetConfig,\n ...options.overrides,\n HEADERS: { ...modifiedAptosConfig.clientConfig?.HEADERS, ...modifiedAptosConfig.faucetConfig?.HEADERS },\n },\n });\n}\n\n/**\n * Makes a post request to the pepper service.\n *\n * @param options - The options for the request.\n * @param options.url - The URL to which the request is sent.\n * @param options.headers - The headers to include in the request.\n * @param options.body - The body of the request.\n * @returns A promise that resolves to the response from the pepper service.\n * @group Implementation\n * @category Client\n */\nexport async function postAptosPepperService<Req extends {}, Res extends {}>(\n options: PostAptosRequestOptions,\n): Promise<AptosResponse<Req, Res>> {\n return post<Req, Res>({ ...options, type: AptosApiType.PEPPER });\n}\n\n/**\n * Sends a request to the Aptos proving service with the specified options.\n *\n * @param options - The options for the request to the Aptos proving service.\n * @param options.type - The type of the request, which should be set to AptosApiType.PROVER.\n * @param options.data - The data to be included in the request.\n * @group Implementation\n * @category Client\n */\nexport async function postAptosProvingService<Req extends {}, Res extends {}>(\n options: PostAptosRequestOptions,\n): Promise<AptosResponse<Req, Res>> {\n return post<Req, Res>({ ...options, type: AptosApiType.PROVER });\n}\n"],"mappings":";;;;;;AA8FA,eAAsB,KACpB,SACkC;AAClC,QAAM,EAAE,MAAM,cAAc,MAAM,MAAM,YAAY,aAAa,QAAQ,aAAa,UAAU,IAAI;AACpG,QAAM,MAAM,YAAY,cAAc,IAAI;AAE1C,SAAO;AAAA,IACL;AAAA,MACE;AAAA,MACA,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,EACV;AACF;AAoBA,eAAsB,WAA2B,SAAkE;AACjH,QAAM,EAAE,MAAM,cAAc,MAAM,MAAM,YA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